verce-vue-test 0.0.113 → 0.0.115

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/env.d.ts CHANGED
@@ -16,6 +16,7 @@ declare global {
16
16
 
17
17
  declare module 'vue' {
18
18
  export interface GlobalComponents {
19
+ BusinessType: typeof import('./src/components/business/Public/BusinessType.vue')['default']
19
20
  DateRange: typeof import('./src/components/element-rewrite/DateRange.vue')['default']
20
21
  ElButtonPro: typeof import('./src/components/element-rewrite/ElButtonPro.vue')['default']
21
22
  ElFormDialog: typeof import('./src/components/element-rewrite/ElFormDialog.vue')['default']
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verce-vue-test",
3
- "version": "0.0.113",
3
+ "version": "0.0.115",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <span>{{ displayValue }}</span>
3
+ </template>
4
+
5
+ <script setup lang="ts" name="BusinessType">
6
+ import { computed } from 'vue'
7
+
8
+ const businessTypeMap: Record<string, string> = {
9
+ '1': '对公/个人客户收付',
10
+ '2': '本票签发/兑付',
11
+ '3': '三省一市汇票签发/兑付',
12
+ '4': '分行资金调拨',
13
+ '5': '同业业务',
14
+ '6': '资金业务',
15
+ '7': '理财业务',
16
+ '8': '债券承销业务',
17
+ '9': '司库业务',
18
+ '10': '现金出入库',
19
+ '11': '财政准备金退缴',
20
+ '12': '同业清算款项收付',
21
+ '13': '财政零余额业务',
22
+ '14': '银行承兑汇票',
23
+ '15': '托管业务',
24
+ '16': '票据业务',
25
+ }
26
+
27
+ const props = defineProps<{
28
+ value?: string | number | null
29
+ }>()
30
+
31
+ const displayValue = computed(() => {
32
+ const value = String(props.value ?? '').trim()
33
+
34
+ if (!value) return '-'
35
+
36
+ return businessTypeMap[value] ?? value
37
+ })
38
+ </script>
@@ -1,5 +1,6 @@
1
1
  import type { App, Component } from 'vue'
2
2
 
3
+ import BusinessType from './business/Public/BusinessType.vue'
3
4
  import TokenTag from './business/Public/TokenTag.vue'
4
5
  import DateRange from './element-rewrite/DateRange.vue'
5
6
  import ElButtonPro from './element-rewrite/ElButtonPro.vue'
@@ -20,6 +21,13 @@ type GlobalComponentDefinition = {
20
21
  }
21
22
 
22
23
  const globalComponentDefinitions: GlobalComponentDefinition[] = [
24
+ {
25
+ name: 'BusinessType',
26
+ component: BusinessType,
27
+ category: '展示组件',
28
+ description: '根据业务类型编码展示对应的业务名称。',
29
+ filePath: 'src/components/business/Public/BusinessType.vue',
30
+ },
23
31
  {
24
32
  name: 'TokenTag',
25
33
  component: TokenTag,
@@ -821,6 +821,26 @@ td {
821
821
  .shibor-section th:nth-child(5) { width: 16%; }
822
822
  .shibor-section th:nth-child(6) { width: 16%; }
823
823
 
824
+ .shibor-section thead {
825
+ position: relative;
826
+ z-index: 1;
827
+ }
828
+
829
+ .shibor-section tbody.is-looping {
830
+ animation: shibor-table-loop var(--shibor-scroll-duration) linear infinite;
831
+ will-change: transform;
832
+ }
833
+
834
+ .shibor-section .table-shell:hover tbody.is-looping {
835
+ animation-play-state: paused;
836
+ }
837
+
838
+ @keyframes shibor-table-loop {
839
+ to {
840
+ transform: translate3d(0, -50%, 0);
841
+ }
842
+ }
843
+
824
844
  .monitor-section th:nth-child(1) { width: 38%; }
825
845
  .monitor-section th:nth-child(2) { width: 36%; }
826
846
  .monitor-section th:nth-child(3) { width: 26%; }
@@ -334,7 +334,7 @@ const gaugeCards = computed<GaugeCard[]>(() => [
334
334
  ])
335
335
 
336
336
  const shiborRows = computed<ShiborRow[]>(() =>
337
- shiborRecords.value.slice(0, 4).map((item) => {
337
+ shiborRecords.value.map((item) => {
338
338
  const useAssetFtp = Boolean(String(item.zcFtp ?? '').trim())
339
339
  return {
340
340
  date: displayText(item.dateDt),
@@ -347,6 +347,17 @@ const shiborRows = computed<ShiborRow[]>(() =>
347
347
  }),
348
348
  )
349
349
 
350
+ const isShiborLooping = computed(() => shiborRows.value.length > 4)
351
+ const shiborDisplayRows = computed(() =>
352
+ isShiborLooping.value ? [...shiborRows.value, ...shiborRows.value] : shiborRows.value,
353
+ )
354
+ const shiborScrollStyle = computed<Record<string, string> | undefined>(() => {
355
+ if (!isShiborLooping.value) return undefined
356
+ return {
357
+ '--shibor-scroll-duration': `${Math.max(shiborRows.value.length * 2.5, 12)}s`,
358
+ }
359
+ })
360
+
350
361
  const projectMetricRows = computed<ProjectMetricRow[]>(() => [
351
362
  { project: '同业负债占比', dataTime: displayText(interbankRecord.value.tyfzzbTime), current: displayText(interbankRecord.value.tyfzzb) },
352
363
  { project: '同业活期存款余额', dataTime: displayText(interbankRecord.value.tyhqckyeTime), current: displayText(interbankRecord.value.tyhqckye) },
@@ -1244,8 +1255,14 @@ onUnmounted(() => {
1244
1255
  <th>比上日(BP)</th>
1245
1256
  </tr>
1246
1257
  </thead>
1247
- <tbody>
1248
- <tr v-for="row in shiborRows" :key="`${row.date}-${row.term}`">
1258
+ <tbody
1259
+ :class="{ 'is-looping': isShiborLooping }"
1260
+ :style="shiborScrollStyle"
1261
+ >
1262
+ <tr
1263
+ v-for="(row, index) in shiborDisplayRows"
1264
+ :key="`${row.date}-${row.term}-${index}`"
1265
+ >
1249
1266
  <td>{{ row.date }}</td>
1250
1267
  <td>{{ row.term }}</td>
1251
1268
  <td>{{ row.shibor }}</td>