Jelajahi Sumber

弹窗内设备接口更新 + 草稿箱页面布局修改

xiebeibei 4 tahun lalu
induk
melakukan
c867f2880b

+ 1 - 1
src/api/editer.js

@@ -33,7 +33,7 @@ export function getGraphElementType(params){
 }
 // 设备设施-主要设备清单-详情
 export function queryGlsmsasset(data,params){
-    return httputils.fetchJson(`${dataApi}/data/glsms_asset/query`,data, params)
+    return httputils.fetchJson(`${dataApi}/data/glsms_asset/queryByClassStructure`,data, params)
 }
 
 // 查询楼层清单

+ 23 - 7
src/components/edit/attr_select.vue

@@ -168,7 +168,7 @@
       </div>
     </div>
     <!--    快捷操作提示-->
-    <div style="position: fixed;bottom: 0;width: 280px;">
+    <div style="position: fixed;bottom: 0;width: 280px;" class="key-boards">
       <a-collapse :bordered="false" expand-icon-position="right">
         <template #expandIcon="props">
           <a-icon type="caret-up" :rotate="props.isActive ? 180 : 0" />
@@ -180,16 +180,17 @@
             </div>
           </template>
 
-          <p v-for="item in keyboardOperation" :key="item.value">
-            {{item.value}}
-            <span>{{item.keys}}</span>
-            <span>{{item.events}}</span>
+          <p v-for="item in keyboardOperation" :key="item.value" style="display: flex;margin-top: 13px;">
+           <span> {{item.value}}</span>
+            <span class="key-board">{{item.keys}}</span>
+            <span v-if="item.events" style="margin: 0 5px;">+ <a-icon type="user" /></span>
+            <span> {{item.events}}</span>
           </p>
         </a-collapse-panel>
       </a-collapse>
     </div>
-<!--    <editDialog ref="dialog" :typeEdit="1" :getmajorId="'1001'" :sysNum="5" />-->
-    <editDialog ref="dialog" :typeEdit="2" :getmajorId="'设备间'" :sysNum="5" />
+    <editDialog ref="dialog" :typeEdit="1" :getmajorId="'1001'" :sysNum="5" />
+<!--    <editDialog ref="dialog" :typeEdit="2" :getmajorId="'设备间'" :sysNum="5" />-->
 
   </div>
 </template>
@@ -407,6 +408,7 @@ export default {
     position: relative;
   }
 
+
   .icon-image {
     font-size: 25px;
   }
@@ -433,6 +435,20 @@ export default {
     color: #0091ff;
   }
 }
+.key-boards{
+  .key-board{
+    width: 52px;
+    height: 24px;
+    border-radius: 3px;
+    border: 1px solid rgba(195, 199, 203, 1);
+    font-size: 14px;
+    color: #646A73;
+    text-align: center;
+  }
+  /deep/ .ant-collapse-content{
+    border-top: 1px solid #EFF0F1;
+  }
+}
 #attr-select {
   width: 100%;
   height: 100%;

+ 5 - 8
src/components/edit/edit-dialog.vue

@@ -52,7 +52,7 @@
         </div>
 
         <div class="list-box">
-          <p v-for="(item,index) in selectList" :key="index" class="list">{{item.sbjc||item.s_wzqc}}
+          <p v-for="(item,index) in selectList" :key="index" class="list">{{item.sbjc||item.wzjc}}
             <a-icon type="close" class="icon" @click="deleteItem(item,index)"/>
           </p>
         </div>
@@ -98,7 +98,7 @@
                 },
                 {
                   title: '设备内码',
-                  dataIndex: 'sbxh',
+                  dataIndex: 'sbjbm',
                   key: 'sbjbm',
                   width: '25%',
                 },
