田源
2023-10-18 91c536ab7544c466dd93e54d6ffc78646868cf6f
Source/UBCS-WEB/src/views/wel/Statistic.vue
@@ -13,6 +13,7 @@
name: "Statistic",
  data(){
  return {
    userId:'',
    countByServer:true,
    // listMyTask:[]
    option: {
@@ -59,7 +60,10 @@
  }
  },
  created() {
  this.getList();
    this.userId=sessionStorage.userId
    getList('/api/ubcs-code/mdmCount/getMdmCounts',{id:this.userId}).then(res=>{
      console.log(res)
    })
  },
  computed(){
@@ -77,26 +81,26 @@
    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
        };
      });
    },
    // 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>