vue3-element-plus-app-chu 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue3-element-plus-app-chu",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -20,6 +20,7 @@
20
20
  - 页面入口统一命名为 `Dcps<模块>Page`。
21
21
  - 页面内部的弹窗、表格、表单不再单独拆文件,直接写在 `index.vue` 中,相关状态和方法使用页面前缀区分。
22
22
  - 路由名使用 kebab-case(如 `forecast-create`)。
23
+ - DCPS 页面接口返回按 `any` 处理,接口封装可使用 `post<any>`,页面需要时可按 `any` 读取响应;业务字段类型定义在各页面本地 `typs.ts`。不要从 `@/utils/request` 导入公共 `ApiResponse`,也不要通过 `@chic/http` 的重导出导入该类型;仍按接口实际响应字段判断业务成功与失败。
23
24
 
24
25
  ## 路由与页面文件
25
26
 
@@ -47,7 +48,8 @@
47
48
  - `forecast/index.vue` 顶部使用一个普通 `<script>` 块保存列表记录缓存,跳转修改或详情前暂存列表行,用于补齐详情接口未返回的字段。
48
49
  - 侧边菜单配置在 `src/router/menus.ts`,其中 `name` 必须与对应路由的 `name` 保持一致;分组菜单通过 `children` 配置二级页面,页面的 `meta.menu` 指向自己的菜单项。
49
50
  - “注资/预注资管理”对应 `funding` 分组,包含注资明细查询和账户行余额查询申请两个页面;访问子页面时自动展开父菜单。旧地址 `/injection`、`/balance` 保留为对应页面的别名。
50
- - 数字人民币参数管理为末尾的独立菜单,页面文件为 `parameters/index.vue`、`parameters/api.ts`、`parameters/typs.ts`。页面复用“城银清算头寸管理-头寸参数”的五个接口,查询、详情及新增固定传 `moduleCode: '5'`。本次用户确认以 `paraName` 定位修改和删除:修改时锁定原参数名称、参数标志只读;删除使用由参数名称组成的 `sysParaList` 数组。当前本地后端仍返回模拟结果,不保存参数。
51
+ - 数字人民币参数管理为末尾的独立菜单,页面文件为 `parameters/index.vue`、`parameters/api.ts`、`parameters/typs.ts`,接口与类型均独立定义在该目录,不再依赖或保留 `city-clearing/` 目录。页面复用“城银清算头寸管理-头寸参数”的五个接口,`api.ts` 参照授权页面直接向 `@chic/http` 平铺传参,由 Axios 公共封装拆分为服务端所需的 `body`、`head` 等字段,不手动包装信封。页面查询调用只传 `keywords`、数字类型的 `pageIndex` 和 `pageSize`,`moduleCode: '5'` 由 API 内部固定添加,分页数字由封装层转换为字符串;详情只传参数名称,新增传六个字符串表单字段,两者的模块代码也由 API 固定添加。本次用户确认以 `paraName` 定位修改和删除:修改时锁定原参数名称、参数标志只读;删除向 API 传名称数组,由 API 转为平铺的 `sysParaList`。页面类型使用 `DigitalRmbParameter` 等独立类型,原始 Swagger 契约及 `docs/city-clearing-parameters*` 文档文件名保留。当前本地后端仍返回模拟结果,不保存参数。
52
+ - 数字人民币参数管理以数字人民币授权页面为布局参考,统一筛选区、填满剩余高度的表格以及包含摘要和分组字段的详情弹窗样式。
51
53
  - `src/layout/index.vue` 使用 `<KeepAlive include="DcpsForecastPage">` 缓存头寸预报页面;新增、修改、详情按路由 `key` 分别缓存,返回列表时自动重新查询。
52
54
 
53
55
  ## 新增页面检查清单
@@ -1,26 +1,33 @@
1
- import parameterApi from '../city-clearing/parameters/api'
2
- import type { ParameterEditBody, ParameterFormValues, ParameterQueryParams } from './typs'
1
+ import baseHttpClient from '@chic/http'
2
+ import type {
3
+ ParameterEditBody,
4
+ ParameterFormValues,
5
+ ParameterQueryParams,
6
+ } from './typs'
3
7
 
4
8
  const moduleCode = '5'
5
9
 
