diff --git a/src/components/jero/JModal/index.vue b/src/components/jero/JModal/index.vue index 7c6322e..6854e4e 100644 --- a/src/components/jero/JModal/index.vue +++ b/src/components/jero/JModal/index.vue @@ -107,6 +107,7 @@ return Object.keys(this.$slots).filter(key => !this.usedSlots.includes(key)) }, scopedSlotsKeys() { + console.log(this.$scopedSlots,'-----------------------------------') return Object.keys(this.$scopedSlots).filter(key => !this.usedSlots.includes(key)) }, allSlotsKeys() { @@ -225,4 +226,4 @@ max-width: 100vw; } } - \ No newline at end of file + diff --git a/src/views/system/DepartList.vue b/src/views/system/DepartList.vue index 8187adf..659dccf 100644 --- a/src/views/system/DepartList.vue +++ b/src/views/system/DepartList.vue @@ -145,7 +145,7 @@
重置 - 保存 + 保存
@@ -240,6 +240,8 @@ export default { depart: {}, columns: columns, disableSubmit: false, + // 编辑提交按钮的状态 + disabledStatus:false, checkedKeys: [], selectedKeys: [], autoIncr: 1, @@ -482,6 +484,7 @@ export default { this.currSelected.receiptTriggerType = value }, submitCurrForm() { + this.disabledStatus = true this.form.validateFields((err, values) => { if (!err) { if (!this.currSelected.id) { @@ -497,8 +500,13 @@ export default { this.loadTree() } else { this.$message.error(res.message) + this.disabledStatus = false } + }).finally( () => { + this.disabledStatus = false }) + }else { + this.disabledStatus = false } }) }, diff --git a/src/views/system/modules/DepartModal.vue b/src/views/system/modules/DepartModal.vue index 0097d73..31b577f 100644 --- a/src/views/system/modules/DepartModal.vue +++ b/src/views/system/modules/DepartModal.vue @@ -82,9 +82,12 @@ label="备注"> - + @@ -183,10 +186,10 @@ export default { }, handleOk() { const that = this; + that.confirmLoading = true; // 触发表单验证 this.form.validateFields((err, values) => { if (!err) { - that.confirmLoading = true; let formData = Object.assign(this.model, values); //时间格式化 console.log(formData); @@ -195,14 +198,17 @@ export default { that.$message.success(res.message); that.loadTreeData(); that.$emit("ok"); + that.close(); } else { that.$message.warning(res.message); } }).finally(() => { that.confirmLoading = false; - that.close(); + }); + }else { + that.confirmLoading = false; } }); }, diff --git a/src/views/system/modules/DeptUserInfo.vue b/src/views/system/modules/DeptUserInfo.vue index 425dedd..52b7a1b 100644 --- a/src/views/system/modules/DeptUserInfo.vue +++ b/src/views/system/modules/DeptUserInfo.vue @@ -303,6 +303,7 @@ export default { } }, selectOK(data) { + if(data.length === 0) return let params = {}; params.depId = this.currentDeptId; params.userIdList = []; diff --git a/src/views/system/modules/PermissionDataRuleModal.vue b/src/views/system/modules/PermissionDataRuleModal.vue index 05a8c2c..138001f 100644 --- a/src/views/system/modules/PermissionDataRuleModal.vue +++ b/src/views/system/modules/PermissionDataRuleModal.vue @@ -15,26 +15,26 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" label="规则名称"> - + - + - + - + { if (!err) { - that.confirmLoading = true + let httpurl = '' let method = '' if (!this.model.id) { @@ -140,13 +141,15 @@ if (res.success) { that.$message.success(res.message) that.$emit('ok') + that.close() } else { that.$message.warning(res.message) } }).finally(() => { that.confirmLoading = false - that.close() }) + }else { + that.confirmLoading = false } }) }, @@ -176,4 +179,4 @@ \ No newline at end of file + diff --git a/src/views/system/modules/PermissionModal.vue b/src/views/system/modules/PermissionModal.vue index 56cb717..e4ae52e 100644 --- a/src/views/system/modules/PermissionModal.vue +++ b/src/views/system/modules/PermissionModal.vue @@ -163,11 +163,11 @@ - + 关闭 - 确定 + 确定 @@ -220,10 +220,10 @@ computed:{ validatorRules:function() { return { - name:{rules: [{ required: true, message: '请输入菜单标题!' }]}, - component:{rules: [{ required: this.show, message: '请输入前端组件!' }]}, - url:{rules: [{ required: this.show, message: '请输入菜单路径!' }]}, - permsType:{rules: [{ required: true, message: '请输入授权策略!' }]}, + name:{rules: [{ required: true, message: '请输入菜单标题!' }],validateTrigger: 'blur' }, + component:{rules: [{ required: this.show, message: '请输入前端组件!' }],validateTrigger: 'blur' }, + url:{rules: [{ required: this.show, message: '请输入菜单路径!' }],validateTrigger: 'blur' }, + permsType:{rules: [{ required: true, message: '请输入授权策略!' }],validateTrigger: 'blur' }, sortNo:{initialValue:1.0}, } } @@ -302,6 +302,7 @@ }, handleOk () { const that = this; + this.confirmLoading = true // 触发表单验证 this.form.validateFields((err, values) => { if (!err) { @@ -316,12 +317,12 @@ let formData = Object.assign(this.model, values); if ((formData.menuType == 1 || formData.menuType == 2) && !formData.parentId) { that.validateStatus = 'error'; - that.$message.error("请检查你填的类型以及信息是否正确!"); + that.$message.warn("请检查你填的类型以及信息是否正确!"); + that.confirmLoading = false; return; } else { that.validateStatus = 'success'; } - that.confirmLoading = true; let obj; if (!this.model.id) { obj = addPermission(formData); @@ -339,6 +340,8 @@ }).finally(() => { that.confirmLoading = false; }); + }else { + this.confirmLoading = false } }) }, @@ -373,6 +376,7 @@ } }, onChangeMenuType(e) { + this.form.resetFields() this.localMenuType=e.target.value if(e.target.value == 2){ this.show = false; diff --git a/src/views/system/modules/QuartzJobModal.vue b/src/views/system/modules/QuartzJobModal.vue index c6819b4..7184ce9 100644 --- a/src/views/system/modules/QuartzJobModal.vue +++ b/src/views/system/modules/QuartzJobModal.vue @@ -51,6 +51,10 @@ + @@ -121,6 +125,7 @@ }, handleOk () { const that = this; + that.confirmLoading = true; // 触发表单验证 this.form.validateFields((err, values) => { console.log('values',values) @@ -129,8 +134,6 @@ this.$message.warning('请输入cron表达式!'); return false; } - - that.confirmLoading = true; let httpurl = ''; let method = ''; if(!this.model.id){ @@ -156,6 +159,8 @@ that.confirmLoading = false; }) + }else { + that.confirmLoading = false } }) }, diff --git a/src/views/system/modules/RoleModal.vue b/src/views/system/modules/RoleModal.vue index a4a328e..c661761 100644 --- a/src/views/system/modules/RoleModal.vue +++ b/src/views/system/modules/RoleModal.vue @@ -17,25 +17,29 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" label="角色名称"> - + - + - + + @@ -66,7 +70,7 @@ roleName:{ rules: [ { required: true, message: '请输入角色名称!' }, - { min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' } + { min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' } ], validateTrigger: 'blur' }, @@ -111,11 +115,11 @@ this.visible = false; }, handleOk () { + this.confirmLoading =true const that = this; // 触发表单验证 this.form.validateFields((err, values) => { if (!err) { - that.confirmLoading = true; values.roleName = (values.roleName || '').trim() values.roleCode = (values.roleCode || '').trim() let formData = Object.assign(this.model, values); @@ -137,6 +141,8 @@ }).finally(() => { that.confirmLoading = false; }) + }else { + this.confirmLoading =false } }) }, diff --git a/src/views/system/modules/SelectUserModal.vue b/src/views/system/modules/SelectUserModal.vue index ca8a8f3..6ae6391 100644 --- a/src/views/system/modules/SelectUserModal.vue +++ b/src/views/system/modules/SelectUserModal.vue @@ -52,7 +52,10 @@ - + @@ -77,6 +80,7 @@ queryParam: {}, // 记录上次查询条件 lastQueryParam:{}, + disabledStatus:false, // 表头 columns1: [ { @@ -169,9 +173,11 @@ this.visible = false; }, handleOk() { + this.disabledStatus =true this.dataSource2 = this.selectedRowKeys; console.log("data:" + this.dataSource2); this.$emit("selectFinished", this.dataSource2); + this.disabledStatus =false this.visible = false; }, add() { diff --git a/src/views/system/modules/SysConfusionForm.vue b/src/views/system/modules/SysConfusionForm.vue index 66edb32..d9822a3 100644 --- a/src/views/system/modules/SysConfusionForm.vue +++ b/src/views/system/modules/SysConfusionForm.vue @@ -167,10 +167,11 @@ export default { }, submitForm() { const that = this; + this.confirmLoading = true + this.$emit('disableFalse',true) // 触发表单验证 this.form.validateFields((err, values) => { if (!err) { - that.confirmLoading = true; let httpurl = ''; let method = ''; if (!this.model.id) { @@ -191,7 +192,11 @@ export default { } }).finally(() => { that.confirmLoading = false; + this.$emit('disableFalse',false) }) + }else { + this.confirmLoading = false + this.$emit('disableFalse',false) } }) diff --git a/src/views/system/modules/SysConfusionModal.vue b/src/views/system/modules/SysConfusionModal.vue index aaa7655..4966f6c 100644 --- a/src/views/system/modules/SysConfusionModal.vue +++ b/src/views/system/modules/SysConfusionModal.vue @@ -8,7 +8,11 @@ :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @cancel="handleCancel" cancelText="关闭"> - + + @@ -26,7 +30,8 @@ export default { title: '', width: 800, visible: false, - disableSubmit: false + disableSubmit: false, + disabledStatus:false } }, methods: { @@ -55,6 +60,12 @@ export default { }, handleCancel() { this.close() + }, + /* + * 改变状态 + * */ + setSubmitFalse(val) { + this.disabledStatus = val } } } diff --git a/src/views/system/modules/UserModal.vue b/src/views/system/modules/UserModal.vue index 4c49c2f..df5f748 100644 --- a/src/views/system/modules/UserModal.vue +++ b/src/views/system/modules/UserModal.vue @@ -126,7 +126,7 @@ 取消 - 提交 + 提交 @@ -402,10 +402,10 @@ export default { handleSubmit() { console.log("username",this.form.getFieldValue('username')) const that = this; + that.confirmLoading = true; // 触发表单验证 this.form.validateFields((err, values) => { if (!err) { - that.confirmLoading = true; let formData = Object.assign(this.model, values); if (that.fileList != '') { formData.avatar = that.fileList; @@ -453,6 +453,8 @@ export default { that.userDepartModel.departIdList = {userId: '', departIdList: []}; }) + }else { + that.confirmLoading = false; } }) },