Ver código fonte

检测管理看板调整

cfort 3 anos atrás
pai
commit
bdfdd2d2e6

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

@@ -62,9 +62,9 @@
                         header: [
                             '检测项目',
                             '检测类型',
-                            '计划完成时间',
-                            '当前状态',
-                            '员'
+                            '完成时间',
+                            '状态',
+                            '检测员'
                         ],
                         data: [],
                         rowNum: 7,
@@ -250,7 +250,7 @@
                 const sql2 = `select ${sqlStr} from t_lhjczb tj, t_mjjcnlfw tm where tj.jian_ce_xiang_mu_ = tm.id_ and tj.create_time_ like '${this.month}%'`
                 // console.log(sqlStr, sql2)
 
-                Promise.all([
+                Promise.all([ 
                     curdPost('sql', sql1),
                     curdPost('sql', sql2)
                 ]).then(([res1, res2]) => {
@@ -268,7 +268,7 @@
                     acceptList.forEach((item, index) => {
                         let o = {
                             name: item,
-                            value: tempRes[index]
+                            value: tempRes[index] ? tempRes[index] : null
                         }
                         result.push(o)
                     })

+ 2 - 2
src/views/system/jbdHome/board/component/middleCard.vue

@@ -83,11 +83,11 @@
         width: 100%;
         height: 100%;
         .item {
-            width: 24%;
+            width: 20%;
             height: 100%;
             background-color: rgba(6, 30, 93, 0.5);
             &:first-child, &:last-child {
-                width: 36%;
+                width: 38%;
             }
             .no_data {
                 font-size: 20px;

+ 78 - 7
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: {
@@ -213,7 +224,7 @@ export const acceptOption = {
                         position: 'outer',
                         // formatter: `占比:{d}%\n\n\r{b}:{c}`,
                         formatter: `{b}:{c}`,
-                        fontSize: 12
+                        fontSize: 14
                     },
                     labelLine: {
                         show: true
@@ -244,6 +255,10 @@ export const taskOption = {
         left: '50%',
         top: '20px'
     },
+    grid: {
+        top: '80px',
+        bottom: '30px'
+    },
     xAxis: {
         type: 'category',
         data: ['委托', '任务分配', '检测', '报告'],
@@ -281,6 +296,8 @@ export const taskOption = {
         type: 'bar',
         name: '',
         data: [],
+        barWidth: '24px',
+        barGap: '20%',
         barMaxWidth: '35px',
         itemStyle: {
             color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@@ -297,6 +314,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: {
@@ -400,6 +428,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 : ''
+                }
             }
         },
         {
@@ -414,9 +453,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,
@@ -447,7 +496,7 @@ export const sampleOption = {
             style: {
                 fill: '#fff'
             },
-            formatter: function (params) {
+            formatter (params) {
                 let result = ''
                 //一行显示几个字
                 let rowMax = 3
@@ -616,6 +665,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 : ''
+                }
             }
         },
         {
@@ -630,6 +690,17 @@ export const monthOption = {
             },
             itemStyle: {
                 color: '#f5d94e'
+            },
+            label: {
+                show: true,
+                position: 'right',
+                textStyle: {
+                    color: '#f5d94e',
+                    fontSize: 14
+                },
+                formatter (params) {
+                    return params.value ? params.value : ''
+                }
             }
         }
         
@@ -696,7 +767,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