| | |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="校准服务机构:" prop="unitOfMeasure"> |
| | | <el-input v-model="calibrationRecord.unitOfMeasure" :disabled="operationType === 'view'" |
| | | size="small"></el-input> |
| | | <el-select v-model="calibrationRecord.unitOfMeasure" :disabled="operationType === 'view'" clearable filterable |
| | | size="small" style="width: 100%"> |
| | | <el-option v-for="name in calibrationServiceOptions" :key="name" :label="name" :value="name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | |
| | | addOrUpdateDeviceMetricRecord, |
| | | saveOrUpdateDeviceMetric |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage' |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | export default { |
| | | props: { |
| | |
| | | fileName: '', // |
| | | }, |
| | | formRules: { |
| | | unitOfMeasure: [{ required: true, message: '请输入校准服务机构', trigger: 'blur' }], |
| | | unitOfMeasure: [{ required: true, message: '请选择校准服务机构', trigger: 'change' }], |
| | | calibrationDate: [{ required: true, message: '请选择校准日期', trigger: 'change' }], |
| | | calculatingApparatus: [{ required: true, message: '请输入计算器具', trigger: 'blur' }], |
| | | standardRange: [{ required: true, message: '请输入计算标准量程', trigger: 'blur' }], |
| | |
| | | addRecordLoading: false, |
| | | upLoading: false, |
| | | operationType: '', |
| | | qualifiedSupplierNames: [], |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | |
| | | }, |
| | | // 用于上传文件的信息 |
| | | computed: { |
| | | // 校准服务机构下拉选项(合格供应商 + 当前值兜底) |
| | | calibrationServiceOptions() { |
| | | const list = this.qualifiedSupplierNames.slice(); |
| | | const value = this.calibrationRecord.unitOfMeasure; |
| | | if (value && list.indexOf(value) === -1) list.push(value); |
| | | return list; |
| | | }, |
| | | ...mapGetters(["nickName"]), |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.obtainQualifiedSupplierList() |
| | | //获取操作记录信息 |
| | | this.getTableList(this.clickNodeVal.value) // 获取设备校准列表数据 |
| | | }, |
| | | methods: { |
| | | // 拉取合格供应商列表(校准服务机构下拉选项) |
| | | obtainQualifiedSupplierList() { |
| | | selectQualifiedSupplierManagementPage({ current: 1, size: 999 }).then(res => { |
| | | if (res.code === 200) { |
| | | const rows = (res.data && res.data.records) || []; |
| | | this.qualifiedSupplierNames = [...new Set(rows.map(r => r.supplierName).filter(Boolean))]; |
| | | } |
| | | }); |
| | | }, |
| | | //状态判定 |
| | | checkRadio() { |
| | | let resultList = this.calibrateParams.map(ele => ele.result) |