From 12816d70f808eee7bf66efd144febc346f4cb193 Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期二, 20 十月 2026 16:57:30 +0800
Subject: [PATCH] docs(交接): 新增同事交接说明并整理数据库与模板交付清单
---
traffic-audit-web/src/views/RuleManage.vue | 39 ++++++++++++++++++++++++++-------------
1 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/traffic-audit-web/src/views/RuleManage.vue b/traffic-audit-web/src/views/RuleManage.vue
index 30d2f57..8550784 100644
--- a/traffic-audit-web/src/views/RuleManage.vue
+++ b/traffic-audit-web/src/views/RuleManage.vue
@@ -1,19 +1,23 @@
<template>
- <el-container>
- <el-header>浜ら�氱粺璁℃姤琛ㄥ鏍哥郴缁� - 瑙勫垯绠$悊</el-header>
+ <el-container direction="vertical">
+ <app-header title="浜ら�氱粺璁℃姤琛ㄥ鏍哥郴缁� - 瑙勫垯绠$悊"></app-header>
<el-container>
<el-aside width="200px">
- <el-menu router default-active="/rules">
+ <el-menu ref="sideMenu" router :default-active="$route.path" @select="onMenuSelect">
<el-menu-item index="/dashboard">宸ヤ綔鍙�</el-menu-item>
<el-menu-item index="/import">鏁版嵁瀵煎叆</el-menu-item>
<el-menu-item index="/data">鏁版嵁鏌ョ湅</el-menu-item>
<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-item index="/login" @click="logout">閫�鍑虹櫥褰�</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>
@@ -70,6 +74,7 @@
</template>
<script>
import api from '@/api'
+import AppHeader from '@/components/AppHeader.vue'
const TYPE_CN = {
DIFF: '宸�煎姣�', RATIO: '姣斾緥瀵规瘮', MOM: '鐜瘮鏂板', NULL_CHECK: '蹇呭~/涓�鑷存��',
OUT_RANGE: '鑼冨洿妫�鏌�', MOM_EQ_ZERO: '鐜瘮涓�0', MOM_PCT: '鐜瘮鐧惧垎姣�',
@@ -78,9 +83,11 @@
TREND_CONSISTENCY: '瓒嬪娍涓�鑷�', RATIO_CHANGE: '鍗犳瘮鍙樺寲', AVG_DIST_CHANGE: '骞冲潎杩愯窛鍙樺寲',
PAX_PER_TRIP_CHANGE: '鍗曡溅娆¤浇瀹汉鏁板彉鍖�', LOADED_RATIO_DIFF: '杞借揣閲岀▼鍗犳瘮瀵规瘮',
FUEL_RANGE: '鍗曡�楄秴鑼冨洿', FUEL_MOM: '鍗曡�楃幆姣�', FREIGHT_VS_H2032: '涓庤揣杩愭湀鎶ュ姣�',
- AVG_DIST_VS_H2032: '骞冲潎杩愯窛瀵规瘮', LOADED_TON_RATIO: '杞借揣鍚ㄤ綅姣斿��'
+ AVG_DIST_VS_H2032: '骞冲潎杩愯窛瀵规瘮', LOADED_TON_RATIO: '杞借揣鍚ㄤ綅姣斿��',
+ EFFICIENCY_RATIO: '杩愯緭鏁堢巼姣斿��', VEHICLE_VS_ENT_AVG: '鍗曡溅涓庢湀鎶ユ瘡涓昏溅瀵规瘮', MILEAGE_VS_TRACK: '鍗曡溅琛岀▼涓庤建杩瑰姣�'
}
export default {
+ components: { AppHeader },
name: 'RuleManage',
data() {
return { reportType: 'H2032', rules: [], loading: false }
@@ -91,24 +98,30 @@
this.loading = true
api.get('/rules/list', { params: { reportType: this.reportType } })
.then(res => { this.rules = res.data || [] })
- .catch(() => { this.$message.error('瑙勫垯鍔犺浇澶辫触') })
+ .catch(e => { if (e && e._toast) return; this.$message.error('瑙勫垯鍔犺浇澶辫触') })
.finally(() => { this.loading = false })
},
toggleRule(row) {
api.post('/rules/toggle', null, { params: { id: row.id, enabled: row.isEnabled } })
.then(() => { this.$message.success((row.isEnabled ? '宸插惎鐢細' : '宸插仠鐢細') + row.ruleCode) })
- .catch(() => { row.isEnabled = row.isEnabled ? 0 : 1; this.$message.error('鎿嶄綔澶辫触') })
+ .catch(e => { if (e && e._toast) return; row.isEnabled = row.isEnabled ? 0 : 1; this.$message.error('鎿嶄綔澶辫触') })
},
saveThreshold(row) {
api.post('/rules/update', {
id: row.id, threshold: row.threshold, alertLevel: row.alertLevel
- }).then(() => { this.$message.success('宸蹭繚瀛橈細' + row.ruleCode) })
- .catch(() => { this.$message.error('淇濆瓨澶辫触') })
+ }).then(res => {
+ // 鍚庣浼氭寜鏂伴槇鍊煎悓姝ユ敼鍐欍�岃鍒欏悕绉�/璇存槑銆嶏紝鎶婃渶鏂板�煎洖濉埌褰撳墠琛岋紝鍚﹀垯鍒楄〃杩樻樉绀烘棫鏂囨
+ const r = res && res.data
+ if (r) {
+ row.ruleName = r.ruleName
+ row.description = r.description
+ row.threshold = r.threshold
+ }
+ this.$message.success('宸蹭繚瀛橈細' + row.ruleCode)
+ })
+ .catch(e => { if (e && e._toast) return; this.$message.error('淇濆瓨澶辫触') })
}
},
mounted() { this.loadRules() }
}
</script>
-<style scoped>
-.el-header { background: #409EFF; color: white; line-height: 60px; font-size: 18px; }
-</style>
--
Gitblit v1.9.1