isv-robot 2 vuotta sitten
vanhempi
commit
3de3aedd28

+ 1 - 1
src/views/dashboard-screen/index.vue

@@ -362,7 +362,7 @@ canvas {
 
             .jryl-wrap {
               width: 25%;
-              height: 20vh;
+              height: 350px;
               position: absolute;
               z-index: 1;
               bottom: 0;

+ 88 - 25
src/views/dashboard-screen/jryl/index.vue

@@ -1,12 +1,18 @@
 <template>
   <div class="chart-wrap">
     <div class="wrap-fix">
-      <div class="col-1 col">
+      <div class="col-2 col">
         <v-chart autoresize :option="option1"/>
       </div>
-      <div class="col-2 col">
+      <div class="col-1 col">
         <v-chart autoresize :option="option2"/>
       </div>
+      <div class="col-1 col">
+        <v-chart autoresize :option="option3"/>
+      </div>
+      <div class="col-1 col">
+        <v-chart autoresize :option="option4"/>
+      </div>
     </div>
   </div>
 </template>
@@ -20,7 +26,9 @@ export default {
   data() {
     return {
       option1: {},
-      option2: {}
+      option2: {},
+      option3: {},
+      option4: {}
     }
   },
   created() {
@@ -33,12 +41,20 @@ export default {
       const res = await chartMapTable()
       if (res.code === 200) {
         arrMap = [
-          [res.info.series[0].data[0], res.info.series[1].data[0]].reverse(),
-          [res.info.series[0].data[1], res.info.series[1].data[1]].reverse(),
-          [res.info.series[0].data[2], res.info.series[1].data[2]].reverse()
+          // [res.info.series[0].data[0], res.info.series[1].data[0]].reverse(),
+          // [res.info.series[0].data[1], res.info.series[1].data[1]].reverse(),
+          // [res.info.series[0].data[2], res.info.series[1].data[2]].reverse()
         ]
+        res.info.xaxis.forEach((_, index) => {
+          const itemArr = []
+          res.info.series.forEach((item) => {
+            itemArr.push(item['data'][index])
+          })
+          arrMap.push(itemArr)
+        })
+        window['arrMap'] = arrMap;
       }
-      var xData2 = ['变电']
+
       var data = arrMap || [
         [50, 10],
         [100, 10],
@@ -50,13 +66,27 @@ export default {
         [data[2][0]]
       ]
       const data2 = [
+        [data[0][2]],
+        [data[1][2]],
+        [data[2][2]]
+      ]
+      const data3 = [
         [data[0][1]],
         [data[1][1]],
         [data[2][1]]
       ]
-      const xDataSum = [arrMap[0][0] + arrMap[1][0] + arrMap[2][0], arrMap[0][1] + arrMap[1][1] + arrMap[2][1]]
-
-      window['xDataSum'] = xDataSum
+      const data4 = [
+        [data[0][3]],
+        [data[1][3]],
+        [data[2][3]]
+      ]
+      const xDataSum = [
+        arrMap[0][0] + arrMap[1][0] + arrMap[2][0],
+        arrMap[0][2] + arrMap[1][2] + arrMap[2][2],
+        arrMap[0][1] + arrMap[1][1] + arrMap[2][1],
+        arrMap[0][3] + arrMap[1][3] + arrMap[2][3]
+      ]
+      window['xDataSum'] = xDataSum;
 
       const gapWidth = this.EchartfontSize(125)
       const barWidth = this.EchartfontSize(10)
@@ -64,8 +94,8 @@ export default {
       const symbolSizeWidth = this.EchartfontSize(4)
       const barGap = 10
       const params = {
-        xData2: xData2,
-        data: data2,
+        xData2: ['(推送)变电'],
+        data: data1,
         gapWidth,
         barWidth,
         symbolOffsetWidth,
@@ -75,8 +105,8 @@ export default {
       }
       this.renderOption('option1', params)
       const params2 = {
-        xData2: ['电力'],
-        data: data1,
+        xData2: ['(推送)电力'],
+        data: data2,
         gapWidth,
         barWidth,
         symbolOffsetWidth,
@@ -85,8 +115,32 @@ export default {
         xDataSum
       }
       this.renderOption('option2', params2)
+      const params3 = {
+        xData2: ['(自主)变电'],
+        data: data3,
+        gapWidth,
+        barWidth,
+        symbolOffsetWidth,
+        symbolSizeWidth,
+        barGap,
+        xDataSum
+      }
+      this.renderOption('option3', params3)
+      const params4 = {
+        xData2: ['(自主)电力'],
+        data: data4,
+        gapWidth,
+        barWidth,
+        symbolOffsetWidth,
+        symbolSizeWidth,
+        barGap,
+        xDataSum
+      }
+      this.renderOption('option4', params4)
     },
     renderOption(optionName, params) {
+      console.log('optionName',optionName)
+      const renderIndex = parseInt(optionName.replace('option', ''))
       const {
         xData2,
         data,
@@ -97,8 +151,6 @@ export default {
         barGap,
         xDataSum
       } = params
-      window['params'] = params
-      window['tis'] = this
 
       let sealingData = []
       const gapPerSize = 3
@@ -149,7 +201,7 @@ export default {
         },
         legend: {
           selectedMode: false,
-          show: optionName !== 'option2',
+          show: optionName === 'option1',
           top: '5%',
           right: '30%',
           width: '100%',
@@ -194,9 +246,9 @@ export default {
         grid: {
           right: '10%',
           left: '5%',
-          height: '80%',
-          top: optionName === 'option2' ? '10%' : '50%',
-          bottom: optionName === 'option2' ? '0%' : 0,
+          height: '160%',
+          top: optionName === 'options1' ? '100%' : 0,
+          bottom: '-100%',
           containLabel: true
 
         },
@@ -567,17 +619,16 @@ export default {
               // position: [-baseWidth - offsetWidth / this.EchartfontSize(10), -this.EchartfontSize(20)]
               position: 'right',
               formatter: (item) => {
-                if (optionName === 'option1') {
-                  return xDataSum[1]
-                } else {
-                  return xDataSum[0]
-                }
+                const ret = xDataSum[renderIndex - 1];
+                console.log('renderIndex,ret', renderIndex, ret)
+                return ret
               }
             }
           }
 
         ]
       }
+      window['tis'] = this;
     }
   }
 
@@ -597,10 +648,22 @@ export default {
     width: 100%;
     display: flex;
     flex-direction: column;
+    align-items: flex-start;
+    justify-content: flex-start;
 
     .col {
       flex: 1;
+      width: 100%;
+      height: 100%;
+      flex-shrink: 0;
+      overflow: hidden;
+      //background: teal;
+      //border: 1px solid white;
+    }
+    .col-2{
+      flex: 1.6;
       flex-shrink: 0;
+      overflow: hidden;
     }
   }
 

+ 7 - 3
src/views/dashboard-screen/screen/ScreenSyjhbydxqk.vue

@@ -31,13 +31,17 @@ export default {
           res.info.series[0].data[0],
           res.info.series[2].data[0],
           res.info.series[4].data[0],
-          res.info.series[6].data[0]
+          res.info.series[6].data[0],
+          res.info.series[8].data[0],
+          res.info.series[10].data[0],
         ]
         arrMap['完成'] = [
           res.info.series[1].data[0],
           res.info.series[3].data[0],
           res.info.series[5].data[0],
-          res.info.series[7].data[0]
+          res.info.series[7].data[0],
+          res.info.series[9].data[0],
+          res.info.series[11].data[0],
         ]
       }
       this.option = {
@@ -62,7 +66,7 @@ export default {
         xAxis: {
           type: 'category',
           // prettier-ignore
-          data: ['开关分合本月', '开关分合本周', '单体本月', '单体本周'],
+          data: ['开关分合本年度', '开关分合本月', '开关分合本周', '单体本月', '单体本周'],
           axisLabel: {
             show: true,
             textStyle: {

+ 16 - 4
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/ScreenBdDlYcxx.vue

@@ -21,23 +21,35 @@
 
 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";
+import ZzBd from "@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/zzBd.vue";
+import ZzDl from "@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/zzdl.vue";
 
 export default {
   name: 'ScreenBdDlYcxx',
   components: {
     Bd,
-    Dl
+    Dl,
+    ZzBd,
+    ZzDl
   },
   data() {
     return {
       activeKey: 'Bd',
       tabs: [{
-        title: '变电异常信息',
+        title: '(推送)变电异常信息',
         name: 'Bd'
       }, {
-        title: '电力异常信息',
+        title: '(推送)电力异常信息',
         name: 'Dl'
-      }]
+      },
+        {
+          title: '(自主发现)变电异常信息',
+          name: 'ZzBd'
+        },
+        {
+          title: '(自主发现)电力异常信息',
+          name: 'ZzDl'
+        }]
     }
   },
   computed: {},

+ 103 - 0
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/zzBd.vue

@@ -0,0 +1,103 @@
+<template>
+  <div>
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <!-- 操作按钮区域 -->
+      <div class="table-operator" style="margin: 5px 0;float: right">
+        <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>
+          <j-dict-select-tag
+            v-model="queryParam.ssgq"
+            style="width: 150px"
+            placeholder="选择工区"
+            dict-code="dlyc_sygq"
+          />
+        </a-form-item>
+        <a-form-item>
+          <j-dict-select-tag
+            v-model="queryParam.gravity"
+            style="width: 150px"
+            placeholder="选择严重性"
+            dict-code="dlycyzx"
+          />
+        </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>
+      <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 './zzbdColumns'
+import {getAction} from '@/api/request'
+
+export default {
+  name: 'ZzBd',
+  components: {},
+  mixins: [listMixin],
+  data() {
+    return {
+      // 查询条件
+      queryParam: {},
+      treeData: [],
+      // 表头
+      columns: columns(this),
+      url: {
+        list: '/show/bdyc/remainSelfList',
+        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/zzbdColumns.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: 'foundDate',
+      key: 'foundDate'
+    },
+    {
+      title: '线别',
+      align: 'center',
+      dataIndex: 'lineName',
+      key: 'lineName'
+    },
+    {
+      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: 'reason',
+      key: 'reason'
+    },
+    {
+      title: '责任部门',
+      align: 'center',
+      dataIndex: 'zrbm',
+      key: 'zrbm'
+    },
+    {
+      title: '涉及工区',
+      align: 'center',
+      dataIndex: 'sjgq',
+      key: 'sjgq'
+    },
+    {
+      title: '整改情况',
+      align: 'center',
+      dataIndex: 'rectifyResult',
+      key: 'rectifyResult'
+    },
+    {
+      title: '整改措施',
+      align: 'center',
+      dataIndex: 'rectifyWay',
+      key: 'rectifyWay'
+    }
+  ]
+  return cols
+}
+
+export default columns

+ 103 - 0
src/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/zzdl.vue

@@ -0,0 +1,103 @@
+<template>
+  <div>
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <!-- 操作按钮区域 -->
+      <div class="table-operator" style="margin: 5px 0;float: right">
+        <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>
+          <j-dict-select-tag
+            v-model="queryParam.ssgq"
+            style="width: 150px"
+            placeholder="选择工区"
+            dict-code="dlyc_sygq"
+          />
+        </a-form-item>
+        <a-form-item>
+          <j-dict-select-tag
+            v-model="queryParam.gravity"
+            style="width: 150px"
+            placeholder="选择严重性"
+            dict-code="dlycyzx"
+          />
+        </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>
+      <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 './zzdlColumns'
+import {getAction} from '@/api/request'
+
+export default {
+  name: 'zzDl',
+  components: {},
+  mixins: [listMixin],
+  data() {
+    return {
+      // 查询条件
+      queryParam: {},
+      treeData: [],
+      // 表头
+      columns: columns(this),
+      url: {
+        list: '/show/dlyc/remainSelfList',
+        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/zzdlColumns.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: 'ssgq',
+      key: 'ssgq'
+    },
+    {
+      title: '线别',
+      align: 'center',
+      dataIndex: 'lineName',
+      key: 'lineName'
+    },
+    {
+      title: '发现日期',
+      align: 'center',
+      dataIndex: 'foundDate',
+      key: 'foundDate'
+    },
+    {
+      title: '缺陷内容',
+      align: 'center',
+      dataIndex: 'qxnr',
+      key: 'qxnr'
+    },
+    {
+      title: '故障类别',
+      align: 'center',
+      dataIndex: 'gzlb',
+      key: 'gzlb'
+    },
+    {
+      title: '原因',
+      align: 'center',
+      dataIndex: 'reason',
+      key: 'reason'
+    },
+    {
+      title: '严重性',
+      align: 'center',
+      dataIndex: 'gravity',
+      key: 'gravity'
+    },
+    {
+      title: '处理措施',
+      align: 'center',
+      dataIndex: 'rectifyWay',
+      key: 'rectifyWay'
+    }
+  ]
+  return cols
+}
+
+export default columns