|
@@ -103,6 +103,7 @@
|
|
|
selectedRowKeys: [],
|
|
|
selectUserRows: [],
|
|
|
selectUserIds: [],
|
|
|
+ beginUsers: [],
|
|
|
title: '根据部门选择用户',
|
|
|
ipagination: {
|
|
|
current: 1,
|
|
@@ -149,34 +150,51 @@
|
|
|
},
|
|
|
methods: {
|
|
|
initUserNames() {
|
|
|
- if (this.userIds) {
|
|
|
- // 这里最后加一个 , 的原因是因为无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确
|
|
|
- let values = this.userIds.split(',') + ','
|
|
|
- var param = {
|
|
|
- // username: values,
|
|
|
- pageNo: 1,
|
|
|
- pageSize: values.length
|
|
|
- }
|
|
|
- param[this.customReturnField] = values;
|
|
|
- console.log("回显用户参数",param)
|
|
|
- getAction('/sys/user/listBy', {}).then((res) => {
|
|
|
- // getUserList(param).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- let selectedRowKeys = []
|
|
|
- let realNames = []
|
|
|
- res.result.records.forEach(user => {
|
|
|
- realNames.push(user['realname'])
|
|
|
- selectedRowKeys.push(user['id'])
|
|
|
+ if(this.beginUsers != null && this.beginUsers != []){
|
|
|
+ getAction('/sys/user/listBy', {beginUsers:this.beginUsers.toString()}).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ let selectedRowKeys = []
|
|
|
+ let realNames = []
|
|
|
+ res.result.records.forEach(user => {
|
|
|
+ realNames.push(user['realname'])
|
|
|
+ selectedRowKeys.push(user['id'])
|
|
|
+ })
|
|
|
+ this.selectedRowKeys = selectedRowKeys
|
|
|
+ console.log("回显用户",selectedRowKeys)
|
|
|
+ this.$emit('initComp', realNames.join(','))
|
|
|
+ }
|
|
|
})
|
|
|
- this.selectedRowKeys = selectedRowKeys
|
|
|
- console.log("回显用户",selectedRowKeys)
|
|
|
- this.$emit('initComp', realNames.join(','))
|
|
|
}
|
|
|
- })
|
|
|
- } else {
|
|
|
- // JSelectUserByDep组件bug issues/I16634
|
|
|
- this.$emit('initComp', '')
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+ // if (this.userIds) {
|
|
|
+ // // 这里最后加一个 , 的原因是因为无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确
|
|
|
+ // let values = this.userIds.split(',') + ','
|
|
|
+ // var param = {
|
|
|
+ // // username: values,
|
|
|
+ // pageNo: 1,
|
|
|
+ // pageSize: values.length
|
|
|
+ // }
|
|
|
+ // param[this.customReturnField] = values;
|
|
|
+ // console.log("回显用户参数",param)
|
|
|
+ // getAction('/sys/user/listBy', {}).then((res) => {
|
|
|
+ // // getUserList(param).then((res) => {
|
|
|
+ // if (res.success) {
|
|
|
+ // let selectedRowKeys = []
|
|
|
+ // let realNames = []
|
|
|
+ // res.result.records.forEach(user => {
|
|
|
+ // realNames.push(user['realname'])
|
|
|
+ // selectedRowKeys.push(user['id'])
|
|
|
+ // })
|
|
|
+ // this.selectedRowKeys = selectedRowKeys
|
|
|
+ // console.log("回显用户",selectedRowKeys)
|
|
|
+ // this.$emit('initComp', realNames.join(','))
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // // JSelectUserByDep组件bug issues/I16634
|
|
|
+ // this.$emit('initComp', '')
|
|
|
+ // }
|
|
|
},
|
|
|
async loadData(arg) {
|
|
|
if (arg === 1) {
|
|
@@ -210,7 +228,8 @@
|
|
|
this.scrollTrigger = {};
|
|
|
}
|
|
|
},
|
|
|
- showModal() {
|
|
|
+ showModal(user) {
|
|
|
+ this.beginUsers = user;
|
|
|
this.visible = true;
|
|
|
this.queryDepartTree();
|
|
|
this.initUserNames()
|