|
@@ -54,7 +54,7 @@
|
|
|
userIds (value) {
|
|
|
this.value = value
|
|
|
// 检查缺失item
|
|
|
- // this.checkItem(value)
|
|
|
+ this.checkItems(value)
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
@@ -103,12 +103,29 @@
|
|
|
this.current ++
|
|
|
this.getList()
|
|
|
},
|
|
|
- // checkItem (code) {
|
|
|
- // if (!code || !this.options) return
|
|
|
- // let i = this.options.findIndex(item => item.value === code)
|
|
|
- // if (i < 0) return
|
|
|
- // // todo
|
|
|
- // },
|
|
|
+ checkItem (code) {
|
|
|
+ if (!code || !this.options) return
|
|
|
+ let i = this.options.findIndex(item => item.value === code)
|
|
|
+ if (i > -1) return
|
|
|
+ // info
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl(`/user-service/user/info/${code}`),
|
|
|
+ method: 'get'
|
|
|
+ }).then(({data}) => {
|
|
|
+ if (data && data.code === '200' && data.data) {
|
|
|
+ this.options.push({
|
|
|
+ label: data.data.name + ' (' + data.data.orgName + ')',
|
|
|
+ value: data.data.userId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ checkItems (ids) {
|
|
|
+ if (!ids) return
|
|
|
+ ids.forEach(id => {
|
|
|
+ this.checkItem(id)
|
|
|
+ })
|
|
|
+ },
|
|
|
onChange (item) {
|
|
|
this.$emit('change', item)
|
|
|
},
|