src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
@@ -67,11 +67,13 @@
} 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,
@@ -180,6 +182,9 @@
          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()
@@ -201,10 +206,14 @@
        '制样室': '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 {
@@ -255,6 +264,7 @@
          addDeviceMaintenance(this.form).then(res => {
            this.buttonLoading = false;
            this.$message.success('新增成功')
            this.draftClear('equipmentMaintenance')
            this.closeDia()
            this.getTableList()
          }).catch(err => {
@@ -264,6 +274,7 @@
      })
    },
    closeDia () {
      this.draftStop('equipmentMaintenance')
      this.$refs['form'].resetFields();
      this.dialogVisible = false
      this.refreshTableList()