Compare commits
728 Commits
feat-unify
...
v2.0.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a00993ee8 | ||
|
|
177fa6bfbe | ||
|
|
cb7e887c36 | ||
|
|
255b14a597 | ||
|
|
3f462c1bee | ||
|
|
a6d1baec3e | ||
|
|
8ddc85738a | ||
|
|
52c1eabf1e | ||
|
|
6cd30283e7 | ||
|
|
2380c6ec60 | ||
|
|
f02e92a58e | ||
|
|
a54a007c5a | ||
|
|
2ad3677fdc | ||
|
|
d09d1b96be | ||
|
|
e4e1fee8b4 | ||
|
|
e348caaa0c | ||
|
|
1ee76efeb8 | ||
|
|
716379fc9f | ||
|
|
01c2a20a0f | ||
|
|
4c353136d5 | ||
|
|
c293c43862 | ||
|
|
45dcd1885d | ||
|
|
a4690c21cf | ||
|
|
0ca908c8d5 | ||
|
|
e40a1f87f9 | ||
|
|
09ebd67c37 | ||
|
|
bad7e37f5a | ||
|
|
99b344bdef | ||
|
|
3b7f9e5dec | ||
|
|
2928eaa4ae | ||
|
|
77ef4c05b9 | ||
|
|
f55a2b94e7 | ||
|
|
5fba293245 | ||
|
|
e380ead651 | ||
|
|
57798b9000 | ||
|
|
eb774f9d41 | ||
|
|
e2a0478357 | ||
|
|
0bd5587e65 | ||
|
|
96d8cb0006 | ||
|
|
b0e4383a43 | ||
|
|
5cadcc8259 | ||
|
|
fbc689b235 | ||
|
|
0779aeca6a | ||
|
|
9aca371e9c | ||
|
|
9ea4858770 | ||
|
|
d7b74ed90d | ||
|
|
ffb6b2f68c | ||
|
|
4d560ab937 | ||
|
|
857f811685 | ||
|
|
0bce64c867 | ||
|
|
cacc99683d | ||
|
|
0998fc5376 | ||
|
|
d3a9f7d60f | ||
|
|
ba52c55158 | ||
|
|
27d78c6b4d | ||
|
|
8d4dd3160d | ||
|
|
1b68c39d5d | ||
|
|
6847f7d966 | ||
|
|
8c01974494 | ||
|
|
c74322e783 | ||
|
|
b7d8225dbd | ||
|
|
48e9165483 | ||
|
|
b37c8114d8 | ||
|
|
997790e653 | ||
|
|
3b12503e77 | ||
|
|
f6d605da62 | ||
|
|
35fda2b9a9 | ||
|
|
2d76991d27 | ||
|
|
c9b2fc2674 | ||
|
|
6c65e419e2 | ||
|
|
288bb264e0 | ||
|
|
33a741ca0e | ||
|
|
5f80fa8aa4 | ||
|
|
506412175e | ||
|
|
06c3765d9d | ||
|
|
66f22551c4 | ||
|
|
d30f60a972 | ||
|
|
bf69ba91d5 | ||
|
|
15ff1d2912 | ||
|
|
740f471ff4 | ||
|
|
d1de5f0c4c | ||
|
|
f178b0e0ca | ||
|
|
d4bfdd1e91 | ||
|
|
539db3c56b | ||
|
|
2ac2d79966 | ||
|
|
4db0ba4714 | ||
|
|
6b0df75357 | ||
|
|
e9c2ca0989 | ||
|
|
35204898fc | ||
|
|
bb32edf264 | ||
|
|
db00fcf372 | ||
|
|
801f6e8d18 | ||
|
|
88abcf8a4a | ||
|
|
410dc4fc58 | ||
|
|
ddee396cea | ||
|
|
7fe743d624 | ||
|
|
2cb65c623e | ||
|
|
f612b62b0a | ||
|
|
84fd1b2181 | ||
|
|
6a285f610c | ||
|
|
ce925e0f45 | ||
|
|
67da33931a | ||
|
|
a4c0450f7a | ||
|
|
a81f016e3f | ||
|
|
a58eb4a53c | ||
|
|
3f3caae4fc | ||
|
|
417821b72d | ||
|
|
b1ae4c3712 | ||
|
|
0705fb8b0f | ||
|
|
6a90d1a043 | ||
|
|
74e30390cf | ||
|
|
4ba3d8803a | ||
|
|
f53f4d57f2 | ||
|
|
33d78ffcda | ||
|
|
9e6873e1da | ||
|
|
47f6fc87c7 | ||
|
|
2ee2783a9c | ||
|
|
3a066fc9bb | ||
|
|
ee5fed4cd0 | ||
|
|
16b703f317 | ||
|
|
3537427846 | ||
|
|
3fb0fe43bb | ||
|
|
8693a11a32 | ||
|
|
2259545094 | ||
|
|
f1f5f9cca9 | ||
|
|
2ce17c3974 | ||
|
|
e09d014fa6 | ||
|
|
8c74b8e8df | ||
|
|
c3b6bcec65 | ||
|
|
633bf987ab | ||
|
|
bf1b81e554 | ||
|
|
729021f37c | ||
|
|
bde2634ef3 | ||
|
|
d6da6f759d | ||
|
|
32f851e57b | ||
|
|
30e7e7ab7c | ||
|
|
cfa69baaa3 | ||
|
|
78626b3c04 | ||
|
|
340492f784 | ||
|
|
6cecbb6ec2 | ||
|
|
665ebd7b17 | ||
|
|
c07d7c7c28 | ||
|
|
1d7e40950f | ||
|
|
91bda457e7 | ||
|
|
68aeea70cf | ||
|
|
a0c8bc7fe5 | ||
|
|
0f73536ce0 | ||
|
|
455e387a62 | ||
|
|
99467f87ff | ||
|
|
f7d3a0b499 | ||
|
|
7a19346700 | ||
|
|
8d2269df78 | ||
|
|
1c54b81212 | ||
|
|
b133cbdfea | ||
|
|
6d6fa04a4b | ||
|
|
954de6d58b | ||
|
|
a0ecfa7264 | ||
|
|
54f9c065c8 | ||
|
|
f45d4ca5af | ||
|
|
b8705c4f31 | ||
|
|
d96e7f71d7 | ||
|
|
24fee76237 | ||
|
|
588cc380cd | ||
|
|
5eca551271 | ||
|
|
d59193bc33 | ||
|
|
6928a70d9f | ||
|
|
e0796280f5 | ||
|
|
5522837b00 | ||
|
|
5d803e3fa6 | ||
|
|
29fd85254b | ||
|
|
749c0a2f39 | ||
|
|
737504cef5 | ||
|
|
61af1674b9 | ||
|
|
d8ccff8de5 | ||
|
|
e29c427f8d | ||
|
|
b8d0d1a2ff | ||
|
|
8115950893 | ||
|
|
f458a21a2f | ||
|
|
13a9675894 | ||
|
|
77b5a41af9 | ||
|
|
ffa127593a | ||
|
|
f9c17c732a | ||
|
|
427c5589b2 | ||
|
|
b618f9e865 | ||
|
|
2182c7d34a | ||
|
|
9482e9aba3 | ||
|
|
6d5651fd1d | ||
|
|
c195b69003 | ||
|
|
8216cd7604 | ||
|
|
8d691f2d69 | ||
|
|
09d8c58e73 | ||
|
|
2bf895ad3d | ||
|
|
0823bf1d9c | ||
|
|
6a5abd6762 | ||
|
|
5cb458c45b | ||
|
|
43e8b9939b | ||
|
|
c792482c60 | ||
|
|
e48ca421d8 | ||
|
|
ac23d4c8dc | ||
|
|
68b49ea710 | ||
|
|
99287497cc | ||
|
|
f828c48ab6 | ||
|
|
2626bc794f | ||
|
|
70f9df7650 | ||
|
|
8b39ec2773 | ||
|
|
eafbcb2cde | ||
|
|
f8f5bc7688 | ||
|
|
0335b379ea | ||
|
|
734dd68607 | ||
|
|
3c221345dd | ||
|
|
13bcf3c649 | ||
|
|
19f53f705c | ||
|
|
58fee4a86f | ||
|
|
b93caf1386 | ||
|
|
aa613e2805 | ||
|
|
616584fc19 | ||
|
|
a22e4b814b | ||
|
|
c249c120c1 | ||
|
|
c8d016e1b4 | ||
|
|
2e6d87ab80 | ||
|
|
5c07885a4e | ||
|
|
5f8db36888 | ||
|
|
ce34a7ed2a | ||
|
|
a5e83bfe9f | ||
|
|
1252d266dd | ||
|
|
3c820d53a6 | ||
|
|
f0525c7522 | ||
|
|
600f1b2dd2 | ||
|
|
b3422eaede | ||
|
|
757b79514a | ||
|
|
8b57ffa124 | ||
|
|
cf8121eb00 | ||
|
|
faf2d44fbb | ||
|
|
dcbaf37a69 | ||
|
|
741ba1a039 | ||
|
|
80176e5737 | ||
|
|
88516d9491 | ||
|
|
88dbbe03ea | ||
|
|
ae1fd2e7cf | ||
|
|
04ed5d354d | ||
|
|
fa678e1089 | ||
|
|
d3931f47bc | ||
|
|
bf9bd59b63 | ||
|
|
fb0ff50837 | ||
|
|
93727a0ac7 | ||
|
|
8575d27504 | ||
|
|
fa6ef30cd8 | ||
|
|
14402e6674 | ||
|
|
0915e162fd | ||
|
|
2641e70c78 | ||
|
|
bc44584698 | ||
|
|
82394dd7a3 | ||
|
|
2e688ad686 | ||
|
|
9b998e0c6d | ||
|
|
1045588301 | ||
|
|
fffe49cd0f | ||
|
|
94fc6138a0 | ||
|
|
4f248e57c8 | ||
|
|
ba86399fd3 | ||
|
|
a89164f885 | ||
|
|
7f2344c82c | ||
|
|
e5bf08f709 | ||
|
|
3c8e430533 | ||
|
|
f7209fba53 | ||
|
|
9fae683d8b | ||
|
|
79a2b98a1a | ||
|
|
98b28a631a | ||
|
|
d61769f9b8 | ||
|
|
6fec64f515 | ||
|
|
01d5890b35 | ||
|
|
0ec9fd8534 | ||
|
|
fea583eb5b | ||
|
|
fcf8d9d99d | ||
|
|
bfe5039a1c | ||
|
|
7a57d944c8 | ||
|
|
ca27e87241 | ||
|
|
e674a1ece4 | ||
|
|
6c91fca4e7 | ||
|
|
dfb63346d3 | ||
|
|
4d899d48dc | ||
|
|
fa3a3dfcb0 | ||
|
|
e36210aa27 | ||
|
|
20a599594c | ||
|
|
70f8dbae53 | ||
|
|
e01292376f | ||
|
|
d8022b2682 | ||
|
|
0d7c5b8ace | ||
|
|
1c5c867a19 | ||
|
|
88c9850c44 | ||
|
|
dde5ae796e | ||
|
|
f1ed62cdca | ||
|
|
bfac86d5dd | ||
|
|
341015c584 | ||
|
|
7c5a66978e | ||
|
|
b21fc3f5e7 | ||
|
|
0e52628842 | ||
|
|
64992c59b7 | ||
|
|
c3aae6e5fa | ||
|
|
f7922cafa5 | ||
|
|
8c5496829e | ||
|
|
2a44fd3ca4 | ||
|
|
8514f051a7 | ||
|
|
61feb29fe2 | ||
|
|
fa29881f04 | ||
|
|
46cb8e7d0b | ||
|
|
b6143bc75e | ||
|
|
92e1ec05d2 | ||
|
|
68512206f7 | ||
|
|
88073e97af | ||
|
|
75f23bb1bf | ||
|
|
e8642d0301 | ||
|
|
5f5731f813 | ||
|
|
55159be0dc | ||
|
|
0c4e1dc7ae | ||
|
|
b4abdeb246 | ||
|
|
7e61dda4aa | ||
|
|
283aafb27d | ||
|
|
aafafdd0aa | ||
|
|
198b839dab | ||
|
|
597b8fb5af | ||
|
|
a4cb4cb0ad | ||
|
|
1bc51a51c2 | ||
|
|
8857059da8 | ||
|
|
7939d37fa3 | ||
|
|
df83385cb0 | ||
|
|
5d69fc4b24 | ||
|
|
4f1b550fa9 | ||
|
|
782c12d91d | ||
|
|
4b97d98b3a | ||
|
|
8e3e9b5f50 | ||
|
|
ceed66b7ea | ||
|
|
a8399be4a3 | ||
|
|
19f73d7066 | ||
|
|
36d46d0a45 | ||
|
|
323e5505f5 | ||
|
|
12a2ace498 | ||
|
|
c5eefec24d | ||
|
|
c4c4572885 | ||
|
|
8fcd2a9141 | ||
|
|
f0fad0dba7 | ||
|
|
71c7116493 | ||
|
|
e797879e0d | ||
|
|
2e460ea32a | ||
|
|
ef3b1dce7c | ||
|
|
22e01a80c1 | ||
|
|
770373c48c | ||
|
|
77ff376e75 | ||
|
|
d5fb56f571 | ||
|
|
b37ba41694 | ||
|
|
f7084ba3a3 | ||
|
|
f89a64f10e | ||
|
|
f6fe7816c9 | ||
|
|
ca8e08f3db | ||
|
|
1e188dd26b | ||
|
|
59fb22cd0c | ||
|
|
ede7bcce80 | ||
|
|
07e3f227be | ||
|
|
d0070319a9 | ||
|
|
60ec01eb32 | ||
|
|
47e04ba6e3 | ||
|
|
c7a2a01f12 | ||
|
|
45e5ca0722 | ||
|
|
8ca9a3be05 | ||
|
|
c89b92c2d3 | ||
|
|
38685e9b49 | ||
|
|
65f0c87149 | ||
|
|
71a7247f71 | ||
|
|
27dac34c2b | ||
|
|
99fec48458 | ||
|
|
1c093e5243 | ||
|
|
96d1b79cf5 | ||
|
|
bd4879e88a | ||
|
|
6a5d746703 | ||
|
|
b5271b07fa | ||
|
|
e3fa62a3f8 | ||
|
|
b129123fa0 | ||
|
|
e9a1606f00 | ||
|
|
6cc321b997 | ||
|
|
f668a2b892 | ||
|
|
cf50e77daf | ||
|
|
ef9e4c8ea4 | ||
|
|
ab96d0919f | ||
|
|
dee6aa6754 | ||
|
|
55f59f9f2d | ||
|
|
8f5bc134f2 | ||
|
|
8ca08a5600 | ||
|
|
621a302451 | ||
|
|
bf4254719d | ||
|
|
3bcef87d6c | ||
|
|
bacdcd1760 | ||
|
|
871b61acf5 | ||
|
|
e0b0d5747b | ||
|
|
b61215d540 | ||
|
|
43cc7d8a95 | ||
|
|
d5656ea07c | ||
|
|
880f9d535c | ||
|
|
30bd83b032 | ||
|
|
5d73a5fdd3 | ||
|
|
9f95a4c83e | ||
|
|
8c3c483894 | ||
|
|
8486e08615 | ||
|
|
798a7eb49a | ||
|
|
17f29d3773 | ||
|
|
43c46c873c | ||
|
|
96581511f8 | ||
|
|
be81a8c731 | ||
|
|
74338c06f0 | ||
|
|
9fbe2500e0 | ||
|
|
4f16531016 | ||
|
|
98bebbc796 | ||
|
|
3c85322450 | ||
|
|
9e9410533c | ||
|
|
b5d420c9bf | ||
|
|
9c8fab832e | ||
|
|
f304a4f27a | ||
|
|
0b674fb0ae | ||
|
|
9cd18c9086 | ||
|
|
98d3962f87 | ||
|
|
b4ebf8cde3 | ||
|
|
828497bd08 | ||
|
|
3d0611cfdf | ||
|
|
33b7d990e3 | ||
|
|
24dbc21cfc | ||
|
|
ee9a93b353 | ||
|
|
991b134e23 | ||
|
|
553d9d7519 | ||
|
|
1bcace8d5e | ||
|
|
8d9f503867 | ||
|
|
d1f84cded9 | ||
|
|
533af6b2f9 | ||
|
|
10a21c9f6b | ||
|
|
16bf72ac24 | ||
|
|
aef57f13f0 | ||
|
|
4b3acfca74 | ||
|
|
33b2f67df8 | ||
|
|
4c28df1602 | ||
|
|
9c04f51548 | ||
|
|
d0752b0b26 | ||
|
|
77137990a6 | ||
|
|
7bb0b1a463 | ||
|
|
c8d8698b19 | ||
|
|
97da2a6ec1 | ||
|
|
ce42f5c294 | ||
|
|
80f81c1870 | ||
|
|
4aff485816 | ||
|
|
bb9ea4ca32 | ||
|
|
64cad02b62 | ||
|
|
be0c0566df | ||
|
|
b5ea97e239 | ||
|
|
9c2f70b68c | ||
|
|
8b7606f893 | ||
|
|
c0a654fa63 | ||
|
|
e8ce806082 | ||
|
|
cc0ecedd4e | ||
|
|
4aa303b51f | ||
|
|
496c097e5f | ||
|
|
f95d940ff0 | ||
|
|
78879c56cc | ||
|
|
7d2c4e6431 | ||
|
|
f12d3148aa | ||
|
|
6ae0cd55e6 | ||
|
|
2c2aaaac67 | ||
|
|
97df02c07e | ||
|
|
2b0f8a817c | ||
|
|
089bb8945a | ||
|
|
819ad34481 | ||
|
|
aca79071b9 | ||
|
|
a573cd2391 | ||
|
|
0d54716e59 | ||
|
|
d1ea05c2c0 | ||
|
|
bb78d89037 | ||
|
|
e6ff73c252 | ||
|
|
f00bd16aaf | ||
|
|
7002e64b8f | ||
|
|
ab05a6f384 | ||
|
|
d60e6effa1 | ||
|
|
bd430aab32 | ||
|
|
214995fb23 | ||
|
|
0b71c43e89 | ||
|
|
f29299fde5 | ||
|
|
ecaf8e8970 | ||
|
|
cb5f558c62 | ||
|
|
7db9bc85f8 | ||
|
|
91220d31a7 | ||
|
|
e146018f7d | ||
|
|
09e402357a | ||
|
|
2b2b46a990 | ||
|
|
7a8a57a078 | ||
|
|
f3ef1a4022 | ||
|
|
a6c750f877 | ||
|
|
cf92ed55a4 | ||
|
|
caa403a8dc | ||
|
|
822fbbcd24 | ||
|
|
71972f0d8c | ||
|
|
9326c9a59c | ||
|
|
c46c6d30e7 | ||
|
|
a43f0791ea | ||
|
|
19ed2fec19 | ||
|
|
66373a427b | ||
|
|
0d1c24c536 | ||
|
|
a7b2d5a24b | ||
|
|
4d55e5a57b | ||
|
|
890dd88b5f | ||
|
|
2d36600e3b | ||
|
|
2e038ad7db | ||
|
|
27fcec9846 | ||
|
|
62ed00e31c | ||
|
|
c937555020 | ||
|
|
593a48eea4 | ||
|
|
7ea078dbf3 | ||
|
|
6d4be943d7 | ||
|
|
8ee18819c5 | ||
|
|
e672b75453 | ||
|
|
c4e3c34842 | ||
|
|
c4ff0d24b7 | ||
|
|
501dfdc223 | ||
|
|
c399277350 | ||
|
|
b101b2b857 | ||
|
|
7e8d30382f | ||
|
|
0fdbeb1e7a | ||
|
|
9aec36b201 | ||
|
|
0933486e6f | ||
|
|
33b0c94159 | ||
|
|
6c402b3a17 | ||
|
|
3a9f68384f | ||
|
|
3747771078 | ||
|
|
67dc58e08e | ||
|
|
987f4f73a2 | ||
|
|
dd0bf5611d | ||
|
|
58d20b7c8d | ||
|
|
a4c14c39b3 | ||
|
|
ddc005ec10 | ||
|
|
4d54a3029b | ||
|
|
07cb0a7d3a | ||
|
|
0ee76c1579 | ||
|
|
3560effe2c | ||
|
|
0abcbbae53 | ||
|
|
43844c834e | ||
|
|
d15e551743 | ||
|
|
d1c0cae68e | ||
|
|
a1a2e260f6 | ||
|
|
aebed94140 | ||
|
|
96740a6841 | ||
|
|
c29ecc8b0b | ||
|
|
790cc7b878 | ||
|
|
b71b7bfd0e | ||
|
|
06b1e40930 | ||
|
|
159ffb4af2 | ||
|
|
e69fd0cdc4 | ||
|
|
a467283618 | ||
|
|
a6e5dec2c0 | ||
|
|
b96c2f0d3e | ||
|
|
f8785a4505 | ||
|
|
5b14e3a70f | ||
|
|
e6a99302d6 | ||
|
|
8aa4490ea9 | ||
|
|
a451faad77 | ||
|
|
e3816524da | ||
|
|
75232ee902 | ||
|
|
4405ebd30d | ||
|
|
0946d170d7 | ||
|
|
30361aa7ca | ||
|
|
76b22ce05c | ||
|
|
00f2359b9d | ||
|
|
40b8dbc4d5 | ||
|
|
1c67e06138 | ||
|
|
a2e91bac1e | ||
|
|
19b7429215 | ||
|
|
7412c777ee | ||
|
|
499f36bc62 | ||
|
|
862753d35e | ||
|
|
b691003187 | ||
|
|
a63efa5d26 | ||
|
|
013edc4f11 | ||
|
|
504b3a762f | ||
|
|
f26d7e394d | ||
|
|
56bf44e4b0 | ||
|
|
1d6ab1ae5b | ||
|
|
4e1069ec1d | ||
|
|
63ed00bd28 | ||
|
|
5675ea0720 | ||
|
|
c29a70f90b | ||
|
|
3fe2fbfc08 | ||
|
|
8d97bdc976 | ||
|
|
0bf38c032c | ||
|
|
4a76e419be | ||
|
|
0c2da460a3 | ||
|
|
d9a3b358e7 | ||
|
|
632c09bf01 | ||
|
|
2b0008ffc7 | ||
|
|
c6beee08df | ||
|
|
6c2692bb96 | ||
|
|
d690f4277f | ||
|
|
e874ca1e8c | ||
|
|
7918918a69 | ||
|
|
a4198bf75a | ||
|
|
89ac30438a | ||
|
|
d7ebf0e173 | ||
|
|
d1d27a740f | ||
|
|
148297766c | ||
|
|
144980e45d | ||
|
|
116de1a70a | ||
|
|
bc8b0a5226 | ||
|
|
3f828d4208 | ||
|
|
a3b26ff247 | ||
|
|
f06aafd14e | ||
|
|
8f9e45e660 | ||
|
|
8b890fb5e3 | ||
|
|
133c6bea6b | ||
|
|
c107c8c440 | ||
|
|
825d21a3a9 | ||
|
|
383d419f84 | ||
|
|
b20e842af9 | ||
|
|
d13ba5ff78 | ||
|
|
29ce548662 | ||
|
|
a3ec971be2 | ||
|
|
7747ac07ed | ||
|
|
902145df71 | ||
|
|
31194bd4d6 | ||
|
|
9e1a9bf6c3 | ||
|
|
fb136b0918 | ||
|
|
0cf898bd57 | ||
|
|
60b18a20fa | ||
|
|
62f8e389a8 | ||
|
|
b258b0f651 | ||
|
|
1b7bcd3e32 | ||
|
|
88b03a416c | ||
|
|
8fb8b9328d | ||
|
|
688ce50c58 | ||
|
|
314daede24 | ||
|
|
7b24b90fbc | ||
|
|
7d5985f743 | ||
|
|
5590a3024f | ||
|
|
71e13c83e6 | ||
|
|
ad8cc8a003 | ||
|
|
0cda041315 | ||
|
|
8ef13b6325 | ||
|
|
ccf78c6dd2 | ||
|
|
ded1f8ae4b | ||
|
|
917772cce0 | ||
|
|
6f93de7ad4 | ||
|
|
25368419a3 | ||
|
|
c0392e7370 | ||
|
|
31d1983958 | ||
|
|
50e62dbed7 | ||
|
|
25f5d91e87 | ||
|
|
c8d7cca4ed | ||
|
|
727a0c8e8e | ||
|
|
ef40a6347a | ||
|
|
825731edcc | ||
|
|
d820cce6d4 | ||
|
|
3acf2fe732 | ||
|
|
a2a3a31df5 | ||
|
|
929bc4da9f | ||
|
|
56a36cf306 | ||
|
|
dc7db58a8e | ||
|
|
e8999a7fdf | ||
|
|
b93509a6bb | ||
|
|
a606039976 | ||
|
|
37ee9de02b | ||
|
|
2f2a395406 | ||
|
|
01e2ba6db9 | ||
|
|
62f012f2e9 | ||
|
|
49fb0e1113 | ||
|
|
663ef6f2a6 | ||
|
|
bb7aa78738 | ||
|
|
08a24b9e3c | ||
|
|
151ec13904 | ||
|
|
d7965c5857 | ||
|
|
0033b42008 | ||
|
|
f9d533972f | ||
|
|
c57a4850b6 | ||
|
|
ceb8cd5158 | ||
|
|
825b3bf2ea | ||
|
|
a7905b6a60 | ||
|
|
95f5d725ac | ||
|
|
c1bbc83acd | ||
|
|
e1bb655bf1 | ||
|
|
c63637360f | ||
|
|
f626d8a157 | ||
|
|
26b698097d | ||
|
|
9f2ebba293 | ||
|
|
cb7a8298ec | ||
|
|
551a1f2d01 | ||
|
|
3758db4cb6 | ||
|
|
f6860c3fa6 | ||
|
|
ae71e13c6d | ||
|
|
2b83ea6452 | ||
|
|
3e511069b5 | ||
|
|
02c3f7478d | ||
|
|
0a75035339 | ||
|
|
75fb327d7e | ||
|
|
f243dbdd55 | ||
|
|
24c649d19f | ||
|
|
c2369dd733 | ||
|
|
9577bd9de7 | ||
|
|
6a23fd2d72 | ||
|
|
2e1c143d9b | ||
|
|
caadad501f | ||
|
|
39ab04e051 | ||
|
|
7332dd1e98 | ||
|
|
3d8519519b | ||
|
|
58261fd3a3 | ||
|
|
1298abd9e6 | ||
|
|
5b7da15bdd | ||
|
|
1b878b0016 | ||
|
|
05ed82b091 | ||
|
|
34722916b0 | ||
|
|
4333b58938 | ||
|
|
97a0a60754 | ||
|
|
df1fccffa7 | ||
|
|
1afc06b079 | ||
|
|
ef008adf51 | ||
|
|
f00935d795 | ||
|
|
1031d3e248 | ||
|
|
cc5d6ae5d7 | ||
|
|
60183b6a60 | ||
|
|
a02877e38f | ||
|
|
5b98d5703f | ||
|
|
4303e79e6f | ||
|
|
c606102a29 | ||
|
|
3440da72d6 | ||
|
|
f9d0547fc3 | ||
|
|
35a05c046b | ||
|
|
72c7bb3ecc | ||
|
|
8a57a7f3b9 | ||
|
|
54dd1a0dbe | ||
|
|
0f71961d0c |
22
.eslintrc.js
@@ -9,22 +9,16 @@ module.exports = {
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
tsx: true
|
||||
}
|
||||
tsx: true,
|
||||
},
|
||||
},
|
||||
env: {
|
||||
node: true,
|
||||
// The Follow config only works with eslint-plugin-vue v8.0.0+
|
||||
'vue/setup-compiler-macros': true
|
||||
},
|
||||
extends: ['plugin:vue/vue3-essential', 'eslint:recommended'],
|
||||
extends: ["plugin:vue/vue3-essential", "eslint:recommended"],
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-unused-vars': 'off',
|
||||
'vue/no-unused-vars': 'off',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/valid-template-root': 'off',
|
||||
'vue/no-mutating-props': 'off'
|
||||
}
|
||||
}
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-present GoView
|
||||
Copyright (c) 2021-present Naive Ui Admin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
175
README.md
@@ -4,71 +4,124 @@
|
||||
|
||||
**`master-fetch` 分支是带有后端接口请求的分支**
|
||||
|
||||
**后端项目地址:[https://gitee.com/MTrun/go-view-serve](https://gitee.com/MTrun/go-view-serve)**
|
||||
|
||||
### feat-unify-test 分支目标
|
||||
+ 实现 backend 后端工厂
|
||||
将后端业务逻辑集中到 backend 了,控制 BackEndFactory 就可以适配不同的后端。
|
||||
伪代码如下:
|
||||
export const BackEndFactory = ():IBackend=>{
|
||||
switch(项目后端配置){
|
||||
case "无数据库":
|
||||
return new MockBackend() // 等同: -master ,没有存储
|
||||
case "indexdb":
|
||||
return new IndexDbBackend() // 这次开发的,用 indexdb 做测试
|
||||
case "java":
|
||||
return new JavaBackend() // 等同: -fetch, 没 java 环境,还没做
|
||||
case "python":
|
||||
return new PythonBackend() // 自定义开发的后端
|
||||
。。。 其他 oss 、云平台的后端 。。。
|
||||
}}
|
||||
意义:
|
||||
1 unify 统一 -fetch 和 master 分支,消除分支之间的差异。
|
||||
2 方便接入不同的自定义后端平台。
|
||||
3 前端存储功能让测试工作更加方便
|
||||
**接口说明地址:[https://docs.apipost.cn/preview/5aa85d10a59d66ce/ddb813732007ad2b?target_id=84dbc5b0-158f-4bcb-8f74-793ac604ada3#3e053622-1e76-43f9-a039-756aee822dbb](https://docs.apipost.cn/preview/5aa85d10a59d66ce/ddb813732007ad2b?target_id=84dbc5b0-158f-4bcb-8f74-793ac604ada3#3e053622-1e76-43f9-a039-756aee822dbb)**
|
||||
|
||||
+ 完善事件处理机制
|
||||
在事件中修改图表配置
|
||||
在事件中修改图表数据
|
||||
在事件中调用图表 exposed 函数
|
||||
数据驱动界面
|
||||
## 使用
|
||||
|
||||
### 试验功能1:Backend 后端工厂
|
||||
+ 对比 -fetch 分支,梳理后端逻辑到 backend 目录的 ibackend 接口
|
||||
+ 登录 - login
|
||||
+ 登出 - logout
|
||||
+ 预览,token 注入或单点登陆 - checkToken
|
||||
+ 显示项目列表和分页 - projectList
|
||||
+ 保存、发布、修改名称 - updateProject
|
||||
+ 复制项目 - copyProject
|
||||
+ 图表内的图片上传 - uploadFile
|
||||
+ 上传图片显示处理 - getFileUrl
|
||||
+ IndexDbBackend 用indexdb浏览器数据库实现了 project 相关所有功能。
|
||||
+ Todo: 统一后端错误处理
|
||||
+ Todo:开发 javabackend,适配现有的后端
|
||||
所有的接口地址位置:`src\api\path\*`
|
||||
|
||||
### 试验功能2:事件处理机制
|
||||
+ 实现最常用的互动:找到图表元素、显示或隐藏、修改数据
|
||||
+ 核心代码:useLifeHandler.hook.ts
|
||||
+ 在事件代码中通过 runtime 实现运行时刻的图表管理,提供基础函数:
|
||||
+ selectComponents 选择多个图表
|
||||
+ selectOneComponent 选择一个图表
|
||||
+ getChartConfig 读取图表
|
||||
+ setChartConfig 设置图表
|
||||
+ callExposed 调用图表 exposed 的函数
|
||||
+ 以下例子可以在点击事件中加入代码并预览,测试效果。
|
||||
接口地址修改:`.env`
|
||||
|
||||
+ 例子1 切换显示名称为 饼图 和 柱状图 的图表:
|
||||
const range = runtime.fn.selectComponents("饼图 柱状图")
|
||||
const h = runtime.fn.getChartConfig(range, "hide")
|
||||
runtime.fn.setChartConfig(range, "hide", !h)
|
||||
### 🤯 后端项目
|
||||
|
||||
+ 例子2 修改一个名称 柱状图001 组件id 2wolqibrx3c000 的图表数据,以下两句等效
|
||||
runtime.fn.setChartConfig("柱状图001", "dataset", {"dimensions":["product","data1","data2"],"source":[{"product":"Mon","data1":120,"data2":130}]})
|
||||
runtime.fn.setChartConfig("#2wolqibrx3c000", "dataset", {"dimensions":["product","data1","data2"],"source":[{"product":"Mon","data1":120,"data2":230}]})
|
||||
后端项目gitee地址:[https://gitee.com/MTrun/go-view-serve](https://gitee.com/MTrun/go-view-serve)
|
||||
|
||||
+ 例子3 找到一个组并隐藏
|
||||
const c = runtime.fn.selectOneComponent("分组")
|
||||
if(c){
|
||||
console.log(runtime.fn.getChartConfig(c, "isGroup" ))
|
||||
runtime.fn.setChartConfig(c, "hide", true)
|
||||
}
|
||||
接口说明地址:[https://docs.apipost.cn/preview/5aa85d10a59d66ce/ddb813732007ad2b?target_id=84dbc5b0-158f-4bcb-8f74-793ac604ada3#3e053622-1e76-43f9-a039-756aee822dbb](https://docs.apipost.cn/preview/5aa85d10a59d66ce/ddb813732007ad2b?target_id=84dbc5b0-158f-4bcb-8f74-793ac604ada3#3e053622-1e76-43f9-a039-756aee822dbb)
|
||||
|
||||
```shell
|
||||
# port
|
||||
VITE_DEV_PORT = '8080'
|
||||
|
||||
# development path
|
||||
VITE_DEV_PATH = 'http://127.0.0.1:8080'
|
||||
|
||||
# production path
|
||||
VITE_PRO_PATH = 'http://127.0.0.1:8080'
|
||||
```
|
||||
|
||||
公共前缀修改:`src\settings\httpSetting.ts`
|
||||
|
||||
```shell
|
||||
// 请求前缀
|
||||
export const axiosPre = '/api/goview'
|
||||
```
|
||||
|
||||
接口封装:`src\api\http.ts`
|
||||
|
||||
```ts
|
||||
import axiosInstance from './axios'
|
||||
import { RequestHttpEnum, ContentTypeEnum } from '@/enums/httpEnum'
|
||||
|
||||
export const get = (url: string, params?: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.GET,
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
export const post = (url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.POST,
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': headersType || ContentTypeEnum.JSON
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const put = (url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.PUT,
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': headersType || ContentTypeEnum.JSON
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const del = (url: string, params?: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.DELETE,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取请求函数,默认get
|
||||
export const http = (type?: RequestHttpEnum) => {
|
||||
switch (type) {
|
||||
case RequestHttpEnum.GET:
|
||||
return get
|
||||
|
||||
case RequestHttpEnum.POST:
|
||||
return post
|
||||
|
||||
case RequestHttpEnum.PUT:
|
||||
return put
|
||||
|
||||
case RequestHttpEnum.DELETE:
|
||||
return del
|
||||
|
||||
default:
|
||||
return get
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## 代码提交
|
||||
|
||||
* feat: 新功能
|
||||
* fix: 修复 Bug
|
||||
* docs: 文档修改
|
||||
* perf: 性能优化
|
||||
* revert: 版本回退
|
||||
* ci: CICD集成相关
|
||||
* test: 添加测试代码
|
||||
* refactor: 代码重构
|
||||
* build: 影响项目构建或依赖修改
|
||||
* style: 不影响程序逻辑的代码修改
|
||||
* chore: 不属于以上类型的其他类型(日常事务)
|
||||
|
||||
## 交流
|
||||
|
||||
QQ 群:1030129384
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
21
index.css
@@ -82,4 +82,25 @@
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 小屏处理 0~1000*/
|
||||
.mobile-terminal {
|
||||
display: none;
|
||||
}
|
||||
@media (max-width: 1000px) {
|
||||
#app {
|
||||
display: none;
|
||||
}
|
||||
.mobile-terminal {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: 200;
|
||||
background-image: linear-gradient(to top, #fff1eb 0%, #ace0f9 100%);
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mobile-terminal">
|
||||
<p>请使用 Web 端进行查看</p>
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
18
package.json
@@ -1,36 +1,29 @@
|
||||
{
|
||||
"name": "go-view",
|
||||
"version": "2.1.0",
|
||||
"version": "2.0.4",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"preview": "vite preview",
|
||||
"new": "plop --plopfile ./plop/plopfile.js",
|
||||
"postinstall": "husky install",
|
||||
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.vue src",
|
||||
"lint:fix": "eslint --ext .js,.jsx,.ts,.tsx,.vue src --fix"
|
||||
"postinstall": "husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/keymaster": "^1.6.30",
|
||||
"@types/lodash": "^4.14.184",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^0.27.2",
|
||||
"color": "^4.2.3",
|
||||
"crypto-js": "^4.1.1",
|
||||
"echarts-liquidfill": "^3.1.0",
|
||||
"echarts-stat": "^1.2.0",
|
||||
"echarts-wordcloud": "^2.0.0",
|
||||
"gsap": "^3.11.3",
|
||||
"highlight.js": "^11.5.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"keymaster": "^1.6.2",
|
||||
"monaco-editor": "^0.33.0",
|
||||
"naive-ui": "2.33.4",
|
||||
"naive-ui": "2.30.3",
|
||||
"pinia": "^2.0.13",
|
||||
"screenfull": "^6.0.1",
|
||||
"three": "^0.145.0",
|
||||
"vue": "^3.2.31",
|
||||
"vue-demi": "^0.13.1",
|
||||
"vue-i18n": "9.1.10",
|
||||
@@ -43,7 +36,6 @@
|
||||
"@commitlint/cli": "^17.0.2",
|
||||
"@commitlint/config-conventional": "^17.0.2",
|
||||
"@types/node": "^16.11.26",
|
||||
"@types/three": "^0.144.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
||||
"@typescript-eslint/parser": "^5.18.0",
|
||||
"@vicons/carbon": "^0.12.0",
|
||||
@@ -67,8 +59,8 @@
|
||||
"prettier": "^2.6.2",
|
||||
"sass": "^1.49.11",
|
||||
"sass-loader": "^12.6.0",
|
||||
"typescript": "4.6.3",
|
||||
"vite": "2.9.9",
|
||||
"typescript": "^4.6.3",
|
||||
"vite": "2.9.5",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-importer": "^0.2.5",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
|
||||
294
pnpm-lock.yaml
generated
@@ -6,9 +6,7 @@ specifiers:
|
||||
'@types/color': ^3.0.3
|
||||
'@types/crypto-js': ^4.1.1
|
||||
'@types/keymaster': ^1.6.30
|
||||
'@types/lodash': ^4.14.184
|
||||
'@types/node': ^16.11.26
|
||||
'@types/three': ^0.144.0
|
||||
'@typescript-eslint/eslint-plugin': ^5.18.0
|
||||
'@typescript-eslint/parser': ^5.18.0
|
||||
'@vicons/carbon': ^0.12.0
|
||||
@@ -18,21 +16,18 @@ specifiers:
|
||||
'@vue/compiler-sfc': ^3.2.31
|
||||
'@vueuse/core': ^7.7.1
|
||||
animate.css: ^4.1.1
|
||||
axios: ^0.27.2
|
||||
axios: 0.23.0
|
||||
color: ^4.2.3
|
||||
commitlint: ^17.0.2
|
||||
crypto-js: ^4.1.1
|
||||
default-passive-events: ^2.0.0
|
||||
echarts: ^5.3.2
|
||||
echarts-liquidfill: ^3.1.0
|
||||
echarts-stat: ^1.2.0
|
||||
echarts-wordcloud: ^2.0.0
|
||||
eslint: ^8.12.0
|
||||
eslint-config-prettier: ^8.5.0
|
||||
eslint-plugin-import: ^2.26.0
|
||||
eslint-plugin-prettier: ^4.0.0
|
||||
eslint-plugin-vue: ^8.5.0
|
||||
gsap: ^3.11.3
|
||||
highlight.js: ^11.5.0
|
||||
html2canvas: ^1.4.1
|
||||
husky: ^8.0.1
|
||||
@@ -40,16 +35,15 @@ specifiers:
|
||||
lodash: ~4.17.21
|
||||
mockjs: ^1.1.0
|
||||
monaco-editor: ^0.33.0
|
||||
naive-ui: 2.33.4
|
||||
naive-ui: 2.30.3
|
||||
pinia: ^2.0.13
|
||||
plop: ^3.0.5
|
||||
prettier: ^2.6.2
|
||||
sass: ^1.49.11
|
||||
sass-loader: ^12.6.0
|
||||
screenfull: ^6.0.1
|
||||
three: ^0.145.0
|
||||
typescript: 4.6.3
|
||||
vite: 2.9.9
|
||||
typescript: ^4.6.3
|
||||
vite: 2.9.5
|
||||
vite-plugin-compression: ^0.5.1
|
||||
vite-plugin-importer: ^0.2.5
|
||||
vite-plugin-mock: ^2.9.6
|
||||
@@ -68,23 +62,18 @@ dependencies:
|
||||
'@types/color': 3.0.3
|
||||
'@types/crypto-js': 4.1.1
|
||||
'@types/keymaster': 1.6.30
|
||||
'@types/lodash': 4.14.185
|
||||
animate.css: 4.1.1
|
||||
axios: 0.27.2
|
||||
axios: 0.23.0
|
||||
color: 4.2.3
|
||||
crypto-js: 4.1.1
|
||||
echarts-liquidfill: 3.1.0_echarts@5.3.3
|
||||
echarts-stat: 1.2.0
|
||||
echarts-wordcloud: 2.0.0_echarts@5.3.3
|
||||
gsap: 3.11.3
|
||||
highlight.js: 11.5.1
|
||||
html2canvas: 1.4.1
|
||||
keymaster: 1.6.2
|
||||
monaco-editor: 0.33.0
|
||||
naive-ui: 2.33.4_vue@3.2.37
|
||||
pinia: 2.0.14_ub5l46u3nefphax5x2tezui4oq
|
||||
naive-ui: 2.30.3_vue@3.2.37
|
||||
pinia: 2.0.14_vcmyupim4cga7k7f5hngmth5py
|
||||
screenfull: 6.0.1
|
||||
three: 0.145.0
|
||||
vue: 3.2.37
|
||||
vue-demi: 0.13.1_vue@3.2.37
|
||||
vue-i18n: 9.1.10_vue@3.2.37
|
||||
@@ -97,12 +86,11 @@ devDependencies:
|
||||
'@commitlint/cli': 17.0.2
|
||||
'@commitlint/config-conventional': 17.0.2
|
||||
'@types/node': 16.11.40
|
||||
'@types/three': 0.144.0
|
||||
'@typescript-eslint/eslint-plugin': 5.28.0_evi7yu7wunhzwb24olrfvzynny
|
||||
'@typescript-eslint/parser': 5.28.0_sfmgizikprcxt7r54j7cnzjamu
|
||||
'@typescript-eslint/eslint-plugin': 5.28.0_7yumg2qjgbp7maccqlfhx2vudu
|
||||
'@typescript-eslint/parser': 5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4
|
||||
'@vicons/carbon': 0.12.0
|
||||
'@vicons/ionicons5': 0.11.0
|
||||
'@vitejs/plugin-vue': 1.10.2_vite@2.9.9
|
||||
'@vitejs/plugin-vue': 1.10.2_vite@2.9.5
|
||||
'@vitejs/plugin-vue-jsx': 1.3.10
|
||||
'@vue/compiler-sfc': 3.2.37
|
||||
'@vueuse/core': 7.7.1_vue@3.2.37
|
||||
@@ -121,14 +109,14 @@ devDependencies:
|
||||
prettier: 2.7.0
|
||||
sass: 1.52.3
|
||||
sass-loader: 12.6.0_sass@1.52.3
|
||||
typescript: 4.6.3
|
||||
vite: 2.9.9_sass@1.52.3
|
||||
vite-plugin-compression: 0.5.1_vite@2.9.9
|
||||
typescript: 4.7.3
|
||||
vite: 2.9.5_sass@1.52.3
|
||||
vite-plugin-compression: 0.5.1_vite@2.9.5
|
||||
vite-plugin-importer: 0.2.5
|
||||
vite-plugin-mock: 2.9.6_mockjs@1.1.0+vite@2.9.9
|
||||
vite-plugin-mock: 2.9.6_mockjs@1.1.0+vite@2.9.5
|
||||
vite-plugin-monaco-editor: 1.1.0_monaco-editor@0.33.0
|
||||
vue-echarts: 6.0.3_echarts@5.3.3+vue@3.2.37
|
||||
vue-tsc: 0.28.10_typescript@4.6.3
|
||||
vue-tsc: 0.28.10_typescript@4.7.3
|
||||
|
||||
packages:
|
||||
|
||||
@@ -869,6 +857,13 @@ packages:
|
||||
rxjs: 7.5.5
|
||||
dev: true
|
||||
|
||||
/@types/jest/27.5.2:
|
||||
resolution: {integrity: sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==}
|
||||
dependencies:
|
||||
jest-matcher-utils: 27.5.1
|
||||
pretty-format: 27.5.1
|
||||
dev: false
|
||||
|
||||
/@types/json-schema/7.0.11:
|
||||
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
|
||||
dev: true
|
||||
@@ -885,17 +880,17 @@ packages:
|
||||
resolution: {integrity: sha512-Ny/PJkO6nxWAQnaet8q/oWz15lrfwvdvBpuY4treB0CSsBO1CG0fVuNLngR3m3bepQLd+E4c3Y3DlC2okpUvPw==}
|
||||
dependencies:
|
||||
'@types/fined': 1.1.3
|
||||
'@types/node': 17.0.43
|
||||
'@types/node': 16.11.40
|
||||
dev: true
|
||||
|
||||
/@types/lodash-es/4.17.6:
|
||||
resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==}
|
||||
dependencies:
|
||||
'@types/lodash': 4.14.185
|
||||
'@types/lodash': 4.14.182
|
||||
dev: false
|
||||
|
||||
/@types/lodash/4.14.185:
|
||||
resolution: {integrity: sha512-evMDG1bC4rgQg4ku9tKpuMh5iBNEwNa3tf9zRHdP1qlv+1WUg44xat4IxCE14gIpZRGUUWAx2VhItCZc25NfMA==}
|
||||
/@types/lodash/4.14.182:
|
||||
resolution: {integrity: sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==}
|
||||
dev: false
|
||||
|
||||
/@types/minimist/1.2.2:
|
||||
@@ -911,7 +906,7 @@ packages:
|
||||
dev: true
|
||||
|
||||
/@types/node/17.0.43:
|
||||
resolution: {integrity: sha512-jnUpgw8fL9kP2iszfIDyBQtw5Mf4/XSqy0Loc1J9pI14ejL83XcCEvSf50Gs/4ET0I9VCCDoOfufQysj0S66xA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/@types/node/-/node-17.0.43.tgz}
|
||||
resolution: {integrity: sha512-jnUpgw8fL9kP2iszfIDyBQtw5Mf4/XSqy0Loc1J9pI14ejL83XcCEvSf50Gs/4ET0I9VCCDoOfufQysj0S66xA==}
|
||||
|
||||
/@types/normalize-package-data/2.4.1:
|
||||
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
|
||||
@@ -927,23 +922,13 @@ packages:
|
||||
'@types/node': 17.0.43
|
||||
dev: true
|
||||
|
||||
/@types/three/0.144.0:
|
||||
resolution: {integrity: sha512-psvEs6q5rLN50jUYZ3D4pZMfxTbdt3A243blt0my7/NcL6chaCZpHe2csbCtx0SOD9fI/XnF3wnVUAYZGqCSYg==}
|
||||
dependencies:
|
||||
'@types/webxr': 0.5.0
|
||||
dev: true
|
||||
|
||||
/@types/through/0.0.30:
|
||||
resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==}
|
||||
dependencies:
|
||||
'@types/node': 17.0.43
|
||||
dev: true
|
||||
|
||||
/@types/webxr/0.5.0:
|
||||
resolution: {integrity: sha512-IUMDPSXnYIbEO2IereEFcgcqfDREOgmbGqtrMpVPpACTU6pltYLwHgVkrnYv0XhWEcjio9sYEfIEzgn3c7nDqA==}
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/eslint-plugin/5.28.0_evi7yu7wunhzwb24olrfvzynny:
|
||||
/@typescript-eslint/eslint-plugin/5.28.0_7yumg2qjgbp7maccqlfhx2vudu:
|
||||
resolution: {integrity: sha512-DXVU6Cg29H2M6EybqSg2A+x8DgO9TCUBRp4QEXQHJceLS7ogVDP0g3Lkg/SZCqcvkAP/RruuQqK0gdlkgmhSUA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -954,23 +939,23 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.28.0_sfmgizikprcxt7r54j7cnzjamu
|
||||
'@typescript-eslint/parser': 5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4
|
||||
'@typescript-eslint/scope-manager': 5.28.0
|
||||
'@typescript-eslint/type-utils': 5.28.0_sfmgizikprcxt7r54j7cnzjamu
|
||||
'@typescript-eslint/utils': 5.28.0_sfmgizikprcxt7r54j7cnzjamu
|
||||
'@typescript-eslint/type-utils': 5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4
|
||||
'@typescript-eslint/utils': 5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4
|
||||
debug: 4.3.4
|
||||
eslint: 8.17.0
|
||||
functional-red-black-tree: 1.0.1
|
||||
ignore: 5.2.0
|
||||
regexpp: 3.2.0
|
||||
semver: 7.3.7
|
||||
tsutils: 3.21.0_typescript@4.6.3
|
||||
typescript: 4.6.3
|
||||
tsutils: 3.21.0_typescript@4.7.3
|
||||
typescript: 4.7.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/parser/5.28.0_sfmgizikprcxt7r54j7cnzjamu:
|
||||
/@typescript-eslint/parser/5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4:
|
||||
resolution: {integrity: sha512-ekqoNRNK1lAcKhZESN/PdpVsWbP9jtiNqzFWkp/yAUdZvJalw2heCYuqRmM5eUJSIYEkgq5sGOjq+ZqsLMjtRA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -982,10 +967,10 @@ packages:
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 5.28.0
|
||||
'@typescript-eslint/types': 5.28.0
|
||||
'@typescript-eslint/typescript-estree': 5.28.0_typescript@4.6.3
|
||||
'@typescript-eslint/typescript-estree': 5.28.0_typescript@4.7.3
|
||||
debug: 4.3.4
|
||||
eslint: 8.17.0
|
||||
typescript: 4.6.3
|
||||
typescript: 4.7.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -998,7 +983,7 @@ packages:
|
||||
'@typescript-eslint/visitor-keys': 5.28.0
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/type-utils/5.28.0_sfmgizikprcxt7r54j7cnzjamu:
|
||||
/@typescript-eslint/type-utils/5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4:
|
||||
resolution: {integrity: sha512-SyKjKh4CXPglueyC6ceAFytjYWMoPHMswPQae236zqe1YbhvCVQyIawesYywGiu98L9DwrxsBN69vGIVxJ4mQQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -1008,11 +993,11 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/utils': 5.28.0_sfmgizikprcxt7r54j7cnzjamu
|
||||
'@typescript-eslint/utils': 5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4
|
||||
debug: 4.3.4
|
||||
eslint: 8.17.0
|
||||
tsutils: 3.21.0_typescript@4.6.3
|
||||
typescript: 4.6.3
|
||||
tsutils: 3.21.0_typescript@4.7.3
|
||||
typescript: 4.7.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -1022,7 +1007,7 @@ packages:
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/typescript-estree/5.28.0_typescript@4.6.3:
|
||||
/@typescript-eslint/typescript-estree/5.28.0_typescript@4.7.3:
|
||||
resolution: {integrity: sha512-9GX+GfpV+F4hdTtYc6OV9ZkyYilGXPmQpm6AThInpBmKJEyRSIjORJd1G9+bknb7OTFYL+Vd4FBJAO6T78OVqA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -1037,13 +1022,13 @@ packages:
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
semver: 7.3.7
|
||||
tsutils: 3.21.0_typescript@4.6.3
|
||||
typescript: 4.6.3
|
||||
tsutils: 3.21.0_typescript@4.7.3
|
||||
typescript: 4.7.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/utils/5.28.0_sfmgizikprcxt7r54j7cnzjamu:
|
||||
/@typescript-eslint/utils/5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4:
|
||||
resolution: {integrity: sha512-E60N5L0fjv7iPJV3UGc4EC+A3Lcj4jle9zzR0gW7vXhflO7/J29kwiTGITA2RlrmPokKiZbBy2DgaclCaEUs6g==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -1052,7 +1037,7 @@ packages:
|
||||
'@types/json-schema': 7.0.11
|
||||
'@typescript-eslint/scope-manager': 5.28.0
|
||||
'@typescript-eslint/types': 5.28.0
|
||||
'@typescript-eslint/typescript-estree': 5.28.0_typescript@4.6.3
|
||||
'@typescript-eslint/typescript-estree': 5.28.0_typescript@4.7.3
|
||||
eslint: 8.17.0
|
||||
eslint-scope: 5.1.1
|
||||
eslint-utils: 3.0.0_eslint@8.17.0
|
||||
@@ -1091,13 +1076,13 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@vitejs/plugin-vue/1.10.2_vite@2.9.9:
|
||||
/@vitejs/plugin-vue/1.10.2_vite@2.9.5:
|
||||
resolution: {integrity: sha512-/QJ0Z9qfhAFtKRY+r57ziY4BSbGUTGsPRMpB/Ron3QPwBZM4OZAZHdTa4a8PafCwU5DTatXG8TMDoP8z+oDqJw==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
vite: ^2.5.10
|
||||
dependencies:
|
||||
vite: 2.9.9_sass@1.52.3
|
||||
vite: 2.9.5_sass@1.52.3
|
||||
dev: true
|
||||
|
||||
/@volar/code-gen/0.28.10:
|
||||
@@ -1344,7 +1329,6 @@ packages:
|
||||
/ansi-regex/5.0.1:
|
||||
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/ansi-regex/6.0.1:
|
||||
resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==}
|
||||
@@ -1363,7 +1347,11 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
color-convert: 2.0.1
|
||||
dev: true
|
||||
|
||||
/ansi-styles/5.2.0:
|
||||
resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}
|
||||
engines: {node: '>=10'}
|
||||
dev: false
|
||||
|
||||
/anymatch/3.1.2:
|
||||
resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==}
|
||||
@@ -1438,15 +1426,10 @@ packages:
|
||||
resolution: {integrity: sha512-p4DO/JXwjs8klJyJL8Q2oM4ks5fUTze/h5k10oPPKMiLe1fj3G1QMzPHNmN1Py4ycOk7WlO2DcGXv1qiESJCZA==}
|
||||
dev: false
|
||||
|
||||
/asynckit/0.4.0:
|
||||
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
|
||||
dev: false
|
||||
|
||||
/axios/0.27.2:
|
||||
resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==}
|
||||
/axios/0.23.0:
|
||||
resolution: {integrity: sha512-NmvAE4i0YAv5cKq8zlDoPd1VLKAqX5oLuZKs8xkJa4qi6RGn0uhCYFjWtHHC9EM/MwOwYWOs53W+V0aqEXq1sg==}
|
||||
dependencies:
|
||||
follow-redirects: 1.15.1
|
||||
form-data: 4.0.0
|
||||
transitivePeerDependencies:
|
||||
- debug
|
||||
dev: false
|
||||
@@ -1612,7 +1595,6 @@ packages:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
supports-color: 7.2.0
|
||||
dev: true
|
||||
|
||||
/chalk/5.0.1:
|
||||
resolution: {integrity: sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==}
|
||||
@@ -1737,13 +1719,6 @@ packages:
|
||||
color-string: 1.9.1
|
||||
dev: false
|
||||
|
||||
/combined-stream/1.0.8:
|
||||
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
|
||||
engines: {node: '>= 0.8'}
|
||||
dependencies:
|
||||
delayed-stream: 1.0.0
|
||||
dev: false
|
||||
|
||||
/commander/9.3.0:
|
||||
resolution: {integrity: sha512-hv95iU5uXPbK83mjrJKuZyFM/LBAoCV/XhVGkS5Je6tl7sxr6A0ITMw5WoRV46/UaJ46Nllm3Xt7IaJhXTIkzw==}
|
||||
engines: {node: ^12.20.0 || >=14}
|
||||
@@ -1900,7 +1875,7 @@ packages:
|
||||
dev: true
|
||||
|
||||
/csstype/2.6.20:
|
||||
resolution: {integrity: sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/csstype/-/csstype-2.6.20.tgz}
|
||||
resolution: {integrity: sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==}
|
||||
dev: false
|
||||
|
||||
/csstype/3.0.11:
|
||||
@@ -2013,16 +1988,16 @@ packages:
|
||||
slash: 3.0.0
|
||||
dev: true
|
||||
|
||||
/delayed-stream/1.0.0:
|
||||
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: false
|
||||
|
||||
/detect-file/1.0.0:
|
||||
resolution: {integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/diff-sequences/27.5.1:
|
||||
resolution: {integrity: sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==}
|
||||
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
|
||||
dev: false
|
||||
|
||||
/diff/4.0.2:
|
||||
resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==}
|
||||
engines: {node: '>=0.3.1'}
|
||||
@@ -2102,18 +2077,6 @@ packages:
|
||||
echarts: 5.3.3
|
||||
dev: false
|
||||
|
||||
/echarts-stat/1.2.0:
|
||||
resolution: {integrity: sha512-zLd7Kgs+tuTSeaK0VQEMNmnMivEkhvHIk1gpBtLzpRerfcIQ+Bd5XudOMmtwpaTc1WDZbA7d1V//iiBccR46Qg==}
|
||||
dev: false
|
||||
|
||||
/echarts-wordcloud/2.0.0_echarts@5.3.3:
|
||||
resolution: {integrity: sha512-K7l6pTklqdW7ZWzT/1CS0KhBSINr/cd7c5N1fVMzZMwLQHEwT7x+nivK7g5hkVh7WNcAv4Dn6/ZS5zMKRozC1g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/echarts-wordcloud/-/echarts-wordcloud-2.0.0.tgz}
|
||||
peerDependencies:
|
||||
echarts: ^5.0.1
|
||||
dependencies:
|
||||
echarts: 5.3.3
|
||||
dev: false
|
||||
|
||||
/echarts/5.3.3:
|
||||
resolution: {integrity: sha512-BRw2serInRwO5SIwRviZ6Xgm5Lb7irgz+sLiFMmy/HOaf4SQ+7oYqxKzRHAKp4xHQ05AuHw1xvoQWJjDQq/FGw==}
|
||||
dependencies:
|
||||
@@ -2473,7 +2436,7 @@ packages:
|
||||
eslint-import-resolver-webpack:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.28.0_sfmgizikprcxt7r54j7cnzjamu
|
||||
'@typescript-eslint/parser': 5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4
|
||||
debug: 3.2.7
|
||||
eslint-import-resolver-node: 0.3.6
|
||||
find-up: 2.1.0
|
||||
@@ -2491,7 +2454,7 @@ packages:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 5.28.0_sfmgizikprcxt7r54j7cnzjamu
|
||||
'@typescript-eslint/parser': 5.28.0_ud6rd4xtew5bv4yhvkvu24pzm4
|
||||
array-includes: 3.1.5
|
||||
array.prototype.flat: 1.3.0
|
||||
debug: 2.6.9
|
||||
@@ -2671,8 +2634,8 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/evtd/0.2.4:
|
||||
resolution: {integrity: sha512-qaeGN5bx63s/AXgQo8gj6fBkxge+OoLddLniox5qtLAEY5HSnuSlISXVPxnSae1dWblvTh4/HoMIB+mbMsvZzw==}
|
||||
/evtd/0.2.3:
|
||||
resolution: {integrity: sha512-tmiT1YUVqFjTY+BSBOAskL83xNx41iUfpvKP6Gcd/xMHjg3mnER98jXGXJyKnxCG19uPc6EhZiUC+MUyvoqCtw==}
|
||||
dev: false
|
||||
|
||||
/execa/5.1.1:
|
||||
@@ -2862,15 +2825,6 @@ packages:
|
||||
for-in: 1.0.2
|
||||
dev: true
|
||||
|
||||
/form-data/4.0.0:
|
||||
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
|
||||
engines: {node: '>= 6'}
|
||||
dependencies:
|
||||
asynckit: 0.4.0
|
||||
combined-stream: 1.0.8
|
||||
mime-types: 2.1.35
|
||||
dev: false
|
||||
|
||||
/fs-extra/10.1.0:
|
||||
resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -3048,10 +3002,6 @@ packages:
|
||||
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
|
||||
dev: true
|
||||
|
||||
/gsap/3.11.3:
|
||||
resolution: {integrity: sha512-xc/iIJy+LWiMbRa4IdMtdnnKa/7PXEK6NNzV71gdOYUVeTZN7UWnLU0fB7Hi1iwiz4ZZoYkBZPPYGg+2+zzFHA==}
|
||||
dev: false
|
||||
|
||||
/handlebars/4.7.7:
|
||||
resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==}
|
||||
engines: {node: '>=0.4.7'}
|
||||
@@ -3082,7 +3032,6 @@ packages:
|
||||
/has-flag/4.0.0:
|
||||
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/has-property-descriptors/1.0.0:
|
||||
resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
|
||||
@@ -3499,6 +3448,31 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/jest-diff/27.5.1:
|
||||
resolution: {integrity: sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==}
|
||||
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
diff-sequences: 27.5.1
|
||||
jest-get-type: 27.5.1
|
||||
pretty-format: 27.5.1
|
||||
dev: false
|
||||
|
||||
/jest-get-type/27.5.1:
|
||||
resolution: {integrity: sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==}
|
||||
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
|
||||
dev: false
|
||||
|
||||
/jest-matcher-utils/27.5.1:
|
||||
resolution: {integrity: sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==}
|
||||
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
jest-diff: 27.5.1
|
||||
jest-get-type: 27.5.1
|
||||
pretty-format: 27.5.1
|
||||
dev: false
|
||||
|
||||
/js-stringify/1.0.2:
|
||||
resolution: {integrity: sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==}
|
||||
dev: true
|
||||
@@ -3744,18 +3718,6 @@ packages:
|
||||
picomatch: 2.3.1
|
||||
dev: true
|
||||
|
||||
/mime-db/1.52.0:
|
||||
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: false
|
||||
|
||||
/mime-types/2.1.35:
|
||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dependencies:
|
||||
mime-db: 1.52.0
|
||||
dev: false
|
||||
|
||||
/mimic-fn/2.1.0:
|
||||
resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -3818,29 +3780,29 @@ packages:
|
||||
resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}
|
||||
dev: true
|
||||
|
||||
/naive-ui/2.33.4_vue@3.2.37:
|
||||
resolution: {integrity: sha512-4tK2lWx3v8sbEeTLG/tL5Ur9VvZyUxSnC0VcTO6NO1rM/D15JXg8jVwQCRFYnEp7mp3gfD5B3i8kN4JisTeiFA==}
|
||||
/naive-ui/2.30.3_vue@3.2.37:
|
||||
resolution: {integrity: sha512-s6iphodOfLklhgAGtzhzoE0oPi6eY72UufUDRySBbfV+r+64vw9omYUOqk3Z1M/t/Mh8KwqW6z+ex8bYftFKPA==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.0
|
||||
dependencies:
|
||||
'@css-render/plugin-bem': 0.15.10_css-render@0.15.10
|
||||
'@css-render/vue3-ssr': 0.15.10_vue@3.2.37
|
||||
'@types/lodash': 4.14.185
|
||||
'@types/lodash': 4.14.182
|
||||
'@types/lodash-es': 4.17.6
|
||||
async-validator: 4.1.1
|
||||
css-render: 0.15.10
|
||||
date-fns: 2.28.0
|
||||
date-fns-tz: 1.3.4_date-fns@2.28.0
|
||||
evtd: 0.2.4
|
||||
evtd: 0.2.3
|
||||
highlight.js: 11.5.1
|
||||
lodash: 4.17.21
|
||||
lodash-es: 4.17.21
|
||||
seemly: 0.3.6
|
||||
seemly: 0.3.4
|
||||
treemate: 0.3.11
|
||||
vdirs: 0.1.8_vue@3.2.37
|
||||
vooks: 0.2.12_vue@3.2.37
|
||||
vue: 3.2.37
|
||||
vueuc: 0.4.49_vue@3.2.37
|
||||
vueuc: 0.4.44_vue@3.2.37
|
||||
dev: false
|
||||
|
||||
/nanoid/3.3.4:
|
||||
@@ -4217,7 +4179,7 @@ packages:
|
||||
engines: {node: '>=8.6'}
|
||||
dev: true
|
||||
|
||||
/pinia/2.0.14_ub5l46u3nefphax5x2tezui4oq:
|
||||
/pinia/2.0.14_vcmyupim4cga7k7f5hngmth5py:
|
||||
resolution: {integrity: sha512-0nPuZR4TetT/WcLN+feMSjWJku3SQU7dBbXC6uw+R6FLQJCsg+/0pzXyD82T1FmAYe0lsx+jnEDQ1BLgkRKlxA==}
|
||||
peerDependencies:
|
||||
'@vue/composition-api': ^1.4.0
|
||||
@@ -4230,7 +4192,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vue/devtools-api': 6.1.4
|
||||
typescript: 4.6.3
|
||||
typescript: 4.7.3
|
||||
vue: 3.2.37
|
||||
vue-demi: 0.13.1_vue@3.2.37
|
||||
dev: false
|
||||
@@ -4284,6 +4246,15 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/pretty-format/27.5.1:
|
||||
resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==}
|
||||
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
|
||||
dependencies:
|
||||
ansi-regex: 5.0.1
|
||||
ansi-styles: 5.2.0
|
||||
react-is: 17.0.2
|
||||
dev: false
|
||||
|
||||
/promise/7.3.1:
|
||||
resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==}
|
||||
dependencies:
|
||||
@@ -4400,6 +4371,10 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/react-is/17.0.2:
|
||||
resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
|
||||
dev: false
|
||||
|
||||
/read-pkg-up/7.0.1:
|
||||
resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -4615,8 +4590,10 @@ packages:
|
||||
engines: {node: ^14.13.1 || >=16.0.0}
|
||||
dev: false
|
||||
|
||||
/seemly/0.3.6:
|
||||
resolution: {integrity: sha512-lEV5VB8BUKTo/AfktXJcy+JeXns26ylbMkIUco8CYREsQijuz4mrXres2Q+vMLdwkuLxJdIPQ8IlCIxLYm71Yw==}
|
||||
/seemly/0.3.4:
|
||||
resolution: {integrity: sha512-/crL+UfbtYd6NdLdnf58xaABfeSRt5uKE4N1SFQAW7nIznOrJQchAaslJHxV8/iAfV0LWInrmxJBFdDb0c2/sw==}
|
||||
dependencies:
|
||||
'@types/jest': 27.5.2
|
||||
dev: false
|
||||
|
||||
/semver/5.7.1:
|
||||
@@ -4819,7 +4796,6 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
has-flag: 4.0.0
|
||||
dev: true
|
||||
|
||||
/supports-preserve-symlinks-flag/1.0.0:
|
||||
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
|
||||
@@ -4845,10 +4821,6 @@ packages:
|
||||
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
|
||||
dev: true
|
||||
|
||||
/three/0.145.0:
|
||||
resolution: {integrity: sha512-EKoHQEtEJ4CB6b2BGMBgLZrfwLjXcSUfoI/MiIXUuRpeYsfK5aPWbYhdtIVWOH+x6X0TouldHKHBuc/LAiFzAw==}
|
||||
dev: false
|
||||
|
||||
/through/2.3.8:
|
||||
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
|
||||
dev: true
|
||||
@@ -4948,14 +4920,14 @@ packages:
|
||||
resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==}
|
||||
dev: true
|
||||
|
||||
/tsutils/3.21.0_typescript@4.6.3:
|
||||
/tsutils/3.21.0_typescript@4.7.3:
|
||||
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
|
||||
engines: {node: '>= 6'}
|
||||
peerDependencies:
|
||||
typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
|
||||
dependencies:
|
||||
tslib: 1.14.1
|
||||
typescript: 4.6.3
|
||||
typescript: 4.7.3
|
||||
dev: true
|
||||
|
||||
/type-check/0.4.0:
|
||||
@@ -4990,12 +4962,6 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/typescript/4.6.3:
|
||||
resolution: {integrity: sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==}
|
||||
engines: {node: '>=4.2.0'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/typescript/4.7.3:
|
||||
resolution: {integrity: sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==}
|
||||
engines: {node: '>=4.2.0'}
|
||||
@@ -5097,11 +5063,11 @@ packages:
|
||||
peerDependencies:
|
||||
vue: ^3.0.11
|
||||
dependencies:
|
||||
evtd: 0.2.4
|
||||
evtd: 0.2.3
|
||||
vue: 3.2.37
|
||||
dev: false
|
||||
|
||||
/vite-plugin-compression/0.5.1_vite@2.9.9:
|
||||
/vite-plugin-compression/0.5.1_vite@2.9.5:
|
||||
resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==}
|
||||
peerDependencies:
|
||||
vite: '>=2.0.0'
|
||||
@@ -5109,7 +5075,7 @@ packages:
|
||||
chalk: 4.1.2
|
||||
debug: 4.3.4
|
||||
fs-extra: 10.1.0
|
||||
vite: 2.9.9_sass@1.52.3
|
||||
vite: 2.9.5_sass@1.52.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -5124,7 +5090,7 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.9.9:
|
||||
/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.9.5:
|
||||
resolution: {integrity: sha512-/Rm59oPppe/ncbkSrUuAxIQihlI2YcBmnbR4ST1RA2VzM1C0tEQc1KlbQvnUGhXECAGTaQN2JyasiwXP6EtKgg==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -5141,7 +5107,7 @@ packages:
|
||||
fast-glob: 3.2.11
|
||||
mockjs: 1.1.0
|
||||
path-to-regexp: 6.2.1
|
||||
vite: 2.9.9_sass@1.52.3
|
||||
vite: 2.9.5_sass@1.52.3
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
- supports-color
|
||||
@@ -5155,8 +5121,8 @@ packages:
|
||||
monaco-editor: 0.33.0
|
||||
dev: true
|
||||
|
||||
/vite/2.9.9_sass@1.52.3:
|
||||
resolution: {integrity: sha512-ffaam+NgHfbEmfw/Vuh6BHKKlI/XIAhxE5QSS7gFLIngxg171mg1P3a4LSRME0z2ZU1ScxoKzphkipcYwSD5Ew==}
|
||||
/vite/2.9.5_sass@1.52.3:
|
||||
resolution: {integrity: sha512-dvMN64X2YEQgSXF1lYabKXw3BbN6e+BL67+P3Vy4MacnY+UzT1AfkHiioFSi9+uiDUiaDy7Ax/LQqivk6orilg==}
|
||||
engines: {node: '>=12.2.0'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -5190,7 +5156,7 @@ packages:
|
||||
peerDependencies:
|
||||
vue: ^3.0.0
|
||||
dependencies:
|
||||
evtd: 0.2.4
|
||||
evtd: 0.2.3
|
||||
vue: 3.2.37
|
||||
dev: false
|
||||
|
||||
@@ -5395,14 +5361,14 @@ packages:
|
||||
vue: 3.2.37
|
||||
dev: false
|
||||
|
||||
/vue-tsc/0.28.10_typescript@4.6.3:
|
||||
/vue-tsc/0.28.10_typescript@4.7.3:
|
||||
resolution: {integrity: sha512-tGD7eC74MHqKH2/F66AYkC1zNiLrgnhMzeYWou3p/wApMaUEM4h29HqYoKN6uE+pq87uvq/penYqUSBXhIwLiA==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
dependencies:
|
||||
'@volar/shared': 0.28.10
|
||||
typescript: 4.6.3
|
||||
typescript: 4.7.3
|
||||
vscode-vue-languageservice: 0.28.10
|
||||
dev: true
|
||||
|
||||
@@ -5451,16 +5417,16 @@ packages:
|
||||
vue: 3.2.37
|
||||
dev: false
|
||||
|
||||
/vueuc/0.4.49_vue@3.2.37:
|
||||
resolution: {integrity: sha512-WarAC44a/Yx78CxkAgROYLq+LkAeCGA/6wHidVoFmHLbzyF3SiP2nzRNGD/8zJeJInXv18EnWK6A//eGgMMq8w==}
|
||||
/vueuc/0.4.44_vue@3.2.37:
|
||||
resolution: {integrity: sha512-2sLWo1Ow3DRKTDvGVlaWlf0KL+LOqeO6zlvb6nUxWxqj4VjUpg7sMtH+xtvBK+oOXH4goGt1RyLMaBVgPFpqHw==}
|
||||
peerDependencies:
|
||||
vue: ^3.0.11
|
||||
dependencies:
|
||||
'@css-render/vue3-ssr': 0.15.10_vue@3.2.37
|
||||
'@juggle/resize-observer': 3.3.1
|
||||
css-render: 0.15.10
|
||||
evtd: 0.2.4
|
||||
seemly: 0.3.6
|
||||
evtd: 0.2.3
|
||||
seemly: 0.3.4
|
||||
vdirs: 0.1.8_vue@3.2.37
|
||||
vooks: 0.2.12_vue@3.2.37
|
||||
vue: 3.2.37
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
export enum ModuleTypeEnum {
|
||||
SYSTEM = 'sys',
|
||||
PROJECT = 'project',
|
||||
}
|
||||
import { ModuleTypeEnum } from '@/enums/httpEnum'
|
||||
|
||||
// 接口白名单(免登录)
|
||||
export const fetchAllowList = [
|
||||
@@ -1,19 +1,37 @@
|
||||
import axios, { AxiosResponse, AxiosRequestConfig } from 'axios'
|
||||
import { ResultEnum } from "@/enums/httpEnum"
|
||||
import { ErrorPageNameMap } from "@/enums/pageEnum"
|
||||
import { redirectErrorPage } from '@/utils'
|
||||
import { ResultEnum, RequestHttpHeaderEnum } from "@/enums/httpEnum"
|
||||
import { PageEnum, ErrorPageNameMap } from "@/enums/pageEnum"
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
import { axiosPre } from '@/settings/httpSetting'
|
||||
import { SystemStoreEnum, SystemStoreUserInfoEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
import { redirectErrorPage, getLocalStorage, routerTurnByName, httpErrorHandle } from '@/utils'
|
||||
import { fetchAllowList } from './axios.config'
|
||||
import includes from 'lodash/includes'
|
||||
|
||||
const axiosInstance = axios.create({
|
||||
baseURL: import.meta.env.DEV ? import.meta.env.VITE_DEV_PATH : import.meta.env.VITE_PRO_PATH,
|
||||
baseURL: `${import.meta.env.PROD ? import.meta.env.VITE_PRO_PATH : ''}${axiosPre}`,
|
||||
timeout: ResultEnum.TIMEOUT,
|
||||
})
|
||||
|
||||
axiosInstance.interceptors.request.use(
|
||||
(config: AxiosRequestConfig) => {
|
||||
// 白名单校验
|
||||
if (includes(fetchAllowList, config.url)) return config
|
||||
// 获取 token
|
||||
const info = getLocalStorage(StorageEnum.GO_SYSTEM_STORE)
|
||||
// 重新登录
|
||||
if (!info) {
|
||||
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
|
||||
return config
|
||||
}
|
||||
config.headers = {
|
||||
...config.headers,
|
||||
[RequestHttpHeaderEnum.TOKEN]: info[SystemStoreEnum.USER_INFO][SystemStoreUserInfoEnum.USER_TOKEN] || ''
|
||||
}
|
||||
return config
|
||||
},
|
||||
(error: AxiosRequestConfig) => {
|
||||
Promise.reject(error)
|
||||
(err: AxiosRequestConfig) => {
|
||||
Promise.reject(err)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -21,12 +39,31 @@ axiosInstance.interceptors.request.use(
|
||||
axiosInstance.interceptors.response.use(
|
||||
(res: AxiosResponse) => {
|
||||
const { code } = res.data as { code: number }
|
||||
if (code === ResultEnum.SUCCESS) return Promise.resolve(res.data)
|
||||
// 重定向
|
||||
if (ErrorPageNameMap.get(code)) redirectErrorPage(code)
|
||||
|
||||
// 成功
|
||||
if (code === ResultEnum.SUCCESS) {
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
|
||||
// 登录过期
|
||||
if (code === ResultEnum.TOKEN_OVERDUE) {
|
||||
window['$message'].error(window['$t']('http.token_overdue_message'))
|
||||
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
|
||||
// 固定错误码重定向
|
||||
if (ErrorPageNameMap.get(code)) {
|
||||
redirectErrorPage(code)
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
|
||||
// 提示错误
|
||||
window['$message'].error(window['$t']((res.data as any).msg))
|
||||
return Promise.resolve(res.data)
|
||||
},
|
||||
(err: AxiosResponse) => {
|
||||
httpErrorHandle()
|
||||
Promise.reject(err)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@ export const get = (url: string, params?: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.GET,
|
||||
params: params
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -80,32 +80,6 @@ export const http = (type?: RequestHttpEnum) => {
|
||||
return get
|
||||
}
|
||||
}
|
||||
const prefix = 'javascript:'
|
||||
// 对输入字符进行转义处理
|
||||
export const translateStr = (target: string | object) => {
|
||||
if (typeof target === 'string') {
|
||||
if (target.startsWith(prefix)) {
|
||||
const funcStr = target.split(prefix)[1]
|
||||
let result;
|
||||
try {
|
||||
result = new Function(`${funcStr}`)()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
window['$message'].error('js内容解析有误!')
|
||||
}
|
||||
return result
|
||||
} else {
|
||||
return target
|
||||
}
|
||||
}
|
||||
for (const key in target) {
|
||||
if (Object.prototype.hasOwnProperty.call(target, key)) {
|
||||
const subTarget = (target as any)[key];
|
||||
(target as any)[key] = translateStr(subTarget)
|
||||
}
|
||||
}
|
||||
return target
|
||||
}
|
||||
|
||||
/**
|
||||
* * 自定义请求
|
||||
@@ -113,7 +87,7 @@ export const translateStr = (target: string | object) => {
|
||||
* @param globalParams 全局参数
|
||||
*/
|
||||
export const customizeHttp = (targetParams: RequestConfigType, globalParams: RequestGlobalConfigType) => {
|
||||
if (!targetParams || !globalParams) {
|
||||
if(!targetParams || !globalParams) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -151,17 +125,15 @@ export const customizeHttp = (targetParams: RequestConfigType, globalParams: Req
|
||||
}
|
||||
|
||||
// 处理头部
|
||||
let headers: RequestParamsObjType = {
|
||||
const headers: RequestParamsObjType = {
|
||||
...globalRequestParams.Header,
|
||||
...targetRequestParams.Header
|
||||
...targetRequestParams.Header,
|
||||
}
|
||||
headers = translateStr(headers)
|
||||
|
||||
// data 参数
|
||||
let data: RequestParamsObjType | FormData | string = {}
|
||||
// params 参数
|
||||
let params: RequestParamsObjType = { ...targetRequestParams.Params }
|
||||
params = translateStr(params)
|
||||
let params: RequestParamsObjType = targetRequestParams.Params
|
||||
// form 类型处理
|
||||
let formData: FormData = new FormData()
|
||||
formData.set('default', 'defaultData')
|
||||
@@ -173,35 +145,33 @@ export const customizeHttp = (targetParams: RequestConfigType, globalParams: Req
|
||||
|
||||
case RequestBodyEnum.JSON:
|
||||
headers['Content-Type'] = ContentTypeEnum.JSON
|
||||
data = translateStr(JSON.parse(targetRequestParams.Body['json']))
|
||||
data = JSON.parse(targetRequestParams.Body['json'])
|
||||
// json 赋值给 data
|
||||
break
|
||||
|
||||
case RequestBodyEnum.XML:
|
||||
headers['Content-Type'] = ContentTypeEnum.XML
|
||||
// xml 字符串赋值给 data
|
||||
data = translateStr(targetRequestParams.Body['xml'])
|
||||
data = targetRequestParams.Body['xml']
|
||||
break
|
||||
|
||||
case RequestBodyEnum.X_WWW_FORM_URLENCODED: {
|
||||
case RequestBodyEnum.X_WWW_FORM_URLENCODED:
|
||||
headers['Content-Type'] = ContentTypeEnum.FORM_URLENCODED
|
||||
const bodyFormData = targetRequestParams.Body['x-www-form-urlencoded']
|
||||
for (const i in bodyFormData) formData.set(i, translateStr(bodyFormData[i]))
|
||||
for (const i in bodyFormData) formData.set(i, bodyFormData[i])
|
||||
// FormData 赋值给 data
|
||||
data = formData
|
||||
break
|
||||
}
|
||||
|
||||
case RequestBodyEnum.FORM_DATA: {
|
||||
case RequestBodyEnum.FORM_DATA:
|
||||
headers['Content-Type'] = ContentTypeEnum.FORM_DATA
|
||||
const bodyFormUrlencoded = targetRequestParams.Body['form-data']
|
||||
for (const i in bodyFormUrlencoded) {
|
||||
formData.set(i, translateStr(bodyFormUrlencoded[i]))
|
||||
formData.set(i, bodyFormUrlencoded[i])
|
||||
}
|
||||
// FormData 赋值给 data
|
||||
data = formData
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// sql 处理
|
||||
@@ -210,17 +180,11 @@ export const customizeHttp = (targetParams: RequestConfigType, globalParams: Req
|
||||
data = requestSQLContent
|
||||
}
|
||||
|
||||
try {
|
||||
const url = (new Function("return `" + `${requestOriginUrl}${requestUrl}`.trim() + "`"))();
|
||||
return axiosInstance({
|
||||
url,
|
||||
method: requestHttpType,
|
||||
data,
|
||||
params,
|
||||
headers
|
||||
})
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
window['$message'].error('URL地址格式有误!')
|
||||
}
|
||||
return axiosInstance({
|
||||
url: `${requestOriginUrl}${requestUrl}`,
|
||||
method: requestHttpType,
|
||||
data,
|
||||
params,
|
||||
headers
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,199 +0,0 @@
|
||||
{
|
||||
"xAxis": [
|
||||
"12a",
|
||||
"1a",
|
||||
"2a",
|
||||
"3a",
|
||||
"4a",
|
||||
"5a",
|
||||
"6a",
|
||||
"7a",
|
||||
"8a",
|
||||
"9a",
|
||||
"10a",
|
||||
"11a",
|
||||
"12p",
|
||||
"1p",
|
||||
"2p",
|
||||
"3p",
|
||||
"4p",
|
||||
"5p",
|
||||
"6p",
|
||||
"7p",
|
||||
"8p",
|
||||
"9p",
|
||||
"10p",
|
||||
"11p"
|
||||
],
|
||||
"yAxis": ["Saturday", "Friday", "Thursday", "Wednesday", "Tuesday", "Monday", "Sunday"],
|
||||
"seriesData": [
|
||||
[0, 0, "@integer(0, 10)"],
|
||||
[1, 0, "@integer(0, 10)"],
|
||||
[2, 0, "-"],
|
||||
[3, 0, "-"],
|
||||
[4, 0, "-"],
|
||||
[5, 0, "-"],
|
||||
[6, 0, "-"],
|
||||
[7, 0, "-"],
|
||||
[8, 0, "-"],
|
||||
[9, 0, "-"],
|
||||
[10, 0, "-"],
|
||||
[11, 0, "@integer(0, 10)"],
|
||||
[12, 0, "@integer(0, 10)"],
|
||||
[13, 0, "@integer(0, 10)"],
|
||||
[14, 0, "@integer(0, 10)"],
|
||||
[15, 0, "@integer(0, 10)"],
|
||||
[16, 0, "@integer(0, 10)"],
|
||||
[17, 0, "@integer(0, 10)"],
|
||||
[18, 0, "@integer(0, 10)"],
|
||||
[19, 0, "@integer(0, 10)"],
|
||||
[20, 0, "@integer(0, 10)"],
|
||||
[21, 0, "@integer(0, 10)"],
|
||||
[22, 0, "@integer(0, 10)"],
|
||||
[23, 0, "@integer(0, 10)"],
|
||||
[0, 1, 7],
|
||||
[1, 1, "-"],
|
||||
[2, 1, "-"],
|
||||
[3, 1, "-"],
|
||||
[4, 1, "-"],
|
||||
[5, 1, "-"],
|
||||
[6, 1, "-"],
|
||||
[7, 1, "-"],
|
||||
[8, 1, "-"],
|
||||
[9, 1, "-"],
|
||||
[10, 1, "@integer(0, 10)"],
|
||||
[11, 1, "@integer(0, 10)"],
|
||||
[12, 1, "@integer(0, 10)"],
|
||||
[13, 1, "@integer(0, 10)"],
|
||||
[14, 1, "@integer(0, 10)"],
|
||||
[15, 1, "@integer(0, 10)"],
|
||||
[16, 1, "@integer(0, 10)"],
|
||||
[17, 1, "@integer(0, 10)"],
|
||||
[18, 1, "@integer(0, 10)"],
|
||||
[19, 1, "@integer(0, 10)"],
|
||||
[20, 1, "@integer(0, 10)"],
|
||||
[21, 1, "@integer(0, 10)"],
|
||||
[22, 1, "@integer(0, 10)"],
|
||||
[23, 1, "@integer(0, 10)"],
|
||||
[0, 2, 1],
|
||||
[1, 2, 1],
|
||||
[2, 2, "-"],
|
||||
[3, 2, "-"],
|
||||
[4, 2, "-"],
|
||||
[5, 2, "-"],
|
||||
[6, 2, "-"],
|
||||
[7, 2, "-"],
|
||||
[8, 2, "-"],
|
||||
[9, 2, "-"],
|
||||
[10, 2, "@integer(0, 10)"],
|
||||
[11, 2, "@integer(0, 10)"],
|
||||
[12, 2, "@integer(0, 10)"],
|
||||
[13, 2, "@integer(0, 10)"],
|
||||
[14, 2, "@integer(0, 10)"],
|
||||
[15, 2, "@integer(0, 10)"],
|
||||
[16, 2, "@integer(0, 10)"],
|
||||
[17, 2, "@integer(0, 10)"],
|
||||
[18, 2, "@integer(0, 10)"],
|
||||
[19, 2, "@integer(0, 10)"],
|
||||
[20, 2, "@integer(0, 10)"],
|
||||
[21, 2, "@integer(0, 10)"],
|
||||
[22, 2, "@integer(0, 10)"],
|
||||
[23, 2, "@integer(0, 10)"],
|
||||
[0, 3, 7],
|
||||
[1, 3, 3],
|
||||
[2, 3, "-"],
|
||||
[3, 3, "-"],
|
||||
[4, 3, "-"],
|
||||
[5, 3, "-"],
|
||||
[6, 3, "-"],
|
||||
[7, 3, "-"],
|
||||
[8, 3, 1],
|
||||
[9, 3, "-"],
|
||||
[10, 3, "@integer(0, 10)"],
|
||||
[11, 3, "@integer(0, 10)"],
|
||||
[12, 3, "@integer(0, 10)"],
|
||||
[13, 3, "@integer(0, 10)"],
|
||||
[14, 3, "@integer(0, 10)"],
|
||||
[15, 3, "@integer(0, 10)"],
|
||||
[16, 3, "@integer(0, 10)"],
|
||||
[17, 3, "@integer(0, 10)"],
|
||||
[18, 3, "@integer(0, 10)"],
|
||||
[19, 3, "@integer(0, 10)"],
|
||||
[20, 3, "@integer(0, 10)"],
|
||||
[21, 3, "@integer(0, 10)"],
|
||||
[22, 3, "@integer(0, 10)"],
|
||||
[23, 3, "@integer(0, 10)"],
|
||||
[0, 4, "@integer(0, 10)"],
|
||||
[1, 4, "@integer(0, 10)"],
|
||||
[2, 4, "-"],
|
||||
[3, 4, "-"],
|
||||
[4, 4, "-"],
|
||||
[5, 4, "@integer(0, 10)"],
|
||||
[6, 4, "-"],
|
||||
[7, 4, "-"],
|
||||
[8, 4, "-"],
|
||||
[9, 4, "@integer(0, 10)"],
|
||||
[10, 4, "@integer(0, 10)"],
|
||||
[11, 4, "@integer(0, 10)"],
|
||||
[12, 4, "@integer(0, 10)"],
|
||||
[13, 4, "@integer(0, 10)"],
|
||||
[14, 4, "@integer(0, 10)"],
|
||||
[15, 4, "@integer(0, 10)"],
|
||||
[16, 4, "@integer(0, 10)"],
|
||||
[17, 4, "@integer(0, 10)"],
|
||||
[18, 4, "@integer(0, 10)"],
|
||||
[19, 4, "@integer(0, 10)"],
|
||||
[20, 4, "@integer(0, 10)"],
|
||||
[21, 4, "@integer(0, 10)"],
|
||||
[22, 4, "@integer(0, 10)"],
|
||||
[23, 4, "-"],
|
||||
[0, 5, "@integer(0, 10)"],
|
||||
[1, 5, "@integer(0, 10)"],
|
||||
[2, 5, "-"],
|
||||
[3, 5, "@integer(0, 10)"],
|
||||
[4, 5, "-"],
|
||||
[5, 5, "-"],
|
||||
[6, 5, "-"],
|
||||
[7, 5, "-"],
|
||||
[8, 5, "@integer(0, 10)"],
|
||||
[9, 5, "-"],
|
||||
[10, 5, "@integer(0, 10)"],
|
||||
[11, 5, "@integer(0, 10)"],
|
||||
[12, 5, "@integer(0, 10)"],
|
||||
[13, 5, "@integer(0, 10)"],
|
||||
[14, 5, "@integer(0, 10)"],
|
||||
[15, 5, "@integer(0, 10)"],
|
||||
[16, 5, "@integer(0, 10)"],
|
||||
[17, 5, "@integer(0, 10)"],
|
||||
[18, 5, "-"],
|
||||
[19, 5, "@integer(0, 10)"],
|
||||
[20, 5, "@integer(0, 10)"],
|
||||
[21, 5, "@integer(0, 10)"],
|
||||
[22, 5, "@integer(0, 10)"],
|
||||
[23, 5, "-"],
|
||||
[0, 6, "@integer(0, 10)"],
|
||||
[1, 6, "-"],
|
||||
[2, 6, "-"],
|
||||
[3, 6, "-"],
|
||||
[4, 6, "-"],
|
||||
[5, 6, "-"],
|
||||
[6, 6, "-"],
|
||||
[7, 6, "-"],
|
||||
[8, 6, "-"],
|
||||
[9, 6, "-"],
|
||||
[10, 6, "@integer(0, 10)"],
|
||||
[11, 6, "-"],
|
||||
[12, 6, "@integer(0, 10)"],
|
||||
[13, 6, "@integer(0, 10)"],
|
||||
[14, 6, "@integer(0, 10)"],
|
||||
[15, 6, "@integer(0, 10)"],
|
||||
[16, 6, "-"],
|
||||
[17, 6, "-"],
|
||||
[18, 6, "-"],
|
||||
[19, 6, "-"],
|
||||
[20, 6, "@integer(0, 10)"],
|
||||
[21, 6, "@integer(0, 10)"],
|
||||
[22, 6, "@integer(0, 10)"],
|
||||
[23, 6, "@integer(0, 10)"]
|
||||
]
|
||||
}
|
||||
@@ -4,20 +4,12 @@ import { RequestHttpEnum } from '@/enums/httpEnum'
|
||||
|
||||
// 单个X数据
|
||||
export const chartDataUrl = '/mock/chartData'
|
||||
export const chartSingleDataUrl = '/mock/chartSingleData'
|
||||
export const numberFloatUrl = '/mock/number/float'
|
||||
export const numberIntUrl = '/mock/number/int'
|
||||
export const textUrl = '/mock/text'
|
||||
export const imageUrl = '/mock/image'
|
||||
export const rankListUrl = '/mock/rankList'
|
||||
export const scrollBoardUrl = '/mock/scrollBoard'
|
||||
export const radarUrl = '/mock/radarData'
|
||||
export const heatMapUrl = '/mock/heatMapData'
|
||||
export const scatterBasicUrl = '/mock/scatterBasic'
|
||||
export const mapUrl = '/mock/map'
|
||||
export const wordCloudUrl = '/mock/wordCloud'
|
||||
export const treemapUrl = '/mock/treemap'
|
||||
export const threeEarth01Url = '/mock/threeEarth01Data'
|
||||
|
||||
const mockObject: MockMethod[] = [
|
||||
{
|
||||
@@ -27,11 +19,6 @@ const mockObject: MockMethod[] = [
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchMockData
|
||||
},
|
||||
{
|
||||
url: chartSingleDataUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchMockSingleData
|
||||
},
|
||||
{
|
||||
url: numberFloatUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
@@ -61,42 +48,7 @@ const mockObject: MockMethod[] = [
|
||||
url: scrollBoardUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchScrollBoard
|
||||
},
|
||||
{
|
||||
url: radarUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchRadar
|
||||
},
|
||||
{
|
||||
url: heatMapUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchHeatmap
|
||||
},
|
||||
{
|
||||
url: scatterBasicUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchScatterBasic
|
||||
},
|
||||
{
|
||||
url: mapUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchMap
|
||||
},
|
||||
{
|
||||
url: wordCloudUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchWordCloud
|
||||
},
|
||||
{
|
||||
url: treemapUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchTreemap
|
||||
},
|
||||
{
|
||||
url: threeEarth01Url,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.threeEarth01Data
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
export default mockObject
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
{
|
||||
"point": [
|
||||
{
|
||||
"name": "北京",
|
||||
"value": [116.405285, 39.904989, 200]
|
||||
},
|
||||
{
|
||||
"name": "郑州",
|
||||
"value": [113.665412, 34.757975, 888]
|
||||
},
|
||||
{
|
||||
"name": "青海",
|
||||
"value": [101.778916, 36.623178, 666]
|
||||
},
|
||||
{
|
||||
"name": "宁夏回族自治区",
|
||||
"value": [106.278179, 38.46637, 66]
|
||||
},
|
||||
{
|
||||
"name": "哈尔滨市",
|
||||
"value": [126.642464, 45.756967, 101]
|
||||
}
|
||||
],
|
||||
"map": [
|
||||
{
|
||||
"name": "北京市",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
{
|
||||
"name": "河北省",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "江苏省",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
{
|
||||
"name": "福建省",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
{
|
||||
"name": "山东省",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
{
|
||||
"name": "河南省",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
{
|
||||
"name": "湖北省",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
{
|
||||
"name": "广西壮族自治区",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
{
|
||||
"name": "海南省",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
{
|
||||
"name": "青海省",
|
||||
"value": "@integer(0, 1000)"
|
||||
},
|
||||
{
|
||||
"name": "新疆维吾尔自治区",
|
||||
"value": "@integer(0, 1000)"
|
||||
}
|
||||
],
|
||||
"pieces": [
|
||||
{ "gte": 1000, "label": ">1000" },
|
||||
{ "gte": 600, "lte": 999, "label": "600-999" },
|
||||
{ "gte": 200, "lte": 599, "label": "200-599" },
|
||||
{ "gte": 50, "lte": 199, "label": "49-199" },
|
||||
{ "gte": 10, "lte": 49, "label": "10-49" },
|
||||
{ "lte": 9, "label": "<9" }
|
||||
]
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
[
|
||||
{
|
||||
"dimensions": ["data1"],
|
||||
"source": [
|
||||
[10.0, "@integer(0, 100)"],
|
||||
[8.07, "@integer(0, 100)"],
|
||||
[13.0, "@integer(0, 100)"],
|
||||
[9.05, "@integer(0, 100)"],
|
||||
[11.0, "@integer(0, 100)"],
|
||||
[14.0, "@integer(0, 100)"],
|
||||
[13.4, "@integer(0, 100)"],
|
||||
[10.0, "@integer(0, 100)"],
|
||||
[14.0, "@integer(0, 100)"],
|
||||
[12.5, "@integer(0, 100)"],
|
||||
[9.15, "@integer(0, 100)"],
|
||||
[11.5, "@integer(0, 100)"],
|
||||
[3.03, "@integer(0, 100)"],
|
||||
[12.2, "@integer(0, 100)"],
|
||||
[2.02, "@integer(0, 100)"],
|
||||
[1.05, "@integer(0, 100)"],
|
||||
[4.05, "@integer(0, 100)"],
|
||||
[6.03, "@integer(0, 100)"],
|
||||
[12.0, "@integer(0, 100)"],
|
||||
[12.0, "@integer(0, 100)"],
|
||||
[7.08, "@integer(0, 100)"],
|
||||
[5.02, "@integer(0, 100)"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"dimensions": ["data2"],
|
||||
"source": [
|
||||
[10.0, "@integer(0, 70)"],
|
||||
[8.07, "@integer(0, 70)"],
|
||||
[13.0, "@integer(0, 70)"],
|
||||
[9.05, "@integer(0, 70)"],
|
||||
[11.0, "@integer(0, 70)"],
|
||||
[14.0, "@integer(0, 70)"],
|
||||
[13.4, "@integer(0, 70)"],
|
||||
[10.0, "@integer(0, 70)"],
|
||||
[14.0, "@integer(0, 70)"],
|
||||
[12.5, "@integer(0, 70)"],
|
||||
[9.15, "@integer(0, 70)"],
|
||||
[11.5, "@integer(0, 70)"],
|
||||
[3.03, "@integer(0, 70)"],
|
||||
[12.2, "@integer(0, 70)"],
|
||||
[2.02, "@integer(0, 70)"],
|
||||
[1.05, "@integer(0, 70)"],
|
||||
[4.05, "@integer(0, 70)"],
|
||||
[6.03, "@integer(0, 70)"],
|
||||
[12.0, "@integer(0, 70)"],
|
||||
[12.0, "@integer(0, 70)"],
|
||||
[7.08, "@integer(0, 70)"],
|
||||
[5.02, "@integer(0, 70)"]
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1,44 +1,4 @@
|
||||
import heatmapJson from './heatMapData.json'
|
||||
import scatterJson from './scatter.json'
|
||||
import mapJson from './map.json'
|
||||
import tTreemapJson from './treemap.json'
|
||||
|
||||
export default {
|
||||
// 单图表
|
||||
fetchMockSingleData: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: {
|
||||
dimensions: ['product', 'dataOne'],
|
||||
source: [
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|0-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|0-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|0-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|0-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|0-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|0-900': 3
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
// 图表
|
||||
fetchMockData: {
|
||||
code: 0,
|
||||
@@ -119,156 +79,29 @@ export default {
|
||||
['行10列1', '行10列2', '行10列3']
|
||||
]
|
||||
},
|
||||
// 获取数字-浮点型
|
||||
// 获取数字
|
||||
fetchNumberFloat: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: '@float(0, 0.99, 1, 4)'
|
||||
},
|
||||
// 获取数字-整型
|
||||
fetchNumberInt: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: '@integer(0, 100)'
|
||||
},
|
||||
// 文字
|
||||
fetchText: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: '@paragraph(1, 10)'
|
||||
},
|
||||
// 图片
|
||||
fetchImage: (num: number) => ({
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: `https://robohash.org/${num}`
|
||||
}),
|
||||
// 雷达
|
||||
fetchRadar: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: {
|
||||
radarIndicator: [
|
||||
{ name: '@name', max: 10000 },
|
||||
{ name: '@name', max: 10000 },
|
||||
{ name: '@name', max: 10000 },
|
||||
{ name: '@name', max: 10000 },
|
||||
{ name: '@name', max: 10000 },
|
||||
{ name: '@name', max: 10000 }
|
||||
],
|
||||
seriesData: [
|
||||
{
|
||||
value: [
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)'
|
||||
],
|
||||
name: 'data1'
|
||||
},
|
||||
{
|
||||
value: [
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)',
|
||||
'@integer(0, 10000)'
|
||||
],
|
||||
name: 'data2'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
// 热力图
|
||||
fetchHeatmap: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: heatmapJson
|
||||
},
|
||||
// 散点图
|
||||
fetchScatterBasic: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: scatterJson
|
||||
},
|
||||
// 中国地图
|
||||
fetchMap: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: mapJson
|
||||
},
|
||||
// 词云
|
||||
fetchWordCloud: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: [
|
||||
{
|
||||
name: '@name',
|
||||
value: 8000,
|
||||
textStyle: {
|
||||
color: '#78fbb2'
|
||||
},
|
||||
emphasis: {
|
||||
textStyle: {
|
||||
color: 'red'
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' },
|
||||
{ name: '@name', value: '@integer(10, 8000)' }
|
||||
]
|
||||
},
|
||||
// 树图
|
||||
fetchTreemap: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: tTreemapJson
|
||||
},
|
||||
// 三维地球
|
||||
threeEarth01Data: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: [
|
||||
{
|
||||
startArray: { name: '@name', N: '@integer(10, 100)', E: '@integer(10, 100)' },
|
||||
endArray: [
|
||||
{ name: '@name', N: '@integer(10, 100)', E: '@integer(10, 100)' },
|
||||
{ name: '@name', N: '@integer(10, 100)', E: '@integer(10, 100)' },
|
||||
{ name: '@name', N: '@integer(10, 100)', E: '@integer(10, 100)' },
|
||||
{ name: '@name', N: '@integer(10, 100)', E: '@integer(10, 100)' }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 1000)",
|
||||
"children": [
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 500)"
|
||||
},
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 500)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 1000)",
|
||||
"children": [
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 00)"
|
||||
},
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 500)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 1000)",
|
||||
"children": [
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 1000)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 1000)",
|
||||
"children": [
|
||||
{
|
||||
"name": "@name",
|
||||
"value": "@integer(0, 1000)"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/images/chart/charts/bar_y2.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 20 KiB |
BIN
src/assets/images/chart/charts/line_gradient2.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 21 KiB |
BIN
src/assets/images/chart/charts/map_logo.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 14 KiB |
BIN
src/assets/images/chart/charts/point.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 20 KiB |
BIN
src/assets/images/chart/charts/static.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 27 KiB |
BIN
src/assets/images/chart/decorates/material_dynamic.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/images/chart/decorates/material_static.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 176 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 22 KiB |
BIN
src/assets/images/chart/decorates/weather.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/images/chart/decorates/weather_time.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 22 KiB |
BIN
src/assets/images/chart/informations/text_carousel.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 7.8 KiB |
BIN
src/assets/images/chart/informations/title_diamond.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/images/chart/informations/title_diamond2.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
src/assets/images/chart/informations/title_main.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 22 KiB |
BIN
src/assets/images/chart/tables/tables.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
src/assets/images/chart/tables/tables_categary.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
@@ -1,146 +0,0 @@
|
||||
|
||||
/**
|
||||
* 后端接口,相关功能对应表:
|
||||
* 登录 - login
|
||||
* 登出 - logout
|
||||
* 预览,token 注入或单点登陆 - checkToken
|
||||
* 显示项目列表和分页 - projectList
|
||||
* 保存、发布、修改名称 - updateProject
|
||||
* 复制项目 - copyProject
|
||||
* 图表内的图片上传 - uploadFile
|
||||
* 上传图片显示处理 - getFileUrl
|
||||
* 所有接口返回格式:MyResponseType
|
||||
*/
|
||||
import { IndexDbBackend } from "./indexdb/indexdbbackend";
|
||||
// import { PythonBackend } from "./python/pythonbackend";
|
||||
|
||||
export interface MyResponseType {
|
||||
code: number; // 状态:200 表示接口调用成功,参考:HttpEnum
|
||||
msg: string; // 提示信息,配合 data 和 code
|
||||
data: any; // data = null 表示接口结果错误,错误原因放在 msg
|
||||
}
|
||||
|
||||
export class MyResponse implements MyResponseType {
|
||||
code: number = 200;
|
||||
msg: string = "";
|
||||
data: any = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 实现 IBackend 后端接口
|
||||
* 错误处理:
|
||||
*/
|
||||
export interface IBackend {
|
||||
/**
|
||||
* 初始化后端系统,测试后端连接,oss地址等
|
||||
* @param data 可选,备用
|
||||
*/
|
||||
init(data:any):any
|
||||
|
||||
/**
|
||||
* 登陆
|
||||
* @param data {} .username .password
|
||||
* @return MyResponseType
|
||||
* .data 须包含:
|
||||
* token:{tokenValue:"", tokenName:""},
|
||||
* userinfo:{nickname:"", username: "", id: 用户ID}
|
||||
* 错误处理:
|
||||
* 1 接口错误 .code 不为 200 .msg 可选,后端反馈错误信息
|
||||
* 2 登陆错误 .code=200 .data = null, msg 可选,反馈不能登陆的原因
|
||||
* 登陆信息.data 记录:
|
||||
* setLocalStorage(GO_LOGIN_INFO_STORE, res.data)
|
||||
*/
|
||||
login(data:any):any
|
||||
|
||||
/**
|
||||
* 通知后端登出
|
||||
*/
|
||||
logout():any
|
||||
|
||||
/**
|
||||
* 检查Token是否有效,配合预览页面和单点登陆,备用
|
||||
* @param data {tokenValue, tokenName}
|
||||
* @return 同 login()
|
||||
*/
|
||||
checkToken(data:any):any
|
||||
|
||||
/**
|
||||
* 项目列表
|
||||
* @param data {} .page, .limit
|
||||
* @return [项目],字段名称需要进行 map
|
||||
* id: projectId
|
||||
* title:projectName
|
||||
* release,
|
||||
* label:remarks
|
||||
* image:indexImage 如果需要挂刷新,在这里处理。如果需要拼接 url(getFileUrl),也在这里处理好。
|
||||
*/
|
||||
projectList(data:any):any
|
||||
|
||||
/**
|
||||
* 新增项目
|
||||
* @param data
|
||||
* .projectName
|
||||
* @return id 新项目 ID
|
||||
*/
|
||||
createProject(data: any):any
|
||||
|
||||
/**
|
||||
* 获取项目
|
||||
* @param data .projectId
|
||||
* @return
|
||||
id:projectId
|
||||
projectName,
|
||||
state: release,
|
||||
remarks,
|
||||
content
|
||||
*/
|
||||
fetchProject(data: any):any
|
||||
|
||||
/**
|
||||
* 修改项目
|
||||
* @param data
|
||||
* .projectId 必须
|
||||
* .projectName 可选
|
||||
* .release 可选
|
||||
* .content 可选
|
||||
* .object File 可选 对象
|
||||
* .remarks 可选
|
||||
* @return
|
||||
*/
|
||||
updateProject(data: any):any
|
||||
|
||||
/**
|
||||
* 复制项目
|
||||
* @param data
|
||||
* .copyId 需要复制的项目ID
|
||||
* .projectName
|
||||
* @return id 新项目ID
|
||||
*/
|
||||
copyProject(data: any):any
|
||||
|
||||
/**
|
||||
* 删除项目
|
||||
* @param data
|
||||
* .projectId
|
||||
* @return
|
||||
*/
|
||||
deleteProject(data: any):any
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
* @param file File 图片对象
|
||||
* @param params 备用 Todo: 上传文件可带上项目ID和其他附加信息,以便后端文件管理
|
||||
* @return .uri 文件对象 uri。建议在图表中保存相对地址,通过 getFileUrl 得到完整地址
|
||||
*/
|
||||
uploadFile(file: File, params: any):any
|
||||
/**
|
||||
* 文件地址转换,处理 uploadFile 的返回地址。如果是绝对地址,可以不处理
|
||||
* @param uploadUri 上传返回的 uri
|
||||
* @return 供 image.src 使用的地址信息
|
||||
*/
|
||||
getFileUrl(uploadUri:string):string
|
||||
}
|
||||
|
||||
export const BackEndFactory = new IndexDbBackend();
|
||||
// export const BackEndFactory = new MockBackend();
|
||||
// export const BackEndFactory = new PythonBackend();
|
||||
@@ -1,147 +0,0 @@
|
||||
/**
|
||||
* IndexDb 帮助类
|
||||
*/
|
||||
|
||||
const win: { [k: string]: any } = window || globalThis;
|
||||
const indexedDB =
|
||||
win.indexedDB || win.mozIndexedDB || win.webkitIndexedDB || win.msIndexedDB;
|
||||
const dbs: { [k: string]: IDBDatabase } = {};
|
||||
let databaseName: string;
|
||||
let request: IDBOpenDBRequest;
|
||||
interface AnyEvent {
|
||||
[k: string]: any;
|
||||
}
|
||||
|
||||
export interface TableOption {
|
||||
storeName: string;
|
||||
option: { [K: string]: any };
|
||||
index: { [K: string]: any }[];
|
||||
}
|
||||
|
||||
export const createDB = (
|
||||
name: string,
|
||||
version?: string,
|
||||
options?: TableOption[],
|
||||
) =>
|
||||
new Promise<IDBDatabase>((resolve, reject) => {
|
||||
if (!indexedDB) reject('浏览器不支持indexedDB');
|
||||
databaseName = name;
|
||||
if (dbs?.[name]) {
|
||||
resolve(dbs[name]);
|
||||
return;
|
||||
}
|
||||
request = indexedDB.open(name, version);
|
||||
createTable(options)?.then((db: IDBDatabase) => resolve(db));
|
||||
request.onsuccess = (event: AnyEvent) => {
|
||||
// IDBDatabase
|
||||
const db = event.target.result;
|
||||
// 缓存起来
|
||||
dbs[name] = db;
|
||||
resolve(db);
|
||||
};
|
||||
request.onerror = (event: AnyEvent) => reject(event);
|
||||
});
|
||||
|
||||
export const createTable = (options?: TableOption[]) => {
|
||||
if (!options) return;
|
||||
return new Promise<IDBDatabase>((resolve) => {
|
||||
request.onupgradeneeded = (event: AnyEvent) => {
|
||||
const db = event.target.result;
|
||||
dbs[databaseName] = db;
|
||||
for (const i in options) {
|
||||
// 判断是否存在表
|
||||
if (!db.objectStoreNames.contains(options[i].storeName)) {
|
||||
const objectStore = db.createObjectStore(
|
||||
options[i].storeName,
|
||||
options[i].option,
|
||||
);
|
||||
for (const j of options[i].index) {
|
||||
objectStore.createIndex(j.name, j.keyPath, {
|
||||
unique: j.unique,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
resolve(db);
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
const getTransaction = async (name: string, version?: string) => {
|
||||
let db: IDBDatabase;
|
||||
// 先从缓存获取
|
||||
if (dbs[databaseName]) {
|
||||
db = dbs[databaseName];
|
||||
} else {
|
||||
db = await createDB(databaseName, version);
|
||||
}
|
||||
return db.transaction(name, 'readwrite');
|
||||
};
|
||||
|
||||
const getObjectStore = async (
|
||||
name: string,
|
||||
version?: string,
|
||||
): Promise<IDBObjectStore> => {
|
||||
const transaction = await getTransaction(name, version);
|
||||
return transaction.objectStore(name);
|
||||
};
|
||||
|
||||
const getStore = (name: string, type: string, data: any) =>
|
||||
new Promise<IDBDatabase>((resolve) => {
|
||||
getObjectStore(name).then((objectStore: IDBObjectStore | any) => {
|
||||
const request = objectStore[type](data);
|
||||
request.onsuccess = (event: AnyEvent) =>
|
||||
resolve(event.target.result);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
const findStore = (
|
||||
name: string,
|
||||
start: any,
|
||||
end: any,
|
||||
startInclude: any,
|
||||
endInclude: any,
|
||||
) =>
|
||||
new Promise<IDBDatabase>((resolve, reject) => {
|
||||
getObjectStore(name).then((objectStore: IDBObjectStore) => {
|
||||
const request = objectStore.openCursor(
|
||||
IDBKeyRange.bound(start, end, startInclude, endInclude),
|
||||
);
|
||||
request.onsuccess = (event: AnyEvent) =>
|
||||
resolve(event.target.result);
|
||||
request.onerror = (event: AnyEvent) => reject(event);
|
||||
});
|
||||
});
|
||||
|
||||
export interface DBSelect {
|
||||
add: (data: any) => Promise<IDBDatabase>;
|
||||
get: (data: any) => Promise<IDBDatabase>;
|
||||
getAll: () => Promise<IDBDatabase>;
|
||||
del: (data: any) => Promise<IDBDatabase>;
|
||||
clear: (data: any) => Promise<IDBDatabase>;
|
||||
put: (data: any) => Promise<IDBDatabase>;
|
||||
find: (
|
||||
start: any,
|
||||
end: any,
|
||||
startInclude: any,
|
||||
endInclude: any,
|
||||
) => Promise<IDBDatabase>;
|
||||
}
|
||||
// 获取一个store
|
||||
export const onDBSelect = async (
|
||||
name: string,
|
||||
version: string
|
||||
): Promise<DBSelect> => {
|
||||
const add = (data: any) => getStore(name, 'add', data);
|
||||
const get = (data: any) => getStore(name, 'get', data);
|
||||
const getAll = () => getStore(name, 'getAll', null);
|
||||
const del = (data: any) => getStore(name, 'delete', data);
|
||||
const clear = (data: any) => getStore(name, 'clear', data);
|
||||
const put = (data: any) => getStore(name, 'put', data);
|
||||
const find = (start: any, end: any, startInclude: any, endInclude: any) =>
|
||||
findStore(name, start, end, startInclude, endInclude);
|
||||
const options: DBSelect = { add, get, getAll, clear, del, put, find };
|
||||
getObjectStore(name, version);
|
||||
return options;
|
||||
};
|
||||
@@ -1,155 +0,0 @@
|
||||
import { MyResponse, IBackend } from '../ibackend'
|
||||
import { createDB, DBSelect, onDBSelect } from '../indexdb/indexdb'
|
||||
import { fileToUrl, fileToBlob } from "@/utils"
|
||||
|
||||
const PROJECT_TABLE = "project"
|
||||
const IMAGE_TABLE = "image" // 保存图片,未实现,Todo
|
||||
const DB_NAME = "goview"
|
||||
const DB_VER = "1"
|
||||
|
||||
export class IndexDbBackend implements IBackend {
|
||||
public async init(data: any) {
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
const db:IDBDatabase = await createDB(DB_NAME, DB_VER, [
|
||||
{
|
||||
storeName: PROJECT_TABLE,
|
||||
option: {
|
||||
keyPath: "projectId", autoIncrement:true
|
||||
},
|
||||
index: [
|
||||
{name: 'projectId', keyPath: "projectId", unique: true},
|
||||
{name: 'projectName', keyPath: "projectName", unique: false},
|
||||
{name: 'release', keyPath: "release", unique: false},
|
||||
{name: 'remarks', keyPath: "remarks", unique: false},
|
||||
{name: 'content', keyPath: "content", unique: false},
|
||||
{name: 'indexImage', keyPath: "indexImage", unique: false}
|
||||
]
|
||||
}
|
||||
])
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async login(data:any) {
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
if(data.password == "123456" && data.username == "admin"){
|
||||
rtn.data = {
|
||||
token:{tokenValue:"mockToken", tokenName:"name"},
|
||||
userinfo:{nickname:"nickname", username:data.username, id:1}
|
||||
}
|
||||
}else{
|
||||
rtn.data = null
|
||||
rtn.msg = "admin 和 123456"
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async logout() {
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async checkToken(data: any) {
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
console.log("CheckToken: " + data.token)
|
||||
rtn.data = {
|
||||
token:{tokenValue:"mockToken", tokenName:"name"},
|
||||
userinfo:{nickname:"nickname", username:data.username, id:1}
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async projectList(data:any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
const db:DBSelect = await onDBSelect(PROJECT_TABLE, DB_VER)
|
||||
const r:any = await db.getAll()
|
||||
rtn.data = []
|
||||
r.map(function (item: any) {
|
||||
let url = ""
|
||||
if(item.indexImage){
|
||||
const Url = URL || window.URL || window.webkitURL
|
||||
url = Url.createObjectURL(item.indexImage)
|
||||
}
|
||||
rtn.data.push({
|
||||
id: item.projectId,
|
||||
title: item.projectName,
|
||||
release: item.release == 1,
|
||||
label:item.remarks,
|
||||
image:url
|
||||
})
|
||||
})
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async createProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
const db:DBSelect = await onDBSelect(PROJECT_TABLE, DB_VER)
|
||||
rtn.data.id = await db.add({ projectName:data.projectName })
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async fetchProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
const db:DBSelect = await onDBSelect(PROJECT_TABLE, DB_VER)
|
||||
const r:any = await db.get(parseInt(data.projectId))
|
||||
rtn.data = {
|
||||
id:r.projectId,
|
||||
projectName: r.projectName,
|
||||
state: r.release,
|
||||
remarks: r.remarks,
|
||||
content: r.content
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async updateProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
const db:DBSelect = await onDBSelect(PROJECT_TABLE, DB_VER)
|
||||
const row:any = await db.get(parseInt(data.projectId))
|
||||
if("content" in data) row.content = data.content
|
||||
if("projectName" in data) row.projectName = data.projectName
|
||||
if("release" in data) row.release = data.release
|
||||
if("remarks" in data) row.remarks = data.remarks
|
||||
if("object" in data) {
|
||||
row.indexImage = await fileToBlob(data.object)
|
||||
}
|
||||
await db.put(row)
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async copyProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
const db:DBSelect = await onDBSelect(PROJECT_TABLE, DB_VER)
|
||||
const row:any = await db.get(parseInt(data.copyId))
|
||||
rtn.data.id =await db.add({
|
||||
projectName:data.projectName,
|
||||
content:row.content,
|
||||
indexImage:row.indexImage,
|
||||
remarks:row.remarks
|
||||
})
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async deleteProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
const db:DBSelect = await onDBSelect(PROJECT_TABLE, DB_VER)
|
||||
await db.del(parseInt(data.projectId))
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async changeProjectRelease(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async uploadFile(data: File, params:any){
|
||||
// Todo: 图片可以保存在表中
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
rtn.data.uri = fileToUrl(data)
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public getFileUrl(uploadUri:string){
|
||||
return uploadUri;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
import axios, { AxiosResponse, AxiosRequestConfig } from 'axios'
|
||||
import { ResultEnum } from "@/enums/httpEnum"
|
||||
import { PageEnum, ErrorPageNameMap } from "@/enums/pageEnum"
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
import { axiosPre } from '@/settings/httpSetting'
|
||||
import { SystemStoreEnum, SystemStoreUserInfoEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
import { redirectErrorPage, getLocalStorage, routerTurnByName, httpErrorHandle } from '@/utils'
|
||||
import { fetchAllowList } from './axios.config'
|
||||
import includes from 'lodash/includes'
|
||||
|
||||
const axiosInstance = axios.create({
|
||||
baseURL: `${import.meta.env.PROD ? import.meta.env.VITE_PRO_PATH : ''}${axiosPre}`,
|
||||
timeout: ResultEnum.TIMEOUT,
|
||||
})
|
||||
|
||||
axiosInstance.interceptors.request.use(
|
||||
(config: AxiosRequestConfig) => {
|
||||
// 白名单校验
|
||||
if (includes(fetchAllowList, config.url)) return config
|
||||
// 获取 token
|
||||
const info = getLocalStorage(StorageEnum.GO_SYSTEM_STORE)
|
||||
// 重新登录
|
||||
if (!info) {
|
||||
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
|
||||
return config
|
||||
}
|
||||
const userInfo = info[SystemStoreEnum.USER_INFO]
|
||||
config.headers = {
|
||||
...config.headers,
|
||||
[userInfo[SystemStoreUserInfoEnum.TOKEN_NAME] || 'token']: userInfo[SystemStoreUserInfoEnum.USER_TOKEN] || ''
|
||||
}
|
||||
return config
|
||||
},
|
||||
(err: AxiosRequestConfig) => {
|
||||
Promise.reject(err)
|
||||
}
|
||||
)
|
||||
|
||||
// 响应拦截器
|
||||
axiosInstance.interceptors.response.use(
|
||||
(res: AxiosResponse) => {
|
||||
const { code } = res.data as { code: number }
|
||||
|
||||
// 成功
|
||||
if (code === ResultEnum.SUCCESS) {
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
|
||||
// 登录过期
|
||||
if (code === ResultEnum.TOKEN_OVERDUE) {
|
||||
window['$message'].error(window['$t']('http.token_overdue_message'))
|
||||
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
|
||||
// 固定错误码重定向
|
||||
if (ErrorPageNameMap.get(code)) {
|
||||
redirectErrorPage(code)
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
|
||||
// 提示错误
|
||||
window['$message'].error(window['$t']((res.data as any).msg))
|
||||
return Promise.resolve(res.data)
|
||||
},
|
||||
(err: AxiosResponse) => {
|
||||
Promise.reject(err)
|
||||
}
|
||||
)
|
||||
|
||||
export default axiosInstance
|
||||
@@ -1,226 +0,0 @@
|
||||
import axiosInstance from './axios'
|
||||
import {
|
||||
RequestHttpEnum,
|
||||
ContentTypeEnum,
|
||||
RequestBodyEnum,
|
||||
RequestDataTypeEnum,
|
||||
RequestContentTypeEnum,
|
||||
RequestParamsObjType
|
||||
} from '@/enums/httpEnum'
|
||||
import type { RequestGlobalConfigType, RequestConfigType } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
|
||||
export const get = (url: string, params?: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.GET,
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
export const post = (url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.POST,
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': headersType || ContentTypeEnum.JSON
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const patch = (url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.PATCH,
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': headersType || ContentTypeEnum.JSON
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const put = (url: string, data?: object, headersType?: ContentTypeEnum) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.PUT,
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': headersType || ContentTypeEnum.JSON
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const del = (url: string, params?: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.DELETE,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取请求函数,默认get
|
||||
export const http = (type?: RequestHttpEnum) => {
|
||||
switch (type) {
|
||||
case RequestHttpEnum.GET:
|
||||
return get
|
||||
|
||||
case RequestHttpEnum.POST:
|
||||
return post
|
||||
|
||||
case RequestHttpEnum.PATCH:
|
||||
return patch
|
||||
|
||||
case RequestHttpEnum.PUT:
|
||||
return put
|
||||
|
||||
case RequestHttpEnum.DELETE:
|
||||
return del
|
||||
|
||||
default:
|
||||
return get
|
||||
}
|
||||
}
|
||||
const prefix = 'javascript:'
|
||||
// 对输入字符进行转义处理
|
||||
export const translateStr = (target: string | object) => {
|
||||
if (typeof target === 'string') {
|
||||
if (target.startsWith(prefix)) {
|
||||
const funcStr = target.split(prefix)[1]
|
||||
let result;
|
||||
try {
|
||||
result = new Function(`${funcStr}`)()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
window['$message'].error('js内容解析有误!')
|
||||
}
|
||||
return result
|
||||
} else {
|
||||
return target
|
||||
}
|
||||
}
|
||||
for (const key in target) {
|
||||
if (Object.prototype.hasOwnProperty.call(target, key)) {
|
||||
const subTarget = (target as any)[key];
|
||||
(target as any)[key] = translateStr(subTarget)
|
||||
}
|
||||
}
|
||||
return target
|
||||
}
|
||||
|
||||
/**
|
||||
* * 自定义请求
|
||||
* @param targetParams 当前组件参数
|
||||
* @param globalParams 全局参数
|
||||
*/
|
||||
export const customizeHttp = (targetParams: RequestConfigType, globalParams: RequestGlobalConfigType) => {
|
||||
if (!targetParams || !globalParams) {
|
||||
return
|
||||
}
|
||||
|
||||
// 全局
|
||||
const {
|
||||
// 全局请求源地址
|
||||
requestOriginUrl,
|
||||
// 全局请求内容
|
||||
requestParams: globalRequestParams
|
||||
} = globalParams
|
||||
|
||||
// 目标组件(优先级 > 全局组件)
|
||||
const {
|
||||
// 请求地址
|
||||
requestUrl,
|
||||
// 普通 / sql
|
||||
requestContentType,
|
||||
// 获取数据的方式
|
||||
requestDataType,
|
||||
// 请求方式 get/post/del/put/patch
|
||||
requestHttpType,
|
||||
// 请求体类型 none / form-data / x-www-form-urlencoded / json /xml
|
||||
requestParamsBodyType,
|
||||
// SQL 请求对象
|
||||
requestSQLContent,
|
||||
// 请求内容 params / cookie / header / body: 同 requestParamsBodyType
|
||||
requestParams: targetRequestParams
|
||||
} = targetParams
|
||||
|
||||
// 静态排除
|
||||
if (requestDataType === RequestDataTypeEnum.STATIC) return
|
||||
|
||||
if (!requestUrl) {
|
||||
return
|
||||
}
|
||||
|
||||
// 处理头部
|
||||
let headers: RequestParamsObjType = {
|
||||
...globalRequestParams.Header,
|
||||
...targetRequestParams.Header
|
||||
}
|
||||
headers = translateStr(headers)
|
||||
|
||||
// data 参数
|
||||
let data: RequestParamsObjType | FormData | string = {}
|
||||
// params 参数
|
||||
let params: RequestParamsObjType = { ...targetRequestParams.Params }
|
||||
params = translateStr(params)
|
||||
// form 类型处理
|
||||
let formData: FormData = new FormData()
|
||||
formData.set('default', 'defaultData')
|
||||
// 类型处理
|
||||
|
||||
switch (requestParamsBodyType) {
|
||||
case RequestBodyEnum.NONE:
|
||||
break
|
||||
|
||||
case RequestBodyEnum.JSON:
|
||||
headers['Content-Type'] = ContentTypeEnum.JSON
|
||||
data = translateStr(JSON.parse(targetRequestParams.Body['json']))
|
||||
// json 赋值给 data
|
||||
break
|
||||
|
||||
case RequestBodyEnum.XML:
|
||||
headers['Content-Type'] = ContentTypeEnum.XML
|
||||
// xml 字符串赋值给 data
|
||||
data = translateStr(targetRequestParams.Body['xml'])
|
||||
break
|
||||
|
||||
case RequestBodyEnum.X_WWW_FORM_URLENCODED: {
|
||||
headers['Content-Type'] = ContentTypeEnum.FORM_URLENCODED
|
||||
const bodyFormData = targetRequestParams.Body['x-www-form-urlencoded']
|
||||
for (const i in bodyFormData) formData.set(i, translateStr(bodyFormData[i]))
|
||||
// FormData 赋值给 data
|
||||
data = formData
|
||||
break
|
||||
}
|
||||
|
||||
case RequestBodyEnum.FORM_DATA: {
|
||||
headers['Content-Type'] = ContentTypeEnum.FORM_DATA
|
||||
const bodyFormUrlencoded = targetRequestParams.Body['form-data']
|
||||
for (const i in bodyFormUrlencoded) {
|
||||
formData.set(i, translateStr(bodyFormUrlencoded[i]))
|
||||
}
|
||||
// FormData 赋值给 data
|
||||
data = formData
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// sql 处理
|
||||
if (requestContentType === RequestContentTypeEnum.SQL) {
|
||||
headers['Content-Type'] = ContentTypeEnum.JSON
|
||||
data = requestSQLContent
|
||||
}
|
||||
|
||||
try {
|
||||
const url = (new Function("return `" + `${requestOriginUrl}${requestUrl}`.trim() + "`"))();
|
||||
return axiosInstance({
|
||||
url,
|
||||
method: requestHttpType,
|
||||
data,
|
||||
params,
|
||||
headers
|
||||
})
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
window['$message'].error('URL地址格式有误!')
|
||||
}
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
import { MyResponse, IBackend } from './ibackend'
|
||||
import { fileToUrl } from '@/utils'
|
||||
|
||||
|
||||
/**
|
||||
* MockBackend
|
||||
* 模拟纯前端,不会保存,也不报错。
|
||||
*/
|
||||
|
||||
export class MockBackend implements IBackend {
|
||||
public async init(data: any) {
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async login(data:any) {
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
if(data.password == "123456" && data.username == "admin"){
|
||||
rtn.data = {
|
||||
token:{tokenValue:"mockToken", tokenName:"name"},
|
||||
userinfo:{nickname:"nickname", username:data.username, id:1}
|
||||
}
|
||||
}else{
|
||||
rtn.data = null
|
||||
rtn.msg = "用户名或密码错误!"
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async logout() {
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async checkToken(data:any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async projectList(data:any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
rtn.data =[
|
||||
{
|
||||
id: 1,
|
||||
title: '假数据不可用',
|
||||
release: true,
|
||||
label: '官方案例'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '物料2-假数据不可用',
|
||||
release: false,
|
||||
label: '官方案例'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: '物料3-假数据不可用',
|
||||
release: false,
|
||||
label: '官方案例'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: '物料4-假数据不可用',
|
||||
release: false,
|
||||
label: '官方案例'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: '物料5-假数据不可用',
|
||||
release: false,
|
||||
label: '官方案例'
|
||||
}
|
||||
];
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async createProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
rtn.data.id = "newId"
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async fetchProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
rtn.data = {
|
||||
id:data.projectId,
|
||||
projectName: '假数据不可用',
|
||||
indexImage:'',
|
||||
state: 0,
|
||||
remarks: '官方案例',
|
||||
content: null
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async saveProject(data: object){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async updateProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async copyProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async deleteProject(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async changeProjectRelease(data: any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public async uploadFile(data: File, params:any){
|
||||
let rtn:MyResponse = new MyResponse;
|
||||
rtn.data.uri = fileToUrl(data)
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public getFileUrl(uploadUri:string){
|
||||
return uploadUri;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
import Flipper from './index.vue'
|
||||
type FlipType = 'up' | 'down'
|
||||
|
||||
export { Flipper, FlipType }
|
||||
@@ -1,224 +0,0 @@
|
||||
<template>
|
||||
<div class="M-Flipper" :class="[flipType, { go: isFlipping }]">
|
||||
<div class="digital front" :data-front="frontTextFromData"></div>
|
||||
<div class="digital back" :data-back="backTextFromData"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'Flipper'
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, PropType, watch } from 'vue'
|
||||
import { FlipType } from '.'
|
||||
|
||||
const props = defineProps({
|
||||
flipType: {
|
||||
type: String as PropType<FlipType>,
|
||||
default: () => {
|
||||
return 'down'
|
||||
}
|
||||
},
|
||||
count: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
duration: {
|
||||
type: Number,
|
||||
default: 600
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
default: 60
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 100
|
||||
},
|
||||
radius: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
frontColor: {
|
||||
type: String,
|
||||
default: '#ffffff'
|
||||
},
|
||||
backColor: {
|
||||
type: String,
|
||||
default: '#000000'
|
||||
}
|
||||
})
|
||||
|
||||
const isFlipping = ref(false)
|
||||
const frontTextFromData = ref(props.count || 0)
|
||||
const backTextFromData = ref(props.count || 0)
|
||||
|
||||
// 翻牌
|
||||
const flip = (front: string | number, back: string | number) => {
|
||||
// 如果处于翻转中,则不执行
|
||||
if (isFlipping.value) return
|
||||
// 设置翻盘前后数据
|
||||
backTextFromData.value = back
|
||||
frontTextFromData.value = front
|
||||
|
||||
// 设置翻转状态为true
|
||||
isFlipping.value = true
|
||||
|
||||
// 翻牌结束的行为
|
||||
setTimeout(() => {
|
||||
isFlipping.value = false // 设置翻转状态为false
|
||||
frontTextFromData.value = back
|
||||
}, props.duration)
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.count,
|
||||
(newVal, oldVal) => {
|
||||
flip(oldVal as string | number, newVal as string | number)
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$frontColor: v-bind('props.frontColor');
|
||||
$backColor: v-bind('props.backColor');
|
||||
$radius: v-bind('`${props.radius}px`');
|
||||
$width: v-bind('`${props.width}px`');
|
||||
$height: v-bind('`${props.height}px`');
|
||||
$perspective: v-bind('`${props.height * 2}px`');
|
||||
$speed: v-bind('`${props.duration / 1000}s`');
|
||||
$shadowColor: #000000;
|
||||
$lineColor: #4a9ef8;
|
||||
|
||||
// #region 动画效果
|
||||
@keyframes frontFlipDown {
|
||||
0% {
|
||||
transform: perspective($perspective) rotateX(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: perspective($perspective) rotateX(-180deg);
|
||||
}
|
||||
}
|
||||
@keyframes backFlipDown {
|
||||
0% {
|
||||
transform: perspective($perspective) rotateX(180deg);
|
||||
}
|
||||
100% {
|
||||
transform: perspective($perspective) rotateX(0deg);
|
||||
}
|
||||
}
|
||||
@keyframes frontFlipUp {
|
||||
0% {
|
||||
transform: perspective($perspective) rotateX(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: perspective($perspective) rotateX(180deg);
|
||||
}
|
||||
}
|
||||
@keyframes backFlipUp {
|
||||
0% {
|
||||
transform: perspective($perspective) rotateX(-180deg);
|
||||
}
|
||||
100% {
|
||||
transform: perspective($perspective) rotateX(0deg);
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
|
||||
.M-Flipper {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: $width;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
border: solid 1px $backColor;
|
||||
border-radius: $radius;
|
||||
background: $frontColor;
|
||||
font-size: $width;
|
||||
color: $frontColor;
|
||||
box-shadow: 0 0 6px rgba($color: $shadowColor, $alpha: 0.5); // 阴影部分
|
||||
text-align: center;
|
||||
// font-family: 'Helvetica Neue';
|
||||
|
||||
.digital:before,
|
||||
.digital:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: $backColor;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.digital.front:before,
|
||||
.digital.front:after {
|
||||
content: attr(data-front) !important;
|
||||
}
|
||||
.digital.back:before,
|
||||
.digital.back:after {
|
||||
content: attr(data-back) !important;
|
||||
}
|
||||
.digital:before {
|
||||
top: 0;
|
||||
bottom: 50%;
|
||||
border-radius: $radius $radius 0 0;
|
||||
border-bottom: solid 1px rgba($color: $lineColor, $alpha: 0.3); // 中间线颜色
|
||||
}
|
||||
.digital:after {
|
||||
top: 50%;
|
||||
bottom: 0;
|
||||
border-radius: 0 0 $radius $radius;
|
||||
line-height: 0;
|
||||
}
|
||||
/*向下翻*/
|
||||
&.down .front:before {
|
||||
z-index: 3;
|
||||
}
|
||||
&.down .back:after {
|
||||
z-index: 2;
|
||||
transform-origin: 50% 0%;
|
||||
transform: perspective($perspective) rotateX(180deg);
|
||||
}
|
||||
&.down .front:after,
|
||||
&.down .back:before {
|
||||
z-index: 1;
|
||||
}
|
||||
&.down.go .front:before {
|
||||
transform-origin: 50% 100%;
|
||||
animation: frontFlipDown $speed ease-in-out both;
|
||||
box-shadow: 0 -2px 6px rgba($color: $lineColor, $alpha: 0.3);
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
&.down.go .back:after {
|
||||
animation: backFlipDown $speed ease-in-out both;
|
||||
}
|
||||
/*向上翻*/
|
||||
&.up .front:after {
|
||||
z-index: 3;
|
||||
}
|
||||
&.up .back:before {
|
||||
z-index: 2;
|
||||
transform-origin: 50% 100%;
|
||||
transform: perspective($perspective) rotateX(-180deg);
|
||||
}
|
||||
&.up .front:before,
|
||||
&.up .back:after {
|
||||
z-index: 1;
|
||||
}
|
||||
&.up.go .front:after {
|
||||
transform-origin: 50% 0;
|
||||
animation: frontFlipUp $speed ease-in-out both;
|
||||
box-shadow: 0 2px 6px rgba($color: $lineColor, $alpha: 0.3);
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
&.up.go .back:before {
|
||||
animation: backFlipUp $speed ease-in-out both;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,3 +0,0 @@
|
||||
import GoSystemInfo from './index.vue';
|
||||
|
||||
export { GoSystemInfo };
|
||||
@@ -1,76 +0,0 @@
|
||||
<template>
|
||||
<n-modal v-model:show="modelShow" @afterLeave="closeHandle">
|
||||
<n-list bordered class="go-system-info">
|
||||
<template #header>
|
||||
<n-space justify="space-between">
|
||||
<n-h3 class="go-mb-0">关于我们</n-h3>
|
||||
<n-icon size="20" class="go-cursor-pointer" @click="closeHandle">
|
||||
<close-icon></close-icon>
|
||||
</n-icon>
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
<n-list-item>
|
||||
<n-space :size="20">
|
||||
<n-text class="item-left">版权声明:</n-text>
|
||||
<n-text>
|
||||
GoView 版权属于
|
||||
<n-a href="https://gitee.com/MTrun/go-view" target="_blank">https://gitee.com/MTrun/go-view</n-a> 项目作者
|
||||
</n-text>
|
||||
</n-space>
|
||||
</n-list-item>
|
||||
|
||||
<n-list-item>
|
||||
<n-divider style="margin-top: 0" />
|
||||
<n-space :size="20">
|
||||
<n-text class="item-left">协议备注:</n-text>
|
||||
<n-text>
|
||||
请遵守开源 MIT 协议,以上声明 <n-text type="error">不可删除</n-text>,否则视作侵权行为,后果自负!
|
||||
</n-text>
|
||||
</n-space>
|
||||
</n-list-item>
|
||||
|
||||
<n-list-item>
|
||||
<n-divider style="margin-top: 0" />
|
||||
<n-space :size="20">
|
||||
<n-text class="item-left">商业授权:</n-text>
|
||||
<n-text>
|
||||
若不想保留版权声明,请通过仓库/交流群 联系项目作者,进行授权
|
||||
</n-text>
|
||||
</n-space>
|
||||
</n-list-item>
|
||||
</n-list>
|
||||
</n-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { icon } from '@/plugins'
|
||||
|
||||
const { HelpOutlineIcon, CloseIcon } = icon.ionicons5
|
||||
const emit = defineEmits(['update:modelShow'])
|
||||
|
||||
defineProps({
|
||||
modelShow: Boolean
|
||||
})
|
||||
|
||||
const closeHandle = () => {
|
||||
emit('update:modelShow', false)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@include go('system-info') {
|
||||
@extend .go-background-filter;
|
||||
min-width: 100px;
|
||||
max-width: 60vw;
|
||||
padding-bottom: 20px;
|
||||
.item-left {
|
||||
width: 200px;
|
||||
}
|
||||
@include deep() {
|
||||
.n-list-item:not(:last-child) {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -115,13 +115,6 @@ const list = reactive<ListType[]>([
|
||||
desc: '',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
key: SettingStoreEnums.CHART_TOOLS_STATUS_HIDE,
|
||||
value: settingStore.getChartToolsStatusHide,
|
||||
type: 'switch',
|
||||
name: '隐藏工具栏',
|
||||
desc: '鼠标移入时,会展示切换到展开模式',
|
||||
},
|
||||
{
|
||||
key: SettingStoreEnums.CHART_TOOLS_STATUS,
|
||||
value: settingStore.getChartToolsStatus,
|
||||
@@ -190,14 +183,11 @@ const handleChange = (e: MouseEvent, item: ListType) => {
|
||||
width: 100px;
|
||||
}
|
||||
.select-min-width {
|
||||
width: 115px;
|
||||
width: 110px;
|
||||
}
|
||||
@include deep() {
|
||||
.n-list-item {
|
||||
border-bottom: 0!important;
|
||||
}
|
||||
.n-list-item__divider {
|
||||
display: none!important;
|
||||
.n-list-item:not(:last-child) {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,17 +20,14 @@
|
||||
|
||||
<!-- 系统设置 model -->
|
||||
<go-system-set v-model:modelShow="modelShow"></go-system-set>
|
||||
<!-- 关于软件 model -->
|
||||
<go-system-info v-model:modelShow="modelShowInfo"></go-system-info>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { h, ref } from 'vue'
|
||||
import { NAvatar, NText } from 'naive-ui'
|
||||
import { renderIcon } from '@/utils'
|
||||
import { logout, renderLang } from '@/utils'
|
||||
import { openDoc, logout, renderLang } from '@/utils'
|
||||
import { GoSystemSet } from '@/components/GoSystemSet/index'
|
||||
import { GoSystemInfo } from '@/components/GoSystemInfo/index'
|
||||
import Person from './person.png'
|
||||
|
||||
import { icon } from '@/plugins'
|
||||
@@ -43,7 +40,6 @@ const {
|
||||
|
||||
const t = window['$t']
|
||||
|
||||
const modelShowInfo = ref(false)
|
||||
const modelShow = ref(false)
|
||||
|
||||
// 是否失败
|
||||
@@ -81,16 +77,16 @@ const options = ref([
|
||||
type: 'divider',
|
||||
key: 'd1'
|
||||
},
|
||||
{
|
||||
label: renderLang('global.sys_set'),
|
||||
key: 'sysSet',
|
||||
icon: renderIcon(SettingsSharpIcon)
|
||||
},
|
||||
{
|
||||
label: renderLang('global.contact'),
|
||||
key: 'contact',
|
||||
icon: renderIcon(ChatboxEllipsesIcon)
|
||||
},
|
||||
{
|
||||
label: renderLang('global.sys_set'),
|
||||
key: 'sysSet',
|
||||
icon: renderIcon(SettingsSharpIcon)
|
||||
},
|
||||
{
|
||||
type: 'divider',
|
||||
key: 'd3'
|
||||
@@ -112,15 +108,10 @@ const sysSetHandle = () => {
|
||||
modelShow.value = true
|
||||
}
|
||||
|
||||
// 系统设置
|
||||
const sysInfoHandle = () => {
|
||||
modelShowInfo.value = true
|
||||
}
|
||||
|
||||
const handleSelect = (key: string) => {
|
||||
switch (key) {
|
||||
case 'contact':
|
||||
sysInfoHandle()
|
||||
openDoc()
|
||||
break
|
||||
case 'sysSet':
|
||||
sysSetHandle()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- eslint-disable vue/valid-template-root -->
|
||||
<template></template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
@@ -1,124 +1,163 @@
|
||||
<template>
|
||||
<collapse-item v-if="title" name="标题">
|
||||
<template #header>
|
||||
<n-switch v-model:value="title.show" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-show="inChart"
|
||||
v-model:value="title.show"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="标题">
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker v-model:value="title.textStyle.color" size="small"></n-color-picker>
|
||||
<n-color-picker
|
||||
v-model:value="title.textStyle.color"
|
||||
size="small"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="title.textStyle.fontSize" :min="1" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="title.textStyle.fontSize"
|
||||
:min="1"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="副标题">
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker size="small" v-model:value="title.subtextStyle.color"></n-color-picker>
|
||||
<n-color-picker
|
||||
size="small"
|
||||
v-model:value="title.subtextStyle.color"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="title.subtextStyle.fontSize" :min="1" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
|
||||
<collapse-item v-if="grid" name="容器">
|
||||
<setting-item-box name="距离">
|
||||
<setting-item name="左侧距离">
|
||||
<n-input v-model:value="grid.left" size="small"></n-input>
|
||||
</setting-item>
|
||||
<setting-item name="右侧距离">
|
||||
<n-input v-model:value="grid.right" size="small"></n-input>
|
||||
</setting-item>
|
||||
<setting-item name="上侧距离">
|
||||
<n-input v-model:value="grid.top" size="small"></n-input>
|
||||
</setting-item>
|
||||
<setting-item name="下侧距离">
|
||||
<n-input v-model:value="grid.bottom" size="small"></n-input>
|
||||
<n-input-number
|
||||
v-model:value="title.subtextStyle.fontSize"
|
||||
:min="1"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
|
||||
<collapse-item v-if="xAxis" name="X轴">
|
||||
<template #header>
|
||||
<n-switch v-model:value="xAxis.show" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-show="inChart"
|
||||
v-model:value="xAxis.show"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="单位">
|
||||
<setting-item name="名称">
|
||||
<n-input v-model:value="xAxis.name" size="small"></n-input>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker size="small" v-model:value="xAxis.nameTextStyle.color"></n-color-picker>
|
||||
<n-color-picker
|
||||
size="small"
|
||||
v-model:value="xAxis.nameTextStyle.color"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="xAxis.nameTextStyle.fontSize" :min="12" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="xAxis.nameTextStyle.fontSize"
|
||||
:min="12"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="偏移量">
|
||||
<n-input-number v-model:value="xAxis.nameGap" :min="5" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="xAxis.nameGap"
|
||||
:min="5"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="标签">
|
||||
<setting-item name="展示">
|
||||
<setting-item v-show="inChart" name="展示">
|
||||
<n-space>
|
||||
<n-switch v-model:value="xAxis.axisLabel.show" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-model:value="xAxis.axisLabel.show"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker size="small" v-model:value="xAxis.axisLabel.color"></n-color-picker>
|
||||
<n-color-picker
|
||||
size="small"
|
||||
v-model:value="xAxis.axisLabel.color"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="xAxis.axisLabel.fontSize" :min="8" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="偏移量">
|
||||
<n-input-number v-model:value="xAxis.axisLabel.rotate" :min="-90" :max="90" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="xAxis.axisLabel.fontSize"
|
||||
:min="8"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="轴线">
|
||||
<setting-item name="展示">
|
||||
<n-space>
|
||||
<n-switch v-model:value="xAxis.axisLine.show" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker v-model:value="xAxis.axisLine.lineStyle.color" size="small"></n-color-picker>
|
||||
<n-color-picker
|
||||
v-model:value="xAxis.axisLine.lineStyle.color"
|
||||
size="small"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="粗细">
|
||||
<n-input-number v-model:value="xAxis.axisLine.lineStyle.width" :min="1" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="位置">
|
||||
<n-select v-model:value="xAxis.position" size="small" :options="axisConfig.xposition"></n-select>
|
||||
<n-input-number
|
||||
v-model:value="xAxis.axisLine.lineStyle.width"
|
||||
:min="1"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="对齐零">
|
||||
<n-space>
|
||||
<n-switch v-model:value="xAxis.axisLine.onZero" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-model:value="xAxis.axisLine.onZero"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="反向">
|
||||
<setting-item v-show="inChart" name="反向">
|
||||
<n-space>
|
||||
<n-switch v-model:value="xAxis.inverse" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="刻度">
|
||||
<setting-item name="展示">
|
||||
<setting-item v-show="inChart" name="展示">
|
||||
<n-space>
|
||||
<n-switch v-model:value="xAxis.axisTick.show" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="长度">
|
||||
<n-input-number v-model:value="xAxis.axisTick.length" :min="1" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="xAxis.axisTick.length"
|
||||
:min="1"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="分割线">
|
||||
<setting-item name="展示">
|
||||
<setting-item v-show="inChart" name="展示">
|
||||
<n-space>
|
||||
<n-switch v-model:value="xAxis.splitLine.show" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-model:value="xAxis.splitLine.show"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker v-model:value="xAxis.splitLine.lineStyle.color" size="small"></n-color-picker>
|
||||
<n-color-picker
|
||||
v-model:value="xAxis.splitLine.lineStyle.color"
|
||||
size="small"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="粗细">
|
||||
<n-input-number v-model:value="xAxis.splitLine.lineStyle.width" :min="1" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="xAxis.splitLine.lineStyle.width"
|
||||
:min="1"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="类型">
|
||||
<n-select
|
||||
@@ -127,90 +166,140 @@
|
||||
:options="axisConfig.splitLint.lineStyle.type"
|
||||
></n-select>
|
||||
</setting-item>
|
||||
<setting-item name="位置">
|
||||
<n-select
|
||||
v-model:value="xAxis.position"
|
||||
size="small"
|
||||
:options="axisConfig.xposition"
|
||||
></n-select>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
|
||||
<collapse-item v-if="yAxis" name="Y轴">
|
||||
<template #header>
|
||||
<n-switch v-model:value="yAxis.show" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-show="inChart"
|
||||
v-model:value="yAxis.show"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="单位">
|
||||
<setting-item name="名称">
|
||||
<n-input v-model:value="yAxis.name" size="small"></n-input>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker size="small" v-model:value="yAxis.nameTextStyle.color"></n-color-picker>
|
||||
<n-color-picker
|
||||
size="small"
|
||||
v-model:value="yAxis.nameTextStyle.color"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="yAxis.nameTextStyle.fontSize" :min="8" size="small"></n-input-number>
|
||||
<setting-item name="大小">
|
||||
<n-input-number
|
||||
v-model:value="yAxis.nameTextStyle.fontSize"
|
||||
:min="8"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="偏移量">
|
||||
<n-input-number v-model:value="yAxis.nameGap" :min="5" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="yAxis.nameGap"
|
||||
:min="5"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="标签">
|
||||
<setting-item name="展示">
|
||||
<setting-item v-show="inChart" name="展示">
|
||||
<n-space>
|
||||
<n-switch v-model:value="yAxis.axisLabel.show" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-model:value="yAxis.axisLabel.show"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker size="small" v-model:value="yAxis.axisLabel.color"></n-color-picker>
|
||||
<n-color-picker
|
||||
size="small"
|
||||
v-model:value="yAxis.axisLabel.color"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="yAxis.axisLabel.fontSize" :min="8" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="偏移量">
|
||||
<n-input-number v-model:value="yAxis.axisLabel.rotate" :min="-90" :max="90" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="yAxis.axisLabel.fontSize"
|
||||
:min="8"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="轴线">
|
||||
<setting-item name="展示">
|
||||
<setting-item v-show="inChart" name="展示">
|
||||
<n-space>
|
||||
<n-switch v-model:value="yAxis.axisLine.show" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker v-model:value="yAxis.axisLine.lineStyle.color" size="small"></n-color-picker>
|
||||
<n-color-picker
|
||||
v-model:value="yAxis.axisLine.lineStyle.color"
|
||||
size="small"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="粗细">
|
||||
<n-input-number v-model:value="yAxis.axisLine.lineStyle.width" :min="1" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="位置">
|
||||
<n-select v-model:value="yAxis.position" size="small" :options="axisConfig.yposition"></n-select>
|
||||
<n-input-number
|
||||
v-model:value="yAxis.axisLine.lineStyle.width"
|
||||
:min="1"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="对齐零">
|
||||
<n-space>
|
||||
<n-switch v-model:value="yAxis.axisLine.onZero" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-model:value="yAxis.axisLine.onZero"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="反向">
|
||||
<setting-item v-show="inChart" name="反向">
|
||||
<n-space>
|
||||
<n-switch v-model:value="yAxis.inverse" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="刻度">
|
||||
<setting-item name="展示">
|
||||
<setting-item v-show="inChart" name="展示">
|
||||
<n-space>
|
||||
<n-switch v-model:value="yAxis.axisTick.show" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="长度">
|
||||
<n-input-number v-model:value="yAxis.axisTick.length" :min="1" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="yAxis.axisTick.length"
|
||||
:min="1"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="分割线">
|
||||
<setting-item name="展示">
|
||||
<setting-item v-show="inChart" name="展示">
|
||||
<n-space>
|
||||
<n-switch v-model:value="yAxis.splitLine.show" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-model:value="yAxis.splitLine.show"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker v-model:value="yAxis.splitLine.lineStyle.color" size="small"></n-color-picker>
|
||||
<n-color-picker
|
||||
v-model:value="yAxis.splitLine.lineStyle.color"
|
||||
size="small"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="粗细">
|
||||
<n-input-number v-model:value="yAxis.splitLine.lineStyle.width" :min="1" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="yAxis.splitLine.lineStyle.width"
|
||||
:min="1"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="类型">
|
||||
<n-select
|
||||
@@ -219,70 +308,44 @@
|
||||
:options="axisConfig.splitLint.lineStyle.type"
|
||||
></n-select>
|
||||
</setting-item>
|
||||
<setting-item name="位置">
|
||||
<n-select
|
||||
v-model:value="yAxis.position"
|
||||
size="small"
|
||||
:options="axisConfig.yposition"
|
||||
></n-select>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
|
||||
<collapse-item v-if="legend" name="图例">
|
||||
<template #header>
|
||||
<n-switch v-model:value="legend.show" size="small"></n-switch>
|
||||
<n-switch
|
||||
v-show="inChart"
|
||||
v-model:value="legend.show"
|
||||
size="small"
|
||||
></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="图例文字">
|
||||
<setting-item>
|
||||
<n-color-picker size="small" v-model:value="legend.textStyle.color"></n-color-picker>
|
||||
<n-color-picker
|
||||
size="small"
|
||||
v-model:value="legend.textStyle.color"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
|
||||
<collapse-item v-if="visualMap" name="视觉映射">
|
||||
<template #header>
|
||||
<n-switch v-model:value="visualMap.show" size="small"></n-switch>
|
||||
</template>
|
||||
|
||||
<setting-item-box name="范围">
|
||||
<setting-item name="最小值">
|
||||
<n-input-number v-model:value="visualMap.min" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="最大值">
|
||||
<n-input-number v-model:value="visualMap.max" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
|
||||
<setting-item-box name="颜色">
|
||||
<setting-item :name="`层级-${index + 1}`" v-for="(item, index) in visualMap.inRange.color" :key="index">
|
||||
<n-color-picker v-model:value="visualMap.inRange.color[index]" size="small"></n-color-picker>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
|
||||
<setting-item-box name="控制块">
|
||||
<setting-item name="放置方向">
|
||||
<n-select v-model:value="visualMap.orient" size="small" :options="axisConfig.visualMap.orient"></n-select>
|
||||
</setting-item>
|
||||
<setting-item name="宽度">
|
||||
<n-input-number v-model:value="visualMap.itemWidth" :min="5" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="高度">
|
||||
<n-input-number v-model:value="visualMap.itemHeight" :min="5" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="反转">
|
||||
<n-space>
|
||||
<n-switch v-model:value="visualMap.inverse" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="拖拽组件实时更新">
|
||||
<n-space>
|
||||
<n-switch v-model:value="visualMap.realtime" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<global-setting-position :targetData="visualMap"></global-setting-position>
|
||||
</collapse-item>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType, computed } from 'vue'
|
||||
import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
|
||||
import { axisConfig } from '@/packages/chartConfiguration/echarts/index'
|
||||
import { CollapseItem, SettingItemBox, SettingItem, GlobalSettingPosition } from '@/components/Pages/ChartItemSetting'
|
||||
import {
|
||||
CollapseItem,
|
||||
SettingItemBox,
|
||||
SettingItem
|
||||
} from '@/components/Pages/ChartItemSetting'
|
||||
|
||||
const props = defineProps({
|
||||
optionData: {
|
||||
@@ -311,12 +374,4 @@ const yAxis = computed(() => {
|
||||
const legend = computed(() => {
|
||||
return props.optionData.legend
|
||||
})
|
||||
|
||||
const grid = computed(() => {
|
||||
return props.optionData.grid
|
||||
})
|
||||
|
||||
const visualMap = computed(() => {
|
||||
return props.optionData.visualMap
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<template>
|
||||
<setting-item-box v-if="targetData" name="位置">
|
||||
<setting-item :name="`偏移 X:${targetData.left || 0}px`">
|
||||
<n-input-number v-model:value="targetData.left" size="small" step="10"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item :name="`偏移 Y:${targetData.top || 0}px`">
|
||||
<n-input-number v-model:value="targetData.top" size="small" step="10"></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType, reactive } from 'vue'
|
||||
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||
|
||||
type positionType = {
|
||||
top?: number | string | null
|
||||
left?: number | string | null
|
||||
right?: number | string | null
|
||||
bottom?: number | string | null
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
targetData: {
|
||||
type: Object as PropType<positionType>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -1,13 +1,10 @@
|
||||
<template>
|
||||
<div v-show="isGroup">
|
||||
<n-divider n-divider style="margin: 10px 0"></n-divider>
|
||||
<n-tag type="warning"> 解散分组「 {{ isCanvas ? '滤镜' : '滤镜 / 变换' }} 」也将消失!</n-tag>
|
||||
<n-tag type="warning"> 解散分组「 {{ isCanvas ? '滤镜' : '滤镜 / 变换' }} 」也将消失!</n-tag>
|
||||
</div>
|
||||
|
||||
<collapse-item :name="isCanvas ? '滤镜' : '滤镜 / 变换'">
|
||||
<template #header>
|
||||
<n-switch v-model:value="chartStyles.filterShow" size="small"></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="色相" :alone="true">
|
||||
<setting-item :name="`值:${chartStyles.hueRotate}deg`">
|
||||
<!-- 透明度 -->
|
||||
@@ -69,24 +66,6 @@
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
|
||||
<!-- 混合模式 -->
|
||||
<setting-item-box v-if="!isCanvas" :alone="true">
|
||||
<template #name>
|
||||
<n-text>混合</n-text>
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-icon size="21" :depth="3">
|
||||
<help-outline-icon></help-outline-icon>
|
||||
</n-icon>
|
||||
</template>
|
||||
<n-text>视频组件需要底色透明一般选中滤色</n-text>
|
||||
</n-tooltip>
|
||||
</template>
|
||||
<setting-item>
|
||||
<n-select v-model:value="chartStyles.blendMode" size="small" filterable :options="BlendModeEnumList"></n-select>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
|
||||
<!-- 变换 -->
|
||||
<setting-item-box v-if="!isCanvas" name="旋转°">
|
||||
<setting-item name="Z轴(平面) - 旋转">
|
||||
@@ -142,17 +121,13 @@
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
|
||||
<!-- 提示 -->
|
||||
<n-tag type="warning"> 若预览时大屏模糊,可以尝试关闭滤镜进行修复 </n-tag>
|
||||
</collapse-item>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import { PickCreateComponentType, BlendModeEnumList } from '@/packages/index.d'
|
||||
import { PickCreateComponentType } from '@/packages/index.d'
|
||||
import { SettingItemBox, SettingItem, CollapseItem } from '@/components/Pages/ChartItemSetting'
|
||||
import { icon } from '@/plugins'
|
||||
|
||||
const props = defineProps({
|
||||
isGroup: {
|
||||
@@ -169,14 +144,14 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const { HelpOutlineIcon } = icon.ionicons5
|
||||
|
||||
// 百分比格式化 person
|
||||
// 百分比格式化persen
|
||||
const sliderFormatTooltip = (v: string) => {
|
||||
// @ts-ignore
|
||||
return `${(parseFloat(v) * 100).toFixed(0)}%`
|
||||
}
|
||||
// 角度格式化
|
||||
const degFormatTooltip = (v: string) => {
|
||||
// @ts-ignore
|
||||
return `${v}deg`
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -5,9 +5,6 @@ import CollapseItem from './CollapseItem.vue'
|
||||
|
||||
// 全局配置属性
|
||||
import GlobalSetting from './GlobalSetting.vue'
|
||||
// 全局配置属性-位置
|
||||
import GlobalSettingPosition from './GlobalSettingPosition.vue'
|
||||
|
||||
// 名称
|
||||
import NameSetting from './NameSetting.vue'
|
||||
// 方向
|
||||
@@ -17,4 +14,4 @@ import SizeSetting from './SizeSetting.vue'
|
||||
// 样式
|
||||
import StylesSetting from './StylesSetting.vue'
|
||||
|
||||
export { CollapseItem, SettingItemBox, SettingItem, GlobalSetting, GlobalSettingPosition, NameSetting, PositionSetting, SizeSetting, StylesSetting }
|
||||
export { CollapseItem, SettingItemBox, SettingItem, GlobalSetting, NameSetting, PositionSetting, SizeSetting, StylesSetting }
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<!-- eslint-disable vue/valid-template-root -->
|
||||
<template></template>
|
||||
<script lang="ts" setup>
|
||||
import { useDialog } from 'naive-ui'
|
||||
import { useDialog } from 'naive-ui';
|
||||
//挂载在 window 方便与在js中使用
|
||||
window['$dialog'] = useDialog()
|
||||
window['$dialog'] = useDialog();
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- eslint-disable vue/valid-template-root -->
|
||||
<template></template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<!-- eslint-disable vue/valid-template-root -->
|
||||
<template></template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { useMessage } from 'naive-ui';
|
||||
//挂载在 window 方便与在js中使用
|
||||
window['$message'] = useMessage()
|
||||
window['$message'] = useMessage();
|
||||
</script>
|
||||
|
||||
@@ -37,9 +37,7 @@ const props = defineProps({
|
||||
hidden: {
|
||||
request: false,
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
default: []
|
||||
},
|
||||
// 使用全屏功能
|
||||
narrow: {
|
||||
@@ -78,7 +76,7 @@ const btnList: {
|
||||
icon: RemoveIcon
|
||||
},
|
||||
{
|
||||
title: isFull.value ? '缩小' : '放大',
|
||||
title: isFull ? '缩小' : '放大',
|
||||
key: props.narrow ? 'fullResize' : 'resize',
|
||||
icon: ResizeIcon
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// 鼠标点击左右键
|
||||
export enum MouseEventButton {
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
RIGHT = 2,
|
||||
}
|
||||
|
||||
// 页面拖拽键名
|
||||
@@ -41,16 +41,7 @@ export enum MenuEnum {
|
||||
// 后退
|
||||
BACK = 'back',
|
||||
FORWORD = 'forward',
|
||||
// 保存
|
||||
SAVE = 'save',
|
||||
// 锁定
|
||||
LOCK = 'lock',
|
||||
// 解除锁定
|
||||
UNLOCK = 'unLock',
|
||||
// 隐藏
|
||||
HIDE = 'hide',
|
||||
// 显示
|
||||
SHOW = 'show'
|
||||
SAVE = 'save'
|
||||
}
|
||||
|
||||
// Win 键盘枚举
|
||||
@@ -58,9 +49,9 @@ export enum WinKeyboard {
|
||||
CTRL = 'ctrl',
|
||||
SHIFT = 'shift',
|
||||
ALT = ' alt',
|
||||
CTRL_SOURCE_KEY = 'control',
|
||||
SHIFT_SOURCE_KEY = 'shift',
|
||||
ALT_SOURCE_KEY = 'alt'
|
||||
CTRL_SOURCE_KEY = "control",
|
||||
SHIFT_SOURCE_KEY = "shift",
|
||||
ALT_SOURCE_KEY = "alt"
|
||||
}
|
||||
|
||||
// Mac 键盘枚举
|
||||
@@ -69,9 +60,9 @@ export enum MacKeyboard {
|
||||
CTRL = '⌘',
|
||||
SHIFT = '⇧',
|
||||
ALT = '⌥',
|
||||
CTRL_SOURCE_KEY = '⌘',
|
||||
SHIFT_SOURCE_KEY = '⇧',
|
||||
ALT_SOURCE_KEY = '⌥'
|
||||
CTRL_SOURCE_KEY = "⌘",
|
||||
SHIFT_SOURCE_KEY = "⇧",
|
||||
ALT_SOURCE_KEY = "⌥"
|
||||
}
|
||||
|
||||
// 同步状态枚举
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/**
|
||||
* @description: 请求结果集
|
||||
*/
|
||||
// 模块 Path 前缀分类
|
||||
export enum ModuleTypeEnum {
|
||||
SYSTEM = 'sys',
|
||||
PROJECT = 'project',
|
||||
}
|
||||
|
||||
// 请求结果集
|
||||
export enum ResultEnum {
|
||||
DATA_SUCCESS = 0,
|
||||
SUCCESS = 200,
|
||||
@@ -8,7 +12,7 @@ export enum ResultEnum {
|
||||
SERVER_FORBIDDEN = 403,
|
||||
NOT_FOUND = 404,
|
||||
TOKEN_OVERDUE = 886,
|
||||
TIMEOUT = 60000
|
||||
TIMEOUT = 10042,
|
||||
}
|
||||
|
||||
// 数据相关
|
||||
@@ -33,9 +37,7 @@ export enum RequestHttpHeaderEnum {
|
||||
COOKIE = 'Cookie'
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 请求方法
|
||||
*/
|
||||
// 请求方法
|
||||
export enum RequestHttpEnum {
|
||||
GET = 'get',
|
||||
POST = 'post',
|
||||
@@ -116,9 +118,7 @@ export type RequestParams = {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 常用的contentTyp类型
|
||||
*/
|
||||
// 常用的contentTyp类型
|
||||
export enum ContentTypeEnum {
|
||||
// json
|
||||
JSON = 'application/json;charset=UTF-8',
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
export enum StorageEnum {
|
||||
// 全局设置
|
||||
GO_SYSTEM_SETTING_STORE = 'GO_SYSTEM_SETTING',
|
||||
// token 等信息
|
||||
GO_ACCESS_TOKEN_STORE = 'GO_ACCESS_TOKEN',
|
||||
GO_SETTING_STORE = 'GO_SETTING',
|
||||
// 登录信息
|
||||
GO_LOGIN_INFO_STORE = 'GO_LOGIN_INFO',
|
||||
GO_SYSTEM_STORE = 'GO_SYSTEM',
|
||||
// 语言
|
||||
GO_LANG_STORE = 'GO_LANG',
|
||||
// 当前选择的主题
|
||||
|
||||
@@ -2,4 +2,4 @@ export * from '@/hooks/useTheme.hook'
|
||||
export * from '@/hooks/usePreviewScale.hook'
|
||||
export * from '@/hooks/useCode.hook'
|
||||
export * from '@/hooks/useChartDataFetch.hook'
|
||||
export * from '@/hooks/useLifeHandler.hook'
|
||||
export * from '@/hooks/useSystemInit.hook'
|
||||
@@ -25,7 +25,7 @@ export const useChartDataFetch = (
|
||||
|
||||
const requestIntervalFn = () => {
|
||||
const chartEditStore = useChartEditStore()
|
||||
|
||||
|
||||
// 全局数据
|
||||
const {
|
||||
requestOriginUrl,
|
||||
@@ -59,18 +59,19 @@ export const useChartDataFetch = (
|
||||
|
||||
const fetchFn = async () => {
|
||||
const res = await customizeHttp(toRaw(targetComponent.request), toRaw(chartEditStore.requestGlobalConfig))
|
||||
if (res) {
|
||||
if (res && res.data) {
|
||||
try {
|
||||
const filter = targetComponent.filter
|
||||
// eCharts 组件配合 vChart 库更新方式
|
||||
if (chartFrame === ChartFrameEnum.ECHARTS) {
|
||||
if (vChartRef.value) {
|
||||
vChartRef.value.setOption({ dataset: newFunctionHandle(res?.data, res, filter) })
|
||||
}
|
||||
}
|
||||
// 更新回调函数
|
||||
if (updateCallback) {
|
||||
updateCallback(newFunctionHandle(res?.data, res, filter))
|
||||
updateCallback(newFunctionHandle(res.data, filter))
|
||||
} else {
|
||||
// eCharts 组件配合 vChart 库更新方式
|
||||
if (chartFrame === ChartFrameEnum.ECHARTS) {
|
||||
if (vChartRef.value) {
|
||||
vChartRef.value.setOption({ dataset: newFunctionHandle(res.data, filter) })
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
@@ -88,10 +89,7 @@ export const useChartDataFetch = (
|
||||
// 开启轮询
|
||||
if (time) fetchInterval = setInterval(fetchFn, intervalUnitHandle(time, unit))
|
||||
}
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
isPreview() && requestIntervalFn()
|
||||
|
||||
@@ -1,280 +0,0 @@
|
||||
import { CreateComponentType, EventLife } from '@/packages/index.d'
|
||||
import * as echarts from 'echarts'
|
||||
import { BackEndFactory } from '@/backend/ibackend'
|
||||
import { reactive, toRef , watch, computed} from 'vue';
|
||||
|
||||
/**
|
||||
* 事件测试:
|
||||
*
|
||||
切换显示名称为 饼图 和 柱状图 的图标
|
||||
const range = runtime.fn.selectComponents("饼图 柱状图")
|
||||
const h = runtime.fn.getChartConfig(range, "hide")
|
||||
runtime.fn.setChartConfig(range, "hide", !h)
|
||||
|
||||
修改一个名称 柱状图001 组件id 2wolqibrx3c000 的图表数据,以下两句等效
|
||||
runtime.fn.setChartConfig("柱状图001", "dataset", {"dimensions":["product","data1","data2"],"source":[{"product":"Mon","data1":120,"data2":130}]})
|
||||
runtime.fn.setChartConfig("#2wolqibrx3c000", "dataset", {"dimensions":["product","data1","data2"],"source":[{"product":"Mon","data1":120,"data2":230}]})
|
||||
|
||||
找到一个组并隐藏
|
||||
const c = runtime.fn.selectOneComponent("分组")
|
||||
if(c){
|
||||
console.log(runtime.fn.getChartConfig(c, "isGroup" ))
|
||||
runtime.fn.setChartConfig(c, "hide", true)
|
||||
}
|
||||
|
||||
调用组件 exposed 函数的例子
|
||||
组件中增加: defineExpose({ actionTest:actionTest })
|
||||
以下调用名称为 柱状图 组件的 actionTest
|
||||
runtime.fn.callExposed("柱状图", "actionTest")
|
||||
|
||||
|
||||
数据驱动界面:
|
||||
图表A 的 MOUNTED 加入对 status1 的 Watch, = "0" 隐藏
|
||||
watch(()=>runtime.variables.status1, newValue => runtime.fn.setChartConfig(this, "hide", newValue == "0"))
|
||||
图表B 的 MOUNTED 也加入对 status1 的 Watch = "1" 隐藏
|
||||
watch(()=>runtime.variables.status1, newValue => runtime.fn.setChartConfig(this, "hide", newValue == "1"))
|
||||
点击事件代码,实现图表A 和 图表B 的切换显示:
|
||||
if(runtime.variables.status1 == "0"){
|
||||
runtime.variables.status1 = "1"
|
||||
} else{
|
||||
runtime.variables.status1 = "0"
|
||||
}
|
||||
|
||||
图表A 的 MOUNTED 加入对 data1 的 Watch
|
||||
watch(()=>runtime.datasets.data1,
|
||||
newValue => runtime.fn.setChartConfig(this, "dataset", newValue))
|
||||
图表B 的 MOUNTED 加入对 data1 的 Watch
|
||||
watch(()=>runtime.datasets.data1,
|
||||
newValue => runtime.fn.setChartConfig(this, "dataset", newValue))
|
||||
点击事件代码,修改datasets.data1,同时更新图表A 和 图表B 的数据 :
|
||||
runtime.datasets.data1 = {"dimensions":["product","data1","data2"],"source":[{"product":"Mon","data1":120,"data2":230}]}
|
||||
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// * 初始化
|
||||
export const useSystemInit = async () => {
|
||||
const res = await BackEndFactory.init({}) as any;
|
||||
}
|
||||
|
||||
const getOneChartConfig = (component:any, configName:string, params?:any)=>{
|
||||
let root = null
|
||||
if(component.proxy.chartConfig) root = component.proxy.chartConfig
|
||||
else if (component.proxy.groupData) root = component.proxy.groupData
|
||||
// if(!root) return null
|
||||
switch(configName){
|
||||
case "hide":
|
||||
return root.status.hide
|
||||
break;
|
||||
case "dataset":
|
||||
return root.option.dataset
|
||||
break;
|
||||
case "isGroup":
|
||||
return root.isGroup
|
||||
break;
|
||||
case "key":
|
||||
return root.key
|
||||
break;
|
||||
case "attr":
|
||||
return root.attr
|
||||
break;
|
||||
case "name":
|
||||
return root.chartConfig.title
|
||||
}
|
||||
}
|
||||
|
||||
const setOneChartConfig = (component:any, configName:string, newValue:any, params?:any)=>{
|
||||
let root = null
|
||||
if(component.proxy.chartConfig) root = component.proxy.chartConfig
|
||||
else if (component.proxy.groupData) root = component.proxy.groupData
|
||||
switch(configName){
|
||||
case "hide":
|
||||
root.status.hide = newValue
|
||||
break;
|
||||
case "dataset":
|
||||
root.option.dataset = newValue
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 选择器语法:参考 css selectors
|
||||
* 名称 组件名称,不能有空格和特殊字符(. # 引号等)
|
||||
* [name=名称] Todo
|
||||
* #id 组件编号
|
||||
* .key 组件类型 Todo
|
||||
* @param selectors
|
||||
* @returns []
|
||||
*/
|
||||
const getComponentsBySelectors = (selectors:string):any[]=>{
|
||||
// 返回:数组,可能多个
|
||||
let rtn:any[] = []
|
||||
const ar = selectors.split(" ")
|
||||
for(let a of ar){
|
||||
rtn = rtn.concat(getComponentsBySelector(a))
|
||||
}
|
||||
return rtn
|
||||
}
|
||||
|
||||
const getComponentsBySelector = (selector:string):any[]=>{
|
||||
// 返回:数组,可能多个
|
||||
const rtn:any[] = []
|
||||
if(selector.substring(0,1) == "#")
|
||||
{
|
||||
const key = selector.substring(1)
|
||||
if(key in components){
|
||||
return [components[key]]
|
||||
}
|
||||
return rtn
|
||||
}
|
||||
for (let key in components) {
|
||||
if(getOneChartConfig(components[key], "name") == selector){
|
||||
rtn.push(components[key])
|
||||
}
|
||||
}
|
||||
return rtn
|
||||
}
|
||||
|
||||
|
||||
// 所有图表组件集合对象
|
||||
const components: { [K in string]?: any } = {}
|
||||
|
||||
const runtime = {
|
||||
// 变量,管理各种状态
|
||||
variables:reactive({}),
|
||||
// 数据集
|
||||
datasets:reactive({}),
|
||||
// 组件列表 {}
|
||||
components:components,
|
||||
// 帮助类
|
||||
fn:{
|
||||
/**
|
||||
* 选择一个组件
|
||||
* @param selectors string 选择器语法 | component | [component]
|
||||
* @return 第一个符合要求的 component 或 null
|
||||
*/
|
||||
selectOneComponent:(selectors:any)=>{
|
||||
const cList = runtime.fn.selectComponents(selectors)
|
||||
if(cList.length > 0){
|
||||
return cList[0]
|
||||
}
|
||||
return null
|
||||
},
|
||||
/**
|
||||
* 选择组件
|
||||
* @param selectors string 选择器语法 | component | [component]
|
||||
* @return 要求的 [component] 或 []
|
||||
*/
|
||||
selectComponents:(selectors:any):any[]=>{
|
||||
if(!selectors) return []
|
||||
if(typeof selectors == "string") return getComponentsBySelectors(selectors)
|
||||
if(Array.isArray(selectors)) return selectors
|
||||
return [selectors]
|
||||
},
|
||||
/**
|
||||
* 获取组件的值,如果多个,使用第一个
|
||||
* @param selectors string 选择器语法 | component | [component]
|
||||
* @param configName 配置名称
|
||||
* @param params 备用参数,可选
|
||||
* @returns 配置的值
|
||||
*/
|
||||
getChartConfig:(selectors:any, configName:string, params?:any)=>{
|
||||
const component:any = runtime.fn.selectOneComponent(selectors)
|
||||
if(!component && !component.proxy) return null
|
||||
return getOneChartConfig(component, configName, params)
|
||||
},
|
||||
/**
|
||||
* 设置组件的值,支持多个
|
||||
* @param selectors string 选择器语法 | component | [component]
|
||||
* @param configName 配置名称
|
||||
* @param newValue 新值
|
||||
* @param params 备用参数,可选
|
||||
* @returns 配置的值
|
||||
*/
|
||||
setChartConfig:(selectors:any, configName:string, newValue:any, params?:any)=>{
|
||||
const cList:any[] = runtime.fn.selectComponents(selectors)
|
||||
for(let c of cList){
|
||||
if(!c && !c.proxy) return null
|
||||
setOneChartConfig(c, configName, newValue, params)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 调用组件暴露的函数,组件中使用 defineExpose 进行定义
|
||||
* @param selectors string 选择器语法 | component | [component]
|
||||
* @param action 组件中 defineExpose 的函数名
|
||||
* @param params 调用的参数只支持一个参数或没有参数
|
||||
* @returns 无
|
||||
*/
|
||||
callExposed:(selectors:any, action:string, params?:any)=>{
|
||||
const cList:any[] = runtime.fn.selectComponents(selectors)
|
||||
for(let c of cList){
|
||||
if(!c && !c.exposed) return null
|
||||
if(typeof c.exposed[action] == "function") c.exposed[action](params)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 项目提供的npm 包变量
|
||||
export const npmPkgs = { echarts, toRef , watch, computed, runtime }
|
||||
|
||||
export const useLifeHandler = (chartConfig: CreateComponentType) => {
|
||||
const events = chartConfig.events || {}
|
||||
console.log("chartConfig.events")
|
||||
console.log(chartConfig.events)
|
||||
// 生成生命周期事件
|
||||
let lifeEvents = {
|
||||
[EventLife.BEFORE_MOUNT](e: any) {
|
||||
// 存储组件
|
||||
components[chartConfig.id] = e.component
|
||||
const fnStr = (events[EventLife.BEFORE_MOUNT] || '').trim()
|
||||
generateFunc(fnStr, e, e.component)
|
||||
},
|
||||
[EventLife.MOUNTED](e: any) {
|
||||
const fnStr = (events[EventLife.MOUNTED] || '').trim()
|
||||
generateFunc(fnStr, e, e.component)
|
||||
}
|
||||
}
|
||||
// 遍历,按需侦听
|
||||
for(let key in EventLife)
|
||||
{
|
||||
if(key != "BEFORE_MOUNT" && key != "MOUNTED"){
|
||||
const k = EventLife[key as keyof typeof EventLife]
|
||||
const fnStr = (events[<EventLife>k] || '').trim()
|
||||
if(fnStr){
|
||||
lifeEvents[k as keyof typeof lifeEvents] = (e:any) => {
|
||||
const fnStr = (events[<EventLife>k] || '').trim()
|
||||
generateFunc(fnStr, e, components[chartConfig.id])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return lifeEvents
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fnStr 用户方法体代码
|
||||
* @param e 执行生命周期的动态组件实例
|
||||
*/
|
||||
function generateFunc(fnStr: string, e: any, component:any) {
|
||||
if(fnStr == "") return
|
||||
try {
|
||||
// npmPkgs 便于拷贝 echarts 示例时设置option 的formatter等相关内容
|
||||
Function(`
|
||||
"use strict";
|
||||
return (
|
||||
async function(e, components, node_modules){
|
||||
const {${Object.keys(npmPkgs).join()}} = node_modules;
|
||||
${fnStr}
|
||||
}
|
||||
)`)().bind(component)(e, components, npmPkgs)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
23
src/hooks/useSystemInit.hook.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { useSystemStore } from '@/store/modules/systemStore/systemStore'
|
||||
import { SystemStoreEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
import { ResultEnum } from '@/enums/httpEnum'
|
||||
import { ossUrlApi } from '@/api/path/'
|
||||
|
||||
|
||||
// * 初始化
|
||||
export const useSystemInit = async () => {
|
||||
const systemStore = useSystemStore()
|
||||
|
||||
// 获取 OSS 信息
|
||||
const getOssUrl = async () => {
|
||||
const res = await ossUrlApi({}) as unknown as MyResponseType
|
||||
if (res.code === ResultEnum.SUCCESS) {
|
||||
systemStore.setItem(SystemStoreEnum.FETCH_INFO, {
|
||||
OSSUrl: res.data?.bucketURL
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 执行
|
||||
getOssUrl()
|
||||
}
|
||||
@@ -9,7 +9,7 @@ const global = {
|
||||
// header
|
||||
doc: 'Document',
|
||||
help: 'Help',
|
||||
contact: 'About Software',
|
||||
contact: 'Contact Us',
|
||||
logout: 'Logout',
|
||||
logout_success: 'Logout success!',
|
||||
logout_failure: 'Logout Failed!',
|
||||
|
||||
@@ -9,7 +9,7 @@ const global = {
|
||||
// 头部
|
||||
doc: '说明文档',
|
||||
help: '帮助中心',
|
||||
contact: '关于软件',
|
||||
contact: '联系我们',
|
||||
logout: '退出登录',
|
||||
logout_success: '退出成功!',
|
||||
logout_failure: '退出失败!',
|
||||
|
||||
@@ -1,56 +1,40 @@
|
||||
export const axisConfig = {
|
||||
// X轴位置
|
||||
xposition: [
|
||||
{
|
||||
label: '顶部',
|
||||
label: 'top',
|
||||
value: 'top'
|
||||
},
|
||||
{
|
||||
label: '底部',
|
||||
label: 'bottom',
|
||||
value: 'bottom'
|
||||
}
|
||||
],
|
||||
// Y轴位置
|
||||
yposition: [
|
||||
{
|
||||
label: '左侧',
|
||||
label: 'left',
|
||||
value: 'left'
|
||||
},
|
||||
{
|
||||
label: '右侧',
|
||||
label: 'right',
|
||||
value: 'right'
|
||||
}
|
||||
],
|
||||
// 线条
|
||||
splitLint: {
|
||||
lineStyle: {
|
||||
type: [
|
||||
{
|
||||
label: '实线',
|
||||
label: 'solid',
|
||||
value: 'solid'
|
||||
},
|
||||
{
|
||||
label: '虚线',
|
||||
label: 'dashed',
|
||||
value: 'dashed'
|
||||
},
|
||||
{
|
||||
label: '点线',
|
||||
label: 'dotted',
|
||||
value: 'dotted'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
// 视觉映射
|
||||
visualMap: {
|
||||
orient: [
|
||||
{
|
||||
label: '竖直',
|
||||
value: 'vertical'
|
||||
},
|
||||
{
|
||||
label: '水平',
|
||||
value: 'horizontal'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,11 @@
|
||||
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
|
||||
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
|
||||
import { BarCommonConfig } from './index'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
import dataJson from './data.json'
|
||||
|
||||
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
|
||||
export const seriesItem = {
|
||||
type: 'bar',
|
||||
barWidth: 15,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color: '#fff',
|
||||
fontSize: 12
|
||||
},
|
||||
itemStyle: {
|
||||
color: null,
|
||||
borderRadius: 2
|
||||
}
|
||||
}
|
||||
export const includes = ['legend', 'xAxis', 'yAxis']
|
||||
|
||||
export const option = {
|
||||
tooltip: {
|
||||
show: true,
|
||||
@@ -28,7 +15,10 @@ export const option = {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
legend: {
|
||||
show: true
|
||||
},
|
||||
xAxis: {
|
||||
show: true,
|
||||
type: 'category'
|
||||
},
|
||||
@@ -37,10 +27,27 @@ xAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
dataset: { ...dataJson },
|
||||
series: [seriesItem, seriesItem]
|
||||
series: [
|
||||
{
|
||||
type: 'bar',
|
||||
barWidth: null,
|
||||
itemStyle: {
|
||||
color: null,
|
||||
borderRadius: 0
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'bar',
|
||||
barWidth: null,
|
||||
itemStyle: {
|
||||
color: null,
|
||||
borderRadius: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||
export default class Config extends publicConfig implements CreateComponentType {
|
||||
public key = BarCommonConfig.key
|
||||
public chartConfig = cloneDeep(BarCommonConfig)
|
||||
// 图表配置项
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
<template>
|
||||
<!-- Echarts 全局设置 -->
|
||||
<global-setting :optionData="optionData"></global-setting>
|
||||
<CollapseItem v-for="(item, index) in seriesList" :key="index" :name="`柱状图-${index + 1}`" :expanded="true">
|
||||
<CollapseItem
|
||||
v-for="(item, index) in seriesList"
|
||||
:key="index"
|
||||
:name="`柱状图-${index + 1}`"
|
||||
:expanded="true"
|
||||
>
|
||||
<SettingItemBox name="图形">
|
||||
<SettingItem name="颜色">
|
||||
<n-color-picker size="small" :modes="['hex']" v-model:value="item.itemStyle.color"></n-color-picker>
|
||||
<n-color-picker
|
||||
size="small"
|
||||
:modes="['hex']"
|
||||
v-model:value="item.itemStyle.color"
|
||||
></n-color-picker>
|
||||
</SettingItem>
|
||||
<SettingItem>
|
||||
<n-button size="small" @click="item.itemStyle.color = null"> 恢复默认 </n-button>
|
||||
<n-button size="small" @click="item.itemStyle.color = null">
|
||||
恢复默认
|
||||
</n-button>
|
||||
</SettingItem>
|
||||
<SettingItem name="宽度">
|
||||
<n-input-number
|
||||
@@ -19,40 +28,26 @@
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
<SettingItem name="圆角">
|
||||
<n-input-number v-model:value="item.itemStyle.borderRadius" :min="0" size="small"></n-input-number>
|
||||
<n-input-number
|
||||
v-model:value="item.itemStyle.borderRadius"
|
||||
:min="0"
|
||||
size="small"
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
<setting-item-box name="标签">
|
||||
<setting-item>
|
||||
<n-space>
|
||||
<n-switch v-model:value="item.label.show" size="small" />
|
||||
<n-text>展示标签</n-text>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="item.label.fontSize" size="small" :min="1"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker size="small" :modes="['hex']" v-model:value="item.label.color"></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="位置">
|
||||
<n-select
|
||||
v-model:value="item.label.position"
|
||||
:options="[
|
||||
{ label: 'top', value: 'top' },
|
||||
{ label: 'left', value: 'left' },
|
||||
{ label: 'right', value: 'right' },
|
||||
{ label: 'bottom', value: 'bottom' }
|
||||
]"
|
||||
/>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</CollapseItem>
|
||||
<!-- Echarts 全局设置 -->
|
||||
<global-setting :optionData="optionData" :in-chart="true"></global-setting>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType, computed } from 'vue'
|
||||
import { GlobalSetting, CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||
import {
|
||||
GlobalSetting,
|
||||
CollapseItem,
|
||||
SettingItemBox,
|
||||
SettingItem
|
||||
} from '@/components/Pages/ChartItemSetting'
|
||||
import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -1,30 +1,25 @@
|
||||
<template>
|
||||
<v-chart
|
||||
ref="vChartRef"
|
||||
:theme="themeColor"
|
||||
:option="option"
|
||||
:manual-update="isPreview()"
|
||||
:update-options="{
|
||||
replaceMerge: replaceMergeArr
|
||||
}"
|
||||
autoresize
|
||||
></v-chart>
|
||||
<v-chart ref="vChartRef" :theme="themeColor" :option="option" :manual-update="isPreview()" autoresize></v-chart>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, computed, watch, PropType } from 'vue'
|
||||
import { computed, PropType } from 'vue'
|
||||
import VChart from 'vue-echarts'
|
||||
import { use } from 'echarts/core'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import { BarChart } from 'echarts/charts'
|
||||
import config, { includes, seriesItem } from './config'
|
||||
import { includes } from './config'
|
||||
import { mergeTheme } from '@/packages/public/chart'
|
||||
import { useChartDataFetch } from '@/hooks'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { isPreview } from '@/utils'
|
||||
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
import isObject from 'lodash/isObject'
|
||||
import {
|
||||
DatasetComponent,
|
||||
GridComponent,
|
||||
TooltipComponent,
|
||||
LegendComponent
|
||||
} from 'echarts/components'
|
||||
|
||||
const props = defineProps({
|
||||
themeSetting: {
|
||||
@@ -36,44 +31,23 @@ const props = defineProps({
|
||||
required: true
|
||||
},
|
||||
chartConfig: {
|
||||
type: Object as PropType<config>,
|
||||
type: Object as PropType<CreateComponentType>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent, LegendComponent])
|
||||
|
||||
const replaceMergeArr = ref<string[]>()
|
||||
use([
|
||||
DatasetComponent,
|
||||
CanvasRenderer,
|
||||
BarChart,
|
||||
GridComponent,
|
||||
TooltipComponent,
|
||||
LegendComponent
|
||||
])
|
||||
|
||||
const option = computed(() => {
|
||||
return mergeTheme(props.chartConfig.option, props.themeSetting, includes)
|
||||
})
|
||||
|
||||
// dataset 无法变更条数的补丁
|
||||
watch(
|
||||
() => props.chartConfig.option.dataset,
|
||||
(newData: { dimensions: any }, oldData) => {
|
||||
try {
|
||||
if (!isObject(newData) || !('dimensions' in newData)) return
|
||||
if (Array.isArray(newData?.dimensions)) {
|
||||
const seriesArr = []
|
||||
for (let i = 0; i < newData.dimensions.length - 1; i++) {
|
||||
seriesArr.push(seriesItem)
|
||||
}
|
||||
replaceMergeArr.value = ['series']
|
||||
props.chartConfig.option.series = seriesArr
|
||||
nextTick(() => {
|
||||
replaceMergeArr.value = []
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: false
|
||||
}
|
||||
)
|
||||
|
||||
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore)
|
||||
</script>
|
||||
|
||||
@@ -1,46 +1,55 @@
|
||||
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
|
||||
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
|
||||
import { BarCrossrangeConfig } from './index'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
import dataJson from './data.json'
|
||||
|
||||
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
|
||||
export const seriesItem = {
|
||||
type: 'bar',
|
||||
barWidth: null,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'right',
|
||||
color: '#fff',
|
||||
fontSize: 12
|
||||
},
|
||||
itemStyle: {
|
||||
color: null,
|
||||
borderRadius: 0
|
||||
}
|
||||
}
|
||||
export const includes = ['legend', 'xAxis', 'yAxis']
|
||||
|
||||
export const option = {
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
show: true,
|
||||
type: 'shadow'
|
||||
}
|
||||
type: 'shadow',
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
show: true,
|
||||
},
|
||||
xAxis: {
|
||||
show: true,
|
||||
type: 'value'
|
||||
type: 'value',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||
},
|
||||
yAxis: {
|
||||
show: true,
|
||||
type: 'category'
|
||||
type: 'category',
|
||||
},
|
||||
dataset: { ...dataJson },
|
||||
series: [seriesItem, seriesItem]
|
||||
series: [
|
||||
{
|
||||
type: 'bar',
|
||||
barWidth: null,
|
||||
itemStyle: {
|
||||
color: null,
|
||||
borderRadius: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'bar',
|
||||
barWidth: null,
|
||||
itemStyle: {
|
||||
color: null,
|
||||
borderRadius: 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||
export default class Config extends publicConfig
|
||||
implements CreateComponentType {
|
||||
public key = BarCrossrangeConfig.key
|
||||
public chartConfig = cloneDeep(BarCrossrangeConfig)
|
||||
// 图表配置项
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<template>
|
||||
<!-- Echarts 全局设置 -->
|
||||
<global-setting :optionData="optionData"></global-setting>
|
||||
<CollapseItem v-for="(item, index) in seriesList" :key="index" :name="`柱状图-${index+1}`" :expanded="true">
|
||||
<SettingItemBox name="图形">
|
||||
<SettingItem name="颜色">
|
||||
@@ -26,40 +24,9 @@
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
<setting-item-box name="标签">
|
||||
<setting-item>
|
||||
<n-space>
|
||||
<n-switch v-model:value="item.label.show" size="small" />
|
||||
<n-text>展示标签</n-text>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number
|
||||
v-model:value="item.label.fontSize"
|
||||
size="small"
|
||||
:min="1"
|
||||
></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker
|
||||
size="small"
|
||||
:modes="['hex']"
|
||||
v-model:value="item.label.color"
|
||||
></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="位置">
|
||||
<n-select
|
||||
v-model:value="item.label.position"
|
||||
:options="[
|
||||
{ label: 'top', value: 'top' },
|
||||
{ label: 'left', value: 'left' },
|
||||
{ label: 'right', value: 'right' },
|
||||
{ label: 'bottom', value: 'bottom' },
|
||||
]"
|
||||
/>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</CollapseItem>
|
||||
<!-- Echarts 全局设置 -->
|
||||
<global-setting :optionData="optionData" :in-chart="true"></global-setting>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
@@ -1,29 +1,24 @@
|
||||
<template>
|
||||
<v-chart
|
||||
ref="vChartRef"
|
||||
:theme="themeColor"
|
||||
:option="option"
|
||||
:manual-update="isPreview()"
|
||||
:update-options="{
|
||||
replaceMerge: replaceMergeArr
|
||||
}"
|
||||
autoresize
|
||||
></v-chart>
|
||||
<v-chart ref="vChartRef" :theme="themeColor" :option="option" :manual-update="isPreview()" autoresize></v-chart>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, computed, watch, PropType } from 'vue'
|
||||
import { computed, PropType } from 'vue'
|
||||
import VChart from 'vue-echarts'
|
||||
import { use } from 'echarts/core'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import { BarChart } from 'echarts/charts'
|
||||
import { mergeTheme } from '@/packages/public/chart'
|
||||
import config, { includes, seriesItem } from './config'
|
||||
import config, { includes } from './config'
|
||||
import { useChartDataFetch } from '@/hooks'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { isPreview } from '@/utils'
|
||||
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
import isObject from 'lodash/isObject'
|
||||
import {
|
||||
DatasetComponent,
|
||||
GridComponent,
|
||||
TooltipComponent,
|
||||
LegendComponent,
|
||||
} from 'echarts/components'
|
||||
|
||||
const props = defineProps({
|
||||
themeSetting: {
|
||||
@@ -40,39 +35,18 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent, LegendComponent])
|
||||
|
||||
const replaceMergeArr = ref<string[]>()
|
||||
use([
|
||||
DatasetComponent,
|
||||
CanvasRenderer,
|
||||
BarChart,
|
||||
GridComponent,
|
||||
TooltipComponent,
|
||||
LegendComponent,
|
||||
])
|
||||
|
||||
const option = computed(() => {
|
||||
return mergeTheme(props.chartConfig.option, props.themeSetting, includes)
|
||||
})
|
||||
|
||||
// dataset 无法变更条数的补丁
|
||||
watch(
|
||||
() => props.chartConfig.option.dataset,
|
||||
(newData: { dimensions: any }, oldData) => {
|
||||
try {
|
||||
if (!isObject(newData) || !('dimensions' in newData)) return
|
||||
if (Array.isArray(newData?.dimensions)) {
|
||||
const seriesArr = []
|
||||
for (let i = 0; i < newData.dimensions.length - 1; i++) {
|
||||
seriesArr.push(seriesItem)
|
||||
}
|
||||
replaceMergeArr.value = ['series']
|
||||
props.chartConfig.option.series = seriesArr
|
||||
nextTick(() => {
|
||||
replaceMergeArr.value = []
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: false
|
||||
}
|
||||
)
|
||||
|
||||
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore)
|
||||
</script>
|
||||
|
||||
@@ -1,29 +1,10 @@
|
||||
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
|
||||
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
|
||||
import { LineCommonConfig } from './index'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { defaultTheme, chartColorsSearch } from '@/settings/chartThemes/index'
|
||||
import dataJson from './data.json'
|
||||
|
||||
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
|
||||
export const seriesItem = {
|
||||
type: 'line',
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color: '#fff',
|
||||
fontSize: 12
|
||||
},
|
||||
symbolSize: 5, //设定实心点的大小
|
||||
itemStyle: {
|
||||
color: null,
|
||||
borderRadius: 0
|
||||
},
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
width: 3,
|
||||
color: null
|
||||
}
|
||||
}
|
||||
export const includes = ['legend', 'xAxis', 'yAxis']
|
||||
|
||||
export const option = {
|
||||
tooltip: {
|
||||
@@ -33,19 +14,48 @@ export const option = {
|
||||
type: 'line'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: true
|
||||
},
|
||||
xAxis: {
|
||||
show: true,
|
||||
type: 'category'
|
||||
type: 'category',
|
||||
},
|
||||
yAxis: {
|
||||
show: true,
|
||||
type: 'value'
|
||||
},
|
||||
dataset: { ...dataJson },
|
||||
series: [seriesItem, seriesItem]
|
||||
series: [
|
||||
{
|
||||
type: 'line',
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
width: 3,
|
||||
color: {
|
||||
type: 'linear',
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: chartColorsSearch[defaultTheme][0] // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: chartColorsSearch[defaultTheme][1] // 100% 处的颜色
|
||||
}
|
||||
],
|
||||
globalCoord: false // 缺省为 false
|
||||
},
|
||||
shadowColor: chartColorsSearch[defaultTheme][2],
|
||||
shadowBlur: 10,
|
||||
shadowOffsetY: 20
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||
export default class Config extends publicConfig
|
||||
implements CreateComponentType {
|
||||
public key: string = LineCommonConfig.key
|
||||
public chartConfig = LineCommonConfig
|
||||
// 图表配置项
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
<template>
|
||||
<!-- Echarts 全局设置 -->
|
||||
<global-setting :optionData="optionData"></global-setting>
|
||||
<CollapseItem v-for="(item, index) in seriesList" :key="index" :name="`折线图-${index + 1}`" :expanded="true">
|
||||
<CollapseItem
|
||||
v-for="(item, index) in seriesList"
|
||||
:key="index"
|
||||
:name="`折线图-${index + 1}`"
|
||||
:expanded="true"
|
||||
>
|
||||
<SettingItemBox name="线条">
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker size="small" :modes="['hex']" v-model:value="item.lineStyle.color"></n-color-picker>
|
||||
</setting-item>
|
||||
<SettingItem name="颜色">
|
||||
<n-color-picker
|
||||
size="small"
|
||||
:modes="['hex']"
|
||||
v-model:value="item.lineStyle.color.colorStops[0].color"
|
||||
></n-color-picker>
|
||||
</SettingItem>
|
||||
<SettingItem name="颜色">
|
||||
<n-color-picker
|
||||
size="small"
|
||||
:modes="['hex']"
|
||||
v-model:value="item.lineStyle.color.colorStops[1].color"
|
||||
></n-color-picker>
|
||||
</SettingItem>
|
||||
<SettingItem name="宽度">
|
||||
<n-input-number
|
||||
v-model:value="item.lineStyle.width"
|
||||
@@ -13,56 +27,51 @@
|
||||
:max="100"
|
||||
size="small"
|
||||
placeholder="自动计算"
|
||||
></n-input-number>
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
<SettingItem name="类型">
|
||||
<n-select v-model:value="item.lineStyle.type" size="small" :options="lineConf.lineStyle.type"></n-select>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
<SettingItemBox name="实心点">
|
||||
<SettingItem name="大小">
|
||||
<n-input-number
|
||||
v-model:value="item.symbolSize"
|
||||
:min="1"
|
||||
:max="100"
|
||||
size="small"
|
||||
placeholder="自动计算"
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
<setting-item-box name="标签">
|
||||
<setting-item>
|
||||
<n-space>
|
||||
<n-switch v-model:value="item.label.show" size="small" />
|
||||
<n-text>展示标签</n-text>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="item.label.fontSize" size="small" :min="1"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker size="small" :modes="['hex']" v-model:value="item.label.color"></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="位置">
|
||||
<n-select
|
||||
v-model:value="item.label.position"
|
||||
:options="[
|
||||
{ label: 'top', value: 'top' },
|
||||
{ label: 'left', value: 'left' },
|
||||
{ label: 'right', value: 'right' },
|
||||
{ label: 'bottom', value: 'bottom' }
|
||||
]"
|
||||
/>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
v-model:value="item.lineStyle.type"
|
||||
size="small"
|
||||
:options="lineConf.lineStyle.type"
|
||||
></n-select>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
<SettingItemBox name="阴影" :alone="true">
|
||||
<SettingItem name="颜色">
|
||||
<n-color-picker
|
||||
size="small"
|
||||
:modes="['hex']"
|
||||
v-model:value="item.lineStyle.shadowColor"
|
||||
></n-color-picker>
|
||||
</SettingItem>
|
||||
|
||||
</SettingItemBox>
|
||||
<SettingItemBox name="设置">
|
||||
<SettingItem name="阴影">
|
||||
<n-button
|
||||
size="small"
|
||||
@click="item.lineStyle.shadowColor = 'rgba(0, 0, 0, 0)'"
|
||||
>
|
||||
去除阴影
|
||||
</n-button>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
</CollapseItem>
|
||||
<!-- Echarts 全局设置 -->
|
||||
<global-setting :optionData="optionData" :in-chart="true"></global-setting>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType, computed } from 'vue'
|
||||
import { lineConf } from '@/packages/chartConfiguration/echarts/index'
|
||||
import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
|
||||
import { GlobalSetting, CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||
import {
|
||||
GlobalSetting,
|
||||
CollapseItem,
|
||||
SettingItemBox,
|
||||
SettingItem
|
||||
} from '@/components/Pages/ChartItemSetting'
|
||||
|
||||
const props = defineProps({
|
||||
optionData: {
|
||||
|
||||