Kaynağa Gözat

检测看板调整

cfort 2 yıl önce
ebeveyn
işleme
99d48dea8b

+ 2 - 2
src/views/system/jbdHome/board/checkBoard.vue

@@ -101,7 +101,7 @@
 
             this.timer = setInterval(() => {
                 this.updateAll()
-            },600000)
+            }, 1000 * 60)
         },
         beforeDestroy() {
             if (screenfull.isFullscreen) {
@@ -287,7 +287,7 @@
                 // 获取已委托样品数量
                 const sql3 = `select count(yp.id_) as unReceive from t_mjypb yp, t_mjwtsqb wt where yp.wai_jian_ = wt.id_ and yp.create_time_ like '${this.month}%'`
                 // 获取样品 收样/留样/不合格数量
-                const sql4 = `select count(id_) as receive, count(shi_fou_liu_yang_ = '是' or null) as keep, count(yan_shou_zhuang_t = '残缺' or null) as incomplete from t_mjypdjb where create_time_ like '${this.month}%'`
+                const sql4 = `select count(a.id_) as receive, count(a.shi_fou_liu_yang_ = '是' or null) as keep, count(a.yan_shou_zhuang_t = '残缺' or null) as incomplete from (select id_, shi_fou_liu_yang_, yan_shou_zhuang_t from t_mjypdjb where create_time_ like '${this.month}%' group by yang_pin_bian_hao) as a`
                 Promise.all([
                     curdPost('sql', sql1),
                     curdPost('sql', sql2),

+ 90 - 8
src/views/system/jbdHome/board/data.js

@@ -24,7 +24,7 @@ export const acceptOption1 = {
             style: {
                 fill: '#fff'
             },
-            formatter: function (params) {
+            formatter (params) {
                 let result = ''
                 //一行显示几个字
                 let rowMax = 2
@@ -92,7 +92,18 @@ export const acceptOption1 = {
                 { offset: 0, color: "#83bff6" },
                 { offset: 0.5, color: "#188df0" },
                 { offset: 1, color: "#188df0" },
-            ])
+            ]),
+            label: {
+                show: true,
+                position: 'top',
+                textStyle: {
+                    color: '#fff',
+                    fontSize: 14
+                },
+                formatter (params) {
+                    return params.value ? params.value : ''
+                }
+            }
         },
         emphasis: {
             itemStyle: {
@@ -203,7 +214,7 @@ export const acceptOption = {
             name: '任务完成情况',
             type: 'pie',
             radius: '55%',
-            center: ['40%', '50%'],
+            center: ['35%', '50%'],
             data: [],
             itemStyle: {
                 emphasis: {
@@ -217,7 +228,7 @@ export const acceptOption = {
                         position: 'outer',
                         // formatter: `占比:{d}%\n\n\r{b}:{c}`,
                         formatter: `{b}:{c}`,
-                        fontSize: 12
+                        fontSize: 14
                     },
                     labelLine: {
                         show: true
@@ -248,6 +259,10 @@ export const taskOption = {
         left: '50%',
         top: '20px'
     },
+    grid: {
+        top: '80px',
+        bottom: '30px'
+    },
     xAxis: {
         type: 'category',
         data: ['委托', '任务分配', '检测', '报告'],
@@ -285,6 +300,8 @@ export const taskOption = {
         type: 'bar',
         name: '',
         data: [],
+        barWidth: '24px',
+        barGap: '20%',
         barMaxWidth: '35px',
         itemStyle: {
             color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@@ -301,6 +318,17 @@ export const taskOption = {
                     { offset: 1, color: "#83bff6" },
                 ])
             }
+        },
+        label: {
+            show: true,
+            position: 'top',
+            textStyle: {
+                color: '#fff',
+                fontSize: 14
+            },
+            formatter (params) {
+                return params.value ? params.value : ''
+            }
         }
     }],
     tooltip: {
@@ -404,6 +432,17 @@ export const trustOption = {
                         { offset: 1, color: "#83bff6" },
                     ])
                 }
+            },
+            label: {
+                show: true,
+                position: 'top',
+                textStyle: {
+                    color: '#fff',
+                    fontSize: 14
+                },
+                formatter (params) {
+                    return params.value ? params.value : ''
+                }
             }
         },
         {
@@ -418,9 +457,19 @@ export const trustOption = {
             },
             itemStyle: {
                 color: '#f5d94e'
+            },
+            label: {
+                show: true,
+                position: 'right',
+                textStyle: {
+                    color: '#f5d94e',
+                    fontSize: 14
+                },
+                formatter (params) {
+                    return params.value ? params.value : ''
+                }
             }
-        }
-        
+        } 
     ],
     tooltip: {
         show: true,
@@ -451,7 +500,7 @@ export const sampleOption = {
             style: {
                 fill: '#fff'
             },
-            formatter: function (params) {
+            formatter (params) {
                 let result = ''
                 //一行显示几个字
                 let rowMax = 3
@@ -517,6 +566,17 @@ export const sampleOption = {
                     { offset: 1, color: "#83bff6" },
                 ])
             }
+        },
+        label: {
+            show: true,
+            position: 'top',
+            textStyle: {
+                color: '#fff',
+                fontSize: 14
+            },
+            formatter (params) {
+                return params.value ? params.value : ''
+            }
         }
     }],
     tooltip: {
@@ -620,6 +680,17 @@ export const monthOption = {
                         { offset: 1, color: "#83bff6" },
                     ])
                 }
+            },
+            label: {
+                show: true,
+                position: 'top',
+                textStyle: {
+                    color: '#fff',
+                    fontSize: 14
+                },
+                formatter (params) {
+                    return params.value ? params.value : ''
+                }
             }
         },
         {
@@ -634,6 +705,17 @@ export const monthOption = {
             },
             itemStyle: {
                 color: '#f5d94e'
+            },
+            label: {
+                show: true,
+                position: 'right',
+                textStyle: {
+                    color: '#f5d94e',
+                    fontSize: 14
+                },
+                formatter (params) {
+                    return params.value ? params.value : ''
+                }
             }
         }
         
@@ -700,7 +782,7 @@ export const yearOption = {
                         position: 'outer',
                         formatter: `占比:{d}%\n\n\r{b}:{c}`,
                         // formatter: `{b}:{c}\n\n\r占比:{d}%`,
-                        fontSize: 12
+                        fontSize: 14
                     },
                     labelLine: {
                         show: true