From 91c536ab7544c466dd93e54d6ffc78646868cf6f Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 18 十月 2023 10:15:14 +0800
Subject: [PATCH] 主数据页面不显示Bug

---
 Source/UBCS-WEB/src/views/wel/Statistic.vue |  169 ++++++++++++++++++++++++++-----------------------------
 1 files changed, 80 insertions(+), 89 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/wel/Statistic.vue b/Source/UBCS-WEB/src/views/wel/Statistic.vue
index 0d6556a..918d584 100644
--- a/Source/UBCS-WEB/src/views/wel/Statistic.vue
+++ b/Source/UBCS-WEB/src/views/wel/Statistic.vue
@@ -1,13 +1,6 @@
 <template>
   <div>
-    <el-row :gutter="20">
-      <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="4" v-for="item in listMyTask">
-        <div class="box" :style="item.style" @click="goto(item)">
-          {{item.name}}
-          <div><avue-count-up class="value" :end="item.count"></avue-count-up></div>
-        </div>
-      </el-col>
-    </el-row>
+        <avue-data-box :option="option" :animation="true"></avue-data-box>
   </div>
 </template>
 
@@ -20,100 +13,98 @@
 name: "Statistic",
   data(){
   return {
+    userId:'',
     countByServer:true,
-    listMyTask:[]
+    // listMyTask:[]
+    option: {
+      span:6,
+      data: [
+        {
+          click: this.handleItemAClick,
+          title: '鐗╁搧涓绘暟鎹�',
+          count: 1723,
+          icon: 'iconfont iconicon_doc',
+          color: 'rgb(49, 180, 141)',
+          uiUrl: "/MasterData/items?id=wupin@name=鐗╁搧涓绘暟鎹�",
+          countUrl:'priceIndexController/countNeedConfirmPlan'
+        },
+        {
+          click: this.handleItemBClick,
+          title: '浜哄憳涓绘暟鎹�',
+          count: 1225,
+          icon: 'iconfont iconicon_dispose',
+          color: 'rgb(56, 161, 242)',
+          uiUrl:'/MasterData/items?id=renyuan@@name=浜哄憳涓绘暟鎹�',
+          countUrl:'priceIndexController/countPricingPlan'
+        },
+        {
+          click: this.handleItemCClick,
+          title: 'Part',
+          count: 523,
+          icon: 'el-icon-setting',
+          color: 'rgb(117, 56, 199)',
+          uiUrl:'/MasterData/items?id=10@@name=Part',
+          countUrl:'priceIndexController/countNeedFeedbackPlan'
+        },
+        {
+          click: this.handleItemDClick,
+          title: '渚涘簲鍟嗕富鏁版嵁',
+          count: 0,
+          icon: 'iconfont iconicon_work',
+          color: 'rgb(255, 102, 51)',
+          uiUrl:'/MasterData/items?id=gongyingshang@@name=渚涘簲鍟嗕富鏁版嵁',
+          countUrl:'priceIndexController/countMyUnCreatePricePlan'
+        },
+      ]
+    },
   }
   },
   created() {
-  this.getList();
+    this.userId=sessionStorage.userId
+    getList('/api/ubcs-code/mdmCount/getMdmCounts',{id:this.userId}).then(res=>{
+      console.log(res)
+    })
   },
   computed(){
 
   },
   methods: {
-    getList() {
-      let data = [{
-        "backgroundColor": "#FF5722",
-        "btmname": "hometask",
-        "countUrl": "priceIndexController/countNeedConfirmPlan",
-        "name": "鐗╁搧涓绘暟鎹�",
-        "nameOid": "",
-        "oid": "34aebfde-eb11-4555-87eb-0a779be9aad0",
-        "uiUrl": "/MasterData/items?id=wupin@name=鐗╁搧涓绘暟鎹�",
-      }, {
-        "backgroundColor": "#5FB878",
-        "btmname": "hometask",
-        "countUrl": "priceIndexController/countPricingPlan",
-        "name": "浜哄憳涓绘暟鎹�",
-        "nameOid": "2C72EA23-8AA5-E5FC-9BC1-DE4AD182EF7B",
-        "oid": "6256ae79-7765-4c66-afc7-f12fad350065",
-        "uiUrl": "/MasterData/items?id=renyuan@@name=浜哄憳涓绘暟鎹�",
-      },{
-          "backgroundColor": "#1E9FFF",
-          "btmname": "hometask",
-          "countUrl": "priceIndexController/countNeedFeedbackPlan",
-          "name": "涓婚搴撳畾涔�",
-          "nameOid": "2536978C-CD1B-5B56-6529-A8C3456B5260",
-          "oid": "3043cdf1-8479-4c2a-9eab-fc35e9f9d5a7",
-          "uiUrl": "/modeling/classifyTree",
-        },
-        {
-          "backgroundColor": "#FF5722",
-          "btmname": "hometask",
-          "countUrl": "priceIndexController/countMyUnCreatePricePlan",
-          "name": "渚涘簲鍟嗕富鏁版嵁",
-          "nameOid": "",
-          "oid": "529634e7-1854-4f61-b911-a91e3c406757",
-          "uiUrl": "/MasterData/items?id=gongyingshang@@name=渚涘簲鍟嗕富鏁版嵁",
-        }]
-      this.listMyTask = data.map(record => {
-        record.style=record.style || ''
-        if(record.backgroundColor!=''){
-          record.style = 'background-color:'+record.backgroundColor;
-        }
-        record.count=record.count || 0;
-        if(!this.countByServer){
-          //鏄墠绔煡璇�
-          getList(record.countUrl,{}).then(res=>{
-            if(res.data.data.success){
-              record.count=res.data.data.obj;
-            }else{
-              record.count=0
-            }
-          })
-
-        }
-        return {
-          ...record
-        }
-      })
+    handleItemAClick() {
+      this.$router.push({ path: "/MasterData/items?id=wupin@name=鐗╁搧涓绘暟鎹�"} );
     },
-    goto(item){
-      this.$router.push({ path: item.uiUrl });
-    }
+    handleItemBClick() {
+      this.$router.push({ path: '/MasterData/items?id=renyuan@@name=浜哄憳涓绘暟鎹�'} );
+    },
+    handleItemCClick() {
+      this.$router.push({ path: '/MasterData/items?id=10@@name=Part'} );
+    },
+    handleItemDClick() {
+      this.$router.push({ path: '/MasterData/items?id=gongyingshang@@name=渚涘簲鍟嗕富鏁版嵁'} );
+    },
+    // getList() {
+    //   // debugger
+    //   Object.values(this.option.data).map(record => {
+    //     record.count = record.count || 0;
+    //     if (!this.countByServer) {
+    //       // 鏄墠绔煡璇�
+    //       getList(record.countUrl, {}).then(res => {
+    //         // console.log('res',res)
+    //         if (res.data.data.success) {
+    //           record.count = res.data.data.obj;
+    //         } else {
+    //           record.count = 0;
+    //         }
+    //       });
+    //     }
+    //     return {
+    //       ...record
+    //     };
+    //   });
+    // },
   }
 }
 </script>
 
 <style scoped>
-.el-col{margin-bottom: 0}
-.box{
-  text-align: center;
-  background: rgb(235, 238, 245);
-  color: #303133;
-  height: 70px;
-  margin: 10px 0!important;
-  padding: 15px 10px;
-  position: relative;
-  border-radius: 4px;
-  box-sizing: border-box;
-  font-size: 14px;
-}
-.value{
-  font-size: 12px;
-  opacity: .69;
-  line-height: 20px;
-  margin-top: 5px;
-  display: block;
-}
+
 </style>

--
Gitblit v1.9.3