瀏覽代碼

'更新202111051117'

fanghuisheng 3 年之前
父節點
當前提交
9e04481516

+ 3 - 3
public/static/config.js

@@ -1,9 +1,9 @@
 // api 请求路径
 var PLATFROM_CONFIG = {};
-PLATFROM_CONFIG.baseUrl = "http://172.16.120.104:8010/" //杨强本地
-    // PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/"  //超博本地
+// PLATFROM_CONFIG.baseUrl = "http://172.16.120.104:8010/" //杨强本地
+// PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/"  //超博本地
 
-// PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
+PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
 PLATFROM_CONFIG.images = "https://qhome.usky.cn/file/" //线上图片
 PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
 

+ 1 - 1
src/api/router.js

@@ -2,7 +2,7 @@ import request from '@/utils/request'
 
 export function getRouterList(params) {
   return request({
-    url: '/menu/navigate',
+    url: '/getRouters',
     method: 'get',
     params,
   })

+ 1 - 1
src/config/default/setting.config.js

@@ -35,7 +35,7 @@ const setting = {
   //路由模式,可选值为 history 或 hash
   routerMode: 'hash',
   //不经过token校验的路由
-  routesWhiteList: ['/login', '/register', '/callback', '/404', '/403' , '/401'],
+  routesWhiteList: ['/login', '/register', '/callback', '/404', '/403', '/401'],
   //加载时显示文字
   loadingText: '正在加载中...',
   //token名称

+ 4 - 2
src/main.js

@@ -42,8 +42,10 @@ app
 
 
 /**
- * @需添加路由拦截 --登录后执行
- */
+* @需添加路由拦截 --登录后执行
+*/
+
+
 router.beforeEach((to) => {
   if (to.path != '/login') {
     store.commit("publicSiteList");

+ 184 - 185
src/router/index.js

@@ -2,32 +2,32 @@ import { createRouter, createWebHashHistory } from 'vue-router'
 import Layout from '@/layout'
 
 export const constantRoutes = [{
-        path: '/login',
-        component: () =>
-            import ('@/views/login'),
-        hidden: true,
-    },
-    {
-        path: '/403',
-        name: '403',
-        component: () =>
-            import ('@/views/403'),
-        hidden: true,
-    },
-    {
-        path: '/404',
-        name: '404',
-        component: () =>
-            import ('@/views/404'),
-        hidden: true,
-    },
-    {
-        path: '/401',
-        name: '401',
-        component: () =>
-            import ('@/views/401'),
-        hidden: true,
-    },
+    path: '/login',
+    component: () =>
+        import('@/views/login'),
+    hidden: true,
+},
+{
+    path: '/403',
+    name: '403',
+    component: () =>
+        import('@/views/403'),
+    hidden: true,
+},
+{
+    path: '/404',
+    name: '404',
+    component: () =>
+        import('@/views/404'),
+    hidden: true,
+},
+{
+    path: '/401',
+    name: '401',
+    component: () =>
+        import('@/views/401'),
+    hidden: true,
+},
 ]
 export const asyncRoutes = [
 
@@ -69,9 +69,9 @@ export const asyncRoutes = [
             },
             path: 'index',
             component: () =>
-                import ('@/views/alarmManage/index'),
+                import('@/views/alarmManage/index'),
 
-        }, ]
+        },]
     },
     {
         path: '/siteManage',
@@ -88,8 +88,7 @@ export const asyncRoutes = [
             },
             path: '/siteManage',
             component: () =>
-                import ('@/views/siteManage/index'),
-            selectLeftMenu: '/alarmManage',
+                import('@/views/siteManage/index'),
             hidden: true
         }]
     },
@@ -109,7 +108,7 @@ export const asyncRoutes = [
             },
             path: '/stationManage',
             component: () =>
-                import ('@/views/stationManage/index'),
+                import('@/views/stationManage/index'),
             hidden: true
         }]
     },
@@ -138,7 +137,7 @@ export const asyncRoutes = [
             },
             path: '/deviceManage',
             component: () =>
-                import ('@/views/deviceManage/powerEquip'),
+                import('@/views/deviceManage/powerEquip'),
             hidden: true
         }]
     },
