feat(dispatch): 优化运输计划调度弹窗视觉布局并提升紧凑度
- 弹窗标题和单号合并一行,移除分隔符,提升信息整体感 - 基本信息和收发货路线由左右双列改为上下堆叠,改善视觉层次 - 基本信息网格调整为4列布局,货物信息扩大占2列,附件独占一行 - 计划执行时间范围由‘-’改为‘ ~ ’,更清晰表达时间区间 - 路线节点展示改为横向徽章加下方双列详细信息,避免空白和居中留白 - 调整字体大小、颜色及间距,整体风格更简洁且信息更紧凑 - 移除无用边距和min-height约束,使弹窗整体更加紧凑精简 - 更新代理配置,开发期/api请求代理指向指定内网地址,统一路径无需重写, 以解决跨域问题并保持与后端网关路径一致 - 进行了完整构建验证,确保修改不会影响现有功能稳定性
This commit is contained in:
@@ -16,3 +16,22 @@
|
||||
- 旧 `__dispatch-list` / `__dispatch-top`(border-bottom/32px padding) 样式已清理;section-card 已全局注册,无需 import
|
||||
- 验证:SFC 模板单独编译通过(6 处 section-card 引用配对平衡);完整 vite build 仍因预存 `xlsx` 幽灵依赖(pnpm 未装)失败,与本次改动无关
|
||||
- 注意:本项目完整 build 依赖 `xlsx@0.18.5`(package.json 有声明但 node_modules 缺失),属环境预存问题,非本次引入
|
||||
|
||||
## 运输计划调度弹窗二次视觉紧凑化
|
||||
- 客户反馈:弹窗“空、不紧凑、内容多但不好看”
|
||||
- 改动仍集中在 `business-crud-page.vue`
|
||||
- 模板:
|
||||
- 标题与单号/状态标签合并到同一行,移除 `|` 分隔符
|
||||
- 基本信息与收发货路线由左右双列改为上下堆叠的白卡,各自独占一行
|
||||
- 基本信息网格改为 4 列:客户 / 项目 / 合同编号 / 计划执行时间;货物信息占 2 列;附件独占一行
|
||||
- 日期展示由 `-` 改为 ` ~ `,更明确是区间
|
||||
- 路线改为“横向节点 + 下方双列明细”:起点/终点徽章+名称居中,发货地址/收货地址左对齐分两列,避免居中留白
|
||||
- 样式:
|
||||
- 顶部标题字号 22px→18px,顶部 padding 22px→0
|
||||
- 信息标签字号 14px→12px、颜色 #666→#909399,值行高 1.45→1.4
|
||||
- 基本信息网格 3 列/48px 列间距/18px 行间距 → 4 列/24px 列间距/12px 行间距
|
||||
- 路线徽章 46px→32px、字号 16px→13px、圆角 6px→4px
|
||||
- 路线标题字号 22px→16px,取消居中,最长名称省略
|
||||
- 路线区域取消 `min-height:200px` 和居中,改为紧凑堆叠
|
||||
- 卡片间统一 `margin-bottom: 12px`
|
||||
- 验证:`npm run build` 成功
|
||||
|
||||
@@ -2102,7 +2102,6 @@
|
||||
<span class="business-crud-page__dispatch-heading-name">
|
||||
{{ dispatchDialogTitle }}
|
||||
</span>
|
||||
<span class="business-crud-page__dispatch-heading-split">|</span>
|
||||
<span class="business-crud-page__dispatch-heading-no">
|
||||
{{ dispatchDialogNo || '-' }}
|
||||
</span>
|
||||
@@ -2114,7 +2113,7 @@
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-summary">
|
||||
|
||||
<section-card title="基本信息">
|
||||
<div class="business-crud-page__dispatch-summary-grid">
|
||||
<div class="business-crud-page__dispatch-summary-item">
|
||||
@@ -2135,22 +2134,22 @@
|
||||
{{ dispatchRow.contractName || dispatchRow.contractNo || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-summary-item">
|
||||
<div class="business-crud-page__dispatch-summary-label">货物信息</div>
|
||||
<div class="business-crud-page__dispatch-summary-value">
|
||||
{{ dispatchPlanCargoInfo || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-summary-item">
|
||||
<div class="business-crud-page__dispatch-summary-label">计划执行时间</div>
|
||||
<div class="business-crud-page__dispatch-summary-value">
|
||||
{{
|
||||
[dispatchRow.planStartDate, dispatchRow.planEndDate]
|
||||
.filter(Boolean)
|
||||
.join('-') || '-'
|
||||
.join(' ~ ') || '-'
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-summary-item is-wide">
|
||||
<div class="business-crud-page__dispatch-summary-label">货物信息</div>
|
||||
<div class="business-crud-page__dispatch-summary-value">
|
||||
{{ dispatchPlanCargoInfo || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="business-crud-page__dispatch-summary-item business-crud-page__dispatch-summary-item--attachments"
|
||||
>
|
||||
@@ -2172,33 +2171,40 @@
|
||||
</div>
|
||||
</div>
|
||||
</section-card>
|
||||
|
||||
<section-card title="收发货路线">
|
||||
<div class="business-crud-page__dispatch-route">
|
||||
<div class="business-crud-page__dispatch-route-item">
|
||||
<div class="business-crud-page__dispatch-route-main">
|
||||
<div class="business-crud-page__dispatch-route-node">
|
||||
<span class="business-crud-page__dispatch-route-badge is-start">起</span>
|
||||
<div class="business-crud-page__dispatch-route-body">
|
||||
<div class="business-crud-page__dispatch-route-title">
|
||||
{{ parseDispatchRoutePoint(dispatchRow, 'start').name || '-' }}
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-route-address">
|
||||
{{ parseDispatchRoutePoint(dispatchRow, 'start').address || '-' }}
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-route-contact">
|
||||
{{ parseDispatchRoutePoint(dispatchRow, 'start').contact || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-route-line" />
|
||||
<div class="business-crud-page__dispatch-route-item">
|
||||
<div class="business-crud-page__dispatch-route-node">
|
||||
<span class="business-crud-page__dispatch-route-badge is-end">终</span>
|
||||
<div class="business-crud-page__dispatch-route-body">
|
||||
<div class="business-crud-page__dispatch-route-title">
|
||||
{{ parseDispatchRoutePoint(dispatchRow, 'end').name || '-' }}
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-route-address">
|
||||
</div>
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-route-detail">
|
||||
<div class="business-crud-page__dispatch-route-detail-item">
|
||||
<div class="business-crud-page__dispatch-route-detail-label">发货地址</div>
|
||||
<div class="business-crud-page__dispatch-route-detail-value">
|
||||
{{ parseDispatchRoutePoint(dispatchRow, 'start').address || '-' }}
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-route-detail-contact">
|
||||
{{ parseDispatchRoutePoint(dispatchRow, 'start').contact || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-route-detail-item">
|
||||
<div class="business-crud-page__dispatch-route-detail-label">收货地址</div>
|
||||
<div class="business-crud-page__dispatch-route-detail-value">
|
||||
{{ parseDispatchRoutePoint(dispatchRow, 'end').address || '-' }}
|
||||
</div>
|
||||
<div class="business-crud-page__dispatch-route-contact">
|
||||
<div class="business-crud-page__dispatch-route-detail-contact">
|
||||
{{ parseDispatchRoutePoint(dispatchRow, 'end').contact || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -2206,7 +2212,6 @@
|
||||
</div>
|
||||
</section-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section-card title="待调度列表">
|
||||
<template #extra>
|
||||
@@ -9319,11 +9324,11 @@ export default {
|
||||
}
|
||||
|
||||
&__dispatch-top {
|
||||
padding: 22px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__dispatch-heading {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
&__dispatch-heading-title {
|
||||
@@ -9334,51 +9339,46 @@ export default {
|
||||
}
|
||||
|
||||
&__dispatch-heading-name {
|
||||
font-size: 22px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
&__dispatch-heading-split {
|
||||
font-size: 20px;
|
||||
&__dispatch-heading-no {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
&__dispatch-heading-no {
|
||||
font-size: 15px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
&__dispatch-summary {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.15fr) minmax(520px, 1fr);
|
||||
gap: 32px;
|
||||
align-items: start;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
&__dispatch-summary-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
column-gap: 48px;
|
||||
row-gap: 18px;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 12px 24px;
|
||||
}
|
||||
|
||||
&__dispatch-summary-item {
|
||||
min-width: 0;
|
||||
|
||||
&.is-wide {
|
||||
grid-column: span 2;
|
||||
}
|
||||
}
|
||||
|
||||
&__dispatch-summary-label {
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
margin-bottom: 4px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
&__dispatch-summary-value {
|
||||
min-height: 24px;
|
||||
font-size: 15px;
|
||||
line-height: 1.45;
|
||||
color: #333;
|
||||
min-height: 20px;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
color: #303133;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
@@ -9388,24 +9388,29 @@ export default {
|
||||
|
||||
&__dispatch-attachment-link {
|
||||
display: inline-block;
|
||||
margin-right: 22px;
|
||||
margin-bottom: 6px;
|
||||
margin-right: 16px;
|
||||
margin-bottom: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
&__dispatch-route {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
|
||||
gap: 24px;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
min-height: 200px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
&__dispatch-route-item {
|
||||
&__dispatch-route-main {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 16px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
&__dispatch-route-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&__dispatch-route-badge {
|
||||
@@ -9413,11 +9418,11 @@ export default {
|
||||
flex: 0 0 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
border-radius: 6px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
|
||||
&.is-start {
|
||||
@@ -9429,35 +9434,21 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
&__dispatch-route-body {
|
||||
max-width: 340px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__dispatch-route-title {
|
||||
font-size: 22px;
|
||||
line-height: 1.25;
|
||||
font-size: 16px;
|
||||
line-height: 1.3;
|
||||
color: #303133;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
&__dispatch-route-address {
|
||||
margin-top: 12px;
|
||||
font-size: 15px;
|
||||
line-height: 1.45;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
&__dispatch-route-contact {
|
||||
margin-top: 10px;
|
||||
font-size: 15px;
|
||||
color: #333;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&__dispatch-route-line {
|
||||
position: relative;
|
||||
width: 72px;
|
||||
flex: 0 0 80px;
|
||||
height: 2px;
|
||||
max-width: 120px;
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
var(--el-color-primary) 0,
|
||||
@@ -9476,6 +9467,35 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
&__dispatch-route-detail {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px 24px;
|
||||
}
|
||||
|
||||
&__dispatch-route-detail-item {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&__dispatch-route-detail-label {
|
||||
margin-bottom: 4px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
&__dispatch-route-detail-value {
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
color: #303133;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
&__dispatch-route-detail-contact {
|
||||
margin-top: 4px;
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
&__dispatch-list-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -62,11 +62,11 @@ export default ({
|
||||
server: {
|
||||
port: 2888,
|
||||
proxy: {
|
||||
// 开发期同源代理:浏览器请求 /api/xxx -> 由 Vite 转发到 http://172.16.203.228:8000/api/xxx
|
||||
// 必须保留 /api 前缀(不要 rewrite 去掉),与 openresty/nginx 期望的路径一致,从而规避跨域(CORS)问题
|
||||
'/api': {
|
||||
target: 'http://localhost',
|
||||
//target: 'https://saber3.bladex.cn/api',
|
||||
target: 'http://172.16.203.228:8000',
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user