style,feat,fix: 多处业务与样式优化
1. 调整供应商名称样式提升可读性 2. 简化接口id路径匹配规则 3. 修复数据源配置换行格式 4. 新增物料基础信息与性能参数展示 5. 优化报价对比布局与加载逻辑
This commit is contained in:
@@ -27,7 +27,7 @@ public class BizMaterialController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('bid:material:query')")
|
@PreAuthorize("@ss.hasPermi('bid:material:query')")
|
||||||
@GetMapping("/{id:\\\\d+}")
|
@GetMapping("/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable Long id) {
|
public AjaxResult getInfo(@PathVariable Long id) {
|
||||||
return success(service.selectBizMaterialById(id));
|
return success(service.selectBizMaterialById(id));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,61 +1,61 @@
|
|||||||
# 数据源配置
|
# 数据源配置
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://49.232.154.205:13306/ryvue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
|
url: jdbc:mysql://49.232.154.205:13306/ryvue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: Root@12345
|
password: Root@12345
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
enabled: false
|
enabled: false
|
||||||
url:
|
url:
|
||||||
username:
|
username:
|
||||||
password:
|
password:
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initialSize: 5
|
initialSize: 5
|
||||||
# 最小连接池数量
|
# 最小连接池数量
|
||||||
minIdle: 10
|
minIdle: 10
|
||||||
# 最大连接池数量
|
# 最大连接池数量
|
||||||
maxActive: 20
|
maxActive: 20
|
||||||
# 配置获取连接等待超时的时间
|
# 配置获取连接等待超时的时间
|
||||||
maxWait: 60000
|
maxWait: 60000
|
||||||
# 配置连接超时时间
|
# 配置连接超时时间
|
||||||
connectTimeout: 30000
|
connectTimeout: 30000
|
||||||
# 配置网络超时时间
|
# 配置网络超时时间
|
||||||
socketTimeout: 60000
|
socketTimeout: 60000
|
||||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
timeBetweenEvictionRunsMillis: 60000
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||||
minEvictableIdleTimeMillis: 300000
|
minEvictableIdleTimeMillis: 300000
|
||||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||||
maxEvictableIdleTimeMillis: 900000
|
maxEvictableIdleTimeMillis: 900000
|
||||||
# 配置检测连接是否有效
|
# 配置检测连接是否有效
|
||||||
validationQuery: SELECT 1 FROM DUAL
|
validationQuery: SELECT 1 FROM DUAL
|
||||||
testWhileIdle: true
|
testWhileIdle: true
|
||||||
testOnBorrow: false
|
testOnBorrow: false
|
||||||
testOnReturn: false
|
testOnReturn: false
|
||||||
webStatFilter:
|
webStatFilter:
|
||||||
enabled: true
|
enabled: true
|
||||||
statViewServlet:
|
statViewServlet:
|
||||||
enabled: true
|
enabled: true
|
||||||
# 设置白名单,不填则允许所有访问
|
# 设置白名单,不填则允许所有访问
|
||||||
allow:
|
allow:
|
||||||
url-pattern: /druid/*
|
url-pattern: /druid/*
|
||||||
# 控制台管理用户名和密码
|
# 控制台管理用户名和密码
|
||||||
login-username: ruoyi
|
login-username: ruoyi
|
||||||
login-password: 123456
|
login-password: 123456
|
||||||
filter:
|
filter:
|
||||||
stat:
|
stat:
|
||||||
enabled: true
|
enabled: true
|
||||||
# 慢SQL记录
|
# 慢SQL记录
|
||||||
log-slow-sql: true
|
log-slow-sql: true
|
||||||
slow-sql-millis: 1000
|
slow-sql-millis: 1000
|
||||||
merge-sql: true
|
merge-sql: true
|
||||||
wall:
|
wall:
|
||||||
config:
|
config:
|
||||||
multi-statement-allow: true
|
multi-statement-allow: true
|
||||||
@@ -65,6 +65,10 @@
|
|||||||
<!-- 基础信息区 -->
|
<!-- 基础信息区 -->
|
||||||
<div class="mat-basic-body">
|
<div class="mat-basic-body">
|
||||||
<div class="basic-info-grid">
|
<div class="basic-info-grid">
|
||||||
|
<div class="basic-info-item">
|
||||||
|
<span class="basic-label">物料编码</span>
|
||||||
|
<span class="basic-value">{{ mat.materialCode || '—' }}</span>
|
||||||
|
</div>
|
||||||
<div class="basic-info-item">
|
<div class="basic-info-item">
|
||||||
<span class="basic-label">规格型号</span>
|
<span class="basic-label">规格型号</span>
|
||||||
<span class="basic-value">{{ mat.spec || '—' }}</span>
|
<span class="basic-value">{{ mat.spec || '—' }}</span>
|
||||||
@@ -81,6 +85,30 @@
|
|||||||
<span class="basic-label">单位</span>
|
<span class="basic-label">单位</span>
|
||||||
<span class="basic-value">{{ mat.unit || '—' }}</span>
|
<span class="basic-value">{{ mat.unit || '—' }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="basic-info-item">
|
||||||
|
<span class="basic-label">所属分类</span>
|
||||||
|
<span class="basic-value">{{ mat.categoryName || '—' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="basic-info-item">
|
||||||
|
<span class="basic-label">用途</span>
|
||||||
|
<span class="basic-value">{{ mat.purpose || '—' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 性能参数 -->
|
||||||
|
<div v-if="mat.performanceParams" class="perf-params-section">
|
||||||
|
<div class="section-divider">
|
||||||
|
<span class="divider-line"></span>
|
||||||
|
<span class="divider-text"><i class="el-icon-setting"></i> 性能参数</span>
|
||||||
|
<span class="divider-line"></span>
|
||||||
|
</div>
|
||||||
|
<div class="perf-params-grid">
|
||||||
|
<div v-for="(p, pIdx) in parsePerfParams(mat.performanceParams)" :key="pIdx" class="perf-item">
|
||||||
|
<span class="perf-name">{{ p.name }}</span>
|
||||||
|
<span class="perf-value">{{ p.value }}</span>
|
||||||
|
<span class="perf-unit" v-if="p.unit">{{ p.unit }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -212,11 +240,9 @@ export default {
|
|||||||
async initLoad() {
|
async initLoad() {
|
||||||
this.loadError = null;
|
this.loadError = null;
|
||||||
await this.loadSameNameMaterials();
|
await this.loadSameNameMaterials();
|
||||||
const allIds = this.sameNameMaterials.map(m => m.materialId);
|
// 仅加载当前物料的报价数据,不自动选择其他物料进行对比
|
||||||
this._loadingLock = true;
|
await this.loadQuoteComparison([]);
|
||||||
await this.loadQuoteComparison(allIds);
|
this.targetIds = [];
|
||||||
this.targetIds = allIds;
|
|
||||||
this._loadingLock = false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async loadSameNameMaterials() {
|
async loadSameNameMaterials() {
|
||||||
@@ -235,11 +261,8 @@ export default {
|
|||||||
async handleSelectionChange(selectedIds) {
|
async handleSelectionChange(selectedIds) {
|
||||||
if (this._loadingLock) return;
|
if (this._loadingLock) return;
|
||||||
this.loadError = null;
|
this.loadError = null;
|
||||||
if (selectedIds.length) {
|
// 无论是否还有选中物料,都重新加载(空数组时仅加载当前物料报价)
|
||||||
await this.loadQuoteComparison(selectedIds);
|
await this.loadQuoteComparison(selectedIds || []);
|
||||||
} else {
|
|
||||||
this.quoteMap = {};
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async loadQuoteComparison(materialIds) {
|
async loadQuoteComparison(materialIds) {
|
||||||
@@ -284,6 +307,14 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
parsePerfParams(jsonStr) {
|
||||||
|
if (!jsonStr) return [];
|
||||||
|
try {
|
||||||
|
const parsed = JSON.parse(jsonStr);
|
||||||
|
return Array.isArray(parsed) ? parsed : [];
|
||||||
|
} catch { return []; }
|
||||||
|
},
|
||||||
|
|
||||||
formatDate(val) {
|
formatDate(val) {
|
||||||
if (!val) return '—';
|
if (!val) return '—';
|
||||||
const d = new Date(val);
|
const d = new Date(val);
|
||||||
@@ -441,7 +472,7 @@ export default {
|
|||||||
/* ========== 卡片网格 ========== */
|
/* ========== 卡片网格 ========== */
|
||||||
.quote-comparison-grid {
|
.quote-comparison-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,7 +523,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.basic-info-grid {
|
.basic-info-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
gap: 8px 20px;
|
gap: 8px 20px;
|
||||||
}
|
}
|
||||||
.basic-info-item {
|
.basic-info-item {
|
||||||
@@ -690,6 +721,37 @@ export default {
|
|||||||
}
|
}
|
||||||
.quote-empty i { font-size: 32px; }
|
.quote-empty i { font-size: 32px; }
|
||||||
|
|
||||||
|
/* ========== 性能参数 ========== */
|
||||||
|
.perf-params-section {
|
||||||
|
padding: 0 8px 8px;
|
||||||
|
}
|
||||||
|
.perf-params-grid {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 8px 10px;
|
||||||
|
}
|
||||||
|
.perf-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
background: #f5f7fa;
|
||||||
|
padding: 4px 10px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.perf-name {
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
.perf-value {
|
||||||
|
color: #303133;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.perf-unit {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ========== 响应式适配 ========== */
|
/* ========== 响应式适配 ========== */
|
||||||
@media screen and (max-width: 1200px) {
|
@media screen and (max-width: 1200px) {
|
||||||
.quote-comparison-grid {
|
.quote-comparison-grid {
|
||||||
|
|||||||
@@ -168,8 +168,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.supplier-name {
|
.supplier-name {
|
||||||
font-size: 8px;
|
font-size: 14px;
|
||||||
font-weight: 200;
|
font-weight: 600;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
|||||||
Reference in New Issue
Block a user