scorpio 2 年之前
父节点
当前提交
45b7156aaa
共有 3 个文件被更改,包括 17 次插入8 次删除
  1. 10 7
      src/views/invest/components/complete.vue
  2. 1 0
      src/views/invest/components/left.vue
  3. 6 1
      src/views/invest/index.vue

+ 10 - 7
src/views/invest/components/complete.vue

@@ -38,7 +38,7 @@ export default {
       handler (val) {
         this.initOption(val)
       },
-      immediate: true
+      immediate: false
     },
     deptId: {
       handler (val) {
@@ -67,19 +67,19 @@ export default {
         column: [
           {
             label: '项目名称',
-            prop: 'deptName'
+            prop: 'projectName'
           },
           {
             label: '计划完成投资(万元)',
-            prop: 'planCompleteAmount'
+            prop: 'yearlyPlanCompleteAmount'
           },
           {
             label: '完成投资(万元)',
-            prop: 'totalCompleteAmount'
+            prop: 'yearlyCompleteAmount'
           },
           {
             label: '完成率',
-            prop: 'completionRate'
+            prop: 'rate'
           }
         ]
       },
@@ -88,17 +88,19 @@ export default {
   },
   methods: {
     onLoad () {
-      this.$api.invest.list({
+      const data = {
         deptId: this.deptId === null ? '' : this.deptId,
         month: this.month,
         quarter: this.quarter
-      }).then(res => {
+      }
+      this.$api.invest.list(data).then(res => {
         if (res.code === 200) {
           this.data = res.data
         }
       })
     },
     initOption (res) {
+      console.log('initOption')
       this.month = ''
       this.selectOption.length = 0
       switch (res.value) {
@@ -142,6 +144,7 @@ export default {
       this.onLoad()
     },
     changeMonth (res) {
+      console.log('changeMonth')
       this.month = res
       this.onLoad()
     }

+ 1 - 0
src/views/invest/components/left.vue

@@ -43,6 +43,7 @@ export default {
             e.checked = false
             return e
           })
+          this.change(0)
         } else {
           this.$message.error(res.msg)
         }

+ 6 - 1
src/views/invest/index.vue

@@ -35,6 +35,12 @@
   </div>
 </template>
 
+<route>
+{
+name: '年度投资',
+}
+</route>
+
 <script>
 import BasicContainer from '@/components/basic-container/main.vue'
 import left from './components/left.vue'
@@ -65,7 +71,6 @@ export default {
     },
     change (index) {
       this.yearType = index
-      console.log(this.yearType)
     }
   }
 }