From f8cb4519363640a36cf5c5818f7f647ad13b507f Mon Sep 17 00:00:00 2001 From: lyfO_o <764716047@qq.com> Date: 星期六, 02 四月 2022 10:29:24 +0800 Subject: [PATCH] Merge remote-tracking branch 'remotes/origin/shf' into master --- src/views/safetyproduction/feature.vue | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/views/safetyproduction/feature.vue b/src/views/safetyproduction/feature.vue index 8db69d8..06d47a3 100644 --- a/src/views/safetyproduction/feature.vue +++ b/src/views/safetyproduction/feature.vue @@ -74,6 +74,7 @@ <el-dialog :title="title" :visible.sync="dialogVisible" + :close-on-click-modal="false" width="40%" > <el-form ref="form" :rules="rules" :model="form" label-width="80px"> @@ -109,6 +110,7 @@ v-model="form.parentId" placeholder="请选择" style="width: 100%" + :disabled="title=='编辑'?true:false" > <el-option v-for="item in parent" @@ -139,7 +141,7 @@ <el-button type="primary" class="btns" @click="AddelementManagement()" >确 定</el-button > - <el-button @click="dialogVisible = false">取 消</el-button> + <el-button @click="cancel()">取 消</el-button> </span> </el-dialog> </div> @@ -208,7 +210,6 @@ methods: { async elementManagementL() { var res = await elementManagementList(this.listQuery); - console.log(res); if (res.data.code == 200) { this.list = res.data.result.records; this.recordTotal = res.data.result.total @@ -222,7 +223,6 @@ this.$refs["form"].clearValidate(); }); getParentElement().then(res=>{ - // console.log('父类:',res) this.parent=res.data.result }) if (type == "新增") { @@ -318,12 +318,22 @@ type: "success", duration: 2000, }); + }else { + this.$message({ + type: "warning", + // message: res.data.message, + message: "当前A级要素仍然有已绑定的B级要素,无法删除" + }); } }); }) .catch(error =>{ }); }, + cancel(){ + this.elementManagementL(); + this.dialogVisible = false; + }, find(){ this.elementManagementL(); }, -- Gitblit v1.9.2