From c194af8fab6f32e9fc50c139551d7bc2846642e2 Mon Sep 17 00:00:00 2001 From: liupengpeng <276665548@qq.com> Date: 星期五, 03 三月 2023 10:44:02 +0800 Subject: [PATCH] 提示信息 --- src/views/datamanage/dictionaryManage.vue | 12 +++ src/views/userManage/orgManage.vue | 22 +++++- src/views/userManage/templateManage.vue | 3 src/views/userManage/authorityManage.vue | 24 ++++++- src/views/maintenance/menuSettings.vue | 22 +++++- src/views/userManage/roleManage.vue | 33 +++++++++- src/views/datamanage/styleManage.vue | 40 ++++++++---- 7 files changed, 119 insertions(+), 37 deletions(-) diff --git a/src/views/datamanage/dictionaryManage.vue b/src/views/datamanage/dictionaryManage.vue index e02f60a..cb30a3f 100644 --- a/src/views/datamanage/dictionaryManage.vue +++ b/src/views/datamanage/dictionaryManage.vue @@ -427,7 +427,7 @@ <el-button type="info" size="small" - @click="dialogFormVisible = false" + @click="handleClose" >{{ $t("dataManage.dictionaryManageObj.cancel") }}</el-button> <el-button class="primary" @@ -442,6 +442,7 @@ :title="$t('dataManage.dictionaryManageObj.add')" top="2vh" :visible.sync="InsertFormdialog" + :before-close="handleCloseadd" > <div style="height: 500px; overflow: auto"> <el-form @@ -549,7 +550,7 @@ <el-button type="info" size="small" - @click="InsertFormdialog = false" + @click="handleCloseadd" >{{ $t("dataManage.dictionaryManageObj.cancel") }}</el-button> @@ -830,6 +831,13 @@ }) .catch((_) => { }); }, + handleCloseadd() { + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.InsertFormdialog = false + }) + .catch((_) => { }); + }, }, }; </script> diff --git a/src/views/datamanage/styleManage.vue b/src/views/datamanage/styleManage.vue index 5f0cd57..4003bf2 100644 --- a/src/views/datamanage/styleManage.vue +++ b/src/views/datamanage/styleManage.vue @@ -1304,19 +1304,27 @@ } }, insertFromDataClose() { - this.InsertFormdialog = false; - this.insertform = {}; - this.insertFileGuid = ""; - this.insertViewGuid = ""; - this.filesReset(); + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.InsertFormdialog = false; + this.insertform = {}; + this.insertFileGuid = ""; + this.insertViewGuid = ""; + this.filesReset(); + }) + .catch((_) => { }); }, handleClose() { - this.InsertFormdialog = false; - this.insertform = { - fileGuid: null, - viewGuid: null, - }; - this.filesReset(); + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.InsertFormdialog = false; + this.insertform = { + fileGuid: null, + viewGuid: null, + }; + this.filesReset(); + }) + .catch((_) => { }); }, async insertFromData() { if (this.insertform.dirid == null || this.insertform.depid == null) { @@ -1547,9 +1555,13 @@ }, removeUpdate() { - this.upflag = false; - this.dialogFormVisible = false; - this.upform = {}; + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.upflag = false; + this.dialogFormVisible = false; + this.upform = {}; + }) + .catch((_) => { }); // this.filesReset(); }, submitForm(formName) { diff --git a/src/views/maintenance/menuSettings.vue b/src/views/maintenance/menuSettings.vue index 005b9d5..81c0d2d 100644 --- a/src/views/maintenance/menuSettings.vue +++ b/src/views/maintenance/menuSettings.vue @@ -217,6 +217,7 @@ <el-dialog :title="$t('common.append')" :visible.sync="dialogFormVisible" + :before-close="handleClose" > <div style="height: 500px; overflow: auto"> <el-form @@ -603,11 +604,15 @@ this.ruleForm.level = data.level + 1; }, resetForm(formName) { - this.dialogFormVisible = false; - this.$nextTick(() => { - this.$refs[formName].resetFields(); - this.ruleForm = {}; - }); + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.dialogFormVisible = false; + this.$nextTick(() => { + this.$refs[formName].resetFields(); + this.ruleForm = {}; + }); + }) + .catch((_) => { }); }, submitForm(formName) { this.$nextTick(() => { @@ -859,6 +864,13 @@ } } }, + handleClose() { + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.dialogFormVisible = false + }) + .catch((_) => { }); + }, }, mounted() { this.getMenuTree(); diff --git a/src/views/userManage/authorityManage.vue b/src/views/userManage/authorityManage.vue index 9a9143f..17aa037 100644 --- a/src/views/userManage/authorityManage.vue +++ b/src/views/userManage/authorityManage.vue @@ -242,6 +242,7 @@ :title="$t('userManage.userInfoObj.addPermission')" style="overflow: hidden" :visible.sync="InsertFormdialog" + :before-close="handleClose" > <el-form :model="insertform" label-position="top"> @@ -489,8 +490,12 @@ this.getRoleTabelData(); }, EditFromDataClose() { - this.EditFormdialog = false; - this.upform = {}; + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.EditFormdialog = false; + this.upform = {}; + }) + .catch((_) => { }); }, async EditFromData() { const data = await updateAuth(this.upform); @@ -530,8 +535,12 @@ this.getRoleTabelData(); }, insertFromDataClose() { - this.InsertFormdialog = false; - this.insertform = {}; + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.InsertFormdialog = false; + this.insertform = {}; + }) + .catch((_) => { }); }, async insertFromData() { const data = await insertAuth(this.insertform); @@ -577,6 +586,13 @@ this.dialogTitle = row.name; this.isTransfer = true; }, + handleClose() { + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.InsertFormdialog = false + }) + .catch((_) => { }); + }, }, }; </script> diff --git a/src/views/userManage/orgManage.vue b/src/views/userManage/orgManage.vue index 0454a02..5fb7a6c 100644 --- a/src/views/userManage/orgManage.vue +++ b/src/views/userManage/orgManage.vue @@ -223,6 +223,7 @@ <el-dialog :title="$t('common.append')" :visible.sync="dialogFormVisible" + :before-close="handleClose" > <div style="height: 500px; overflow: auto"> <el-form @@ -588,11 +589,15 @@ // console.log(node); }, resetForm(formName) { - this.dialogFormVisible = false; - this.$nextTick(() => { - this.ruleForm = {}; - this.$refs[formName].resetFields(); - }); + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.dialogFormVisible = false; + this.$nextTick(() => { + this.ruleForm = {}; + this.$refs[formName].resetFields(); + }); + }) + .catch((_) => { }); }, submitForm(formName) { this.$refs[formName].validate((valid) => { @@ -850,6 +855,13 @@ } } }, + handleClose() { + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.dialogFormVisible = false + }) + .catch((_) => { }); + }, }, mounted() { this.getMenuTree(); diff --git a/src/views/userManage/roleManage.vue b/src/views/userManage/roleManage.vue index 4f7354c..7272266 100644 --- a/src/views/userManage/roleManage.vue +++ b/src/views/userManage/roleManage.vue @@ -274,7 +274,7 @@ <el-dialog :title="$t('userManage.RM.insertRole')" - + :before-close="handleClose" style="overflow: hidden" :visible.sync="InsertFormdialog" > @@ -385,6 +385,7 @@ <el-dialog :title="$t('userManage.RM.updateRole')" :visible.sync="UpdateFormdialog" + :before-close="handleCloseEdit" > <div style="height: 500px; overflow: auto"> <el-form :model="updateform" label-position="top"> @@ -793,8 +794,12 @@ }); }, insertFromClose() { - this.InsertFormdialog = false; - this.insertform = {}; + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.InsertFormdialog = false; + this.insertform = {}; + }) + .catch((_) => { }); }, async insertFromData() { if (this.insertform.depValue == null) { @@ -821,8 +826,12 @@ } }, updateFromClose() { - this.UpdateFormdialog = false; - this.updateform = {}; + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.UpdateFormdialog = false; + this.updateform = {}; + }) + .catch((_) => { }); }, async updateFromData() { if (this.updateform.depValue == null) { @@ -924,6 +933,20 @@ break; } }, + handleClose() { + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.InsertFormdialog = false + }) + .catch((_) => { }); + }, + handleCloseEdit() { + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?") + .then((_) => { + this.UpdateFormdialog = false + }) + .catch((_) => { }); + }, }, beforeDestroy() { this.timer && clearTimeout(this.timer); diff --git a/src/views/userManage/templateManage.vue b/src/views/userManage/templateManage.vue index a526b77..e513c3e 100644 --- a/src/views/userManage/templateManage.vue +++ b/src/views/userManage/templateManage.vue @@ -179,7 +179,6 @@ " :visible.sync="dialogVisible" :before-close="handleClose" - :show-close="false" > <div style="height: 500px; overflow: auto"> <el-form @@ -493,7 +492,7 @@ }; } - this.$confirm("纭鍏抽棴锛�", blackTheme) + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?", blackTheme) .then((_) => { this.closeInsertData(); }) -- Gitblit v1.9.3