Explorar o código

feat(设备管理/预警信息): 添加抽屉模式支持并优化设备列表操作列显示条件

yusheng hai 5 meses
pai
achega
9d5aaff9da

+ 3 - 3
src/views/ledgerAssets/equipment/components/equipment-list.vue

@@ -19,7 +19,7 @@
       @select-all="changeSelectAll"
     >
       <!-- 表头工具栏 -->
-      <template v-slot:toolbar="{ row }">
+      <template v-slot:toolbar="{ row }" v-if="!$route.query.isDrawer">
         <el-button
           size="small"
           type="primary"
@@ -105,13 +105,13 @@
         > -->
       </template>
       <!-- 编码列 -->
-      <template v-slot:code="{ row }">
+      <template v-slot:code="{ row }" v-if="!$route.query.isDrawer">
         <el-link type="primary" :underline="false" @click="details(row)">
           {{ row.code }}
         </el-link>
       </template>
       <!-- 操作列 -->
-      <template v-slot:action="{ row }">
+      <template v-slot:action="{ row }" v-if="!$route.query.isDrawer">
         <el-popconfirm
           class="ele-action"
           title="确定要删除此设备数据吗?"

+ 20 - 1
src/views/ledgerAssets/equipment/index.vue

@@ -1,5 +1,21 @@
 <template>
-  <div class="ele-body">
+  <div
+    class="ele-body"
+    :style="
+      $route.query.isDrawer
+        ? {
+            position: 'fixed',
+            height: '100vh',
+            top: '0',
+            bottom: '0',
+            left: '0',
+            right: '0',
+            zIndex: 1000,
+            background: '#fff'
+          }
+        : {}
+    "
+  >
     <el-card shadow="never" v-loading="loading">
       <ele-split-layout
         width="266px"
@@ -52,6 +68,9 @@
       };
     },
     computed: {},
+    created() {
+      console.log(this.$route.query);
+    },
 
     methods: {
       handleNodeClick(info) {

+ 23 - 8
src/views/warning/warningMessage/index.vue

@@ -1,5 +1,21 @@
 <template>
-  <div class="ele-body">
+  <div
+    class="ele-body"
+    :style="
+      $route.query.isDrawer
+        ? {
+            position: 'fixed',
+            height: '100vh',
+            top: '0',
+            bottom: '0',
+            left: '0',
+            right: '0',
+            zIndex: 1000,
+            background: '#fff'
+          }
+        : {}
+    "
+  >
     <el-card shadow="never" v-loading="loading">
       <message-search @search="reload"> </message-search>
       <!-- 数据表格 -->
@@ -9,14 +25,13 @@
         :datasource="datasource"
         cache-key="systemRoleTable"
       >
-<!--        <template v-slot:code="{ row }">
+        <!--        <template v-slot:code="{ row }">
           <el-link type="primary" :underline="false">
             {{ row.code }}
           </el-link>
         </template> -->
       </ele-pro-table>
     </el-card>
-
   </div>
 </template>
 
@@ -29,7 +44,7 @@
     components: {
       MessageSearch
     },
-    data () {
+    data() {
       return {
         // 表格列配置
         columns: [
@@ -102,16 +117,16 @@
           }
         ],
         // 加载状态
-        loading: false,
+        loading: false
       };
     },
     computed: {},
-    created () {
+    created() {
       this.requestDict('规则状态');
     },
     methods: {
       /* 表格数据源 */
-      datasource ({ page, limit, where, order }) {
+      datasource({ page, limit, where, order }) {
         return planConfigPage({
           pageNum: page,
           size: limit,
@@ -121,7 +136,7 @@
       },
 
       /* 刷新表格 */
-      reload (where) {
+      reload(where) {
         this.$refs.table.reload({ page: 1, where, ruleType: 2 });
       }
     }