hfn-components 0.3.3 → 0.3.4

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/dist/index.css CHANGED
@@ -1 +1 @@
1
- .echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}
1
+ .echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{display:flex;margin-bottom:10px;width:33.33%}.check_item{display:flex;justify-content:space-between}
package/es/component.mjs CHANGED
@@ -1,12 +1,14 @@
1
1
  import { HtElTable } from './components/elTable/index.mjs';
2
2
  import { HtChart } from './components/chart/index.mjs';
3
3
  import { HtPieChart } from './components/pieChart/index.mjs';
4
+ import { HtTarget } from './components/htTarget/index.mjs';
4
5
 
5
6
  var Components = [
6
7
  // HtTable,
7
8
  HtChart,
8
9
  HtElTable,
9
- HtPieChart
10
+ HtPieChart,
11
+ HtTarget
10
12
  ];
11
13
 
12
14
  export { Components as default };
@@ -85,6 +85,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
85
85
  $setup.noData ? (openBlock(), createElementBlock("div", _hoisted_5, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true)
86
86
  ]);
87
87
  }
88
- var chart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/chart/src/HtChart.vue"]]);
88
+ var chart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/chart/src/HtChart.vue"]]);
89
89
 
90
90
  export { chart as default };
@@ -706,6 +706,15 @@ export declare const HtElTable: import("hfn-components/es/utils").SFCWithInstall
706
706
  readonly money_name: "金额(元)";
707
707
  };
708
708
  readonly convertKey: (data: any, key: string) => any;
709
+ readonly TARGET_HEAD_KEY: {
710
+ name: string;
711
+ key: string;
712
+ }[];
713
+ readonly TARGET_END_KEY: {
714
+ name: string;
715
+ key: string;
716
+ dealType: string;
717
+ }[];
709
718
  ColumnDeal: import("vue").DefineComponent<{
710
719
  readonly dealType: {
711
720
  readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal">;
@@ -34,6 +34,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
34
34
  /* TEXT */
35
35
  ));
36
36
  }
37
- var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/elTable/src/columnDeal.vue"]]);
37
+ var ColumnDeal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/elTable/src/columnDeal.vue"]]);
38
38
 
39
39
  export { ColumnDeal as default };
@@ -706,6 +706,15 @@ declare const _default: import("vue").DefineComponent<{
706
706
  readonly money_name: "金额(元)";
707
707
  };
708
708
  readonly convertKey: (data: any, key: string) => any;
709
+ readonly TARGET_HEAD_KEY: {
710
+ name: string;
711
+ key: string;
712
+ }[];
713
+ readonly TARGET_END_KEY: {
714
+ name: string;
715
+ key: string;
716
+ dealType: string;
717
+ }[];
709
718
  ColumnDeal: import("vue").DefineComponent<{
710
719
  readonly dealType: {
711
720
  readonly type: import("vue").PropType<"basicText4" | "colorText" | "colorPercentage" | "percentage" | "percentage4" | "absPercentage" | "thoundsandText2" | "thoundsandText4" | "notProcessed" | "other" | "customDeal">;
@@ -1,7 +1,11 @@
1
1
  import _sfc_main from './elTable.vue2.mjs';
2
- import { withDirectives, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList } from 'vue';
2
+ import { withDirectives, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString } from 'vue';
3
3
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
4
4
 
5
+ const _hoisted_1 = { key: 0 };
6
+ const _hoisted_2 = { key: 0 };
7
+ const _hoisted_3 = { key: 1 };
8
+ const _hoisted_4 = { key: 1 };
5
9
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6
10
  return withDirectives((openBlock(), createBlock($setup["ElTable"], {
7
11
  data: $setup.props.dataSource,
@@ -23,9 +27,42 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
23
27
  resizable: "",
24
28
  key: item.key,
25
29
  prop: item.key,
26
- label: item.customizeLabel ? item.customizeLabel : $setup.TABLE_KEY[item.key],
27
30
  width: item.width
28
31
  }, {
32
+ header: withCtx(() => [
33
+ item.customizeLabel ? (openBlock(), createElementBlock("span", _hoisted_1, [
34
+ item.customizeLabel === "target" ? (openBlock(), createElementBlock("div", _hoisted_2, [
35
+ createElementVNode(
36
+ "div",
37
+ null,
38
+ toDisplayString($setup.TARGET_HEAD_KEY.filter((items) => items.key === item.key.split("_")[0])[0].name),
39
+ 1
40
+ /* TEXT */
41
+ ),
42
+ createElementVNode(
43
+ "div",
44
+ null,
45
+ toDisplayString($setup.TARGET_END_KEY.filter((items) => items.key === item.key.split("_")[1])[0].name),
46
+ 1
47
+ /* TEXT */
48
+ )
49
+ ])) : (openBlock(), createElementBlock(
50
+ "div",
51
+ _hoisted_3,
52
+ toDisplayString(item.customizeLabel),
53
+ 1
54
+ /* TEXT */
55
+ ))
56
+ ])) : (openBlock(), createElementBlock("span", _hoisted_4, [
57
+ createElementVNode(
58
+ "div",
59
+ null,
60
+ toDisplayString($setup.TABLE_KEY[item.key]),
61
+ 1
62
+ /* TEXT */
63
+ )
64
+ ]))
65
+ ]),
29
66
  default: withCtx((scope) => [
30
67
  item.dealType === "other" ? (openBlock(), createBlock($setup["ColumnDeal"], {
31
68
  key: 0,
@@ -41,7 +78,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
41
78
  ]),
42
79
  _: 2
43
80
  /* DYNAMIC */
44
- }, 1032, ["prop", "label", "width"]);
81
+ }, 1032, ["prop", "width"]);
45
82
  }),
46
83
  128
47
84
  /* KEYED_FRAGMENT */
@@ -53,6 +90,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
53
90
  [$setup["vLoading"], $setup.props.loading]
54
91
  ]);
55
92
  }