@@ -179,38 +178,38 @@ export const asyncRoutes = [
         component: Layout,
         redirect: '/dataManage/sameAnalysis',
         children: [{
-                meta: { icon: 'sameAnalysis', title: '同比分析报表', },
-                path: 'sameAnalysis',
-                component: () =>
-                    import ('@/views/dataManage/sameAnalysis/index.vue'),
-            },
-            {
-                meta: { icon: 'chainAnalysis', title: '环比分析报表', },
-                path: 'chainAnalysis',
-                component: () =>
-                    import ('@/views/dataManage/chainAnalysis/index.vue'),
-            },
-            // {
-            //     meta: { icon: 'handOpera', title: '手动抄表', },
-            //     title: 'index-layout.menu.dataManage.handOpera',
-            //     path: 'handOpera',
-            //     component: () =>
-            //         import ('@/views/dataManage/handOpera/index.vue'),
-            // },
-            {
-                meta: { icon: 'energyReport', title: '用能月报', },
-                title: 'index-layout.menu.dataManage.energyReport',
-                path: 'energyReport',
-                component: () =>
-                    import ('@/views/dataManage/energyReport/index.vue'),
-            },
-            {
-                meta: { icon: 'demandAnalysis', title: '需量分析', },
-                title: 'index-layout.menu.dataManage.demandAnalysis',
-                path: 'demandAnalysis',
-                component: () =>
-                    import ('@/views/dataManage/demandAnalysis/index.vue'),
-            },
+            meta: { icon: 'sameAnalysis', title: '同比分析报表', },
+            path: 'sameAnalysis',
+            component: () =>
+                import('@/views/dataManage/sameAnalysis/index.vue'),
+        },
+        {
+            meta: { icon: 'chainAnalysis', title: '环比分析报表', },
+            path: 'chainAnalysis',
+            component: () =>
+                import('@/views/dataManage/chainAnalysis/index.vue'),
+        },
+        // {
+        //     meta: { icon: 'handOpera', title: '手动抄表', },
+        //     title: 'index-layout.menu.dataManage.handOpera',
+        //     path: 'handOpera',
+        //     component: () =>
+        //         import ('@/views/dataManage/handOpera/index.vue'),
+        // },
+        {
+            meta: { icon: 'energyReport', title: '用能月报', },
+            title: 'index-layout.menu.dataManage.energyReport',
+            path: 'energyReport',
+            component: () =>
+                import('@/views/dataManage/energyReport/index.vue'),
+        },
+        {
+            meta: { icon: 'demandAnalysis', title: '需量分析', },
+            title: 'index-layout.menu.dataManage.demandAnalysis',
+            path: 'demandAnalysis',
+            component: () =>
+                import('@/views/dataManage/demandAnalysis/index.vue'),
+        },
             // {
             //     meta: { icon: 'consumConfig', title: '能耗分析配置', },
             //     title: 'index-layout.menu.dataManage.consumConfig',
@@ -234,29 +233,29 @@ export const asyncRoutes = [
         component: Layout,
         redirect: '/powerQuality/harmonicReport',
         children: [{
-                meta: { icon: 'harmonicReport', title: '谐波报表', },
-                path: 'harmonicReport',
-                component: () =>
-                    import ('@/views/powerQuality/harmonicReport/index.vue'),
-            },
-            {
-                meta: { icon: 'realTimeMonitoring', title: '实时监测', },
-                path: 'realTimeMonitoring',
-                component: () =>
-                    import ('@/views/powerQuality/realTimeMonitoring/index.vue'),
-            },
-            {
-                meta: { icon: 'asseReport', title: '评估报告', },
-                path: 'asseReport',
-                component: () =>
-                    import ('@/views/powerQuality/asseReport/index.vue'),
-            },
-            {
-                meta: { icon: 'unbalanceAnalysis', title: '三相不平衡分析', },
-                path: 'unbalanceAnalysis',
-                component: () =>
-                    import ('@/views/powerQuality/unbalanceAnalysis/index.vue'),
-            },
+            meta: { icon: 'harmonicReport', title: '谐波报表', },
+            path: 'harmonicReport',
+            component: () =>
+                import('@/views/powerQuality/harmonicReport/index.vue'),
+        },
+        {
+            meta: { icon: 'realTimeMonitoring', title: '实时监测', },
+            path: 'realTimeMonitoring',
+            component: () =>
+                import('@/views/powerQuality/realTimeMonitoring/index.vue'),
+        },
+        {
+            meta: { icon: 'asseReport', title: '评估报告', },
+            path: 'asseReport',
+            component: () =>
+                import('@/views/powerQuality/asseReport/index.vue'),
+        },
+        {
+            meta: { icon: 'unbalanceAnalysis', title: '三相不平衡分析', },
+            path: 'unbalanceAnalysis',
+            component: () =>
+                import('@/views/powerQuality/unbalanceAnalysis/index.vue'),
+        },
 
         ]
     },
