Fixiaobai
2023-09-15 0818becbf021341ce369d4f92b2ade3a2648a953
src/components/view/laboratoryManagement.vue
@@ -53,6 +53,9 @@
                <el-form-item label="设备组" prop="name">
                  <el-select
                    v-model="ruleForm.equr"
                    allow-create
                    filterable
                    @create=""
                    placeholder="请选择设备组"
                  >
                    <el-option
@@ -63,6 +66,12 @@
                    >
                    </el-option>
                  </el-select>
                <!-- <el-autocomplete
                class="inline-input"
                v-model="ruleForm.equr"
                :fetch-suggestions="querySearch"
                 placeholder="请输入内容"
    ></el-autocomplete> -->
                </el-form-item>
              </el-col>
              <el-col :span="12">
@@ -414,7 +423,7 @@
      // BOM树数据结构
      towTree: [],
      equipment: '1',
      equaip:'',
      equaip:[],
      ruleForm: {
        // 新增仪器表单
        code: "",
@@ -484,7 +493,21 @@
      console.log(this.checkTreeNode);
        this.selectDevice()
    },
    selectInput(){
    },
    // querySearch(queryString, cb) {
    //   console.log(this.equaip);
    //     var restaurants = this.equaip;
    //     var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
    //     // 调用 callback 返回建议列表的数据
    //     cb(results);
    //   },
    //   createFilter(queryString) {
    //     return (restaurant) => {
    //       return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
    //     };
    //   },
    staueValueChange() {
      this.selectDevice()
      // this.tableData = [];
@@ -556,9 +579,17 @@
            params:{
              type:this.equip
            }
        }).then(res =>{
            this.equaip = res.data
            console.log(this.equip);
        })
        .then(res =>{
          this.equaip = res.data
          // res.data.forEach(item=>{
          //   let obj={
          //     id: item,
          //     value: item
          //   }
          //   this.equaip.push(obj)
            console.log(this.equaip);
          // })
        })
    },
    RadioChange(val){
@@ -640,9 +671,9 @@
        type:this.ruleForm.type,
      }, {headers: {"Content-Type": "application/json"}
    }).then(res =>{
      this.selectDevice()
      this.$message.success('新增成功')
      this.ruleForm = {}
      this.selectDevice()
    })
    },
    // tableDataApi() {
@@ -697,7 +728,9 @@
    delDeviceById() {
      this.$axios.post(this.$api.url.delDeviceById,{
          id:this.delete.id
      })
      }).then(res=>{
        this.$parent.removeAllTab()
      });
    },
    handleClick(row) {
      console.log(row);