| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="UID码:" prop="uidNo"> |
| | | <el-input v-model="form.uidNo" placeholder="请输入" disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | |
| | | </el-select> |
| | | </template> |
| | | <template #deviceStatus="{ row }"> |
| | | <el-tag v-if="row.deviceStatus" :type="getDeviceStatusType(row.deviceStatus)"> |
| | | {{ row.deviceStatus }} |
| | | </el-tag> |
| | | <span v-else style="color: #999">-</span> |
| | | <el-select |
| | | v-model="row.deviceStatus" |
| | | placeholder="请选择" |
| | | default-first-option |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="正常" value="正常" /> |
| | | <el-option label="停机" value="停机" /> |
| | | <el-option label="运行" value="运行" /> |
| | | <el-option label="维修" value="维修" /> |
| | | <el-option label="/" value="/" /> |
| | | </el-select> |
| | | </template> |
| | | <template #result="{ row }"> |
| | | <el-input v-model="row.result" placeholder="请输入" clearable /> |
| | |
| | | model: "", |
| | | testStandardId: "", |
| | | unit: "", |
| | | uidNo: "", |
| | | quantity: "", |
| | | checkCompany: "", |
| | | checkResult: "", |
| | |
| | | prop: "standardValue", |
| | | width: 180 |
| | | }, |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | width: 80 |
| | | }, |
| | | { |
| | | label: "检测器具", |
| | | prop: "instrument", |
| | | dataType: 'slot', |
| | | slot: 'instrument', |
| | | width: 220 |
| | | }, |
| | | { |
| | | label: "设备状态", |
| | | prop: "deviceStatus", |
| | | dataType: 'slot', |
| | | slot: 'deviceStatus', |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "检测结果", |
| | | prop: "result", |
| | | dataType: 'slot', |
| | | slot: 'result', |
| | | minWidth: 150 |
| | | }, |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | width: 70 |
| | | }, |
| | | { |
| | | label: "检测器具", |
| | | prop: "instrument", |
| | | dataType: 'slot', |
| | | slot: 'instrument', |
| | | width: 220 |
| | | }, |
| | | { |
| | | label: "设备状态", |
| | | prop: "deviceStatus", |
| | | dataType: 'slot', |
| | | slot: 'deviceStatus', |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "检测结果", |
| | | prop: "result", |
| | | dataType: 'slot', |
| | | slot: 'result', |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: "结果判断", |
| | | prop: "resultJudgment", |
| | |
| | | if (selectedModel) { |
| | | form.value.model = selectedModel.model || ''; |
| | | form.value.unit = selectedModel.unit || ''; |
| | | form.value.uidNo = selectedModel.uidNo || ''; |
| | | } |
| | | } |
| | | |
| | |
| | | const getModels = (value) => { |
| | | form.value.productModelId = undefined; |
| | | form.value.unit = undefined; |
| | | form.value.uidNo = undefined; |
| | | modelOptions.value = []; |
| | | currentProductId.value = value |
| | | form.value.productName = findNodeById(productOptions.value, value); |
| | |
| | | const handleChangeModel = (value) => { |
| | | form.value.model = modelOptions.value.find(item => item.id == value)?.model || ''; |
| | | form.value.unit = modelOptions.value.find(item => item.id == value)?.unit || ''; |
| | | form.value.uidNo = modelOptions.value.find(item => item.id == value)?.uidNo || ''; |
| | | } |
| | | |
| | | const findNodeById = (nodes, productId) => { |