Parcourir la source

页面修改/router修改 202109291532

fanghuisheng il y a 3 ans
Parent
commit
88e84aaef8

+ 4 - 0
src/layouts/IndexLayout/routes.ts

@@ -29,12 +29,16 @@ const IndexLayoutRoutes: Array<RoutesDataItem> = [
         title: 'index-layout.menu.stationManage.EditArticle',
         path: 'siteList',
         component: () => import('@/views/stationManage/siteList.vue'),
+        selectLeftMenu: '/stationManage',
+        hidden: true
       },
       {
         icon: 'stationManage',
         title: 'index-layout.menu.stationManage.Articleindex',
         path: 'index',
         component: () => import('@/views/stationManage/index.vue'),
+        selectLeftMenu: '/stationManage',
+        hidden: true
       }
     ]
   },

+ 1 - 1
src/views/siteManage/addGroupCom.vue

@@ -4,7 +4,7 @@
       v-if="showDialog"
       :title="dialogTitle"
       class="add-group-com"
-      :visible="showDialog"
+      v-model="showDialog"
       width="400px"
       @close="closeDialog(0)"
     >

+ 1 - 1
src/views/siteManage/addSiteCom.vue

@@ -4,7 +4,7 @@
       v-if="showDialog"
       :title="dialogTitle"
       class="add-group-com"
-      :visible="showDialog"
+      v-model="showDialog"
       width="400px"
       @close="closeDialog(0)"
     >

+ 1 - 1
src/views/siteManage/basicInfo/index.vue

@@ -161,7 +161,7 @@
                     </span>
                   </div>
                 </el-upload>
-                <el-dialog :visible="dialogVisible">
+                <el-dialog v-model="dialogVisible">
                   <img width="100%" :src="dialogImageUrl" alt="" />
                 </el-dialog>
               </el-form-item>

+ 1 - 1
src/views/siteManage/camera/checkVideo.vue

@@ -4,7 +4,7 @@
       v-if="showDialog"
       :title="dialogTitle"
       class="dialog-component"
-      :visible="showDialog"
+      v-model="showDialog"
       width="600px"
   
       @close="closeDialog(0)"

+ 1 - 1
src/views/siteManage/camera/dialogComponent.vue

@@ -4,7 +4,7 @@
       v-if="showDialog"
       :title="dialogTitle"
       class="dialog-component"
-      :visible="showDialog"
+      v-model="showDialog"
       width="640px"
       @close="closeDialog(0)"
     >

+ 1 - 1
src/views/siteManage/camera/index.vue

@@ -44,7 +44,7 @@
       <el-table-column prop="powerAnalysis" label="电流负载率门限" width="">
       </el-table-column>
       <el-table-column prop="watchAddress" label="视频画面" width="">
-         <template #default>
+         <template #default="scope">
             <a  @click="checkVideo(scope.row)">查看</a>
           </template>
       </el-table-column>

+ 14 - 34
src/views/siteManage/index.vue

@@ -19,7 +19,9 @@
         v-model="filterText"
         class="mb-20 searchInput"
       >
-        <i class="el-icon-search el-input__icon"></i>
+        <template #suffix>
+          <i class="el-icon-search el-input__icon"></i>
+        </template>
       </el-input>
 
       <el-tree
@@ -41,14 +43,11 @@
             @mouseleave="mouseleave(data)"
           >
             <span>{{ node.label }}</span>
-            <el-link
-              class="deleteLink"
-              v-show="data.show"
-              size="mini"
-              type="primary"
-              icon="el-icon-delete"
-              @click="remove(node, data)"
-            ></el-link>
+            <span>
+              <a class="deleteLink" v-show="data.show" @click="remove(node, data)">
+                <i size="mini" class="el-icon-delete"></i>
+              </a>
+            </span>
           </span>
         </template>
       </el-tree>
@@ -231,15 +230,15 @@ export default {
 
   methods: {
     mouseenter(data) {
-      console.log("移入");
-      console.log(data);
+      // console.log("移入");
+      // console.log(data);
       data.show = true;
-      console.log(data.show);
+      // console.log(data.show);
     },
 
     mouseleave(data) {
-      console.log("移出");
-      console.log(data);
+      // console.log("移出");
+      // console.log(data);
       data.show = false;
     },
 
@@ -315,26 +314,7 @@ export default {
       const children = parent.data.children || parent.data;
       const index = children.findIndex((d) => d.id === data.id);
       children.splice(index, 1);
-    },
-
-    renderContent(h, { node, data, store }) {
-      // console.log(h)
-      console.log(node.level);
-
-      return (
-        <span class="custom-tree-node">
-          <span>{node.label}</span>
-          <span>
-            <el-button
-              size="mini"
-              type="text"
-              on-click={() => this.remove(node, data)}
-            >
-              <i class="el-icon-delete"></i>
-            </el-button>
-          </span>
-        </span>
-      );
+      this.dataSource = [...this.dataSource];
     },
   },
 };

