isv-robot 2 anos atrás
pai
commit
2ea75eca2f

+ 6 - 5
src/permission.js

@@ -26,11 +26,12 @@ router.beforeEach(async(to, from, next) => {
       next({path: '/dashboard-screen'})
       NProgress.done() // hack: https://github.com/PanJiaChen/vue-element-admin/pull/2939
     }
-    if (to.path === '/index') {
-      // if is logged in, redirect to the home page
-      next({path: '/dashboard-screen'})
-      NProgress.done() // hack: https://github.com/PanJiaChen/vue-element-admin/pull/2939
-    } else {
+    // if (to.path === '/index') {
+    //   // if is logged in, redirect to the home page
+    //   next({path: '/dashboard-screen'})
+    //   NProgress.done() // hack: https://github.com/PanJiaChen/vue-element-admin/pull/2939
+    // }
+    else {
       // determine whether the user has obtained his permission roles through getInfo
       const isInfo = store.getters.isInfo
       if (isInfo) {

+ 8 - 7
src/router/index.js

@@ -51,7 +51,7 @@ export const constantRoutes = [
   {
     path: '/',
     component: Layout,
-    redirect: '/index',
+    redirect: '/dashboard-screen',
     children: [{
       path: 'index',
       name: 'index',
@@ -77,6 +77,13 @@ export const constantRoutes = [
     component: () => import('@/views/404'),
     hidden: true
   },
+
+
+
+
+
+]
+export const asyncRoutes = [
   {
     path: '/dashboard-screen',
     component: FullScreenLayout,
@@ -96,12 +103,6 @@ export const constantRoutes = [
       }
     ]
   },
-
-
-
-
-]
-export const asyncRoutes = [
   {
     path: '/catenary',
     component: Layout,

+ 23 - 8
src/views/dashboard-screen/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="dashboard-container">
     <div class="header">
-      <div class="title">
+      <div class="title" @click="openDrawer('变电-电力异常信息')">
         变电配电大数据可视化系统
       </div>
       <div class="r-title">
@@ -24,7 +24,7 @@
         </div>
         <div class="o-item">
           <CardWrap>
-            <span slot="title">试验计划兑现情况</span>
+            <span slot="title" @click="openDrawer('试验计划本月兑现情况')">试验计划兑现情况</span>
             <div slot="content">
               <SyjhdxqkChart/>
             </div>
@@ -117,7 +117,9 @@ import QbDlsbxjdx from '@/views/dashboard-screen/qb-dlsbxjdx/index.vue'
 import Jryl from '@/views/dashboard-screen/jryl/index.vue'
 import ChartMap from '@/views/dashboard-screen/chart-map/chartMap.vue'
 import dayjs from 'dayjs'
+import ScreenBdDlYcxx from '@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/ScreenBdDlYcxx.vue'
 import ScreenJxdxqk from '@/views/dashboard-screen/screen/screenJxdxqk.vue'
+import ScreenSyjhbydxqk from '@/views/dashboard-screen/screen/ScreenSyjhbydxqk.vue'
 
 require('dayjs/locale/zh-cn')
 export default {
@@ -151,7 +153,9 @@ export default {
 
     openDrawer(title) {
       const map = {
-        '检修兑现情况': ScreenJxdxqk
+        '检修兑现情况': ScreenJxdxqk,
+        '变电-电力异常信息': ScreenBdDlYcxx,
+        '试验计划本月兑现情况': ScreenSyjhbydxqk
       }
       this.drawer.title = title
       this.drawer.visible = true
@@ -334,11 +338,22 @@ export default {
   }
 }
 
-::v-deep .drawer-wrap {
-  background-image: url("/static/images/bg.png");
-  background-repeat: no-repeat;
-  background-size: cover;
-}
+::v-deep {
+  .drawer-wrap {
+    background-image: url("/static/images/bg.png");
+    background-repeat: no-repeat;
+    background-size: cover;
+
+    header {
+      color: #fff;
+      font-size: 1.3vw;
 
+      span {
+        outline: none !important;
+      }
+    }
+
+  }
+}
 
 </style>

+ 97 - 0
src/views/dashboard-screen/screen/ScreenSyjhbydxqk.vue

@@ -0,0 +1,97 @@
+<template>
+  <div class="common-wrap">
+    <div class="chart">
+      <v-chart :option="option" autoresize/>
+
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  name: 'ScreenSyjhbydxqk',
+  data() {
+    return {
+      option: {}
+    }
+  },
+  created() {
+    this.getOption()
+  },
+  methods: {
+    async getOption() {
+      this.option = {
+        title: {},
+        color: ['rgb(86, 202, 149)', 'rgb(96, 150, 230)'],
+        tooltip: {
+          trigger: 'axis'
+        },
+        legend: {
+          data: ['计划', '完成'],
+          position: 'top',
+          textStyle: {
+            color: '#ffffff',
+            fontSize: this.EchartfontSize(18)
+          }
+
+        },
+        toolbox: {
+          show: true
+        },
+        calculable: true,
+        xAxis: {
+          type: 'category',
+          // prettier-ignore
+          data: ['开关分合本月', '开关分合本周', '单体本月', '单体本周'],
+          axisLabel: {
+            show: true,
+            textStyle: {
+              color: '#ffffff',
+              fontSize: this.EchartfontSize(18)
+            }
+          }
+
+        },
+        yAxis: [
+          {
+            type: 'value'
+          }
+        ],
+        series: [
+          {
+            name: '计划',
+            type: 'bar',
+            data: [
+              2.0, 4.9, 7.0, 23.2
+            ]
+
+          },
+          {
+            name: '完成',
+            type: 'bar',
+            data: [
+              2.6, 5.9, 9.0, 26.4
+            ]
+
+          }
+        ]
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.common-wrap {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+
+  .chart {
+    width: 90%;
+    height: 90%;
+  }
+}
+
+</style>

+ 50 - 0
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/ScreenBdDlYcxx.vue

@@ -0,0 +1,50 @@
+<template>
+  <div>
+    activeKey:{{activeKey}}
+    <el-card class="content-z">
+      <a-tabs v-model="activeKey">
+        <a-tab-pane
+          v-for="item in tabs"
+          :key="item.name"
+          :tab="item.title"
+        >
+          <component
+            :is="item.name"
+            v-if="activeKey === item.name"
+          />
+        </a-tab-pane>
+      </a-tabs>
+    </el-card>
+  </div>
+
+</template>
+<script>
+
+import Dl from "@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/dl.vue";
+import Bd from "@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/bd.vue";
+
+export default {
+  name: 'ScreenBdDlYcxx',
+  components: {
+    Bd,
+    Dl
+  },
+  data() {
+    return {
+      activeKey: 'Bd',
+      tabs: [{
+        title: '变电异常信息',
+        name: 'Bd'
+      }, {
+        title: '电力异常信息',
+        name: 'Dl'
+      }]
+    }
+  },
+  computed: {},
+  methods: {}
+}
+</script>
+<style scoped>
+@import '~@/assets/less/common.less'
+</style>

+ 127 - 0
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/bd.vue

@@ -0,0 +1,127 @@
+<template>
+  <div>
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <!-- 操作按钮区域 -->
+      <div class="table-operator" style="margin: 5px 0;float: right">
+        <a-button ghost type="danger" icon="download" @click="handleExportXls()">导出</a-button>
+        <a-dropdown v-if="selectedRowKeys.length > 0">
+          <a-menu slot="overlay">
+            <a-menu-item key="1" @click="batchDel">
+              <a-icon type="delete"/>
+              删除
+            </a-menu-item>
+          </a-menu>
+          <a-button style="margin-left: 8px">
+            批量操作
+            <a-icon type="down"/>
+          </a-button>
+        </a-dropdown>
+      </div>
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-form-item>
+          <a-tree-select
+            v-model="queryParam.deptId"
+            style="width: 150px"
+            :show-search="true"
+            allow-clear
+            placeholder="选择车间"
+            :tree-data="treeData"
+            tree-node-filter-prop="label"
+            :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
+          />
+        </a-form-item>
+        <a-form-item>
+          <j-list-select-tag
+            v-model="queryParam.stationId"
+            style="width: 150px"
+            placeholder="选择站场区间"
+            dict-code="station"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-input
+            v-model="queryParam.pillarCode"
+            style="width: 150px"
+            placeholder="输入支柱号"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-input
+            v-model="queryParam.checkUser"
+            style="width: 150px"
+            placeholder="输入检查人"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-button type="primary" @click="searchQuery">查询</a-button>
+          <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
+        </a-form-item>
+      </a-form>
+    </div>
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin: 16px 0;">
+        <i class="anticon anticon-info-circle ant-alert-icon"/> 已选择&nbsp;<a
+        style="font-weight: 600"
+      >{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        row-key="id"
+        :columns="columns"
+        :data-source="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      />
+    </div>
+    <!-- table区域-end -->
+    <!-- 表单区域 -->
+  </div>
+</template>
+<script>
+import {listMixin} from '@/mixin/listMixin'
+import columns from './bdColumns'
+import {getAction} from '@/api/request'
+
+export default {
+  name: 'Bd',
+  components: {},
+  mixins: [listMixin],
+  data() {
+    return {
+      // 查询条件
+      queryParam: {},
+      treeData: [],
+      // 表头
+      columns: columns(this),
+      url: {
+        list: '/business/catenary/bus/jcb/fdfxjyq/list',
+        delete: '/business/catenary/bus/jcb/fdfxjyq/',
+        tree: '/system/dept/treeSelect',
+        exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
+      }
+    }
+  },
+  created() {
+    this.loadTree()
+  },
+  methods: {
+    loadTree() {
+      this.treeData = []
+      getAction(this.url.tree).then((res) => {
+        if (res.code === 200) {
+          this.treeData = res.data
+        }
+      })
+    }
+  }
+}
+</script>
+<style scoped>
+@import '~@/assets/less/common.less'
+</style>

+ 88 - 0
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/bdColumns.js

@@ -0,0 +1,88 @@
+function columns(vm) {
+  const cols = [
+    {
+      title: '序号',
+      key: 'rowIndex',
+      width: 60,
+      align: 'center',
+      customRender: function(t, r, index) {
+        return parseInt(index) + 1
+      }
+    },
+    {
+      title: '发现时间',
+      align: 'center',
+      dataIndex: 'fxsj',
+      key: 'fxsj'
+    },
+    {
+      title: '线别',
+      align: 'center',
+      dataIndex: 'xb',
+      key: 'xb'
+    },
+    {
+      title: '所亭名称',
+      align: 'center',
+      dataIndex: 'stmc',
+      key: 'stmc'
+    },
+    {
+      title: '缺陷设备名称',
+      align: 'center',
+      dataIndex: 'qxsbmc',
+      key: 'qxsbmc'
+    },
+    {
+      title: '运行编号',
+      align: 'center',
+      dataIndex: 'yxbh',
+      key: 'yxbh'
+    },
+    {
+      title: '缺陷等级',
+      align: 'center',
+      dataIndex: 'qxdj',
+      key: 'qxdj'
+    },
+    {
+      title: '缺陷内容',
+      align: 'center',
+      dataIndex: 'qxnr',
+      key: 'qxnr'
+    },
+    {
+      title: '原因',
+      align: 'center',
+      dataIndex: 'yy',
+      key: 'yy'
+    },
+    {
+      title: '责任部门',
+      align: 'center',
+      dataIndex: 'zrbm',
+      key: 'zrbm'
+    },
+    {
+      title: '涉及工区',
+      align: 'center',
+      dataIndex: 'sjgq',
+      key: 'sjgq'
+    },
+    {
+      title: '整改情况',
+      align: 'center',
+      dataIndex: 'zgqk',
+      key: 'zgqk'
+    },
+    {
+      title: '整改措施',
+      align: 'center',
+      dataIndex: 'zgcs',
+      key: 'zgcs'
+    }
+  ]
+  return cols
+}
+
+export default columns

+ 127 - 0
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/dl.vue

@@ -0,0 +1,127 @@
+<template>
+  <div>
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <!-- 操作按钮区域 -->
+      <div class="table-operator" style="margin: 5px 0;float: right">
+        <a-button ghost type="danger" icon="download" @click="handleExportXls()">导出</a-button>
+        <a-dropdown v-if="selectedRowKeys.length > 0">
+          <a-menu slot="overlay">
+            <a-menu-item key="1" @click="batchDel">
+              <a-icon type="delete"/>
+              删除
+            </a-menu-item>
+          </a-menu>
+          <a-button style="margin-left: 8px">
+            批量操作
+            <a-icon type="down"/>
+          </a-button>
+        </a-dropdown>
+      </div>
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-form-item>
+          <a-tree-select
+            v-model="queryParam.deptId"
+            style="width: 150px"
+            :show-search="true"
+            allow-clear
+            placeholder="选择车间"
+            :tree-data="treeData"
+            tree-node-filter-prop="label"
+            :replace-fields="{children:'children', title:'label', key:'id', value: 'id' }"
+          />
+        </a-form-item>
+        <a-form-item>
+          <j-list-select-tag
+            v-model="queryParam.stationId"
+            style="width: 150px"
+            placeholder="选择站场区间"
+            dict-code="station"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-input
+            v-model="queryParam.pillarCode"
+            style="width: 150px"
+            placeholder="输入支柱号"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-input
+            v-model="queryParam.checkUser"
+            style="width: 150px"
+            placeholder="输入检查人"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-button type="primary" @click="searchQuery">查询</a-button>
+          <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
+        </a-form-item>
+      </a-form>
+    </div>
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin: 16px 0;">
+        <i class="anticon anticon-info-circle ant-alert-icon"/> 已选择&nbsp;<a
+        style="font-weight: 600"
+      >{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        row-key="id"
+        :columns="columns"
+        :data-source="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+      />
+    </div>
+    <!-- table区域-end -->
+    <!-- 表单区域 -->
+  </div>
+</template>
+<script>
+import {listMixin} from '@/mixin/listMixin'
+import columns from './dlColumns'
+import {getAction} from '@/api/request'
+
+export default {
+  name: 'Dl',
+  components: {},
+  mixins: [listMixin],
+  data() {
+    return {
+      // 查询条件
+      queryParam: {},
+      treeData: [],
+      // 表头
+      columns: columns(this),
+      url: {
+        list: '/business/catenary/bus/jcb/fdfxjyq/list',
+        delete: '/business/catenary/bus/jcb/fdfxjyq/',
+        tree: '/system/dept/treeSelect',
+        exportXlsUrl: '/business/catenary/bus/jcb/fdfxjyq/export'
+      }
+    }
+  },
+  created() {
+    this.loadTree()
+  },
+  methods: {
+    loadTree() {
+      this.treeData = []
+      getAction(this.url.tree).then((res) => {
+        if (res.code === 200) {
+          this.treeData = res.data
+        }
+      })
+    }
+  }
+}
+</script>
+<style scoped>
+@import '~@/assets/less/common.less'
+</style>

+ 70 - 0
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/dlColumns.js

@@ -0,0 +1,70 @@
+function columns(vm) {
+  const cols = [
+    {
+      title: '序号',
+      key: 'rowIndex',
+      width: 60,
+      align: 'center',
+      customRender: function(t, r, index) {
+        return parseInt(index) + 1
+      }
+    },
+    {
+      title: '缺陷设备名称',
+      align: 'center',
+      dataIndex: 'qxsbmc',
+      key: 'qxsbmc'
+    },
+    {
+      title: '工区',
+      align: 'center',
+      dataIndex: 'gq',
+      key: 'gq'
+    },
+    {
+      title: '线别',
+      align: 'center',
+      dataIndex: 'xb',
+      key: 'xb'
+    },
+    {
+      title: '发现日期',
+      align: 'center',
+      dataIndex: 'fxrq',
+      key: 'fxrq'
+    },
+    {
+      title: '缺陷内容',
+      align: 'center',
+      dataIndex: 'qxnr',
+      key: 'qxnr'
+    },
+    {
+      title: '故障类别',
+      align: 'center',
+      dataIndex: 'gzlb',
+      key: 'gzlb'
+    },
+    {
+      title: '原因',
+      align: 'center',
+      dataIndex: 'yy',
+      key: 'yy'
+    },
+    {
+      title: '严重性',
+      align: 'center',
+      dataIndex: 'yyx',
+      key: 'yyx'
+    },
+    {
+      title: '处理措施',
+      align: 'center',
+      dataIndex: 'clcs',
+      key: 'clcs'
+    }
+  ]
+  return cols
+}
+
+export default columns