Explorar o código

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

LAPTOP-BJJ3IV5R\SIWEI hai 9 meses
pai
achega
341c51a73a
Modificáronse 1 ficheiros con 20 adicións e 8 borrados
  1. 20 8
      src/components/Query/clickQuery/MultiLevelQuery.vue

+ 20 - 8
src/components/Query/clickQuery/MultiLevelQuery.vue

@@ -53,6 +53,8 @@
                             </el-table-column>
                         </el-table>
 
+                        <pie class="echart" unit="亩" :ref="`qwnership_pie`"></pie>
+
                     </el-tab-pane>
                 </el-tabs>
             </div>
@@ -109,7 +111,7 @@ export default {
             rawData: [],
             headers: [], // 用于存储所有可能的 filedZH 值 
             qwnershipTabs: [],
-            rawData_qwnership:[],
+            rawData_qwnership: [],
             headers_qwnership: [],
         };
     },
@@ -203,8 +205,6 @@ export default {
 
 
             this.activecheckList.forEach((res) => {
-                console.log('res: ', res);
-
 
                 store.state.query_pick_pane.push({
 
@@ -402,8 +402,6 @@ export default {
 
         },
         handleClick(tab, event) {
-            console.log('handleClick: ', tab, event);
-
             let index = Number(tab.index) - 1
 
             if (tab.name == '权属') {
@@ -416,7 +414,6 @@ export default {
 
                             this.active_tabs_table = res.value.data.data;
                             this.rawData = res.value.data.data
-                            console.log('this.rawData: ', this.rawData);
                             res.value.data.datalist.forEach((res) => {
                                 data.push({
                                     name: res.groupvalue,
@@ -432,11 +429,19 @@ export default {
 
         },
         handleClickQwnership(tab, event) {
-            console.log(tab.name);
+            let index = 0;
             this.qwnershipTabs.forEach((res) => {
                 if (res.dataname == tab.name) {
                     this.rawData_qwnership = res.data
-                    console.log('  this.rawData_qwnership: ',   this.rawData_qwnership);
+                    let data = [];
+                    res.datalist.forEach((res) => {
+                        data.push({
+                            name: res.groupvalue,
+                            value: res.sumvalue
+                        })
+                    })
+                    this.setEchart_qwnership(data, "vertical", index);
+                    index++;
                 }
             })
         },
@@ -450,6 +455,13 @@ export default {
             })
 
 
+        },
+        setEchart_qwnership(data, type, index) {
+            this.$nextTick(() => {
+                let max = index == 0 ? 3 : 10
+                let legend_right = index == 0 ? "2%" : "10%"
+                this.$refs.qwnership_pie[index].setOptions({ data, type, max, legend_right });
+            });
         },
         setEchart(data, type, index) {
             this.$nextTick(() => {