@@ -271,19 +270,19 @@ export const asyncRoutes = [
         meta: { title: '月度报告', icon: 'monthReport', },
         component: Layout,
         children: [{
-                meta: { title: '月度报告', icon: 'monthReport', },
-                path: '/monthReport',
-                component: () =>
-                    import ('@/views/monthReport/index'),
-                hidden: true
-            },
-            {
-                meta: { title: '月报模板', icon: 'reportModel', },
-                path: '/reportModel',
-                component: () =>
-                    import ('@/views/monthReport/reportModel'),
-                hidden: true
-            }
+            meta: { title: '月度报告', icon: 'monthReport', },
+            path: '/monthReport',
+            component: () =>
+                import('@/views/monthReport/index'),
+            hidden: true
+        },
+        {
+            meta: { title: '月报模板', icon: 'reportModel', },
+            path: '/reportModel',
+            component: () =>
+                import('@/views/monthReport/reportModel'),
+            hidden: true
+        }
         ]
     },
 
@@ -297,7 +296,7 @@ export const asyncRoutes = [
             meta: { title: '计划停电', icon: 'planOutage', },
             path: '/planOutage',
             component: () =>
-                import ('@/views/planOutage/index'),
+                import('@/views/planOutage/index'),
             hidden: true
         }],
     },
@@ -317,33 +316,33 @@ export const asyncRoutes = [
         redirect: '/patrolManage/patrolPlan',
         name: 'patrolManage',
         children: [{
-                meta: { title: '巡检计划', icon: 'patrolPlan' },
-                path: 'patrolPlan',
-                name: 'patrolPlan',
-                component: () =>
-                    import ('@/views/patrolManage/patrolPlan/index.vue'),
-            },
-            {
-                meta: { title: '巡检记录', icon: 'patrolRecord' },
-                path: 'patrolRecord',
-                name: 'patrolRecord',
-                component: () =>
-                    import ('@/views/patrolManage/patrolRecord/index.vue'),
-            },
-            {
-                meta: { title: '巡检内容', icon: '巡检内容' },
-                path: 'patrolContent',
-                name: 'patrolContent',
-                component: () =>
-                    import ('@/views/patrolManage/patrolContent/index.vue'),
-            },
-            {
-                meta: { title: '检查条目', icon: '检查条目' },
-                path: 'checkEntries',
-                name: 'checkEntries',
-                component: () =>
-                    import ('@/views/patrolManage/checkEntries/index.vue'),
-            },
+            meta: { title: '巡检计划', icon: 'patrolPlan' },
+            path: 'patrolPlan',
+            name: 'patrolPlan',
+            component: () =>
+                import('@/views/patrolManage/patrolPlan/index.vue'),
+        },
+        {
+            meta: { title: '巡检记录', icon: 'patrolRecord' },
+            path: 'patrolRecord',
+            name: 'patrolRecord',
+            component: () =>
+                import('@/views/patrolManage/patrolRecord/index.vue'),
+        },
+        {
+            meta: { title: '巡检内容', icon: '巡检内容' },
+            path: 'patrolContent',
+            name: 'patrolContent',
+            component: () =>
+                import('@/views/patrolManage/patrolContent/index.vue'),
+        },
+        {
+            meta: { title: '检查条目', icon: '检查条目' },
+            path: 'checkEntries',
+            name: 'checkEntries',
+            component: () =>
+                import('@/views/patrolManage/checkEntries/index.vue'),
+        },
         ]
     },
 
