verce-vue-test 0.0.107 → 0.0.108

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": "verce-vue-test",
3
- "version": "0.0.107",
3
+ "version": "0.0.108",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -48,11 +48,11 @@ export function updateForeignCurrencyFundAllocation(
48
48
 
49
49
  /** 根据调拨单号删除外币资金调拨(120206003)。 */
50
50
  export function deleteForeignCurrencyFundAllocation(
51
- refNo: string,
51
+ refNos: string,
52
52
  ) {
53
53
  return baseHttpClient.post<any>(
54
54
  '/TAM/0001/120206003',
55
- { refNos: refNo },
55
+ { refNos },
56
56
  )
57
57
  }
58
58
 
@@ -61,14 +61,14 @@ export function deleteForeignCurrencyFundAllocation(
61
61
  * type 为 Y 时审批通过;为 N 时审批拒绝,并提交拒绝原因。
62
62
  */
63
63
  export function reviewForeignCurrencyFundAllocation(
64
- refNo: string,
64
+ refNos: string,
65
65
  type: ForeignCurrencyFundAllocationReviewType,
66
66
  approveRjctReason = '',
67
67
  ) {
68
68
  return baseHttpClient.post<any>(
69
69
  '/TAM/0001/120206004',
70
70
  {
71
- refNos: refNo,
71
+ refNos,
72
72
  type,
73
73
  ...(type === 'N' ? { approveRjctReason } : {}),
74
74
  },
@@ -129,6 +129,7 @@ const sharedQueryParams = computed<ForeignCurrencyFundAllocationFilter>(() => (
129
129
  cloneFilter(appliedFilters.value)
130
130
  ))
131
131
  const records = ref<ForeignCurrencyFundAllocationRow[]>([])
132
+ const selectedRows = ref<ForeignCurrencyFundAllocationRow[]>([])
132
133
  const totalCount = ref(0)
133
134
  const currentPage = ref(1)
134
135
  const pageSize = ref(10)
@@ -176,7 +177,7 @@ const editAmountInput = computed({
176
177
  editForm.amtEdit = sanitizeAmountInput(value)
177
178
  },
178
179
  })
179
- const activeRowAction = ref<{ refNo: string; action: RowAction } | null>(null)
180
+ const activeBatchAction = ref<RowAction | null>(null)
180
181
  const accountBankOptions = ref<AccountBankOption[]>([])
181
182
  const accountBankLoading = ref(false)
182
183
  const columnComponentMap: Record<string, string> = {
@@ -381,9 +382,8 @@ function canDeleteStatus(status: string) {
381
382
  return ['N', 'C'].includes(statusCode(status))
382
383
  }
383
384
 
384
- function isActionLoading(row: ForeignCurrencyFundAllocationRow, action: RowAction) {
385
- return activeRowAction.value?.refNo === row.refNo
386
- && activeRowAction.value.action === action
385
+ function handleSelectionChange(rows: ForeignCurrencyFundAllocationRow[]) {
386
+ selectedRows.value = rows
387
387
  }
388
388
 
389
389
  function yesNoLabel(value: string) {
@@ -636,16 +636,26 @@ async function handleEditSubmit(action: EditAction) {
636
636
  }
637
637
  }
638
638
 
639
- async function handleDelete(row: ForeignCurrencyFundAllocationRow) {
640
- if (activeRowAction.value) return
641
- if (!canDeleteStatus(row.status)) {
642
- ElMessage.warning('只有审批未通过或草稿状态的调拨记录才能删除')
639
+ async function handleDelete() {
640
+ if (activeBatchAction.value) return
641
+ if (selectedRows.value.length === 0) {
642
+ await ElMessageBox.alert('请至少选择一条调拨记录', '操作提醒', { type: 'warning' })
643
643
  return
644
644
  }
645
+ const invalidRows = selectedRows.value.filter((row) => !canDeleteStatus(row.status))
646
+ if (invalidRows.length > 0) {
647
+ await ElMessageBox.alert(
648
+ `调拨单号 ${invalidRows.map((row) => row.refNo).join('、')} 不符合删除条件,只有审批未通过或草稿状态的调拨记录才能删除。`,
649
+ '操作提醒',
650
+ { type: 'warning' },
651
+ )
652
+ return
653
+ }
654
+ const refNos = selectedRows.value.map((row) => row.refNo).join(',')
645
655
 
646
656
  try {
647
657
  await ElMessageBox.confirm(
648
- `确认删除调拨记录 ${row.refNo} 吗?删除后无法恢复。`,
658
+ `确认删除已选择的 ${selectedRows.value.length} 条调拨记录吗?删除后无法恢复。`,
649
659
  '删除确认',
650
660
  {
651
661
  confirmButtonText: '确认删除',
@@ -657,40 +667,50 @@ async function handleDelete(row: ForeignCurrencyFundAllocationRow) {
657
667
  return
658
668
  }
659
669
 
660
- activeRowAction.value = { refNo: row.refNo, action: 'delete' }
670
+ activeBatchAction.value = 'delete'
661
671
  try {
662
- const response = await deleteForeignCurrencyFundAllocation(row.refNo) as any
663
- if (detailRecord.value?.refNo === row.refNo) {
672
+ const response = await deleteForeignCurrencyFundAllocation(refNos) as any
673
+ if (detailRecord.value && selectedRows.value.some((row) => row.refNo === detailRecord.value?.refNo)) {
664
674
  detailVisible.value = false
665
675
  detailRecord.value = null
666
676
  }
667
- if (records.value.length === 1 && currentPage.value > 1) currentPage.value -= 1
677
+ if (records.value.length === selectedRows.value.length && currentPage.value > 1) currentPage.value -= 1
678
+ selectedRows.value = []
668
679
  ElMessage.success(response.head.retMsg || '删除成功')
669
680
  await loadRows()
670
681
  } catch (error) {
671
682
  ElMessage.error(error instanceof Error ? error.message : '外币资金调拨删除失败')
672
683
  } finally {
673
- activeRowAction.value = null
684
+ activeBatchAction.value = null
674
685
  }
675
686
  }
676
687
 
677
688
  async function handleReview(
678
- row: ForeignCurrencyFundAllocationRow,
679
689
  type: ForeignCurrencyFundAllocationReviewType,
680
690
  ) {
681
- if (activeRowAction.value) return
682
- if (!isPendingStatus(row.status)) {
683
- ElMessage.warning('只有待审核状态的调拨记录才能通过或拒绝')
691
+ if (activeBatchAction.value) return
692
+ if (selectedRows.value.length === 0) {
693
+ await ElMessageBox.alert('请至少选择一条调拨记录', '操作提醒', { type: 'warning' })
694
+ return
695
+ }
696
+ const invalidRows = selectedRows.value.filter((row) => !isPendingStatus(row.status))
697
+ if (invalidRows.length > 0) {
698
+ await ElMessageBox.alert(
699
+ `调拨单号 ${invalidRows.map((row) => row.refNo).join('、')} 不符合审批条件,只有待审核状态的调拨记录才能通过或拒绝。`,
700
+ '操作提醒',
701
+ { type: 'warning' },
702
+ )
684
703
  return
685
704
  }
686
705
 
687
706
  const approved = type === 'Y'
688
707
  const actionText = approved ? '通过' : '拒绝'
708
+ const refNos = selectedRows.value.map((row) => row.refNo).join(',')
689
709
  let approveRjctReason = ''
690
710
  try {
691
711
  if (approved) {
692
712
  await ElMessageBox.confirm(
693
- `确认通过调拨记录 ${row.refNo} 吗?`,
713
+ `确认通过已选择的 ${selectedRows.value.length} 条调拨记录吗?`,
694
714
  '通过确认',
695
715
  {
696
716
  confirmButtonText: '确认通过',
@@ -700,7 +720,7 @@ async function handleReview(
700
720
  )
701
721
  } else {
702
722
  const result = await ElMessageBox.prompt(
703
- `请填写调拨记录 ${row.refNo} 的拒绝原因`,
723
+ `请填写已选择的 ${selectedRows.value.length} 条调拨记录的拒绝原因`,
704
724
  '拒绝确认',
705
725
  {
706
726
  confirmButtonText: '确认拒绝',
@@ -718,19 +738,16 @@ async function handleReview(
718
738
  }
719
739
 
720
740
  const action: RowAction = approved ? 'approve' : 'reject'
721
- activeRowAction.value = { refNo: row.refNo, action }
741
+ activeBatchAction.value = action
722
742
  try {
723
- const response = await reviewForeignCurrencyFundAllocation(row.refNo, type, approveRjctReason) as any
743
+ const response = await reviewForeignCurrencyFundAllocation(refNos, type, approveRjctReason) as any
744
+ selectedRows.value = []
724
745
  ElMessage.success(response.head.retMsg || `${actionText}成功`)
725
746
  await loadRows()
726
- const refreshedRecord = records.value.find((item) => item.refNo === row.refNo)
727
- if (detailRecord.value?.refNo === row.refNo && refreshedRecord) {
728
- detailRecord.value = refreshedRecord
729
- }
730
747
  } catch (error) {
731
748
  ElMessage.error(error instanceof Error ? error.message : `外币资金调拨${actionText}失败`)
732
749
  } finally {
733
- activeRowAction.value = null
750
+ activeBatchAction.value = null
734
751
  }
735
752
  }
736
753
 
@@ -848,11 +865,44 @@ onMounted(() => {
848
865
  col-btn-size="small"
849
866
  @pagination-change="handlePaginationChange"
850
867
  @row-dblclick="openDetail"
868
+ @selection-change="handleSelectionChange"
851
869
  >
852
870
  <template #toolbar>
853
871
  <el-button type="primary" size="small" :icon="Plus" @click="openCreate">
854
872
  新增
855
873
  </el-button>
874
+ <el-button
875
+ type="danger"
876
+ plain
877
+ size="small"
878
+ :icon="Delete"
879
+ :loading="activeBatchAction === 'delete'"
880
+ :disabled="selectedRows.length === 0 || activeBatchAction !== null"
881
+ @click="handleDelete"
882
+ >
883
+ 删除
884
+ </el-button>
885
+ <el-button
886
+ type="success"
887
+ size="small"
888
+ :icon="CircleCheck"
889
+ :loading="activeBatchAction === 'approve'"
890
+ :disabled="selectedRows.length === 0 || activeBatchAction !== null"
891
+ @click="handleReview('Y')"
892
+ >
893
+ 通过
894
+ </el-button>
895
+ <el-button
896
+ type="warning"
897
+ plain
898
+ size="small"
899
+ :icon="CircleClose"
900
+ :loading="activeBatchAction === 'reject'"
901
+ :disabled="selectedRows.length === 0 || activeBatchAction !== null"
902
+ @click="handleReview('N')"
903
+ >
904
+ 拒绝
905
+ </el-button>
856
906
  </template>
857
907
  <template #toolbar-right>
858
908
  <el-button
@@ -865,6 +915,7 @@ onMounted(() => {
865
915
  导出
866
916
  </el-button>
867
917
  </template>
918
+ <el-table-column type="selection" width="48" fixed="left" align="center" disabled />
868
919
  <el-table-column
869
920
  type="index"
870
921
  column-key="sequence"
@@ -926,7 +977,7 @@ onMounted(() => {
926
977
  <el-table-column
927
978
  column-key="operations"
928
979
  label="操作"
929
- width="336"
980
+ width="150"
930
981
  fixed="right"
931
982
  align="center"
932
983
  disabled
@@ -936,7 +987,7 @@ onMounted(() => {
936
987
  link
937
988
  type="primary"
938
989
  size="small"
939
- :disabled="activeRowAction !== null"
990
+ :disabled="activeBatchAction !== null"
940
991
  @click.stop="openDetail(row)"
941
992
  >
942
993
  详情<el-icon class="el-icon--right"><ArrowRight /></el-icon>
@@ -946,48 +997,12 @@ onMounted(() => {
946
997
  type="primary"
947
998
  size="small"
948
999
  :icon="EditPen"
949
- :disabled="!canEditStatus(row.status) || activeRowAction !== null"
1000
+ :disabled="!canEditStatus(row.status) || activeBatchAction !== null"
950
1001
  title="仅审批未通过或草稿状态可修改"
951
1002
  @click.stop="openEdit(row)"
952
1003
  >
953
1004
  修改
954
1005
  </el-button>
955
- <el-button
956
- link
957
- type="danger"
958
- size="small"
959
- :icon="Delete"
960
- :loading="isActionLoading(row, 'delete')"
961
- :disabled="!canDeleteStatus(row.status) || (activeRowAction !== null && !isActionLoading(row, 'delete'))"
962
- title="仅审批未通过或草稿状态可删除"
963
- @click.stop="handleDelete(row)"
964
- >
965
- 删除
966
- </el-button>
967
- <el-button
968
- link
969
- type="success"
970
- size="small"
971
- :icon="CircleCheck"
972
- :loading="isActionLoading(row, 'approve')"
973
- :disabled="!isPendingStatus(row.status) || (activeRowAction !== null && !isActionLoading(row, 'approve'))"
974
- title="仅待审核状态可操作"
975
- @click.stop="handleReview(row, 'Y')"
976
- >
977
- 通过
978
- </el-button>
979
- <el-button
980
- link
981
- type="warning"
982
- size="small"
983
- :icon="CircleClose"
984
- :loading="isActionLoading(row, 'reject')"
985
- :disabled="!isPendingStatus(row.status) || (activeRowAction !== null && !isActionLoading(row, 'reject'))"
986
- title="仅待审核状态可操作"
987
- @click.stop="handleReview(row, 'N')"
988
- >
989
- 拒绝
990
- </el-button>
991
1006
  </template>
992
1007
  </el-table-column>
993
1008
  </ElTablePro>
@@ -1131,7 +1146,7 @@ onMounted(() => {
1131
1146
  v-for="option in accountBankOptions"
1132
1147
  :key="`${option.bankAcct}-${option.bankName}`"
1133
1148
  :label="option.bankName"
1134
- :value="option.bankAcct"
1149
+ :value="option.bankName"
1135
1150
  >
1136
1151
  <span class="account-option__name">{{ option.bankName }}</span>
1137
1152
  <small>{{ option.bankAcct }}</small>
@@ -1158,7 +1173,7 @@ onMounted(() => {
1158
1173
  v-for="option in accountBankOptions"
1159
1174
  :key="`${option.bankAcct}-${option.bankName}`"
1160
1175
  :label="option.bankName"
1161
- :value="option.bankAcct"
1176
+ :value="option.bankName"
1162
1177
  >
1163
1178
  <span class="account-option__name">{{ option.bankName }}</span>
1164
1179
  <small>{{ option.bankAcct }}</small>
@@ -1531,7 +1546,7 @@ onMounted(() => {
1531
1546
  </template>
1532
1547
 
1533
1548
  <template
1534
- v-if="detailRecord && (isPendingStatus(detailRecord.status) || canEditStatus(detailRecord.status))"
1549
+ v-if="detailRecord && canEditStatus(detailRecord.status)"
1535
1550
  #footer
1536
1551
  >
1537
1552
  <div class="drawer-review-actions">
@@ -1543,38 +1558,6 @@ onMounted(() => {
1543
1558
  >
1544
1559
  修改
1545
1560
  </el-button>
1546
- <el-button
1547
- v-if="canDeleteStatus(detailRecord.status)"
1548
- type="danger"
1549
- plain
1550
- :icon="Delete"
1551
- :loading="isActionLoading(detailRecord, 'delete')"
1552
- :disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'delete')"
1553
- @click="handleDelete(detailRecord)"
1554
- >
1555
- 删除
1556
- </el-button>
1557
- <template v-if="isPendingStatus(detailRecord.status)">
1558
- <el-button
1559
- type="primary"
1560
- :icon="CircleCheck"
1561
- :loading="isActionLoading(detailRecord, 'approve')"
1562
- :disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'approve')"
1563
- @click="handleReview(detailRecord, 'Y')"
1564
- >
1565
- 确认
1566
- </el-button>
1567
- <el-button
1568
- type="danger"
1569
- plain
1570
- :icon="CircleClose"
1571
- :loading="isActionLoading(detailRecord, 'reject')"
1572
- :disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'reject')"
1573
- @click="handleReview(detailRecord, 'N')"
1574
- >
1575
- 拒绝
1576
- </el-button>
1577
- </template>
1578
1561
  </div>
1579
1562
  </template>
1580
1563
  </el-drawer>
@@ -54,6 +54,12 @@
54
54
  align-items: center;
55
55
  }
56
56
 
57
+ .brand {
58
+ flex-direction: column;
59
+ align-items: flex-start;
60
+ gap: 5px;
61
+ }
62
+
57
63
  .brand h1 {
58
64
  font-size: 28px;
59
65
  line-height: 1;
@@ -62,6 +68,13 @@
62
68
  text-shadow: 0 0 18px rgba(104, 194, 255, .24);
63
69
  }
64
70
 
71
+ .brand-subtitle {
72
+ color: #92b8d8;
73
+ font-size: 12px;
74
+ line-height: 1;
75
+ letter-spacing: .4px;
76
+ }
77
+
65
78
  .toolbar {
66
79
  gap: 12px;
67
80
  color: #e0edf9;
@@ -716,15 +729,6 @@
716
729
  text-align: center;
717
730
  }
718
731
 
719
- .gauge-date {
720
- margin: 8px 0 0;
721
- color: #d7e6f6;
722
- text-align: center;
723
- font-size: 15px;
724
- line-height: 1;
725
- font-weight: 500;
726
- }
727
-
728
732
  .gauge-chart {
729
733
  position: absolute;
730
734
  left: -8px;
@@ -860,6 +864,10 @@ td {
860
864
  text-shadow: 0 0 18px rgba(51, 139, 183, .14);
861
865
  }
862
866
 
867
+ .fund-cockpit-page.is-day-mode .brand-subtitle {
868
+ color: #66849a;
869
+ }
870
+
863
871
  .fund-cockpit-page.is-day-mode .toolbar {
864
872
  color: #405f76;
865
873
  }
@@ -1020,8 +1028,7 @@ td {
1020
1028
  color: #24465e;
1021
1029
  }
1022
1030
 
1023
- .fund-cockpit-page.is-day-mode .axis-unit,
1024
- .fund-cockpit-page.is-day-mode .gauge-date {
1031
+ .fund-cockpit-page.is-day-mode .axis-unit {
1025
1032
  color: #637d91;
1026
1033
  }
1027
1034
 
@@ -52,7 +52,6 @@ interface MetricTrendDefinition {
52
52
 
53
53
  interface GaugeCard {
54
54
  title: string
55
- date: string
56
55
  max: number
57
56
  needle: number
58
57
  value: string
@@ -101,11 +100,16 @@ const deviationHistoryRows = ref<DeviationHistoryRecord[]>([])
101
100
  const paymentReceiptHistoryRows = ref<PaymentReceiptHistoryRecord[]>([])
102
101
  const cockpitLoading = ref(false)
103
102
  const loadError = ref('')
103
+ const lastUpdatedAt = ref('')
104
104
 
105
105
  function pad(value: number) {
106
106
  return String(value).padStart(2, '0')
107
107
  }
108
108
 
109
+ function formatUpdatedAt(date: Date) {
110
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`
111
+ }
112
+
109
113
  function compactDate(date: Date) {
110
114
  return `${date.getFullYear()}${pad(date.getMonth() + 1)}${pad(date.getDate())}`
111
115
  }
@@ -311,21 +315,18 @@ const metricTrendMeta = [
311
315
  const gaugeCards = computed<GaugeCard[]>(() => [
312
316
  {
313
317
  title: '流动性比例',
314
- date: displayText(liquidityBody.value.ldxblTime || liquidityBody.value.curDate),
315
318
  max: 100,
316
319
  needle: toNumber(liquidityBody.value.ldxbl),
317
320
  value: formatRate(liquidityBody.value.ldxbl),
318
321
  },
319
322
  {
320
323
  title: '流动性覆盖率',
321
- date: displayText(liquidityBody.value.ldxfglTime || liquidityBody.value.curDate),
322
324
  max: 200,
323
325
  needle: toNumber(liquidityBody.value.ldxfgl),
324
326
  value: formatRate(liquidityBody.value.ldxfgl),
325
327
  },
326
328
  {
327
329
  title: '净稳定资金比例',
328
- date: displayText(liquidityBody.value.jwdzjblTime || liquidityBody.value.curDate),
329
330
  max: 200,
330
331
  needle: toNumber(liquidityBody.value.jwdzjbl),
331
332
  value: formatRate(liquidityBody.value.jwdzjbl),
@@ -366,6 +367,9 @@ const charts: ECharts[] = []
366
367
  let metricTrendChart: ECharts | undefined
367
368
  let metricCloseTimer: number | undefined
368
369
  let metricChartRenderToken = 0
370
+ let metricTrendRequestToken = 0
371
+ const AUTO_REFRESH_INTERVAL = 10 * 60 * 1000
372
+ let autoRefreshTimer: ReturnType<typeof setInterval> | undefined
369
373
  const designWidth = 1672
370
374
  const designHeight = 941
371
375
  const cockpitScale = ref(1)
@@ -572,9 +576,48 @@ function showMetricTrend(index: number) {
572
576
  void renderMetricTrendChart(index)
573
577
  }
574
578
 
579
+ // 顶部指标每次打开趋势图时实时查询对应接口,避免展示整页加载时的历史快照。
580
+ async function refreshMetricTrend(index: number) {
581
+ const requestToken = ++metricTrendRequestToken
582
+
583
+ if (index <= 1) paymentReceiptHistoryRows.value = []
584
+ if (index === 2) deviationHistoryRows.value = []
585
+ if (index === 3) pbocHistoryRows.value = []
586
+ await renderMetricTrendChart(index)
587
+
588
+ try {
589
+ if (index <= 1) {
590
+ const response = await queryPaymentReceiptHistory(queryDate.value)
591
+ if (requestToken !== metricTrendRequestToken) return
592
+ paymentReceiptHistoryRows.value = Array.isArray(response.body.resultInfoObj)
593
+ ? response.body.resultInfoObj
594
+ : []
595
+ } else if (index === 2) {
596
+ const response = await queryDeviationHistory(queryDate.value)
597
+ if (requestToken !== metricTrendRequestToken) return
598
+ deviationHistoryRows.value = Array.isArray(response.body.resultInfoObj)
599
+ ? response.body.resultInfoObj
600
+ : []
601
+ } else {
602
+ const response = await queryPbocBalanceHistory(queryDate.value)
603
+ if (requestToken !== metricTrendRequestToken) return
604
+ pbocHistoryRows.value = Array.isArray(response.body.resultInfoObj)
605
+ ? response.body.resultInfoObj
606
+ : []
607
+ }
608
+
609
+ if (activeMetricIndex.value === index) await renderMetricTrendChart(index)
610
+ } catch {
611
+ if (requestToken === metricTrendRequestToken && activeMetricIndex.value === index) {
612
+ await renderMetricTrendChart(index)
613
+ }
614
+ }
615
+ }
616
+
575
617
  function closeMetricTrend() {
576
618
  clearMetricCloseTimer()
577
619
  metricChartRenderToken += 1
620
+ metricTrendRequestToken += 1
578
621
  activeMetricIndex.value = null
579
622
  disposeMetricTrendChart()
580
623
  }
@@ -582,6 +625,7 @@ function closeMetricTrend() {
582
625
  function handleMetricEnter(index: number) {
583
626
  if (pinnedMetricIndex.value !== null) return
584
627
  showMetricTrend(index)
628
+ void refreshMetricTrend(index)
585
629
  }
586
630
 
587
631
  function handleMetricLeave() {
@@ -597,8 +641,10 @@ function toggleMetricTrend(index: number) {
597
641
  closeMetricTrend()
598
642
  return
599
643
  }
644
+ const shouldRefresh = activeMetricIndex.value !== index
600
645
  pinnedMetricIndex.value = index
601
646
  showMetricTrend(index)
647
+ if (shouldRefresh) void refreshMetricTrend(index)
602
648
  }
603
649
 
604
650
  function handleMetricEscape() {
@@ -924,9 +970,6 @@ async function loadCockpitData(signal: AbortSignal) {
924
970
  queryFutureYearCashFlow(queryDate.value),
925
971
  queryInterbankIndicators(queryDate.value),
926
972
  queryFundCockpitSummary(queryDate.value),
927
- queryPbocBalanceHistory(queryDate.value),
928
- queryDeviationHistory(queryDate.value),
929
- queryPaymentReceiptHistory(queryDate.value),
930
973
  queryLiquidityGauges(queryDate.value),
931
974
  ] as const)
932
975
  if (signal.aborted) return
@@ -939,9 +982,6 @@ async function loadCockpitData(signal: AbortSignal) {
939
982
  futureYearCashFlowResult,
940
983
  interbankResult,
941
984
  overviewResult,
942
- pbocHistoryResult,
943
- deviationHistoryResult,
944
- paymentReceiptHistoryResult,
945
985
  liquidityResult,
946
986
  ] = results
947
987
 
@@ -975,30 +1015,13 @@ async function loadCockpitData(signal: AbortSignal) {
975
1015
  overviewBody.value = overviewResult.value.body
976
1016
  } else errors.push(getErrorMessage(overviewResult.reason, '驾驶舱汇总加载失败'))
977
1017
 
978
- if (pbocHistoryResult.status === 'fulfilled') {
979
- pbocHistoryRows.value = Array.isArray(pbocHistoryResult.value.body.resultInfoObj)
980
- ? pbocHistoryResult.value.body.resultInfoObj
981
- : []
982
- } else errors.push(getErrorMessage(pbocHistoryResult.reason, '人行余额趋势加载失败'))
983
-
984
- if (deviationHistoryResult.status === 'fulfilled') {
985
- deviationHistoryRows.value = Array.isArray(deviationHistoryResult.value.body.resultInfoObj)
986
- ? deviationHistoryResult.value.body.resultInfoObj
987
- : []
988
- } else errors.push(getErrorMessage(deviationHistoryResult.reason, '轧差趋势加载失败'))
989
-
990
- if (paymentReceiptHistoryResult.status === 'fulfilled') {
991
- paymentReceiptHistoryRows.value = Array.isArray(paymentReceiptHistoryResult.value.body.resultInfoObj)
992
- ? paymentReceiptHistoryResult.value.body.resultInfoObj
993
- : []
994
- } else errors.push(getErrorMessage(paymentReceiptHistoryResult.reason, '收付款趋势加载失败'))
995
-
996
1018
  if (liquidityResult.status === 'fulfilled') {
997
1019
  liquidityBody.value = liquidityResult.value.body
998
1020
  } else errors.push(getErrorMessage(liquidityResult.reason, '流动性仪表盘加载失败'))
999
1021
 
1000
1022
  if (!signal.aborted) {
1001
1023
  loadError.value = [...new Set(errors)].join(';')
1024
+ lastUpdatedAt.value = formatUpdatedAt(new Date())
1002
1025
  cockpitLoading.value = false
1003
1026
  refreshCockpitCharts()
1004
1027
  }
@@ -1030,9 +1053,16 @@ onMounted(async () => {
1030
1053
  createChart(coverageGauge.value, createStageGaugeOption(gaugeCards.value[1]!))
1031
1054
  createChart(stableGauge.value, createStageGaugeOption(gaugeCards.value[2]!))
1032
1055
  createChart(maturityChart.value, createMaturityOption())
1056
+ autoRefreshTimer = setInterval(() => {
1057
+ void reloadCockpitData()
1058
+ }, AUTO_REFRESH_INTERVAL)
1033
1059
  })
1034
1060
 
1035
1061
  onUnmounted(() => {
1062
+ if (autoRefreshTimer) {
1063
+ clearInterval(autoRefreshTimer)
1064
+ autoRefreshTimer = undefined
1065
+ }
1036
1066
  loadController?.abort()
1037
1067
  clearMetricCloseTimer()
1038
1068
  disposeMetricTrendChart()
@@ -1053,6 +1083,9 @@ onUnmounted(() => {
1053
1083
  <header class="topbar">
1054
1084
  <div class="brand">
1055
1085
  <h1>资金驾驶舱</h1>
1086
+ <p class="brand-subtitle">
1087
+ 数据更新时间:{{ lastUpdatedAt || '加载中...' }}
1088
+ </p>
1056
1089
  </div>
1057
1090
 
1058
1091
  <div class="toolbar">
@@ -1184,7 +1217,6 @@ onUnmounted(() => {
1184
1217
  <section class="gauge-section">
1185
1218
  <article v-for="(gauge, index) in gaugeCards" :key="gauge.title" class="gauge-card">
1186
1219
  <h2>{{ gauge.title }}</h2>
1187
- <p class="gauge-date">{{ gauge.date }}</p>
1188
1220
  <div
1189
1221
  :ref="(el) => setGaugeRef(el, index)"
1190
1222
  class="gauge-chart"
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { ref } from 'vue'
3
3
  import { Right } from '@element-plus/icons-vue'
4
- import './assets/styles/index.css'
5
4
  import forecastOccurrenceImage from './assets/images/rmb-position-forecast-occurrence.jpg'
6
5
  import interbankLendingEstimationImage from './assets/images/rmb-position-interbank-lending-estimation.jpg'
7
6
  import openingReserveEstimationImage from './assets/images/rmb-position-opening-reserve-estimation.jpg'
@@ -117,3 +116,5 @@ function backToImageList() {
117
116
  </section>
118
117
  </div>
119
118
  </template>
119
+
120
+ <style src="./assets/styles/index.css"></style>
package/README.md DELETED
@@ -1,42 +0,0 @@
1
- # verce-vue-test
2
-
3
- This template should help get you started developing with Vue 3 in Vite.
4
-
5
- ## Recommended IDE Setup
6
-
7
- [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
-
9
- ## Recommended Browser Setup
10
-
11
- - Chromium-based browsers (Chrome, Edge, Brave, etc.):
12
- - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13
- - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14
- - Firefox:
15
- - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16
- - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
17
-
18
- ## Type Support for `.vue` Imports in TS
19
-
20
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
21
-
22
- ## Customize configuration
23
-
24
- See [Vite Configuration Reference](https://vite.dev/config/).
25
-
26
- ## Project Setup
27
-
28
- ```sh
29
- npm install
30
- ```
31
-
32
- ### Compile and Hot-Reload for Development
33
-
34
- ```sh
35
- npm run dev
36
- ```
37
-
38
- ### Type-Check, Compile and Minify for Production
39
-
40
- ```sh
41
- npm run build
42
- ```
package/design-qa.md DELETED
@@ -1,48 +0,0 @@
1
- **Findings**
2
- - No actionable P0/P1/P2 findings remain for the `ElTablePro` table revision.
3
-
4
- **Open Questions**
5
- - None.
6
-
7
- **Implementation Checklist**
8
- - Replaced both native `el-table` blocks with `ElTablePro`.
9
- - Replaced manual pagination footers with `ElTablePro` built-in pagination.
10
- - Kept forecast CRUD actions in the `ElTablePro` toolbar slot.
11
- - Enabled `ElTablePro` column configuration for both forecast and flow tables.
12
- - Added `paginationSize` support to `ElTablePro` so this page can keep all pagination controls `small`.
13
- - Forwarded the `empty` slot from `ElTablePro` to the inner `el-table` so empty-state illustrations still render.
14
-
15
- **Follow-up Polish**
16
- - [P3] When backend data is connected, wire `handleForecastPaginationChange` and `handleFlowPaginationChange` to reload their respective lists.
17
-
18
- source visual truth path: `/var/folders/9_/635n2vmx5017pd592w50p_d80000gn/T/codex-clipboard-2f217f68-ef5c-41ad-82fc-63dd8e80fd89.png`
19
-
20
- implementation screenshot path: `/Users/bombingpig/WebstormProjects/verce-vue-test/output/playwright/forecast-info-table-pro-1672x941.png`
21
-
22
- viewport: `1672x941`
23
-
24
- state: production preview, `/forecast-info`, existing app shell, drawer-filter default state, `ElTablePro` tables
25
-
26
- full-view comparison evidence:
27
- - `/Users/bombingpig/WebstormProjects/verce-vue-test/output/playwright/forecast-info-table-pro-1672x941.png`
28
-
29
- focused region comparison evidence:
30
- - Forecast list: rendered through `ElTablePro`, toolbar actions appear above the table, column config is available, built-in pagination renders below.
31
- - Flow list: rendered through `ElTablePro`, column config is available, built-in pagination renders below.
32
- - Empty state: custom empty illustration/text still render inside `ElTablePro` through slot forwarding.
33
-
34
- required fidelity surfaces:
35
- - Fonts and typography: table headers, toolbar buttons, pagination text, and empty-state text remain compact and readable.
36
- - Spacing and layout rhythm: table toolbar, column config button, table body, and pagination are aligned within each card.
37
- - Colors and visual tokens: `ElTablePro` output preserves existing gray borders, light header rows, and blue primary pagination state.
38
- - Image quality and asset fidelity: empty states use Element Plus' empty illustration; action icons use Element Plus icons.
39
- - Copy and content: column labels, toolbar actions, empty text, pagination, and column config copy are present.
40
-
41
- patches made since previous QA pass:
42
- - Imported and used `ElTablePro` in `ForecastInfoView.vue`.
43
- - Added separate page/page-size state and pagination callbacks for forecast and flow lists.
44
- - Added `paginationSize` prop and empty-slot forwarding to `ElTablePro.vue`.
45
- - Removed manual table pagination markup and related page-level CSS.
46
- - Re-captured the page in production preview.
47
-
48
- final result: passed
Binary file