| | |
| | | <el-table-column prop="defaultValue" label="默认值" min-width="120" /> |
| | | <el-table-column label="操作" width="140" fixed="right" align="center"> |
| | | <template #default="{ row }"> |
| | | <el-button link type="primary" size="small" :disabled="isStandardReadonly" @click="openParamDialog('edit', row)"> |
| | | <el-button link type="primary" :disabled="isStandardReadonly" @click="openParamDialog('edit', row)"> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button link type="danger" size="small" :disabled="isStandardReadonly" @click="handleParamDelete(row)"> |
| | | <el-button link type="danger" :disabled="isStandardReadonly" @click="handleParamDelete(row)"> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | |
| | | prop: 'standardNo', |
| | | dataType: 'slot', |
| | | slot: 'standardNoCell', |
| | | minWidth: 160, |
| | | width: 120, |
| | | align: 'center', |
| | | headerSlot: 'standardNoHeader' |
| | | }, |
| | | { |
| | | label: '标准名称', |
| | | prop: 'standardName', |
| | | minWidth: 180, |
| | | width: 120, |
| | | align: 'center', |
| | | headerSlot: 'standardNameHeader' |
| | | }, |
| | |
| | | label: '类别', |
| | | prop: 'inspectType', |
| | | headerSlot: 'inspectTypeHeader', |
| | | width: 120, |
| | | align: 'center', |
| | | dataType: 'tag', |
| | | formatData: (val) => { |
| | |
| | | return map[val] || val |
| | | } |
| | | }, |
| | | { |
| | | label: '工序', |
| | | prop: 'processId', |
| | | align: 'center', |
| | | dataType: 'tag', |
| | | formatData: (val) => { |
| | | const target = processOptions.value.find( |
| | | (item) => String(item.value) === String(val) |
| | | ) |
| | | return target?.label || val |
| | | } |
| | | }, |
| | | // { |
| | | // label: '工序', |
| | | // prop: 'processId', |
| | | // align: 'center', |
| | | // dataType: 'tag', |
| | | // formatData: (val) => { |
| | | // const target = processOptions.value.find( |
| | | // (item) => String(item.value) === String(val) |
| | | // ) |
| | | // return target?.label || val |
| | | // } |
| | | // }, |
| | | { |
| | | label: '状态', |
| | | prop: 'state', |
| | | width: 120, |
| | | headerSlot: 'stateHeader', |
| | | align: 'center', |
| | | dataType: 'tag', |
| | |
| | | |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection |
| | | |
| | | if (!selection.length) { |
| | | currentStandard.value = null |
| | | detailTableData.value = [] |
| | | return |
| | | } |
| | | |
| | | const nextStandard = selection[selection.length - 1] |
| | | if (currentStandard.value?.id === nextStandard.id) return |
| | | |
| | | currentStandard.value = nextStandard |
| | | loadDetail(nextStandard.id) |
| | | } |
| | | |
| | | // 批量审核:状态 1=批准,2=撤销 |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .metric-maintenance { |
| | | padding: 0; |
| | | min-width: 0; |
| | | } |
| | | |
| | | .metric-maintenance-row { |
| | | width: 100%; |
| | | } |
| | |
| | | width: 100%; |
| | | margin-top: 4px; |
| | | } |
| | | </style> |
| | | </style> |