Compare commits

..

No commits in common. "7be32e930c1f472e07f132e3a9a7ac67d5b7425b" and "f76198b674df0e148c9743a3cf48376c4afd8009" have entirely different histories.

2 changed files with 47 additions and 52 deletions

View File

@ -56,7 +56,7 @@
@click="() => allCheck(allCheckStatus)" @click="() => allCheck(allCheckStatus)"
> >
<div class="mr-[20rpx]"> <div class="mr-[20rpx]">
<checkBox @change="(val) => allCheck(allCheckStatus)" :modelValue="allCheckStatus"></checkBox> <checkBox :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') }}

View File

@ -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"
:isLoading="isLoading" :disabled="confirmBtnStatus || isLoading"></customBtn> :disabled="confirmBtnStatus"></customBtn>
</template> </template>
</zPaging> </zPaging>
</div> </div>
@ -219,63 +219,58 @@
url: '/pages/chooseByDeps/index?chooseMode=2', url: '/pages/chooseByDeps/index?chooseMode=2',
}) })
} }
const isLoading = ref(false)
// //
const handleConfirm = async () => { const handleConfirm = async () => {
if (isLoading.value) return console.log(allChooseMembers.value)
isLoading.value = true let erp_ids = ''
if (allChooseMembers?.value?.length > 0) {
try { allChooseMembers?.value?.forEach((ele) => {
let erp_ids = '' if (!erp_ids) {
if (allChooseMembers?.value?.length > 0) { erp_ids = String(ele.ID)
allChooseMembers.value.forEach((ele) => { } else {
if (!erp_ids) { erp_ids += ',' + ele.ID
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) { if (groupActiveIndex.value === 0) {
// //
res = await createDepGroup() let params = {
} else if (groupActiveIndex.value === 2) { avatar: '',
// name: groupName.value,
const params = { erp_ids: erp_ids,
avatar: '', type: 1,
name: groupName.value, profile: '',
erp_ids: erp_ids,
type: 3,
profile: '',
}
console.log('项目群参数:', params)
res = await ServeCreateGroup(params)
} }
console.log(params)
if (res?.code === 200) { const res = await ServeCreateGroup(params)
if (res.code === 200) {
resetGroupInfo() resetGroupInfo()
uni.navigateBack() uni.navigateBack()
} }
} catch (err) { } else if (groupActiveIndex.value === 1) {
console.error(err) //
} finally { const res = await createDepGroup()
isLoading.value = false 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(() => {