修改部门选择规则
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:
parent
bdfd84bd35
commit
b58f25945e
4
env/.env.test
vendored
4
env/.env.test
vendored
@ -6,8 +6,8 @@ VITE_SHOW_CONSOLE = true
|
||||
VITE_SHOW_SOURCEMAP = true
|
||||
# baseUrl
|
||||
# VITE_BASEURL = 'https://warehouse.szjixun.cn/oa_backend'
|
||||
VITE_BASEURL = 'http://172.16.100.93:9503'
|
||||
VITE_BASEURL = 'http://172.16.100.93:8503'
|
||||
#VITE_SOCKET_API
|
||||
VITE_SOCKET_API = 'ws://172.16.100.93:9504'
|
||||
VITE_SOCKET_API = 'ws://172.16.100.93:8504'
|
||||
# EPRAPI baseUrl
|
||||
VITE_EPR_BASEURL = 'http://114.218.158.24:9020'
|
||||
|
@ -6,7 +6,10 @@
|
||||
<customNavbar :title="$t('index.chat.settings')"></customNavbar>
|
||||
</template>
|
||||
<div class="chat-settings">
|
||||
<div class="chat-group-base-infos chat-settings-card">
|
||||
<div
|
||||
class="chat-group-base-infos chat-settings-card"
|
||||
v-if="dialogueParams.type === 2"
|
||||
>
|
||||
<div class="base-info-avatar" @click="toEditAvatarPage">
|
||||
<avatarModule
|
||||
:mode="2"
|
||||
@ -144,7 +147,9 @@
|
||||
<div
|
||||
@click="showConfirmPrompt(2)"
|
||||
class="clear-chat-record-btn-each"
|
||||
v-if="groupParams?.groupInfo?.is_manager"
|
||||
v-if="
|
||||
groupParams?.groupInfo?.is_manager && dialogueParams.type === 2
|
||||
"
|
||||
>
|
||||
<span class="text-[32rpx] font-regular">
|
||||
{{ $t('group.disband.btn') }}
|
||||
@ -153,7 +158,9 @@
|
||||
<div
|
||||
@click="showConfirmPrompt(3)"
|
||||
class="clear-chat-record-btn-each"
|
||||
v-if="groupParams?.groupInfo?.is_manager"
|
||||
v-if="
|
||||
groupParams?.groupInfo?.is_manager && dialogueParams.type === 2
|
||||
"
|
||||
>
|
||||
<span class="text-[32rpx] font-regular">
|
||||
{{ $t('group.quit.btn') }}
|
||||
@ -273,10 +280,6 @@ onLoad(async (options) => {
|
||||
|
||||
onMounted(() => {
|
||||
state.recordSearchTypeList = [
|
||||
{
|
||||
value: t('chat.settings.groupMember'),
|
||||
typeIcon: recordSearchTypeIcon_groupMember,
|
||||
},
|
||||
{
|
||||
value: t('record.searchType.date'),
|
||||
typeIcon: recordSearchTypeIcon_date,
|
||||
@ -294,6 +297,12 @@ onMounted(() => {
|
||||
typeIcon: recordSearchTypeIcon_link,
|
||||
},
|
||||
]
|
||||
if (dialogueParams.type === 2) {
|
||||
state.recordSearchTypeList.unshift({
|
||||
value: t('chat.settings.groupMember'),
|
||||
typeIcon: recordSearchTypeIcon_groupMember,
|
||||
})
|
||||
}
|
||||
state.chatSettings = [
|
||||
{
|
||||
label: t('chat.settings.topSession'),
|
||||
@ -462,19 +471,23 @@ const toManagePage = (label) => {
|
||||
//点击跳转到按条件搜索页
|
||||
const toSearchByConditionPage = (flag) => {
|
||||
let condition = ''
|
||||
if (flag == 0) {
|
||||
let flagIndex = 0
|
||||
if (dialogueParams.type === 1) {
|
||||
flagIndex = -1
|
||||
}
|
||||
if (flag == flagIndex) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/chatSettings/groupManage/selectMembers?manageType=searchRecord',
|
||||
})
|
||||
} else {
|
||||
if (flag == 1) {
|
||||
if (flag == flagIndex + 1) {
|
||||
condition = 'date'
|
||||
} else if (flag == 2) {
|
||||
} else if (flag == flagIndex + 2) {
|
||||
condition = 'imgAndVideo'
|
||||
} else if (flag == 3) {
|
||||
} else if (flag == flagIndex + 3) {
|
||||
condition = 'file'
|
||||
} else if (flag == 4) {
|
||||
} else if (flag == flagIndex + 4) {
|
||||
condition = 'link'
|
||||
}
|
||||
uni.navigateTo({
|
||||
|
@ -104,6 +104,29 @@
|
||||
"
|
||||
class="flex items-center mr-[32rpx]"
|
||||
>
|
||||
<div class="vDivider mr-[32rpx]"></div>
|
||||
<div
|
||||
@click.stop="checkCurrentItem(item)"
|
||||
class="flex items-center mr-[32rpx]"
|
||||
:class="{
|
||||
'opacity-50 cursor-not-allowed':
|
||||
item.checkStatus === 'checked',
|
||||
}"
|
||||
>
|
||||
<div class="mr-[20rpx]">
|
||||
<checkBox
|
||||
:modelValue="
|
||||
item.currentChecked ? 'checked' : 'noChecked'
|
||||
"
|
||||
@change="() => checkCurrentItem(item)"
|
||||
></checkBox>
|
||||
</div>
|
||||
<div
|
||||
class="text-[28rpx] leading-[40rpx] font-medium text-[#46299D]"
|
||||
>
|
||||
{{ $t('choose.deps.current') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="vDivider mr-[32rpx]"></div>
|
||||
<div
|
||||
@click.stop="() => toNextLevel(item)"
|
||||
@ -359,11 +382,6 @@
|
||||
:plain="true"
|
||||
:btnText="$t('chatSettings.btn.removeAdmin')"
|
||||
@clickBtn="deleteNode(item)"
|
||||
:disabled="
|
||||
state.chooseMode === 2
|
||||
? false
|
||||
: userDepIds.includes(item.ID)
|
||||
"
|
||||
></customBtn>
|
||||
</div>
|
||||
</div>
|
||||
@ -476,7 +494,12 @@ const pageTitle = computed(() => {
|
||||
})
|
||||
|
||||
const getAllCheckedNodes = (node, checkedNodes = []) => {
|
||||
if (node.checkStatus === 'checked') {
|
||||
// 如果节点被选中且是单独选中的情况
|
||||
if (node.currentChecked) {
|
||||
checkedNodes.push(node)
|
||||
}
|
||||
// 如果节点被完全选中(包括子节点)
|
||||
else if (node.checkStatus === 'checked') {
|
||||
checkedNodes.push(node)
|
||||
}
|
||||
if (node.sons && Array.isArray(node.sons)) {
|
||||
@ -639,6 +662,7 @@ const updateNodeStatus = (node) => {
|
||||
// 更新当前节点及其所有子节点的状态
|
||||
const updateCheckStatus = (node, status, doShow) => {
|
||||
node.checkStatus = status
|
||||
|
||||
if (state.chooseMode === 2 && doShow) {
|
||||
node.showInPopup = true
|
||||
if (state.searchVal) {
|
||||
@ -654,6 +678,13 @@ const checkItemChange = (item, val) => {
|
||||
// 更新当前节点及其子节点的状态
|
||||
updateCheckStatus(item, val, true)
|
||||
|
||||
// 更新当前按钮状态
|
||||
if (val === 'checked') {
|
||||
item.currentChecked = true
|
||||
} else if (val === 'noChecked') {
|
||||
item.currentChecked = false
|
||||
}
|
||||
|
||||
// 更新父节点的状态
|
||||
updateParentStatus(item)
|
||||
}
|
||||
@ -661,7 +692,10 @@ const checkItemChange = (item, val) => {
|
||||
const deleteNode = (item) => {
|
||||
const treeNode = findNodeById(depTreeMyList.value[0], item.ID)
|
||||
if (!treeNode) return
|
||||
|
||||
treeNode.checkStatus = 'noChecked'
|
||||
treeNode.currentChecked = false
|
||||
|
||||
if (
|
||||
state.chooseMode === 2 &&
|
||||
treeNode?.sons?.length > 0 &&
|
||||
@ -699,11 +733,19 @@ const allCheck = (status) => {
|
||||
currentCrumbs?.value?.sons?.forEach((item) => {
|
||||
const itemT = findNodeById(depTreeMyList.value[0], item.ID)
|
||||
if (!itemT) return
|
||||
// 更新选中状态
|
||||
checkItemChange(itemT, statusT)
|
||||
|
||||
// 如果是选中状态,同时选中当前按钮
|
||||
if (statusT === 'checked') {
|
||||
itemT.currentChecked = true
|
||||
} else {
|
||||
// 取消选中时,清除当前按钮状态
|
||||
itemT.currentChecked = false
|
||||
}
|
||||
})
|
||||
|
||||
if (state.chooseMode === 2) {
|
||||
console.log(currentMembers.value)
|
||||
console.log(membersCheckedKeys.value)
|
||||
const map = new Map()
|
||||
if (status === 'noChecked' || status === 'halfChecked') {
|
||||
;[currentMembers.value, membersCheckedKeys.value]
|
||||
@ -712,7 +754,6 @@ const allCheck = (status) => {
|
||||
map.set(item.ID, item)
|
||||
})
|
||||
const mergedArray = Array.from(map.values())
|
||||
console.log(mergedArray)
|
||||
membersCheckedKeys.value = mergedArray
|
||||
} else if (status === 'checked') {
|
||||
const filteredArray = computed(() => {
|
||||
@ -721,7 +762,6 @@ const allCheck = (status) => {
|
||||
(item) => !unSelectArr.has(item.ID),
|
||||
)
|
||||
})
|
||||
console.log(filteredArray)
|
||||
membersCheckedKeys.value = filteredArray.value
|
||||
}
|
||||
}
|
||||
@ -776,10 +816,46 @@ const initCheckedKeys = () => {
|
||||
const init = async () => {
|
||||
crumbsIndex.value = 0
|
||||
await getDepsTreeMy()
|
||||
crumbs.value = depTreeMyList.value.length ? [depTreeMyList.value[0]] : []
|
||||
if (depTreeMyList.value.length) {
|
||||
// 创建全部节点
|
||||
const allNode = {
|
||||
ID: 'all',
|
||||
name: t('choose.deps.all'),
|
||||
sons: depTreeMyList.value,
|
||||
staffNum: calculateTotalStaffNum({ sons: depTreeMyList.value }),
|
||||
}
|
||||
depTreeMyList.value = [allNode]
|
||||
crumbs.value = [allNode]
|
||||
} else {
|
||||
crumbs.value = []
|
||||
}
|
||||
initCheckedKeys()
|
||||
}
|
||||
|
||||
const checkCurrentItem = (item) => {
|
||||
// 如果节点已经被完全选中,则不允许点击当前按钮
|
||||
if (item.checkStatus === 'checked') {
|
||||
return
|
||||
}
|
||||
|
||||
const treeNode = findNodeById(depTreeMyList.value[0], item.ID)
|
||||
if (!treeNode) return
|
||||
|
||||
// 切换当前节点的单独选中状态
|
||||
treeNode.currentChecked = !treeNode.currentChecked
|
||||
|
||||
// 更新节点状态
|
||||
if (treeNode.currentChecked) {
|
||||
treeNode.checkStatus = 'halfChecked'
|
||||
} else {
|
||||
// 如果取消单独选中,则恢复未选中状态
|
||||
treeNode.checkStatus = 'noChecked'
|
||||
}
|
||||
|
||||
// 更新父节点状态
|
||||
updateParentStatus(treeNode)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
|
@ -5,7 +5,7 @@ import { userInfoApi } from "@/api/user";
|
||||
import {ref} from 'vue'
|
||||
export const useAuth = createGlobalState(() => {
|
||||
// const token = useStorage('token', '', uniStorage)
|
||||
const token = ref('79b5c732d96d2b27a48a99dfd4a5566c43aaa5796242e854ebe3ffc198d6876b9628e7b764d9af65ab5dbb2d517ced88170491b74b048c0ba827c0d3741462cb89dc59ed46653a449af837a8262941ca1430937103230a1e32a1715f569f3efdbe6f8cb8b7b8642bd679668081b9b08f693d1b5be6002d936ec51e1e3e0c4927de9e32ac99a109b326e5d2bda27ec87624bb416ec70d2a95a2e190feeba9f0d6bae8571b3dfe89c824712344759a8f2bff9d70747c52525cf6a5614f9c770bca461a9b9c247b6dca97bcf83bbaf99bb726752c4fe1e9a4aa7de5c4cf3e88a3e480801280d45cdc124f9d8221105d8529c7c268c1251c3477bff5c051043bf9803f725aa97cbe369f1902315052eb4ee0e925840addd5e7796254066f2f9eb3f99f69f3d0db26bd940f47a18fa7b6182c6c7de87ee1a00936b7c90024c6085c65ffc3b8d20562eea48ff0b303a7795c67')
|
||||
const token = ref('79b5c732d96d2b27a48a99dfd4a5566c43aaa5796242e854ebe3ffc198d6876b9628e7b764d9af65ab5dbb2d517ced88170491b74b048c0ba827c0d3741462cb89dc59ed46653a449af837a8262941caaef1334d640773710f8cd96473bacfb190cba595a5d6a9c87d70f0999a3ebb41147213b31b4bdccffca66a56acf3baab5af0154f0dce360079f37709f78e13711036899344bddb0fb4cf0f2890287cb62c3fcbe33368caa5e213624577be8b8420ab75b1f50775ee16142a4321c5d56995f37354a66a969da98d95ba6e65d142ed097e04b411c1ebad2f62866d0ec7e1838420530a9941dbbcd00490199f8b892d39c9c0de979228015326a8fde48c55b8d48be643cb00da04330faa68977c689c6d523213435a2d92e3fab2976a1f5a6d4bfcb6c7aba3b4924873003b6492a2d0b81da4722162c68aeeec942eb2a85d')
|
||||
const refreshToken = useStorage('refreshToken', '', uniStorage)
|
||||
const userInfo = useStorage('userInfo', {}, uniStorage)
|
||||
const leaderList = useStorage('leaderList', [], uniStorage)
|
||||
|
@ -147,5 +147,7 @@
|
||||
"pageTitle.select.groupType": "选择群类型",
|
||||
"pageTitle.select.shareChat": "选择一个聊天",
|
||||
"button.multiple.choice": "多选",
|
||||
"button.text.close": "关闭"
|
||||
"button.text.close": "关闭",
|
||||
"choose.deps.all": "全部",
|
||||
"choose.deps.current": "当前"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user