修改禅道已知bug

This commit is contained in:
sunFlower
2022-10-10 17:06:57 +08:00
parent e213f55f34
commit dafff274e1
3 changed files with 12 additions and 11 deletions
@@ -316,6 +316,10 @@
},
handleSubmit() {
// if (this.userIds && this.userIds.length > 0) {
if (this.userIds.length > 100 && this.selectDepartment) {
this.$message.warning(this.$t('OnlyPersonsCanBeSelected'))
return
}
if (this.isSingleChoice) {
if (this.userIds.length > 1) {
this.$message.warning(this.$t('onlyOnePersonCanBeSelected'))
@@ -324,16 +328,12 @@
}
let userIds = JSON.parse(JSON.stringify(this.userIds))
let userName = JSON.parse(JSON.stringify(this.userName))
userName = userName.filter(function(item, index) {
return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个
})
userIds = userIds.filter(function(item, index) {
return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个
})
if (userIds.length > 100 && this.selectDepartment) {
this.$message.warning(this.$t('OnlyPersonsCanBeSelected'))
return
}
// userName = userName.filter(function(item, index) {
// return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个
// })
// userIds = userIds.filter(function(item, index) {
// return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个
// })
this.$emit('input', userName.join(','))
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
this.visible = false