feat(ui): 顶部工具栏隐藏并重设计欢迎页仪表盘

- website.js中新增配置项关闭顶部语言切换、主题切换、日志和设置按钮
- top组件根据配置动态隐藏语言切换和设置按钮,仅保留用户头像下拉
- 默认主题改为浅色theme-d2,需手动切换或清空旧主题存储
- 完全重写欢迎页,移除默认营销内容,设计为TMS-ERP业务仪表盘,使用纯SVG/CSS绘图
- 欢迎页包括用户问候、四个核心指标卡、运单趋势、货物类型分布、运输方式占比、预警提醒和快捷入口
- 快捷入口路径模拟真实路由,需与后端菜单一致
- 对车辆里程录入界面搜索栏做细节调整,添加更合理的搜索字段宽度
- user模块中默认用户头像改为jpg格式图片
- vite配置文件新增多项插件和生产环境下的压缩优化配置
This commit is contained in:
2026-07-31 19:04:57 +08:00
parent a9fd78b5b9
commit c270258b7b
9 changed files with 836 additions and 1511 deletions

View File

@@ -65,3 +65,19 @@
- **原因**: cargo-type 用自定义 `#menu` 模板默认左对齐;其他页面用 Avue 内置菜单viewBtn:true默认右对齐 - **原因**: cargo-type 用自定义 `#menu` 模板默认左对齐;其他页面用 Avue 内置菜单viewBtn:true默认右对齐
- **改动**: 新增 `.avue-crud .el-table td .cell.avue-crud__menu { text-align: left }` - **改动**: 新增 `.avue-crud .el-table td .cell.avue-crud__menu { text-align: left }`
- **效果**: 全站操作列统一左对齐 - **效果**: 全站操作列统一左对齐
## 顶部工具栏工具全部隐藏
- **文件**: `src/config/website.js` + `src/page/index/top/index.vue`
- **改动**: ① website.js `setting` 新增/关闭 `theme:false``debug:false``lang:false``settingBtn:false`(原 theme/debug 仍为 true② index.vue 给 `<top-lang>``v-if="setting.lang"``<top-setting>``v-if="setting.settingBtn"`
- **效果**: 顶部工具排仅保留用户头像+姓名下拉(含退出登录);语言切换/设置齿轮/日志/皮肤图标均隐藏
- **默认主题**: `src/store/modules/common.js` 第 21 行 `themeName` 默认改为 `theme-d2`(已登录用户若 localStorage 存过旧主题需手动切一次或清存储)
## 欢迎页(/wel/index重设计为 TMS-ERP 业务仪表盘
- **文件**: `src/views/wel/index.vue`(整文件重写,移除 Saber 默认营销内容)
- **设计**: 浅色 d2 主题风,纯 SVG/CSS 自绘图表(项目无 echarts零依赖
- **模块**: ① 问候横幅(用户名+日期+新建运单按钮) ② 4 张核心指标卡(今日运单/在途运输/待办事项/运力车辆,含环比) ③ 运单趋势(SVG柱状,近7日) ④ 货物类型分布(SVG环形donut) ⑤ 运输方式占比(横向条) ⑥ 预警提醒列表 ⑦ 快捷入口网格(跳真实路由)
- **数据**: 全 mockdata() 中每项标注对应后端接口(如 /blade-business/waybill/count、/trend、/cargoStat 等),后续替换真实接口即可
- **预览**: `npm run build` 通过dev server `http://localhost:2889/`
- **注意**: 快捷入口 path 依据 views 目录结构推断(/business/waybill-manage 等),需与后端菜单 path 一致才能跳转

BIN
public/img/bg/img-logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

View File

@@ -24,14 +24,16 @@ export default {
setting: { setting: {
sidebar: 'vertical', sidebar: 'vertical',
tag: true, tag: true,
debug: true, debug: false,
collapse: true, collapse: true,
search: true, search: false,
color: true, color: false,
lock: true, lock: false,
screenshot: true, screenshot: true,
fullscreen: true, fullscreen: false,
theme: true, theme: true,
lang: false,
settingBtn: false,
menu: true, menu: true,
}, },
//首页配置 //首页配置

View File

@@ -47,6 +47,7 @@ export const option = {
dicData: vehicleTypeDic, dicData: vehicleTypeDic,
value: '车辆', value: '车辆',
search: true, search: true,
searchSpan: 6,
minWidth: 110, minWidth: 110,
rules: [{ required: true, message: '请选择车船类型', trigger: 'change' }], rules: [{ required: true, message: '请选择车船类型', trigger: 'change' }],
}, },
@@ -56,6 +57,7 @@ export const option = {
slot: true, slot: true,
formslot: true, formslot: true,
search: true, search: true,
searchSpan: 6,
minWidth: 130, minWidth: 130,
rules: [ rules: [
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' }, { required: true, message: '请输入车牌号/船号', trigger: 'blur' },
@@ -175,6 +177,7 @@ export const option = {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
searchRange: true, searchRange: true,
search: true, search: true,
searchSpan: 6,
hide: true, hide: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
@@ -191,6 +194,7 @@ export const option = {
}, },
checkStrictly: true, checkStrictly: true,
search: true, search: true,
searchSpan: 6,
hide: true, hide: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,

View File

@@ -23,7 +23,7 @@
<div v-if="setting.lock" class="top-bar__item"> <div v-if="setting.lock" class="top-bar__item">
<top-lock></top-lock> <top-lock></top-lock>
</div> </div>
<div class="top-bar__item"> <div v-if="setting.lang" class="top-bar__item">
<top-lang></top-lang> <top-lang></top-lang>
</div> </div>
<div class="top-bar__item" v-if="setting.fullscreen"> <div class="top-bar__item" v-if="setting.fullscreen">
@@ -43,12 +43,12 @@
</span> </span>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item @click="toDashboard"> <!-- <el-dropdown-item @click="toDashboard">-->
<i class="icon-zuzhixiaxia" /> {{ $t('navbar.dashboard') }} <!-- <i class="icon-zuzhixiaxia" /> {{ $t('navbar.dashboard') }}-->
</el-dropdown-item> <!-- </el-dropdown-item>-->
<el-dropdown-item @click="toAllMenu"> <!-- <el-dropdown-item @click="toAllMenu">-->
<i class="icon-liebiao" /> {{ $t('navbar.allMenu') }} <!-- <i class="icon-liebiao" /> {{ $t('navbar.allMenu') }}-->
</el-dropdown-item> <!-- </el-dropdown-item>-->
<el-dropdown-item @click="toInfo"> <el-dropdown-item @click="toInfo">
<i class="icon-yonghu" />{{ $t('navbar.userinfo') }} <i class="icon-yonghu" />{{ $t('navbar.userinfo') }}
</el-dropdown-item> </el-dropdown-item>
@@ -108,7 +108,7 @@
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
<top-setting></top-setting> <top-setting v-if="setting.settingBtn"></top-setting>
<el-dialog title="请选择身份信息后切换" append-to-body v-model="userBox" width="400px"> <el-dialog title="请选择身份信息后切换" append-to-body v-model="userBox" width="400px">
<avue-form :option="userOption" v-model="userForm" @submit="toAll" /> <avue-form :option="userOption" v-model="userForm" @submit="toAll" />
</el-dialog> </el-dialog>

View File

@@ -18,7 +18,7 @@ const common = {
!storedColorName || LEGACY_PRIMARY_COLORS.includes(String(storedColorName).toUpperCase()) !storedColorName || LEGACY_PRIMARY_COLORS.includes(String(storedColorName).toUpperCase())
? DEFAULT_PRIMARY_COLOR ? DEFAULT_PRIMARY_COLOR
: storedColorName, : storedColorName,
themeName: getStore({ name: 'themeName' }) || 'theme-go', themeName: getStore({ name: 'themeName' }) || 'theme-d2',
lockPasswd: getStore({ name: 'lockPasswd' }) || '', lockPasswd: getStore({ name: 'lockPasswd' }) || '',
website: website, website: website,
setting: website.setting, setting: website.setting,

View File

@@ -308,7 +308,7 @@ const user = {
state.userInfo = { user_name: 'unauth', role_name: 'unauth', authority: 'unauth' }; state.userInfo = { user_name: 'unauth', role_name: 'unauth', authority: 'unauth' };
} else { } else {
if (validatenull(userInfo.avatar)) { if (validatenull(userInfo.avatar)) {
userInfo.avatar = '/img/bg/img-logo.png'; userInfo.avatar = '/img/bg/img-logo.jpg';
} }
if (!validatenull(userInfo.role_name)) { if (!validatenull(userInfo.role_name)) {
userInfo.roleName = userInfo.role_name; userInfo.roleName = userInfo.role_name;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long