九山 3 vuotta sitten
vanhempi
commit
3ffe68b392

+ 42 - 18
src/assets/js/singlePerformanceAnalysis/individualPandectinformationdetails.js

@@ -88,11 +88,11 @@ export default {
       isAsc: "asc",
       formInline: {},
       pie_data: [],
-      pie_data2: [],
-      pie_data3: [],
-      pie_data4: [],
-      pie_data5: [],
-      pie_data6: [],
+      // pie_data2: [],
+      // pie_data3: [],
+      // pie_data4: [],
+      // pie_data5: [],
+      // pie_data6: [],
       gztabledate: {
         sjnh: [],
         zynh: [],
@@ -865,19 +865,43 @@ export default {
         });
     },
     query_01() {
-      this.pie_data2 = [];
-      this.pie_data = [];
-      this.pie_data3 = [];
-      this.pie_data4 = [];
-      this.pie_data5 = [];
-      this.pie_data6 = [];
-      let that = this;
-      let piedata = [];
-      var digital = new URLSearchParams();
-      digital.append("wtId", this.fj);
-      digital.append("recorddate", this.data_01);
-      digital.append("type", "1");
+      // this.pie_data2 = [];
+      // this.pie_data3 = [];
+      // this.pie_data4 = [];
+      // this.pie_data5 = [];
+      // this.pie_data6 = [];
+      let _this = this;
+
+      
+
+      let api = [];
+
+      for(var i = 0; i < 6; i++){
+        var digital = new URLSearchParams();
+        digital.append("wtId", this.fj);
+        digital.append("recorddate", this.data_01);
+        digital.append("type", (i+1)+"");
+        api.push(this.API.post("/goodness/pieChart", digital));
+      }
+
+      Promise.all(api).then(function(res) {
+        res.forEach((item, index)=>{
+          
+          _this.pie_data = [];
+          let piedata = [];
+          piedata = item.data;
+          for (let i = 0; i < Object.keys(piedata).length; i++) {
+            _this.pie_data.push({
+              value: piedata[i].value1,
+              name: piedata[i].name,
+            });
+          }
+          _this.ECZM.qt_DJXNFX("line_0"+(index+1),_this.pie_data);
+        });
+      });
+      return;
       this.API.post("/goodness/pieChart", digital).then((res) => {
+        let piedata = [];
         piedata = res.data;
         for (let i = 0; i < Object.keys(piedata).length; i++) {
           this.pie_data.push({
@@ -885,7 +909,7 @@ export default {
             name: piedata[i].name,
           });
         }
-        this.query_02();
+        // this.query_02();
       });
     },
     query_02() {