Compare commits
873 Commits
dev-vchart
...
v1.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59cb5d609d | ||
|
|
4add9ce4c6 | ||
|
|
c75d9f7a59 | ||
|
|
2d94085c54 | ||
|
|
2a6e5915f5 | ||
|
|
d835a904c9 | ||
|
|
a5bf0e9f6a | ||
|
|
7e3efa46ee | ||
|
|
ce68910e48 | ||
|
|
6dce639a0e | ||
|
|
c738103fec | ||
|
|
801f298448 | ||
|
|
e08a7723b6 | ||
|
|
166b5b98e8 | ||
|
|
07e56631da | ||
|
|
1435789a6c | ||
|
|
7c5fa7610d | ||
|
|
084e680e12 | ||
|
|
380a6b95b7 | ||
|
|
9467feff23 | ||
|
|
a6f4267915 | ||
|
|
cfe9efd4dd | ||
|
|
971b03620a | ||
|
|
c84f6d9c33 | ||
|
|
e187c012cc | ||
|
|
af1c280f28 | ||
|
|
016e48cc69 | ||
|
|
6dcd39983f | ||
|
|
b055b6c511 | ||
|
|
293259a97d | ||
|
|
7584c79519 | ||
|
|
d9bb0bf61d | ||
|
|
cbb401840c | ||
|
|
1d18c86dc7 | ||
|
|
f8b8624244 | ||
|
|
785a4d97f7 | ||
|
|
9da073e838 | ||
|
|
1764c0de08 | ||
|
|
79fd809993 | ||
|
|
d3a0d36c92 | ||
|
|
0841e632c2 | ||
|
|
d8f8ef032d | ||
|
|
b7f84dbb0d | ||
|
|
17f1a7ce9d | ||
|
|
ca69331286 | ||
|
|
8258ad21d7 | ||
|
|
2a129d0ee3 | ||
|
|
e391520ce3 | ||
|
|
3e8329c31f | ||
|
|
19d7b1be77 | ||
|
|
ee8a05b6e6 | ||
|
|
111f5bdcfb | ||
|
|
4c1b955bd5 | ||
|
|
ad6614e338 | ||
|
|
57c730a7eb | ||
|
|
e1ec5d15ee | ||
|
|
4496e17d45 | ||
|
|
28668f2acb | ||
|
|
87440362ac | ||
|
|
f470817c01 | ||
|
|
4d9330983a | ||
|
|
edecfc7116 | ||
|
|
d4f3b97b3d | ||
|
|
48d17f9244 | ||
|
|
a96fa8f4b7 | ||
|
|
a81c6e1756 | ||
|
|
b3255ab28b | ||
|
|
75b5103637 | ||
|
|
ddee71fc0d | ||
|
|
18ea1a575c | ||
|
|
3e4cc376f9 | ||
|
|
f17c22793b | ||
|
|
965f734618 | ||
|
|
fc1258319e | ||
|
|
7d17e2b332 | ||
|
|
5a79fc4f2d | ||
|
|
db8fd7582b | ||
|
|
daa6458a26 | ||
|
|
b6ac93ae63 | ||
|
|
87e7c4bee2 | ||
|
|
4adc46dd79 | ||
|
|
73f6d6a622 | ||
|
|
b98c3166f2 | ||
|
|
b7503a841a | ||
|
|
0eb3123848 | ||
|
|
a637cd783c | ||
|
|
8530e9bc5e | ||
|
|
f18c05519d | ||
|
|
cbeddb2460 | ||
|
|
be84e64f00 | ||
|
|
34210104d4 | ||
|
|
035586c9ef | ||
|
|
7f52ef9843 | ||
|
|
ca9b33da88 | ||
|
|
c7f64ceb00 | ||
|
|
11d4f86551 | ||
|
|
00aaf3427a | ||
|
|
3e72a0e440 | ||
|
|
0a1023f795 | ||
|
|
71471bac27 | ||
|
|
972c92519c | ||
|
|
617b940d64 | ||
|
|
8d36a857eb | ||
|
|
59ff14aec4 | ||
|
|
3c39d5db9d | ||
|
|
3980cc584f | ||
|
|
2167525312 | ||
|
|
e724822198 | ||
|
|
0d1abd00a1 | ||
|
|
62aec195ea | ||
|
|
9692945716 | ||
|
|
b8dab8c87d | ||
|
|
a6646be66b | ||
|
|
8cfb54aab1 | ||
|
|
960f3aa3cf | ||
|
|
43f35de27a | ||
|
|
d39ce294b8 | ||
|
|
e7349bfae9 | ||
|
|
ad1ff249aa | ||
|
|
3fed2bb5e0 | ||
|
|
67995ac461 | ||
|
|
39d9aa1896 | ||
|
|
895fd25627 | ||
|
|
7582cac69a | ||
|
|
790917eaf2 | ||
|
|
18d83f161e | ||
|
|
42e9e5edce | ||
|
|
31450e0eac | ||
|
|
34d799049d | ||
|
|
92bf26ced5 | ||
|
|
6214c17903 | ||
|
|
f1e801340f | ||
|
|
4105883ab6 | ||
|
|
feb39bde44 | ||
|
|
ae4ae074d8 | ||
|
|
2ed1b4bf23 | ||
|
|
e4ed2392bb | ||
|
|
ae32b9838b | ||
|
|
f126fc3d04 | ||
|
|
3ac03973fb | ||
|
|
96384d7b39 | ||
|
|
20f720bf27 | ||
|
|
642de9a78c | ||
|
|
b8a1fd904b | ||
|
|
31c63130d6 | ||
|
|
6a7c2bca9a | ||
|
|
369a8ade42 | ||
|
|
6e19ed2dce | ||
|
|
ed5dd5e122 | ||
|
|
854ff4b888 | ||
|
|
9bdf42a057 | ||
|
|
ad60b7b44c | ||
|
|
58033530c1 | ||
|
|
fa0c570f90 | ||
|
|
73bb93f166 | ||
|
|
696a363591 | ||
|
|
45737c8f7a | ||
|
|
25077b91ca | ||
|
|
8487a1b159 | ||
|
|
4141d00409 | ||
|
|
924a173d6b | ||
|
|
368ae13db6 | ||
|
|
5c5c0b02df | ||
|
|
888ad61cf2 | ||
|
|
cfa7f59b0b | ||
|
|
3fc6012145 | ||
|
|
463b14736f | ||
|
|
d37034cb52 | ||
|
|
c9d61128bf | ||
|
|
810f4d8e6d | ||
|
|
1bd0f516e2 | ||
|
|
336ef369cc | ||
|
|
efcb25153e | ||
|
|
f8aafd0e0b | ||
|
|
fdb19fb310 | ||
|
|
d497e17a7d | ||
|
|
287097ceed | ||
|
|
789f24d89d | ||
|
|
8c370c550e | ||
|
|
d8fa5784bf | ||
|
|
1baa18888f | ||
|
|
9644b22896 | ||
|
|
5312ba5a45 | ||
|
|
545e9f6571 | ||
|
|
42093e2a32 | ||
|
|
f7d23ff830 | ||
|
|
049d3fb911 | ||
|
|
18947db22b | ||
|
|
dbd49a05bd | ||
|
|
df07169005 | ||
|
|
21fe89adf6 | ||
|
|
49956d32cc | ||
|
|
b75667d92c | ||
|
|
c9848e7b01 | ||
|
|
e2cda9140b | ||
|
|
e091eb7b64 | ||
|
|
aa3a5fbf84 | ||
|
|
f1ed9c848a | ||
|
|
c2bcc51797 | ||
|
|
2c7192b40c | ||
|
|
6b81559d4c | ||
|
|
15e9a0c0f5 | ||
|
|
8085640ea6 | ||
|
|
5eb851fc82 | ||
|
|
24ede6ac4f | ||
|
|
d39a8c293f | ||
|
|
c44dd111db | ||
|
|
5763ff0d57 | ||
|
|
76f4a73525 | ||
|
|
bf45cd607d | ||
|
|
9c0f1f793f | ||
|
|
674131a0ae | ||
|
|
43438594d2 | ||
|
|
5af0b60644 | ||
|
|
35313f2ce8 | ||
|
|
d01b8b2b15 | ||
|
|
8f061e5c3b | ||
|
|
0c596c69cf | ||
|
|
390eec99a2 | ||
|
|
fe77d88936 | ||
|
|
e4bc388faa | ||
|
|
255c47a8e1 | ||
|
|
03f8dee9d4 | ||
|
|
2b34a01845 | ||
|
|
4e435d4f29 | ||
|
|
89a6e5db20 | ||
|
|
f43f744c3e | ||
|
|
7b9ca460a6 | ||
|
|
1c0a923771 | ||
|
|
76112345f2 | ||
|
|
7985db16f1 | ||
|
|
bec5868068 | ||
|
|
ac8d77a53f | ||
|
|
826d294690 | ||
|
|
23075b7bdd | ||
|
|
096d63cbac | ||
|
|
acc9dc7751 | ||
|
|
4eca4c607a | ||
|
|
fe22e1d330 | ||
|
|
085c393767 | ||
|
|
df10ae58f4 | ||
|
|
714dac93bc | ||
|
|
2589cad06e | ||
|
|
2ae3461a9c | ||
|
|
bb16fa51d0 | ||
|
|
36bfbf900a | ||
|
|
d89b22a8f7 | ||
|
|
159a165457 | ||
|
|
199c6abcb1 | ||
|
|
96a41f8ebc | ||
|
|
ac3f5567c5 | ||
|
|
9fd85761d7 | ||
|
|
130e4a3659 | ||
|
|
0107643e7e | ||
|
|
9fea20cb79 | ||
|
|
a1233aa1fe | ||
|
|
558512220e | ||
|
|
177fa6bfbe | ||
|
|
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 | ||
|
|
0998fc5376 | ||
|
|
ba52c55158 | ||
|
|
27d78c6b4d | ||
|
|
1b68c39d5d | ||
|
|
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 | ||
|
|
bb32edf264 | ||
|
|
db00fcf372 | ||
|
|
801f6e8d18 | ||
|
|
88abcf8a4a | ||
|
|
410dc4fc58 | ||
|
|
ddee396cea | ||
|
|
2cb65c623e | ||
|
|
f612b62b0a | ||
|
|
84fd1b2181 | ||
|
|
ce925e0f45 | ||
|
|
67da33931a | ||
|
|
a58eb4a53c | ||
|
|
3f3caae4fc | ||
|
|
417821b72d | ||
|
|
b1ae4c3712 | ||
|
|
0705fb8b0f | ||
|
|
6a90d1a043 | ||
|
|
74e30390cf | ||
|
|
4ba3d8803a | ||
|
|
f53f4d57f2 | ||
|
|
33d78ffcda | ||
|
|
9e6873e1da | ||
|
|
47f6fc87c7 | ||
|
|
2ee2783a9c | ||
|
|
3a066fc9bb | ||
|
|
16b703f317 | ||
|
|
3537427846 | ||
|
|
8693a11a32 | ||
|
|
2259545094 | ||
|
|
e09d014fa6 | ||
|
|
8c74b8e8df | ||
|
|
c3b6bcec65 | ||
|
|
633bf987ab | ||
|
|
bf1b81e554 | ||
|
|
729021f37c | ||
|
|
bde2634ef3 | ||
|
|
d6da6f759d | ||
|
|
32f851e57b | ||
|
|
30e7e7ab7c | ||
|
|
cfa69baaa3 | ||
|
|
78626b3c04 | ||
|
|
340492f784 | ||
|
|
6cecbb6ec2 | ||
|
|
665ebd7b17 | ||
|
|
c07d7c7c28 | ||
|
|
a0c8bc7fe5 | ||
|
|
0f73536ce0 | ||
|
|
455e387a62 | ||
|
|
99467f87ff | ||
|
|
f7d3a0b499 | ||
|
|
1c54b81212 | ||
|
|
6d6fa04a4b | ||
|
|
954de6d58b | ||
|
|
a0ecfa7264 | ||
|
|
54f9c065c8 | ||
|
|
b8705c4f31 | ||
|
|
588cc380cd | ||
|
|
5eca551271 | ||
|
|
5522837b00 | ||
|
|
29fd85254b | ||
|
|
61af1674b9 | ||
|
|
d8ccff8de5 | ||
|
|
e29c427f8d | ||
|
|
b8d0d1a2ff | ||
|
|
ffa127593a | ||
|
|
f9c17c732a | ||
|
|
427c5589b2 | ||
|
|
b618f9e865 | ||
|
|
2182c7d34a | ||
|
|
9482e9aba3 | ||
|
|
6d5651fd1d | ||
|
|
c195b69003 | ||
|
|
8216cd7604 | ||
|
|
8d691f2d69 | ||
|
|
09d8c58e73 | ||
|
|
0823bf1d9c | ||
|
|
43e8b9939b | ||
|
|
c792482c60 | ||
|
|
e48ca421d8 | ||
|
|
ac23d4c8dc | ||
|
|
68b49ea710 | ||
|
|
99287497cc | ||
|
|
70f9df7650 | ||
|
|
8b39ec2773 | ||
|
|
eafbcb2cde | ||
|
|
f8f5bc7688 | ||
|
|
0335b379ea | ||
|
|
3c221345dd | ||
|
|
13bcf3c649 | ||
|
|
58fee4a86f | ||
|
|
a22e4b814b | ||
|
|
c249c120c1 | ||
|
|
c8d016e1b4 | ||
|
|
2e6d87ab80 | ||
|
|
5c07885a4e | ||
|
|
5f8db36888 | ||
|
|
ce34a7ed2a | ||
|
|
b3422eaede | ||
|
|
8b57ffa124 | ||
|
|
dcbaf37a69 | ||
|
|
741ba1a039 | ||
|
|
80176e5737 | ||
|
|
04ed5d354d | ||
|
|
fa678e1089 | ||
|
|
8575d27504 | ||
|
|
fa6ef30cd8 | ||
|
|
14402e6674 | ||
|
|
0915e162fd | ||
|
|
fffe49cd0f | ||
|
|
94fc6138a0 | ||
|
|
4f248e57c8 | ||
|
|
e5bf08f709 | ||
|
|
d61769f9b8 | ||
|
|
0ec9fd8534 | ||
|
|
fcf8d9d99d | ||
|
|
6c91fca4e7 | ||
|
|
e01292376f | ||
|
|
1c5c867a19 | ||
|
|
dde5ae796e | ||
|
|
64992c59b7 | ||
|
|
c3aae6e5fa | ||
|
|
2a44fd3ca4 | ||
|
|
68512206f7 | ||
|
|
88073e97af | ||
|
|
e8642d0301 | ||
|
|
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 |
2
.gitignore
vendored
@@ -4,5 +4,3 @@ dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.vscode
|
||||
.idea
|
||||
pnpm-lock
|
||||
@@ -1,51 +0,0 @@
|
||||
version: '1.0'
|
||||
name: branch-pipeline
|
||||
displayName: BranchPipeline
|
||||
stages:
|
||||
- stage:
|
||||
name: compile
|
||||
displayName: 编译
|
||||
steps:
|
||||
- step: build@nodejs
|
||||
name: build_nodejs
|
||||
displayName: Nodejs 构建
|
||||
# 支持8.16.2、10.17.0、12.16.1、14.16.0、15.12.0五个版本
|
||||
nodeVersion: 14.16.0
|
||||
# 构建命令:安装依赖 -> 清除上次打包产物残留 -> 执行构建 【请根据项目实际产出进行填写】
|
||||
commands:
|
||||
- npm install && rm -rf ./dist && npm run build
|
||||
# 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
|
||||
artifacts:
|
||||
# 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
|
||||
- name: BUILD_ARTIFACT
|
||||
# 构建产物获取路径,是指代码编译完毕之后构建物的所在路径
|
||||
path:
|
||||
- ./dist
|
||||
- step: publish@general_artifacts
|
||||
name: publish_general_artifacts
|
||||
displayName: 上传制品
|
||||
# 上游构建任务定义的产物名,默认BUILD_ARTIFACT
|
||||
dependArtifact: BUILD_ARTIFACT
|
||||
# 上传到制品库时的制品命名,默认output
|
||||
artifactName: output
|
||||
dependsOn: build_nodejs
|
||||
- stage:
|
||||
name: release
|
||||
displayName: 发布
|
||||
steps:
|
||||
- step: publish@release_artifacts
|
||||
name: publish_release_artifacts
|
||||
displayName: '发布'
|
||||
# 上游上传制品任务的产出
|
||||
dependArtifact: output
|
||||
# 发布制品版本号
|
||||
version: '1.0.0.0'
|
||||
# 是否开启版本号自增,默认开启
|
||||
autoIncrement: true
|
||||
triggers:
|
||||
push:
|
||||
branches:
|
||||
exclude:
|
||||
- master
|
||||
include:
|
||||
- .*
|
||||
@@ -1,49 +0,0 @@
|
||||
version: '1.0'
|
||||
name: master-pipeline
|
||||
displayName: MasterPipeline
|
||||
stages:
|
||||
- stage:
|
||||
name: compile
|
||||
displayName: 编译
|
||||
steps:
|
||||
- step: build@nodejs
|
||||
name: build_nodejs
|
||||
displayName: Nodejs 构建
|
||||
# 支持8.16.2、10.17.0、12.16.1、14.16.0、15.12.0五个版本
|
||||
nodeVersion: 14.16.0
|
||||
# 构建命令:安装依赖 -> 清除上次打包产物残留 -> 执行构建 【请根据项目实际产出进行填写】
|
||||
commands:
|
||||
- npm install && rm -rf ./dist && npm run build
|
||||
# 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
|
||||
artifacts:
|
||||
# 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
|
||||
- name: BUILD_ARTIFACT
|
||||
# 构建产物获取路径,是指代码编译完毕之后构建物的所在路径
|
||||
path:
|
||||
- ./dist
|
||||
- step: publish@general_artifacts
|
||||
name: publish_general_artifacts
|
||||
displayName: 上传制品
|
||||
# 上游构建任务定义的产物名,默认BUILD_ARTIFACT
|
||||
dependArtifact: BUILD_ARTIFACT
|
||||
# 上传到制品库时的制品命名,默认output
|
||||
artifactName: output
|
||||
dependsOn: build_nodejs
|
||||
- stage:
|
||||
name: release
|
||||
displayName: 发布
|
||||
steps:
|
||||
- step: publish@release_artifacts
|
||||
name: publish_release_artifacts
|
||||
displayName: '发布'
|
||||
# 上游上传制品任务的产出
|
||||
dependArtifact: output
|
||||
# 发布制品版本号
|
||||
version: '1.0.0.0'
|
||||
# 是否开启版本号自增,默认开启
|
||||
autoIncrement: true
|
||||
triggers:
|
||||
push:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
@@ -1,36 +0,0 @@
|
||||
version: '1.0'
|
||||
name: pr-pipeline
|
||||
displayName: PRPipeline
|
||||
stages:
|
||||
- stage:
|
||||
name: compile
|
||||
displayName: 编译
|
||||
steps:
|
||||
- step: build@nodejs
|
||||
name: build_nodejs
|
||||
displayName: Nodejs 构建
|
||||
# 支持8.16.2、10.17.0、12.16.1、14.16.0、15.12.0五个版本
|
||||
nodeVersion: 14.16.0
|
||||
# 构建命令:安装依赖 -> 清除上次打包产物残留 -> 执行构建 【请根据项目实际产出进行填写】
|
||||
commands:
|
||||
- npm install && rm -rf ./dist && npm run build
|
||||
# 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
|
||||
artifacts:
|
||||
# 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
|
||||
- name: BUILD_ARTIFACT
|
||||
# 构建产物获取路径,是指代码编译完毕之后构建物的所在路径
|
||||
path:
|
||||
- ./dist
|
||||
- step: publish@general_artifacts
|
||||
name: publish_general_artifacts
|
||||
displayName: 上传制品
|
||||
# 上游构建任务定义的产物名,默认BUILD_ARTIFACT
|
||||
dependArtifact: BUILD_ARTIFACT
|
||||
# 上传到制品库时的制品命名,默认output
|
||||
artifactName: output
|
||||
dependsOn: build_nodejs
|
||||
triggers:
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
@@ -20,7 +20,7 @@ GoView 是一个高效的拖拽式低代码数据可视化开发平台,将图
|
||||
|
||||
### 🤯 后端项目
|
||||
|
||||
后端项目 gitee 地址:[https://gitee.com/MTrun/go-view-serve](https://gitee.com/MTrun/go-view-serve)
|
||||
后端项目gitee地址:[https://gitee.com/MTrun/go-view-serve](https://gitee.com/MTrun/go-view-serve)
|
||||
|
||||
接口说明地址:[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)
|
||||
|
||||
@@ -53,7 +53,7 @@ GoView 是一个高效的拖拽式低代码数据可视化开发平台,将图
|
||||
| 名称 | 版本 | 名称 | 版本 |
|
||||
| ------------------- | ----- | ----------- | ------ |
|
||||
| Vue | 3.2.x | TypeScript4 | 4.6.x |
|
||||
| Vite | 4.2.x | NaiveUI | 2.34.x |
|
||||
| Vite | 2.9.x | NaiveUI | 2.27.x |
|
||||
| ECharts | 5.3.x | Pinia | 2.0.x |
|
||||
| 详见 `package.json` | 😁 | 🥰 | 🤗 |
|
||||
|
||||
@@ -61,7 +61,7 @@ GoView 是一个高效的拖拽式低代码数据可视化开发平台,将图
|
||||
|
||||
| 名称 | 版本 | 名称 | 版本 |
|
||||
| ---- | ------- | ------- | ----- |
|
||||
| node | 16.16.x | npm | 8.5.x |
|
||||
| node | 16.14.x | npm | 8.5.x |
|
||||
| pnpm | 7.1.x | windows | 11 |
|
||||
|
||||
已完成图表:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import path from 'path'
|
||||
export const OUTPUT_DIR = 'dist'
|
||||
|
||||
// monaco-editor 路径
|
||||
@@ -7,7 +6,7 @@ export const prefix = `monaco-editor/esm/vs`
|
||||
// chunk 警告大小
|
||||
export const chunkSizeWarningLimit = 2000
|
||||
|
||||
// 禁用 brotliSize 压缩大小报告
|
||||
// 禁用 brotli 压缩大小报告
|
||||
export const brotliSize = false
|
||||
|
||||
// 分包
|
||||
@@ -15,12 +14,7 @@ export const rollupOptions = {
|
||||
output: {
|
||||
chunkFileNames: 'static/js/[name]-[hash].js',
|
||||
entryFileNames: 'static/js/[name]-[hash].js',
|
||||
assetFileNames: (chunkInfo) => {
|
||||
if(['.png', '.jpg', '.jpeg'].includes(path.extname(chunkInfo.name))) {
|
||||
return `static/[ext]/[name].[ext]`
|
||||
}
|
||||
return `static/[ext]/[name]-[hash].[ext]`
|
||||
},
|
||||
assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
|
||||
manualChunks: {
|
||||
jsonWorker: [`${prefix}/language/json/json.worker`],
|
||||
cssWorker: [`${prefix}/language/css/css.worker`],
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
<meta name="description" content="GoView 是高效、高性能的拖拽式低代码数据可视化开发平台,将页面元素封装为基础组件,无需编写代码即可完成业务需求。">
|
||||
<meta name="keywords" content="GoView,goview,低代码,可视化">
|
||||
<meta name="author" content="奔跑的面条,面条">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=0">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=yes" media="(min-width: 769px)">
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
|
||||
/>
|
||||
<link rel="icon" href="./favicon.ico" />
|
||||
<title>GoView</title>
|
||||
<link rel="stylesheet" href="./index.css" />
|
||||
|
||||
28
package.json
@@ -1,9 +1,6 @@
|
||||
{
|
||||
"name": "go-view",
|
||||
"version": "1.1.11",
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
@@ -14,38 +11,29 @@
|
||||
"lint:fix": "eslint --ext .js,.jsx,.ts,.tsx,.vue src --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@amap/amap-jsapi-types": "^0.0.8",
|
||||
"@iconify/json": "^2.2.158",
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/keymaster": "^1.6.30",
|
||||
"@types/lodash": "^4.14.184",
|
||||
"@visactor/vchart": "^1.12.12",
|
||||
"@visactor/vchart-theme": "^1.12.2",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.4.0",
|
||||
"axios": "^0.27.2",
|
||||
"color": "^4.2.3",
|
||||
"crypto-js": "^4.1.1",
|
||||
"dayjs": "^1.11.7",
|
||||
"dom-helpers": "^5.2.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",
|
||||
"iconify-icon": "^1.0.8",
|
||||
"keymaster": "^1.6.2",
|
||||
"mitt": "^3.0.0",
|
||||
"monaco-editor": "^0.33.0",
|
||||
"naive-ui": "2.40.3",
|
||||
"naive-ui": "2.33.4",
|
||||
"pinia": "^2.0.13",
|
||||
"screenfull": "^6.0.1",
|
||||
"three": "^0.145.0",
|
||||
"vue": "^3.5.13",
|
||||
"vue": "^3.2.31",
|
||||
"vue-demi": "^0.13.1",
|
||||
"vue-i18n": "9.2.2",
|
||||
"vue-i18n": "9.1.9",
|
||||
"vue-router": "4.0.12",
|
||||
"vue3-lazyload": "^0.2.5-beta",
|
||||
"vue3-sketch-ruler": "^1.3.3",
|
||||
@@ -60,8 +48,8 @@
|
||||
"@typescript-eslint/parser": "^5.18.0",
|
||||
"@vicons/carbon": "^0.12.0",
|
||||
"@vicons/ionicons5": "~0.11.0",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
||||
"@vitejs/plugin-vue": "^1.10.2",
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.9",
|
||||
"@vue/compiler-sfc": "^3.2.31",
|
||||
"@vueuse/core": "^7.7.1",
|
||||
"commitlint": "^17.0.2",
|
||||
@@ -80,7 +68,7 @@
|
||||
"sass": "^1.49.11",
|
||||
"sass-loader": "^12.6.0",
|
||||
"typescript": "4.6.3",
|
||||
"vite": "4.3.6",
|
||||
"vite": "2.9.9",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-importer": "^0.2.5",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
@@ -88,4 +76,4 @@
|
||||
"vue-echarts": "^6.0.2",
|
||||
"vue-tsc": "^0.28.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
6323
pnpm-lock.yaml
generated
13
src/App.vue
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<n-config-provider
|
||||
:locale="zhCN"
|
||||
:theme="darkTheme"
|
||||
:hljs="hljsTheme"
|
||||
:locale="locale"
|
||||
:date-locale="dateLocale"
|
||||
:date-locale="dateZhCN"
|
||||
:theme-overrides="overridesTheme"
|
||||
>
|
||||
<go-app-provider>
|
||||
@@ -14,10 +14,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NConfigProvider } from 'naive-ui'
|
||||
import { zhCN, dateZhCN, NConfigProvider } from 'naive-ui'
|
||||
import { GoAppProvider } from '@/components/GoAppProvider'
|
||||
import { I18n } from '@/components/I18n'
|
||||
import { useDarkThemeHook, useThemeOverridesHook, useCode, useLang } from '@/hooks'
|
||||
|
||||
import { useDarkThemeHook, useThemeOverridesHook, useCode } from '@/hooks'
|
||||
|
||||
// 暗黑主题
|
||||
const darkTheme = useDarkThemeHook()
|
||||
@@ -27,8 +28,4 @@ const overridesTheme = useThemeOverridesHook()
|
||||
|
||||
// 代码主题
|
||||
const hljsTheme = useCode()
|
||||
|
||||
// 全局语言
|
||||
const { locale, dateLocale } = useLang()
|
||||
//测试提交
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import axios, { AxiosResponse, InternalAxiosRequestConfig, AxiosError } from 'axios'
|
||||
import axios, { AxiosResponse, AxiosRequestConfig } from 'axios'
|
||||
import { ResultEnum } from "@/enums/httpEnum"
|
||||
import { ErrorPageNameMap } from "@/enums/pageEnum"
|
||||
import { redirectErrorPage } from '@/utils'
|
||||
@@ -9,10 +9,10 @@ const axiosInstance = axios.create({
|
||||
})
|
||||
|
||||
axiosInstance.interceptors.request.use(
|
||||
(config: InternalAxiosRequestConfig) => {
|
||||
(config: AxiosRequestConfig) => {
|
||||
return config
|
||||
},
|
||||
(error: AxiosError) => {
|
||||
(error: AxiosRequestConfig) => {
|
||||
Promise.reject(error)
|
||||
}
|
||||
)
|
||||
@@ -21,7 +21,6 @@ axiosInstance.interceptors.request.use(
|
||||
axiosInstance.interceptors.response.use(
|
||||
(res: AxiosResponse) => {
|
||||
const { code } = res.data as { code: number }
|
||||
if (code === undefined || code === null) return Promise.resolve(res.data)
|
||||
if (code === ResultEnum.DATA_SUCCESS) return Promise.resolve(res.data)
|
||||
// 重定向
|
||||
if (ErrorPageNameMap.get(code)) redirectErrorPage(code)
|
||||
|
||||
@@ -116,6 +116,7 @@ export const customizeHttp = (targetParams: RequestConfigType, globalParams: Req
|
||||
if (!targetParams || !globalParams) {
|
||||
return
|
||||
}
|
||||
|
||||
// 全局
|
||||
const {
|
||||
// 全局请求源地址
|
||||
@@ -163,6 +164,7 @@ export const customizeHttp = (targetParams: RequestConfigType, globalParams: Req
|
||||
params = translateStr(params)
|
||||
// form 类型处理
|
||||
let formData: FormData = new FormData()
|
||||
formData.set('default', 'defaultData')
|
||||
// 类型处理
|
||||
|
||||
switch (requestParamsBodyType) {
|
||||
@@ -171,9 +173,7 @@ export const customizeHttp = (targetParams: RequestConfigType, globalParams: Req
|
||||
|
||||
case RequestBodyEnum.JSON:
|
||||
headers['Content-Type'] = ContentTypeEnum.JSON
|
||||
//json对象也能使用'javasctipt:'来动态拼接参数
|
||||
data = translateStr(targetRequestParams.Body['json'])
|
||||
if(typeof data === 'string') data = JSON.parse(data)
|
||||
data = translateStr(JSON.parse(targetRequestParams.Body['json']))
|
||||
// json 赋值给 data
|
||||
break
|
||||
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "0",
|
||||
"name": "Myriel",
|
||||
"symbolSize": "@integer(0, 50)",
|
||||
"x": -266.82776,
|
||||
"y": 299.6904,
|
||||
"value": "@integer(0, 50)",
|
||||
"category": 3
|
||||
},
|
||||
{
|
||||
"id": "1",
|
||||
"name": "Napoleon",
|
||||
"symbolSize": "@integer(0, 50)",
|
||||
"x": -418.08344,
|
||||
"y": 446.8853,
|
||||
"value": "@integer(0, 50)",
|
||||
"category": 5
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "MlleBaptistine",
|
||||
"symbolSize": "@integer(0, 50)",
|
||||
"x": -212.76357,
|
||||
"y": 245.29176,
|
||||
"value": "@integer(0, 50)",
|
||||
"category": 1
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"name": "MmeMagloire",
|
||||
"symbolSize": "@integer(0, 50)",
|
||||
"x": -242.82404,
|
||||
"y": 235.26283,
|
||||
"value": "@integer(0, 50)",
|
||||
"category": 1
|
||||
},
|
||||
{
|
||||
"id": "4",
|
||||
"name": "CountessDeLo",
|
||||
"symbolSize": "@integer(0, 50)",
|
||||
"x": -379.30386,
|
||||
"y": 429.06424,
|
||||
"value": "@integer(0, 50)",
|
||||
"category": 0
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{
|
||||
"source": "1",
|
||||
"target": "@integer(2, 4)"
|
||||
},
|
||||
{
|
||||
"source": "2",
|
||||
"target": "@integer(3, 4)"
|
||||
},
|
||||
{
|
||||
"source": "3",
|
||||
"target": "@integer(0, 2)"
|
||||
},
|
||||
{
|
||||
"source": "3",
|
||||
"target": "@integer(0, 1)"
|
||||
},
|
||||
{
|
||||
"source": "4",
|
||||
"target": "@integer(0, 3)"
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
{
|
||||
"name": "A"
|
||||
},
|
||||
{
|
||||
"name": "B"
|
||||
},
|
||||
{
|
||||
"name": "C"
|
||||
},
|
||||
{
|
||||
"name": "D"
|
||||
},
|
||||
{
|
||||
"name": "E"
|
||||
},
|
||||
{
|
||||
"name": "F"
|
||||
},
|
||||
{
|
||||
"name": "G"
|
||||
},
|
||||
{
|
||||
"name": "H"
|
||||
},
|
||||
{
|
||||
"name": "I"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import test from './test.mock'
|
||||
import vchart from './vchart.mock'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
import { RequestHttpEnum } from '@/enums/httpEnum'
|
||||
|
||||
@@ -16,14 +15,9 @@ export const radarUrl = '/mock/radarData'
|
||||
export const heatMapUrl = '/mock/heatMapData'
|
||||
export const scatterBasicUrl = '/mock/scatterBasic'
|
||||
export const mapUrl = '/mock/map'
|
||||
export const capsuleUrl = '/mock/capsule'
|
||||
export const wordCloudUrl = '/mock/wordCloud'
|
||||
export const treemapUrl = '/mock/treemap'
|
||||
export const threeEarth01Url = '/mock/threeEarth01Data'
|
||||
export const sankeyUrl = '/mock/sankey'
|
||||
export const graphUrl = '/mock/graphData'
|
||||
|
||||
export const vchartBarDataUrl = '/mock/vchart/barDataUrl'
|
||||
|
||||
const mockObject: MockMethod[] = [
|
||||
{
|
||||
@@ -88,11 +82,6 @@ const mockObject: MockMethod[] = [
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchMap
|
||||
},
|
||||
{
|
||||
url: capsuleUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchCapsule
|
||||
},
|
||||
{
|
||||
url: wordCloudUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
@@ -108,21 +97,6 @@ const mockObject: MockMethod[] = [
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.threeEarth01Data
|
||||
},
|
||||
{
|
||||
url: sankeyUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchSankey
|
||||
},
|
||||
{
|
||||
url: graphUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.graphData
|
||||
},
|
||||
{
|
||||
url: vchartBarDataUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => vchart.bar
|
||||
}
|
||||
]
|
||||
|
||||
export default mockObject
|
||||
|
||||
@@ -1,9 +1,79 @@
|
||||
{
|
||||
"markers|50": [
|
||||
"point": [
|
||||
{
|
||||
"name": "某某地市",
|
||||
"value": "@integer(2, 20)",
|
||||
"position": ["@float(115, 117, 1, 6)", "@float(38, 40, 1, 6)"]
|
||||
"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,86 +0,0 @@
|
||||
{
|
||||
"label": [
|
||||
{
|
||||
"name": "a"
|
||||
},
|
||||
{
|
||||
"name": "b"
|
||||
},
|
||||
{
|
||||
"name": "a1"
|
||||
},
|
||||
{
|
||||
"name": "a2"
|
||||
},
|
||||
{
|
||||
"name": "b1"
|
||||
},
|
||||
{
|
||||
"name": "b2"
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{
|
||||
"source": "a",
|
||||
"target": "a1",
|
||||
"value": "@integer(0, 10)"
|
||||
},
|
||||
{
|
||||
"source": "a",
|
||||
"target": "a2",
|
||||
"value": "@integer(0, 10)"
|
||||
},
|
||||
{
|
||||
"source": "b",
|
||||
"target": "b1",
|
||||
"value": "@integer(0, 10)"
|
||||
},
|
||||
{
|
||||
"source": "a",
|
||||
"target": "b1",
|
||||
"value": "@integer(0, 10)"
|
||||
},
|
||||
{
|
||||
"source": "b1",
|
||||
"target": "a1",
|
||||
"value": "@integer(0, 10)"
|
||||
},
|
||||
{
|
||||
"source": "b1",
|
||||
"target": "b2",
|
||||
"value": "@integer(0, 10)"
|
||||
}
|
||||
],
|
||||
"levels": [
|
||||
{
|
||||
"depth": 0,
|
||||
"itemStyle": {
|
||||
"color": "#decbe4"
|
||||
},
|
||||
"lineStyle": {
|
||||
"color": "source",
|
||||
"opacity": 0.9
|
||||
}
|
||||
},
|
||||
{
|
||||
"depth": 1,
|
||||
"itemStyle": {
|
||||
"color": "#b3cde3"
|
||||
},
|
||||
"lineStyle": {
|
||||
"color": "source",
|
||||
"opacity": 0.6
|
||||
}
|
||||
},
|
||||
{
|
||||
"depth": 2,
|
||||
"itemStyle": {
|
||||
"color": "#ccebc5"
|
||||
},
|
||||
"lineStyle": {
|
||||
"color": "source",
|
||||
"opacity": 0.6
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,8 +2,6 @@ import heatmapJson from './heatMapData.json'
|
||||
import scatterJson from './scatter.json'
|
||||
import mapJson from './map.json'
|
||||
import tTreemapJson from './treemap.json'
|
||||
import sankeyJson from './sankey.json'
|
||||
import graphDataJson from './graph.json'
|
||||
|
||||
export default {
|
||||
// 单图表
|
||||
@@ -12,8 +10,28 @@ export default {
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: {
|
||||
dimensions: ['product', 'dataOne'],
|
||||
'source|20': [
|
||||
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
|
||||
@@ -21,31 +39,43 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
// 胶囊图
|
||||
fetchCapsule: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: {
|
||||
dimensions: ['name', 'value'],
|
||||
"source|2-5": [
|
||||
{ 'name|+1': ["厦门","福州","北京","上海","新疆","郑州","湖南","内蒙古"], 'value|0-40': 20 },
|
||||
]
|
||||
}
|
||||
},
|
||||
// 图表
|
||||
fetchMockData: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: {
|
||||
dimensions: ['product', 'dataOne', 'dataTwo', 'dataThree'],
|
||||
'source|20': [
|
||||
dimensions: ['product', 'dataOne', 'dataTwo'],
|
||||
source: [
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|100-900': 3,
|
||||
'dataTwo|100-900': 3,
|
||||
'dataThree|100-900': 3
|
||||
'dataTwo|100-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|100-900': 3,
|
||||
'dataTwo|100-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|100-900': 3,
|
||||
'dataTwo|100-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|100-900': 3,
|
||||
'dataTwo|100-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|100-900': 3,
|
||||
'dataTwo|100-900': 3
|
||||
},
|
||||
{
|
||||
product: '@name',
|
||||
'dataOne|100-900': 3,
|
||||
'dataTwo|100-900': 3
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -55,7 +85,21 @@ export default {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
'data|50': [{ name: '@name', 'value|100-900': 5 }]
|
||||
data: [
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 },
|
||||
{ name: '@name', 'value|100-900': 5 }
|
||||
]
|
||||
},
|
||||
// 轮播表格
|
||||
fetchScrollBoard: {
|
||||
@@ -218,22 +262,13 @@ export default {
|
||||
data: [
|
||||
{
|
||||
startArray: { name: '@name', N: '@integer(10, 100)', E: '@integer(10, 100)' },
|
||||
'endArray|10': [{ 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)' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// 桑基图
|
||||
fetchSankey: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: sankeyJson
|
||||
},
|
||||
// 关系图
|
||||
graphData: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: graphDataJson
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import bar from './vchart/bar.json'
|
||||
|
||||
export default {
|
||||
bar: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: bar
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"values": [
|
||||
{ "type": "Nail polish", "year": "Africa", "value|100-900": 3 },
|
||||
{ "type": "Nail polish", "year": "EU", "value|100-900": 3 },
|
||||
{ "type": "Nail polish", "year": "China", "value|100-900": 3 },
|
||||
{ "type": "Nail polish", "year": "USA", "value|100-900": 3 },
|
||||
{ "type": "Eyebrow pencil", "year": "Africa", "value|100-900": 3 },
|
||||
{ "type": "Eyebrow pencil", "year": "EU", "value|100-900": 3 },
|
||||
{ "type": "Eyebrow pencil", "year": "China", "value|100-900": 3 },
|
||||
{ "type": "Eyebrow pencil", "year": "USA", "value|100-900": 3 },
|
||||
{ "type": "Rouge", "year": "Africa", "value|100-900": 3 },
|
||||
{ "type": "Rouge", "year": "EU", "value|100-900": 3 },
|
||||
{ "type": "Rouge", "year": "China", "value|100-900": 3 },
|
||||
{ "type": "Rouge", "year": "USA", "value|100-900": 3 }
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 377 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 999 B |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 46 KiB |
@@ -1,5 +1,4 @@
|
||||
import Flipper from './index.vue'
|
||||
|
||||
type FlipType = 'up' | 'down'
|
||||
|
||||
export { Flipper, FlipType }
|
||||
@@ -1,13 +1,19 @@
|
||||
<template>
|
||||
<div class="go-flipper" :class="[flipType, { go: isFlipping }]">
|
||||
<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, nextTick } from 'vue'
|
||||
import { FlipType } from './index'
|
||||
import { ref, PropType, watch } from 'vue'
|
||||
import { FlipType } from '.'
|
||||
|
||||
const props = defineProps({
|
||||
flipType: {
|
||||
@@ -43,10 +49,6 @@ const props = defineProps({
|
||||
backColor: {
|
||||
type: String,
|
||||
default: '#000000'
|
||||
},
|
||||
borderWidth: {
|
||||
type: Number,
|
||||
default: 2
|
||||
}
|
||||
})
|
||||
|
||||
@@ -54,27 +56,19 @@ const isFlipping = ref(false)
|
||||
const frontTextFromData = ref(props.count || 0)
|
||||
const backTextFromData = ref(props.count || 0)
|
||||
|
||||
let timeoutID: any = 0
|
||||
|
||||
// 翻牌
|
||||
const flip = async (front: string | number, back: string | number) => {
|
||||
const flip = (front: string | number, back: string | number) => {
|
||||
// 如果处于翻转中,则不执行
|
||||
if (isFlipping.value) {
|
||||
isFlipping.value = false // 立即结束此次动画
|
||||
clearTimeout(timeoutID) // 清除上一个计时器任务
|
||||
await nextTick()
|
||||
await flip(front, back) // 开始最后一次翻牌任务
|
||||
return
|
||||
}
|
||||
|
||||
if (isFlipping.value) return
|
||||
// 设置翻盘前后数据
|
||||
backTextFromData.value = back
|
||||
frontTextFromData.value = front
|
||||
|
||||
// 设置翻转状态为true
|
||||
isFlipping.value = true
|
||||
|
||||
// 翻牌结束的行为
|
||||
timeoutID = setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
isFlipping.value = false // 设置翻转状态为false
|
||||
frontTextFromData.value = back
|
||||
}, props.duration)
|
||||
@@ -98,7 +92,6 @@ $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`');
|
||||
$borderWidth: v-bind('`${props.borderWidth * 2}px`');
|
||||
$speed: v-bind('`${props.duration / 1000}s`');
|
||||
$shadowColor: #000000;
|
||||
$lineColor: #4a9ef8;
|
||||
@@ -138,12 +131,13 @@ $lineColor: #4a9ef8;
|
||||
}
|
||||
// #endregion
|
||||
|
||||
.go-flipper {
|
||||
.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;
|
||||
@@ -151,17 +145,6 @@ $lineColor: #4a9ef8;
|
||||
box-shadow: 0 0 6px rgba($color: $shadowColor, $alpha: 0.5); // 阴影部分
|
||||
text-align: center;
|
||||
// font-family: 'Helvetica Neue';
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
box-shadow: inset 0 0 $borderWidth 0 $frontColor; // 内测阴影部分
|
||||
border-radius: $radius;
|
||||
}
|
||||
|
||||
.digital:before,
|
||||
.digital:after {
|
||||
@@ -209,13 +192,11 @@ $lineColor: #4a9ef8;
|
||||
&.down.go .front:before {
|
||||
transform-origin: 50% 100%;
|
||||
animation: frontFlipDown $speed ease-in-out both;
|
||||
box-shadow: 0 -2px $borderWidth 0 $frontColor;
|
||||
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;
|
||||
box-shadow: 0 2px $borderWidth 0 $frontColor;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
/*向上翻*/
|
||||
&.up .front:after {
|
||||
@@ -233,13 +214,11 @@ $lineColor: #4a9ef8;
|
||||
&.up.go .front:after {
|
||||
transform-origin: 50% 0;
|
||||
animation: frontFlipUp $speed ease-in-out both;
|
||||
box-shadow: 0 2px $borderWidth 0 $frontColor;
|
||||
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;
|
||||
box-shadow: 0 -2px $borderWidth 0 $frontColor;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,3 +0,0 @@
|
||||
import GoIconify from './index.vue';
|
||||
|
||||
export { GoIconify };
|
||||
@@ -1,34 +0,0 @@
|
||||
<template>
|
||||
<iconify-icon
|
||||
:icon="icon"
|
||||
:rotate="`${rotate}deg`"
|
||||
:width="width"
|
||||
:style="{
|
||||
color: color
|
||||
}"
|
||||
></iconify-icon>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps({
|
||||
icon: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '#999999',
|
||||
required: false
|
||||
},
|
||||
width: {
|
||||
type: [String, Number],
|
||||
default: '20',
|
||||
required: false
|
||||
},
|
||||
rotate: {
|
||||
type: [String, Number],
|
||||
default: '0',
|
||||
required: false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -14,19 +14,16 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useLangStore } from '@/store/modules/langStore/langStore'
|
||||
import { langList } from '@/i18n/index'
|
||||
import { LangEnum } from '@/enums/styleEnum'
|
||||
import { icon } from '@/plugins'
|
||||
|
||||
const { LanguageIcon } = icon.ionicons5
|
||||
const { locale } = useI18n();
|
||||
const langStore = useLangStore()
|
||||
const options = langList
|
||||
|
||||
const handleSelect = (key: LangEnum) => {
|
||||
locale.value = key;
|
||||
langStore.changeLang(key)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<n-modal v-model:show="modelShowRef" @afterLeave="closeHandle">
|
||||
<n-modal v-model:show="modelShow" @afterLeave="closeHandle">
|
||||
<n-list bordered class="go-system-info">
|
||||
<template #header>
|
||||
<n-space justify="space-between">
|
||||
@@ -11,7 +11,7 @@
|
||||
</template>
|
||||
|
||||
<n-list-item>
|
||||
<n-space class="go-my-2" :size="20">
|
||||
<n-space :size="20">
|
||||
<n-text class="item-left">版权声明:</n-text>
|
||||
<n-text>
|
||||
GoView 版权属于
|
||||
@@ -21,7 +21,8 @@
|
||||
</n-list-item>
|
||||
|
||||
<n-list-item>
|
||||
<n-space class="go-my-2" :size="20">
|
||||
<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>,否则视作侵权行为,后果自负!
|
||||
@@ -30,7 +31,8 @@
|
||||
</n-list-item>
|
||||
|
||||
<n-list-item>
|
||||
<n-space class="go-mt-2" :size="20">
|
||||
<n-divider style="margin-top: 0" />
|
||||
<n-space :size="20">
|
||||
<n-text class="item-left">商业授权:</n-text>
|
||||
<n-text>
|
||||
若不想保留版权声明,请通过仓库/交流群 联系项目作者,进行授权
|
||||
@@ -42,19 +44,13 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch } from 'vue'
|
||||
import { icon } from '@/plugins'
|
||||
|
||||
const props = defineProps({
|
||||
modelShow: Boolean
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelShow'])
|
||||
const { HelpOutlineIcon, CloseIcon } = icon.ionicons5
|
||||
const modelShowRef = ref(false)
|
||||
const emit = defineEmits(['update:modelShow'])
|
||||
|
||||
watch(() => props.modelShow, (newValue) => {
|
||||
modelShowRef.value = newValue
|
||||
defineProps({
|
||||
modelShow: Boolean
|
||||
})
|
||||
|
||||
const closeHandle = () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<n-modal v-model:show="modelShowRef" @afterLeave="closeHandle">
|
||||
<n-modal v-model:show="modelShow" @afterLeave="closeHandle">
|
||||
<n-list bordered class="go-system-setting">
|
||||
<template #header>
|
||||
<n-space justify="space-between">
|
||||
@@ -69,20 +69,21 @@
|
||||
</template>
|
||||
|
||||
<script script lang="ts" setup>
|
||||
import { reactive, ref, watch } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { ListType } from './index.d'
|
||||
import { useSettingStore } from '@/store/modules/settingStore/settingStore'
|
||||
import { SettingStoreEnums, ToolsStatusEnum } from '@/store/modules/settingStore/settingStore.d'
|
||||
import { icon } from '@/plugins'
|
||||
|
||||
const props = defineProps({
|
||||
const { HelpOutlineIcon, CloseIcon } = icon.ionicons5
|
||||
|
||||
const emit = defineEmits(['update:modelShow'])
|
||||
|
||||
defineProps({
|
||||
modelShow: Boolean
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelShow'])
|
||||
const { HelpOutlineIcon, CloseIcon } = icon.ionicons5
|
||||
const settingStore = useSettingStore()
|
||||
const modelShowRef = ref(false)
|
||||
|
||||
const list = reactive<ListType[]>([
|
||||
{
|
||||
@@ -167,10 +168,6 @@ const list = reactive<ListType[]>([
|
||||
}
|
||||
])
|
||||
|
||||
watch(() => props.modelShow, (newValue) => {
|
||||
modelShowRef.value = newValue
|
||||
})
|
||||
|
||||
const closeHandle = () => {
|
||||
emit('update:modelShow', false)
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import GoVChart from './index.vue'
|
||||
|
||||
export { GoVChart }
|
||||
@@ -1,242 +0,0 @@
|
||||
<template>
|
||||
<div
|
||||
ref="vChartRef"
|
||||
v-on="{
|
||||
...Object.fromEntries(event.map((eventName: string) => [eventName, (eventData: MouseEvent) => eventHandlers(eventData, eventName)]))
|
||||
}"
|
||||
></div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, PropType, watch, onBeforeUnmount, nextTick, toRaw, toRefs } from 'vue'
|
||||
import { VChart, type IVChart, type IInitOption, type ISpec } from '@visactor/vchart'
|
||||
import { transformHandler } from './transformProps'
|
||||
import { IOption } from '@/packages/components/VChart/index.d'
|
||||
|
||||
// 事件说明 v1.13.0 https://www.visactor.io/vchart/api/API/event
|
||||
const event = [
|
||||
'mousedown',
|
||||
'mouseup',
|
||||
'mouseupoutside',
|
||||
'rightdown',
|
||||
'rightup',
|
||||
'rightupoutside',
|
||||
'click',
|
||||
'dblclick',
|
||||
'mousemove',
|
||||
'mouseover',
|
||||
'mouseout',
|
||||
'mouseenter',
|
||||
'mouseleave',
|
||||
'wheel',
|
||||
'touchstart',
|
||||
'touchend',
|
||||
'touchendoutside',
|
||||
'touchmove',
|
||||
'touchcancel',
|
||||
'tap',
|
||||
'dragstart',
|
||||
'dragend',
|
||||
'drag',
|
||||
'dragenter',
|
||||
'dragleave',
|
||||
'dragover',
|
||||
'drop',
|
||||
'pan',
|
||||
'panstart',
|
||||
'panend',
|
||||
'press',
|
||||
'pressup',
|
||||
'pressend',
|
||||
'pinch',
|
||||
'pinchstart',
|
||||
'pinchend',
|
||||
'swipe',
|
||||
'dimensionHover',
|
||||
'dimensionClick',
|
||||
'dataZoomChange',
|
||||
'scrollBarChange',
|
||||
'brushStart',
|
||||
'brushChange',
|
||||
'brushEnd',
|
||||
'brushClear',
|
||||
'drill',
|
||||
'legendItemClick',
|
||||
'legendItemHover',
|
||||
'legendItemUnHover',
|
||||
'legendFilter',
|
||||
'initialized',
|
||||
'rendered',
|
||||
'renderFinished',
|
||||
'animationFinished',
|
||||
'layoutStart',
|
||||
'layoutEnd',
|
||||
'afterResizef'
|
||||
]
|
||||
const emit = defineEmits([
|
||||
'mousedown',
|
||||
'mouseup',
|
||||
'mouseupoutside',
|
||||
'rightdown',
|
||||
'rightup',
|
||||
'rightupoutside',
|
||||
'click',
|
||||
'dblclick',
|
||||
'mousemove',
|
||||
'mouseover',
|
||||
'mouseout',
|
||||
'mouseenter',
|
||||
'mouseleave',
|
||||
'wheel',
|
||||
'touchstart',
|
||||
'touchend',
|
||||
'touchendoutside',
|
||||
'touchmove',
|
||||
'touchcancel',
|
||||
'tap',
|
||||
'dragstart',
|
||||
'dragend',
|
||||
'drag',
|
||||
'dragenter',
|
||||
'dragleave',
|
||||
'dragover',
|
||||
'drop',
|
||||
'pan',
|
||||
'panstart',
|
||||
'panend',
|
||||
'press',
|
||||
'pressup',
|
||||
'pressend',
|
||||
'pinch',
|
||||
'pinchstart',
|
||||
'pinchend',
|
||||
'swipe',
|
||||
'dimensionHover',
|
||||
'dimensionClick',
|
||||
'dataZoomChange',
|
||||
'scrollBarChange',
|
||||
'brushStart',
|
||||
'brushChange',
|
||||
'brushEnd',
|
||||
'brushClear',
|
||||
'drill',
|
||||
'legendItemClick',
|
||||
'legendItemHover',
|
||||
'legendItemUnHover',
|
||||
'legendFilter',
|
||||
'initialized',
|
||||
'rendered',
|
||||
'renderFinished',
|
||||
'animationFinished',
|
||||
'layoutStart',
|
||||
'layoutEnd',
|
||||
'afterResizef'
|
||||
])
|
||||
|
||||
const props = defineProps({
|
||||
option: {
|
||||
type: Object as PropType<
|
||||
IOption & {
|
||||
dataset: any
|
||||
}
|
||||
>,
|
||||
required: true
|
||||
},
|
||||
initOptions: {
|
||||
type: Object as PropType<
|
||||
IInitOption & {
|
||||
deepWatch?: boolean | number
|
||||
}
|
||||
>,
|
||||
required: false,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
|
||||
const vChartRef = ref()
|
||||
let chart: IVChart
|
||||
|
||||
// 解构 props.option,排除 dataset
|
||||
const { dataset, ...restOfOption } = toRefs(props.option)
|
||||
|
||||
// 排除 data 监听
|
||||
watch(
|
||||
() => ({
|
||||
...restOfOption
|
||||
}),
|
||||
() => {
|
||||
nextTick(() => {
|
||||
createOrUpdateChart(props.option)
|
||||
})
|
||||
},
|
||||
{
|
||||
deep: props.initOptions?.deepWatch || true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
watch(
|
||||
() => dataset.value,
|
||||
() => {
|
||||
nextTick(() => {
|
||||
createOrUpdateChart(props.option)
|
||||
})
|
||||
},
|
||||
{
|
||||
deep: false
|
||||
}
|
||||
)
|
||||
|
||||
// 更新
|
||||
const createOrUpdateChart = (
|
||||
chartProps: IOption & {
|
||||
dataset: any
|
||||
}
|
||||
) => {
|
||||
if (vChartRef.value && !chart) {
|
||||
const spec = transformHandler[chartProps.category](chartProps)
|
||||
chart = new VChart(
|
||||
{ ...spec, data: chartProps.dataset },
|
||||
{
|
||||
dom: vChartRef.value,
|
||||
...props.initOptions
|
||||
}
|
||||
)
|
||||
chart.renderSync()
|
||||
return true
|
||||
} else if (chart) {
|
||||
const spec = transformHandler[chartProps.category](chartProps)
|
||||
chart.updateSpec({ ...spec, data: toRaw(chartProps.dataset), dataset: undefined })
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 刷新
|
||||
const refresh = () => {
|
||||
if (chart) {
|
||||
chart.renderSync()
|
||||
}
|
||||
}
|
||||
|
||||
// 抛出事件
|
||||
const eventHandlers = (eventData: MouseEvent, eventName: string) => {
|
||||
if (event.includes(eventName)) emit(eventName as any, eventData)
|
||||
}
|
||||
|
||||
// 卸载
|
||||
onBeforeUnmount(() => {
|
||||
if (chart) {
|
||||
chart.release()
|
||||
}
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
// 重刷新
|
||||
refresh,
|
||||
release: () => {
|
||||
if (chart) {
|
||||
chart.release()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -1,32 +0,0 @@
|
||||
import { cloneDeep } from "lodash"
|
||||
|
||||
export default (chartProps: any) => {
|
||||
const spec = cloneDeep(chartProps)
|
||||
delete spec.category
|
||||
|
||||
// tooltip
|
||||
const keyFill = spec.tooltip.style.keyLabel.fill
|
||||
const valueFill = spec.tooltip.style.valueLabel.fill
|
||||
const titleFill = spec.tooltip.style.titleLabel.keyFill
|
||||
delete spec.tooltip.style.keyLabel.fill
|
||||
delete spec.tooltip.style.valueLabel.fill
|
||||
delete spec.tooltip.style.titleLabel.keyFill
|
||||
spec.tooltip.style.keyLabel.fontColor = keyFill
|
||||
spec.tooltip.style.valueLabel.fontColor = valueFill
|
||||
spec.tooltip.style.titleLabel.fontColor = titleFill
|
||||
|
||||
// axis
|
||||
const { name: xAxisName, ...restXAxisProps } = chartProps.xAxis
|
||||
const { name: yAxisName, ...restYAxisProps } = chartProps.yAxis
|
||||
spec.axes = [{
|
||||
orient: 'bottom',
|
||||
...restXAxisProps
|
||||
}, {
|
||||
orient: 'left',
|
||||
...restYAxisProps
|
||||
}]
|
||||
delete spec.xAxis
|
||||
delete spec.yAxis
|
||||
console.log('spec-transform', spec)
|
||||
return spec
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
import { ChatCategoryEnum, IOption } from "@/packages/components/VChart/index.d";
|
||||
import bars from './bars'
|
||||
export const transformHandler: {
|
||||
[key: string]: (args: IOption) => any
|
||||
} = {
|
||||
[ChatCategoryEnum.BAR]: bars,
|
||||
// todo: more charts handler
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
import ChartGlobImage from './index.vue'
|
||||
|
||||
export { ChartGlobImage }
|
||||
@@ -1,31 +0,0 @@
|
||||
<template>
|
||||
<img class="list-img" v-lazy="imageInfo" alt="图表图片" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, PropType, watch } from 'vue'
|
||||
import { fetchImages } from '@/packages'
|
||||
import { ConfigType } from '@/packages/index.d'
|
||||
|
||||
const props = defineProps({
|
||||
chartConfig: {
|
||||
type: Object as PropType<ConfigType>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const imageInfo = ref('')
|
||||
|
||||
// 获取图片
|
||||
const fetchImageUrl = async () => {
|
||||
imageInfo.value = await fetchImages(props.chartConfig)
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.chartConfig.key,
|
||||
() => fetchImageUrl(),
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
@@ -1,45 +0,0 @@
|
||||
<template>
|
||||
<n-radio-group :value="props.modelValue || INHERIT_VALUE" @update:value="handleChange">
|
||||
<n-space>
|
||||
<n-tooltip :show-arrow="false" trigger="hover" v-for="item in rendererList" :key="item.value">
|
||||
<template #trigger>
|
||||
<n-radio :value="item.value">
|
||||
{{ item.value }}
|
||||
</n-radio>
|
||||
</template>
|
||||
{{ item.desc }}
|
||||
</n-tooltip>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { type EchartsRenderer } from '@/settings/chartThemes'
|
||||
|
||||
const props = defineProps<{ modelValue?: EchartsRenderer; includeInherit?: boolean }>()
|
||||
const emits = defineEmits(['update:modelValue'])
|
||||
|
||||
const INHERIT_VALUE = 'inherit'
|
||||
|
||||
const handleChange = (val: EchartsRenderer & typeof INHERIT_VALUE) => {
|
||||
emits('update:modelValue', val === INHERIT_VALUE ? undefined : val)
|
||||
}
|
||||
|
||||
const rendererList = [
|
||||
{
|
||||
value: 'svg',
|
||||
desc: '在缩放场景下具有更好的表现'
|
||||
},
|
||||
{
|
||||
value: 'canvas',
|
||||
desc: '数据量较大(经验判断 > 1k)、较多交互时,建议选择'
|
||||
},
|
||||
...(props.includeInherit
|
||||
? [
|
||||
{
|
||||
value: INHERIT_VALUE,
|
||||
desc: '默认继承全局配置'
|
||||
}
|
||||
]
|
||||
: [])
|
||||
]
|
||||
</script>
|
||||
@@ -1,34 +1,4 @@
|
||||
<template>
|
||||
<collapse-item name="渲染器">
|
||||
<setting-item-box :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>所有echarts图表组件默认都将采用所选的渲染器进行渲染</n-text>
|
||||
</n-tooltip>
|
||||
</template>
|
||||
<EchartsRendererSetting v-model="themeSetting.renderer" />
|
||||
</setting-item-box>
|
||||
<setting-item-box :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>
|
||||
<EchartsRendererSetting v-model="optionData.renderer" includeInherit />
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
<collapse-item v-if="title" name="标题">
|
||||
<template #header>
|
||||
<n-switch v-model:value="title.show" size="small"></n-switch>
|
||||
@@ -257,36 +227,9 @@
|
||||
<n-switch v-model:value="legend.show" size="small"></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="图例文字">
|
||||
<setting-item name="颜色">
|
||||
<setting-item>
|
||||
<n-color-picker size="small" v-model:value="legend.textStyle.color"></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="legend.textStyle.fontSize" :min="1" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="图例位置">
|
||||
<setting-item name="x轴">
|
||||
<n-select v-model:value="legend.x" size="small" :options="legendConfig.lengendX" />
|
||||
</setting-item>
|
||||
<setting-item name="y轴">
|
||||
<n-select v-model:value="legend.y" size="small" :options="legendConfig.lengendY" />
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="图例信息">
|
||||
<setting-item name="方向">
|
||||
<n-select v-model:value="legend.orient" size="small" :options="legendConfig.orient" />
|
||||
</setting-item>
|
||||
<setting-item name="形状">
|
||||
<n-select v-model:value="legend.icon" size="small" :options="legendConfig.shape" />
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="图例大小">
|
||||
<setting-item name="宽">
|
||||
<n-input-number v-model:value="legend.itemWidth" :min="1" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="高">
|
||||
<n-input-number v-model:value="legend.itemHeight" :min="1" size="small"></n-input-number>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
|
||||
@@ -336,15 +279,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType, computed, watch } from 'vue'
|
||||
import { PropType, computed } from 'vue'
|
||||
import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
|
||||
import { axisConfig, legendConfig } from '@/packages/chartConfiguration/echarts/index'
|
||||
import { axisConfig } from '@/packages/chartConfiguration/echarts/index'
|
||||
import { CollapseItem, SettingItemBox, SettingItem, GlobalSettingPosition } from '@/components/Pages/ChartItemSetting'
|
||||
import { icon } from '@/plugins'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import EchartsRendererSetting from './EchartsRendererSetting.vue'
|
||||
|
||||
const { HelpOutlineIcon } = icon.ionicons5
|
||||
|
||||
const props = defineProps({
|
||||
optionData: {
|
||||
@@ -358,12 +296,6 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const chartEditStore = useChartEditStore()
|
||||
const themeSetting = computed(() => {
|
||||
const chartThemeSetting = chartEditStore.getEditCanvasConfig.chartThemeSetting
|
||||
return chartThemeSetting
|
||||
})
|
||||
|
||||
const title = computed(() => {
|
||||
return props.optionData.title
|
||||
})
|
||||
@@ -387,18 +319,4 @@ const grid = computed(() => {
|
||||
const visualMap = computed(() => {
|
||||
return props.optionData.visualMap
|
||||
})
|
||||
|
||||
// 监听legend color颜色改变type = scroll的颜色
|
||||
watch(() => legend.value && legend.value.textStyle.color, (newVal) => {
|
||||
if (legend.value && newVal) {
|
||||
if (!legend.value.pageTextStyle) {
|
||||
legend.value.pageTextStyle = { color: newVal }
|
||||
} else {
|
||||
legend.value.pageTextStyle.color = newVal
|
||||
}
|
||||
}
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -69,22 +69,6 @@
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
|
||||
<!-- 预设滤镜 -->
|
||||
<div v-if="presetImageList.length" class="preset-filter">
|
||||
<n-image
|
||||
class="preset-img"
|
||||
width="46"
|
||||
preview-disabled
|
||||
object-fit="scale-down"
|
||||
v-for="(item, index) in presetImageList"
|
||||
:key="index"
|
||||
:class="{ 'active-preset': item.hueRotate === chartStyles.hueRotate }"
|
||||
:style="{ filter: `hue-rotate(${item.hueRotate}deg)` }"
|
||||
:src="item.src"
|
||||
@click="() => (chartStyles.hueRotate = item.hueRotate)"
|
||||
></n-image>
|
||||
</div>
|
||||
|
||||
<!-- 混合模式 -->
|
||||
<setting-item-box v-if="!isCanvas" :alone="true">
|
||||
<template #name>
|
||||
@@ -165,12 +149,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, PropType } from 'vue'
|
||||
import { PropType } from 'vue'
|
||||
import { PickCreateComponentType, BlendModeEnumList } from '@/packages/index.d'
|
||||
import { SettingItemBox, SettingItem, CollapseItem } from '@/components/Pages/ChartItemSetting'
|
||||
import { icon } from '@/plugins'
|
||||
import logoImg from '@/assets/logo.png'
|
||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||
|
||||
const props = defineProps({
|
||||
isGroup: {
|
||||
@@ -193,48 +175,10 @@ const { HelpOutlineIcon } = icon.ionicons5
|
||||
const sliderFormatTooltip = (v: string) => {
|
||||
return `${(parseFloat(v) * 100).toFixed(0)}%`
|
||||
}
|
||||
|
||||
// 角度格式化
|
||||
const degFormatTooltip = (v: string) => {
|
||||
return `${v}deg`
|
||||
}
|
||||
|
||||
// 预设滤镜
|
||||
interface presetImageData {
|
||||
index: number
|
||||
src: string
|
||||
hueRotate: number
|
||||
}
|
||||
|
||||
const presetImageList = ref([] as presetImageData[])
|
||||
for (let i = 1; i <= 12; i++) {
|
||||
presetImageList.value.push({
|
||||
index: i,
|
||||
src: logoImg,
|
||||
hueRotate: i * 30
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 预设滤镜
|
||||
.preset-filter {
|
||||
margin: 20px 0 10px 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.preset-img {
|
||||
margin-bottom: 10px;
|
||||
padding: 2px;
|
||||
border-radius: 6px;
|
||||
transition: 0.2s all;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
box-shadow: 0 0 0 2px #66a9c9;
|
||||
}
|
||||
}
|
||||
.active-preset {
|
||||
box-shadow: 0 0 0 2px #66a9c9;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -99,7 +99,6 @@ const colorSelectHandle = (color: AppThemeColorType) => {
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
@extend .go-background-filter-shallow;
|
||||
backdrop-filter: none;
|
||||
}
|
||||
&-color {
|
||||
width: 8px;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div class="model-footer">
|
||||
中国色列表来自于:
|
||||
<n-a href="http://zhongguose.com" target="_blank">http://zhongguose.com</n-a>
|
||||
<n-a href="http://zhongguose.com">http://zhongguose.com</n-a>
|
||||
</div>
|
||||
</div>
|
||||
</n-modal>
|
||||
@@ -157,7 +157,6 @@ $height: 85vh;
|
||||
}
|
||||
}
|
||||
.model-footer {
|
||||
z-index: 1;
|
||||
text-align: end;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
<template>
|
||||
<collapse-item v-model:name="axis.name">
|
||||
<template #header>
|
||||
<n-switch v-model:value="axis.visible" size="small"></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="轴标签">
|
||||
<setting-item name="可见性">
|
||||
<n-space>
|
||||
<n-switch v-model:value="axis.label.visible" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="角度">
|
||||
<n-input-number v-model:value="axis.label.style.angle" :min="0" :max="360" size="small" />
|
||||
</setting-item>
|
||||
<FontStyle :style="axis.label.style"></FontStyle>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="轴标题">
|
||||
<setting-item name="可见性">
|
||||
<n-space>
|
||||
<n-switch v-model:value="axis.title.visible" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="标题内容">
|
||||
<n-input v-model:value="axis.title.style.text" size="small"></n-input>
|
||||
</setting-item>
|
||||
<FontStyle :style="axis.title.style"></FontStyle>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="轴线">
|
||||
<setting-item name="可见性">
|
||||
<n-space>
|
||||
<n-switch v-model:value="axis.domainLine.visible" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name=""> </setting-item>
|
||||
<setting-item name="粗细">
|
||||
<n-input-number v-model:value="axis.domainLine.style.lineWidth" :min="0" size="small" />
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker v-model:value="axis.domainLine.style.stroke" size="small" />
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="网格线">
|
||||
<setting-item name="可见性">
|
||||
<n-space>
|
||||
<n-switch v-model:value="axis.grid.visible" size="small"></n-switch>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name=""> </setting-item>
|
||||
<setting-item name="粗细">
|
||||
<n-input-number v-model:value="axis.grid.style.lineWidth" :min="0" size="small" />
|
||||
</setting-item>
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker v-model:value="axis.grid.style.stroke" size="small" />
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import FontStyle from './common/FontStyle.vue'
|
||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||
|
||||
defineProps({
|
||||
axis: {
|
||||
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -1,38 +0,0 @@
|
||||
<template>
|
||||
<!-- todo 补充常用配置项 -->
|
||||
<div v-if="optionData.legends">
|
||||
<div v-for="(legendItem, index) in optionData.legends" :key="index">
|
||||
<collapse-item name="图例">
|
||||
<template #header>
|
||||
<n-switch v-model:value="legendItem.visible" size="small"></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="布局">
|
||||
<setting-item name="位置">
|
||||
<n-select v-model:value="legendItem.orient" size="small" :options="legendsConfig.orient" />
|
||||
</setting-item>
|
||||
<setting-item name="对齐方式">
|
||||
<n-select v-model:value="legendItem.position" size="small" :options="legendsConfig.position" />
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="项配置">
|
||||
<FontStyle :style="legendItem.item.label.style"></FontStyle>
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import { legendsConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||
import FontStyle from './common/FontStyle.vue'
|
||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||
|
||||
defineProps({
|
||||
optionData: {
|
||||
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -1,47 +0,0 @@
|
||||
<template>
|
||||
<!-- todo 补充常用配置项 -->
|
||||
<div v-if="optionData.tooltip">
|
||||
<collapse-item name="提示框">
|
||||
<template #header>
|
||||
<n-switch v-model:value="optionData.tooltip.visible" size="small"></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="框">
|
||||
<setting-item name="填充">
|
||||
<n-color-picker v-model:value="optionData.tooltip.style.panel.backgroundColor" size="small" />
|
||||
</setting-item>
|
||||
<setting-item name="瞄边">
|
||||
<n-color-picker v-model:value="optionData.tooltip.style.panel.border.color" size="small" />
|
||||
</setting-item>
|
||||
<setting-item name="粗细">
|
||||
<n-input-number v-model:value="optionData.tooltip.style.panel.border.width" :min="0" size="small" />
|
||||
</setting-item>
|
||||
<setting-item name="圆角">
|
||||
<n-input-number v-model:value="optionData.tooltip.style.panel.border.radius" :min="0" size="small" />
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="标题">
|
||||
<FontStyle :style="optionData.tooltip.style.titleLabel"></FontStyle>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="名称">
|
||||
<FontStyle :style="optionData.tooltip.style.keyLabel"></FontStyle>
|
||||
</setting-item-box>
|
||||
<setting-item-box name="值">
|
||||
<FontStyle :style="optionData.tooltip.style.valueLabel"></FontStyle>
|
||||
</setting-item-box>
|
||||
</collapse-item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import FontStyle from './common/FontStyle.vue'
|
||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||
|
||||
defineProps({
|
||||
optionData: {
|
||||
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -1,18 +0,0 @@
|
||||
<template>
|
||||
<!-- 图例 -->
|
||||
<Legends :optionData="optionData"></Legends>
|
||||
<Tooltip :optionData="optionData"></Tooltip>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||
import Legends from './Legends.vue'
|
||||
import Tooltip from './Tooltip.vue'
|
||||
const props = defineProps({
|
||||
optionData: {
|
||||
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -1,33 +0,0 @@
|
||||
<template>
|
||||
<!-- todo 补充常用配置项 -->
|
||||
<!-- <div v-if="style"> -->
|
||||
<!-- <setting-item-box v-if="style" name=""> -->
|
||||
<setting-item name="颜色">
|
||||
<n-color-picker v-model:value="style.fill" size="small" />
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="style.fontSize" :min="1" size="small" />
|
||||
</setting-item>
|
||||
<setting-item name="字体">
|
||||
<n-select v-model:value="style.fontFamily" :options="fontStyleConfig.fontFamily" size="small" />
|
||||
</setting-item>
|
||||
<setting-item name="字重">
|
||||
<n-select v-model:value="style.fontSize" :options="fontStyleConfig.fontWeight" size="small" />
|
||||
</setting-item>
|
||||
<!-- </setting-item-box> -->
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import { fontStyleConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||
import { FontType } from '@/settings/vchartThemes/index'
|
||||
import { SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||
|
||||
defineProps({
|
||||
style: {
|
||||
type: Object as PropType<FontType>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -1,4 +0,0 @@
|
||||
import VChartGlobalSetting from './VChartGlobalSetting.vue'
|
||||
import Axis from './Axis.vue'
|
||||
|
||||
export { VChartGlobalSetting, Axis }
|
||||
@@ -9,14 +9,6 @@ export enum DragKeyEnum {
|
||||
DRAG_KEY = 'ChartData'
|
||||
}
|
||||
|
||||
// 不同页面保存操作
|
||||
export enum SavePageEnum {
|
||||
CHART = 'SaveChart',
|
||||
CHART_TO_PREVIEW = 'ChartToPreview',
|
||||
JSON = 'SaveJSON',
|
||||
CLOSE = 'close'
|
||||
}
|
||||
|
||||
// 操作枚举
|
||||
export enum MenuEnum {
|
||||
// 移动
|
||||
@@ -50,8 +42,6 @@ export enum MenuEnum {
|
||||
BACK = 'back',
|
||||
// 前进
|
||||
FORWORD = 'forward',
|
||||
// 保存
|
||||
SAVE = 'save',
|
||||
// 锁定
|
||||
LOCK = 'lock',
|
||||
// 解除锁定
|
||||
@@ -69,8 +59,7 @@ export enum WinKeyboard {
|
||||
ALT = ' alt',
|
||||
CTRL_SOURCE_KEY = 'control',
|
||||
SHIFT_SOURCE_KEY = 'shift',
|
||||
ALT_SOURCE_KEY = 'alt',
|
||||
SPACE = 'Space'
|
||||
ALT_SOURCE_KEY = 'alt'
|
||||
}
|
||||
|
||||
// Mac 键盘枚举
|
||||
@@ -81,6 +70,5 @@ export enum MacKeyboard {
|
||||
ALT = '⌥',
|
||||
CTRL_SOURCE_KEY = '⌘',
|
||||
SHIFT_SOURCE_KEY = '⇧',
|
||||
ALT_SOURCE_KEY = '⌥',
|
||||
SPACE = 'Space'
|
||||
ALT_SOURCE_KEY = '⌥'
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
// 基础事件类型(vue不加 on)
|
||||
export enum BaseEvent {
|
||||
// 点击
|
||||
ON_CLICK = 'click',
|
||||
// 双击
|
||||
ON_DBL_CLICK = 'dblclick',
|
||||
// 移入
|
||||
ON_MOUSE_ENTER = 'mouseenter',
|
||||
// 移出
|
||||
ON_MOUSE_LEAVE = 'mouseleave'
|
||||
}
|
||||
|
||||
// 组件交互回调事件
|
||||
export enum InteractEvents {
|
||||
INTERACT_ON = 'interactOn',
|
||||
INTERACT_COMPONENT_ID = 'interactComponentId',
|
||||
INTERACT_FN = 'interactFn'
|
||||
}
|
||||
|
||||
// 全局组件交互回调事件触发的类型(当然可以自定义名称)
|
||||
export enum InteractEventOn {
|
||||
CLICK = 'click',
|
||||
CHANGE = 'change'
|
||||
}
|
||||
|
||||
// 确定交互组件触发类型 key名称
|
||||
export const COMPONENT_INTERACT_EVENT_KET = 'componentInteractEventKey'
|
||||
|
||||
// 交互式组件的触发配置
|
||||
export type InteractActionsType = {
|
||||
interactType: InteractEventOn
|
||||
interactName: string
|
||||
componentEmitEvents: { [T: string]: { value: any; label: string }[] }
|
||||
}
|
||||
|
||||
// vue3 生命周期事件
|
||||
export enum EventLife {
|
||||
// 渲染之后
|
||||
VNODE_MOUNTED = 'vnodeMounted',
|
||||
// 渲染之前
|
||||
VNODE_BEFORE_MOUNT = 'vnodeBeforeMount'
|
||||
}
|
||||
|
||||
// 内置字符串函数对象列表
|
||||
export const excludeParseEventKeyList = [
|
||||
EventLife.VNODE_BEFORE_MOUNT,
|
||||
EventLife.VNODE_MOUNTED,
|
||||
BaseEvent.ON_CLICK,
|
||||
BaseEvent.ON_DBL_CLICK,
|
||||
BaseEvent.ON_MOUSE_ENTER,
|
||||
BaseEvent.ON_MOUSE_LEAVE,
|
||||
//过滤器
|
||||
'filter'
|
||||
]
|
||||
// 内置字符串函数键值列表
|
||||
export const excludeParseEventValueList = [
|
||||
// 请求里的函数语句
|
||||
'javascript:'
|
||||
]
|
||||
@@ -15,9 +15,7 @@ export enum RequestDataTypeEnum {
|
||||
// 静态数据
|
||||
STATIC = 0,
|
||||
// 请求数据
|
||||
AJAX = 1,
|
||||
// 数据池
|
||||
Pond = 2
|
||||
AJAX = 1
|
||||
}
|
||||
|
||||
// 请求主体类型
|
||||
|
||||
@@ -12,12 +12,6 @@ export enum PreviewEnum {
|
||||
CHART_PREVIEW_NAME = 'ChartPreview',
|
||||
}
|
||||
|
||||
export enum EditEnum {
|
||||
// 图表JSON编辑
|
||||
CHART_EDIT = '/chart/edit/:id(.*)*',
|
||||
CHART_EDIT_NAME = 'ChartEdit',
|
||||
}
|
||||
|
||||
export enum PageEnum {
|
||||
// 登录
|
||||
BASE_LOGIN = '/login',
|
||||
|
||||
@@ -12,7 +12,5 @@ export enum StorageEnum {
|
||||
// 工作台布局配置
|
||||
GO_CHART_LAYOUT_STORE = 'GO_CHART_LAYOUT',
|
||||
// 工作台需要保存的数据
|
||||
GO_CHART_STORAGE_LIST = 'GO_CHART_STORAGE_LIST',
|
||||
// 用户存储的图片媒体
|
||||
GO_USER_MEDIA_PHOTOS = 'GO_USER_MEDIA_PHOTOS'
|
||||
GO_CHART_STORAGE_LIST = 'GO_CHART_STORAGE_LIST'
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
export * from '@/hooks/useTheme.hook'
|
||||
export * from '@/hooks/usePreviewScale.hook'
|
||||
export * from '@/hooks/useCode.hook'
|
||||
export * from '@/hooks/useChartDataFetch.hook'
|
||||
export * from '@/hooks/useChartDataPondFetch.hook'
|
||||
export * from '@/hooks/useLifeHandler.hook'
|
||||
export * from '@/hooks/useLang.hook'
|
||||
export * from '@/hooks/useChartInteract.hook'
|
||||
export * from '@/hooks/useVCharts.hook'
|
||||
export * from '@/hooks/useChartDataFetch.hook'
|
||||
@@ -1,26 +0,0 @@
|
||||
import { inject, type Ref } from 'vue'
|
||||
import { EchartsRenderer } from '@/settings/chartThemes'
|
||||
import { SCALE_KEY } from '@/views/preview/hooks/useScale.hook'
|
||||
import { use } from 'echarts/core'
|
||||
import { CanvasRenderer, SVGRenderer } from 'echarts/renderers'
|
||||
|
||||
use([CanvasRenderer, SVGRenderer])
|
||||
|
||||
type InitOptions = {
|
||||
renderer: EchartsRenderer
|
||||
devicePixelRatio?: number
|
||||
}
|
||||
|
||||
// 获取需要给当前echarts组件设置什么初始值
|
||||
export function useCanvasInitOptions(option: any, themeSetting: any) {
|
||||
const renderer = option.renderer || themeSetting.renderer
|
||||
const initOptions: InitOptions = { renderer }
|
||||
const scaleRef = inject<Ref<{ width: number; height: number }>>(SCALE_KEY) || { value: { width: 1, height: 1 } }
|
||||
|
||||
if (renderer === 'canvas') {
|
||||
initOptions.devicePixelRatio = Math.ceil(
|
||||
Math.max(window.devicePixelRatio, scaleRef.value.width, scaleRef.value.height)
|
||||
)
|
||||
}
|
||||
return initOptions
|
||||
}
|
||||
@@ -1,130 +1,99 @@
|
||||
import { ref, toRefs, toRaw, watch } from 'vue'
|
||||
import type VChart from 'vue-echarts'
|
||||
import { customizeHttp } from '@/api/http'
|
||||
import { useChartDataPondFetch } from '@/hooks/'
|
||||
import { CreateComponentType, ChartFrameEnum } from '@/packages/index.d'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { RequestDataTypeEnum } from '@/enums/httpEnum'
|
||||
import { isPreview, newFunctionHandle, intervalUnitHandle } from '@/utils'
|
||||
import { setOption } from '@/packages/public/chart'
|
||||
import { isNil } from 'lodash'
|
||||
|
||||
// 获取类型
|
||||
type ChartEditStoreType = typeof useChartEditStore
|
||||
|
||||
/**
|
||||
* setdata 数据监听与更改
|
||||
* @param targetComponent
|
||||
* @param useChartEditStore 若直接引会报错,只能动态传递
|
||||
* @param updateCallback 自定义更新函数
|
||||
*/
|
||||
export const useChartDataFetch = (
|
||||
targetComponent: CreateComponentType,
|
||||
useChartEditStore: ChartEditStoreType,
|
||||
updateCallback?: (...args: any) => any
|
||||
) => {
|
||||
const vChartRef = ref<typeof VChart | null>(null)
|
||||
let fetchInterval: any = 0
|
||||
|
||||
// 数据池
|
||||
const { addGlobalDataInterface } = useChartDataPondFetch()
|
||||
|
||||
// 组件类型
|
||||
const { chartFrame } = targetComponent.chartConfig
|
||||
|
||||
// eCharts 组件配合 vChart 库更新方式
|
||||
const echartsUpdateHandle = (dataset: any) => {
|
||||
if (chartFrame === ChartFrameEnum.ECHARTS) {
|
||||
if (vChartRef.value) {
|
||||
setOption(vChartRef.value, { dataset: dataset }, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const requestIntervalFn = () => {
|
||||
const chartEditStore = useChartEditStore()
|
||||
|
||||
// 全局数据
|
||||
const {
|
||||
requestOriginUrl,
|
||||
requestIntervalUnit: globalUnit,
|
||||
requestInterval: globalRequestInterval
|
||||
} = toRefs(chartEditStore.getRequestGlobalConfig)
|
||||
|
||||
// 目标组件
|
||||
const {
|
||||
requestDataType,
|
||||
requestUrl,
|
||||
requestIntervalUnit: targetUnit,
|
||||
requestInterval: targetInterval
|
||||
} = toRefs(targetComponent.request)
|
||||
|
||||
// 非请求类型
|
||||
if (requestDataType.value !== RequestDataTypeEnum.AJAX) return
|
||||
|
||||
try {
|
||||
// 处理地址
|
||||
// @ts-ignore
|
||||
if (requestUrl?.value) {
|
||||
// requestOriginUrl 允许为空
|
||||
const completePath = requestOriginUrl && requestOriginUrl.value + requestUrl.value
|
||||
if (!completePath) return
|
||||
|
||||
clearInterval(fetchInterval)
|
||||
|
||||
const fetchFn = async () => {
|
||||
const res = await customizeHttp(toRaw(targetComponent.request), toRaw(chartEditStore.getRequestGlobalConfig))
|
||||
if (res) {
|
||||
try {
|
||||
const filter = targetComponent.filter
|
||||
const { data } = res
|
||||
echartsUpdateHandle(newFunctionHandle(data, res, filter))
|
||||
// 更新回调函数
|
||||
if (updateCallback) {
|
||||
updateCallback(newFunctionHandle(data, res, filter))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 普通初始化与组件交互处理监听
|
||||
watch(
|
||||
() => targetComponent.request.requestParams,
|
||||
() => {
|
||||
fetchFn()
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
// 定时时间
|
||||
const time = targetInterval && !isNil(targetInterval.value) ? targetInterval.value : globalRequestInterval.value
|
||||
// 单位
|
||||
const unit = targetInterval && !isNil(targetInterval.value) ? targetUnit.value : globalUnit.value
|
||||
// 开启轮询
|
||||
if (time) {
|
||||
fetchInterval = setInterval(fetchFn, intervalUnitHandle(time, unit))
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
if (isPreview()) {
|
||||
targetComponent.request.requestDataType === RequestDataTypeEnum.Pond
|
||||
? addGlobalDataInterface(targetComponent, useChartEditStore, (newData: any) => {
|
||||
echartsUpdateHandle(newData)
|
||||
if (updateCallback) updateCallback(newData)
|
||||
})
|
||||
: requestIntervalFn()
|
||||
} else {
|
||||
requestIntervalFn()
|
||||
}
|
||||
return { vChartRef }
|
||||
}
|
||||
import { ref, toRefs, toRaw } from 'vue'
|
||||
import type VChart from 'vue-echarts'
|
||||
import { customizeHttp } from '@/api/http'
|
||||
import { CreateComponentType, ChartFrameEnum } from '@/packages/index.d'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { RequestDataTypeEnum } from '@/enums/httpEnum'
|
||||
import { isPreview, newFunctionHandle, intervalUnitHandle } from '@/utils'
|
||||
|
||||
// 获取类型
|
||||
type ChartEditStoreType = typeof useChartEditStore
|
||||
|
||||
/**
|
||||
* setdata 数据监听与更改
|
||||
* @param targetComponent
|
||||
* @param useChartEditStore 若直接引会报错,只能动态传递
|
||||
* @param updateCallback 自定义更新函数
|
||||
*/
|
||||
export const useChartDataFetch = (
|
||||
targetComponent: CreateComponentType,
|
||||
useChartEditStore: ChartEditStoreType,
|
||||
updateCallback?: (...args: any) => any
|
||||
) => {
|
||||
const vChartRef = ref<typeof VChart | null>(null)
|
||||
let fetchInterval: any = 0
|
||||
|
||||
const requestIntervalFn = () => {
|
||||
const chartEditStore = useChartEditStore()
|
||||
|
||||
// 全局数据
|
||||
const {
|
||||
requestOriginUrl,
|
||||
requestIntervalUnit: globalUnit,
|
||||
requestInterval: globalRequestInterval
|
||||
} = toRefs(chartEditStore.getRequestGlobalConfig)
|
||||
|
||||
// 目标组件
|
||||
const {
|
||||
requestDataType,
|
||||
requestUrl,
|
||||
requestIntervalUnit: targetUnit,
|
||||
requestInterval: targetInterval
|
||||
} = toRefs(targetComponent.request)
|
||||
|
||||
// 组件类型
|
||||
const { chartFrame } = targetComponent.chartConfig
|
||||
|
||||
// 非请求类型
|
||||
if (requestDataType.value !== RequestDataTypeEnum.AJAX) return
|
||||
|
||||
try {
|
||||
// 处理地址
|
||||
// @ts-ignore
|
||||
if (requestUrl?.value) {
|
||||
// requestOriginUrl 允许为空
|
||||
const completePath = requestOriginUrl && requestOriginUrl.value + requestUrl.value
|
||||
if (!completePath) return
|
||||
|
||||
clearInterval(fetchInterval)
|
||||
|
||||
const fetchFn = async () => {
|
||||
const res = await customizeHttp(toRaw(targetComponent.request), toRaw(chartEditStore.requestGlobalConfig))
|
||||
if (res) {
|
||||
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))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 立即调用
|
||||
fetchFn()
|
||||
|
||||
// 定时时间
|
||||
const time = targetInterval && targetInterval.value ? targetInterval.value : globalRequestInterval.value
|
||||
// 单位
|
||||
const unit = targetInterval && targetInterval.value ? targetUnit.value : globalUnit.value
|
||||
// 开启轮询
|
||||
if (time) fetchInterval = setInterval(fetchFn, intervalUnitHandle(time, unit))
|
||||
}
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
isPreview() && requestIntervalFn()
|
||||
return { vChartRef }
|
||||
}
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
import { toRaw, watch, computed, ComputedRef } from 'vue'
|
||||
import { customizeHttp } from '@/api/http'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { RequestGlobalConfigType, RequestDataPondItemType } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { newFunctionHandle, intervalUnitHandle } from '@/utils'
|
||||
|
||||
// 获取类型
|
||||
type ChartEditStoreType = typeof useChartEditStore
|
||||
|
||||
// 数据池存储的数据类型
|
||||
type DataPondMapType = {
|
||||
updateCallback: (...args: any) => any
|
||||
filter?: string | undefined
|
||||
}
|
||||
|
||||
// 数据池 Map 中请求对应 callback
|
||||
const mittDataPondMap = new Map<string, DataPondMapType[]>()
|
||||
|
||||
// 创建单个数据项轮询接口
|
||||
const newPondItemInterval = (
|
||||
requestGlobalConfig: RequestGlobalConfigType,
|
||||
requestDataPondItem: ComputedRef<RequestDataPondItemType>,
|
||||
dataPondMapItem?: DataPondMapType[]
|
||||
) => {
|
||||
if (!dataPondMapItem) return
|
||||
let fetchInterval: any = 0
|
||||
|
||||
clearInterval(fetchInterval)
|
||||
|
||||
// 请求
|
||||
const fetchFn = async () => {
|
||||
try {
|
||||
const res = await customizeHttp(toRaw(requestDataPondItem.value.dataPondRequestConfig), toRaw(requestGlobalConfig))
|
||||
if (res) {
|
||||
try {
|
||||
// 遍历更新回调函数
|
||||
dataPondMapItem.forEach(item => {
|
||||
item.updateCallback(newFunctionHandle(res?.data, res, item.filter))
|
||||
})
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
return error
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
return error
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => requestDataPondItem.value.dataPondRequestConfig.requestParams.Params,
|
||||
() => {
|
||||
fetchFn()
|
||||
},
|
||||
{
|
||||
immediate: false,
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
// 立即调用
|
||||
fetchFn()
|
||||
|
||||
|
||||
const targetInterval = requestDataPondItem.value.dataPondRequestConfig.requestInterval
|
||||
const targetUnit = requestDataPondItem.value.dataPondRequestConfig.requestIntervalUnit
|
||||
|
||||
const globalRequestInterval = requestGlobalConfig.requestInterval
|
||||
const globalUnit = requestGlobalConfig.requestIntervalUnit
|
||||
|
||||
// 定时时间
|
||||
const time = targetInterval ? targetInterval : globalRequestInterval
|
||||
// 单位
|
||||
const unit = targetInterval ? targetUnit : globalUnit
|
||||
// 开启轮询
|
||||
if (time) fetchInterval = setInterval(fetchFn, intervalUnitHandle(time, unit))
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据池接口处理
|
||||
*/
|
||||
export const useChartDataPondFetch = () => {
|
||||
// 新增全局接口
|
||||
const addGlobalDataInterface = (
|
||||
targetComponent: CreateComponentType,
|
||||
useChartEditStore: ChartEditStoreType,
|
||||
updateCallback: (...args: any) => any
|
||||
) => {
|
||||
const chartEditStore = useChartEditStore()
|
||||
const { requestDataPond } = chartEditStore.getRequestGlobalConfig
|
||||
|
||||
// 组件对应的数据池 Id
|
||||
const requestDataPondId = targetComponent.request.requestDataPondId as string
|
||||
// 新增数据项
|
||||
const mittPondIdArr = mittDataPondMap.get(requestDataPondId) || []
|
||||
mittPondIdArr.push({
|
||||
updateCallback: updateCallback,
|
||||
filter: targetComponent.filter
|
||||
})
|
||||
mittDataPondMap.set(requestDataPondId, mittPondIdArr)
|
||||
}
|
||||
|
||||
// 清除旧数据
|
||||
const clearMittDataPondMap = () => {
|
||||
mittDataPondMap.clear()
|
||||
}
|
||||
|
||||
// 初始化数据池
|
||||
const initDataPond = (useChartEditStore: ChartEditStoreType) => {
|
||||
const { requestGlobalConfig } = useChartEditStore()
|
||||
const chartEditStore = useChartEditStore()
|
||||
// 根据 mapId 查找对应的数据池配置
|
||||
for (let pondKey of mittDataPondMap.keys()) {
|
||||
const requestDataPondItem = computed(() => {
|
||||
return requestGlobalConfig.requestDataPond.find(item => item.dataPondId === pondKey)
|
||||
}) as ComputedRef<RequestDataPondItemType>
|
||||
if (requestDataPondItem) {
|
||||
newPondItemInterval(chartEditStore.requestGlobalConfig, requestDataPondItem, mittDataPondMap.get(pondKey))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
addGlobalDataInterface,
|
||||
clearMittDataPondMap,
|
||||
initDataPond
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
import { toRefs } from 'vue'
|
||||
import { isPreview } from '@/utils'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
|
||||
// 获取类型
|
||||
type ChartEditStoreType = typeof useChartEditStore
|
||||
|
||||
// Params 参数修改触发 api 更新图表请求
|
||||
export const useChartInteract = (
|
||||
chartConfig: CreateComponentType,
|
||||
useChartEditStore: ChartEditStoreType,
|
||||
param: { [T: string]: any },
|
||||
interactEventOn: string
|
||||
) => {
|
||||
if (!isPreview()) return
|
||||
const chartEditStore = useChartEditStore()
|
||||
const { interactEvents } = chartConfig.events
|
||||
const fnOnEvent = interactEvents.filter(item => {
|
||||
return item.interactOn === interactEventOn
|
||||
})
|
||||
|
||||
if (fnOnEvent.length === 0) return
|
||||
fnOnEvent.forEach(item => {
|
||||
|
||||
const globalConfigPindAprndex = chartEditStore.requestGlobalConfig.requestDataPond.findIndex(cItem =>
|
||||
cItem.dataPondId === item.interactComponentId
|
||||
)
|
||||
if (globalConfigPindAprndex !== -1) {
|
||||
const { Params, Header } = toRefs(chartEditStore.requestGlobalConfig.requestDataPond[globalConfigPindAprndex].dataPondRequestConfig.requestParams)
|
||||
|
||||
Object.keys(item.interactFn).forEach(key => {
|
||||
if (key in Params.value) {
|
||||
Params.value[key] = param[item.interactFn[key]]
|
||||
}
|
||||
if (key in Header.value) {
|
||||
Header.value[key] = param[item.interactFn[key]]
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const index = chartEditStore.fetchTargetIndex(item.interactComponentId)
|
||||
if (index === -1) return
|
||||
const { Params, Header } = toRefs(chartEditStore.componentList[index].request.requestParams)
|
||||
|
||||
Object.keys(item.interactFn).forEach(key => {
|
||||
if (key in Params.value) {
|
||||
Params.value[key] = param[item.interactFn[key]]
|
||||
}
|
||||
if (key in Header.value) {
|
||||
Header.value[key] = param[item.interactFn[key]]
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 联动事件触发的 type 变更时,清除当前绑定内容
|
||||
export const clearInteractEvent = (chartConfig: CreateComponentType) => {
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { computed } from 'vue'
|
||||
import { LangEnum } from '@/enums/styleEnum'
|
||||
import { useLangStore } from '@/store/modules/langStore/langStore'
|
||||
import { zhCN, enUS, dateEnUS, dateZhCN } from 'naive-ui'
|
||||
|
||||
type LangStoreType = typeof useLangStore
|
||||
|
||||
// 语言切换
|
||||
export const useLang = () => {
|
||||
const lang = useLangStore()
|
||||
|
||||
const locale = computed(() => {
|
||||
return lang.getLang === LangEnum.ZH ? zhCN : enUS
|
||||
})
|
||||
|
||||
const dateLocale = computed(() => {
|
||||
return lang.getLang === LangEnum.ZH ? dateZhCN : dateEnUS
|
||||
})
|
||||
|
||||
return {
|
||||
locale,
|
||||
dateLocale
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.d'
|
||||
import { EventLife } from '@/enums/eventEnum'
|
||||
import * as echarts from 'echarts'
|
||||
|
||||
// 所有图表组件集合对象
|
||||
const components: { [K in string]?: any } = {}
|
||||
|
||||
// 项目提供的npm 包变量
|
||||
export const npmPkgs = { echarts }
|
||||
|
||||
// 组件事件处理 hook
|
||||
export const useLifeHandler = (chartConfig: CreateComponentType | CreateComponentGroupType) => {
|
||||
if (!chartConfig.events) return {}
|
||||
|
||||
// 处理基础事件
|
||||
const baseEvent: { [key: string]: any } = {}
|
||||
for (const key in chartConfig.events.baseEvent) {
|
||||
const fnStr: string | undefined = (chartConfig.events.baseEvent as any)[key]
|
||||
// 动态绑定基础事件
|
||||
if (fnStr) {
|
||||
baseEvent[key] = generateBaseFunc(fnStr)
|
||||
}
|
||||
}
|
||||
|
||||
// 生成生命周期事件
|
||||
const events = chartConfig.events.advancedEvents || {}
|
||||
const lifeEvents = {
|
||||
[EventLife.VNODE_BEFORE_MOUNT](e: any) {
|
||||
// 存储组件
|
||||
components[chartConfig.id] = e.component
|
||||
const fnStr = (events[EventLife.VNODE_BEFORE_MOUNT] || '').trim()
|
||||
generateFunc(fnStr, e)
|
||||
},
|
||||
[EventLife.VNODE_MOUNTED](e: any) {
|
||||
const fnStr = (events[EventLife.VNODE_MOUNTED] || '').trim()
|
||||
generateFunc(fnStr, e)
|
||||
}
|
||||
}
|
||||
return { ...baseEvent, ...lifeEvents }
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成基础函数
|
||||
* @param fnStr 用户方法体代码
|
||||
* @param event 鼠标事件
|
||||
*/
|
||||
export function generateBaseFunc(fnStr: string) {
|
||||
try {
|
||||
return new Function(`
|
||||
return (
|
||||
async function(components,mouseEvent){
|
||||
${fnStr}
|
||||
}
|
||||
)`)().bind(undefined,components)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成高级函数
|
||||
* @param fnStr 用户方法体代码
|
||||
* @param e 执行生命周期的动态组件实例
|
||||
*/
|
||||
function generateFunc(fnStr: string, e: any) {
|
||||
try {
|
||||
// npmPkgs 便于拷贝 echarts 示例时设置option 的formatter等相关内容
|
||||
Function(`
|
||||
"use strict";
|
||||
return (
|
||||
async function(e, components, node_modules){
|
||||
const {${Object.keys(npmPkgs).join()}} = node_modules;
|
||||
${fnStr}
|
||||
}
|
||||
)`)().bind(e?.component)(e, components, npmPkgs)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
@@ -1,218 +1,218 @@
|
||||
import throttle from 'lodash/throttle'
|
||||
|
||||
// 拆出来是为了更好的分离单独复用
|
||||
|
||||
// * 屏幕缩放适配(两边留白)
|
||||
export const usePreviewFitScale = (
|
||||
width: number,
|
||||
height: number,
|
||||
scaleDom: HTMLElement | null,
|
||||
callback?: (scale: {
|
||||
width: number;
|
||||
height: number;
|
||||
}) => void
|
||||
) => {
|
||||
// * 画布尺寸(px)
|
||||
const baseWidth = width
|
||||
const baseHeight = height
|
||||
|
||||
// * 默认缩放值
|
||||
const scale = {
|
||||
width: 1,
|
||||
height: 1,
|
||||
}
|
||||
|
||||
// * 需保持的比例
|
||||
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))
|
||||
const calcRate = () => {
|
||||
// 当前屏幕宽高比
|
||||
const currentRate = parseFloat(
|
||||
(window.innerWidth / window.innerHeight).toFixed(5)
|
||||
)
|
||||
if (scaleDom) {
|
||||
if (currentRate > baseProportion) {
|
||||
// 表示更宽
|
||||
scale.width = parseFloat(((window.innerHeight * baseProportion) / baseWidth).toFixed(5))
|
||||
scale.height = parseFloat((window.innerHeight / baseHeight).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
} else {
|
||||
// 表示更高
|
||||
scale.height = parseFloat(((window.innerWidth / baseProportion) / baseHeight).toFixed(5))
|
||||
scale.width = parseFloat((window.innerWidth / baseWidth).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
}
|
||||
if (callback) callback(scale)
|
||||
}
|
||||
}
|
||||
|
||||
const resize = throttle(() => {
|
||||
calcRate()
|
||||
}, 200)
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const windowResize = () => {
|
||||
window.addEventListener('resize', resize)
|
||||
}
|
||||
|
||||
// * 卸载监听
|
||||
const unWindowResize = () => {
|
||||
window.removeEventListener('resize', resize)
|
||||
}
|
||||
|
||||
return {
|
||||
calcRate,
|
||||
windowResize,
|
||||
unWindowResize,
|
||||
}
|
||||
}
|
||||
|
||||
// * X轴撑满,Y轴滚动条
|
||||
export const usePreviewScrollYScale = (
|
||||
width: number,
|
||||
height: number,
|
||||
scaleDom: HTMLElement | null,
|
||||
callback?: (scale: {
|
||||
width: number;
|
||||
height: number;
|
||||
}) => void
|
||||
) => {
|
||||
// * 画布尺寸(px)
|
||||
const baseWidth = width
|
||||
const baseHeight = height
|
||||
|
||||
// * 默认缩放值
|
||||
const scale = {
|
||||
width: 1,
|
||||
height: 1,
|
||||
}
|
||||
|
||||
// * 需保持的比例
|
||||
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))
|
||||
const calcRate = () => {
|
||||
if (scaleDom) {
|
||||
scale.height = parseFloat(((window.innerWidth / baseProportion) / baseHeight).toFixed(5))
|
||||
scale.width = parseFloat((window.innerWidth / baseWidth).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
if (callback) callback(scale)
|
||||
}
|
||||
}
|
||||
|
||||
const resize = throttle(() => {
|
||||
calcRate()
|
||||
}, 200)
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const windowResize = () => {
|
||||
window.addEventListener('resize', resize)
|
||||
}
|
||||
|
||||
// * 卸载监听
|
||||
const unWindowResize = () => {
|
||||
window.removeEventListener('resize', resize)
|
||||
}
|
||||
|
||||
return {
|
||||
calcRate,
|
||||
windowResize,
|
||||
unWindowResize,
|
||||
}
|
||||
}
|
||||
|
||||
// * Y轴撑满,X轴滚动条
|
||||
export const usePreviewScrollXScale = (
|
||||
width: number,
|
||||
height: number,
|
||||
scaleDom: HTMLElement | null,
|
||||
callback?: (scale: {
|
||||
width: number;
|
||||
height: number;
|
||||
}) => void
|
||||
) => {
|
||||
// * 画布尺寸(px)
|
||||
const baseWidth = width
|
||||
const baseHeight = height
|
||||
|
||||
// * 默认缩放值
|
||||
const scale = {
|
||||
height: 1,
|
||||
width: 1,
|
||||
}
|
||||
|
||||
// * 需保持的比例
|
||||
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))
|
||||
const calcRate = () => {
|
||||
if (scaleDom) {
|
||||
scale.width = parseFloat(((window.innerHeight * baseProportion) / baseWidth).toFixed(5))
|
||||
scale.height = parseFloat((window.innerHeight / baseHeight).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
if (callback) callback(scale)
|
||||
}
|
||||
}
|
||||
|
||||
const resize = throttle(() => {
|
||||
calcRate()
|
||||
}, 200)
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const windowResize = () => {
|
||||
window.addEventListener('resize', resize)
|
||||
}
|
||||
|
||||
// * 卸载监听
|
||||
const unWindowResize = () => {
|
||||
window.removeEventListener('resize', resize)
|
||||
}
|
||||
|
||||
return {
|
||||
calcRate,
|
||||
windowResize,
|
||||
unWindowResize,
|
||||
}
|
||||
}
|
||||
|
||||
// * 变形内容,宽高铺满
|
||||
export const usePreviewFullScale = (
|
||||
width: number,
|
||||
height: number,
|
||||
scaleDom: HTMLElement | null,
|
||||
callback?: (scale: {
|
||||
width: number;
|
||||
height: number;
|
||||
}) => void
|
||||
) => {
|
||||
|
||||
// * 默认缩放值
|
||||
const scale = {
|
||||
width: 1,
|
||||
height: 1,
|
||||
}
|
||||
|
||||
const calcRate = () => {
|
||||
if (scaleDom) {
|
||||
scale.width = parseFloat((window.innerWidth / width).toFixed(5))
|
||||
scale.height = parseFloat((window.innerHeight / height).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
if (callback) callback(scale)
|
||||
}
|
||||
}
|
||||
|
||||
const resize = throttle(() => {
|
||||
calcRate()
|
||||
}, 200)
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const windowResize = () => {
|
||||
window.addEventListener('resize', resize)
|
||||
}
|
||||
|
||||
// * 卸载监听
|
||||
const unWindowResize = () => {
|
||||
window.removeEventListener('resize', resize)
|
||||
}
|
||||
|
||||
return {
|
||||
calcRate,
|
||||
windowResize,
|
||||
unWindowResize,
|
||||
}
|
||||
import throttle from 'lodash/throttle'
|
||||
|
||||
// 拆出来是为了更好的分离单独复用
|
||||
|
||||
// * 屏幕缩放适配(两边留白)
|
||||
export const usePreviewFitScale = (
|
||||
width: number,
|
||||
height: number,
|
||||
scaleDom: HTMLElement | null,
|
||||
callback?: (scale: {
|
||||
width: number;
|
||||
height: number;
|
||||
}) => void
|
||||
) => {
|
||||
// * 画布尺寸(px)
|
||||
const baseWidth = width
|
||||
const baseHeight = height
|
||||
|
||||
// * 默认缩放值
|
||||
const scale = {
|
||||
width: 1,
|
||||
height: 1,
|
||||
}
|
||||
|
||||
// * 需保持的比例
|
||||
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))
|
||||
const calcRate = () => {
|
||||
// 当前屏幕宽高比
|
||||
const currentRate = parseFloat(
|
||||
(window.innerWidth / window.innerHeight).toFixed(5)
|
||||
)
|
||||
if (scaleDom) {
|
||||
if (currentRate > baseProportion) {
|
||||
// 表示更宽
|
||||
scale.width = parseFloat(((window.innerHeight * baseProportion) / baseWidth).toFixed(5))
|
||||
scale.height = parseFloat((window.innerHeight / baseHeight).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
} else {
|
||||
// 表示更高
|
||||
scale.height = parseFloat(((window.innerWidth / baseProportion) / baseHeight).toFixed(5))
|
||||
scale.width = parseFloat((window.innerWidth / baseWidth).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
}
|
||||
if (callback) callback(scale)
|
||||
}
|
||||
}
|
||||
|
||||
const resize = throttle(() => {
|
||||
calcRate()
|
||||
}, 200)
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const windowResize = () => {
|
||||
window.addEventListener('resize', resize)
|
||||
}
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const unWindowResize = () => {
|
||||
window.removeEventListener('resize', resize)
|
||||
}
|
||||
|
||||
return {
|
||||
calcRate,
|
||||
windowResize,
|
||||
unWindowResize,
|
||||
}
|
||||
}
|
||||
|
||||
// * X轴撑满,Y轴滚动条
|
||||
export const usePreviewScrollYScale = (
|
||||
width: number,
|
||||
height: number,
|
||||
scaleDom: HTMLElement | null,
|
||||
callback?: (scale: {
|
||||
width: number;
|
||||
height: number;
|
||||
}) => void
|
||||
) => {
|
||||
// * 画布尺寸(px)
|
||||
const baseWidth = width
|
||||
const baseHeight = height
|
||||
|
||||
// * 默认缩放值
|
||||
const scale = {
|
||||
width: 1,
|
||||
height: 1,
|
||||
}
|
||||
|
||||
// * 需保持的比例
|
||||
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))
|
||||
const calcRate = () => {
|
||||
if (scaleDom) {
|
||||
scale.height = parseFloat(((window.innerWidth / baseProportion) / baseHeight).toFixed(5))
|
||||
scale.width = parseFloat((window.innerWidth / baseWidth).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
if (callback) callback(scale)
|
||||
}
|
||||
}
|
||||
|
||||
const resize = throttle(() => {
|
||||
calcRate()
|
||||
}, 200)
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const windowResize = () => {
|
||||
window.addEventListener('resize', resize)
|
||||
}
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const unWindowResize = () => {
|
||||
window.removeEventListener('resize', resize)
|
||||
}
|
||||
|
||||
return {
|
||||
calcRate,
|
||||
windowResize,
|
||||
unWindowResize,
|
||||
}
|
||||
}
|
||||
|
||||
// * Y轴撑满,X轴滚动条
|
||||
export const usePreviewScrollXScale = (
|
||||
width: number,
|
||||
height: number,
|
||||
scaleDom: HTMLElement | null,
|
||||
callback?: (scale: {
|
||||
width: number;
|
||||
height: number;
|
||||
}) => void
|
||||
) => {
|
||||
// * 画布尺寸(px)
|
||||
const baseWidth = width
|
||||
const baseHeight = height
|
||||
|
||||
// * 默认缩放值
|
||||
const scale = {
|
||||
height: 1,
|
||||
width: 1,
|
||||
}
|
||||
|
||||
// * 需保持的比例
|
||||
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))
|
||||
const calcRate = () => {
|
||||
if (scaleDom) {
|
||||
scale.width = parseFloat(((window.innerHeight * baseProportion) / baseWidth).toFixed(5))
|
||||
scale.height = parseFloat((window.innerHeight / baseHeight).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
if (callback) callback(scale)
|
||||
}
|
||||
}
|
||||
|
||||
const resize = throttle(() => {
|
||||
calcRate()
|
||||
}, 200)
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const windowResize = () => {
|
||||
window.addEventListener('resize', resize)
|
||||
}
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const unWindowResize = () => {
|
||||
window.removeEventListener('resize', resize)
|
||||
}
|
||||
|
||||
return {
|
||||
calcRate,
|
||||
windowResize,
|
||||
unWindowResize,
|
||||
}
|
||||
}
|
||||
|
||||
// * 变形内容,宽高铺满
|
||||
export const usePreviewFullScale = (
|
||||
width: number,
|
||||
height: number,
|
||||
scaleDom: HTMLElement | null,
|
||||
callback?: (scale: {
|
||||
width: number;
|
||||
height: number;
|
||||
}) => void
|
||||
) => {
|
||||
|
||||
// * 默认缩放值
|
||||
const scale = {
|
||||
width: 1,
|
||||
height: 1,
|
||||
}
|
||||
|
||||
const calcRate = () => {
|
||||
if (scaleDom) {
|
||||
scale.width = parseFloat((window.innerWidth / width).toFixed(5))
|
||||
scale.height = parseFloat((window.innerHeight / height).toFixed(5))
|
||||
scaleDom.style.transform = `scale(${scale.width}, ${scale.height})`
|
||||
if (callback) callback(scale)
|
||||
}
|
||||
}
|
||||
|
||||
const resize = throttle(() => {
|
||||
calcRate()
|
||||
}, 200)
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const windowResize = () => {
|
||||
window.addEventListener('resize', resize)
|
||||
}
|
||||
|
||||
// * 改变窗口大小重新绘制
|
||||
const unWindowResize = () => {
|
||||
window.removeEventListener('resize', resize)
|
||||
}
|
||||
|
||||
return {
|
||||
calcRate,
|
||||
windowResize,
|
||||
unWindowResize,
|
||||
}
|
||||
}
|
||||
@@ -1,164 +0,0 @@
|
||||
import { watch } from 'vue'
|
||||
import { VChart, type ITheme } from '@visactor/vchart'
|
||||
|
||||
import light from '@visactor/vchart-theme/public/light.json'
|
||||
import dark from '@visactor/vchart-theme/public/dark.json'
|
||||
import vScreenVolcanoBlue from '@visactor/vchart-theme/public/vScreenVolcanoBlue.json'
|
||||
import vScreenClean from '@visactor/vchart-theme/public/vScreenClean.json'
|
||||
import vScreenOutskirts from '@visactor/vchart-theme/public/vScreenOutskirts.json'
|
||||
import vScreenBlueOrange from '@visactor/vchart-theme/public/vScreenBlueOrange.json'
|
||||
import vScreenFinanceYellow from '@visactor/vchart-theme/public/vScreenFinanceYellow.json'
|
||||
import vScreenWenLvCyan from '@visactor/vchart-theme/public/vScreenWenLvCyan.json'
|
||||
import vScreenElectricGreen from '@visactor/vchart-theme/public/vScreenElectricGreen.json'
|
||||
import vScreenECommercePurple from '@visactor/vchart-theme/public/vScreenECommercePurple.json'
|
||||
import vScreenRedBlue from '@visactor/vchart-theme/public/vScreenRedBlue.json'
|
||||
import vScreenPartyRed from '@visactor/vchart-theme/public/vScreenPartyRed.json'
|
||||
// 行业色板
|
||||
import veODesignLightFinance from '@visactor/vchart-theme/public/veODesignLightFinance.json'
|
||||
import veODesignDarkFinance from '@visactor/vchart-theme/public/veODesignDarkFinance.json'
|
||||
|
||||
import veODesignLightGovernment from '@visactor/vchart-theme/public/veODesignLightGovernment.json'
|
||||
import veODesignDarkGovernment from '@visactor/vchart-theme/public/veODesignDarkGovernment.json'
|
||||
|
||||
import veODesignLightConsumer from '@visactor/vchart-theme/public/veODesignLightConsumer.json'
|
||||
import veODesignDarkConsumer from '@visactor/vchart-theme/public/veODesignDarkConsumer.json'
|
||||
|
||||
import veODesignLightAutomobile from '@visactor/vchart-theme/public/veODesignLightAutomobile.json'
|
||||
import veODesignDarkAutomobile from '@visactor/vchart-theme/public/veODesignDarkAutomobile.json'
|
||||
|
||||
import veODesignLightCulturalTourism from '@visactor/vchart-theme/public/veODesignLightCulturalTourism.json'
|
||||
import veODesignDarkCulturalTourism from '@visactor/vchart-theme/public/veODesignDarkCulturalTourism.json'
|
||||
|
||||
import veODesignLightMedical from '@visactor/vchart-theme/public/veODesignLightMedical.json'
|
||||
import veODesignDarkMedical from '@visactor/vchart-theme/public/veODesignDarkMedical.json'
|
||||
|
||||
import veODesignLightNewEnergy from '@visactor/vchart-theme/public/veODesignLightNewEnergy.json'
|
||||
import veODesignDarkNewEnergy from '@visactor/vchart-theme/public/veODesignDarkNewEnergy.json'
|
||||
|
||||
const themeMap = {
|
||||
// 明亮
|
||||
light: light,
|
||||
// 暗黑
|
||||
dark: dark,
|
||||
// 火山蓝
|
||||
vScreenVolcanoBlue: vScreenVolcanoBlue,
|
||||
// 党建红
|
||||
vScreenPartyRed: vScreenPartyRed,
|
||||
// 清新蜡笔
|
||||
vScreenClean: vScreenClean,
|
||||
// 郊外
|
||||
vScreenOutskirts: vScreenOutskirts,
|
||||
// 汽车蓝橙
|
||||
vScreenBlueOrange: vScreenBlueOrange,
|
||||
// 金融黄
|
||||
vScreenFinanceYellow: vScreenFinanceYellow,
|
||||
// 文旅青
|
||||
vScreenWenLvCyan: vScreenWenLvCyan,
|
||||
// 电力绿
|
||||
vScreenElectricGreen: vScreenElectricGreen,
|
||||
// 电商紫
|
||||
vScreenECommercePurple: vScreenECommercePurple,
|
||||
// 红蓝
|
||||
vScreenRedBlue: vScreenRedBlue,
|
||||
// 金融行业色板
|
||||
veODesignLightFinance: veODesignLightFinance,
|
||||
veODesignDarkFinance: veODesignDarkFinance,
|
||||
// 政府行业色板
|
||||
veODesignLightGovernment: veODesignLightGovernment,
|
||||
veODesignDarkGovernment: veODesignDarkGovernment,
|
||||
// 消费行业色板
|
||||
veODesignLightConsumer: veODesignLightConsumer,
|
||||
veODesignDarkConsumer: veODesignDarkConsumer,
|
||||
// 汽车行业色板
|
||||
veODesignLightAutomobile: veODesignLightAutomobile,
|
||||
veODesignDarkAutomobile: veODesignDarkAutomobile,
|
||||
// 文旅行业色板
|
||||
veODesignLightCulturalTourism: veODesignLightCulturalTourism,
|
||||
veODesignDarkCulturalTourism: veODesignDarkCulturalTourism,
|
||||
// 医疗行业色板
|
||||
veODesignLightMedical: veODesignLightMedical,
|
||||
veODesignDarkMedical: veODesignDarkMedical,
|
||||
// 新能源行业色板
|
||||
veODesignLightNewEnergy: veODesignLightNewEnergy,
|
||||
veODesignDarkNewEnergy: veODesignDarkNewEnergy
|
||||
}
|
||||
|
||||
export const useVCharts = () => {
|
||||
const getThemeMap = () => {
|
||||
return themeMap
|
||||
}
|
||||
|
||||
// 注册主题(支持自定义主题)
|
||||
const registerTheme = (themeName: keyof typeof themeMap, theme: any) => {
|
||||
VChart.ThemeManager.registerTheme(themeName, (themeMap[themeName] as any) || theme)
|
||||
}
|
||||
|
||||
// 设置当前主题
|
||||
const setCurrentTheme = (themeName = 'vScreenVolcanoBlue') => {
|
||||
VChart.ThemeManager.setCurrentTheme(themeName)
|
||||
}
|
||||
|
||||
// 判断主题是否存在
|
||||
const themeExist = (name: string): boolean => {
|
||||
return VChart.ThemeManager.themeExist(name)
|
||||
}
|
||||
|
||||
// 获取主题
|
||||
const getTheme = (name: string): ITheme => {
|
||||
return VChart.ThemeManager.getTheme(name)
|
||||
}
|
||||
|
||||
// 获取当前主题
|
||||
const getCurrentTheme = (): ITheme => {
|
||||
return VChart.ThemeManager.getCurrentTheme()
|
||||
}
|
||||
|
||||
// 设置主题
|
||||
const setTheme = (name: keyof typeof themeMap): boolean => {
|
||||
if (themeExist(name)) {
|
||||
setCurrentTheme(name)
|
||||
return true
|
||||
} else {
|
||||
// 先注册
|
||||
const theme = themeMap[name]
|
||||
if (theme) {
|
||||
registerTheme(name, theme)
|
||||
setCurrentTheme(name)
|
||||
return true
|
||||
} else {
|
||||
// 注册默认主题
|
||||
registerTheme('vScreenVolcanoBlue', vScreenVolcanoBlue)
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
return {
|
||||
getThemeMap,
|
||||
registerTheme,
|
||||
setCurrentTheme,
|
||||
themeExist,
|
||||
getTheme,
|
||||
setTheme,
|
||||
getCurrentTheme
|
||||
}
|
||||
}
|
||||
|
||||
// 主题初始化
|
||||
export const useInitVChartsTheme = (chartEditStore: any) => {
|
||||
const vCharts = useVCharts()
|
||||
|
||||
const initVChartsThemeIns = watch(
|
||||
() => chartEditStore.getEditCanvasConfig.vChartThemeName,
|
||||
(newTheme: string) => {
|
||||
vCharts.setTheme(newTheme as any)
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
return {
|
||||
initVChartsThemeIns
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
export default {
|
||||
create_btn: 'Create',
|
||||
create_btn: 'Creat',
|
||||
create_tip: 'Please select a content for development',
|
||||
project: 'Project',
|
||||
my: 'My',
|
||||
|
||||
@@ -23,8 +23,6 @@ export const langList = [
|
||||
]
|
||||
|
||||
const i18n = createI18n({
|
||||
legacy: false,
|
||||
globalInjection:true,
|
||||
locale: langStorage?.lang || lang,
|
||||
fallbackLocale: langStorage?.lang || lang,
|
||||
messages: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<n-layout-header bordered class="go-header">
|
||||
<header class="go-header-box" :class="{ 'is-project': isProject }">
|
||||
<header class="go-header-box">
|
||||
<div class="header-item left">
|
||||
<n-space>
|
||||
<slot name="left"></slot>
|
||||
@@ -23,31 +23,21 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { GoThemeSelect } from '@/components/GoThemeSelect'
|
||||
import { GoLangSelect } from '@/components/GoLangSelect'
|
||||
import { ThemeColorSelect } from '@/components/Pages/ThemeColorSelect'
|
||||
import { PageEnum } from '@/enums/pageEnum'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
const isProject = computed(() => {
|
||||
return route.fullPath === PageEnum.BASE_HOME_ITEMS
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$min-width: 400px;
|
||||
@include go(header) {
|
||||
&-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
&.is-project {
|
||||
grid-template-columns: none;
|
||||
}
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 33.33%);
|
||||
.header-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: $min-width;
|
||||
&.left {
|
||||
justify-content: start;
|
||||
}
|
||||
@@ -59,7 +49,7 @@ const isProject = computed(() => {
|
||||
}
|
||||
}
|
||||
height: $--header-height;
|
||||
padding: 0 20px 0 60px;
|
||||
padding: 0 60px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<template>
|
||||
<router-view>
|
||||
<template #default="{ Component, route }">
|
||||
<component v-if="route.meta.noKeepAlive" :is="Component"></component>
|
||||
<component
|
||||
v-if="route.noKeepAlive"
|
||||
:is="Component"
|
||||
:key="route.fullPath"
|
||||
></component>
|
||||
<keep-alive v-else>
|
||||
<component :is="Component"></component>
|
||||
<component :is="Component" :key="route.fullPath"></component>
|
||||
</keep-alive>
|
||||
</template>
|
||||
</router-view>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<router-view #default="{ Component, route }">
|
||||
<transition name="fade" mode="out-in" appear>
|
||||
<component
|
||||
v-if="route.meta.noKeepAlive"
|
||||
:is="Component"
|
||||
:key="route.fullPath"
|
||||
></component>
|
||||
<keep-alive v-else>
|
||||
<component :is="Component" :key="route.fullPath"></component>
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</router-view>
|
||||
</template>
|
||||
<template>
|
||||
<router-view #default="{ Component, route }">
|
||||
<transition name="fade" mode="out-in" appear>
|
||||
<component
|
||||
v-if="route.noKeepAlive"
|
||||
:is="Component"
|
||||
:key="route.fullPath"
|
||||
></component>
|
||||
<keep-alive v-else>
|
||||
<component :is="Component" :key="route.fullPath"></component>
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</router-view>
|
||||
</template>
|
||||
|
||||
123
src/main.ts
@@ -1,67 +1,56 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import router, { setupRouter } from '@/router'
|
||||
import i18n from '@/i18n/index'
|
||||
import { setupStore } from '@/store'
|
||||
import { setupNaive, setupDirectives, setupCustomComponents, initFunction } from '@/plugins'
|
||||
import { GoAppProvider } from '@/components/GoAppProvider/index'
|
||||
import { setHtmlTheme } from '@/utils'
|
||||
import { addCollection } from 'iconify-icon'
|
||||
import uimIcons from '@iconify/json/json/uim.json'
|
||||
import lineMdIcons from '@iconify/json/json/line-md.json'
|
||||
import wiIcons from '@iconify/json/json/wi.json'
|
||||
|
||||
// 引入全局样式
|
||||
import '@/styles/pages/index.scss'
|
||||
// 引入动画
|
||||
import 'animate.css/animate.min.css'
|
||||
// 引入标尺
|
||||
import 'vue3-sketch-ruler/lib/style.css'
|
||||
// 注册图标
|
||||
addCollection(uimIcons)
|
||||
addCollection(lineMdIcons)
|
||||
addCollection(wiIcons)
|
||||
|
||||
async function appInit() {
|
||||
const goAppProvider = createApp(GoAppProvider)
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
// 注册全局常用的 naive-ui 组件
|
||||
setupNaive(app)
|
||||
|
||||
// 注册全局自定义指令
|
||||
setupDirectives(app)
|
||||
|
||||
// 注册全局自定义组件
|
||||
setupCustomComponents(app)
|
||||
|
||||
// 挂载状态管理
|
||||
setupStore(app)
|
||||
|
||||
// 解决路由守卫,Axios中可使用,Dialog,Message 等全局组件
|
||||
goAppProvider.mount('#appProvider', true)
|
||||
|
||||
// 挂载路由
|
||||
setupRouter(app)
|
||||
|
||||
// 路由准备就绪后挂载APP实例
|
||||
await router.isReady()
|
||||
|
||||
// Store 准备就绪后处理主题色
|
||||
setHtmlTheme()
|
||||
|
||||
// 语言注册
|
||||
app.use(i18n)
|
||||
|
||||
// 挂载到页面
|
||||
app.mount('#app', true)
|
||||
|
||||
// 挂载到 window
|
||||
window['$vue'] = app
|
||||
}
|
||||
|
||||
appInit().then(() => {
|
||||
initFunction()
|
||||
})
|
||||
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import router, { setupRouter } from '@/router'
|
||||
import i18n from '@/i18n/index'
|
||||
import { setupStore } from '@/store'
|
||||
import { setupNaive, setupDirectives, setupCustomComponents } from '@/plugins'
|
||||
import { GoAppProvider } from '@/components/GoAppProvider/index'
|
||||
import { setHtmlTheme } from '@/utils'
|
||||
|
||||
// 引入全局样式
|
||||
import '@/styles/pages/index.scss'
|
||||
// 引入动画
|
||||
import 'animate.css/animate.min.css'
|
||||
// 引入标尺
|
||||
import 'vue3-sketch-ruler/lib/style.css'
|
||||
|
||||
async function appInit() {
|
||||
const goAppProvider = createApp(GoAppProvider)
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
// 注册全局常用的 naive-ui 组件
|
||||
setupNaive(app)
|
||||
|
||||
// 注册全局自定义指令
|
||||
setupDirectives(app)
|
||||
|
||||
// 注册全局自定义组件
|
||||
setupCustomComponents(app)
|
||||
|
||||
// 挂载状态管理
|
||||
setupStore(app)
|
||||
|
||||
// 解决路由守卫,Axios中可使用,Dialog,Message 等全局组件
|
||||
goAppProvider.mount('#appProvider', true)
|
||||
|
||||
// 挂载路由
|
||||
setupRouter(app)
|
||||
|
||||
// 路由准备就绪后挂载APP实例
|
||||
await router.isReady()
|
||||
|
||||
// Store 准备就绪后处理主题色
|
||||
setHtmlTheme()
|
||||
|
||||
// 语言注册
|
||||
app.use(i18n)
|
||||
|
||||
// 挂载到页面
|
||||
app.mount('#app', true)
|
||||
|
||||
// 挂载到 window
|
||||
window['$vue'] = app
|
||||
}
|
||||
|
||||
void appInit()
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
export * from './axis'
|
||||
export * from './line'
|
||||
export * from './label'
|
||||
export * from './legend'
|
||||
export * from './line'
|
||||
@@ -1,13 +0,0 @@
|
||||
export const labelConfig = {
|
||||
position: [
|
||||
{ label: '外侧', value: 'outside' },
|
||||
{ label: '内部', value: 'inside' },
|
||||
{ label: '中心', value: 'center' }
|
||||
],
|
||||
fontWeight: [
|
||||
{ label: '正常', value: 'normal' },
|
||||
{ label: '普通加粗', value: 'bold' },
|
||||
{ label: '加粗', value: 'bolder' },
|
||||
{ label: '细体', value: 'lighter' }
|
||||
]
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
export const legendConfig = {
|
||||
// X轴位置
|
||||
lengendX: [
|
||||
{
|
||||
label: '靠左',
|
||||
value: 'left'
|
||||
},
|
||||
{
|
||||
label: '居中',
|
||||
value: 'center'
|
||||
},
|
||||
{
|
||||
label: '靠右',
|
||||
value: 'right'
|
||||
}
|
||||
],
|
||||
// y轴位置
|
||||
lengendY: [
|
||||
{
|
||||
label: '靠上',
|
||||
value: 'top'
|
||||
},
|
||||
{
|
||||
label: '居中',
|
||||
value: 'center'
|
||||
},
|
||||
{
|
||||
label: '靠下',
|
||||
value: 'bottom'
|
||||
}
|
||||
],
|
||||
// 排列方向
|
||||
orient: [
|
||||
{
|
||||
label: '水平',
|
||||
value: 'horizontal'
|
||||
},
|
||||
{
|
||||
label: '垂直',
|
||||
value: 'vertical'
|
||||
}
|
||||
],
|
||||
// 形状
|
||||
shape: [
|
||||
{
|
||||
label: '圆形',
|
||||
value: 'circle'
|
||||
},
|
||||
{
|
||||
label: '方形',
|
||||
value: 'rect'
|
||||
},
|
||||
{
|
||||
label: '圆角方形',
|
||||
value: 'roundRect'
|
||||
},
|
||||
{
|
||||
label: '三角形',
|
||||
value: 'triangle'
|
||||
},
|
||||
{
|
||||
label: '钢笔形',
|
||||
value: 'pin'
|
||||
},
|
||||
{
|
||||
label: '箭头形',
|
||||
value: 'arrow'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
export * from './legends'
|
||||
@@ -1,99 +0,0 @@
|
||||
export const legendsConfig = {
|
||||
// 位置
|
||||
orient: [
|
||||
{
|
||||
label: '顶部',
|
||||
value: 'top'
|
||||
},
|
||||
{
|
||||
label: '底部',
|
||||
value: 'bottom'
|
||||
},
|
||||
{
|
||||
label: '左侧',
|
||||
value: 'left'
|
||||
},
|
||||
{
|
||||
label: '右侧',
|
||||
value: 'right'
|
||||
}
|
||||
],
|
||||
// 对齐方式
|
||||
position: [
|
||||
{
|
||||
label: '起始',
|
||||
value: 'start'
|
||||
},
|
||||
{
|
||||
label: '居中',
|
||||
value: 'middle'
|
||||
},
|
||||
{
|
||||
label: '末尾',
|
||||
value: 'end'
|
||||
}
|
||||
],
|
||||
// 每一项的图例位置
|
||||
align: [
|
||||
{
|
||||
label: '居左',
|
||||
value: 'left'
|
||||
},
|
||||
{
|
||||
label: '居右',
|
||||
value: 'right'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export const fontStyleConfig = {
|
||||
// 字重
|
||||
fontWeight: [
|
||||
{
|
||||
label: '100',
|
||||
value: 100
|
||||
},
|
||||
{
|
||||
label: '200',
|
||||
value: 200
|
||||
},
|
||||
{
|
||||
label: '300',
|
||||
value: 300
|
||||
},
|
||||
{
|
||||
label: '400',
|
||||
value: 400
|
||||
},
|
||||
{
|
||||
label: '500',
|
||||
value: 500
|
||||
},
|
||||
{
|
||||
label: '600',
|
||||
value: 600
|
||||
},
|
||||
{
|
||||
label: '正常',
|
||||
value: "normal"
|
||||
},
|
||||
{
|
||||
label: '加粗',
|
||||
value: "bold"
|
||||
}
|
||||
],
|
||||
fontFamily: [
|
||||
{
|
||||
label: '宋体',
|
||||
value: 'SimSun'
|
||||
},
|
||||
{
|
||||
label: '黑体',
|
||||
value: 'SimHei'
|
||||
},
|
||||
{
|
||||
label: '楷体',
|
||||
value: '楷体'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -28,7 +28,7 @@ export const option = {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
xAxis: {
|
||||
show: true,
|
||||
type: 'category'
|
||||
},
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
<global-setting :optionData="optionData"></global-setting>
|
||||
<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>
|
||||
</SettingItem>
|
||||
<SettingItem>
|
||||
<n-button size="small" @click="item.itemStyle.color = null"> 恢复默认 </n-button>
|
||||
</SettingItem>
|
||||
<SettingItem name="宽度">
|
||||
<n-input-number
|
||||
v-model:value="item.barWidth"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import image from '@/assets/images/chart/charts/bar_x.png'
|
||||
import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d'
|
||||
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||
|
||||
@@ -10,5 +11,5 @@ export const BarCommonConfig: ConfigType = {
|
||||
categoryName: ChatCategoryEnumName.BAR,
|
||||
package: PackagesCategoryEnum.CHARTS,
|
||||
chartFrame: ChartFrameEnum.ECHARTS,
|
||||
image: 'bar_x.png'
|
||||
image
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<v-chart
|
||||
ref="vChartRef"
|
||||
:init-options="initOptions"
|
||||
:theme="themeColor"
|
||||
:option="option"
|
||||
:manual-update="isPreview()"
|
||||
:update-options="{
|
||||
replaceMerge: replaceMergeArr
|
||||
}"
|
||||
@@ -14,7 +14,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, computed, watch, PropType } from 'vue'
|
||||
import VChart from 'vue-echarts'
|
||||
import { useCanvasInitOptions } from '@/hooks/useCanvasInitOptions.hook'
|
||||
import { use } from 'echarts/core'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import { BarChart } from 'echarts/charts'
|
||||
@@ -26,7 +25,6 @@ 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 cloneDeep from 'lodash/cloneDeep'
|
||||
|
||||
const props = defineProps({
|
||||
themeSetting: {
|
||||
@@ -43,8 +41,6 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const initOptions = useCanvasInitOptions(props.chartConfig.option, props.themeSetting)
|
||||
|
||||
use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent, LegendComponent])
|
||||
|
||||
const replaceMergeArr = ref<string[]>()
|
||||
@@ -61,23 +57,11 @@ watch(
|
||||
if (!isObject(newData) || !('dimensions' in newData)) return
|
||||
if (Array.isArray(newData?.dimensions)) {
|
||||
const seriesArr = []
|
||||
// 对oldData进行判断,防止传入错误数据之后对旧维度判断产生干扰
|
||||
// 此处计算的是dimensions的Y轴维度,若是dimensions.length为0或1,则默认为1,排除X轴维度干扰
|
||||
const oldDimensions = Array.isArray(oldData?.dimensions)&&oldData.dimensions.length >= 1 ? oldData.dimensions.length : 1;
|
||||
const newDimensions = newData.dimensions.length >= 1 ? newData.dimensions.length : 1;
|
||||
const dimensionsGap = newDimensions - oldDimensions;
|
||||
if (dimensionsGap < 0) {
|
||||
props.chartConfig.option.series.splice(newDimensions - 1)
|
||||
} else if (dimensionsGap > 0) {
|
||||
if(!oldData || !oldData?.dimensions || !Array.isArray(oldData?.dimensions) || !oldData?.dimensions.length ) {
|
||||
props.chartConfig.option.series=[]
|
||||
}
|
||||
for (let i = 0; i < dimensionsGap; i++) {
|
||||
seriesArr.push(cloneDeep(seriesItem))
|
||||
}
|
||||
props.chartConfig.option.series.push(...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 = []
|
||||
})
|
||||
@@ -91,7 +75,5 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, (newData: any) => {
|
||||
props.chartConfig.option.dataset = newData
|
||||
})
|
||||
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore)
|
||||
</script>
|
||||
|
||||