From afe51cbcc9096d53593eb24a2ec1a8e0eeb16d70 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Wed, 17 Mar 2021 13:58:04 +0800 Subject: [PATCH 1/2] ziliaoshangbao --- client/src/views/supervision/report.vue | 63 ++++++++++++++++++++----- 1 file changed, 52 insertions(+), 11 deletions(-) diff --git a/client/src/views/supervision/report.vue b/client/src/views/supervision/report.vue index aad5598..553bb88 100644 --- a/client/src/views/supervision/report.vue +++ b/client/src/views/supervision/report.vue @@ -3,25 +3,28 @@
-
- + + + - + - + - + - -
- + + - + + + + @@ -86,6 +94,8 @@ + + { + getRecordList({state:this.state}).then((res) => { this.listLoading = false; this.recordList = res.data.results; }); }, + handleClick(tab, event) { + switch (tab.name) { + case "first": + this.state="待上报"; + this.getRecordList(); + break; + case "second": + this.state="已上报"; + this.getRecordList(); + break; + case "third": + this.state="待整改"; + this.getRecordList(); + break; + case "forth": + this.state="已确认"; + this.getRecordList(); + break; + } + }, + handleUpdate(scope) { this.data = { action: "update", record: scope.row, }; this.drawer = true; + }, + chooseComplete(data) { + this.dialogVisible = false; + const rLoading = this.openLoading("正在初始化任务,请稍等..."); + inittask(this.task.id, data).then((res) => { + rLoading.close(); + this.$message.success("成功"); + this.$router.go(0); + }); }, handleUp(scope) { this.data = { From a175dcb1fcad61c434dd26f4fee9b6c7400251c0 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Thu, 18 Mar 2021 09:11:26 +0800 Subject: [PATCH 2/2] cailiaobaosong --- client/src/api/record.js | 8 +++- client/src/views/supervision/record.vue | 10 ++--- client/src/views/supervision/report.vue | 59 ++++++++++++++++++++++--- server/apps/supervision/views.py | 4 +- 4 files changed, 68 insertions(+), 13 deletions(-) diff --git a/client/src/api/record.js b/client/src/api/record.js index 12d8525..dad31d8 100644 --- a/client/src/api/record.js +++ b/client/src/api/record.js @@ -34,7 +34,13 @@ export function updateRecord(id, data) { data }) } - +export function createself(data) { + return request({ + url: `/supervision/record/createself/`, + method: 'post', + data + }) +} export function upRecord(id, data) { return request({ url: `/supervision/record/${id}/up/`, diff --git a/client/src/views/supervision/record.vue b/client/src/views/supervision/record.vue index 48408e7..f4e5313 100644 --- a/client/src/views/supervision/record.vue +++ b/client/src/views/supervision/record.vue @@ -76,15 +76,15 @@ - + - + - + - + @@ -100,7 +100,7 @@ - + diff --git a/client/src/views/supervision/report.vue b/client/src/views/supervision/report.vue index 0f35bdd..5930681 100644 --- a/client/src/views/supervision/report.vue +++ b/client/src/views/supervision/report.vue @@ -1,7 +1,29 @@