@@ -363,35 +362,35 @@ export const asyncRoutes = [
         redirect: '/operManage/siteAchives',
         name: 'operManage',
         children: [{
-                meta: { title: '现场档案', icon: 'siteAchives', },
-                path: 'siteAchives',
-                component: () =>
-                    import ('@/views/operManage/siteAchives/index.vue'),
-            },
-            {
-                meta: { title: '缺陷管理', icon: 'defectManage', },
-                path: 'defectManage',
-                component: () =>
-                    import ('@/views/operManage/defectManage/index.vue'),
-            },
-            {
-                meta: { title: '工单管理', icon: 'workManage', },
-                path: 'workManage',
-                component: () =>
-                    import ('@/views/operManage/workManage/index.vue'),
-            },
-            {
-                meta: { title: '运维统计', icon: 'operStatistics', },
-                path: 'operStatistics',
-                component: () =>
-                    import ('@/views/operManage/operStatistics/index.vue'),
-            },
-            {
-                meta: { title: '工作量统计', icon: 'workStatistics', },
-                path: 'workStatistics',
-                component: () =>
-                    import ('@/views/operManage/workStatistics/index.vue'),
-            },
+            meta: { title: '现场档案', icon: 'siteAchives', },
+            path: 'siteAchives',
+            component: () =>
+                import('@/views/operManage/siteAchives/index.vue'),
+        },
+        {
+            meta: { title: '缺陷管理', icon: 'defectManage', },
+            path: 'defectManage',
+            component: () =>
+                import('@/views/operManage/defectManage/index.vue'),
+        },
+        {
+            meta: { title: '工单管理', icon: 'workManage', },
+            path: 'workManage',
+            component: () =>
+                import('@/views/operManage/workManage/index.vue'),
+        },
+        {
+            meta: { title: '运维统计', icon: 'operStatistics', },
+            path: 'operStatistics',
+            component: () =>
+                import('@/views/operManage/operStatistics/index.vue'),
+        },
+        {
+            meta: { title: '工作量统计', icon: 'workStatistics', },
+            path: 'workStatistics',
+            component: () =>
+                import('@/views/operManage/workStatistics/index.vue'),
+        },
 
         ]
     },
@@ -407,17 +406,17 @@ export const asyncRoutes = [
         component: Layout,
         redirect: '/systemManage/userManage',
         children: [{
-                meta: { title: '用户管理', icon: 'userManage', },
-                path: 'userManage',
-                component: () =>
-                    import ('@/views/systemManage/userManage/index.vue'),
-            },
-            {
-                meta: { title: '权限管理', icon: 'rolePermission', },
-                path: 'rolePermission',
-                component: () =>
-                    import ('@/views/systemManage/rolePermission/index.vue'),
-            },
+            meta: { title: '用户管理', icon: 'userManage', },
+            path: 'userManage',
+            component: () =>
+                import('@/views/systemManage/userManage/index.vue'),
+        },
+        {
+            meta: { title: '权限管理', icon: 'rolePermission', },
+            path: 'rolePermission',
+            component: () =>
+                import('@/views/systemManage/rolePermission/index.vue'),
+        },
         ]
     },
 
@@ -433,25 +432,25 @@ export const asyncRoutes = [
             icon: 'apps-line',
         },
         children: [{
-                path: 'table',
-                name: 'Table',
-                component: () =>
-                    import ('@/views/vab/table'),
-                meta: {
-                    title: '表格',
-                    icon: 'table-2',
-                },
+            path: 'table',
+            name: 'Table',
+            component: () =>
+                import('@/views/vab/table'),
+            meta: {
+                title: '表格',
+                icon: 'table-2',
             },
-            {
-                path: 'icon',
-                name: 'Icon',
-                component: () =>
-                    import ('@/views/vab/icon'),
-                meta: {
-                    title: '图标',
-                    icon: 'remixicon-line',
-                },
+        },
+        {
+            path: 'icon',
+            name: 'Icon',
+            component: () =>
+                import('@/views/vab/icon'),
+            meta: {
+                title: '图标',
+                icon: 'remixicon-line',
             },
+        },
         ],
     },
 

+ 1 - 0
src/views/alarmManage/index.vue

