Pārlūkot izejas kodu

TaskDetail页面数据获取(Task.vue)

sunjh 6 gadi atpakaļ
vecāks
revīzija
8ff49188e7
1 mainītis faili ar 11 papildinājumiem un 0 dzēšanām
  1. 11 0
      src/components/task/Task.vue

+ 11 - 0
src/components/task/Task.vue

@@ -95,6 +95,8 @@ import Enum from '@/constants/enum/index'
 import provincecity from '@/components/commons/ProvinceCity'
 import provinceCityJSON from '@/constants/provinceCity.json'
 import ReportList from '@/components/report/ReportList'
+import Http from '@/js/http.js'
+import Apis from '@/js/api.js'
 
 export default {
   name: 'Task',
@@ -297,6 +299,15 @@ export default {
     createReport () {
       this.$router.push({name: 'ReportCreate'})
     },
+    loadData() {
+      Http.get(Apis.PAGE.TASK_DETAIL_PAGE).then((res)=>{
+        if (0 === res.code){
+          this.task = res.task
+          this.reportList = res.reportList
+        }
+      })
+    },
+
   }
 }
 </script>