From 02611cd19ef961dedee41f74eb3df13b002993aa Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 19 十二月 2023 17:57:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/api/statistic/chart.js                  |    9 +++
 Source/UBCS-WEB/src/views/statistic/statisticPage.vue       |  111 ++++++++++++++++++------------------
 Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue |    5 -
 Source/UBCS-WEB/src/components/Master/MasterTree.vue        |   11 ---
 4 files changed, 65 insertions(+), 71 deletions(-)

diff --git a/Source/UBCS-WEB/src/api/statistic/chart.js b/Source/UBCS-WEB/src/api/statistic/chart.js
index 87d23af..c793500 100644
--- a/Source/UBCS-WEB/src/api/statistic/chart.js
+++ b/Source/UBCS-WEB/src/api/statistic/chart.js
@@ -25,3 +25,12 @@
     method: 'get',
   })
 }
+
+//缁熻鍒嗘瀽鍒犻櫎
+export const deleteChartId = (params) => {
+  return request({
+    url: '/api/ubcs-system/statisticConfig/deleteChartId',
+    method: 'post',
+    params
+  })
+}
diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
index 7b39aea..d1ec150 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -57,10 +57,6 @@
         defaultExpandAll: false,
         menu: false,
         lazy: true,
-        // treeLoad:function (node,resolve){
-        //   console.log(node)
-        //   console.log(resolve)
-        // }
         treeLoad: (node, resolve) => {
           if (node.data != false) {
             const parentId = (node.level === 0) ? 0 : node.data.oid;
@@ -104,15 +100,13 @@
     getTreeLists() {
       const index = this.$route.query.id.indexOf('@');
       const result = this.$route.query.id.substring(0, index);
-      this.idData = result
-      // console.log(this.$route)
+      this.idData = result;
       getTreeList({'conditionMap[id]': this.idData}).then(res => {
         if (res) {
           if (res.data.length === 0) {
             this.$message.error("涓绘暟鎹垎绫绘煡璇负绌猴紒");
           } else {
             this.Treedata = res.data;
-
             const [firstProperty] = res.data;
             this.ModifyProperties(this.Treedata, 'text', 'label');
             this.referTreeId = firstProperty.attributes.btmTypeId;
@@ -126,11 +120,9 @@
             });
             this.$emit("coderuleoid", this.coderuleoid)
             this.$emit('Treedata', this.Treedata)
-            // console.log(this.Treedata)
           }
         }
       }).catch(res => {
-        // console.log(res)
         this.$message.error(res)
       });
     },
@@ -220,7 +212,6 @@
         this.$emit("codeClassifyOid", this.nodeClickList.oid)
         this.$emit("nodeClickList", this.nodeClickList)
       } catch (error) {
-        // 澶勭悊閿欒
         this.$message.error(error)
       }
     }
diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
index 420cd25..6abed72 100644
--- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -283,7 +283,6 @@
         btmtype: '',
         code: "",
         type: '',
