hsshuxian 10 місяців тому
батько
коміт
e297b79d85
1 змінених файлів з 3 додано та 11 видалено
  1. 3 11
      ems-ui/src/views/devmgr/el/index.vue

+ 3 - 11
ems-ui/src/views/devmgr/el/index.vue

@@ -394,8 +394,6 @@ export default {
         devTreeByFacs(this.areaCode).then(response => {
           this.objCodeOptions = response.data;
           this.AllCode = this.buildTree(this.objCodeOptions);
-          console.log("设备数据:", this.objCodeOptions);
-          console.log("构建后的树形数据:", JSON.parse(JSON.stringify(this.AllCode))); // 打印格式化的 JSON 字符串
 
         });
 
@@ -413,9 +411,6 @@ export default {
     },
     /** 数据自动填补*/
     handleSelect(value) {
-      // 当用户从下拉列表中选择一个建议时触发
-      this.queryParams.objName = item.value;
-      this.handleQuery(); // 调用查询方法
       console.log("value", value);
       // 获取能源设施所有信息
       listAllFacs(this.areaCode).then(response => {
@@ -426,8 +421,6 @@ export default {
           if (value.includes(data[i].facsCode)) {
             this.form.objName = data[i].facsName;
             this.form.insLocation = data[i].refAreaName;
-            // console.log("选中设施的对象名称:", this.form.objName);
-            // console.log("选中设施的安装位置:", this.form.insLocation);
             return;
           }
         }
@@ -453,7 +446,7 @@ export default {
           }
           return {labels: [], lastLabel: null, found: false};
         }
-        let lastResult = {labels: [], lastLabel: null, found: false}; // 初始化最后结果变量
+        let lastResult = {labels: [], lastLabel: null, found: false};
         value.forEach(id => {
           const result = findDeviceById(data, [], [id]);
           if (result.found) {
@@ -464,12 +457,11 @@ export default {
         if (lastResult.found) {
           this.form.objName = lastResult.lastLabel;
           this.form.insLocation = lastResult.labels.join(' / ');
-          console.log("最终选中设备的名称:", this.form.objName);
-          console.log("最终选中设备的安装位置:", this.form.insLocation);
         } else {
           console.log("没有找到匹配的设备");
         }
       });
+
     },
 
     /**编辑按钮操作*/
@@ -491,7 +483,7 @@ export default {
       getRbook(id).then(response => {
         this.form = response.data;
         console.log("this.form",this.form)
-        this.form.objCode = this.form.objCode ? this.form.objCode.split(',') : [];  // 确保 objCode 是数组
+        this.form.objCode = this.form.objCode ? this.form.objCode.split(',') : [];
 
         // 调用 changeObjOptions 来更新 AllCode
         this.changeObjOptions(this.form.objType);