| | |
| | | } from "@/api/cnas/resourceDemand/device"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | |
| | | export default { |
| | | name: '', |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {limsTable}, |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | this.form = {...row} |
| | | this.form['maintenanceContentArr'] = this.form.maintenanceContent.split(',') |
| | | } |
| | | if (this.operationType !== 'view') { |
| | | this.draftRestore('equipmentMaintenance', 'form', this.operationType === 'edit' ? this.form.id : this.clickNodeVal.value, 'dialogVisible') |
| | | } |
| | | }) |
| | | this.getDictS() |
| | | this.getUserList() |
| | |
| | | '制样室': 'sample_maintenance_content', |
| | | '低温实验室': 'hypothermia_maintenance_content', |
| | | }; |
| | | // 获取当前节点的实验室名称 |
| | | const name = this.clickNodeVal.parent.label; |
| | | // 取设备存放点名称作为映射键 |
| | | const name = this.clickNodeVal.storagePoint || '其他'; |
| | | // 根据映射关系获取对应的类型 |
| | | const type = labTypeMapping[name]; |
| | | if (!type) { |
| | | this.qualificationList = []; |
| | | return; |
| | | } |
| | | this.getDicts(type).then((response) => { |
| | | this.qualificationList = response.data.map((m) => { |
| | | return { |
| | |
| | | addDeviceMaintenance(this.form).then(res => { |
| | | this.buttonLoading = false; |
| | | this.$message.success('新增成功') |
| | | this.draftClear('equipmentMaintenance') |
| | | this.closeDia() |
| | | this.getTableList() |
| | | }).catch(err => { |
| | |
| | | }) |
| | | }, |
| | | closeDia () { |
| | | this.draftStop('equipmentMaintenance') |
| | | this.$refs['form'].resetFields(); |
| | | this.dialogVisible = false |
| | | this.refreshTableList() |