10
+ // 与授权页面一致,平铺传参,由 Axios 封装器拆分公共头、业务体并转换分页字段。
6
11
  export default {
7
12
  queryListApi: ({ keywords, pageIndex, pageSize }: ParameterQueryParams) =>
8
- parameterApi.queryListApi({
9
- head: { pageIndex: String(pageIndex), pageSize: String(pageSize) },
10
- body: { moduleCode, keywords },
13
+ baseHttpClient.post<any>('/TAM/0001/140305001', {
14
+ moduleCode,
15
+ keywords,
16
+ pageIndex,
17
+ pageSize,
11
18
  }),
12
19
 
13
20
  getDetailApi: (paraName: string) =>
14
- parameterApi.getDetailApi({ body: { moduleCode, paraName } }),
21
+ baseHttpClient.post<any>('/TAM/0001/140305002', { moduleCode, paraName }),
15
22
 
16
23
  addApi: (values: ParameterFormValues) =>
17
- parameterApi.addApi({ body: { ...values, moduleCode } }),
24
+ baseHttpClient.post<any>('/TAM/0001/120305002', { ...values, moduleCode }),
18
25
 
19
26
  // 用户确认以原参数名称定位;原始修改契约不包含 moduleCode、paraMark。
20
27
  editApi: (values: ParameterEditBody) =>
21
- parameterApi.editApi({ body: values }),
28
+ baseHttpClient.post<any>('/TAM/0001/120305003', values),
22
29
 
23
30
  // 用户确认 sysParaList 的元素为参数名称;删除契约没有模块字段。
24
31
  deleteApi: (paraNames: string[]) =>
25
- parameterApi.deleteApi({ body: { sysParaList: [...paraNames] } }),
32
+ baseHttpClient.post<any>('/TAM/0001/120305001', { sysParaList: [...paraNames] }),
26
33
  }
@@ -2,7 +2,6 @@
2
2
  import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
3
3
  import { ElConfigProvider, ElMessage } from 'element-plus'
4
4
  import { ArtDataTable, type ColumnOption, type PaginationOptions, type TableSettings } from '@/components/table'
5
- import type { ApiResponse } from '@/utils/request'
6
5
  import API from './api'
7
6
  import type { DigitalRmbParameter, ParameterFormValues, ParameterListBody } from './typs'
8
7
 
@@ -20,6 +19,11 @@ const parameterFields = [
20
19
  { key: 'remark', label: '备注', multiline: true },
21
20
  ] as const
22
21
 
22
+ const detailGroups = [
23
+ { title: '参数配置', fields: parameterFields.filter(({ key }) => key === 'paraType' || key === 'paraMark' || key === 'paraValue') },
24
+ { title: '说明信息', fields: parameterFields.filter(({ key }) => key === 'paraDesc' || key === 'remark') },
25
+ ]
26
+
23
27
  const createFormValues = (parameter: DigitalRmbParameter = {}): ParameterFormValues => ({
24
28
  paraName: parameter.paraName ?? '',
25
29
  paraType: parameter.paraType ?? '',
@@ -32,7 +36,7 @@ const createFormValues = (parameter: DigitalRmbParameter = {}): ParameterFormVal
32
36
  const errorMessage = (error: unknown): string =>
33
37
  error instanceof Error && error.message.trim() ? error.message : '请求失败,请稍后重试'
34
38
 
35
- const ensureSuccess = <T,>(response: ApiResponse<T>, fallback: string): T | null => {
39
+ const ensureSuccess = (response: any, fallback: string): any => {
36
40
  if (response?.head?.retCode !== '00000') {
37
41
  throw new Error(response?.head?.retMsg?.trim() || fallback)
38
42
  }
@@ -62,8 +66,8 @@ const keywords = ref('')
62
66
  let appliedKeywords = ''
63
67
  const rows = ref<DigitalRmbParameter[]>([])
64
68
  const selectedRows = ref<DigitalRmbParameter[]>([])
65
- const pagination = reactive({ current: 1, size: 15, total: 0 })
66
- const paginationOptions: PaginationOptions = { align: 'right', pageSizes: [15, 30, 50, 100], background: false }
69
+ const pagination = reactive({ current: 1, size: 10, total: 0 })
70
+ const paginationOptions: PaginationOptions = { align: 'right', pageSizes: [10, 20, 50], background: false }
67
71
  const tableSettings = ref<TableSettings>({ size: 'small', stripe: true, border: true, headerBackground: true })
68
72
  const tableRef = ref<InstanceType<typeof ArtDataTable> | null>(null)
69
73
  const showSearchBar = ref(true)
@@ -83,14 +87,14 @@ const textColumn = (prop: keyof DigitalRmbParameter, label: string, minWidth: nu
83
87
 
84
88
  const tableColumns: ColumnOption<DigitalRmbParameter>[] = [
85
89
  { type: 'selection', width: 42, fixed: 'left', selectable: hasName },
86
- { type: 'globalIndex', label: '序号', width: 60, align: 'center' },
90
+ { type: 'globalIndex', label: '序号', width: 80, align: 'center' },
87
91
  { ...textColumn('paraName', '参数名称', 180), useSlot: true, slotName: 'name' },
88
92
  textColumn('paraType', '参数类型', 110),
89
93
  textColumn('paraMark', '参数标志', 110),
90
94
  { ...textColumn('paraValue', '参数值', 190), useSlot: true, slotName: 'value' },
91
95
  textColumn('paraDesc', '参数描述', 220),
92
96
  textColumn('remark', '备注', 180),
93
- { key: 'actions', label: '操作', width: 170, fixed: 'right', align: 'center', useSlot: true },
97
+ { key: 'actions', label: '操作', width: 200, fixed: 'right', align: 'center', useSlot: true },
94
98
  ]
95
99
 
96
100
  const clearSelection = () => {
@@ -171,7 +175,7 @@ const dialogError = ref('')
171
175
  const dialogSource = ref<DigitalRmbParameter | null>(null)
172
176
  const form = ref(createFormValues())
173
177
  const formNameError = ref('')
174
- const dialogTitle = computed(() => ({ create: '新增参数', edit: '修改参数', detail: '参数详情' })[dialogMode.value])
178
+ const dialogTitle = computed(() => ({ create: '新增参数', edit: '修改参数', detail: '数字人民币参数详情' })[dialogMode.value])
175
179
  const dialogBusy = computed(() => dialogLoading.value || writing.value)
176
180
 
177
181
  const openCreateDialog = () => {
@@ -306,11 +310,11 @@ onBeforeUnmount(() => {
306
310
  <template>
307
311
  <ElConfigProvider :size="tableSettings.size">
308
312
  <main class="dcps-page">
309
- <el-card class="parameter-header" shadow="never" :body-style="{ padding: '12px 14px' }">
310
- <h1>数字人民币参数管理</h1>
313
+ <!-- 与授权页统一:查询卡片整体显隐,筛选项上方显示标签,操作按钮靠右。 -->
314
+ <el-card v-show="showSearchBar" class="parameter-search" shadow="never" :body-style="{ padding: '10px' }">
311
315
  <el-form
312
- v-show="showSearchBar"
313
316
  class="filter-form"
317
+ :size="tableSettings.size"
314
318
  label-position="top"
315
319
  :disabled="listBusy"
316
320
  @submit.prevent="search()"
@@ -357,7 +361,7 @@ onBeforeUnmount(() => {
357
361
  </div>
358
362
  </template>
359
363
  <template #name="{ row }">
360
- <el-button v-if="hasName(row)" class="parameter-name" link type="primary" :disabled="listBusy" @click.stop="openParameterDialog(row)">
364
+ <el-button v-if="hasName(row)" class="parameter-name" link type="primary" :disabled="listBusy" @click.stop="openParameterDialog(row)" @dblclick.stop>
361
365
  {{ row.paraName }}
362
366
  </el-button>
363
367
  <span v-else>—</span>
@@ -366,9 +370,9 @@ onBeforeUnmount(() => {
366
370
  <span class="parameter-value">{{ displayValue(row.paraValue) }}</span>
367
371
  </template>
368
372
  <template #actions="{ row }">
369
- <el-button link type="primary" :disabled="listBusy || !hasName(row)" @click.stop="openParameterDialog(row)">详情</el-button>
370
- <el-button link type="primary" :disabled="listBusy || !hasName(row)" @click.stop="openParameterDialog(row, 'edit')">修改</el-button>
371
- <el-button link type="danger" :disabled="listBusy || !hasName(row)" @click.stop="openDeleteDialog([row])">删除</el-button>
373
+ <el-button text bg type="primary" :disabled="listBusy || !hasName(row)" @click.stop="openParameterDialog(row)" @dblclick.stop>详情</el-button>
374
+ <el-button text bg type="primary" :disabled="listBusy || !hasName(row)" @click.stop="openParameterDialog(row, 'edit')" @dblclick.stop>修改</el-button>
375
+ <el-button text bg type="danger" :disabled="listBusy || !hasName(row)" @click.stop="openDeleteDialog([row])" @dblclick.stop>删除</el-button>
372
376
  </template>
373
377
  </ArtDataTable>
374
378
  </div>
@@ -376,7 +380,9 @@ onBeforeUnmount(() => {
376
380
  <el-dialog
377
381
  v-model="dialogVisible"
378
382
  :title="dialogTitle"
379
- width="min(660px, calc(100vw - 32px))"
383
+ :style="dialogMode === 'detail' ? { '--el-dialog-padding-primary': '10px', padding: '10px 16px', marginBottom: '16px' } : undefined"
384
+ :width="dialogMode === 'detail' ? 'min(1280px, calc(100vw - 32px))' : 'min(540px, calc(100vw - 32px))'"
385
+ :top="dialogMode === 'detail' ? '16px' : '15vh'"
380
386
  append-to-body
381
387
  destroy-on-close
382
388
  :show-close="!writing"
@@ -385,14 +391,33 @@ onBeforeUnmount(() => {
385
391
  @close="closeParameterDialog"
386
392
  >
387
393
  <el-alert v-if="dialogError" class="dialog-error" :title="dialogError" type="error" show-icon :closable="false" />
388
- <el-scrollbar max-height="min(62vh, 620px)">
394
+ <el-scrollbar :class="{ 'detail-scrollbar': dialogMode === 'detail' }" :max-height="dialogMode === 'detail' ? undefined : 'min(62vh, 620px)'">
389
395
  <div v-if="dialogLoading" class="detail-loading" role="status">正在读取参数详情…</div>
390
- <dl v-else-if="dialogMode === 'detail' && dialogReady" class="detail-fields">
391
- <div v-for="field in parameterFields" :key="field.key" class="detail-field" :class="{ 'detail-field--wide': field.multiline }">
392
- <dt>{{ field.label }}</dt>
393
- <dd :class="{ 'parameter-value': field.key === 'paraValue' }">{{ displayValue(form[field.key]) }}</dd>
394
- </div>
395
- </dl>
396
+ <div v-else-if="dialogMode === 'detail' && dialogReady" class="detail-content">
397
+ <header class="detail-summary">
398
+ <div class="detail-reference">
399
+ <span class="detail-label">参数名称</span>
400
+ <strong>{{ displayValue(form.paraName) }}</strong>
401
+ </div>
402
+ <div>
403
+ <span class="detail-label">参数类型</span>
404
+ <strong class="detail-status">{{ displayValue(form.paraType) }}</strong>
405
+ </div>
406
+ <div>
407
+ <span class="detail-label">参数标志</span>
408
+ <strong class="detail-status">{{ displayValue(form.paraMark) }}</strong>
409
+ </div>
410
+ </header>
411
+ <section v-for="group in detailGroups" :key="group.title" class="detail-group" :aria-label="group.title">
412
+ <h3>{{ group.title }}</h3>
413
+ <dl class="detail-fields">
414
+ <div v-for="field in group.fields" :key="field.key" class="detail-field" :class="{ 'detail-field--wide': field.multiline }">
415
+ <dt>{{ field.label }}</dt>
416
+ <dd :class="{ 'parameter-value': field.key === 'paraValue' }">{{ displayValue(form[field.key]) }}</dd>
417
+ </div>
418
+ </dl>
419
+ </section>
420
+ </div>
396
421
  <el-form
397
422
  v-else-if="dialogMode !== 'detail' && dialogReady"
398
423
  id="parameter-editor-form"
@@ -439,7 +464,7 @@ onBeforeUnmount(() => {
439
464
  <el-dialog
440
465
  v-model="deleteDialogVisible"
441
466
  title="删除参数"
442
- width="min(460px, calc(100vw - 32px))"
467
+ width="min(540px, calc(100vw - 32px))"
443
468
  append-to-body
444
469
  destroy-on-close
445
470
  :show-close="!writing"
@@ -462,6 +487,7 @@ onBeforeUnmount(() => {
462
487
 
463
488
  <style scoped>
464
489
  .dcps-page {
490
+ box-sizing: border-box;
465
491
  display: flex;
466
492
  flex-direction: column;
467
493
  gap: 5px;
@@ -473,34 +499,61 @@ onBeforeUnmount(() => {
473
499
  overflow: hidden;
474
500
  background: var(--el-bg-color-page, #f7f8fa);
475
501
  }
476
- .parameter-header { flex: 0 0 auto; }
477
- .parameter-header h1 { margin: 0; font-size: 15px; font-weight: 600; line-height: 24px; }
478
- .filter-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 12px; }
479
- .filter-form :deep(.el-form-item) { flex: 0 1 360px; min-width: 160px; margin: 0; }
502
+ .parameter-search {
503
+ flex: 0 0 auto;
504
+ max-height: 42%;
505
+ max-height: min(42dvh, 360px);
506
+ min-height: 0;
507
+ overflow-y: auto;
508
+ }
509
+ .filter-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
510
+ .filter-form :deep(.el-form-item) { flex: 1 0 105px; min-width: 0; margin: 0; }
480
511
  .filter-form :deep(.el-form-item__label) { margin-bottom: 4px; }
481
- .filter-actions { flex-shrink: 0; }
512
+ .filter-actions { flex-shrink: 0; margin-left: auto; }
482
513
  .parameter-table-region { flex: 1; min-width: 0; min-height: 0; }
483
514
  .table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
484
515
  .table-actions :deep(.el-button + .el-button) { margin-left: 0; }
485
516
  .selection-count { margin-left: 4px; color: var(--el-text-color-secondary); font-size: 12px; white-space: nowrap; }
486
517
  .parameter-name { display: inline; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: left; vertical-align: middle; }
487
518
  .parameter-value { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-variant-numeric: tabular-nums; white-space: pre-wrap; }
488
- .parameter-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; padding: 2px 4px; }
519
+ .parameter-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
489
520
  .form-item--wide { grid-column: 1 / -1; }
490
521
  .parameter-form :deep(.el-input__inner[readonly]) { color: var(--el-text-color-secondary); }
491
522
  .dialog-error { margin-bottom: 14px; }
492
523
  .detail-loading { padding: 40px 0; color: var(--el-text-color-secondary); text-align: center; }
493
- .detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--el-border-color-lighter); border-radius: 8px; background: var(--el-border-color-lighter); }
494
- .detail-field { min-width: 0; padding: 12px 14px; background: var(--el-bg-color); }
524
+ .detail-scrollbar :deep(.el-scrollbar__wrap) {
525
+ max-height: calc(100vh - 120px);
526
+ max-height: calc(100dvh - 120px);
527
+ }
528
+ .detail-content { display: grid; gap: 8px; font-size: 13px; line-height: 1.4; }
529
+ .detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; border-radius: 8px; background: var(--el-color-primary-light-9); overflow-wrap: anywhere; }
530
+ .detail-label,
531
+ .detail-field dt { color: var(--el-text-color-secondary); font-size: 12px; }
532
+ .detail-reference { display: grid; grid-column: span 2; align-content: start; gap: 4px; }
533
+ .detail-reference strong { color: var(--el-text-color-primary); font-size: 15px; }
534
+ .detail-status { display: block; margin-top: 6px; color: var(--el-text-color-primary); font-size: 15px; }
535
+ .detail-group { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: start; gap: 8px; padding: 12px; border: 1px solid var(--el-border-color-lighter); border-radius: 8px; }
536
+ .detail-group h3 { margin: 4px 0 0; padding-left: 8px; border-left: 3px solid var(--el-color-primary); color: var(--el-text-color-primary); font-size: 14px; line-height: 20px; }
537
+ .detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
538
+ .detail-field { min-width: 0; padding: 8px 12px; border-radius: 6px; background: var(--el-fill-color-lighter); }
495
539
  .detail-field--wide { grid-column: 1 / -1; }
496
- .detail-field dt { margin-bottom: 6px; color: var(--el-text-color-secondary); font-size: 12px; }
497
- .detail-field dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.6; }
540
+ .detail-field dd { margin: 2px 0 0; color: var(--el-text-color-primary); font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
498
541
  .delete-description { margin: 0 0 12px; line-height: 1.6; }
499
542
  .delete-list { margin: 0 0 14px; padding: 12px 14px 12px 32px; border-radius: 8px; background: var(--el-fill-color-light); }
500
543
  .delete-list li { padding: 3px 0; overflow-wrap: anywhere; }
544
+ @media (max-width: 1024px) {
545
+ .detail-group { grid-template-columns: minmax(0, 1fr); }
546
+ .detail-group h3 { margin-top: 0; }
547
+ .detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
548
+ }
549
+ @media (max-width: 600px) {
550
+ .detail-summary, .detail-fields { grid-template-columns: minmax(0, 1fr); }
551
+ .detail-reference { grid-column: auto; }
552
+ }
501
553
  @media (max-width: 540px) {
502
554
  .filter-form :deep(.el-form-item) { flex-basis: 100%; }
503
- .parameter-form, .detail-fields { grid-template-columns: minmax(0, 1fr); }
555
+ .filter-actions { margin-left: 0; }
556
+ .parameter-form { grid-template-columns: minmax(0, 1fr); }
504
557
  .selection-count { width: 100%; margin-left: 0; }
505
558
  }
506
559
  </style>
@@ -1,13 +1,28 @@
1
- import type {
2
- CityClearingParameter,
3
- Tam120305003InBody,
4
- Tam140305001OutBody,
5
- } from '../city-clearing/parameters/typs'
1
+ /** 数字人民币头寸参数,字段及可选性对应原始接口契约。 */
2
+ export interface DigitalRmbParameter {
3
+ /** 参数描述 */
4
+ paraDesc?: string
5
+ /** 参数标志;接口未声明取值或枚举。 */
6
+ paraMark?: string
7
+ /** 参数名称;页面使用原名称定位详情、修改和删除。 */
8
+ paraName?: string
9
+ /** 参数类型;接口未声明取值或枚举。 */
10
+ paraType?: string
11
+ /** 参数值,保留原始字符串。 */
12
+ paraValue?: string
13
+ /** 备注 */
14
+ remark?: string
15
+ }
16
+
17
+ /** 列表响应,totalCount 按原始契约保留字符串。 */
18
+ export interface ParameterListBody {
19
+ resultList?: DigitalRmbParameter[]
20
+ totalCount?: string
21
+ }
22
+
23
+ /** 修改接口仅支持这五个参数字段,不包含模块代码和参数标志。 */
24
+ export type ParameterEditBody = Omit<DigitalRmbParameter, 'paraMark'>
6
25
 
7
- /** 数字人民币复用头寸参数契约,所有参数字段保留字符串。 */
8
- export type DigitalRmbParameter = CityClearingParameter
9
- export type ParameterListBody = Tam140305001OutBody
10
- export type ParameterEditBody = Tam120305003InBody
11
26
  export type ParameterFormValues = Required<DigitalRmbParameter>
12
27
 
13
28
  /** 模块由页面接口固定为数币,调用处只提供关键字和公共分页。 */
@@ -1,36 +0,0 @@
1
- import baseHttpClient, { type ApiResponse } from '@chic/http'
2
- import type {
3
- CityClearingParameterParams,
4
- Tam120305001InBody,
5
- Tam120305001OutBody,
6
- Tam120305002InBody,
7
- Tam120305002OutBody,
8
- Tam120305003InBody,
9
- Tam120305003OutBody,
10
- Tam140305001InBody,
11
- Tam140305001OutBody,
12
- Tam140305002InBody,
13
- Tam140305002OutBody,
14
- } from './typs'
15
-
16
- export default {
17
- /** 查询头寸参数;城银清 moduleCode 为 3,分页放在公共 head 中。 */
18
- queryListApi: (params: CityClearingParameterParams<Tam140305001InBody>) =>
19
- baseHttpClient.post<ApiResponse<Tam140305001OutBody>>('/TAM/0001/140305001', params),
20
-
21
- /** 查询参数详情;附件未声明 paraName 的唯一性或必填规则。 */
22
- getDetailApi: (params: CityClearingParameterParams<Tam140305002InBody>) =>
23
- baseHttpClient.post<ApiResponse<Tam140305002OutBody>>('/TAM/0001/140305002', params),
24
-
25
- /** 新增头寸参数;当前本地接口仅返回模拟响应,不保存参数。 */
26
- addApi: (params: CityClearingParameterParams<Tam120305002InBody>) =>
27
- baseHttpClient.post<ApiResponse<Tam120305002OutBody>>('/TAM/0001/120305002', params),
28
-
29
- /** 修改头寸参数;附件未提供明确的记录定位规则。 */
30
- editApi: (params: CityClearingParameterParams<Tam120305003InBody>) =>
31
- baseHttpClient.post<ApiResponse<Tam120305003OutBody>>('/TAM/0001/120305003', params),
32
-
33
- /** 删除头寸参数;sysParaList 数组项的标识含义尚未定义。 */
34
- deleteApi: (params: CityClearingParameterParams<Tam120305001InBody>) =>
35
- baseHttpClient.post<ApiResponse<Tam120305001OutBody>>('/TAM/0001/120305001', params),
36
- }
@@ -1,82 +0,0 @@
1
- import type { DigitalRmbHead } from '@/utils/digital-rmb-request'
2
-
3
- /** 城银清算头寸参数接口类型,字段及可选性对应附件原始 schema。 */
4
- export interface CityClearingParameter {
5
- /** 参数描述 */
6
- paraDesc?: string
7
- /** 参数标志;附件未声明取值或枚举。 */
8
- paraMark?: string
9
- /** 参数名称;附件未声明唯一性。 */
10
- paraName?: string
11
- /** 参数类型;附件未声明取值或枚举。 */
12
- paraType?: string
13
- /** 参数值,保留原始字符串。 */
14
- paraValue?: string
15
- /** 备注 */
16
- remark?: string
17
- }
18
-
19
- /** Tam120305001In.Body:删除;数组项对应的标识含义尚未声明。 */
20
- export interface Tam120305001InBody {
21
- sysParaList?: string[]
22
- }
23
-
24
- /** Tam120305002In.Body:新增;原始 schema 未声明必填字段。 */
25
- export interface Tam120305002InBody extends CityClearingParameter {
26
- /** 模块代码:1 人民币、2 外币、3 城银清、4 跨境、5 数币。 */
27
- moduleCode?: string
28
- }
29
-
30
- /** Tam120305003In.Body:修改;附件没有模块代码、原始参数名称或独立标识字段。 */
31
- export interface Tam120305003InBody {
32
- /** 参数说明 */
33
- paraDesc?: string
34
- /** 参数名称,不能据此推断唯一定位规则。 */
35
- paraName?: string
36
- /** 原始字段说明为“备注”,字段名仍为 paraType。 */
37
- paraType?: string
38
- /** 参数值 */
39
- paraValue?: string
40
- /** 备注 */
41
- remark?: string
42
- }
43
-
44
- /** Tam140305001In.Body:列表查询,仅 moduleCode 在原始 schema 中必填。 */
45
- export interface Tam140305001InBody {
46
- /** 查询关键字 */
47
- keywords?: string
48
- /** 模块代码;城银清使用 3。 */
49
- moduleCode: string
50
- }
51
-
52
- /** Tam140305002In.Body:详情查询,仅 moduleCode 在原始 schema 中必填。 */
53
- export interface Tam140305002InBody {
54
- /** 模块代码;城银清使用 3。 */
55
- moduleCode: string
56
- /** 参数名称;原始 schema 未声明必填或唯一性。 */
57
- paraName?: string
58
- }
59
-
60
- /** 三个写接口的原始响应 body 均未声明业务字段。 */
61
- export type Tam120305001OutBody = Record<string, never>
62
- export type Tam120305002OutBody = Record<string, never>
63
- export type Tam120305003OutBody = Record<string, never>
64
-
65
- /** Tam140305001Out.Body */
66
- export interface Tam140305001OutBody {
67
- resultList?: CityClearingParameter[]
68
- /** 总条数,按契约保留字符串。 */
69
- totalCount?: string
70
- }
71
-
72
- /** 与列表行使用相同的六个参数字段,原始 schema 均未声明必填。 */
73
- export type Tam140305002OutBody = CityClearingParameter
74
-
75
- /** 复用现有公共头类型,支持显式 TAM 信封或业务字段平铺。 */
76
- export type CityClearingParameterParams<T> =
77
- | {
78
- body: T
79
- head?: DigitalRmbHead
80
- appHead?: { ip?: string; opType?: string }
81
- }
82
- | (T & Omit<DigitalRmbHead, 'tranDate'> & { ip?: string; opType?: string })