From 3fb7918c2ed201fa67ad9ed4ab2a12073049a95b Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 15 Mar 2023 09:12:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=B7=BB=E5=8A=A0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=97=B6=E9=97=B4=E6=94=BE=E5=BC=80=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/opm.js | 8 +++++ src/views/opm/operation.vue | 2 +- src/views/opm/operation_form.vue | 41 ++++++++++++++------------ src/views/rpm/rpjadd.vue | 8 +++-- src/views/vm/visit_detial.vue | 50 ++++++++++++++------------------ src/views/vm/vistoradd.vue | 26 +++++++++++------ 6 files changed, 76 insertions(+), 59 deletions(-) diff --git a/src/api/model/opm.js b/src/api/model/opm.js index 3323f40b..7c55d908 100644 --- a/src/api/model/opm.js +++ b/src/api/model/opm.js @@ -70,6 +70,14 @@ export default { data); } }, + patch: { + name: "字段更新", + req: async function (id, data) { + return await http.patch( + `${config.API_URL}/opm/operation/${id}/`, + data); + } + }, create: { name: "创建", req: async function (data) { diff --git a/src/views/opm/operation.vue b/src/views/opm/operation.vue index ad5ecfba..50af5980 100644 --- a/src/views/opm/operation.vue +++ b/src/views/opm/operation.vue @@ -132,7 +132,7 @@ >查看 - + - - + - + - + - + - - - + v-model="form.coordinator_name" + disabled + style="width:220px" + > + @@ -138,9 +139,7 @@ - 保存 + 保存 取消 @@ -160,6 +159,8 @@ export default { edit: "编辑", show: "查看", }, + defaultTime_start:new Date(2000, 1, 1, 10, 0, 0), + defaultTime:new Date(2000, 1, 1, 18, 0, 0), form: {}, rules: { name: [{ required: true, message: "请输入作业简介" }], @@ -244,14 +245,18 @@ export default { res = await this.$API.opm.operation.create.req(this.form); this.form.id = res.id; } else if (this.mode == "edit") { - res = await this.$API.opm.operation.update.req( + + let form = {}; + form.vchannels = this.form.vchannels; + res = await this.$API.opm.operation.patch.req( this.form.id, - this.form + form ); } this.isSaveing = false; this.$emit("success", this.form, this.mode); this.visible = false; + console.log(res) this.$message.success("操作成功"); return res; } catch (err) { diff --git a/src/views/rpm/rpjadd.vue b/src/views/rpm/rpjadd.vue index 04f66765..39dfa107 100644 --- a/src/views/rpm/rpjadd.vue +++ b/src/views/rpm/rpjadd.vue @@ -58,7 +58,8 @@ @@ -67,7 +68,8 @@ @@ -426,6 +428,8 @@ export default { come_time: [{ required: true, message: "请选择" }], leave_time: [{ required: true, message: "请选择" }], }, + defaultTime_start:new Date(2000, 1, 1, 10, 0, 0), + defaultTime:new Date(2000, 1, 1, 18, 0, 0), }; }, mounted() { diff --git a/src/views/vm/visit_detial.vue b/src/views/vm/visit_detial.vue index 56f57e2d..bf30fbfb 100644 --- a/src/views/vm/visit_detial.vue +++ b/src/views/vm/visit_detial.vue @@ -5,41 +5,27 @@ - {{ - form.name - }} - {{ - levelOptions[form.level] - }} - {{ - form.company - }} + {{form.name}} + {{levelOptions[form.level]}} + {{form.company}} {{ form.count_people }}人 {{ item.visitor_.name }} - {{ - state_[form.state] - }} - {{ - form.visit_time - }} - {{ - form.leave_time - }} - {{ - purpose_[form.purpose] - }} - {{ - form.description - }} - - - {{ form.receptionist_.name }} - + {{state_[form.state]}} + {{form.visit_time}} + {{form.leave_time}} + {{purpose_[form.purpose]}} + {{form.description}} + {{ form.receptionist_.name }} +
+ 车辆照片: + +
@@ -97,6 +83,7 @@