From 7f2e86e2cc5549494981a9701e4b1907e2d4609e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Mon, 26 Sep 2022 10:53:59 +0800 Subject: [PATCH] =?UTF-8?q?app2.0=20=E5=90=8C=E6=AD=A5=E9=95=BF=E9=98=B3?= =?UTF-8?q?=E5=88=86=E6=94=AF=E5=A4=9A=E9=80=89=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/learun-app/organize-picker.vue | 35 +++- .../learun-app/organize-single-item.vue | 56 ++++++- .../components/learun-app/organize-tree.vue | 58 ++++++- .../LearunApp-2.2.0/pages.json | 6 + .../pages/common/select-organize-multiple.vue | 157 ++++++++++++++++++ 5 files changed, 294 insertions(+), 18 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/common/select-organize-multiple.vue 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..8c7f9fa70 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,17 @@ 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.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 }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-single-item.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-single-item.vue index f54e083f2..0b16a5c3d 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-single-item.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/organize-single-item.vue @@ -10,32 +10,80 @@ > - {{ item.name }} + {{ item.name + (item.mobile ? '(' +item.mobile + ')' : "") }} {{ tagName }} + + 复制 - 选择 + 选择 + 取消选择 + +