|
@@ -7,7 +7,12 @@ |
|
|
|
|
|
|
|
|
<!-- #ifndef MP-DINGTALK --> |
|
|
<!-- #ifndef MP-DINGTALK --> |
|
|
<l-label @click="click" :arrow="!readonly" :required="required" :title="title"> |
|
|
<l-label @click="click" :arrow="!readonly" :required="required" :title="title"> |
|
|
{{ display || displayPlaceholder }} |
|
|
|
|
|
|
|
|
<!-- {{ display || displayPlaceholder }} --> |
|
|
|
|
|
<view style="white-space: normal;min-height: 54px;display: flex;align-items: center;justify-content: right;"> |
|
|
|
|
|
<view style="line-height: 24px;"> |
|
|
|
|
|
{{ display || displayPlaceholder }} |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</l-label> |
|
|
</l-label> |
|
|
<!-- #endif --> |
|
|
<!-- #endif --> |
|
|
</template> |
|
|
</template> |
|
@@ -24,7 +29,8 @@ export default { |
|
|
placeholder: {}, |
|
|
placeholder: {}, |
|
|
readonly: {}, |
|
|
readonly: {}, |
|
|
rootId: {}, |
|
|
rootId: {}, |
|
|
rootType: {} |
|
|
|
|
|
|
|
|
rootType: {}, |
|
|
|
|
|
multiple: {} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
@@ -34,16 +40,18 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.ONCE('select-organize', data => { |
|
|
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 rootType = this.rootType || { user: 'department', department: 'company', company: 'company' }[this.type] |
|
|
const rootId = this.rootId |
|
|
const rootId = this.rootId |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let url_ = this.multiple?"select-organize-multiple":"select-organize" |
|
|
|
|
|
this.SET_PARAM(this.value) |
|
|
const url = rootId |
|
|
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) |
|
|
this.NAV_TO(url) |
|
|
} |
|
|
} |
|
@@ -54,8 +62,16 @@ export default { |
|
|
if (!this.value) { |
|
|
if (!this.value) { |
|
|
return this.placeholder |
|
|
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 |
|
|
return orgItem ? orgItem.name : this.placeholder |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|