[update] 修改bug81779

This commit is contained in:
lideqin
2024-02-05 12:03:26 +08:00
parent 78ce51e9cb
commit 213828de68
5 changed files with 49 additions and 2 deletions
+1
View File
@@ -187,6 +187,7 @@ module.exports = {
pleaseSelectDate: '请选择日期',
noFileAvailableForPreview: '暂无可预览的文件',
enterpriseStandard: '企业标准',
pleaseAtLeastSelectOneUser: '请至少选择一个用户',
// 树右键
treeRight: {
addFolder: '新增文件夹',
@@ -73,6 +73,12 @@ export default {
default: () => {
return ''
}
},
// 是否校验必选
checkRequired: {
type: Boolean,
required: false,
default: true
}
},
watch: {
@@ -254,6 +260,14 @@ export default {
this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.contactId)
},
handleOk () {
if (this.checkRequired && (!this.selectedRowKeys || this.selectedRowKeys.length === 0)) {
if (this.type === 'radio') {
this.$message.warning(this.$t('docTool.split.pleaseSelectUser'))
} else {
this.$message.warning(this.$t('pleaseAtLeastSelectOneUser'))
}
return
}
this.$emit('nameChange', this.dataSourceRight.map(item => item.contactId_dictText).join(','))
this.$emit('change', this.selectedRowKeys.join(','))
this.$emit('listChange', this.dataSourceRight)
@@ -80,6 +80,12 @@ export default {
default: () => {
return []
}
},
// 是否校验必选
checkRequired: {
type: Boolean,
required: false,
default: true
}
},
// computed: {
@@ -278,6 +284,14 @@ export default {
this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.id)
},
handleOk () {
if (this.checkRequired && (!this.selectedRowKeys || this.selectedRowKeys.length === 0)) {
if (this.type === 'radio') {
this.$message.warning(this.$t('docTool.split.pleaseSelectUser'))
} else {
this.$message.warning(this.$t('pleaseAtLeastSelectOneUser'))
}
return
}
this.$emit('nameChange', this.dataSourceRight.map(item => item.contactId_dictText).join(','))
this.$emit('change', this.selectedRowKeys.join(','))
this.$emit('listChange', this.dataSourceRight)
@@ -126,6 +126,12 @@ export default {
default: () => {
return ''
}
},
// 是否校验必选
checkRequired: {
type: Boolean,
required: false,
default: true
}
},
watch: {
@@ -346,6 +352,14 @@ export default {
this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.userId)
},
handleOk () {
if (this.checkRequired && (!this.selectedRowKeys || this.selectedRowKeys.length === 0)) {
if (this.type === 'radio') {
this.$message.warning(this.$t('docTool.split.pleaseSelectUser'))
} else {
this.$message.warning(this.$t('pleaseAtLeastSelectOneUser'))
}
return
}
this.$emit('change', this.selectedRowKeys.join(','))
this.$emit('nameChange', this.dataSourceRight.map(item => item.realname + '(' + item.username + ')').join(','))
this.close()
+6 -2
View File
@@ -106,7 +106,7 @@ export default {
checkRequired: {
type: Boolean,
required: false,
default: false
default: true
}
},
watch: {
@@ -305,7 +305,11 @@ export default {
},
handleOk () {
if (this.checkRequired && (!this.selectedRowKeys || this.selectedRowKeys.length === 0)) {
this.$message.warning(this.$t('docTool.split.pleaseSelectUser'))
if (this.type === 'radio') {
this.$message.warning(this.$t('docTool.split.pleaseSelectUser'))
} else {
this.$message.warning(this.$t('pleaseAtLeastSelectOneUser'))
}
return
}
this.$emit('nameChange', this.dataSourceRight.map(item => item.realname + '(' + item.username + ')').join(','))