diff --git a/apps/l2/src/views/l2/pdo/components/line.vue b/apps/l2/src/views/l2/pdo/components/line.vue index b720344..9711218 100644 --- a/apps/l2/src/views/l2/pdo/components/line.vue +++ b/apps/l2/src/views/l2/pdo/components/line.vue @@ -36,10 +36,27 @@ export default { }, data() { return { + // 参数列表来源于 DeviceEnum 定义的监测字段 paramFields: [ { label: '带钢速度', value: 'stripSpeed' }, - { label: '张力PorBr1', value: 'tensionPorBr1' }, - { label: '清洗电压', value: 'cleaningVoltage' } + { label: '开卷张力1#', value: 'tensionPorBr1' }, + { label: '开卷张力2#', value: 'tensionPorBr2' }, + { label: '清洗电压', value: 'cleaningVoltage' }, + { label: '清洗电流', value: 'cleaningCurrent' }, + { label: '碱液浓度', value: 'alkaliConcentration' }, + { label: '碱液温度', value: 'alkaliTemperature' }, + { label: 'PH炉出口温度', value: 'phfExitStripTemp' }, + { label: '加热段出口温度', value: 'rtfExitStripTemp' }, + { label: '冷却段出口温度', value: 'jcsExitStripTemp' }, + { label: '均衡段出口温度', value: 'scsExitStripTemp' }, + { label: '锌锅温度', value: 'potTemperature' }, + { label: '锌锅功率', value: 'zincPotPower' }, + { label: '燃气消耗', value: 'gasConsumption' }, + { label: '冷却塔温度', value: 'coolingTowerStripTemp' }, + { label: '光整机张力', value: 'tensionBr5Tm' }, + { label: 'TM出口速度', value: 'stripSpeedTmExit' }, + { label: '拉矫延伸率', value: 'tlElongation' }, + { label: '拉矫张力', value: 'tensionTlBr7' } ], paramField: 'stripSpeed', treeProps: { @@ -155,8 +172,12 @@ export default { drawLineChart() { if (!this.chart) return; + // 清理旧图层,避免“暂无数据”残留 + this.chart.clear(); + const option = { backgroundColor: 'transparent', + graphic: [], // 清除占位/无数据图层 tooltip: { trigger: 'axis', axisPointer: { @@ -281,7 +302,7 @@ export default { ] }; - this.chart.setOption(option); + this.chart.setOption(option, true); }, // 绘制空图表(未选择实绩) diff --git a/apps/l2/src/views/l2/pdo/index.vue b/apps/l2/src/views/l2/pdo/index.vue index 1a5da5d..8ac8980 100644 --- a/apps/l2/src/views/l2/pdo/index.vue +++ b/apps/l2/src/views/l2/pdo/index.vue @@ -25,19 +25,19 @@
- -
-
+
已选中: 成品卷 {{ currentRow.exitMatId }} @@ -164,17 +164,17 @@
- +
- @@ -190,7 +190,7 @@ @@ -264,7 +264,7 @@ export default { this.btnLoading = false }) }, - // 查询(保持不变) + // 查询(保持不变) handleQuery() { this.btnLoading = true; this.getPdoList() @@ -375,16 +375,16 @@ export default { overflow-y: auto; padding-right: 5px; margin-bottom: 15px; - + &::-webkit-scrollbar { width: 6px; } - + &::-webkit-scrollbar-thumb { background: #c0c0c0; border-radius: 3px; } - + &::-webkit-scrollbar-track { background: #f0f0f0; } @@ -399,19 +399,19 @@ export default { border-radius: 2px; cursor: pointer; transition: all 0.2s; - + &.card-selected { border-color: #999; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); background: #fafafa; } - + ::v-deep .el-card__header { padding: 6px 8px; background: #f8f8f8; border-bottom: 1px solid #e0e0e0; } - + &:hover { border-color: #999; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); @@ -426,7 +426,7 @@ export default { margin-bottom: 2px; line-height: 1.4; } - + .card-subtitle { font-size: 11px; color: #888; @@ -438,11 +438,11 @@ export default { .param-groups-row { display: flex; gap: 8px; - + .param-group { flex: 1; min-width: 0; - + .group-title { font-size: 11px; font-weight: 600; @@ -457,7 +457,7 @@ export default { margin-right: -4px; text-align: center; } - + .param-list { .param-line { display: flex; @@ -465,18 +465,18 @@ export default { align-items: center; padding: 3px 0; border-bottom: 1px dotted #e8e8e8; - + &:last-child { border-bottom: none; } - + .param-label { color: #777; font-size: 11px; flex-shrink: 0; margin-right: 8px; } - + .param-value { color: #333; font-weight: 500; @@ -500,7 +500,7 @@ export default { padding-top: 6px; border-top: 1px solid #e0e0e0; margin-top: 6px; - + .el-button { font-size: 11px; padding: 2px 6px; @@ -528,39 +528,39 @@ export default { background: #f8f8f8; border-bottom: 1px solid #e0e0e0; flex-shrink: 0; - + .selected-info { display: flex; align-items: center; font-size: 13px; - + &.empty { color: #999; - + i { color: #bbb; margin-right: 6px; } } - + i { color: #67c23a; margin-right: 6px; font-size: 14px; } - + .selected-label { color: #666; margin-right: 6px; font-weight: 500; } - + .selected-value { color: #333; font-weight: 600; margin-right: 8px; } - + .selected-detail { color: #888; font-size: 12px; @@ -604,4 +604,4 @@ export default { height: 100%; padding-left: 15px; } - \ No newline at end of file + diff --git a/apps/l2/src/views/l2/plan/components/PlanRecommendPanel.vue b/apps/l2/src/views/l2/plan/components/PlanRecommendPanel.vue index ba9d114..da78ba6 100644 --- a/apps/l2/src/views/l2/plan/components/PlanRecommendPanel.vue +++ b/apps/l2/src/views/l2/plan/components/PlanRecommendPanel.vue @@ -334,17 +334,27 @@ export default { }, methods: { getSteelGradeLabel(gradeId) { - const match = this.steelGradeList.find(item => item.gradeid === gradeId) - return match ? match.name : (gradeId || '') + if (gradeId === undefined || gradeId === null) return '' + const gid = String(gradeId) + const match = this.steelGradeList.find( + item => + String(item.gradeid) === gid || + String(item.gradeId) === gid || + String(item.name) === gid || + String(item.gradeName || '') === gid + ) + return match ? (match.name || match.gradeName || gid) : gid }, async fetchSteelRecommendations() { const token = ++this.steelFetchToken this.loadingSteel = true try { + const gradeLabel = this.getSteelGradeLabel(this.steelGrade) const response = await listRollforce({ pageNum: 1, pageSize: 8, - steelGrade: this.steelGrade + steelGrade: gradeLabel || this.steelGrade, + gradeId: this.steelGrade }) if (token !== this.steelFetchToken) return const rows = Array.isArray(response.rows) ? response.rows : [] @@ -467,11 +477,16 @@ export default { } }, mapRollforceRow(row, sourceLabel = '光整机轧制力') { + const gradeLabel = + row.steelGradeName || + row.steelGradeLabel || + this.getSteelGradeLabel(row.steelGrade) || + row.steelGrade return { _id: `rollforce-${row.id || createId()}`, sourceLabel, steelGrade: row.steelGrade, - steelGradeLabel: this.getSteelGradeLabel(row.steelGrade), + steelGradeLabel: gradeLabel, entryThick: row.thick, yieldPoint: row.yieldStren, spmElongation: row.elong, @@ -487,11 +502,12 @@ export default { } }, mapTensionRow(row) { + const gradeLabel = row.steelGradeName || this.getSteelGradeLabel(row.steelGrade) || row.steelGrade return { _id: `tension-${row.id || createId()}`, sourceLabel: '全线张力', steelGrade: row.steelGrade, - steelGradeLabel: row.steelGrade ? this.getSteelGradeLabel(row.steelGrade) : '', + steelGradeLabel: gradeLabel || '', entryThick: row.thick, yieldPoint: row.yieldStren, spmElongation: row.elong, diff --git a/apps/l2/src/views/l2/plan/index.vue b/apps/l2/src/views/l2/plan/index.vue index 22bfb98..f4ef111 100644 --- a/apps/l2/src/views/l2/plan/index.vue +++ b/apps/l2/src/views/l2/plan/index.vue @@ -294,6 +294,21 @@ min="0"> + + + + + + + + + + + + + + + @@ -611,7 +626,17 @@ export default { }, handleApplySteelGrade(payload) { if (!payload) return - if (payload.steelGrade) this.form.steelGrade = payload.steelGrade + if (payload.steelGrade) { + const gid = String(payload.steelGrade) + const match = this.steelGradeList.find(item => + String(item.gradeid) === gid || + String(item.gradeId) === gid || + String(item.name) === gid || + String(item.gradeName || '') === gid + ) + // 下拉选择器以 gradeid 为 value,确保回填 id 以显示名称 + this.form.steelGrade = match ? match.gradeid : payload.steelGrade + } if (payload.entryThick) this.form.entryThick = payload.entryThick if (payload.entryWidth) this.form.entryWidth = payload.entryWidth if (payload.yieldPoint) this.form.yieldPoint = payload.yieldPoint @@ -667,15 +692,20 @@ export default { return null } - // 从matMapList中查找匹配的位置 - const position = this.matMapList.find(item => + // 从matMapList中查找匹配的位置(若有多个匹配,取posIdx最大/最靠后的为当前位置) + const positions = this.matMapList.filter(item => (item.planId && item.planId === plan.planid) || (item.planId && item.planId === plan.planId) || (item.matId && item.matId === plan.coilid) || (item.matId && item.matId === plan.matId) ) - - return position + + if (positions.length === 0) return null + return positions.reduce((prev, cur) => { + const p = prev?.posIdx ?? -1 + const c = cur?.posIdx ?? -1 + return c > p ? cur : prev + }) }, // 获取计划列表数据(支持传入清理后的查询参数) async getList(cleanParams) { diff --git a/apps/l2/src/views/l2/setup/pdi.vue b/apps/l2/src/views/l2/setup/pdi.vue index 6f9b49f..01e90c4 100644 --- a/apps/l2/src/views/l2/setup/pdi.vue +++ b/apps/l2/src/views/l2/setup/pdi.vue @@ -61,7 +61,7 @@ class="card-checkbox" >
-
计划号: {{ item.planid || '-' }} | 更改次数: {{ item.type || '-' }}
+
计划ID: {{ item.planid || '-' }} | 更改次数: {{ item.type || '-' }}
@@ -69,61 +69,61 @@
全线张力
- 开卷机: + 开卷机张力: {{ item.porTension || '-' }}
- 入口活套: + 入口活套张力: {{ item.celTension || '-' }}
- 清洗段: + 清洗段张力: {{ item.cleanTension || '-' }}
- 炉区: + 炉区张力: {{ item.furTension || '-' }}
- 冷却塔: + 冷却塔张力: {{ item.towerTension || '-' }}
- 光整机-不投: + 光整机不投张力: {{ item.tmNoneTension || '-' }}
- 光整机入口: + 光整机入口张力: {{ item.tmEntryTension || '-' }}
- 光整机出口: + 光整机出口张力: {{ item.tmExitTension || '-' }}
- 拉矫机-不投: + 拉矫机不投张力: {{ item.tlNoneTension || '-' }}
- 拉矫机出口: + 拉矫机出口张力: {{ item.tlExitTension || '-' }}
- 后处理: + 后处理张力: {{ item.coatTension || '-' }}
- 出口活套: + 出口活套张力: {{ item.cxlTension || '-' }}
- 卷取机: + 卷取机张力: {{ item.trTension || '-' }}
@@ -137,11 +137,11 @@
光整机参数
- 轧制力: + 光整机轧制力: {{ item.tmRollforce || '-' }}
- 弯辊力: + 光整机弯辊力: {{ item.tmBendforce || '-' }}
@@ -160,7 +160,7 @@
拉矫机参数
- 延伸率: + 拉矫机延伸率: {{ item.tlElong || '-' }}
@@ -180,7 +180,7 @@
-
炉火段
+
炉段温度
预热段出口板温: @@ -221,20 +221,43 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> + + +
+
+
+ + 已选中: + 钢卷 {{ currentRow.coilid }} + 计划号: {{ currentRow.planid }} +
+
+ + 请选择上方卡片查看图表 +
+
+
+ +
请选择钢卷以查看工艺曲线
+
+