ソースを参照

实现驾驶舱

jiawuxian 1 年間 前
コミット
e926d5bc39
2 ファイル変更33 行追加30 行削除
  1. 31 23
      src/views/board/charts/question/report.vue
  2. 2 7
      src/views/board/index.vue

+ 31 - 23
src/views/board/charts/question/report.vue

@@ -143,46 +143,53 @@ export default {
 
       let chartData = [
         {
-          name: "确认",
+          name: "确认",
           value: this.data.unconfirm,
         },
         {
-          name: "异议审批中",
-          value: this.data.auditing,
+          name: "异议",
+          value: this.data.dissent,
         },
         {
-          name: "待整改",
-          value: this.data.unreform,
+          name: "已关闭",
+          value: this.data.closed,
         },
         {
-          name: "异议隐患",
-          value: this.data.notQuestion,
+          name: "待整改",
+          value: this.data.unreform,
         },
         {
-          name: "整改完成",
+          name: "整改",
           value: this.data.reformed,
         },
+        {
+          name: "已逾期",
+          value: this.data.overdue,
+        },{
+         
+        }
       ];
       let t = this;
       // 指定图表的配置项和数据
       var option = {
-        title: {
-          left: "center",
-        },
+        // title: {
+        //   left: "center",
+        // },
         tooltip: {
           trigger: "item",
           formatter: "{a} <br/>{b} : {c} ({d}%)",
         },
         legend: {
-          type: "scroll",
+          // type: "scroll",
           orient: "vertical",
           right: 10,
-          top: 20,
-          bottom: 20,
+          // top: 20,
+          // bottom: 20,
+          
           data: chartData.map((d) => d.name),
           formatter: function (name) {
             let d = chartData.find((c) => c.name === name);
-            return d.name + "  " + d.value + "项";
+            return d.name + ":" + (d.value?((d.value*100).toFixed(2)+'%'):'-') ;
           },
           textStyle: {
             color: "white",
@@ -194,6 +201,7 @@ export default {
             type: "pie",
             radius: ["65%", "85%"],
             center: ["30%", "50%"],
+            startAngle:180,
             data: chartData,
             label: {
               show: true,
@@ -201,16 +209,16 @@ export default {
               color: "#fff",
               fontSize: 14,
               formatter: function (value) {
-                return `总数:${t.data.total}\n\n整改率:${t.data.reformRate}%`;
-              },
-            },
-            emphasis: {
-              itemStyle: {
-                shadowBlur: 10,
-                shadowOffsetX: 0,
-                shadowColor: "rgba(0, 0, 0, 0.5)",
+                return `总数:${t.data.total}\n\n整改率:${Math.round(t.data.reformed*100)}%`;
               },
             },
+            // emphasis: {
+            //   itemStyle: {
+            //     shadowBlur: 10,
+            //     shadowOffsetX: 0,
+            //     shadowColor: "rgba(0, 0, 0, 0.5)",
+            //   },
+            // },
           },
         ],
       };

+ 2 - 7
src/views/board/index.vue

@@ -35,12 +35,7 @@
           />
         </div>
         <div>
-          <resumptionReport
-            :orgId="selectedOrg.id"
-            :api="api.monitor"
-            :orgName="selectedOrg.name"
-            title="监控调阅"
-          />
+          <question :orgId="selectedOrg.id" />
         </div>
         <div>
           <resumptionReport
@@ -63,7 +58,7 @@
       </div>
       <div>
         <div>
-          <question :orgId="selectedOrg.id" />
+          
         </div>
         <div>
           <resumptionReport