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)"
|
@click="() => allCheck(allCheckStatus)"
|
||||||
>
|
>
|
||||||
<div class="mr-[20rpx]">
|
<div class="mr-[20rpx]">
|
||||||
<checkBox :modelValue="allCheckStatus"></checkBox>
|
<checkBox @change="(val) => allCheck(allCheckStatus)" :modelValue="allCheckStatus"></checkBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="font-medium text-[28rpx] leading-[40rpx]">
|
<div class="font-medium text-[28rpx] leading-[40rpx]">
|
||||||
{{ $t('radio.btn.selectAll') }}
|
{{ $t('radio.btn.selectAll') }}
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<template #bottom>
|
<template #bottom>
|
||||||
<customBtn :isBottom="true" :btnText="$t('pageTitle.create.group')" @click="handleConfirm"
|
<customBtn :isBottom="true" :btnText="$t('pageTitle.create.group')" @click="handleConfirm"
|
||||||
:disabled="confirmBtnStatus"></customBtn>
|
:isLoading="isLoading" :disabled="confirmBtnStatus || isLoading"></customBtn>
|
||||||
</template>
|
</template>
|
||||||
</zPaging>
|
</zPaging>
|
||||||
</div>
|
</div>
|
||||||
@ -219,58 +219,63 @@
|
|||||||
url: '/pages/chooseByDeps/index?chooseMode=2',
|
url: '/pages/chooseByDeps/index?chooseMode=2',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const isLoading = ref(false)
|
||||||
|
|
||||||
//点击发起群聊
|
// 点击发起群聊
|
||||||
const handleConfirm = async () => {
|
const handleConfirm = async () => {
|
||||||
console.log(allChooseMembers.value)
|
if (isLoading.value) return
|
||||||
let erp_ids = ''
|
isLoading.value = true
|
||||||
if (allChooseMembers?.value?.length > 0) {
|
|
||||||
allChooseMembers?.value?.forEach((ele) => {
|
try {
|
||||||
if (!erp_ids) {
|
let erp_ids = ''
|
||||||
erp_ids = String(ele.ID)
|
if (allChooseMembers?.value?.length > 0) {
|
||||||
} else {
|
allChooseMembers.value.forEach((ele) => {
|
||||||
erp_ids += ',' + ele.ID
|
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(() => {
|
const confirmBtnStatus = computed(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user