@@ -106,10 +106,10 @@
               columnsLocal : [
                 {
                   title: '位置名称',
-                  dataIndex: 's_wzqc',
-                  key: 's_wzqc',
+                  dataIndex: 'wzjc',
+                  key: 'wzjc',
                   width: '75%',
-                  scopedSlots: { customRender: 's_wzqc' },
+                  scopedSlots: { customRender: 'wzjc' },
                 },
                 {
                   title: '位置内码',
@@ -161,7 +161,6 @@
                 console.log(val)
             },
             handleMajor(val) {
-              console.log(val);
               this.tableData = [];
               this.getQuerySmsxtBy(val.id)
             },
@@ -216,7 +215,6 @@
             }else if(this.typeEdit==2){
               queryGlsmsLocation(data,paramDataLocal).then(res => {
                 this.loading = false;
-                console.log(res);
                 if(res.data.result == 'success'){
                   this.total = res.data.count;
                   if(res.data.data){
@@ -247,7 +245,6 @@
           },
           // 中间表格勾选
           onSelectChange(selectedRowKeys,selectedRows) {
-            console.log(selectedRowKeys,selectedRows);
             this.selectedRowKeys = selectedRowKeys;
               if(this.selectedRowKeys.length>this.sysNum){
                 this.selectedRowKeys.pop();

+ 75 - 6
src/views/drafts.vue

@@ -13,7 +13,25 @@
             <a-button type="primary">编辑</a-button>
           </div>
         </div>
-        <div class="map"></div>
+        <div class="concent-bottom">
+          <div class="map">
+            <div class="legend-btn" @click="legend = !legend">
+              <a-icon type="right"  style="color: #8D9399;font-size: 10px"/>
+            </div>
+          </div>
+          <div class="legend" v-if="legend">
+            <div style="font-size:14px;color: #1F2429;padding-left: 12px;height: 40px;line-height: 40px">可能需要补充的图例</div>
+            <a-table :columns="columns" :data-source="data" size="middle" :pagination="false">
+              <a-table-column key="name" title="state" data-index="state">
+                <template slot-scope="text, record">
+                  <div style="border:1px solid red;width: 20px;height: 20px;">{{text}}</div>
+                </template>
+              </a-table-column>
+              <template v-slot:state>
+              </template>
+            </a-table>
+          </div>
+        </div>
       </div>
     </div>
   </div>
@@ -70,7 +88,7 @@ const dataArr = [
           { id: "3221", name: "二级1", checked: "uncheck" }
         ]
       }
-    ]
+    ],
   }
 ];
 import Tree from "./../components/Tree/Tree.vue";
@@ -78,7 +96,34 @@ export default {
   components: { Tree },
   data() {
     return {
-      treeData:JSON.parse(JSON.stringify(dataArr))
+      treeData:JSON.parse(JSON.stringify(dataArr)),
+      columns:[
+        {
+          title: "名称", // 列的名称
+          dataIndex: "name", // 列的标识
+        },{
+          title: "图例", // 列的名称
+          dataIndex: "state", // 列的标识
+        },
+      ],
+      data: [
+        {
+          key: "1",
+          name: "客梯",
+          state:''
+        },
+        {
+          key: "2",
+          name: "防火分区",
+          state:''
+        },
+        {
+          key: "3",
+          name: "消防泵室",
+          state:'1'
+        },
+      ],
+      legend:false
     };
   },
   methods: {
@@ -111,6 +156,7 @@ export default {
     .left-nav {
       width: 224px;
       height: 100%;
+      padding: 0 12px;
     }
     .conent-right {
       flex: 1;
@@ -136,11 +182,34 @@ export default {
           justify-content: space-between;
         }
       }
-      .map {
-        width: 100%;
+      .concent-bottom{
         height: calc(100% - 61px);
-        background: red;
+        display: flex;
+        .map {
+          flex: 1;
+          position: relative;
+          /*height: calc(100% - 61px);*/
+          /*background: red;*/
+          .legend-btn{
+            position: absolute;
+            right: 0;
+            top:9px;
+            width:10px;
+            height:24px;
+            background:rgba(228,229,231,1);
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            cursor: pointer;
+          }
+        }
+        .legend{
+          width: 200px;
+          border-left: 1px solid #EFF0F1;
+          height:100%;
+        }
       }
+
     }
   }
 }