mirror of https://github.com/veops/cmdb.git
Merge pull request #603 from veops/dev_ui_240826
fix(ui): define value filter error
This commit is contained in:
commit
ae77852d5f
|
@ -366,7 +366,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
choice_value: this.valueList.filter((item) => item?.[0]),
|
choice_value: this.valueList.filter((item) => !['', null, undefined].includes(item?.[0])),
|
||||||
choice_web_hook: null,
|
choice_web_hook: null,
|
||||||
choice_other: null
|
choice_other: null
|
||||||
}
|
}
|
||||||
|
@ -398,8 +398,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
validateDefine() {
|
validateDefine() {
|
||||||
const valueList = this.valueList.filter((item) => item?.[0])
|
const valueList = this.valueList.filter((item) => {
|
||||||
const isRepeat = _.uniq(valueList.map(item => item?.[0] || '')).length !== valueList.length
|
return !['', null, undefined].includes(item?.[0])
|
||||||
|
})
|
||||||
|
const isRepeat = _.uniq(valueList.map(item => item?.[0])).length !== valueList.length
|
||||||
if (isRepeat) {
|
if (isRepeat) {
|
||||||
this.$message.warning(this.$t('cmdb.ciType.enumValueTip2'))
|
this.$message.warning(this.$t('cmdb.ciType.enumValueTip2'))
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue