From 22f1185e79b8a21ecffb7a05d585abff39a87e23 Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Wed, 13 Jul 2022 19:15:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=97=A5=E6=8A=A5=E5=91=A8?= =?UTF-8?q?=E6=8A=A5=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/building/sugDetail.vue | 21 ++++++++++++--------- src/views/building/sugList.vue | 8 +++----- 2 files changed, 15 insertions(+), 14 deletions(-) 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) {