hfn-components 0.6.6 → 0.6.8

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.
Files changed (46) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/chart/index.mjs +1 -0
  3. package/es/components/htTable/index.d.ts +135 -5
  4. package/es/components/htTable/index.mjs +1 -0
  5. package/es/components/htTable/src/columnDeal.vue.d.ts +1 -1
  6. package/es/components/htTable/src/columnDeal.vue.mjs +18 -11
  7. package/es/components/htTable/src/composables/index.d.ts +3 -0
  8. package/es/components/htTable/src/composables/index.mjs +3 -0
  9. package/es/components/htTable/src/composables/use-copy.d.ts +3 -0
  10. package/es/components/htTable/src/composables/use-copy.mjs +24 -0
  11. package/es/components/htTable/src/composables/use-pagination.d.ts +13 -0
  12. package/es/components/htTable/src/composables/use-pagination.mjs +33 -0
  13. package/es/components/htTable/src/composables/use-selection.d.ts +12 -0
  14. package/es/components/htTable/src/composables/use-selection.mjs +58 -0
  15. package/es/components/htTable/src/htTable.d.ts +37 -2
  16. package/es/components/htTable/src/htTable.mjs +22 -0
  17. package/es/components/htTable/src/htTable.vue.d.ts +57 -3
  18. package/es/components/htTable/src/htTable.vue.mjs +200 -95
  19. package/es/components/htTable/src/htTable.vue2.mjs +55 -25
  20. package/es/components/htTarget/index.mjs +1 -0
  21. package/es/components/htTarget/src/htTarget.vue.mjs +53 -58
  22. package/es/components/htTarget/src/htTarget.vue2.mjs +23 -24
  23. package/es/components/index.mjs +1 -1
  24. package/es/components/pieChart/index.mjs +1 -0
  25. package/es/constants/icons.d.ts +1 -0
  26. package/es/constants/icons.mjs +3 -0
  27. package/es/constants/index.d.ts +1 -0
  28. package/es/constants/index.mjs +3 -1
  29. package/es/constants/table.d.ts +102 -83
  30. package/es/constants/table.mjs +73 -45
  31. package/es/constants/target.d.ts +166 -15
  32. package/es/icons/index.d.ts +1 -0
  33. package/es/icons/index.mjs +1 -0
  34. package/es/icons/svg/empty-simple.svg.mjs +3 -0
  35. package/es/index.mjs +1 -1
  36. package/es/utils/index.mjs +1 -1
  37. package/es/utils/table.d.ts +11 -2
  38. package/es/utils/table.mjs +36 -26
  39. package/es/utils/tool.d.ts +1 -1
  40. package/es/utils/tool.mjs +8 -36
  41. package/package.json +29 -3
  42. package/theme-chalk/ht-table.css +1 -1
  43. package/theme-chalk/ht-target.css +1 -1
  44. package/theme-chalk/index.css +1 -1
  45. package/theme-chalk/src/table.scss +61 -4
  46. package/theme-chalk/src/target.scss +23 -3
@@ -1,9 +1,12 @@
1
- import { defineComponent, ref, onMounted, watch } from 'vue';
2
- import { ElDialog, ElButton, ElRow, ElCol, ElRadioGroup, ElRadio, ElCheckboxGroup, ElCheckbox, ElRadioButton } from 'element-plus';
1
+ import { defineComponent, ref, computed, watch } from 'vue';
2
+ import { ElIcon, ElRadioButton, ElCheckbox, ElCheckboxGroup, ElRadio, ElRadioGroup, ElCol, ElRow, ElButton, ElDialog } from 'element-plus';
3
+ import { Close } from '@element-plus/icons-vue';
3
4
  import { targetProps } from './htTarget.mjs';
4
- import { TARGET_HEAD_KEY, TARGET_END_KEY, BASIC_KEY } from '../../../constants/target.mjs';
5
+ import { getTargetHeadWithYears } from '../../../utils/table.mjs';
6
+ import { TARGET_END_KEY, BASIC_KEY } from '../../../constants/target.mjs';
5
7
  import '../../../constants/chartConfig.mjs';
6
8
  import cloneDeep from 'lodash.clonedeep';
9
+ import { VueDraggable } from 'vue-draggable-plus';
7
10
 