-        // this.visibleDeactivate ?'ENABLE':this.visibleEnable ? 'DISABLE' :this.visibleRecovery ? 'ROLLBACK' :'PUBLIC'
         processName: "",
         vars: {
           codeClassifyOid: "",
@@ -394,7 +393,6 @@
     },
     tableDataArray: {
       handler(newval, oldval) {
-        // console.log('tableData',newval)
         this.tableData = newval;
         this.searchResults = newval
         this.doLayout();
@@ -411,7 +409,6 @@
     },
     tableHeadFindData: {
       handler(newval, oldval) {
-        // console.log(newval)
         newval.forEach((record, _index) => {
           if (record.queryField == 'id' && validatenull(record.templet)) {
             //浼佷笟缂栫爜鐨勯粯璁ゆ坊鍔犺秴閾炬帴,鏆傛湭瀹炵幇
@@ -429,7 +426,6 @@
 
           if (_index == 0) {
             this.keyWordFind = record.queryField;
-            //console.log(record)
           }
         })
         this.tableHeadFindDatas = newval;
@@ -1055,7 +1051,6 @@
     },
     //澧炲姞淇濆瓨
     AddSumbit(val) {
-      // console.log('val',val)
       if (func.notEmpty(val.ts)) {
         val.ts = func.formattedDateTime(val.ts);
         //console.log(val.ts);
diff --git a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
index 87f13cb..0369f5c 100644
--- a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
+++ b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue
@@ -4,35 +4,13 @@
     <div style=" display: flex; justify-content: flex-end;">
       <el-button plain type="primary" @click="addHandler">閰嶇疆</el-button>
     </div>
-    <!--  鏂板瀵硅瘽妗�-->
-    <el-dialog
-      :visible.sync="addVisible"
-      append-to-body
-      class="avue-dialog avue-dialog--top"
-      title="閰嶇疆鏁版嵁缁熻鍒嗘瀽"
-      top="-50px"
-    >
-      <el-table
-        ref="table"
-        :data="tableData"
-        border
-        style="width: 100%"
-        @selection-change="selectChange"
-      >
-        <el-table-column
-          type="selection"
-          width="55">
-        </el-table-column>
-        <el-table-column
-          align="center"
-          label="涓绘暟鎹簱鍚�"
-          prop="menuName"
-          width="300">
-        </el-table-column>
-        <el-table-column
-          align="center"
-          label="绫诲瀷"
-          prop="codeType">
+    <!--鏂板瀵硅瘽妗�-->
+    <el-dialog :visible.sync="addVisible" append-to-body class="avue-dialog avue-dialog--top" title="閰嶇疆鏁版嵁缁熻鍒嗘瀽"
+               top="-50px">
+      <el-table ref="table" :data="tableData" border style="width: 100%" @selection-change="selectChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column align="center" label="涓绘暟鎹簱鍚�" prop="menuName" width="300"></el-table-column>
+        <el-table-column align="center" label="绫诲瀷" prop="codeType">
           <template slot-scope="{ row }">
             <el-select v-model="row.codeType" :multiple="true" limit="4" placeholder="璇烽�夋嫨鍥捐〃绫诲瀷" style="width: 400px">
               <el-option v-for="(item) in selectList" :label="item.label" :value="item.value"></el-option>
@@ -45,16 +23,28 @@
     <el-button type="primary" @click="addSaveHandler">淇濆瓨</el-button>
   </span>
     </el-dialog>
-    <!--    echarts缁勪欢-->
+    <!--echarts缁勪欢-->
     <div style="margin-top: 15px;padding-bottom: 35px">
-      <lineChart v-for="(item,index) in lineList" :key="index" :chartName="item.menuName"
-                 :lineData="item.menuData"></lineChart>
-      <pieChart v-for="(item,index) in pieList" :key="index" :chartName="item.menuName"
-                :pieData="item.menuData"></pieChart>
-      <ColumnarChart v-for="(item,index) in columnarList" :key="index" :chartName="item.menuName"
-                     :columnarData="item.menuData"></ColumnarChart>
-      <mixCart v-for="(item,index) in mixList" :key="index" :chartName="item.menuName"
-               :mixData="item.menuData"></mixCart>
+      <lineChart
+        v-for="(item,index) in lineList"
+        :key="index"
+        :chartName="item.menuName"
+        :lineData="item.menuData"></lineChart>
+      <pieChart
+        v-for="(item,index) in pieList"
+        :key="index"
+        :chartName="item.menuName"
+        :pieData="item.menuData"></pieChart>
+      <ColumnarChart
+        v-for="(item,index) in columnarList"
+        :key="index"
+        :chartName="item.menuName"
+        :columnarData="item.menuData"></ColumnarChart>
+      <mixCart
+        v-for="(item,index) in mixList"
+        :key="index"
+        :chartName="item.menuName"
+        :mixData="item.menuData"></mixCart>
     </div>
   </div>
 </template>
@@ -64,7 +54,7 @@
 import pieChart from "../../components/StatisticsComponent/pieChart"
 import ColumnarChart from "../../components/StatisticsComponent/ColumnarChart"
 import mixCart from "../../components/StatisticsComponent/mixCart"
-import {getStatisticAnalysis,getBtmAndChart,saveStatisticAnalysis} from "@/api/statistic/chart"
+import {getStatisticAnalysis, getBtmAndChart, saveStatisticAnalysis, deleteChartId} from "@/api/statistic/chart"
 import {getList} from "@/api/system/statistic";
 
 export default {
@@ -110,24 +100,32 @@
   },
   created() {
     this.getMasterList();
-    this.getEcharts()
+    this.getEcharts();
+    // deleteChartId({btmname:'zxssaac',chartId:'3'}).then(res=>{
+    //   console.log('res',res)
+    // })
   },
   methods: {
     getMasterList() {
       const userId = localStorage.getItem('userId');
       getList({userId: userId}).then(res => {
         this.tableData = res.data.data;
-      }).catch(error=>{
+      }).catch(error => {
         this.$message.error(error)
       })
     },
-    getEcharts(){
-      getBtmAndChart().then(res=>{
-        const btmNames = Object.keys(res.data.data).join(',');
-        console.log(btmNames);
-        if(btmNames){
-          getStatisticAnalysis({btmNames}).then(item=>{
-            console.log(item)
+    getEcharts() {
+      getBtmAndChart().then(firstResponse => {
+        console.log('btm', firstResponse)
+        const btmNames = Object.keys(firstResponse.data.data).join(',');
+        const firstData = firstResponse.data.data;
+        Object.keys(firstData).forEach((item,index) => {
+          let firstIndex = firstData[item].split(',');
+          console.log('firstIndex',firstIndex);
+        });
+        if (btmNames) {
+          getStatisticAnalysis({btmNames}).then(secondResponse => {
+            console.log('getStatisticAnalysis', secondResponse)
           })
         }
       })
@@ -141,7 +139,7 @@
       this.addVisible = false;
     },
     //淇濆瓨
-     async addSaveHandler() {
+    async addSaveHandler() {
       if (this.selectData.length <= 0) {
         this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
         return;
@@ -158,13 +156,13 @@
           chartIds: item.codeType.join(',')
         }
       })
-       saveStatisticAnalysis(newArray).then(res => {
-          this.menuList = res.data.data;
-          this.nextSave();
-          this.$message.success('淇濆瓨鎴愬姛')
-        }).catch(error=>{
-          this.$message.error(error)
-        });
+      saveStatisticAnalysis(newArray).then(res => {
+        this.menuList = res.data.data;
+        this.nextSave();
+        this.$message.success('淇濆瓨鎴愬姛')
+      }).catch(error => {
+        this.$message.error(error)
+      });
     },
     nextSave() {
       const typeList = {
@@ -198,6 +196,7 @@
     },
   }
 }
+
 </script>
 
 <style lang="scss" scoped>

--
Gitblit v1.9.3