This commit is contained in:
yanran200730
2022-01-19 19:02:02 +08:00
parent 9fe4d29858
commit 1eb93adf3c
2 changed files with 13 additions and 11 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="!selectedUserCount">
<template v-if="!form.selectCount">
<span>请选择</span>
</template>
<template v-else>
已选择<em v-text="selectedUserCount"/>
已选择<em v-text="form.selectCount"/>
</template>
<div class="right-arrow"></div>
</div>
@@ -115,6 +115,7 @@ export default {
address: "",
ticket: '',
content: "",
selectCount: 0,
attendees: [],
noticeBefore: 4,
noticeAfter: 0,
@@ -163,7 +164,7 @@ 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,
@@ -172,7 +173,7 @@ export default {
}).then(res => {
this.form.attendees = res.userList?.map(e => ({id: e.openUserId})) || []
this.form.ticket = res.selectedTicket || ""
this.selectedUserCount = res.selectedUserCount
this.form.selectCount = res.selectedUserCount
this.clickedUserSelect = false
}).catch(() => {
this.clickedUserSelect = false

View File

@@ -19,11 +19,11 @@
<u-row justify="between" class="item" style="border-bottom: 1px solid #eeeeee" @click="handleSelectUser">
<header><em>*</em>发送对象</header>
<div class="right">
<template v-if="!selectedUserCount">
<template v-if="!form.selectCount">
<span>请选择</span>
</template>
<template v-else>
已选择<em>{{ selectedUserCount }}</em>
已选择<em>{{ form.selectCount }}</em>
</template>
<div class="right-arrow"/>
</div>
@@ -80,6 +80,7 @@ export default {
content: "",
persons: [],
ticket: '',
selectCount: 0,
releaseTime: null,
files: [],
},
@@ -109,18 +110,18 @@ export default {
methods: {
...mapActions(['selectPrivilegedContact', 'wxInvoke']),
handleSelectUser() {
// if (this.clickedUserSelect) return this.$u.toast("正在打开人员选择器")
// this.$loading()
if (this.clickedUserSelect) return this.$u.toast("正在打开人员选择器")
this.clickedUserSelect = true
this.selectPrivilegedContact({
fromDepartmentId: 0,
selectedTickets: this.form.ticket ? [this.form.ticket] : [],
selectedOpenUserIds: this.form.persons ? this.form.persons.map(e => e.id) : []
}).then(res => {
uni.hideLoading()
this.clickedUserSelect = false
this.form.persons = res.userList?.map(e => ({id: e.openUserId})) || []
this.form.ticket = res.selectedTicket
this.selectedUserCount = res.selectedUserCount
this.form.selectCount = res.selectedUserCount
}).catch(e => {
console.log(e)
this.clickedUserSelect = false
@@ -148,7 +149,7 @@ export default {
if (res && res.data) {
this.form.releaseTime = res.data.releaseTime;
this.form.ticket = res.data.ticket
this.selectedUserCount = res.data.persons.length
this.form.selectCount = res.data.selectCount
Object.keys(this.form).map(e => {
this.form[e] = res.data[e];
})
@@ -163,7 +164,7 @@ export default {
if (!this.form.content) return this.$u.toast("请输入公告内容")
if (!this.form.persons.length) return this.$u.toast("请选择发送对象")
if (!this.form.persons.length) return this.$u.toast("至少选择一名应用授权范围内成员")
if (this.index == 1 && !this.form.releaseTime) return this.$u.toast("请选择定时发送时间")