This commit is contained in:
yanran200730
2022-01-19 16:38:16 +08:00
parent 7a8c1e51ed
commit 9bcbd390dd
2 changed files with 8 additions and 3 deletions

View File

@@ -109,12 +109,13 @@ export default {
...mapActions(['selectPrivilegedContact']), ...mapActions(['selectPrivilegedContact']),
handleSelectUser() { handleSelectUser() {
console.log(this.form.ticket) console.log(this.form.ticket)
console.log(this.form.persons)
if (this.clickedUserSelect) return this.$u.toast("正在打开人员选择器") if (this.clickedUserSelect) return this.$u.toast("正在打开人员选择器")
this.clickedUserSelect = true this.clickedUserSelect = true
this.selectPrivilegedContact({ this.selectPrivilegedContact({
fromDepartmentId: 0, fromDepartmentId: 0,
selectedTickets: this.form.ticket ? [this.form.ticket] : [], selectedTickets: this.form.ticket ? [this.form.ticket] : [],
selectedOpenUserIds: this.form.persons?.map(e => e.id) selectedOpenUserIds: this.form.persons ? this.form.persons.map(e => e.id) : []
}).then(res => { }).then(res => {
console.log('ticket-----') console.log('ticket-----')
console.log(res.selectedTicket) console.log(res.selectedTicket)
@@ -124,7 +125,9 @@ export default {
this.form.ticket = res.selectedTicket this.form.ticket = res.selectedTicket
this.selectedUserCount = res.selectedUserCount this.selectedUserCount = res.selectedUserCount
this.clickedUserSelect = false this.clickedUserSelect = false
}).catch(() => { }).catch(e => {
console.log('错误信息')
console.log(e)
this.clickedUserSelect = false this.clickedUserSelect = false
}) })
}, },

View File

@@ -330,7 +330,7 @@ const store = new Vuex.Store({
}) })
}, },
selectEnterpriseContact(state, params) { selectEnterpriseContact(state, params) {
return new Promise(resolve => { return new Promise((resolve, reject) => {
state.dispatch("injectJWeixin", "selectEnterpriseContact").then(() => { state.dispatch("injectJWeixin", "selectEnterpriseContact").then(() => {
setTimeout(() => { setTimeout(() => {
let sdk = typeof wx?.invoke == 'function' ? wx : jWeixin let sdk = typeof wx?.invoke == 'function' ? wx : jWeixin
@@ -345,6 +345,8 @@ const store = new Vuex.Store({
res.result = JSON.parse(res.result) res.result = JSON.parse(res.result)
} }
resolve(res.result) resolve(res.result)
} else {
reject(res)
} }
}) })
}, 500) }, 500)