56
- var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/elTable/src/elTable.vue"]]);
93
+ var elTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/elTable/src/elTable.vue"]]);
57
94
 
58
95
  export { elTable as default };
@@ -1,6 +1,7 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import { ElTable, ElTableColumn, vLoading } from 'element-plus';
3
3
  import { TABLE_KEY, convertKey } from '../../../constants/table.mjs';
4
+ import { TARGET_HEAD_KEY, TARGET_END_KEY } from '../../../constants/target.mjs';
4
5
  import '../../../constants/chartConfig.mjs';
5
6
  import ColumnDeal from './columnDeal.vue.mjs';
6
7
  import { elTableProps } from './elTable.mjs';
@@ -21,6 +22,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
21
22
  return TABLE_KEY;
22
23
  }, get convertKey() {
23
24
  return convertKey;
25
+ }, get TARGET_HEAD_KEY() {
26
+ return TARGET_HEAD_KEY;
27
+ }, get TARGET_END_KEY() {
28
+ return TARGET_END_KEY;
24
29
  }, ColumnDeal };
25
30
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
26
31
  return __returned__;
@@ -1,31 +1,43 @@
1
- export declare const HtTarget: import("hfn-components/es/utils").SFCWithInstall<import("vue").DefineComponent<{}, {
1
+ export declare const HtTarget: import("hfn-components/es/utils").SFCWithInstall<import("vue").DefineComponent<{
2
+ readonly dialogShow: {
3
+ readonly type: BooleanConstructor;
4
+ readonly default: false;
5
+ };
6
+ readonly targetData: {
7
+ readonly type: import("vue").PropType<string[]>;
8
+ readonly default: readonly [];
9
+ };
10
+ }, {
11
+ props: import("@vue/shared").LooseRequired<{
12
+ readonly targetData: string[];
13
+ readonly dialogShow: boolean;
14
+ readonly onChoiceTarget?: ((...args: any[]) => any) | undefined;
15
+ readonly onChoiceCancel?: ((...args: any[]) => any) | undefined;
16
+ } & {}>;
17
+ emit: (event: "choiceTarget" | "choiceCancel", ...args: any[]) => void;
2
18
  targetHead: import("vue").Ref<{
3
19
  name: string;
4
20
  key: string;
5
21
  }[]>;
6
- allfoot: import("vue").Ref<({
7
- name: string;
8
- key: string;
9
- slot: string;
10
- excludeKey?: undefined;
11
- } | {
22
+ allfoot: import("vue").Ref<{
12
23
  name: string;
13
24
  key: string;
14
- slot: string;
15
- excludeKey: string;
16
- })[]>;
25
+ dealType: string;
26
+ }[]>;
17
27
  selectedHead: import("vue").Ref<string>;
18
28
  checkList: import("vue").Ref<string[]>;
29
+ dialogShow: import("vue").Ref<boolean>;
19
30
  typeTag: import("vue").Ref<string>;
20
- aaa: import("vue").Ref<boolean>;
21
31
  headChange: () => void;
22
32
  selectedTree: import("vue").Ref<Record<string, string[]>>;
23
33
  selectedList: import("vue").Ref<{
24
34
  name: string;
25
35
  key: string;
36
+ dealType: string;
26
37
  }[]>;
27
- selectedTarget: (val: string, type: string) => void;
38
+ selectedTarget: (val: string, headKey: string, type: string) => void;
28
39
  deleteItem: (key: string) => void;
40
+ confirmTarge: () => void;
29
41
  readonly ElDialog: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
30
42
  readonly appendToBody: BooleanConstructor;
31
43
  readonly appendTo: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "body", boolean>;
@@ -1972,8 +1984,23 @@ export declare const HtTarget: import("hfn-components/es/utils").SFCWithInstall<
1972
1984
  readonly BASIC_KEY: {
1973
1985
  name: string;
1974
1986
  key: string;
1975
- title: string;
1987
+ dealType: string;
1976
1988
  }[];
1977
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>> & Record<string, any>;
1989
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("choiceTarget" | "choiceCancel")[], "choiceTarget" | "choiceCancel", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1990
+ readonly dialogShow: {
1991
+ readonly type: BooleanConstructor;
1992
+ readonly default: false;
1993
+ };
1994
+ readonly targetData: {
1995
+ readonly type: import("vue").PropType<string[]>;
1996
+ readonly default: readonly [];
1997
+ };
1998
+ }>> & {
1999
+ onChoiceTarget?: ((...args: any[]) => any) | undefined;
2000
+ onChoiceCancel?: ((...args: any[]) => any) | undefined;
2001
+ }, {
2002
+ readonly targetData: string[];
2003
+ readonly dialogShow: boolean;
2004
+ }, {}>> & Record<string, any>;
1978
2005
  export default HtTarget;
1979
2006
  export * from './src/htTarget.vue';
@@ -1 +1,12 @@
1
- export declare const aa = 11;
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ export declare const targetProps: {
3
+ readonly dialogShow: {
4
+ readonly type: BooleanConstructor;
5
+ readonly default: false;
6
+ };
7
+ readonly targetData: {
8
+ readonly type: PropType<string[]>;
9
+ readonly default: readonly [];
10
+ };
11
+ };
12
+ export type TargetProps = ExtractPropTypes<typeof targetProps>;
@@ -1,3 +1,12 @@
1
- const aa = 11;
1
+ const targetProps = {
2
+ dialogShow: {
3
+ type: Boolean,
4
+ default: false
5
+ },
6
+ targetData: {
7
+ type: Array,
8
+ default: []
9
+ }
10
+ };
2
11
 
3
- export { aa };
12
+ export { targetProps };
@@ -1,31 +1,43 @@
1
- declare const _default: import("vue").DefineComponent<{}, {
1
+ declare const _default: import("vue").DefineComponent<{
2
+ readonly dialogShow: {
3
+ readonly type: BooleanConstructor;
4
+ readonly default: false;
5
+ };
6
+ readonly targetData: {
7
+ readonly type: import("vue").PropType<string[]>;
8
+ readonly default: readonly [];
9
+ };
10
+ }, {
11
+ props: import("@vue/shared").LooseRequired<{
12
+ readonly targetData: string[];
13
+ readonly dialogShow: boolean;
14
+ readonly onChoiceTarget?: ((...args: any[]) => any) | undefined;
15
+ readonly onChoiceCancel?: ((...args: any[]) => any) | undefined;
16
+ } & {}>;
17
+ emit: (event: "choiceTarget" | "choiceCancel", ...args: any[]) => void;
2
18
  targetHead: import("vue").Ref<{
3
19
  name: string;
4
20
  key: string;
5
21
  }[]>;
6
- allfoot: import("vue").Ref<({
7
- name: string;
8
- key: string;
9
- slot: string;
10
- excludeKey?: undefined;
11
- } | {
22
+ allfoot: import("vue").Ref<{
12
23
  name: string;
13
24
  key: string;
14
- slot: string;
15
- excludeKey: string;
16
- })[]>;
25
+ dealType: string;
26
+ }[]>;
17
27
  selectedHead: import("vue").Ref<string>;
18
28
  checkList: import("vue").Ref<string[]>;
29
+ dialogShow: import("vue").Ref<boolean>;
19
30
  typeTag: import("vue").Ref<string>;
20
- aaa: import("vue").Ref<boolean>;
21
31
  headChange: () => void;
22
32
  selectedTree: import("vue").Ref<Record<string, string[]>>;
23
33
  selectedList: import("vue").Ref<{
24
34
  name: string;
25
35
  key: string;
36
+ dealType: string;
26
37
  }[]>;
27
- selectedTarget: (val: string, type: string) => void;
38
+ selectedTarget: (val: string, headKey: string, type: string) => void;
28
39
  deleteItem: (key: string) => void;
40
+ confirmTarge: () => void;
29
41
  readonly ElDialog: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
30
42
  readonly appendToBody: BooleanConstructor;
31
43
  readonly appendTo: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string & {}) | (() => string) | ((new (...args: any[]) => string & {}) | (() => string))[], unknown, unknown, "body", boolean>;
@@ -1972,7 +1984,22 @@ declare const _default: import("vue").DefineComponent<{}, {
1972
1984
  readonly BASIC_KEY: {
1973
1985
  name: string;
1974
1986
  key: string;
1975
- title: string;
1987
+ dealType: string;
1976
1988
  }[];
1977
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1989
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("choiceTarget" | "choiceCancel")[], "choiceTarget" | "choiceCancel", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1990
+ readonly dialogShow: {
1991
+ readonly type: BooleanConstructor;
1992
+ readonly default: false;
1993
+ };
1994
+ readonly targetData: {
1995
+ readonly type: import("vue").PropType<string[]>;
1996
+ readonly default: readonly [];
1997
+ };
1998
+ }>> & {
1999
+ onChoiceTarget?: ((...args: any[]) => any) | undefined;
2000
+ onChoiceCancel?: ((...args: any[]) => any) | undefined;
2001
+ }, {
2002
+ readonly targetData: string[];
2003
+ readonly dialogShow: boolean;
2004
+ }, {}>;
1978
2005
  export default _default;
@@ -17,13 +17,17 @@ const _hoisted_6 = { class: "dialog-footer" };
17
17
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18
18
  return openBlock(), createElementBlock("div", null, [
19
19
  createVNode($setup["ElDialog"], {
20
- modelValue: $setup.aaa,
21
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.aaa = $event),
22
- class: "dialog"
20
+ modelValue: $setup.dialogShow,
21
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.dialogShow = $event),
22
+ class: "dialog",
23
+ onClose: _cache[5] || (_cache[5] = ($event) => $setup.emit("choiceCancel"))
23
24
  }, {
24
25
  footer: withCtx(() => [
25
26
  createElementVNode("div", _hoisted_6, [
26
- createVNode($setup["ElButton"], { type: "primary" }, {
27
+ createVNode($setup["ElButton"], {
28
+ onClick: $setup.confirmTarge,
29
+ type: "primary"
30
+ }, {
27
31
  default: withCtx(() => [
28
32
  createTextVNode(" Confirm ")
29
33
  ]),
@@ -105,7 +109,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
105
109
  key: item.key
106
110
  }, [
107
111
  createVNode($setup["ElCheckbox"], {
108
- onChange: ($event) => $setup.selectedTarget(item.key, "target"),
112
+ onChange: ($event) => $setup.selectedTarget(item.key, $setup.selectedHead, "target"),
109
113
  disabled: $setup.checkList.includes(item.key),
110
114
  label: item.name,
111
115
  value: item.key
@@ -136,7 +140,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
136
140
  key: item.key
137
141
  }, [
138
142
  createVNode($setup["ElCheckbox"], {
139
- onChange: ($event) => $setup.selectedTarget(item.key, "basic"),
143
+ onChange: ($event) => $setup.selectedTarget(item.key, $setup.selectedHead, "basic"),
140
144
  disabled: $setup.checkList.includes(item.key),
141
145
  label: item.name,
142
146
  value: item.key
@@ -199,6 +203,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
199
203
  }, 8, ["modelValue"])
200
204
  ]);
201
205
  }
202
- var htTarget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/htTarget/src/htTarget.vue"]]);
206
+ var htTarget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/htTarget/src/htTarget.vue"]]);
203
207
 
204
208
  export { htTarget as default };
@@ -1,19 +1,24 @@
1
- import { defineComponent, ref, onMounted } from 'vue';
1
+ import { defineComponent, ref, onMounted, watch } from 'vue';
2
2
  import { ElDialog, ElButton, ElRow, ElCol, ElRadioGroup, ElRadio, ElCheckboxGroup, ElCheckbox, ElRadioButton } from 'element-plus';
3
+ import { targetProps } from './htTarget.mjs';
3
4
  import { TARGET_HEAD_KEY, TARGET_END_KEY, BASIC_KEY } from '../../../constants/target.mjs';
4
5
  import '../../../constants/chartConfig.mjs';
5
6
  import cloneDeep from 'lodash.clonedeep';
6
7
 
7
8
  var _sfc_main = /* @__PURE__ */ defineComponent({
8
9
  __name: "htTarget",
9
- setup(__props, { expose: __expose }) {
10
+ props: targetProps,
11
+ emits: ["choiceTarget", "choiceCancel"],
12
+ setup(__props, { expose: __expose, emit: __emit }) {
10
13
  __expose();
14
+ const props = __props;
15
+ const emit = __emit;
11
16
  const targetHead = ref(cloneDeep(TARGET_HEAD_KEY));
12
17
  const allfoot = ref(cloneDeep(TARGET_END_KEY));
13
18
  const selectedHead = ref("lastOneMonth");
14
19
  const checkList = ref([]);
20
+ const dialogShow = ref(false);
15
21
  const typeTag = ref("target");
16
- const aaa = ref(true);
17
22
  onMounted(() => {
18
23
  let startYear = 2018;
19
24
  const nowYear = (/* @__PURE__ */ new Date()).getFullYear();
@@ -25,7 +30,38 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
25
30
  startYear++;
26
31
  }
27
32
  });
33
+ watch(
34
+ () => props.dialogShow,
35
+ (val) => {
36
+ dialogShow.value = val;
37
+ }
38
+ );
39
+ watch(
40
+ () => props.targetData,
41
+ (val) => {
42
+ console.log("---", val);
43
+ val.forEach((item) => {
44
+ if (item.startsWith("basic_")) {
45
+ const strSplit = item.split("_");
46
+ selectedTarget(strSplit[1], "", "basic");
47
+ } else {
48
+ const strSplit = item.split("_");
49
+ console.log(strSplit);
50
+ selectedTarget(strSplit[1], strSplit[0], "target");
51
+ }
52
+ });
53
+ },
54
+ { deep: true }
55
+ );
28
56
  const headChange = () => {
57
+ if (selectedHead.value === "thisWeek" || selectedHead.value === "thisMonth") {
58
+ allfoot.value = [
59
+ { name: "\u6536\u76CA", key: "return", dealType: "color_text_precent" },
60
+ { name: "\u5E74\u5316\u6536\u76CA", key: "yearReturn", dealType: "color_text_precent" }
61
+ ];
62
+ } else {
63
+ allfoot.value = cloneDeep(TARGET_END_KEY);
64
+ }
29
65
  if (selectedTree.value[selectedHead.value]) {
30
66
  checkList.value = selectedTree.value[selectedHead.value];
31
67
  } else {
@@ -34,24 +70,26 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
34
70
  };
35
71
  const selectedTree = ref({});
36
72
  const selectedList = ref([]);
37
- const selectedTarget = (val, type) => {
73
+ const selectedTarget = (val, headKey, type) => {
38
74
  let itemObj = {
39
75
  name: "",
40
- key: ""
76
+ key: "",
77
+ dealType: ""
41
78
  };
42
79
  if (type === "target") {
43
- if (selectedTree.value[selectedHead.value]) {
44
- selectedTree.value[selectedHead.value].push(val);
80
+ if (selectedTree.value[headKey]) {
81
+ selectedTree.value[headKey].push(val);
45
82
  } else {
46
- selectedTree.value[selectedHead.value] = [val];
83
+ selectedTree.value[headKey] = [val];
47
84
  }
48
- const filterHead = TARGET_HEAD_KEY.filter((item) => item.key === selectedHead.value);
85
+ const filterHead = TARGET_HEAD_KEY.filter((item) => item.key === headKey);
49
86
  const filterFoot = TARGET_END_KEY.filter((item) => item.key === val);
50
87
  const headName = filterHead.length > 0 ? filterHead[0].name : "";
51
88
  const footName = filterFoot.length > 0 ? filterFoot[0].name : "";
52
89
  itemObj = {
53
90
  name: headName + footName,
54
- key: `${selectedHead.value}+${val}`
91
+ key: `${headKey}_${val}`,
92
+ dealType: footName ? filterFoot[0].dealType : ""
55
93
  };
56
94
  }
57
95
  if (type === "basic") {
@@ -64,22 +102,31 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
64
102
  const footName = filterFoot.length > 0 ? filterFoot[0].name : "";
65
103
  itemObj = {
66
104
  name: footName,
67
- key: `basic+${val}`
105
+ key: `basic_${val}`,
106
+ dealType: footName ? filterFoot[0].dealType : ""
68
107
  };
69
108
  }
70
109
  selectedList.value.push(itemObj);
71
110
  };
72
111
  const deleteItem = (key) => {
73
- console.log(key);
74
- const keyList = key.split("+");
75
- console.log(keyList);
112
+ const keyList = key.split("_");
76
113
  if (selectedHead.value === keyList[0]) {
77
114
  checkList.value = checkList.value.filter((item) => item !== keyList[1]);
78
115
  }
79
116
  selectedTree.value[keyList[0]] = selectedTree.value[keyList[0]].filter((item) => item !== keyList[1]);
80
117
  selectedList.value = selectedList.value.filter((item) => item.key !== key);
81
118
  };
82
- const __returned__ = { targetHead, allfoot, selectedHead, checkList, typeTag, aaa, headChange, selectedTree, selectedList, selectedTarget, deleteItem, get ElDialog() {
119
+ const confirmTarge = () => {
120
+ const selectedTable = selectedList.value.map((item) => {
121
+ return {
122
+ name: item.name,
123
+ key: `${item.key}`,
124
+ dealType: item.dealType
125
+ };
126
+ });
127
+ emit("choiceTarget", selectedTable);
128
+ };
129
+ const __returned__ = { props, emit, targetHead, allfoot, selectedHead, checkList, dialogShow, typeTag, headChange, selectedTree, selectedList, selectedTarget, deleteItem, confirmTarge, get ElDialog() {
83
130
  return ElDialog;
84
131
  }, get ElButton() {
85
132
  return ElButton;
@@ -0,0 +1 @@
1
+ import 'hfn-components/theme-chalk/src/target.scss';
@@ -0,0 +1 @@
1
+ import 'hfn-components/theme-chalk/src/target.scss';
@@ -18,6 +18,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18
18
  $setup.noData ? (openBlock(), createElementBlock("div", _hoisted_3, "\u6682\u65E0\u6570\u636E")) : createCommentVNode("v-if", true)
19
19
  ]);
20
20
  }
21
- var htPieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/pieChart/src/HtPieChart.vue"]]);
21
+ var htPieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/pieChart/src/HtPieChart.vue"]]);
22
22
 
23
23
  export { htPieChart as default };
@@ -444,6 +444,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
444
444
  /* STABLE_FRAGMENT */
445
445
  );
446
446
  }
447
- var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/zhanghang/Documents/project/component-library/packages/components/table/HtTable.vue"]]);
447
+ var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/libiluo/Desktop/company/component-library/packages/components/table/HtTable.vue"]]);
448
448
 
449
449
  export { Table as default };
@@ -2,19 +2,13 @@ export declare const TARGET_HEAD_KEY: {
2
2
  name: string;
3
3
  key: string;
4
4
  }[];
5
- export declare const TARGET_END_KEY: ({
5
+ export declare const TARGET_END_KEY: {
6
6
  name: string;
7
7
  key: string;
8
- slot: string;
9
- excludeKey?: undefined;
10
- } | {
11
- name: string;
12
- key: string;
13
- slot: string;
14
- excludeKey: string;
15
- })[];
8
+ dealType: string;
9
+ }[];
16
10
  export declare const BASIC_KEY: {
17
11
  name: string;
18
12
  key: string;
19
- title: string;
13
+ dealType: string;
20
14
  }[];
@@ -13,42 +13,42 @@ const TARGET_HEAD_KEY = [
13
13
  { name: "\u6210\u7ACB\u4EE5\u6765", key: "cucmulative" }
14
14
  ];
15
15
  const TARGET_END_KEY = [
16
- { name: "\u6536\u76CA", key: "Return", slot: "color_text_precent" },
17
- { name: "\u5E74\u5316\u6536\u76CA", key: "YearReturn", slot: "color_text_precent" },
18
- { name: "\u8D85\u989D\u6536\u76CA", key: "ExcessReturn", slot: "color_text_precent" },
19
- { name: "\u8D85\u989D\u5E74\u5316\u6536\u76CA", key: "ExcessYearReturn", slot: "color_text_precent" },
20
- { name: "\u5E74\u5316\u6CE2\u52A8\u7387", key: "Vol", slot: "color_text_nocolor_noprecent" },
21
- { name: "\u8D85\u989D\u5E74\u5316\u6CE2\u52A8\u7387", key: "ExcessVol", slot: "color_text_nocolor_noprecent" },
22
- { name: "\u590F\u666E\u6BD4\u7387", key: "SharpeRatio", slot: "color_text_no_thousandths" },
23
- { name: "\u8D85\u989D\u590F\u666E\u6BD4\u7387", key: "ExcessSharpeRatio", slot: "color_text_no_thousandths" },
24
- { name: "\u5361\u739B\u6BD4\u7387", key: "CalmarRatio", slot: "color_text_no_thousandths" },
25
- { name: "\u8D85\u989D\u5361\u739B\u6BD4\u7387", key: "ExcessCalmarRatio", slot: "color_text_no_thousandths" },
26
- { name: "\u7D22\u63D0\u8BFA\u6BD4\u7387", key: "SortinoRatio", slot: "color_text_no_thousandths" },
27
- { name: "\u4E0B\u884C\u6807\u51C6\u5DEE", key: "DownsideStd", slot: "color_text_nocolor_noprecent" },
28
- { name: "\u4E0B\u884C\u98CE\u9669", key: "DownsideDev", slot: "color_text_nocolor_noprecent" },
29
- { name: "\u6700\u5927\u56DE\u64A4", key: "MaxDrawdown", slot: "color_text_nocolor_noprecent" },
30
- { name: "\u8D85\u989D\u6700\u5927\u56DE\u64A4", key: "ExcessMaxDrawdown", slot: "color_text_nocolor_noprecent" },
31
- { name: "\u6700\u5927\u56DE\u64A4\u56DE\u8865\u671F\uFF08\u5929\uFF09", key: "MaxDrawdownDays", slot: "" },
32
- { name: "Alpha", key: "Alpha", slot: "color_text_precent" },
33
- { name: "Beta", key: "Beta", slot: "color_text_no_thousandths" },
34
- { name: "\u8DDF\u8E2A\u8BEF\u5DEE", key: "TrackingError", slot: "color_text_nocolor_noprecent" },
35
- { name: "\u4FE1\u606F\u6BD4\u7387", key: "InformationRatio", slot: "color_text_no_thousandths" },
36
- { name: "\u504F\u5EA6", key: "Skew", slot: "color_text_no_thousandths" },
37
- { name: "\u5CF0\u5EA6", key: "Kurt", slot: "color_text_no_thousandths" },
38
- { name: "VaR\uFF0895%\u7F6E\u4FE1\uFF09", key: "CVaR", slot: "color_text_no_thousandths" },
39
- { name: "\u5468\u80DC\u7387", key: "PositiveRatio", slot: "color_text_nocolor_noprecent" },
40
- { name: "\u6708\u80DC\u7387", key: "MonthlyPositiveRatio", slot: "color_text_nocolor_noprecent", excludeKey: "" }
16
+ { name: "\u6536\u76CA", key: "return", dealType: "color_text_precent" },
17
+ { name: "\u5E74\u5316\u6536\u76CA", key: "yearReturn", dealType: "color_text_precent" },
18
+ { name: "\u8D85\u989D\u6536\u76CA", key: "excessReturn", dealType: "color_text_precent" },
19
+ { name: "\u8D85\u989D\u5E74\u5316\u6536\u76CA", key: "excessYearReturn", dealType: "color_text_precent" },
20
+ { name: "\u5E74\u5316\u6CE2\u52A8\u7387", key: "vol", dealType: "color_text_nocolor_noprecent" },
21
+ { name: "\u8D85\u989D\u5E74\u5316\u6CE2\u52A8\u7387", key: "excessVol", dealType: "color_text_nocolor_noprecent" },
22
+ { name: "\u590F\u666E\u6BD4\u7387", key: "sharpeRatio", dealType: "color_text_no_thousandths" },
23
+ { name: "\u8D85\u989D\u590F\u666E\u6BD4\u7387", key: "excessSharpeRatio", dealType: "color_text_no_thousandths" },
24
+ { name: "\u5361\u739B\u6BD4\u7387", key: "calmarRatio", dealType: "color_text_no_thousandths" },
25
+ { name: "\u8D85\u989D\u5361\u739B\u6BD4\u7387", key: "excessCalmarRatio", dealType: "color_text_no_thousandths" },
26
+ { name: "\u7D22\u63D0\u8BFA\u6BD4\u7387", key: "sortinoRatio", dealType: "color_text_no_thousandths" },
27
+ { name: "\u4E0B\u884C\u6807\u51C6\u5DEE", key: "downsideStd", dealType: "color_text_nocolor_noprecent" },
28
+ { name: "\u4E0B\u884C\u98CE\u9669", key: "downsideDev", dealType: "color_text_nocolor_noprecent" },
29
+ { name: "\u6700\u5927\u56DE\u64A4", key: "maxDrawdown", dealType: "color_text_nocolor_noprecent" },
30
+ { name: "\u8D85\u989D\u6700\u5927\u56DE\u64A4", key: "excessMaxDrawdown", dealType: "color_text_nocolor_noprecent" },
31
+ { name: "\u6700\u5927\u56DE\u64A4\u56DE\u8865\u671F\uFF08\u5929\uFF09", key: "maxDrawdownDays", dealType: "" },
32
+ { name: "Alpha", key: "alpha", dealType: "color_text_precent" },
33
+ { name: "Beta", key: "beta", dealType: "color_text_no_thousandths" },
34
+ { name: "\u8DDF\u8E2A\u8BEF\u5DEE", key: "trackingError", dealType: "color_text_nocolor_noprecent" },
35
+ { name: "\u4FE1\u606F\u6BD4\u7387", key: "informationRatio", dealType: "color_text_no_thousandths" },
36
+ { name: "\u504F\u5EA6", key: "skew", dealType: "color_text_no_thousandths" },
37
+ { name: "\u5CF0\u5EA6", key: "kurt", dealType: "color_text_no_thousandths" },
38
+ { name: "VaR\uFF0895%\u7F6E\u4FE1\uFF09", key: "cVaR", dealType: "color_text_no_thousandths" },
39
+ { name: "\u5468\u80DC\u7387", key: "positiveRatio", dealType: "color_text_nocolor_noprecent" },
40
+ { name: "\u6708\u80DC\u7387", key: "monthlyPositiveRatio", dealType: "color_text_nocolor_noprecent" }
41
41
  ];
42
42
  const BASIC_KEY = [
43
- { name: "\u7BA1\u7406\u4EBA", key: "Advisor", title: "" },
44
- { name: "\u7B56\u7565", key: "strategyOne", title: "" },
45
- { name: "\u5355\u4F4D\u51C0\u503C", key: "Nav", title: "" },
46
- { name: "\u5355\u4F4D\u51C0\u503C\u6DA8\u8DCC\u5E45", key: "navPriceChange", title: "" },
47
- { name: "\u7D2F\u8BA1\u51C0\u503C", key: "cumulativeNavWithdrawal", title: "" },
48
- { name: "\u6210\u7ACB\u65E5\u671F", key: "inceptionDate", title: "" },
49
- { name: "\u5C01\u95ED\u671F", key: "closedPeriod", title: "" },
50
- { name: "\u5F00\u653E\u65E5", key: "openDay", title: "" },
51
- { name: "\u5907\u6848\u53F7/\u4EE3\u7801", key: "registerNumber", title: "" }
43
+ { name: "\u7BA1\u7406\u4EBA", key: "advisor", dealType: "" },
44
+ { name: "\u7B56\u7565", key: "strategyOne", dealType: "" },
45
+ { name: "\u5355\u4F4D\u51C0\u503C", key: "nav", dealType: "" },
46
+ { name: "\u5355\u4F4D\u51C0\u503C\u6DA8\u8DCC\u5E45", key: "navPriceChange", dealType: "" },
47
+ { name: "\u7D2F\u8BA1\u51C0\u503C", key: "cumulativeNavWithdrawal", dealType: "" },
48
+ { name: "\u6210\u7ACB\u65E5\u671F", key: "inceptionDate", dealType: "" },
49
+ { name: "\u5C01\u95ED\u671F", key: "closedPeriod", dealType: "" },
50
+ { name: "\u5F00\u653E\u65E5", key: "openDay", dealType: "" },
51
+ { name: "\u5907\u6848\u53F7/\u4EE3\u7801", key: "registerNumber", dealType: "" }
52
52
  ];
53
53
 
54
54
  export { BASIC_KEY, TARGET_END_KEY, TARGET_HEAD_KEY };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",
@@ -0,0 +1 @@
1
+ .dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{display:flex;margin-bottom:10px;width:33.33%}.check_item{display:flex;justify-content:space-between}
@@ -1 +1 @@
1
- .echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}
1
+ .echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;justify-content:center;position:absolute}._100,.noData{height:100%;width:100%}.dialog{padding:24px!important;width:860px!important}.factor-content{display:flex;flex-direction:column;flex-wrap:wrap;height:380px;width:100%}.factor_item{display:flex;margin-bottom:10px;width:33.33%}.check_item{display:flex;justify-content:space-between}
@@ -1 +1,2 @@
1
- @use './chart.scss';
1
+ @use './chart.scss';
2
+ @use './target.scss'
@@ -0,0 +1,20 @@
1
+ .dialog {
2
+ width: 860px !important;
3
+ padding: 24px !important;
4
+ }
5
+ .factor-content {
6
+ width: 100%;
7
+ height: 380px;
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ flex-direction: column;
11
+ }
12
+ .factor_item {
13
+ width: 33.33%;
14
+ margin-bottom: 10px;
15
+ display: flex;
16
+ }
17
+ .check_item {
18
+ display: flex;
19
+ justify-content: space-between;
20
+ }
package/es/css/index.css DELETED
@@ -1,59 +0,0 @@
1
- .echart-box {
2
- width: 100%;
3
- height: 100%;
4
- display: flex;
5
- flex-direction: column;
6
- position: relative;
7
- }
8
-
9
- .echart-content {
10
- flex: auto;
11
- }
12
-
13
- .echart-lenged {
14
- width: 100%;
15
- height: auto;
16
- margin-top: 6px;
17
- padding-right: 22px;
18
- box-sizing: border-box;
19
- display: flex;
20
- flex-wrap: wrap;
21
- font-size: 12px;
22
- position: relative;
23
- z-index: 999;
24
- }
25
-
26
- .bg-span {
27
- display: inline-block;
28
- width: 14px;
29
- height: 2px;
30
- margin-right: 6px;
31
- }
32
-
33
- .bg-span-bar {
34
- display: inline-block;
35
- width: 16px;
36
- height: 10px;
37
- border-radius: 2px;
38
- margin-right: 6px;
39
- }
40
-
41
- .span-box {
42
- margin-left: 5px;
43
- margin-right: 6px;
44
- cursor: pointer;
45
- display: flex;
46
- align-items: center;
47
- }
48
-
49
- .noData {
50
- width: 100%;
51
- height: 100%;
52
- font-size: 16px;
53
- display: flex;
54
- justify-content: center;
55
- align-items: center;
56
- position: absolute;
57
- bottom: 0px;
58
- color: #ccc;
59
- }