| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" v-if="editForm.inspectionItemType == 1"> |
| | | <el-form-item label="设备绑定:" prop="deviceId"> |
| | | <el-select v-model="editForm.deviceId" clearable placeholder="请选择" size="small" style="width: 100%" multiple> |
| | | <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检验值类型:" prop="inspectionValueType"> |
| | | <el-select v-model="editForm.inspectionValueType" clearable placeholder="请选择" size="small" style="width: 100%"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="特殊标识:" prop="bsm"> |
| | | <el-select v-model="editForm.bsm" clearable placeholder="请选择" size="small" style="width: 100%"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="原始记录模板:" prop="templateId"> |
| | | <el-select v-model="editForm.templateId" clearable placeholder="请选择" size="small" style="width: 100%"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检验项分类:" prop="inspectionItemClass"> |
| | | <el-input v-model="editForm.inspectionItemClass" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检验项分类EN:" prop="inspectionItemClassEn"> |
| | | <el-input v-model="editForm.inspectionItemClassEn" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="试验方法:" prop="method"> |
| | | <el-select v-model="editForm.method" clearable multiple placeholder="请选择" size="small" style="width: 100%"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="条件:" prop="radiusList"> |
| | | <el-select v-model="editForm.radiusList" allow-create default-first-option filterable multiple |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="收费标准(元/次):" prop="rates"> |
| | | <el-input v-model="editForm.rates" clearable size="small"></el-input> |
| | |
| | | upItemParameter |
| | | } from "@/api/structural/capability"; |
| | | import {selectStandardMethods} from "@/api/structural/standardMethod"; |
| | | import {search} from "@/api/business/inspectionTask"; |
| | | |
| | | export default { |
| | | name: "EditForm", |
| | |
| | | method: '', // 试验方法 |
| | | radiusList: [], // 条件 |
| | | rates: '', // 条件 |
| | | deviceId: [], // 设备 |
| | | }, |
| | | sampleList: [], // 检验对象下拉框 |
| | | laboratoryList: [], // 场所下拉框 |
| | |
| | | { required: true, message: '请选择原始记录模板', trigger: 'change' } |
| | | ] |
| | | }, |
| | | operationType: '' |
| | | operationType: '', |
| | | equipOptions: [] |
| | | } |
| | | }, |
| | | // 方法集合 |
| | |
| | | openDia (type, row) { |
| | | this.operationType = type |
| | | this.editFormDia = true |
| | | this.getEquipOptions() // 获取所有设备 |
| | | this.obtainItemParameterList() // 场所类型 |
| | | this.getStandardTemplate() // 原始记录模板下拉框 |
| | | this.getSelectStandardMethods() // 试验方法 |
| | |
| | | } else { |
| | | this.editForm = this.HaveJson(row) |
| | | this.editForm.sample = JSON.parse(this.editForm.sample) |
| | | this.editForm.radiusList = JSON.parse(this.editForm.radiusList) |
| | | this.editForm.radiusList = this.editForm.radiusList && JSON.parse(this.editForm.radiusList) |
| | | this.editForm.method = JSON.parse(this.editForm.method) |
| | | this.$set(this.editForm, 'deviceId', this.editForm.deviceIds && this.editForm.deviceIds.split(",")) |
| | | } |
| | | }, |
| | | // 提交编辑 |
| | |
| | | obj.radiusList = JSON.stringify(obj.radiusList) |
| | | } else { |
| | | obj.radiusList = null |
| | | } |
| | | if (obj.deviceId?.length > 0) { |
| | | obj.deviceIds = obj.deviceId.join(',') |
| | | } else { |
| | | obj.deviceIds = null |
| | | } |
| | | if(obj.id){ |
| | | // 修改 |
| | |
| | | this.templateIdList = data |
| | | }) |
| | | }, |
| | | // 获取所有设备 |
| | | getEquipOptions() { |
| | | this.equipOptions = []; |
| | | search({ status: 0 }).then((res) => { |
| | | if (res.code === 200 && res.data) { |
| | | this.equipOptions = res.data.map((m) => { |
| | | m.value = m.managementNumber; |
| | | m.label = m.deviceName; |
| | | return m; |
| | | }); |
| | | } |
| | | }).catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | </script> |