From ec37ed0f518eb5f225e028e7ef60008e29bc4b01 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期三, 28 十月 2026 12:16:42 +0800
Subject: [PATCH] feat(企业台账抽查): 完成2026年9月台账核查、轨迹落库及结果报告
---
traffic-audit-web/src/views/DataView.vue | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/traffic-audit-web/src/views/DataView.vue b/traffic-audit-web/src/views/DataView.vue
index d72dc3a..120590d 100644
--- a/traffic-audit-web/src/views/DataView.vue
+++ b/traffic-audit-web/src/views/DataView.vue
@@ -10,16 +10,23 @@
<el-menu-item index="/explain">浼佷笟瑙i噴</el-menu-item>
<el-menu-item index="/audit">瀹℃牳缁撴灉</el-menu-item>
<el-menu-item index="/report">鎶ヨ〃鐢熸垚</el-menu-item>
+ <el-submenu index="/special-stats">
+ <template slot="title">涓撻」缁熻</template>
+ <el-menu-item index="/holiday-stat">鑺傚亣鏃�</el-menu-item>
+ </el-submenu>
<el-menu-item index="/rules">瑙勫垯绠$悊</el-menu-item>
<el-menu-item index="/users">鐢ㄦ埛绠$悊</el-menu-item>
-</el-menu>
+ <el-menu-item v-if="operatorIsAdmin" index="/system-config">绯荤粺閰嶇疆</el-menu-item>
+ </el-menu>
</el-aside>
<el-main>
<h3>瀵煎叆鏁版嵁鏌ョ湅</h3>
<div class="toolbar">
<template v-if="!isRollup">
<span class="toolbar-label">鎶ヨ〃鏈�</span>
- <el-date-picker v-model="period" type="month" placeholder="鎶ヨ〃鏈燂紙鍏ㄩ儴锛�" value-format="yyyy-MM" clearable style="width:150px" @change="doQuery"></el-date-picker>
+ <el-date-picker v-model="period" type="month" placeholder="鎶ヨ〃鏈燂紙鍏ㄩ儴锛�" value-format="yyyy-MM" clearable
+ style="width:150px" :picker-options="periodPickerOptions" @change="doQuery"></el-date-picker>
+ <span v-if="periodHint" class="toolbar-hint">{{ periodHint }}</span>
</template>
<span class="toolbar-sep"></span>
<span class="toolbar-label">鏁版嵁绫诲瀷</span>
@@ -83,6 +90,7 @@
<script>
import AppHeader from '@/components/AppHeader.vue'
import api from '@/api'
+import { granularityOfImportType, disabledDateFor, granularityHint, snapPeriod } from '@/utils/periodGranularity'
export default {
components: { AppHeader },
name: 'DataView',
@@ -149,6 +157,12 @@
}
},
computed: {
+ periodGranularity() { return granularityOfImportType(this.type) },
+ periodPickerOptions() {
+ const d = disabledDateFor(this.periodGranularity)
+ return d ? { disabledDate: d } : {}
+ },
+ periodHint() { return granularityHint(this.periodGranularity) },
canRollup() {
return (this.rollupTypes || []).some(t => t.type === this.type)
},
@@ -185,6 +199,17 @@
return cols.map((c, i) => Object.assign({}, c, { fixed: i < count }))
}
},
+ watch: {
+ // 閫夊埌鑳借�楋紙瀛f姤锛夋椂鎶婃姤琛ㄦ湡瀵归綈鍒板搴︽湯鏈�
+ periodGranularity() {
+ const snapped = snapPeriod(this.period, this.periodGranularity)
+ if (snapped && snapped !== this.period) {
+ this.period = snapped
+ const hint = granularityHint(this.periodGranularity)
+ if (hint) this.$message.warning(hint + '锛堝凡鑷姩璋冩暣涓� ' + snapped + '锛�')
+ }
+ }
+ },
methods: {
// 鏁版嵁鏌ョ湅缁熶竴鍒楄繃婊わ細鍐呴儴鏍囪瘑鍒椾笉灞曠ず锛涙姤琛ㄦ湡锛堢敱绛涢�夋潯浠朵綋鐜帮級涓庢墍灞炲湴鍖猴紙鍖哄垝浠g爜锛屽凡琚競宸炲垪鏇夸唬锛変笉灞曠ず
keepColumn(c) {
--
Gitblit v1.9.1