Kaynağa Gözat

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-editer into develop

YaolongHan 4 yıl önce
ebeveyn
işleme
8ba8d83f89
2 değiştirilmiş dosya ile 46 ekleme ve 8 silme
  1. 4 0
      src/api/editer.js
  2. 42 8
      src/components/edit/attr_select.vue

+ 4 - 0
src/api/editer.js

@@ -84,4 +84,8 @@ export function deleteGraph(params){
 // 发布系统图
 export function publishGraph(params){
     return httputils.postJson(`${testApi}/graph/publish`, params)
+}
+// 查询设备台账
+export function queryGlsmsAsset(data,params){
+    return httputils.fetchJson(`${dataApi}/data/glsms_asset/query`,data, params)
 }

+ 42 - 8
src/components/edit/attr_select.vue

@@ -240,20 +240,21 @@
     </div>
 
     <!--设备/工程信息化ID/工程信息化中的位置类型-->
+
     <div
       class="attr-select attr-select-bottom"
       v-if="type =='Zone' || type =='Image' ||type == 'fire-Zone' ||type == 'Line'"
     >
+      <a-spin :spinning="spinning">
       <div class="row">
-        <span>{{`工程信息化ID`}}</span>
+        <span>{{type =='Zone'?`工程信息化中的位置类型`:'工程信息化中的设备类型'}}</span>
         <a-button type="link" class="edit-option-btn" @click="handleEdit">选择编辑</a-button>
       </div>
 
-      <div class="grid-content">
-        <a-card class="attr-card">福建三明万达-供电系统-6楼-工程信息化中的区域编NDDKJD4</a-card>
-        <a-card class="attr-card">福建三明万达-供电系统-6楼-工程信息化中的区域编NDDKJD</a-card>
-        <a-card class="attr-card">福建三明万达-供电系统-6楼-工程信息化中的区域编NDDKJD</a-card>
-      </div>
+        <div class="grid-content">
+          <a-card class="attr-card" v-for="(item,index) in attrCards" :key="index">{{item.wzjc ||item.sbjc}}</a-card>
+        </div>
+      </a-spin>
     </div>
     <!--    快捷操作提示-->
     <div style="position: fixed;bottom: 0;width: 280px;" class="key-boards">
@@ -293,7 +294,7 @@ import Swatches from "vue-swatches";
 import bus from "@/bus";
 import "vue-swatches/dist/vue-swatches.css";
 import { ItemColor } from "@saga-web/big/lib";
-import { uploadImg } from "@/api/editer.js";
+import { uploadImg, queryGlsmsLocation,queryGlsmsAsset } from "@/api/editer.js";
 export default {
   name: "attr_select",
   props: ["type", "focusItemList"],
@@ -369,7 +370,9 @@ export default {
       imageNum: 1, //设备数量
       fillColor: "", //修改填充色 (主要针对防火风区以及石材铺装)
       SubType: "", //空间类型,区分石材铺装
-      itemExplain:'' //图例说明 只针对石材铺装
+      itemExplain:'', //图例说明 只针对石材铺装
+      attrCards:[],
+      spinning:false
     };
   },
   methods: {
@@ -460,6 +463,7 @@ export default {
   },
   watch: {
     focusItemList: function(newval) {
+      console.log(111111111,newval);
       const Item = newval.itemList[0];
       if (Item.data && Item.data.SubType) {
         this.SubType = Item.data.SubType;
@@ -496,12 +500,42 @@ export default {
           }
         }
       }
+     if(newval.itemType == 'Zone'){
+       let location = Item.location;
+       this.spinning = true;
+       queryGlsmsLocation({plazaId: '1000423'},{location:'1890'}).then(res=>{
+         this.spinning = false;
+         if(res.data.result =='success'){
+           this.attrCards = res.data.data;
+         }else{
+           this.$message.error('工程信息化中的位置信息获取失败')
+         }
+       })
+     }else if(newval.itemType == 'Image'){
+       this.spinning = true;
+       queryGlsmsAsset({plazaId: '1000423'},{assetnum:'21784'}).then(res=>{
+         this.spinning = false;
+         if(res.data.result =='success'){
+           this.attrCards = res.data.data;
+         }else{
+           this.$message.error('工程信息化中的设备信息获取失败')
+         }
+       })
+     }
+
     }
   }
 };
 </script>
 
 <style scoped lang="less">
+  /deep/ .ant-spin-nested-loading{
+    height: 100% !important;
+    .ant-spin-container{
+      height: 100% !important;
+
+    }
+  }
 .attr-select {
   padding: 12px 16px;
   box-sizing: border-box;