From 9bd55a0ab09ea44c67f9c7a6e00fcf84f3fab0f9 Mon Sep 17 00:00:00 2001 From: ks3356143 <314298729@qq.com> Date: Thu, 24 Aug 2023 19:24:00 +0800 Subject: [PATCH] 8.000 --- .../components/ma-crud/components/form.vue | 15 +++++++-- cdTMP/src/components/ma-crud/index.vue | 2 +- cdTMP/src/views/project/case/index.vue | 32 ++++++++++++++++++- .../src/views/project/design-demand/index.vue | 25 ++++++++++++--- cdTMP/src/views/project/dut/index.vue | 17 +++++++++- cdTMP/src/views/project/round/index.vue | 8 +++++ cdTMP/src/views/project/testDemand/index.vue | 30 +++++++++++++++-- .../src/views/testmanage/projmanage/index.vue | 15 +++++++-- 8 files changed, 129 insertions(+), 15 deletions(-) diff --git a/cdTMP/src/components/ma-crud/components/form.vue b/cdTMP/src/components/ma-crud/components/form.vue index 3f7ca00..9420783 100644 --- a/cdTMP/src/components/ma-crud/components/form.vue +++ b/cdTMP/src/components/ma-crud/components/form.vue @@ -148,13 +148,22 @@ const close = () => { form.value = {} } const add = () => { - actionTitle.value = "新增" + if (!actionTitle.value) { + actionTitle.value = "新增" + } else { + actionTitle.value += "新增" + } currentAction.value = "add" form.value = {} open() } const edit = (data) => { - actionTitle.value = "编辑" + if (!actionTitle.value) { + actionTitle.value = "编辑" + } else { + actionTitle.value += "编辑" + } + currentAction.value = "edit" form.value = {} for (let i in data) form.value[i] = data[i] @@ -357,5 +366,5 @@ const getFormColumns = async (type = "add") => { await init() return formColumns.value } -defineExpose({ add, edit, currentAction, form, getFormColumns }) +defineExpose({ add, edit, currentAction, form, getFormColumns, actionTitle }) diff --git a/cdTMP/src/components/ma-crud/index.vue b/cdTMP/src/components/ma-crud/index.vue index e2717c8..ae2e00c 100644 --- a/cdTMP/src/components/ma-crud/index.vue +++ b/cdTMP/src/components/ma-crud/index.vue @@ -31,7 +31,7 @@