This commit is contained in:
yanran200730
2022-01-19 18:04:56 +08:00
parent 50b36079f7
commit 11946e6a25
2 changed files with 10 additions and 5 deletions

View File

@@ -41,11 +41,11 @@
<u-row justify="between" class="item" @click="handleSelectUser">
<header><em>*</em>参会人</header>
<div class="right">
<template v-if="!form.attendees.length">
<template v-if="!selectedUserCount">
<span>请选择</span>
</template>
<template v-else>
已选择<em v-text="form.attendees.length"/>
已选择<em v-text="selectedUserCount"/>
</template>
<div class="right-arrow"></div>
</div>
@@ -113,12 +113,14 @@ export default {
startTime: {...initTime},
endTime: {...initTime},
address: "",
ticket: '',
content: "",
attendees: [],
noticeBefore: 4,
noticeAfter: 0,
files: [],
},
selectedUserCount: 0,
userSelect: false,
clickedUserSelect: false
}
@@ -161,14 +163,15 @@ export default {
methods: {
...mapActions(['selectPrivilegedContact']),
handleSelectUser() {
if (this.clickedUserSelect) return this.$u.toast("正在打开人员选择器")
// if (this.clickedUserSelect) return this.$u.toast("正在打开人员选择器")
this.clickedUserSelect = true
this.selectPrivilegedContact({
fromDepartmentId: 0,
selectedOpenUserIds: this.form.attendees?.map(e => e.id)
}).then(res => {
this.form.attendees = res.userList?.map(e => ({id: e.openUserId})) || []
this.form.ticket = res?.selectedTicket || ""
this.form.ticket = res.selectedTicket || ""
this.selectedUserCount = res.selectedUserCount
this.clickedUserSelect = false
}).catch(() => {
this.clickedUserSelect = false
@@ -195,6 +198,8 @@ export default {
this.form.address = res.data.address
this.form.content = res.data.content
this.form.attendees = res.data.attendees
this.selectedUserCount = res.data.attendees.length
this.form.noticeBefore = res.data.noticeBefore
this.form.noticeAfter = res.data.noticeAfter
this.form.files = res.data.files

View File

@@ -19,7 +19,7 @@
<u-row justify="between" class="item" style="border-bottom: 1px solid #eeeeee" @click="handleSelectUser">
<header><em>*</em>发送对象</header>
<div class="right">
<template v-if="!form.persons.length">
<template v-if="!selectedUserCount">
<span>请选择</span>
</template>
<template v-else>