scorpioyq 2 年之前
父節點
當前提交
c6eeeb1e0e
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/views/home/component/dash.vue

+ 3 - 2
src/views/home/component/dash.vue

@@ -6,7 +6,7 @@
           <WarningFilled/>
         </el-icon>
         <span class="ml-5">项目总投资额<span
-            class="main-color bold">{{ num ? Number.parseFloat(num).toLocaleString() : '-' }}</span>万元</span>
+            class="main-color bold">{{ num ? Number.parseFloat(num).toLocaleString() : '0' }}</span>万元</span>
       </div>
       <div class="flex ml-20 hide-scrollbar" style="overflow-x: scroll;width: 86vw;"
            v-show='numList && numList.length > 0'>
@@ -292,6 +292,7 @@ export default {
   methods: {
     switchTab(item, index) {
       this.active = index
+      this.num = item.totalAmount
       this.projectStageQuery = {projectStage: item.dictKey}
       this.onLoad(Object.assign(this.owerQuery, this.projectStageQuery))
     },
@@ -370,7 +371,7 @@ export default {
       this.$api.project.userNunList(data).then(res => {
         if (res.code === 200) {
           this.numList = res.data.projectStage
-          this.num = res.data.totalAmount
+          this.num = res.data.projectStage[0].totalAmount
         }
       })
     },