ソースを参照

台账+样式

hsshuxian 11 ヶ月 前
コミット
e9fd914fb8

+ 1 - 1
ems-ui/src/views/basecfg/powerbox/index.vue

@@ -113,7 +113,7 @@
           </el-col>
         </el-row>
         <el-form-item label="电气元件" prop="elecEqptList" >
-          <el-table v-loading="loading" :data="form.elecEqptList" max-height="200px">
+          <el-table v-loading="loading" :data="form.elecEqptList" max-height="400px">
             <el-table-column label="元件编码" align="center"  prop="eqptCode">
               <template slot-scope="scope">
                 <el-input size="mini" v-model="scope.row.eqptCode" placeholder="元件编码" />

+ 20 - 29
ems-ui/src/views/devmgr/el/index.vue

@@ -195,8 +195,9 @@
 
 <script>
 import { listRbook, getRbook, delRbook, addRbook, updateRbook } from "@/api/device/rbook";
-import {listFacs} from '@/api/basecfg/emsfacs'
-import { listDevRecursionByArea } from '@/api/device/device'
+import {listAllFacs} from '@/api/basecfg/emsfacs'
+import {devTreeByFacs, listDevice, listDevRecursionByArea} from '@/api/device/device'
+import {listBuildingByArea} from "@/api/basecfg/building";
 export default {
   name: "Rbook",
   dicts: ['device_type'],
@@ -221,11 +222,8 @@ export default {
       // 是否显示弹出层
       open: false,
       //能源设施全部数据
-      AllName:[],
       AllCode:[],
-      facsLocation:'',
-      All:[],
-
+      areaCode: '', // 你需要根据实际情况设置或获取 areaCode
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -313,17 +311,16 @@ export default {
     handleSelect(value){
       //获取能源设施所有信息
       this.loading = true
-      listFacs(this.queryParams).then(response => {
-        //总条数
-        this.total = response.total
+      listAllFacs(this.areaCode).then(response =>{
+        const data = response.data;
         //循环输出
-        for (let i = 0; i <this.total ; i++) {
-          if (value === response.rows[i].facsCode){
-            this.form.objName = response.rows[i].facsName
-            this.form.insLocation=response.rows[i].refAreaName
+        for (let i = 0; i <data.length ; i++) {
+          if (value === data[i].facsCode){
+            this.form.objName = data[i].facsName
+            this.form.insLocation=data[i].refAreaName
           }
         }
-        this.loading = false
+        this.loading = false;
       })
 
       ///获取能源设备所有信息
@@ -341,30 +338,23 @@ export default {
       })
 
     },
-
     changeObjOptions(objType) {
-      if(objType == 1){
-        //获取能源设施所有信息
+      if (objType == 1){
         this.loading = true
-        listFacs(this.queryParams).then(response => {
-          //总条数
-          this.total = response.total
-          console.log("设施所有信息的条数!!!",this.total)
+        listAllFacs(this.areaCode).then(response =>{
+         const data = response.data;
           this.AllCode = [];
           //循环输出
-          for (let i = 0; i <this.total ; i++) {
-            this.AllCode.push({ value:response.rows[i].facsCode, label: response.rows[i].facsCode}); // 添加到数组
+          for (let i = 0; i <data.length ; i++) {
+            this.AllCode.push({ value:data[i].facsCode, label: data[i].facsCode}); // 添加到数组
           }
-          this.loading = false
+          this.loading = false;
         })
       }else if(objType == 0){
-        ///获取能源设备所有信息
-        this.loading = true
+        this.loading=true
         listDevRecursionByArea(this.queryParams).then(response => {
-          this.total = response.total
-          console.log("设备所有信息的条数!!!",this.total)
           this.AllCode = [];
-          //循环输出
+             //循环输出
           for (let i = 0; i <this.total ; i++) {
             this.AllCode.push({ value:response.rows[i].deviceCode, label: response.rows[i].deviceCode}); // 添加到数组
           }
@@ -373,6 +363,7 @@ export default {
       }
     },
 
+
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();