From f7bdd0fb204c5a843ff4ae1b368754192c3634d0 Mon Sep 17 00:00:00 2001 From: ulleo Date: Tue, 19 Nov 2024 17:17:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(X-Pack):=20[=E5=B7=A5=E4=BD=9C=E5=8F=B0]?= =?UTF-8?q?=E7=BB=99=E8=A7=92=E8=89=B2=E5=88=86=E9=85=8D=E4=BA=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=A1=AB=E6=8A=A5=E7=9A=84=E6=9D=83=E9=99=90=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E4=B8=8D=E5=88=86=E9=85=8D=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E6=9D=BF/=E5=A4=A7=E5=B1=8F/=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90/=E6=95=B0=E6=8D=AE=E9=9B=86=E7=9A=84=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=97=B6=EF=BC=8C=E5=A1=AB=E6=8A=A5=E4=BA=BA=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=9F=A5=E7=9C=8B=E8=87=AA=E5=B7=B1=E7=9A=84=E5=A1=AB?= =?UTF-8?q?=E6=8A=A5=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改为默认直接展示“我的填报” --- .../src/views/workbranch/ShortcutTable.vue | 349 ++++++++++-------- 1 file changed, 190 insertions(+), 159 deletions(-) diff --git a/core/core-frontend/src/views/workbranch/ShortcutTable.vue b/core/core-frontend/src/views/workbranch/ShortcutTable.vue index 1c34c1470c..ff78594e24 100644 --- a/core/core-frontend/src/views/workbranch/ShortcutTable.vue +++ b/core/core-frontend/src/views/workbranch/ShortcutTable.vue @@ -10,7 +10,7 @@ import dvDashboardSpineMobile from '@/assets/svg/dv-dashboard-spine-mobile.svg' import icon_pc_outlined from '@/assets/svg/icon_pc_outlined.svg' import icon_cancel_store from '@/assets/svg/icon_cancel_store.svg' import { useI18n } from '@/hooks/web/useI18n' -import { ref, reactive, onMounted, computed } from 'vue' +import { ref, reactive, onMounted, computed, watch } from 'vue' import type { TabsPaneContext } from 'element-plus-secondary' import GridTable from '@/components/grid-table/src/GridTable.vue' import { useRouter } from 'vue-router' @@ -34,6 +34,7 @@ const appStore = useAppStoreWithOut() const embeddedStore = useEmbedded() import { useShareStoreWithOut } from '@/store/modules/share' +import { cloneDeep } from 'lodash-es' const shareStore = useShareStoreWithOut() const { push } = useRouter() defineProps({ @@ -89,8 +90,8 @@ const getBusiListWithPermission = () => { busiFlagList.push(baseFlagList[parseInt(key)]) } } - tablePaneList.value[0].disabled = !busiFlagList?.length - tablePaneList.value[1].disabled = + baseTablePaneList.value[0].disabled = !busiFlagList?.length + baseTablePaneList.value[1].disabled = !busiFlagList.includes('panel') && !busiFlagList.includes('screen') return busiFlagList } @@ -141,17 +142,40 @@ const loadTableData = () => { }) } -const tablePaneList = ref([ +const baseTablePaneList = ref([ { title: t('work_branch.recently_used'), name: 'recent', disabled: false }, { title: t('work_branch.my_collection'), name: 'store', disabled: false }, { title: t('visualization.share_out'), name: 'share', disabled: false } ]) +const dfTablePaneList = ref([]) + const loadedDataFilling = data => { - tablePaneList.value.push(data) + dfTablePaneList.value.push(data) } const busiAuthList = getBusiListWithPermission() + +const tablePaneList = computed(() => { + const list = cloneDeep(!!busiAuthList.length ? baseTablePaneList.value : []) + for (const valueElement of dfTablePaneList.value) { + list.push(valueElement) + } + return list +}) + +const firstChangeActiveName = ref(false) + +watch( + () => tablePaneList.value.length, + (v1, v2) => { + if (tablePaneList.value.length > 0 && !firstChangeActiveName.value) { + firstChangeActiveName.value = true + activeName.value = tablePaneList.value[0].name + } + } +) + onMounted(() => { !!busiAuthList.length && handleClick({ @@ -251,7 +275,7 @@ const getEmptyDesc = (): string => {
@@ -276,163 +300,166 @@ const getEmptyDesc = (): string => { - - - - - - - - - - - - - -
- - -