Prechádzať zdrojové kódy

Merge branch 'baiyanting1' of http://124.70.43.205:3000/xieshengjie/jn_sis_zhfx into new-power

baiyanting 10 mesiacov pred
rodič
commit
f941687af7

+ 10 - 2
src/components/chart/pie/dual-pie-chart.vue

@@ -39,6 +39,7 @@ export default {
       default: true,
     },
     title: { type: String, default: "" },
+    type: { type: Number, default: 0 },
   },
   data() {
     return {
@@ -53,7 +54,8 @@ export default {
       //   let legend1 = this.innerData.map((v) => v.name);
       //   let legend2 = this.outerData.map((v) => v.name);
       //   let legendData = [...legend1, ...legend2];
-
+      let type = this.type;
+     
       let option = {
         title: {
           text: this.title,
@@ -67,7 +69,13 @@ export default {
         tooltip: {
           trigger: "item",
           formatter: function (params) {
-            return params.marker + params.name + " " + params.value + "%";
+            return (
+              params.marker +
+              params.name +
+              " " +
+              params.value +
+              (type == 1 ? "次" : "%")
+            );
           },
         },
         legend: {

+ 2 - 2
src/views/HealthControl/healthManagement/overview/index.vue

@@ -54,7 +54,7 @@
             :outerData="healPieData"
             :height="'150px'"
           /> -->
-          <dual-pie-chart :series="healPieData" :height="'150px'" />
+          <dual-pie-chart :series="healPieData" :height="'150px'" :type="1"/>
         </panel>
       </Col>
       <Col :span="12">
@@ -64,7 +64,7 @@
             :outerData="stopPieData"
             :height="'150px'"
           /> -->
-          <dual-pie-chart :series="stopPieData" :height="'150px'" />
+          <dual-pie-chart :series="stopPieData" :height="'150px'" :type="1"/>
         </panel>
       </Col>
       <!-- <Col :span="16">