@@ -216,6 +216,7 @@ export default defineComponent({
 
     onMounted(() => {
       listSelect()
+      // console.log(store, router)
     })
 
     //条数

+ 0 - 11
src/views/siteManage/basicInfo/index.vue

@@ -432,17 +432,6 @@ export default defineComponent({
       })
     }
 
-    // 台区下拉请求
-    // function platformList() {
-    //   api.platformList({ size: 0 }).then((requset) => {
-    //     if (requset.status === 'SUCCESS') {
-    //       platFormData.value = requset.data.records;
-    //     } else {
-    //       ElMessage.error(requset.msg)
-    //     }
-    //   })
-    // }
-
     //台区下拉请求
     function platformList() {
       api.platformList({ size: 0 }).then((requset) => {

+ 22 - 10
src/views/stationManage/dialogComponent.vue

@@ -40,12 +40,28 @@
           </el-select>
         </el-form-item> -->
 
-        <el-form-item label="已勾选:" prop="siteCount" v-if="dialogTitle=='编辑'">
-          <el-input v-model="form.siteCount" style="width: 200px" disabled></el-input>
+        <el-form-item
+          label="已勾选:"
+          prop="siteCount"
+          v-if="dialogTitle == '编辑'"
+        >
+          <el-input
+            v-model="form.siteCount"
+            style="width: 200px"
+            disabled
+          ></el-input>
           个站点
         </el-form-item>
-        <el-form-item label="共挂载:" prop="deviceCount" v-if="dialogTitle=='编辑'">
-          <el-input v-model="form.deviceCount" style="width: 200px" disabled></el-input>
+        <el-form-item
+          label="共挂载:"
+          prop="deviceCount"
+          v-if="dialogTitle == '编辑'"
+        >
+          <el-input
+            v-model="form.deviceCount"
+            style="width: 200px"
+            disabled
+          ></el-input>
           个设备
         </el-form-item>
         <br />
@@ -81,7 +97,6 @@ export default defineComponent({
 
     const form = ref([])
 
-    
     // open(): Dialog弹窗打开之前做的事
     const open = () => {
       console.log('')
@@ -133,11 +148,9 @@ export default defineComponent({
 
     // 保存-修改操作
     const submitForm = () => {
-      console.log(formInfo)
       formInfo.value.validate((valid) => {
         if (valid) {
           if (props.dialogTitle === '新增') {
-           
             api.platformAreaAdd(form.value).then((requset) => {
               if (requset.status === 'SUCCESS') {
                 ElMessage.success({
@@ -149,7 +162,7 @@ export default defineComponent({
                 ElMessage.error(requset.msg)
               }
             })
-          }else {
+          } else {
             api.platformAreaUpdate(form.value).then((requset) => {
               if (requset.status === 'SUCCESS') {
                 ElMessage.success({
@@ -161,7 +174,7 @@ export default defineComponent({
                 ElMessage.error(requset.msg)
               }
             })
-          } 
+          }
         } else {
           console.log('error submit!!')
           return false
@@ -221,7 +234,6 @@ export default defineComponent({
       },
     }
   },
-
 })
 </script>
  

+ 135 - 138
src/views/stationManage/index.vue

@@ -1,134 +1,134 @@
 <template>
-  <div class="app-container" v-if="this.pageShow">
-    <!-- 筛选start -->
-    <div class="mb-20">所有台区</div>
-    <div class="filter-container mb-10">
-      <div>
-        <div class="filter-item">
-          台区:
-          <el-input
-            v-model="platformAreaName"
-            placeholder="请输入台区名称"
-            style="width: 240px"
-          ></el-input>
-        </div>
-
-        <el-button
-          type="primary"
-          icon="el-icon-search"
-          class="search-button"
-          @click="platformList()"
-        >
-          搜索
-        </el-button>
-
-        <el-button icon="el-icon-plus" type="success" @click="addItem()">
-          新增
-        </el-button>
-      </div>
-    </div>
-    <!-- 筛选end -->
+  <div>
+    <div class="app-container" v-if="!pageShow">
+      <!-- 筛选start -->
+      <div class="mb-20">所有台区</div>
+      <div class="filter-container mb-10">
+        <div>
+          <div class="filter-item">
+            台区:
+            <el-input
+              v-model="platformAreaName"
+              placeholder="请输入台区名称"
+              style="width: 240px"
+            ></el-input>
+          </div>
 
-    <!-- 表格start -->
-    <el-table :data="tableData" border stripe :header-cell-style="headClass">
-      <el-table-column
-        fixed
-        prop="platformAreaName"
-        label="台区名称"
-        width=""
-      ></el-table-column>
-      <el-table-column
-        prop="platformAreaCode"
-        label="台区编号"
-        width=""
-      ></el-table-column>
-      <el-table-column
-        prop="platformAreaAddress"
-        label="台区地址"
-        width=""
-      ></el-table-column>
-      <el-table-column prop="siteCount" label="点位数量" width="">
-        <template #default="scope">
-          <span
-            @click="goSiteList(scope.row)"
-            v-if="scope.row.siteCount"
-            style="cursor: pointer; color: #0284e8"
-          >
-            {{ scope.row.siteCount }}
-          </span>
-          <span v-else>{{ scope.row.siteCount }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="挂载设备数量" width="350">
-        <template #default="scope">
-          <span>{{ scope.row.deviceCount ? deviceCount : '-' }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column fixed="right" label="操作" width="250">
-        <template #default="scope">
           <el-button
-            type="text"
-            size="small"
-            @click.prevent="editRow(scope.row)"
+            type="primary"
+            icon="el-icon-search"
+            class="search-button"
+            @click="platformList()"
           >
-            编辑
+            搜索
           </el-button>
-          <el-popconfirm
-            confirm-button-text="是"
-            cancel-button-text="否"
-            icon="el-icon-info"
-            icon-color="red"
-            title="确定删除?"
-            @confirm="handleDelete(scope.row)"
-            @cancel="cancelEvent"
-          >
-            <template #reference>
-              <el-button type="text" size="small" class="delete-text">
-                删除
-              </el-button>
-            </template>
-          </el-popconfirm>
-        </template>
-      </el-table-column>
-    </el-table>
-    <!-- 表格end -->
 
-    <!-- 分页start -->
-    <div class="paginationBlock">
-      <el-pagination
-        v-model:currentPage="currentPage"
-        :page-sizes="[15, 20, 25, 30]"
-        :page-size="pageSize"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="total"
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        background
-      ></el-pagination>
-    </div>
+          <el-button icon="el-icon-plus" type="success" @click="addItem()">
+            新增
+          </el-button>
+        </div>
+      </div>
+      <!-- 筛选end -->
 
-    <!-- 分页end -->
+      <!-- 表格start -->
+      <el-table :data="tableData" border stripe :header-cell-style="headClass">
+        <el-table-column
+          fixed
+          prop="platformAreaName"
+          label="台区名称"
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="platformAreaCode"
+          label="台区编号"
+          width=""
+        ></el-table-column>
+        <el-table-column
+          prop="platformAreaAddress"
+          label="台区地址"
+          width=""
+        ></el-table-column>
+        <el-table-column prop="siteCount" label="点位数量" width="">
+          <template #default="scope">
+            <span
+              @click="goSiteList(scope.row)"
+              v-if="scope.row.siteCount"
+              style="cursor: pointer; color: #0284e8"
+            >
+              {{ scope.row.siteCount }}
+            </span>
+            <span v-else>{{ scope.row.siteCount }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="挂载设备数量" width="350">
+          <template #default="scope">
+            <span>{{ scope.row.deviceCount ? deviceCount : '-' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column fixed="right" label="操作" width="250">
+          <template #default="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click.prevent="editRow(scope.row)"
+            >
+              编辑
+            </el-button>
+            <el-popconfirm
+              confirm-button-text="是"
+              cancel-button-text="否"
+              icon="el-icon-info"
+              icon-color="red"
+              title="确定删除?"
+              @confirm="handleDelete(scope.row)"
+              @cancel="cancelEvent"
+            >
+              <template #reference>
+                <el-button type="text" size="small" class="delete-text">
+                  删除
+                </el-button>
+              </template>
+            </el-popconfirm>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 表格end -->
 
-    <!--弹框组件开始-----------------------start-->
-    <dialog-component
-      :dialogTitle="dialogTitle"
-      :itemInfo="tableItem"
-      @closeDialog="closeDialog"
-      :flag="showDialog"
-    ></dialog-component>
-    <!--弹框组件开始-----------------------end-->
+      <!-- 分页start -->
+      <div class="paginationBlock">
+        <el-pagination
+          v-model:currentPage="currentPage"
+          :page-sizes="[15, 20, 25, 30]"
+          :page-size="pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          background
+        ></el-pagination>
+      </div>
 
-  </div>
+      <!-- 分页end -->
 
-  <!-- 站点设备列表start -->
-  <site-list
-    v-else
-    :pageShow="pageShow"
-    :goSiteListParam="goSiteListParam"
-    @func="getMsgFormSon"
-  ></site-list>
-  <!-- 站点设备列表end -->
+      <!--弹框组件开始-----------------------start-->
+      <dialog-component
+        :dialogTitle="dialogTitle"
+        :itemInfo="tableItem"
+        @closeDialog="closeDialog"
+        :flag="showDialog"
+      ></dialog-component>
+      <!--弹框组件开始-----------------------end-->
+    </div>
 
+    <!-- 站点设备列表start -->
+    <site-list
+      v-else
+      :pageShow="pageShow"
+      :goSiteListParam="goSiteListParam"
+      @func="getMsgFormSon"
+    ></site-list>
+    <!-- 站点设备列表end -->
+  </div>
 </template>
 
 <script>
@@ -149,7 +149,7 @@ export default defineComponent({
     const deviceCount = ref(0)
     const goSiteListParam = ref('')
     const platformAreaName = ref('')
-    const pageShow = ref(true)
+    const pageShow = ref(false)
     const showDialog = ref(false)
     const tableData = ref([])
 
@@ -161,20 +161,6 @@ export default defineComponent({
       pageShow.value = !pageShow.value
     }
 
-    // 表头样式设置
-    const headClass = () => {
-      return 'background:#FAFAFA;'
-    }
-
-    const handleSizeChange = (val) => {
-      pageSize.value = val
-      platformList()
-    }
-    const handleCurrentChange = (val) => {
-      currentPage.value = val
-      platformList()
-    }
-
     const tableItem = reactive([])
     const dialogTitle = ref('')
 
@@ -209,15 +195,14 @@ export default defineComponent({
 
     // 编辑操作
     const editRow = (row) => {
-      console.log(row)
       api
         .platformAreaListOne({
           id: row.id,
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            ;(siteCount.value = requset.data[0].siteCount),
-              (deviceCount.value = requset.data[0].deviceCount)
+            siteCount.value = requset.data[0].siteCount
+            deviceCount.value = requset.data[0].deviceCount
           } else {
             ElMessage.error(requset.msg)
           }
@@ -264,6 +249,18 @@ export default defineComponent({
       platformList()
     })
 
+    // 表头样式设置
+    const headClass = () => {
+      return 'background:#FAFAFA;'
+    }
+    const handleSizeChange = (val) => {
+      pageSize.value = val
+      platformList()
+    }
+    const handleCurrentChange = (val) => {
+      currentPage.value = val
+      platformList()
+    }
     return {
       tableData,
       platformAreaName,

+ 28 - 9
src/views/stationManage/siteList.vue

@@ -23,7 +23,10 @@
       ></el-table-column>
       <el-table-column prop="stationStatus" label="状态" width="">
         <template #default="scope">
-          <el-avatar class="status"  :class="[scope.row.deviceStatusr=='离线'? 'offline':'online']"></el-avatar>
+          <el-avatar
+            class="status"
+            :class="[scope.row.deviceStatusr == '离线' ? 'offline' : 'online']"
+          ></el-avatar>
         </template>
       </el-table-column>
       <el-table-column
@@ -31,13 +34,31 @@
         label="设备名称"
         width=""
       ></el-table-column>
-      <el-table-column prop="monitoringEquipmentNo" label="监控设备编号" width="">
+      <el-table-column
+        prop="monitoringEquipmentNo"
+        label="监控设备编号"
+        width=""
+      >
         <template #default="scope">
-          <span>{{scope.row.monitoringEquipmentNo?scope.row.monitoringEquipmentNo:'--'}}</span>
+          <span>
+            {{
+              scope.row.monitoringEquipmentNo
+                ? scope.row.monitoringEquipmentNo
+                : '--'
+            }}
+          </span>
         </template>
       </el-table-column>
-      <el-table-column prop="ratedVoltage" label="额定电压" width=""></el-table-column>
-      <el-table-column prop="ratedCurrent" label="额定电流" width=""></el-table-column>
+      <el-table-column
+        prop="ratedVoltage"
+        label="额定电压"
+        width=""
+      ></el-table-column>
+      <el-table-column
+        prop="ratedCurrent"
+        label="额定电流"
+        width=""
+      ></el-table-column>
       <el-table-column
         prop="currentLoadRate"
         label="电流负载率门限"
@@ -56,7 +77,7 @@
 </template>
 
 <script>
-import { defineComponent, ref,onMounted } from 'vue'
+import { defineComponent, ref, onMounted } from 'vue'
 import * as api from '@/api/stationManage/index.js'
 import { ElMessage } from 'element-plus'
 
@@ -95,7 +116,7 @@ export default defineComponent({
     //站点设备列表
     function siteDeviceList() {
       api
-        .siteDeviceList({"stationAreaId":props.goSiteListParam})
+        .siteDeviceList({ stationAreaId: props.goSiteListParam })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
             // console.log(requset.data)
@@ -106,8 +127,6 @@ export default defineComponent({
         })
     }
 
-   
-
     onMounted(() => {
       siteDeviceList()
     })