8
11
  var _sfc_main = /* @__PURE__ */ defineComponent({
9
12
  ...{
@@ -16,23 +19,22 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
16
19
  __expose();
17
20
  const props = __props;
18
21
  const emit = __emit;
19
- const targetHead = ref(cloneDeep(TARGET_HEAD_KEY));
20
- const allfoot = ref(cloneDeep(TARGET_END_KEY));
22
+ const targetHead = ref(getTargetHeadWithYears());
21
23
  const selectedHead = ref("lastOneMonth");
22
24
  const checkList = ref([]);
23
25
  const dialogShow = ref(false);
24
26
  const typeTag = ref("target");
25
- onMounted(() => {
26
- let startYear = 2018;
27
- const nowYear = (/* @__PURE__ */ new Date()).getFullYear();
28
- while (startYear <= nowYear) {
29
- targetHead.value.push({
30
- name: `${startYear}`,
31
- key: `${startYear}`
32
- });
33
- startYear++;
27
+ const allfoot = computed(() => {
28
+ if (["thisWeek", "thisMonth", "pastWeek"].includes(selectedHead.value)) {
29
+ return cloneDeep(TARGET_END_KEY).filter((item) => ["return", "excessReturn"].includes(item.key));
30
+ }
31
+ if (["lastOneMonth", "lastThreeMonth", "lastSixMonth"].includes(selectedHead.value)) {
32
+ return cloneDeep(TARGET_END_KEY).filter((item) => item.key !== "monthlyPositiveRatio");
34
33
  }
34
+ return cloneDeep(TARGET_END_KEY);
35
35
  });
36
+ const filteredBasicKey = computed(() => BASIC_KEY.filter((v) => v.type === props.fundType));
37
+ const checkListSet = computed(() => new Set(checkList.value));
36
38
  watch(
37
39
  () => props.dialogShow,
38
40
  (val) => {
@@ -52,13 +54,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
52
54
  }
53
55
  );
54
56
  const headChange = () => {
55
- if (selectedHead.value === "thisWeek" || selectedHead.value === "thisMonth" || selectedHead.value === "pastWeek") {
56
- allfoot.value = cloneDeep(TARGET_END_KEY).filter((item) => item.key === "return" || item.key === "excessReturn");
57
- } else if (selectedHead.value === "lastOneMonth" || selectedHead.value === "lastThreeMonth" || selectedHead.value === "lastSixMonth") {
58
- allfoot.value = cloneDeep(TARGET_END_KEY).filter((item) => item.key !== "monthlyPositiveRatio");
59
- } else {
60
- allfoot.value = cloneDeep(TARGET_END_KEY);
61
- }
62
57
  if (selectedTree.value[selectedHead.value]) {
63
58
  checkList.value = selectedTree.value[selectedHead.value];
64
59
  } else {
@@ -132,7 +127,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
132
127
  });
133
128
  emit("choiceTarget", selectedTable);
134
129
  };
135
- const __returned__ = { props, emit, targetHead, allfoot, selectedHead, checkList, dialogShow, typeTag, headChange, typeChange, selectedTree, selectedList, selectedTarget, deleteItem, confirmTarge, get ElDialog() {
130
+ const __returned__ = { props, emit, targetHead, selectedHead, checkList, dialogShow, typeTag, allfoot, filteredBasicKey, checkListSet, headChange, typeChange, selectedTree, selectedList, selectedTarget, deleteItem, confirmTarge, get ElDialog() {
136
131
  return ElDialog;
137
132
  }, get ElButton() {
138
133
  return ElButton;
@@ -150,8 +145,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
150
145
  return ElCheckbox;
151
146
  }, get ElRadioButton() {
152
147
  return ElRadioButton;
153
- }, get BASIC_KEY() {
154
- return BASIC_KEY;
148
+ }, get ElIcon() {
149
+ return ElIcon;
150
+ }, get Close() {
151
+ return Close;
152
+ }, get VueDraggable() {
153
+ return VueDraggable;
155
154
  } };
156
155
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
157
156
  return __returned__;
@@ -2,6 +2,6 @@ export { HtTable } from './htTable/index.mjs';
2
2
  export { HtChart } from './chart/index.mjs';
3
3
  export { HtTarget } from './htTarget/index.mjs';
4
4
  export { HtPieChart } from './pieChart/index.mjs';
5
- export { columnDealProps, elTableProps } from './htTable/src/htTable.mjs';
6
5
  export { chartProps } from './chart/src/HtChart.mjs';
6
+ export { columnDealProps, elTableProps } from './htTable/src/htTable.mjs';
7
7
  export { pieProps } from './pieChart/src/HtPieChart.mjs';
@@ -1,5 +1,6 @@
1
1
  import htPieChart from './src/HtPieChart.vue.mjs';
2
2
  import { withInstall } from '../../utils/common.mjs';
3
+ import '../../constants/chartConfig.mjs';
3
4
  export { pieProps } from './src/HtPieChart.mjs';
4
5
 
5
6
  const HtPieChart = withInstall(htPieChart);
@@ -0,0 +1 @@
1
+ export declare const EmptySimple: string;
@@ -0,0 +1,3 @@
1
+ const EmptySimple = `data:image/svg+xml,${encodeURIComponent('<svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"/><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"/><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa"/></g></g></svg>')}`;
2
+
3
+ export { EmptySimple };
@@ -2,3 +2,4 @@ export * from './key';
2
2
  export * from './table';
3
3
  export * from './target';
4
4
  export * from './chartConfig';
5
+ export { default as echarts } from './chartConfig';
@@ -1,4 +1,6 @@
1
1
  export { INSTALLED_KEY } from './key.mjs';
2
- export { CLOUMN_DEAL, TABLE_KEY, convertKey } from './table.mjs';
2
+ export { CLOUMN_DEAL, TABLE_KEY } from './table.mjs';
3
3
  export { BASIC_KEY, TARGET_END_KEY, TARGET_HEAD_KEY } from './target.mjs';
4
4
  export { BASIC_CHART_CONFIG, useBasicPieConfig } from './chartConfig.mjs';
5
+ import * as echarts from 'echarts/core';
6
+ export { echarts };
@@ -1,59 +1,45 @@
1
+ import type { TargetHeadKeyType, TargetEndKeyType } from './target';
1
2
  export declare const TABLE_KEY: {
2
- readonly index: "序号";
3
- readonly year: "年份";
4
- readonly fundName: "基金名称";
5
- readonly cucmulativeReturn: "区间收益";
6
- readonly excessReturn: "超额区间收益";
7
- readonly vol: "年化波动率";
8
- readonly excessVol: "超额年化波动率";
9
- readonly sharpeRatio: "夏普比率";
10
- readonly excessSharpeRatio: "超额夏普比率";
11
- readonly calmarRatio: "卡玛比率";
12
- readonly excessCalmarRatio: "超额卡玛比率";
13
- readonly sortinoRatio: "索提诺比率";
14
- readonly excessSortinoRatio: "超额索提诺比率";
15
- readonly downsideDev: "下行风险";
16
- readonly excessDownsideDev: "超额下行风险";
17
- readonly interval: "最大回撤起止区间";
18
- readonly maxDrawdown: "最大回撤";
19
- readonly excessMaxDrawdown: "超额最大回撤";
20
- readonly maxDrawdownDays: "最大回撤回补期(天)";
21
- readonly excessMaxDrawdownDays: "超额最大回撤回补期(天)";
22
- readonly maxNormalDays: "最长连续不创新高天数(天)";
23
- readonly excessMaxNormalDays: "超额最长连续不创新高天数(天)";
24
- readonly annualReturn: "年化收益";
25
- readonly excessAnnualReturn: "超额年化收益";
26
- readonly corr: "相关系数";
27
- readonly informationRatio: "信息比率";
28
- readonly trackingError: "跟踪误差";
29
- readonly alpha: "Alpha";
30
- readonly beta: "Beta";
31
- readonly skew: "偏度";
32
- readonly kurt: "峰度";
33
- readonly cVaR: "VaR(95%置信)";
34
- readonly indexReturns: "同期指数收益";
35
- readonly '01': "1月";
36
- readonly '02': "2月";
37
- readonly '03': "3月";
38
- readonly '04': "4月";
39
- readonly '05': "5月";
40
- readonly '06': "6月";
41
- readonly '07': "7月";
42
- readonly '08': "8月";
43
- readonly '09': "9月";
44
- readonly '10': "10月";
45
- readonly '11': "11月";
46
- readonly '12': "12月";
47
- readonly MonthlyPositiveRatio: "月胜率";
48
- readonly all_year: "全年";
49
- readonly deal_type: "交易类型";
50
- readonly deal_apply_time: "申请时间";
51
- readonly deal_time: "确认日期";
52
- readonly amount: "确认净额";
53
- readonly shares: "确认份额";
54
- readonly price: "确认单位净值";
55
- readonly bsfee: "交易费用";
56
- readonly reward: "业绩报酬";
3
+ readonly materialName: "资料名称";
4
+ readonly materialAssociation: "资料关联";
5
+ readonly reportName: "报告名称";
6
+ readonly relatedManager: "关联管理人";
7
+ readonly reportAssociation: "报告关联";
8
+ readonly modifiedDate: "修改日期";
9
+ readonly creator: "创建人";
10
+ readonly createdDate: "新增日期";
11
+ readonly createdUser: "新增用户";
12
+ readonly managerName: "管理人名称";
13
+ readonly fundCompany: "基金公司";
14
+ readonly AUM: "管理规模";
15
+ readonly AUMUnit: "管理规模(亿元)";
16
+ readonly FundsUM: "在管基金数";
17
+ readonly typeUM: "在管类型";
18
+ readonly YoE: "从业年限";
19
+ readonly industry: "行业名称";
20
+ readonly p4: "产品行业收益率";
21
+ readonly p1: "基准行业收益率";
22
+ readonly raa: "择时收益率";
23
+ readonly rss: "选股收益率";
24
+ readonly rin: "交互收益率";
25
+ readonly r_total: "超额收益率";
26
+ readonly range_return: "区间投资收益率";
27
+ readonly return_money: "区间投资收益(元)";
28
+ readonly range_year_return: "区间投资年化收益率";
29
+ readonly range_contribute: "组合净值贡献度";
30
+ readonly return_money_contribute: "组合收益贡献度";
31
+ readonly money_name: "金额(元)";
32
+ readonly range_date: "统计区间";
33
+ readonly type_name: "策略";
34
+ readonly fid_num: "产品数量";
35
+ readonly assets: "投资市值";
36
+ readonly assets_rate: "投资市值占比";
37
+ readonly price_cnw: "累计净值";
38
+ readonly price_cw_nav: "复权净值";
39
+ readonly suspend_info: "停牌信息";
40
+ readonly assets_type: "资产类别";
41
+ readonly values: "市值";
42
+ readonly values_ratio: "市值占比";
57
43
  readonly ftype: "基金类型";
58
44
  readonly strategy: "平台策略";
59
45
  readonly weight_rate: "权重";
@@ -88,30 +74,62 @@ export declare const TABLE_KEY: {
88
74
  readonly cum_cash: "累计现金分红(元)";
89
75
  readonly cum_redemption: "累计赎回(元)";
90
76
  readonly cum_reward: "累计业绩报酬(元)";
91
- readonly assets_type: "资产类别";
92
- readonly values: "市值";
93
- readonly values_ratio: "市值占比";
94
- readonly type_name: "策略";
95
- readonly fid_num: "产品数量";
96
- readonly assets: "投资市值";
97
- readonly assets_rate: "投资市值占比";
98
- readonly range_return: "区间投资收益率";
99
- readonly return_money: "区间投资收益(元)";
100
- readonly range_year_return: "区间投资年化收益率";
101
- readonly range_contribute: "组合净值贡献度";
102
- readonly return_money_contribute: "组合收益贡献度";
103
- readonly money_name: "金额(元)";
104
- readonly range_date: "统计区间";
105
- readonly price_cnw: "累计净值";
106
- readonly price_cw_nav: "复权净值";
107
- readonly suspend_info: "停牌信息";
108
- readonly industry: "行业名称";
109
- readonly p4: "产品行业收益率";
110
- readonly p1: "基准行业收益率";
111
- readonly raa: "择时收益率";
112
- readonly rss: "选股收益率";
113
- readonly rin: "交互收益率";
114
- readonly r_total: "超额收益率";
77
+ readonly deal_type: "交易类型";
78
+ readonly deal_apply_time: "申请时间";
79
+ readonly deal_time: "确认日期";
80
+ readonly amount: "确认净额";
81
+ readonly shares: "确认份额";
82
+ readonly price: "确认单位净值";
83
+ readonly bsfee: "交易费用";
84
+ readonly reward: "业绩报酬";
85
+ readonly '01': "1月";
86
+ readonly '02': "2月";
87
+ readonly '03': "3月";
88
+ readonly '04': "4月";
89
+ readonly '05': "5月";
90
+ readonly '06': "6月";
91
+ readonly '07': "7月";
92
+ readonly '08': "8月";
93
+ readonly '09': "9月";
94
+ readonly '10': "10月";
95
+ readonly '11': "11月";
96
+ readonly '12': "12月";
97
+ readonly MonthlyPositiveRatio: "月胜率";
98
+ readonly all_year: "全年";
99
+ readonly vol: "年化波动率";
100
+ readonly excessVol: "超额年化波动率";
101
+ readonly sharpeRatio: "夏普比率";
102
+ readonly excessSharpeRatio: "超额夏普比率";
103
+ readonly calmarRatio: "卡玛比率";
104
+ readonly excessCalmarRatio: "超额卡玛比率";
105
+ readonly sortinoRatio: "索提诺比率";
106
+ readonly excessSortinoRatio: "超额索提诺比率";
107
+ readonly downsideDev: "下行风险";
108
+ readonly excessDownsideDev: "超额下行风险";
109
+ readonly interval: "最大回撤起止区间";
110
+ readonly maxDrawdown: "最大回撤";
111
+ readonly excessMaxDrawdown: "超额最大回撤";
112
+ readonly maxDrawdownDays: "最大回撤回补期(天)";
113
+ readonly excessMaxDrawdownDays: "超额最大回撤回补期(天)";
114
+ readonly maxNormalDays: "最长连续不创新高天数(天)";
115
+ readonly excessMaxNormalDays: "超额最长连续不创新高天数(天)";
116
+ readonly corr: "相关系数";
117
+ readonly informationRatio: "信息比率";
118
+ readonly trackingError: "跟踪误差";
119
+ readonly alpha: "Alpha";
120
+ readonly beta: "Beta";
121
+ readonly skew: "偏度";
122
+ readonly kurt: "峰度";
123
+ readonly cVaR: "VaR(95%置信)";
124
+ readonly cucmulativeReturn: "区间收益";
125
+ readonly excessReturn: "超额区间收益";
126
+ readonly annualReturn: "年化收益";
127
+ readonly excessAnnualReturn: "超额年化收益";
128
+ readonly indexReturns: "同期指数收益";
129
+ readonly index: "序号";
130
+ readonly year: "年份";
131
+ readonly fundName: "基金名称";
132
+ readonly operation: string;
115
133
  };
116
134
  export declare const CLOUMN_DEAL: {
117
135
  basicText4: (val: number | string | undefined) => string;
@@ -120,13 +138,14 @@ export declare const CLOUMN_DEAL: {
120
138
  percentage: (val: number | string | undefined) => string;
121
139
  percentage4: (val: number | string | undefined) => string;
122
140
  absPercentage: (val: number | string | undefined) => string;
123
- thoundsandText2: (val: number | string | undefined) => string;
124
- thoundsandText4: (val: number | string | undefined) => string;
141
+ thousandText2: (val: number | string | undefined) => string;
142
+ thousandText4: (val: number | string | undefined) => string;
125
143
  notProcessed: null;
126
144
  other: null;
127
145
  customDeal: null;
128
146
  customSlot: null;
129
147
  };
130
- export declare const convertKey: (data: any, key: string) => any;
131
- export type clounmKyeType = keyof typeof TABLE_KEY;
148
+ type TargetCombinedKey = `${TargetHeadKeyType}_${TargetEndKeyType}`;
149
+ export type clounmKyeType = keyof typeof TABLE_KEY | TargetCombinedKey;
132
150
  export type dealKeyType = keyof typeof CLOUMN_DEAL;
151
+ export {};
@@ -1,11 +1,21 @@
1
- import { splitK, dataHandle } from '../utils/tool.mjs';
1
+ import { thousandText4, thousandText2, absPercentage, percentage4, percentage, basicText4 } from '../utils/table.mjs';
2
2
 
3
- const TABLE_KEY = {
3
+ const TABLE_KEY_BASE = {
4
4
  index: "\u5E8F\u53F7",
5
5
  year: "\u5E74\u4EFD",
6
- fundName: "\u57FA\u91D1\u540D\u79F0",
6
+ fundName: "\u57FA\u91D1\u540D\u79F0"
7
+ };
8
+ const TABLE_KEY_COMMON = {
9
+ operation: "\u64CD\u4F5C"
10
+ };
11
+ const TABLE_KEY_RETURN = {
7
12
  cucmulativeReturn: "\u533A\u95F4\u6536\u76CA",
8
13
  excessReturn: "\u8D85\u989D\u533A\u95F4\u6536\u76CA",
14
+ annualReturn: "\u5E74\u5316\u6536\u76CA",
15
+ excessAnnualReturn: "\u8D85\u989D\u5E74\u5316\u6536\u76CA",
16
+ indexReturns: "\u540C\u671F\u6307\u6570\u6536\u76CA"
17
+ };
18
+ const TABLE_KEY_RISK = {
9
19
  vol: "\u5E74\u5316\u6CE2\u52A8\u7387",
10
20
  excessVol: "\u8D85\u989D\u5E74\u5316\u6CE2\u52A8\u7387",
11
21
  sharpeRatio: "\u590F\u666E\u6BD4\u7387",
@@ -23,8 +33,6 @@ const TABLE_KEY = {
23
33
  excessMaxDrawdownDays: "\u8D85\u989D\u6700\u5927\u56DE\u64A4\u56DE\u8865\u671F\uFF08\u5929\uFF09",
24
34
  maxNormalDays: "\u6700\u957F\u8FDE\u7EED\u4E0D\u521B\u65B0\u9AD8\u5929\u6570\uFF08\u5929\uFF09",
25
35
  excessMaxNormalDays: "\u8D85\u989D\u6700\u957F\u8FDE\u7EED\u4E0D\u521B\u65B0\u9AD8\u5929\u6570\uFF08\u5929\uFF09",
26
- annualReturn: "\u5E74\u5316\u6536\u76CA",
27
- excessAnnualReturn: "\u8D85\u989D\u5E74\u5316\u6536\u76CA",
28
36
  corr: "\u76F8\u5173\u7CFB\u6570",
29
37
  informationRatio: "\u4FE1\u606F\u6BD4\u7387",
30
38
  trackingError: "\u8DDF\u8E2A\u8BEF\u5DEE",
@@ -32,8 +40,9 @@ const TABLE_KEY = {
32
40
  beta: "Beta",
33
41
  skew: "\u504F\u5EA6",
34
42
  kurt: "\u5CF0\u5EA6",
35
- cVaR: "VaR\uFF0895%\u7F6E\u4FE1\uFF09",
36
- indexReturns: "\u540C\u671F\u6307\u6570\u6536\u76CA",
43
+ cVaR: "VaR\uFF0895%\u7F6E\u4FE1\uFF09"
44
+ };
45
+ const TABLE_KEY_MONTH = {
37
46
  "01": "1\u6708",
38
47
  "02": "2\u6708",
39
48
  "03": "3\u6708",
@@ -47,8 +56,9 @@ const TABLE_KEY = {
47
56
  "11": "11\u6708",
48
57
  "12": "12\u6708",
49
58
  MonthlyPositiveRatio: "\u6708\u80DC\u7387",
50
- all_year: "\u5168\u5E74",
51
- // 交易记录
59
+ all_year: "\u5168\u5E74"
60
+ };
61
+ const TABLE_KEY_TRADE = {
52
62
  deal_type: "\u4EA4\u6613\u7C7B\u578B",
53
63
  deal_apply_time: "\u7533\u8BF7\u65F6\u95F4",
54
64
  deal_time: "\u786E\u8BA4\u65E5\u671F",
@@ -56,8 +66,9 @@ const TABLE_KEY = {
56
66
  shares: "\u786E\u8BA4\u4EFD\u989D",
57
67
  price: "\u786E\u8BA4\u5355\u4F4D\u51C0\u503C",
58
68
  bsfee: "\u4EA4\u6613\u8D39\u7528",
59
- reward: "\u4E1A\u7EE9\u62A5\u916C",
60
- // 持仓列表
69
+ reward: "\u4E1A\u7EE9\u62A5\u916C"
70
+ };
71
+ const TABLE_KEY_POSITION = {
61
72
  ftype: "\u57FA\u91D1\u7C7B\u578B",
62
73
  strategy: "\u5E73\u53F0\u7B56\u7565",
63
74
  weight_rate: "\u6743\u91CD",
@@ -91,31 +102,32 @@ const TABLE_KEY = {
91
102
  cum_subscription: "\u7D2F\u8BA1\u8BA4\u7533\u8D2D\uFF08\u5143\uFF09",
92
103
  cum_cash: "\u7D2F\u8BA1\u73B0\u91D1\u5206\u7EA2\uFF08\u5143\uFF09",
93
104
  cum_redemption: "\u7D2F\u8BA1\u8D4E\u56DE\uFF08\u5143\uFF09",
94
- cum_reward: "\u7D2F\u8BA1\u4E1A\u7EE9\u62A5\u916C\uFF08\u5143\uFF09",
95
- // 资产配置
105
+ cum_reward: "\u7D2F\u8BA1\u4E1A\u7EE9\u62A5\u916C\uFF08\u5143\uFF09"
106
+ };
107
+ const TABLE_KEY_ASSETS = {
96
108
  assets_type: "\u8D44\u4EA7\u7C7B\u522B",
97
109
  values: "\u5E02\u503C",
98
- values_ratio: "\u5E02\u503C\u5360\u6BD4",
99
- // 底层配置
110
+ values_ratio: "\u5E02\u503C\u5360\u6BD4"
111
+ };
112
+ const TABLE_KEY_FOF = {
100
113
  type_name: "\u7B56\u7565",
101
114
  fid_num: "\u4EA7\u54C1\u6570\u91CF",
102
115
  assets: "\u6295\u8D44\u5E02\u503C",
103
116
  assets_rate: "\u6295\u8D44\u5E02\u503C\u5360\u6BD4",
104
- // 收益明细
117
+ price_cnw: "\u7D2F\u8BA1\u51C0\u503C",
118
+ price_cw_nav: "\u590D\u6743\u51C0\u503C",
119
+ suspend_info: "\u505C\u724C\u4FE1\u606F"
120
+ };
121
+ const TABLE_KEY_DETAIL = {
105
122
  range_return: "\u533A\u95F4\u6295\u8D44\u6536\u76CA\u7387",
106
123
  return_money: "\u533A\u95F4\u6295\u8D44\u6536\u76CA\uFF08\u5143\uFF09",
107
124
  range_year_return: "\u533A\u95F4\u6295\u8D44\u5E74\u5316\u6536\u76CA\u7387",
108
125
  range_contribute: "\u7EC4\u5408\u51C0\u503C\u8D21\u732E\u5EA6",
109
126
  return_money_contribute: "\u7EC4\u5408\u6536\u76CA\u8D21\u732E\u5EA6",
110
- // 月度收益
111
127
  money_name: "\u91D1\u989D\uFF08\u5143\uFF09",
112
- // 估值表分析-收益分析-收益明细
113
- range_date: "\u7EDF\u8BA1\u533A\u95F4",
114
- // 持仓概览-fof底层
115
- price_cnw: "\u7D2F\u8BA1\u51C0\u503C",
116
- price_cw_nav: "\u590D\u6743\u51C0\u503C",
117
- suspend_info: "\u505C\u724C\u4FE1\u606F",
118
- // 归因分析
128
+ range_date: "\u7EDF\u8BA1\u533A\u95F4"
129
+ };
130
+ const TABLE_KEY_ATTRIBUTION = {
119
131
  industry: "\u884C\u4E1A\u540D\u79F0",
120
132
  p4: "\u4EA7\u54C1\u884C\u4E1A\u6536\u76CA\u7387",
121
133
  p1: "\u57FA\u51C6\u884C\u4E1A\u6536\u76CA\u7387",
@@ -124,23 +136,43 @@ const TABLE_KEY = {
124
136
  rin: "\u4EA4\u4E92\u6536\u76CA\u7387",
125
137
  r_total: "\u8D85\u989D\u6536\u76CA\u7387"
126
138
  };
127
- const basicText4 = (val) => {
128
- return typeof val !== "number" ? "-" : val.toFixed(4);
129
- };
130
- const percentage = (val) => {
131
- return typeof val !== "number" ? "-" : (val * 100).toFixed(2) + "%";
132
- };
133
- const percentage4 = (val) => {
134
- return typeof val !== "number" ? "-" : (val * 100).toFixed(4) + "%";
139
+ const TABLE_KEY_GMMANAGER = {
140
+ managerName: "\u7BA1\u7406\u4EBA\u540D\u79F0",
141
+ fundCompany: "\u57FA\u91D1\u516C\u53F8",
142
+ AUM: "\u7BA1\u7406\u89C4\u6A21",
143
+ AUMUnit: "\u7BA1\u7406\u89C4\u6A21(\u4EBF\u5143)",
144
+ FundsUM: "\u5728\u7BA1\u57FA\u91D1\u6570",
145
+ typeUM: "\u5728\u7BA1\u7C7B\u578B",
146
+ YoE: "\u4ECE\u4E1A\u5E74\u9650"
135
147
  };
136
- const absPercentage = (val) => {
137
- return typeof val !== "number" ? "-" : Math.abs(val * 100).toFixed(2) + "%";
148
+ const TABLE_KEY_REPORT = {
149
+ reportName: "\u62A5\u544A\u540D\u79F0",
150
+ relatedManager: "\u5173\u8054\u7BA1\u7406\u4EBA",
151
+ reportAssociation: "\u62A5\u544A\u5173\u8054",
152
+ modifiedDate: "\u4FEE\u6539\u65E5\u671F",
153
+ creator: "\u521B\u5EFA\u4EBA",
154
+ createdDate: "\u65B0\u589E\u65E5\u671F",
155
+ createdUser: "\u65B0\u589E\u7528\u6237"
138
156
  };
139
- const thoundsandText2 = (val) => {
140
- return typeof val === "number" ? splitK(dataHandle(val, false, 2)) : "-";
157
+ const MATERIAL_KEY = {
158
+ materialName: "\u8D44\u6599\u540D\u79F0",
159
+ materialAssociation: "\u8D44\u6599\u5173\u8054"
141
160
  };
142
- const thoundsandText4 = (val) => {
143
- return typeof val === "number" ? splitK(dataHandle(val, false, 4)) : "-";
161
+ const TABLE_KEY = {
162
+ ...TABLE_KEY_COMMON,
163
+ ...TABLE_KEY_BASE,
164
+ ...TABLE_KEY_RETURN,
165
+ ...TABLE_KEY_RISK,
166
+ ...TABLE_KEY_MONTH,
167
+ ...TABLE_KEY_TRADE,
168
+ ...TABLE_KEY_POSITION,
169
+ ...TABLE_KEY_ASSETS,
170
+ ...TABLE_KEY_FOF,
171
+ ...TABLE_KEY_DETAIL,
172
+ ...TABLE_KEY_ATTRIBUTION,
173
+ ...TABLE_KEY_GMMANAGER,
174
+ ...TABLE_KEY_REPORT,
175
+ ...MATERIAL_KEY
144
176
  };
145
177
  const CLOUMN_DEAL = {
146
178
  basicText4,
@@ -149,16 +181,12 @@ const CLOUMN_DEAL = {
149
181
  percentage,
150
182
  percentage4,
151
183
  absPercentage,
152
- thoundsandText2,
153
- thoundsandText4,
184
+ thousandText2,
185
+ thousandText4,
154
186
  notProcessed: null,
155
187
  other: null,
156
188
  customDeal: null,
157
189
  customSlot: null
158
190
  };
159
- const convertKey = (data, key) => {
160
- const newKey = key.replace(/([A-Z])/g, "_$1").toLowerCase();
161
- return data[key] || data[newKey];
162
- };
163
191
 
164
- export { CLOUMN_DEAL, TABLE_KEY, convertKey };
192
+ export { CLOUMN_DEAL, TABLE_KEY };