+ 1 - 1
src/views/siteManage/variableList/dialogComponent.vue

@@ -4,7 +4,7 @@
       v-if="showDialog"
       :title="dialogTitle"
       class="dialog-component"
-      :visible="showDialog"
+      v-model="showDialog"
       width="640px"
       @close="closeDialog(0)"
     >

+ 2 - 2
src/views/siteManage/variableList/index.vue

@@ -40,7 +40,7 @@
     <!-- 筛选end -->
 
     <!-- 表格start -->
-    <el-table :data="tableData" border stripe :header-cell-style="headClass" :default-sort = "{prop: 'date', order: 'descending'}">
+    <el-table :data="tableData" border stripe :header-cell-style="headClass" :default-sort="{prop: 'date', order: 'descending'}">
       <el-table-column
         fixed
         prop="watchStatus"
@@ -71,7 +71,7 @@
       <el-table-column prop="watchAddress" label="存盘周期" width="">
       </el-table-column>
       <el-table-column fixed="right" label="操作" width="180">
-        <template #default>
+        <template #default="scope">
           <el-button
             type="text"
             size="small"

+ 1 - 1
src/views/siteManage/watchDog/clone.vue

@@ -4,7 +4,7 @@
       v-if="showDialog"
       :title="dialogTitle"
       class="dialog-component"
-      :visible="showDialog"
+      v-model="showDialog"
       width="640px"
       @close="closeDialog(0)"
     >

+ 1 - 1
src/views/siteManage/watchDog/dialogComponent.vue

@@ -4,7 +4,7 @@
       v-if="showDialog"
       :title="dialogTitle"
       class="dialog-component"
-      :visible="showDialog"
+      v-model="showDialog"
       width="640px"
       @close="closeDialog(0)"
     >

+ 2 - 2
src/views/siteManage/watchDog/index.vue

@@ -39,7 +39,7 @@
       <el-table-column prop="watchAddress" label="表计地址" width="">
       </el-table-column>
       <el-table-column fixed="right" label="操作" width="180">
-        <template #default>
+        <template #default="scope">
           <el-button
             type="text"
             size="small"
@@ -57,7 +57,7 @@
       </el-table-column>
 
       <el-table-column fixed="right" label="变量" width="180">
-        <template #default>
+        <template #default="scope">
           <el-button type="text" size="small" @click="goVariableList">
             变量列表
           </el-button>

+ 1 - 1
src/views/stationManage/dialogComponent.vue

@@ -4,7 +4,7 @@
       v-if="showDialog"
       :title="dialogTitle"
       class="dialog-component"
-      :visible="showDialog"
+      v-model="showDialog"
       width="640px"
       @close="closeDialog(0)"
     >

+ 2 - 2
src/views/stationManage/index.vue

@@ -39,7 +39,7 @@
       <el-table-column prop="stationAddress" label="台区地址" width="">
       </el-table-column>
       <el-table-column prop="pointNum" label="点位数量" width="">
-         <template #default-slot="scope">
+         <template #default="scope">  
             <router-link style="margin-right:15px;" :to="{ path:'siteList',query:{id:scope.row.stationName}}">
               {{ scope.row.pointNum }}
             </router-link>
@@ -49,7 +49,7 @@
       <el-table-column prop="deviceNum" label="挂载设备数量" width="350">
       </el-table-column>
       <el-table-column fixed="right" label="操作" width="250">
-        <template #default>
+        <template #default="scope">
           <el-button
             type="text"
             size="small"

+ 2 - 2
src/views/stationManage/siteList.vue

@@ -18,7 +18,7 @@
       <el-table-column fixed prop='stationName' label='站点名称' width=''>
       </el-table-column>
       <el-table-column prop='stationStatus' label='状态' width=''>
-        <template >
+        <template #default>
           <el-avatar class='status'></el-avatar>
         </template>
       </el-table-column>
@@ -30,7 +30,7 @@
       <el-table-column prop='dlfzl' label='电流负载率门限' width=''>
       </el-table-column>
        <el-table-column fixed='right' label='操作' width='250'>
-        <template #default>
+        <template #default="scope">
            <el-button @click='handleClick(scope.row)' type='text' size='small'>查看</el-button>
         </template>
       </el-table-column>