|
|
@@ -50,8 +50,6 @@ type SummaryTabValue = 'home' | 'certificate'
|
|
|
const userStore = useUserStore()
|
|
|
|
|
|
const type = ref('day')
|
|
|
-const nowDate = new Date()
|
|
|
-const curYear = nowDate.getFullYear()
|
|
|
|
|
|
const handelChange = (value: any) => {
|
|
|
console.log('Selected time:', value)
|
|
|
@@ -99,8 +97,26 @@ const summaryTabs: Array<{ label: string; value: SummaryTabValue }> = [
|
|
|
{ label: '首页看板', value: 'home' },
|
|
|
{ label: '证书信息', value: 'certificate' }
|
|
|
]
|
|
|
+
|
|
|
const activeSummaryTab = ref<SummaryTabValue>('home')
|
|
|
-const summaryDate = ref(null)
|
|
|
+
|
|
|
+watch(
|
|
|
+ () => activeSummaryTab.value,
|
|
|
+ async (value) => {
|
|
|
+ if (value === 'certificate') {
|
|
|
+ await getCertificateBoardList()
|
|
|
+ } else {
|
|
|
+ nextTick(() => {
|
|
|
+ initHazardChart()
|
|
|
+ initSafeDayChart()
|
|
|
+ initSocChart()
|
|
|
+ resizeHazardChart()
|
|
|
+ resizeSafeDayChart()
|
|
|
+ resizeSocChart()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+)
|
|
|
|
|
|
const pageTitle = computed(() =>
|
|
|
activeSummaryTab.value === 'certificate' ? '证书信息看板' : 'QHSE管理看板'
|