verce-vue-test 0.0.119 → 0.0.120
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 +1 -1
- package/src/App.vue +14 -1
- package/src/components/element-rewrite/DateRange.vue +3 -1
- package/src/components/element-rewrite/ElTablePro.vue +43 -7
- package/src/components/element-rewrite/ElUploadButton.vue +1 -5
- package/src/router/index.ts +32 -0
- package/src/views/ForecastInfo/useScopedMessage.ts +1 -1
- package/src/views/PlaceholderView.vue +2 -2
- package/src/views/cross-border-rmb-estimation/api.ts +79 -0
- package/src/views/cross-border-rmb-estimation/index.vue +868 -0
- package/src/views/rmb-position-forecast/api.ts +49 -415
- package/src/views/rmb-position-forecast/components/RmbPositionForecastEditor.vue +1188 -0
- package/src/views/rmb-position-forecast/detail.vue +660 -0
- package/src/views/rmb-position-forecast/form.vue +336 -0
- package/src/views/rmb-position-forecast/index.vue +99 -1307
- package/src/views/rmb-position-forecast/model.ts +855 -0
- package/src/views/rmb-position-forecast/runtime.ts +124 -0
- package/tsconfig.app.json +2 -1
- package/src/views/rmb-position-forecast/editor.ts +0 -252
- package/src/views/rmb-position-forecast/mock.ts +0 -165
- package/src/views/rmb-position-forecast/options.ts +0 -82
- package/src/views/rmb-position-forecast/types.ts +0 -130
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -26,6 +26,9 @@ const route = useRoute()
|
|
|
26
26
|
const router = useRouter()
|
|
27
27
|
const isFullscreenRoute = computed(() => route.meta.fullscreen === true)
|
|
28
28
|
const isNoticeRoute = computed(() => route.path.startsWith('/notice-announcement'))
|
|
29
|
+
const activeMenuPath = computed(() => (
|
|
30
|
+
typeof route.meta.activeMenu === 'string' ? route.meta.activeMenu : route.path
|
|
31
|
+
))
|
|
29
32
|
|
|
30
33
|
type MenuSearchItem = {
|
|
31
34
|
value: string
|
|
@@ -55,6 +58,7 @@ const searchableMenus: MenuSearchItem[] = [
|
|
|
55
58
|
{ value: '人民币手工核销', path: '/forecast-info' },
|
|
56
59
|
{ value: '人民币匡算报表', path: '/rmb-position-estimation' },
|
|
57
60
|
{ value: '人民币匡算', path: '/rmb-estimation' },
|
|
61
|
+
{ value: '跨境人民币头寸匡算', path: '/cross-border-rmb-estimation' },
|
|
58
62
|
{ value: '资金驾驶舱', path: '/fund-cockpit' },
|
|
59
63
|
{ value: '通知公告', path: '/notice-announcement' },
|
|
60
64
|
{ value: '公告管理', path: '/notice-management' },
|
|
@@ -101,7 +105,7 @@ function toggleCollapse() {
|
|
|
101
105
|
</div>
|
|
102
106
|
<el-scrollbar style="height: calc(100vh - 50px)">
|
|
103
107
|
<el-menu
|
|
104
|
-
:default-active="
|
|
108
|
+
:default-active="activeMenuPath"
|
|
105
109
|
:collapse="isCollapse"
|
|
106
110
|
router
|
|
107
111
|
background-color="#304156"
|
|
@@ -186,6 +190,15 @@ function toggleCollapse() {
|
|
|
186
190
|
<span>人民币匡算</span>
|
|
187
191
|
</el-menu-item>
|
|
188
192
|
</el-sub-menu>
|
|
193
|
+
<el-sub-menu index="cross-border-rmb">
|
|
194
|
+
<template #title>
|
|
195
|
+
<el-icon><DataLine /></el-icon>
|
|
196
|
+
<span>跨境人民币</span>
|
|
197
|
+
</template>
|
|
198
|
+
<el-menu-item index="/cross-border-rmb-estimation">
|
|
199
|
+
<span>跨境人民币头寸匡算</span>
|
|
200
|
+
</el-menu-item>
|
|
201
|
+
</el-sub-menu>
|
|
189
202
|
<el-sub-menu index="foreign-currency">
|
|
190
203
|
<template #title>
|
|
191
204
|
<el-icon><DataLine /></el-icon>
|
|
@@ -165,7 +165,9 @@ function toDate(val: any): Date | null {
|
|
|
165
165
|
return Number.isNaN(d.getTime()) ? null : d
|
|
166
166
|
}
|
|
167
167
|
if (typeof val === "string" && /^\d{4}-\d{2}-\d{2}$/.test(val)) {
|
|
168
|
-
const
|
|
168
|
+
const y = Number(val.slice(0, 4))
|
|
169
|
+
const m = Number(val.slice(5, 7))
|
|
170
|
+
const day = Number(val.slice(8, 10))
|
|
169
171
|
const d = new Date(y, m - 1, day)
|
|
170
172
|
return Number.isNaN(d.getTime()) ? null : d
|
|
171
173
|
}
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
Fragment,
|
|
17
17
|
type VNode
|
|
18
18
|
} from "vue"
|
|
19
|
+
import { Refresh } from "@element-plus/icons-vue"
|
|
19
20
|
import { useRoute } from "vue-router"
|
|
20
21
|
|
|
21
22
|
// 组件配置选项
|
|
@@ -92,6 +93,12 @@ const emit = defineEmits<{
|
|
|
92
93
|
const route = useRoute()
|
|
93
94
|
const attrs = useAttrs()
|
|
94
95
|
const slots = useSlots()
|
|
96
|
+
|
|
97
|
+
/** 表格使用 small 尺寸时,内部按钮和分页同步保持紧凑。 */
|
|
98
|
+
const resolveControlSize = () => (
|
|
99
|
+
attrs.size === "small" ? "small" : props.colBtnSize
|
|
100
|
+
)
|
|
101
|
+
|
|
95
102
|
// Vue 3.4 尚未提供 useId,使用组件实例 uid 生成页面内唯一的无障碍关联 ID。
|
|
96
103
|
const componentUid = getCurrentInstance()?.uid ?? 0
|
|
97
104
|
const columnOrderTipId = `el-table-pro-column-order-tip-${componentUid}`
|
|
@@ -237,6 +244,14 @@ const currentPageSize = computed({
|
|
|
237
244
|
}
|
|
238
245
|
})
|
|
239
246
|
|
|
247
|
+
/** 使用当前分页参数重新触发列表加载。 */
|
|
248
|
+
const refreshCurrentPage = () => {
|
|
249
|
+
emit("pagination-change", {
|
|
250
|
+
page: props.page,
|
|
251
|
+
pageSize: props.pageSize
|
|
252
|
+
})
|
|
253
|
+
}
|
|
254
|
+
|
|
240
255
|
// 是否全选(弹窗中的临时状态)
|
|
241
256
|
const isAllSelected = computed({
|
|
242
257
|
get: () => {
|
|
@@ -581,11 +596,16 @@ const initColumns = () => {
|
|
|
581
596
|
*/
|
|
582
597
|
const visibleColumns = computed(() => {
|
|
583
598
|
return columnOptions.value
|
|
584
|
-
.
|
|
585
|
-
.
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
599
|
+
.map((column, index) => ({ column, index }))
|
|
600
|
+
.filter(({ column }) => column.visible)
|
|
601
|
+
.map(({ column, index }) => {
|
|
602
|
+
// 顺序变化时只重建位置受影响的列,触发 Element Plus 重新注册内部列顺序。
|
|
603
|
+
const renderKey = `${column.key}:${index}`
|
|
604
|
+
return {
|
|
605
|
+
key: renderKey,
|
|
606
|
+
vnode: cloneVNode(column.vnode, { key: renderKey })
|
|
607
|
+
}
|
|
608
|
+
})
|
|
589
609
|
})
|
|
590
610
|
|
|
591
611
|
// 初始化列配置
|
|
@@ -609,7 +629,7 @@ initColumns()
|
|
|
609
629
|
<el-button
|
|
610
630
|
@click="openColumnConfigDialog"
|
|
611
631
|
icon="Setting"
|
|
612
|
-
:size="
|
|
632
|
+
:size="resolveControlSize()"
|
|
613
633
|
>
|
|
614
634
|
列配置
|
|
615
635
|
</el-button>
|
|
@@ -638,6 +658,15 @@ initColumns()
|
|
|
638
658
|
|
|
639
659
|
<!-- 分页组件 -->
|
|
640
660
|
<div v-if="pagination" class="el-table-plus__pagination">
|
|
661
|
+
<el-button
|
|
662
|
+
class="el-table-plus__refresh-button"
|
|
663
|
+
:icon="Refresh"
|
|
664
|
+
:size="resolveControlSize()"
|
|
665
|
+
circle
|
|
666
|
+
aria-label="刷新当前页数据"
|
|
667
|
+
title="刷新"
|
|
668
|
+
@click="refreshCurrentPage"
|
|
669
|
+
/>
|
|
641
670
|
<el-pagination
|
|
642
671
|
v-model:current-page="currentPage"
|
|
643
672
|
v-model:page-size="currentPageSize"
|
|
@@ -646,7 +675,8 @@ initColumns()
|
|
|
646
675
|
:layout="layout"
|
|
647
676
|
:popper-class="paginationPopperClass"
|
|
648
677
|
background
|
|
649
|
-
:size="
|
|
678
|
+
:size="resolveControlSize()"
|
|
679
|
+
:small="resolveControlSize() === 'small'"
|
|
650
680
|
/>
|
|
651
681
|
</div>
|
|
652
682
|
|
|
@@ -819,10 +849,16 @@ initColumns()
|
|
|
819
849
|
*/
|
|
820
850
|
.el-table-plus__pagination {
|
|
821
851
|
display: flex;
|
|
852
|
+
align-items: center;
|
|
822
853
|
justify-content: flex-end;
|
|
854
|
+
gap: 8px;
|
|
823
855
|
margin-top: 10px;
|
|
824
856
|
}
|
|
825
857
|
|
|
858
|
+
.el-table-plus__refresh-button {
|
|
859
|
+
flex: none;
|
|
860
|
+
}
|
|
861
|
+
|
|
826
862
|
/**
|
|
827
863
|
* 弹窗提示文字样式
|
|
828
864
|
*/
|
|
@@ -194,11 +194,7 @@ const clearFiles = () => {
|
|
|
194
194
|
* 取消上传请求
|
|
195
195
|
*/
|
|
196
196
|
const abort = (file?: UploadUserFile) => {
|
|
197
|
-
|
|
198
|
-
uploadRef.value?.abort(file as any)
|
|
199
|
-
} else {
|
|
200
|
-
uploadRef.value?.abort()
|
|
201
|
-
}
|
|
197
|
+
uploadRef.value?.abort(file as any)
|
|
202
198
|
}
|
|
203
199
|
|
|
204
200
|
/**
|
package/src/router/index.ts
CHANGED
|
@@ -80,6 +80,33 @@ const router = createRouter({
|
|
|
80
80
|
name: 'rmbPositionForecast',
|
|
81
81
|
component: () => import('../views/rmb-position-forecast/index.vue'),
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
path: '/rmb-position-forecast/create',
|
|
85
|
+
name: 'rmbPositionForecastCreate',
|
|
86
|
+
meta: { activeMenu: '/rmb-position-forecast' },
|
|
87
|
+
component: () => import('../views/rmb-position-forecast/form.vue'),
|
|
88
|
+
props: { mode: 'add' },
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
path: '/rmb-position-forecast/edit/:predRefNo',
|
|
92
|
+
name: 'rmbPositionForecastEdit',
|
|
93
|
+
meta: { activeMenu: '/rmb-position-forecast' },
|
|
94
|
+
component: () => import('../views/rmb-position-forecast/form.vue'),
|
|
95
|
+
props: { mode: 'edit' },
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
path: '/rmb-position-forecast/copy/:predRefNo',
|
|
99
|
+
name: 'rmbPositionForecastCopy',
|
|
100
|
+
meta: { activeMenu: '/rmb-position-forecast' },
|
|
101
|
+
component: () => import('../views/rmb-position-forecast/form.vue'),
|
|
102
|
+
props: { mode: 'copy' },
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
path: '/rmb-position-forecast/detail/:predRefNo',
|
|
106
|
+
name: 'rmbPositionForecastDetail',
|
|
107
|
+
meta: { activeMenu: '/rmb-position-forecast' },
|
|
108
|
+
component: () => import('../views/rmb-position-forecast/detail.vue'),
|
|
109
|
+
},
|
|
83
110
|
{
|
|
84
111
|
path: '/foreign-currency-position-forecast',
|
|
85
112
|
name: 'foreignCurrencyPositionForecast',
|
|
@@ -125,6 +152,11 @@ const router = createRouter({
|
|
|
125
152
|
name: 'rmbEstimation',
|
|
126
153
|
component: () => import('../views/rmb-estimation/index.vue'),
|
|
127
154
|
},
|
|
155
|
+
{
|
|
156
|
+
path: '/cross-border-rmb-estimation',
|
|
157
|
+
name: 'crossBorderRmbEstimation',
|
|
158
|
+
component: () => import('../views/cross-border-rmb-estimation/index.vue'),
|
|
159
|
+
},
|
|
128
160
|
{
|
|
129
161
|
path: '/fund-cockpit',
|
|
130
162
|
name: 'fundCockpit',
|
|
@@ -319,13 +319,13 @@ const dashboardForm = ref<DashboardForm>({
|
|
|
319
319
|
description: ''
|
|
320
320
|
})
|
|
321
321
|
|
|
322
|
-
const interbankRules: FormRules
|
|
322
|
+
const interbankRules: FormRules = {
|
|
323
323
|
date: [{ required: true, message: '请选择数据日期', trigger: 'change' }],
|
|
324
324
|
liabilityRatio: [{ required: true, message: '请输入同业负债占比', trigger: 'blur' }],
|
|
325
325
|
depositBalance: [{ required: true, message: '请输入同业活期存款余额', trigger: 'blur' }]
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
const dashboardRules: FormRules
|
|
328
|
+
const dashboardRules: FormRules = {
|
|
329
329
|
liquidityRatio: [{ required: true, message: '请输入流动性比例', trigger: 'blur' }],
|
|
330
330
|
coverageRatio: [{ required: true, message: '请输入流动性覆盖率', trigger: 'blur' }],
|
|
331
331
|
stableCapitalRatio: [{ required: true, message: '请输入净稳定资金比例', trigger: 'blur' }]
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import baseHttpClient, {
|
|
2
|
+
type HttpRequestOptions,
|
|
3
|
+
type TamResponse,
|
|
4
|
+
} from '@/utils/baseHttpClient'
|
|
5
|
+
|
|
6
|
+
const ESTIMATION_TRAN_CODE = '/TAM/0001/140403001'
|
|
7
|
+
const HISTORY_TRAN_CODE = '/TAM/0001/140403003'
|
|
8
|
+
|
|
9
|
+
export type CrossBorderRmbHistoryRequest = {
|
|
10
|
+
/** 交易日期,格式为 YYYYMMDD。 */
|
|
11
|
+
transDate: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type CrossBorderRmbEstimationRequest = CrossBorderRmbHistoryRequest & {
|
|
15
|
+
/** 今日预计调拨收入,真实接口要求 number。 */
|
|
16
|
+
teaaIn: number
|
|
17
|
+
/** 今日预计调拨支出,真实接口要求 number。 */
|
|
18
|
+
teaaOut: number
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type CrossBorderRmbHistoryBody = {
|
|
22
|
+
totalCount?: number
|
|
23
|
+
teaaIn?: string
|
|
24
|
+
teaaOut?: string
|
|
25
|
+
data?: {
|
|
26
|
+
teaaIn?: string
|
|
27
|
+
teaaOut?: string
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type CrossBorderRmbEstimationResult = {
|
|
32
|
+
/** 期初金额。 */
|
|
33
|
+
startAmt?: string
|
|
34
|
+
/** 预报收入。 */
|
|
35
|
+
predAmtIn?: string
|
|
36
|
+
/** 预报支出。 */
|
|
37
|
+
predAmtOut?: string
|
|
38
|
+
/** 未核销预报收入。 */
|
|
39
|
+
unverificationAmtIn?: string
|
|
40
|
+
/** 未核销预报支出。 */
|
|
41
|
+
unverificationAmtOut?: string
|
|
42
|
+
/** 未核销流水收入。 */
|
|
43
|
+
unverTranAmtIn?: string
|
|
44
|
+
/** 未核销流水支出。 */
|
|
45
|
+
unverTranAmtOut?: string
|
|
46
|
+
/** 今日预计调拨收入。 */
|
|
47
|
+
teaaIn?: string
|
|
48
|
+
/** 今日预计调拨支出。 */
|
|
49
|
+
teaaOut?: string
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type CrossBorderRmbEstimationBody = {
|
|
53
|
+
totalCount?: number
|
|
54
|
+
result?: CrossBorderRmbEstimationResult
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** 查询指定交易日已保存的今日预计调拨收支金额。 */
|
|
58
|
+
export function queryCrossBorderRmbHistory(
|
|
59
|
+
params: CrossBorderRmbHistoryRequest,
|
|
60
|
+
options?: HttpRequestOptions,
|
|
61
|
+
) {
|
|
62
|
+
return baseHttpClient.post<TamResponse<CrossBorderRmbHistoryBody>>(
|
|
63
|
+
HISTORY_TRAN_CODE,
|
|
64
|
+
params,
|
|
65
|
+
options,
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** 使用页面录入的预计调拨金额执行跨境人民币头寸匡算。 */
|
|
70
|
+
export function queryCrossBorderRmbEstimation(
|
|
71
|
+
params: CrossBorderRmbEstimationRequest,
|
|
72
|
+
options?: HttpRequestOptions,
|
|
73
|
+
) {
|
|
74
|
+
return baseHttpClient.post<TamResponse<CrossBorderRmbEstimationBody>>(
|
|
75
|
+
ESTIMATION_TRAN_CODE,
|
|
76
|
+
params,
|
|
77
|
+
options,
|
|
78
|
+
)
|
|
79
|
+
}
|