isv-robot %!s(int64=2) %!d(string=hai) anos
pai
achega
24eca9e80a

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

@@ -103,6 +103,7 @@
     <el-drawer
       custom-class="drawer-wrap"
       :title="drawer.title"
+      :destroyOnClose="true"
       :visible.sync="drawer.visible"
       :with-header="true"
       size="100%"

+ 18 - 4
src/views/dashboard-screen/jryl/index.vue

@@ -247,6 +247,10 @@ export default {
             name: '一级',
             type: 'bar',
             stack: 'total',
+            emphasis: {
+              focus: 'series',
+              blurScope: 'coordinateSystem'
+            },
             barGap: barGap, /* 多个并排柱子设置柱子之间的间距*/
             barCategoryGap: 10, /* 多个并排柱子设置柱子之间的间距*/
             barWidth: barWidth,
@@ -276,6 +280,7 @@ export default {
           { // gap
             name: '',
             type: 'bar',
+            legendHoverLink: false,
             barWidth: gapWidth,
             stack: 'total',
             z: 0,
@@ -288,6 +293,10 @@ export default {
           { // 二级
             name: '二级',
             type: 'bar',
+            emphasis: {
+              focus: 'series',
+              blurScope: 'coordinateSystem'
+            },
             stack: 'total',
             barWidth: barWidth,
             itemStyle: { // lenged文本
@@ -306,7 +315,7 @@ export default {
               show: true,
               position: ['50%', -barWidth - 10],
               fontSize: this.EchartfontSize(16),
-              color: '#fffff',
+              color: '#ffffff',
               formatter: (evt) => {
                 return data[1][0] > 0 ? evt.value : ' '
               }
@@ -316,6 +325,7 @@ export default {
           { // gap
             name: '',
             type: 'bar',
+            legendHoverLink: false,
             barWidth: gapWidth,
             stack: 'total',
             z: 0,
@@ -329,6 +339,10 @@ export default {
             name: '三级',
             type: 'bar',
             stack: 'total',
+            emphasis: {
+              focus: 'series',
+              blurScope: 'coordinateSystem'
+            },
             barWidth: barWidth,
             itemStyle: { // lenged文本
               opacity: 1,
@@ -346,7 +360,7 @@ export default {
               show: true,
               position: ['50%', -barWidth - 10],
               fontSize: this.EchartfontSize(16),
-              color: '#fffff',
+              color: '#ffffff',
               formatter: (evt) => {
                 return data[2][0] > 0 ? evt.value : ' '
               }
@@ -475,7 +489,7 @@ export default {
             'symbolOffset': [symbolOffsetWidth, 0],
             'z': 12,
             itemStyle: {
-              opacity: data[2][0] === 0 ? 0 : 1,
+              opacity: !data[2][0] ? 0 : 1,
               color: (params) => {
                 return new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                   offset: data[2][0] === 0 ? 0 : 1,
@@ -509,7 +523,7 @@ export default {
             'z': 12,
             show: false,
             itemStyle: {
-              opacity: data[2][0] === 0 ? 0 : 1,
+              opacity: !data[2][0] ? 0 : 1,
               color: (params) => {
                 return new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                   offset: 0,

+ 18 - 18
src/views/dashboard-screen/screen/screenSbxjdxqk/indexColumns.js

@@ -9,24 +9,24 @@ function columns(vm) {
         return parseInt(index) + 1
       }
     },
-    {
-      title: '车间',
-      align: 'center',
-      dataIndex: 'deptName',
-      key: 'deptName',
-      customRender: (value, row, index) => {
-        const obj = {
-          children: value,
-          attrs: {}
-        }
-        if (index % 5 === 0) {
-          obj.attrs.rowSpan = 5
-        } else {
-          obj.attrs.rowSpan = 0
-        }
-        return obj
-      }
-    },
+    // {
+    //   title: '车间',
+    //   align: 'center',
+    //   dataIndex: 'deptName',
+    //   key: 'deptName',
+    //   customRender: (value, row, index) => {
+    //     const obj = {
+    //       children: value,
+    //       attrs: {}
+    //     }
+    //     if (index % 5 === 0) {
+    //       obj.attrs.rowSpan = 5
+    //     } else {
+    //       obj.attrs.rowSpan = 0
+    //     }
+    //     return obj
+    //   }
+    // },
     {
       title: '工区',
       align: 'center',

+ 36 - 28
src/views/dashboard-screen/screen/screenSbxjdxqk/screenSbxjdxqk.vue

@@ -1,30 +1,30 @@
 <template>
-  <div class="screen-common-wrap">
-      <a-table
-        v-if="dataSource.length > 0"
-        ref="table"
-        size="middle"
-        bordered
-        row-key="id"
-        :columns="columns"
-        :data-source="dataSource"
-        :pagination="false"
-        :loading="loading"
-        @change="handleTableChange"
-      >
+  <div class="screen-common-wrap" v-if="renderReady">
+    <a-table
 
-        <div slot="dxs" class="dx-render" slot-scope="value" style="">
-          <div class="value">
-            {{ value }}
-          </div>
-
-          <div
-            class="bg"
-            :style="{'width': value+'%'}"
-          />
+      ref="table"
+      size="middle"
+      bordered
+      row-key="id"
+      :columns="columns"
+      :data-source="dataSource"
+      :pagination="false"
+      :loading="loading"
+      @change="handleTableChange"
+    >
 
+      <div slot="dxs" class="dx-render" slot-scope="value" style="">
+        <div class="value">
+          {{ value }}
         </div>
-      </a-table>
+
+        <div
+          class="bg"
+          :style="{'width': value+'%'}"
+        />
+
+      </div>
+    </a-table>
     <!-- table区域-end -->
     <!-- 表单区域 -->
   </div>
@@ -42,12 +42,13 @@ export default {
   mixins: [listMixin],
   data() {
     return {
+      renderReady: false,
       // 查询条件
       queryParam: {},
       treeData: [],
       // 表头
       columns: columns(this),
-      url: {
+      url2: {
         list: `/show/sbxj/total/${dayjs().format('M')}`,
         delete: '/business/catenary/bus/jcb/fdfxjyq/',
         tree: '/system/dept/treeSelect',
@@ -55,23 +56,25 @@ export default {
       }
     }
   },
-  created() {
+  mounted() {
     this.getData()
     window['tis'] = this
   },
 
   methods: {
     getData() {
+      console.log('getData')
+      this.renderReady = false;
+      this.dataSource = [];
       this.columns[this.columns.length - 1].title = dayjs().format('M') + '月'
-      getAction(this.url.list).then((res) => {
+      getAction(this.url2.list).then((res) => {
         const basicDataSource = res.data || []
         const typeArr = []
         basicDataSource.forEach(itemRow => {
           const find = typeArr
-            .find(typeItem => typeItem.deptName === itemRow.deptName && typeItem.teamName === itemRow.teamName)
+            .find(typeItem => typeItem.teamName === itemRow.teamName)
           if (!find) {
             const newTypeItem = {
-              deptName: itemRow.deptName,
               teamName: itemRow.teamName,
               children: [itemRow]
             }
@@ -80,12 +83,17 @@ export default {
             find.children.push(itemRow)
           }
         })
+        window['typeArr'] = typeArr;
         const newList = typeArr.reduce((arr, cur) => {
           arr = arr.concat(cur.children)
           return arr
         }, [])
         this.dataSource = newList || []
         window['dataSource'] = this.dataSource;
+        setTimeout(() => {
+          this.renderReady = true;
+        }, 300)
+
       })
     }
   }