From 8e1ef10d54c286a5e7ae53889089ed09a038bbda Mon Sep 17 00:00:00 2001 From: z_yu <1534695664@qq.com> Date: Fri, 20 May 2022 13:02:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=B8=E7=94=A8=E5=AD=97=E6=AE=B5=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E6=B7=BB=E5=8A=A0=E5=85=B3=E9=94=AE=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archivesConfig/commonFields/index.vue | 96 +++++++++++++------ 1 file changed, 65 insertions(+), 31 deletions(-) diff --git a/src/views/archivesConfig/commonFields/index.vue b/src/views/archivesConfig/commonFields/index.vue index f41a1c5..4898d3f 100644 --- a/src/views/archivesConfig/commonFields/index.vue +++ b/src/views/archivesConfig/commonFields/index.vue @@ -28,14 +28,18 @@ - + @@ -71,36 +75,58 @@ export default { permission: { add: ['admin', 'commonFields:add'], edit: ['admin', 'commonFields:edit'] - } + }, + verifyDialogVisible: false, + form: { + verifyCode: '' + }, + formLabelWidth: '110px' } }, methods: { + // 获取数据前设置好接口地址 + // [CRUD.HOOK.beforeToCU]() { + // const h = this.$createElement + // return this.$prompt(h('p', null, [ + // h('span', null, '这里为技术人员维护系统时使用,用户级无需设置。'), + // h('br', null, ''), + // h('span', { style: 'color: red' }, '警告:强行修改会导致系统数据异常或丢失!如因用户强行修改,本系统不负责因此导致的相关后果!') + // ]), '关键提示', { + // confirmButtonText: '确定验证', + // showCancelButton: false, + // customClass: 'validate', + // beforeClose: (action, instance, done) => { + // if (action === 'confirm') { + // if (instance.inputValue === '123') { + // done() + // } else { + // this.$message.error('验证码错误!') + // } + // } else { + // done() + // } + // } + // }).then(({ value }) => { + // // call crud.status.add = CRUD.STATUS.PREPARED + // }).catch(() => { + // return false + // }) + // }, // 获取数据前设置好接口地址 [CRUD.HOOK.beforeToCU]() { - const h = this.$createElement - return this.$prompt(h('p', null, [ - h('span', null, '这里为九州档案技术人员维护系统时使用,用户级无需设置。'), - h('br', null, ''), - h('span', { style: 'color: red' }, '警告:强行修改会导致系统数据异常或丢失!如因用户强行修改,本系统不负责因此导致的相关后果!') - ]), '关键提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - beforeClose: (action, instance, done) => { - if (action === 'confirm') { - if (instance.inputValue === '123') { - done() - } else { - this.$message.error('验证码错误!') - } - } else { - done() - } - } - }).then(({ value }) => { - // call crud.status.add = CRUD.STATUS.PREPARED - }).catch(() => { - return false - }) + this.verifyDialogVisible = true + }, + handleConfirm() { + if (this.form.verifyCode === '123') { + this.verifyDialogVisible = false + this.form.verifyCode = '' + } else { + this.$message.error('验证码错误!') + } + }, + handleClose(done) { + this.form.verifyCode = '' + done() }, clickRowHandler(row) { this.$refs.table.clearSelection() @@ -127,4 +153,12 @@ export default { ::v-deep thead .el-table-column--selection .cell { display: none; } +.validate .el-message-box__btns { + text-align: center; +} + +