Commit 049502f0 authored by jingnan's avatar jingnan 👀

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents b13de661 8bb8e79c
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -21,13 +21,6 @@ export default {
// name: 'el-switch'
// }
// },
{
key: 'isFilterByOrgId',
title: '根据组织过滤',
component: {
name: 'el-switch'
}
},
{
key: 'containInnerUse',
title: '是否包含内置用户',
......
......@@ -9,9 +9,10 @@
v-model="bindValue"
size="small"
filterable
:multiple="item.multiple"
:multiple="isMultiple"
remote
:remote-method="remoteMethod"
:loading="loading"
@change="UserChange"
>
<el-option
......@@ -53,11 +54,16 @@ export default {
data() {
return {
bindValue: '',
UserData: []
UserData: [],
loading: false
// secretCode: ''
}
},
computed: {},
computed: {
isMultiple() {
return this.item.multiple || this.$utils._get(this.item, 'component.multiple') || false
}
},
watch: {
// 'item.secret': {
// deep: true,
......@@ -84,7 +90,11 @@ export default {
deep: true,
handler: function(val) {
if (val !== this.bindValue) {
this.bindValue = val
if (!val || (this.$utils.isObect(val) && (Object.keys(val).length === 0))) {
this.bindValue = ''
} else {
this.bindValue = val
}
if (val || val === 0) {
let searchArray = []
if (this.$utils.isObect(val)) {
......@@ -126,21 +136,29 @@ export default {
if (query) {
// 针对审计页面查人
if (this.item.isAudPage) {
getFuzzyMatchUser(query).then(res => {
this.UserData = res.items ? res.items : []
})
this.loading = true
getFuzzyMatchUser(query)
.then(res => {
this.UserData = res.items ? res.items : []
})
.finally(() => {
this.loading = false
})
} else {
// 针对非审计页面查人
const params = { userAccount: query, containInnerUser: this.item.containInnerUse || false }
if (this.item.secret) {
params.secretCode = this.$store.state.user.userInfo.secretCode
}
getUsersByAccount(params).then(res => {
this.UserData = res.items ? res.items : []
})
this.loading = true
getUsersByAccount(params)
.then(res => {
this.UserData = res.items ? res.items : []
})
.finally(() => {
this.loading = false
})
}
} else {
this.UserData = []
}
},
UserChange(val) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment