hfn-components 0.3.2 → 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 +1 -1
- package/es/component.mjs +3 -1
- package/es/components/chart/index.d.ts +30 -10
- package/es/components/chart/src/HtChart.d.ts +12 -4
- package/es/components/chart/src/HtChart.mjs +16 -5
- package/es/components/chart/src/HtChart.vue.d.ts +30 -10
- package/es/components/chart/src/HtChart.vue.mjs +1 -1
- package/es/components/chart/src/HtChart.vue2.mjs +2 -2
- package/es/components/elTable/index.d.ts +9 -0
- package/es/components/elTable/src/columnDeal.vue.mjs +1 -1
- package/es/components/elTable/src/elTable.vue.d.ts +9 -0
- package/es/components/elTable/src/elTable.vue.mjs +41 -4
- package/es/components/elTable/src/elTable.vue2.mjs +5 -0
- package/es/components/htTarget/index.d.ts +50 -23
- package/es/components/htTarget/src/htTarget.d.ts +12 -1
- package/es/components/htTarget/src/htTarget.mjs +11 -2
- package/es/components/htTarget/src/htTarget.vue.d.ts +50 -23
- package/es/components/htTarget/src/htTarget.vue.mjs +11 -7
- package/es/components/htTarget/src/htTarget.vue2.mjs +62 -15
- package/es/components/htTarget/style/index.d.ts +1 -0
- package/es/components/htTarget/style/index.mjs +1 -0
- package/es/components/pieChart/src/HtPieChart.vue.mjs +1 -1
- package/es/components/table/HtTable.vue.mjs +1 -1
- package/es/constants/table.mjs +4 -4
- package/es/constants/target.d.ts +4 -10
- package/es/constants/target.mjs +34 -34
- package/es/utils/chart.d.ts +1 -0
- package/es/utils/chart.mjs +21 -2
- package/es/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/ht-target.css +1 -0
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/index.scss +2 -1
- package/theme-chalk/src/target.scss +20 -0
- package/es/css/index.css +0 -59
|
@@ -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
|
-
|
|
15
|
-
|
|
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>;
|
|
@@ -511,7 +523,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
511
523
|
__epPropKey: true;
|
|
512
524
|
};
|
|
513
525
|
readonly disabled: BooleanConstructor;
|
|
514
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
526
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
515
527
|
readonly icon: {
|
|
516
528
|
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
|
|
517
529
|
readonly required: false;
|
|
@@ -541,7 +553,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
541
553
|
__epPropKey: true;
|
|
542
554
|
};
|
|
543
555
|
readonly disabled: BooleanConstructor;
|
|
544
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
556
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
545
557
|
readonly icon: {
|
|
546
558
|
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
|
|
547
559
|
readonly required: false;
|
|
@@ -587,7 +599,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
587
599
|
};
|
|
588
600
|
_ref: import("vue").Ref<HTMLButtonElement | undefined>;
|
|
589
601
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
590
|
-
_type: import("vue").ComputedRef<"" | "default" | "
|
|
602
|
+
_type: import("vue").ComputedRef<"" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger">;
|
|
591
603
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
592
604
|
_props: import("vue").ComputedRef<{
|
|
593
605
|
ariaDisabled: boolean;
|
|
@@ -676,7 +688,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
676
688
|
__epPropKey: true;
|
|
677
689
|
};
|
|
678
690
|
readonly disabled: BooleanConstructor;
|
|
679
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
691
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
680
692
|
readonly icon: {
|
|
681
693
|
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
|
|
682
694
|
readonly required: false;
|
|
@@ -700,7 +712,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
700
712
|
}>> & {
|
|
701
713
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
702
714
|
}, {
|
|
703
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
715
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
704
716
|
readonly link: boolean;
|
|
705
717
|
readonly dark: boolean;
|
|
706
718
|
readonly disabled: boolean;
|
|
@@ -723,7 +735,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
723
735
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
724
736
|
__epPropKey: true;
|
|
725
737
|
};
|
|
726
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
738
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
727
739
|
}, {
|
|
728
740
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
729
741
|
readonly size: {
|
|
@@ -732,7 +744,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
732
744
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
733
745
|
__epPropKey: true;
|
|
734
746
|
};
|
|
735
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
747
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
736
748
|
}>> & {
|
|
737
749
|
[x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
738
750
|
}>>;
|
|
@@ -761,9 +773,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
761
773
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
762
774
|
__epPropKey: true;
|
|
763
775
|
};
|
|
764
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
776
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
765
777
|
}>>, {
|
|
766
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
778
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
767
779
|
}, {}>;
|
|
768
780
|
};
|
|
769
781
|
readonly ElRow: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -1972,7 +1984,22 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1972
1984
|
readonly BASIC_KEY: {
|
|
1973
1985
|
name: string;
|
|
1974
1986
|
key: string;
|
|
1975
|
-
|
|
1987
|
+
dealType: string;
|
|
1976
1988
|
}[];
|
|
1977
|
-
},
|
|
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.
|
|
21
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.
|
|
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"], {
|
|
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/
|
|
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
|
-
|
|
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[
|
|
44
|
-
selectedTree.value[
|
|
80
|
+
if (selectedTree.value[headKey]) {
|
|
81
|
+
selectedTree.value[headKey].push(val);
|
|
45
82
|
} else {
|
|
46
|
-
selectedTree.value[
|
|
83
|
+
selectedTree.value[headKey] = [val];
|
|
47
84
|
}
|
|
48
|
-
const filterHead = TARGET_HEAD_KEY.filter((item) => item.key ===
|
|
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: `${
|
|
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: `
|
|
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
|
-
|
|
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
|
|
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/
|
|
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/
|
|
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 };
|
package/es/constants/table.mjs
CHANGED
|
@@ -111,16 +111,16 @@ const TABLE_KEY = {
|
|
|
111
111
|
money_name: "\u91D1\u989D\uFF08\u5143\uFF09"
|
|
112
112
|
};
|
|
113
113
|
const basicText4 = (val) => {
|
|
114
|
-
return val
|
|
114
|
+
return typeof val !== "number" ? "-" : val.toFixed(4);
|
|
115
115
|
};
|
|
116
116
|
const percentage = (val) => {
|
|
117
|
-
return val
|
|
117
|
+
return typeof val !== "number" ? "-" : (val * 100).toFixed(2) + "%";
|
|
118
118
|
};
|
|
119
119
|
const percentage4 = (val) => {
|
|
120
|
-
return val
|
|
120
|
+
return typeof val !== "number" ? "-" : (val * 100).toFixed(4) + "%";
|
|
121
121
|
};
|
|
122
122
|
const absPercentage = (val) => {
|
|
123
|
-
return val
|
|
123
|
+
return typeof val !== "number" ? "-" : Math.abs(val * 100).toFixed(2) + "%";
|
|
124
124
|
};
|
|
125
125
|
const thoundsandText2 = (val) => {
|
|
126
126
|
return typeof val === "number" ? splitK(dataHandle(val, false, 2)) : "-";
|
package/es/constants/target.d.ts
CHANGED
|
@@ -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
|
-
|
|
9
|
-
|
|
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
|
-
|
|
13
|
+
dealType: string;
|
|
20
14
|
}[];
|
package/es/constants/target.mjs
CHANGED
|
@@ -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: "
|
|
17
|
-
{ name: "\u5E74\u5316\u6536\u76CA", key: "
|
|
18
|
-
{ name: "\u8D85\u989D\u6536\u76CA", key: "
|
|
19
|
-
{ name: "\u8D85\u989D\u5E74\u5316\u6536\u76CA", key: "
|
|
20
|
-
{ name: "\u5E74\u5316\u6CE2\u52A8\u7387", key: "
|
|
21
|
-
{ name: "\u8D85\u989D\u5E74\u5316\u6CE2\u52A8\u7387", key: "
|
|
22
|
-
{ name: "\u590F\u666E\u6BD4\u7387", key: "
|
|
23
|
-
{ name: "\u8D85\u989D\u590F\u666E\u6BD4\u7387", key: "
|
|
24
|
-
{ name: "\u5361\u739B\u6BD4\u7387", key: "
|
|
25
|
-
{ name: "\u8D85\u989D\u5361\u739B\u6BD4\u7387", key: "
|
|
26
|
-
{ name: "\u7D22\u63D0\u8BFA\u6BD4\u7387", key: "
|
|
27
|
-
{ name: "\u4E0B\u884C\u6807\u51C6\u5DEE", key: "
|
|
28
|
-
{ name: "\u4E0B\u884C\u98CE\u9669", key: "
|
|
29
|
-
{ name: "\u6700\u5927\u56DE\u64A4", key: "
|
|
30
|
-
{ name: "\u8D85\u989D\u6700\u5927\u56DE\u64A4", key: "
|
|
31
|
-
{ name: "\u6700\u5927\u56DE\u64A4\u56DE\u8865\u671F\uFF08\u5929\uFF09", key: "
|
|
32
|
-
{ name: "Alpha", key: "
|
|
33
|
-
{ name: "Beta", key: "
|
|
34
|
-
{ name: "\u8DDF\u8E2A\u8BEF\u5DEE", key: "
|
|
35
|
-
{ name: "\u4FE1\u606F\u6BD4\u7387", key: "
|
|
36
|
-
{ name: "\u504F\u5EA6", key: "
|
|
37
|
-
{ name: "\u5CF0\u5EA6", key: "
|
|
38
|
-
{ name: "VaR\uFF0895%\u7F6E\u4FE1\uFF09", key: "
|
|
39
|
-
{ name: "\u5468\u80DC\u7387", key: "
|
|
40
|
-
{ name: "\u6708\u80DC\u7387", key: "
|
|
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: "
|
|
44
|
-
{ name: "\u7B56\u7565", key: "strategyOne",
|
|
45
|
-
{ name: "\u5355\u4F4D\u51C0\u503C", key: "
|
|
46
|
-
{ name: "\u5355\u4F4D\u51C0\u503C\u6DA8\u8DCC\u5E45", key: "navPriceChange",
|
|
47
|
-
{ name: "\u7D2F\u8BA1\u51C0\u503C", key: "cumulativeNavWithdrawal",
|
|
48
|
-
{ name: "\u6210\u7ACB\u65E5\u671F", key: "inceptionDate",
|
|
49
|
-
{ name: "\u5C01\u95ED\u671F", key: "closedPeriod",
|
|
50
|
-
{ name: "\u5F00\u653E\u65E5", key: "openDay",
|
|
51
|
-
{ name: "\u5907\u6848\u53F7/\u4EE3\u7801", key: "registerNumber",
|
|
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/es/utils/chart.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export declare const legendEnterOperate: (options: any, name: string) => void;
|
|
|
4
4
|
export declare const legendLeaveOperate: (options: any) => void;
|
|
5
5
|
export declare const setEchartXAxis: (options: any, type: chartType, xAxisData: string[]) => void;
|
|
6
6
|
export declare const setEchartYAxis: (options: any, props: chartProp) => void;
|
|
7
|
+
export declare const setEchartTitle: (options: any, props: chartProp) => void;
|
|
7
8
|
export declare const setEchartTooltip: (options: any, props: chartProp) => void;
|
package/es/utils/chart.mjs
CHANGED
|
@@ -90,9 +90,28 @@ const setEchartYAxis = (options, props) => {
|
|
|
90
90
|
formatter: function(val) {
|
|
91
91
|
return (props.yAxisUnit === "%" ? val > 0 ? "+" : "" : "") + parseFloat(val.toFixed(props.floatNumber)) + props.yAxisUnit;
|
|
92
92
|
}
|
|
93
|
-
}
|
|
93
|
+
},
|
|
94
|
+
...props.yAxisObj
|
|
94
95
|
};
|
|
95
96
|
};
|
|
97
|
+
const setEchartTitle = (options, props) => {
|
|
98
|
+
options.title = [
|
|
99
|
+
{
|
|
100
|
+
left: "left",
|
|
101
|
+
text: props.titleText,
|
|
102
|
+
itemGap: 0,
|
|
103
|
+
textStyle: {
|
|
104
|
+
fontSize: 12,
|
|
105
|
+
fontWeight: "normal"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
left: "right",
|
|
110
|
+
subtext: props.titleText2,
|
|
111
|
+
itemGap: 0
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
};
|
|
96
115
|
const setEchartTooltip = (options, props) => {
|
|
97
116
|
options.tooltip = {
|
|
98
117
|
trigger: "axis",
|
|
@@ -175,4 +194,4 @@ const setEchartTooltip = (options, props) => {
|
|
|
175
194
|
};
|
|
176
195
|
};
|
|
177
196
|
|
|
178
|
-
export { legendEnterOperate, legendLeaveOperate, setEchartTooltip, setEchartXAxis, setEchartYAxis };
|
|
197
|
+
export { legendEnterOperate, legendLeaveOperate, setEchartTitle, setEchartTooltip, setEchartXAxis, setEchartYAxis };
|
package/es/utils/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { withInstall } from './common.mjs';
|
|
2
2
|
export { handleData, handleText } from './table.mjs';
|
|
3
3
|
export { dataHandle, splitK } from './tool.mjs';
|
|
4
|
-
export { legendEnterOperate, legendLeaveOperate, setEchartTooltip, setEchartXAxis, setEchartYAxis } from './chart.mjs';
|
|
4
|
+
export { legendEnterOperate, legendLeaveOperate, setEchartTitle, setEchartTooltip, setEchartXAxis, setEchartYAxis } from './chart.mjs';
|
package/package.json
CHANGED
|
@@ -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}
|
package/theme-chalk/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}
|
|
@@ -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
|
+
}
|