| | |
| | | <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">企业解释</el-menu-item> |
| | | <el-menu-item index="/audit">审核结果</el-menu-item> |
| | | <el-menu-item index="/report">报表生成</el-menu-item> |
| | | <el-menu-item index="/ledger-audit">事后核查</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 v-if="operatorIsAdmin" index="/system-config">系统配置</el-menu-item> |
| | | </el-menu> |
| | | </el-aside> |
| | | <el-main> |
| | |
| | | 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 }, |
| | |
| | | saveThreshold(row) { |
| | | api.post('/rules/update', { |
| | | id: row.id, threshold: row.threshold, alertLevel: row.alertLevel |
| | | }).then(() => { this.$message.success('已保存:' + row.ruleCode) }) |
| | | }).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('保存失败') }) |
| | | } |
| | | }, |