<template>
|
<div class="error-page">
|
<PageWrapper>
|
<template #headerContent>
|
<WorkbenchHeader />
|
</template>
|
<div class="lg:flex">
|
<div class="lg:w-7/10 w-full !mr-4 enter-y">
|
<SiteAnalysis class="!my-4 enter-y" :loading="loading" />
|
</div>
|
<div class="lg:w-3/10 w-full !mr-4 enter-y">
|
<QuickNav :loading="loading" class="!my-4 enter-y" />
|
</div>
|
</div>
|
<div class="lg">
|
<Card :tab-list="tabListTitle" v-bind="$attrs" :active-tab-key="activeKey">
|
<VisitAnalysisBar :loading="loading" class="!my-4 enter-y" />
|
</Card>
|
</div>
|
</PageWrapper>
|
<PasswordModal @register="registerModal" />
|
</div>
|
</template>
|
<script lang="ts" setup>
|
import { onMounted, ref, h } from 'vue';
|
import { PageWrapper } from '/@/components/Page';
|
import PasswordModal from '../../tigerprojects/system/password/PasswordModal.vue';
|
import { Card } from 'ant-design-vue';
|
import WorkbenchHeader from './components/WorkbenchHeader.vue';
|
import SiteAnalysis from './components/SiteAnalysis.vue';
|
import QuickNav from './components/QuickNav.vue';
|
import VisitAnalysisBar from './components/VisitAnalysisBar.vue';
|
import { useModal } from '/@/components/Modal';
|
import { useUserStore } from '/@/store/modules/user';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useI18n } from 'vue-i18n';
|
import { nextTick } from 'vue';
|
|
const loading = ref(true);
|
const { createConfirm } = useMessage();
|
const { t } = useI18n();
|
const [registerModal, { openModal }] = useModal();
|
const activeKey = ref('tab1');
|
const tabListTitle = [
|
{
|
key: 'tab1',
|
tab: '任务汇总',
|
},
|
// {
|
// key: 'tab2',
|
// tab: '访问量',
|
// },
|
];
|
onMounted(async () => {
|
nextTick(() => {
|
var ischangepwd = useUserStore().getUserInfo.changepwd;
|
console.log(ischangepwd);
|
if (ischangepwd) {
|
//提示去修改密码
|
createConfirm({
|
iconType: 'warning',
|
title: () => h('span', t('提示')),
|
content: () => h('span', t('当前未初始密码,是否去修改密码')),
|
onOk: async () => {
|
openModal(true, {
|
passwordOld: useUserStore().getUserInfo.userId as string,
|
});
|
},
|
});
|
}
|
});
|
setTimeout(() => {
|
loading.value = false;
|
}, 1500);
|
});
|
</script>
|