| | |
| | | <el-col :span="7"> |
| | | <el-form :label-position="labelPosition" :model="formData" label-width="140px" ref="ruleForm"> |
| | | <!-- 实验室列表 --> |
| | | <el-form-item label="所属部门:"> |
| | | <el-form-item label="所属部门:" required> |
| | | <el-select :disabled="isUp" v-model="formData.subordinateDepartmentsId" placeholder="请选择" size="small" |
| | | style="width:100%"> |
| | | <el-option v-for="item in subordinateDepartmentsList" :key="item.value" :label="item.label" |
| | |
| | | <el-col :span="7"> |
| | | <el-form :label-position="labelPosition" :model="formData2" label-width="120px" ref="ruleForm"> |
| | | <!-- 实验室列表 --> |
| | | <el-form-item label="所属部门:"> |
| | | <el-form-item label="所属部门:" required> |
| | | <el-select v-model="formData2.subordinateDepartmentsId" placeholder="请选择" size="small" style="width:100%"> |
| | | <el-option v-for="item in subordinateDepartmentsList" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | // this.getPower() |
| | | this.selectEnumByCategory() |
| | | this.selectDevicePrincipal() |
| | | this.obtainItemParameterList() |
| | | this.getInsProductIds() |
| | | // this.$customEvents.$on('largeCategory', this.handleNotification); |
| | | // 初始化 |
| | | this.clickSidebar(this.clickNodeVal) |
| | | }, |
| | |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '设备仪器一览表.doc') |
| | | }) |
| | | }, |
| | | // 权限分配 |
| | | getPower(radio) { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let del = false |
| | | let add = false |
| | | let config = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'upDeviceParameter') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'delDeviceParameter') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'addDeviceParameter') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'saveDataAcquisitionConfiguration') { |
| | | config = true |
| | | } |
| | | } |
| | | if (!config) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | // 获取字典 |
| | | selectEnumByCategory() { |
| | |
| | | this.$message.error('未输入校准有效期') |
| | | return |
| | | } |
| | | if (!this.formData.subordinateDepartmentsId) { |
| | | this.$message.error('未选择所属部门') |
| | | return |
| | | } |
| | | if (this.formData.deviceStatus === '' || this.formData.deviceStatus === null) { |
| | | this.$message.error('未选择当前状态') |
| | | return |
| | |
| | | } |
| | | this.upLoad = true; |
| | | upDeviceParameter(formData).then(res => { |
| | | if (res.code === 201) { |
| | | this.upLoad = false |
| | | return |
| | | } |
| | | this.$message.success('修改成功') |
| | | this.upLoad = false |
| | | this.refreshTable('page') |
| | |
| | | } |
| | | this.upLoad2 = true; |
| | | addDeviceParameter(formData).then(res => { |
| | | if (res.code === 201) { |
| | | this.upLoad2 = false |
| | | return |
| | | } |
| | | this.$message.success('提交成功') |
| | | this.upLoad2 = false |
| | | this.refreshTable('page') |
| | |
| | | this.upLoad3 = true |
| | | numberCollect(this.configForm).then(res => { |
| | | this.upLoad3 = false |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('操作成功') |
| | | this.refreshTable('page') |
| | | this.dialogVisible3 = false |
| | |
| | | }) |
| | | .then(() => { |
| | | delDeviceParameter({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refresh(); |
| | | }); |