diff --git a/src/views/building/sugDetail.vue b/src/views/building/sugDetail.vue index 4b42583..eea9c81 100644 --- a/src/views/building/sugDetail.vue +++ b/src/views/building/sugDetail.vue @@ -94,7 +94,7 @@ export default { this.getParamsObj.id = this.$route.query.id } if (this.$route.query.week) { - this.getParamsObj.week = this.$route.query.week + this.week = this.$route.query.week } if (this.$route.query.pid) { this.getParamsObj.pid = this.$route.query.pid @@ -105,22 +105,25 @@ export default { if (this.getParamsObj.id != "" && this.getParamsObj.id != undefined) { let res = await this.$api.api.weekFindById({ id: this.getParamsObj.id }); - this.ruleForm.suggest = res.data.data.suggest; - this.id = res.data.data.id; + console.log(res, 'sadjkasljdklas') + this.ruleForm.suggest = res.data.suggest; + this.id = res.data.id; this.defaultMSG = this.ruleForm.suggest; - this.week = res.data.data.weekDate; + this.week = res.data.weekDate; this.pid = this.getParamsObj.pid; this.type = this.getParamsObj.type; } else { let res = await this.$api.api.byWeekMonthData({ - weekDate: this.getParamsObj.week, + weekDate: this.week, projectId: this.getParamsObj.pid, }); - if (res.data.data != null) { - this.ruleForm.suggest = res.data.data.suggest; + console.log(res, 'sadjkasljdklas') + + if (res.data != null) { + this.ruleForm.suggest = res.data.suggest; this.defaultMSG = this.ruleForm.suggest; - this.id = res.data.data.id; - console.log("有数据:", res.data.data); + this.id = res.data.id; + console.log("有数据:", res.data); } this.week = this.getParamsObj.week; this.pid = this.getParamsObj.pid; diff --git a/src/views/building/sugList.vue b/src/views/building/sugList.vue index 91ab24e..52da5a2 100644 --- a/src/views/building/sugList.vue +++ b/src/views/building/sugList.vue @@ -83,7 +83,6 @@ export default { time: [], tableData: [], week: "", - menuId: "", }; }, @@ -125,10 +124,9 @@ export default { filefindByPage(data) { this.$api.api.findWeekMonth(data).then((res) => { console.log(res); - this.tableData = res.data.data.list.results; - this.total = res.data.data.list.totalRecord; - this.week = res.data.data.weekDate; - this.menuId = res.data.data.permitBtn; + this.tableData = res.data.list.records; + this.total = res.data.list.total; + this.week = res.data.weekDate; }); }, modify(id, org) {