Merge branch 'LiWenHao'
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
This commit is contained in:
commit
7be32e930c
@ -56,7 +56,7 @@
|
||||
@click="() => allCheck(allCheckStatus)"
|
||||
>
|
||||
<div class="mr-[20rpx]">
|
||||
<checkBox :modelValue="allCheckStatus"></checkBox>
|
||||
<checkBox @change="(val) => allCheck(allCheckStatus)" :modelValue="allCheckStatus"></checkBox>
|
||||
</div>
|
||||
<div class="font-medium text-[28rpx] leading-[40rpx]">
|
||||
{{ $t('radio.btn.selectAll') }}
|
||||
|
@ -106,7 +106,7 @@
|
||||
</div>
|
||||
<template #bottom>
|
||||
<customBtn :isBottom="true" :btnText="$t('pageTitle.create.group')" @click="handleConfirm"
|
||||
:disabled="confirmBtnStatus"></customBtn>
|
||||
:isLoading="isLoading" :disabled="confirmBtnStatus || isLoading"></customBtn>
|
||||
</template>
|
||||
</zPaging>
|
||||
</div>
|
||||
@ -219,58 +219,63 @@
|
||||
url: '/pages/chooseByDeps/index?chooseMode=2',
|
||||
})
|
||||
}
|
||||
const isLoading = ref(false)
|
||||
|
||||
//点击发起群聊
|
||||
// 点击发起群聊
|
||||
const handleConfirm = async () => {
|
||||
console.log(allChooseMembers.value)
|
||||
let erp_ids = ''
|
||||
if (allChooseMembers?.value?.length > 0) {
|
||||
allChooseMembers?.value?.forEach((ele) => {
|
||||
if (!erp_ids) {
|
||||
erp_ids = String(ele.ID)
|
||||
} else {
|
||||
erp_ids += ',' + ele.ID
|
||||
if (isLoading.value) return
|
||||
isLoading.value = true
|
||||
|
||||
try {
|
||||
let erp_ids = ''
|
||||
if (allChooseMembers?.value?.length > 0) {
|
||||
allChooseMembers.value.forEach((ele) => {
|
||||
if (!erp_ids) {
|
||||
erp_ids = String(ele.ID)
|
||||
} else {
|
||||
erp_ids += ',' + ele.ID
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
let res = null
|
||||
|
||||
if (groupActiveIndex.value === 0) {
|
||||
// 普通群
|
||||
const params = {
|
||||
avatar: '',
|
||||
name: groupName.value,
|
||||
erp_ids: erp_ids,
|
||||
type: 1,
|
||||
profile: '',
|
||||
}
|
||||
})
|
||||
console.log('普通群参数:', params)
|
||||
res = await ServeCreateGroup(params)
|
||||
} else if (groupActiveIndex.value === 1) {
|
||||
// 部门群
|
||||
res = await createDepGroup()
|
||||
} else if (groupActiveIndex.value === 2) {
|
||||
// 项目群
|
||||
const params = {
|
||||
avatar: '',
|
||||
name: groupName.value,
|
||||
erp_ids: erp_ids,
|
||||
type: 3,
|
||||
profile: '',
|
||||
}
|
||||
console.log('项目群参数:', params)
|
||||
res = await ServeCreateGroup(params)
|
||||
}
|
||||
|
||||
if (res?.code === 200) {
|
||||
resetGroupInfo()
|
||||
uni.navigateBack()
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
} finally {
|
||||
isLoading.value = false
|
||||
}
|
||||
if (groupActiveIndex.value === 0) {
|
||||
//普通群
|
||||
let params = {
|
||||
avatar: '',
|
||||
name: groupName.value,
|
||||
erp_ids: erp_ids,
|
||||
type: 1,
|
||||
profile: '',
|
||||
}
|
||||
console.log(params)
|
||||
const res = await ServeCreateGroup(params)
|
||||
if (res.code === 200) {
|
||||
resetGroupInfo()
|
||||
uni.navigateBack()
|
||||
}
|
||||
} else if (groupActiveIndex.value === 1) {
|
||||
//部门群
|
||||
const res = await createDepGroup()
|
||||
if (res.code === 200) {
|
||||
resetGroupInfo()
|
||||
uni.navigateBack()
|
||||
}
|
||||
} else if (groupActiveIndex.value === 2) {
|
||||
//项目群
|
||||
let params = {
|
||||
avatar: '',
|
||||
name: groupName.value,
|
||||
erp_ids: erp_ids,
|
||||
type: 3,
|
||||
profile: '',
|
||||
}
|
||||
console.log(params)
|
||||
const res = await ServeCreateGroup(params)
|
||||
if (res.code === 200) {
|
||||
resetGroupInfo()
|
||||
uni.navigateBack()
|
||||
}
|
||||
} else {}
|
||||
}
|
||||
//发起群聊按钮可点击状态
|
||||
const confirmBtnStatus = computed(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user