From 8d10e15d120f2a75d4737a42ca8d61b7d2c00316 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 27 Mar 2024 16:53:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=87=BA=E5=85=A5=E5=BA=93=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=8F=AF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/inm.js | 16 ++ src/views/inm/halfgood_mio.vue | 431 ++++++++++++++++++++------------- src/views/inm/mainso_mio.vue | 10 +- src/views/inm/mio_form.vue | 4 +- 4 files changed, 287 insertions(+), 174 deletions(-) diff --git a/src/api/model/inm.js b/src/api/model/inm.js index 9c1aefaf..298b9cf3 100644 --- a/src/api/model/inm.js +++ b/src/api/model/inm.js @@ -88,6 +88,14 @@ export default { data); } }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/inm/mio/${id}/`, + data); + } + }, delete: { name: "删除", req: async function(id){ @@ -131,6 +139,14 @@ export default { data); } }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/inm/mioitem/${id}/`, + data); + } + }, delete: { name: "删除", req: async function(id){ diff --git a/src/views/inm/halfgood_mio.vue b/src/views/inm/halfgood_mio.vue index 13a9497b..81e8b250 100644 --- a/src/views/inm/halfgood_mio.vue +++ b/src/views/inm/halfgood_mio.vue @@ -1,177 +1,268 @@ \ No newline at end of file + diff --git a/src/views/inm/mainso_mio.vue b/src/views/inm/mainso_mio.vue index 46f1254c..251bc779 100644 --- a/src/views/inm/mainso_mio.vue +++ b/src/views/inm/mainso_mio.vue @@ -103,6 +103,14 @@ > 查看 + + 编辑 + { - this.$refs.saveDialog.open("edit", type).setData(row); + this.$refs.saveDialog.open("edit", row.type).setData(row); }); }, //查看 diff --git a/src/views/inm/mio_form.vue b/src/views/inm/mio_form.vue index 62a6d668..2b8d1fc1 100644 --- a/src/views/inm/mio_form.vue +++ b/src/views/inm/mio_form.vue @@ -248,9 +248,7 @@ export default { open(mode = "add", type = "") { this.mode = mode; this.form.type = type; - if (mode == "add") { - this.init(); - } + this.init(); this.visible = true; return this; },