王震
2023-09-09 c6cf8edf2f0ff628ea5c1323eb9bc685398b3a43
src/components/view/laboratoryManagement.vue
@@ -209,6 +209,7 @@
          :props="{ children: 'children', label: 'father' }"
          node-key="id"
          default-expand-all
          highlight-current
          @node-click="handleNodeClick"
        >
          <div class="custom-tree-node" slot-scope="{ node, data }">
@@ -427,7 +428,7 @@
        equr:1,
      },
      delete:{},
      equip:[],
      equip:1,
      rules: {
        name: [
          { required: true, message: "请输入仪器设备编号", trigger: "blur" },
@@ -465,12 +466,20 @@
      }
    };
  },
  mounted() {
    // 初始化调用二级树
    this.twoTreeApi();
    // 初始化调用表格数据
    // this.tableDataApi();
    this.selectDevice()//右边
  },
  methods: {
    selectDevice() {//右边数据
      console.log(this.$api.url.selectDevice);
      console.log(this.ruleForm.treedata.father);
      console.log(this.equip);
      this.$axios.get(this.$api.url.selectDevice,{
        params:{
          father:this.treedata.father,
          father:this.ruleForm.treedata.father,
          type:this.equip,
        }
      }).then(res =>{
@@ -582,7 +591,7 @@
    },
    handleNodeClick(data) {
      console.log(data);
        this.treedata = data
        // this.treedata = data
        this.selectDevice()
    },
    handlerDeptList() {
@@ -720,13 +729,7 @@
        });
    }
  },
  mounted() {
    // 初始化调用二级树
    this.twoTreeApi();
    // 初始化调用表格数据
    this.tableDataApi();
    this.selectDevice()//右边
  },
  watch: {
    "ruleForm.rawInsProductId": {
      //监听ruleForm.rawInsProductId