Commit 689e07c5 authored by 郭铭瑶's avatar 郭铭瑶 🤘

修改权限编码取值及组织架构拎出4个独立菜单

parent ff7b7d25
...@@ -22,6 +22,7 @@ export default { ...@@ -22,6 +22,7 @@ export default {
async getAuth({ commit }: Method) { async getAuth({ commit }: Method) {
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
/* 开发环境、测试环境用 */ /* 开发环境、测试环境用 */
setTimeout(() => {
commit('SET_AUTH', { commit('SET_AUTH', {
userid: 91541, userid: 91541,
orgid: '000001', orgid: '000001',
...@@ -35,6 +36,7 @@ export default { ...@@ -35,6 +36,7 @@ export default {
// code: '001.001.031.014.205.003', // 机关事业单位 // code: '001.001.031.014.205.003', // 机关事业单位
// code: '001.001.031.014.205.003.701', // 机关第一支部委员会 // code: '001.001.031.014.205.003.701', // 机关第一支部委员会
}) })
}, 3000)
return return
} }
...@@ -54,7 +56,7 @@ export default { ...@@ -54,7 +56,7 @@ export default {
keys: '权限编码', keys: '权限编码',
q: `paths @ "组织id" && string == "${orgid}"`, q: `paths @ "组织id" && string == "${orgid}"`,
}) })
)?.[0]?.['权限编码'] || '' )?.[0]?.['权限编码']?.[0] || ''
commit('SET_AUTH', { userid, orgid, code }) commit('SET_AUTH', { userid, orgid, code })
}, },
......
...@@ -613,6 +613,22 @@ const handleExpand = (val: string[]) => { ...@@ -613,6 +613,22 @@ const handleExpand = (val: string[]) => {
curKey.value = curMenu.value?.key curKey.value = curMenu.value?.key
return return
} }
if (expandedKeys.value[1] === '3-menu') {
menus.value.forEach((menu) => {
if (menu.key === '3-menu') {
curMenu.value = menu
} else {
menu.children &&
menu.children.forEach((child) => {
if (child.key === '3-menu') {
curMenu.value = child
}
})
}
})
curKey.value = '3-menu'
return
}
curKey.value = expandedKeys.value[0] curKey.value = expandedKeys.value[0]
const cur = menus.value.find((e) => e.key === curKey.value) const cur = menus.value.find((e) => e.key === curKey.value)
subKey.value = null subKey.value = null
...@@ -777,13 +793,30 @@ async function setCommunityParty() { ...@@ -777,13 +793,30 @@ async function setCommunityParty() {
const bigSixChildren: any[] = [] const bigSixChildren: any[] = []
const twoNewChildren: any[] = [] const twoNewChildren: any[] = []
const datasource = data.filter((item: any) => item['是否虚拟组织']) || [] const datasource = data.filter((item: any) => item['是否虚拟组织']) || []
data.forEach((item: any) => { data.forEach(async (item: any) => {
if (item['是否虚拟组织']) return if (item['是否虚拟组织']) return
if (item['类别'] === '居民区') { if (item['类别'] === '居民区') {
bigSixChildren.push(item) bigSixChildren.push(item)
} else if (item['类别'] === '两新') { } else if (
item['类别'] === '两新' &&
!item['党组织名称'].includes('花木经济发展总公司') &&
!item['党组织名称'].includes('花木房地产开发经营') &&
!item['党组织名称'].includes('鑫荣勤力') &&
!item['党组织名称'].includes('上海钦洋投资管理中心总支委员会')
) {
twoNewChildren.push(item) twoNewChildren.push(item)
} else { } else {
if (item['党组织名称'].includes('上海钦洋投资管理中心总支委员会')) {
const children = await checkHasChildren(item)
item.key = '3-menu'
item.children = children?.map((child: any, index: number) => ({
...child,
label: child['党组织名称']
.replace('浦东新区花木街道', '')
.replace('中共', ''),
key: item.key + '-' + (index + 1),
}))
}
datasource.push(item) datasource.push(item)
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment