优化气站唯一标识排版与创建方类型展示
This commit is contained in:
42
docs/操作日志_气站唯一标识排版对齐_20260819.md
Normal file
42
docs/操作日志_气站唯一标识排版对齐_20260819.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# 气站唯一标识排版对齐操作日志
|
||||||
|
|
||||||
|
操作时间:2026-08-19 20:00:12
|
||||||
|
操作类型:修改
|
||||||
|
影响模块:气站管理系统 / 标准资源详情关联记录
|
||||||
|
|
||||||
|
## 操作前状态
|
||||||
|
|
||||||
|
- 气站端唯一标识按钮作为网格子项时会横向拉伸,短标识在整列中居中。
|
||||||
|
- 关联记录同一单元格内的业务名称与短标识没有左侧对齐,视觉上显得松散、错位。
|
||||||
|
- 平台总后台已经使用按内容宽度、左对齐和单行展示的实现。
|
||||||
|
|
||||||
|
## 具体操作
|
||||||
|
|
||||||
|
- 将气站端 `IdentityText` 的展示实现与平台总后台对齐。
|
||||||
|
- 唯一标识按钮增加内容宽度约束、左对齐、最大宽度和禁止换行样式。
|
||||||
|
- 补充可选 `displayText` 属性,保持组件接口与平台端一致且向下兼容。
|
||||||
|
- 排版修复不夹带合同名称等无关展示改动;创建方类型中文化由独立变更记录说明。
|
||||||
|
|
||||||
|
## 操作后状态
|
||||||
|
|
||||||
|
- 分配记录中的气站、配送点、配送人员和分配人均按“名称在上、短标识在下”左对齐展示。
|
||||||
|
- 短标识不再占满整列或居中错位,视觉效果与 5173 一致。
|
||||||
|
- 复制完整唯一标识的原有交互保持不变。
|
||||||
|
|
||||||
|
## 代码变更
|
||||||
|
|
||||||
|
- `frontend/gas_admin/src/components/IdentityText.vue`:组件属性和紧凑排版样式。
|
||||||
|
|
||||||
|
## 验证结果
|
||||||
|
|
||||||
|
- 气站端与平台端 `IdentityText.vue` 文件对比:无差异。
|
||||||
|
- `pnpm run type:check`:通过。
|
||||||
|
- `pnpm run contract:check`:通过,20 个资源。
|
||||||
|
- `pnpm run resource-pages:check`:通过,详情 20 类、新建 11 类、编辑 8 类。
|
||||||
|
- `pnpm run build`:通过。
|
||||||
|
|
||||||
|
## 风险评估
|
||||||
|
|
||||||
|
- 改动仅影响唯一标识的视觉排版和一个可选展示属性。
|
||||||
|
- `value` 必填属性、短标识截取规则、复制行为和业务数据均未改变。
|
||||||
|
- 组件为公共展示组件,因此气站端其他唯一标识位置也会同步获得一致的左对齐效果。
|
||||||
36
docs/操作日志_气站订单创建方类型中文化_20260819.md
Normal file
36
docs/操作日志_气站订单创建方类型中文化_20260819.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# 气站订单创建方类型中文化操作日志
|
||||||
|
|
||||||
|
操作时间:2026-08-19 20:03:00
|
||||||
|
操作类型:修改
|
||||||
|
影响模块:气站管理系统 / 配送订单详情
|
||||||
|
|
||||||
|
## 操作前状态
|
||||||
|
|
||||||
|
- 配送订单详情中的创建方类型直接展示接口枚举编码,例如 `user`。
|
||||||
|
|
||||||
|
## 具体操作
|
||||||
|
|
||||||
|
- 在气站端通用详情值格式化逻辑中增加创建方类型中文映射。
|
||||||
|
- 映射范围:`user=用户`、`staff=工作人员`、`delivery=配送点`、`gas=气站`。
|
||||||
|
- 未知编码保留原值并显示为“未知创建方类型(原值)”,便于排查历史数据。
|
||||||
|
|
||||||
|
## 操作后状态
|
||||||
|
|
||||||
|
- 创建方类型 `user` 展示为“用户”。
|
||||||
|
- 订单数据、提交参数及后端业务逻辑保持不变。
|
||||||
|
|
||||||
|
## 代码变更
|
||||||
|
|
||||||
|
- `frontend/gas_admin/src/api/resource-display.ts`:`displayRawValue` 增加创建方类型中文映射。
|
||||||
|
|
||||||
|
## 验证结果
|
||||||
|
|
||||||
|
- `pnpm run type:check`:通过。
|
||||||
|
- `pnpm run contract:check`:通过,20 个资源。
|
||||||
|
- `pnpm run resource-pages:check`:通过,详情 20 类、新建 11 类、编辑 8 类。
|
||||||
|
- `pnpm run build`:通过。
|
||||||
|
|
||||||
|
## 风险评估
|
||||||
|
|
||||||
|
- 改动仅影响详情文案格式化,不修改接口值。
|
||||||
|
- 对现有四类创建方编码兼容,未知值有明确兜底提示。
|
||||||
@@ -380,6 +380,17 @@ export function displayRawValue(key: string, value: unknown) {
|
|||||||
if (key === 'contract_readonly' && value === true)
|
if (key === 'contract_readonly' && value === true)
|
||||||
return '仅查看当前合同关联资料';
|
return '仅查看当前合同关联资料';
|
||||||
if (typeof value === 'boolean') return value ? '是' : '否';
|
if (typeof value === 'boolean') return value ? '是' : '否';
|
||||||
|
// 创建方类型由接口编码转换为业务名称,详情页不直接暴露英文枚举值。
|
||||||
|
if (key === 'creator_type') {
|
||||||
|
return (
|
||||||
|
{
|
||||||
|
user: '用户',
|
||||||
|
staff: '工作人员',
|
||||||
|
delivery: '配送点',
|
||||||
|
gas: '气站',
|
||||||
|
}[String(value)] ?? `未知创建方类型(${String(value)})`
|
||||||
|
);
|
||||||
|
}
|
||||||
if (key === 'status') return recordStatusLabel(Number(value));
|
if (key === 'status') return recordStatusLabel(Number(value));
|
||||||
if (key === 'contract_status') return contractStatusLabel(Number(value));
|
if (key === 'contract_status') return contractStatusLabel(Number(value));
|
||||||
if (key === 'previous_order_status' && Number(value) === 0) return '无';
|
if (key === 'previous_order_status' && Number(value) === 0) return '无';
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
<!-- 功能描述:紧凑展示资源唯一标识或复制入口,并支持点击复制完整值。版本:v1.2.0。 -->
|
||||||
<template>
|
<template>
|
||||||
<a-tooltip :content="`${value}\n点击复制完整唯一标识`">
|
<a-tooltip :content="`${value}\n点击复制完整唯一标识`">
|
||||||
<button class="identity-text" type="button" :aria-label="`复制完整唯一标识 ${value}`" @click="copyIdentity">
|
<button class="identity-text" type="button" :aria-label="`复制完整唯一标识 ${value}`" @click="copyIdentity">
|
||||||
{{ shortValue }}
|
{{ displayText ?? shortValue }}
|
||||||
</button>
|
</button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@@ -10,7 +11,7 @@
|
|||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
const props = defineProps<{ value: string }>();
|
const props = defineProps<{ value: string; displayText?: string }>();
|
||||||
const shortValue = computed(() => props.value.slice(-12));
|
const shortValue = computed(() => props.value.slice(-12));
|
||||||
|
|
||||||
async function copyIdentity() {
|
async function copyIdentity() {
|
||||||
@@ -25,9 +26,15 @@ async function copyIdentity() {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.identity-text {
|
.identity-text {
|
||||||
|
/* 网格子项保持内容宽度,避免按钮拉伸后文字居中形成多余空白。 */
|
||||||
|
justify-self: start;
|
||||||
|
width: fit-content;
|
||||||
|
max-width: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: rgb(var(--primary-6));
|
color: rgb(var(--primary-6));
|
||||||
font: inherit;
|
font: inherit;
|
||||||
|
text-align: left;
|
||||||
|
white-space: nowrap;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
Reference in New Issue
Block a user