From b3b1fc54b219901445659dd342c61e11b5e25eb5 Mon Sep 17 00:00:00 2001 From: shj <1790240199@qq.com> Date: 星期四, 18 八月 2022 15:18:19 +0800 Subject: [PATCH] 对接 --- src/components/DailogClass/index.vue | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/DailogClass/index.vue b/src/components/DailogClass/index.vue index ceb2de2..f629089 100644 --- a/src/components/DailogClass/index.vue +++ b/src/components/DailogClass/index.vue @@ -1,5 +1,5 @@ <template> - <el-dialog v-model="dialogVisible" @close="resetForm(ruleFormRef)" :fullscreen="full" title="目标分解" width="30%" draggable> + <el-dialog v-model="dialogVisible" @close="resetForm(ruleFormRef)" :fullscreen="full" :title="titles" width="30%" draggable> <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> <el-form :model="form" ref="ruleFormRef" :rules="rules" :disabled="disabled" label-width="120px"> <el-row> @@ -44,9 +44,11 @@ const targetType = ref(); const disabled = ref(false); const titles = ref(); + const titleT=ref() const openDailog = (title: string, type: any, id: number) => { dialogVisible.value = true; - titles.value = title; + titles.value = `${title}目标分解`; + titleT.value=title targetType.value = type; disabled.value = title == '查看' ? true : false; if (title == '查看' || title == '修改') { @@ -81,6 +83,9 @@ if (!formEl) return; await formEl.validate((valid, fields) => { if (valid) { + if(titleT.value=='新建'){ + delete form.value.id + } dialogVisible.value = false; goalManagementApi() .gettargetClassAdd(form.value) @@ -117,6 +122,7 @@ return { timeDate, ruleFormRef, + titleT, rules, submitForm, resetForm, -- Gitblit v1.9.2