This commit is contained in:
2023-12-04 15:48:19 +08:00
parent 5f73de6b35
commit 6acd69004c
6 changed files with 41 additions and 18 deletions

View File

@@ -232,7 +232,8 @@ export default {
async _sysRoleAdd () {
this.$refs.child.disabled = true
if (!this.rolename) {
this.toast('角色名称不能为空')
// this.toast('角色名称不能为空')
this.toast(this.$t('role.toast1'))
this.$refs.child.disabled = false
return
}
@@ -252,7 +253,8 @@ export default {
async _sysRoleEdit () {
this.$refs.child.disabled = true
if (!this.rolename) {
this.toast('角色名称不能为空')
// this.toast('角色名称不能为空')
this.toast(this.$t('role.toast1'))
this.$refs.child.disabled = false
return
}

View File

@@ -221,17 +221,20 @@ export default {
async _paramAdd () {
this.$refs.child.disabled = true
if (!this.code) {
this.toast('编码不能为空')
// this.toast('编码不能为空')
this.toast(this.$t('system.toast1'))
this.$refs.child.disabled = false
return
}
if (!this.name) {
this.toast('名字不能为空')
// this.toast('名字不能为空')
this.toast(this.$t('system.toast2'))
this.$refs.child.disabled = false
return
}
if (!this.value) {
this.toast('数值不能为空')
// this.toast('数值不能为空')
this.toast(this.$t('system.toast3'))
this.$refs.child.disabled = false
return
}
@@ -251,17 +254,20 @@ export default {
async _paramEdit () {
this.$refs.child.disabled = true
if (!this.code) {
this.toast('编码不能为空')
// this.toast('编码不能为空')
this.toast(this.$t('system.toast1'))
this.$refs.child.disabled = false
return
}
if (!this.name) {
this.toast('名字不能为空')
// this.toast('名字不能为空')
this.toast(this.$t('system.toast2'))
this.$refs.child.disabled = false
return
}
if (!this.value) {
this.toast('数值不能为空')
// this.toast('数值不能为空')
this.toast(this.$t('system.toast3'))
this.$refs.child.disabled = false
return
}

View File

@@ -288,12 +288,14 @@ export default {
async _usersAdd () {
this.$refs.child.disabled = true
if (!this.username) {
this.toast('用户名不能为空')
// this.toast('用户名不能为空')
this.toast(this.$t('user.toast1'))
this.$refs.child.disabled = false
return
}
if (!this.password) {
this.toast('密码不能为空')
// this.toast('密码不能为空')
this.toast(this.$t('user.toast2'))
this.$refs.child.disabled = false
return
}
@@ -319,7 +321,8 @@ export default {
async _usersEdit () {
this.$refs.child.disabled = true
if (!this.username) {
this.toast('用户名不能为空')
// this.toast('用户名不能为空')
this.toast(this.$t('user.toast1'))
this.$refs.child.disabled = false
return
}

View File

@@ -123,7 +123,7 @@ export default {
return {
interTime: this.$store.getters.setTime,
timer: null,
show: true,
show: false,
result: [],
obj: {},
status: {},