diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue index 97403aaa4..8f9af647f 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-picker.vue @@ -7,7 +7,12 @@ - {{ display || displayPlaceholder }} + + + + {{ display || displayPlaceholder }} + + @@ -24,7 +29,8 @@ export default { placeholder: {}, readonly: {}, rootId: {}, - rootType: {} + rootType: {}, + multiple: {} }, methods: { @@ -34,16 +40,18 @@ export default { } this.ONCE('select-organize', data => { - this.$emit('input', data.id) - this.$emit('change', data.id) + this.$emit('input', data.id||data.map(t=>t.id).toString()) + this.$emit('change', data.id||data.map(t=>t.id).toString()) }) const rootType = this.rootType || { user: 'department', department: 'company', company: 'company' }[this.type] const rootId = this.rootId - + + let url_ = this.multiple?"select-organize-multiple":"select-organize" + this.SET_PARAM(this.value) const url = rootId - ? `/pages/common/select-organize?type=${this.type}&rootId=${rootId}&rootType=${rootType}` - : `/pages/common/select-organize?type=${this.type}` + ? `/pages/common/${url_}?type=${this.type}&rootId=${rootId}&rootType=${rootType}` + : `/pages/common/${url_}?type=${this.type}` this.NAV_TO(url) } @@ -54,8 +62,16 @@ export default { if (!this.value) { return this.placeholder } - const orgItem = this.GET_GLOBAL(this.type)[this.value] - + + const list = this.GET_GLOBAL(this.type) + let values = this.value instanceof Array?this.value:this.value.split(",") + if(values.length>1){ + const orgItems = values.map(t=>list[t]?list[t].name:'').toString() + return orgItems + } + + const orgItem = list[this.value] + return orgItem ? orgItem.name : this.placeholder },