Compare commits
1361 Commits
v2.1.6
...
dev-vchart
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b37edc558 | ||
|
|
a698191873 | ||
|
|
3ae9aac2d9 | ||
|
|
152786c652 | ||
|
|
026e4809c8 | ||
|
|
5d6850b47d | ||
|
|
844b95987e | ||
|
|
b3d9005f7d | ||
|
|
f48ada2859 | ||
|
|
6106a8fc5c | ||
|
|
0972ea0e28 | ||
|
|
8d3ff7cc26 | ||
|
|
55d7fa84eb | ||
|
|
e420796e33 | ||
|
|
78d8d57117 | ||
|
|
663733b4d4 | ||
|
|
68955f8f32 | ||
|
|
286bcc5576 | ||
|
|
84890550c8 | ||
|
|
17a912e558 | ||
|
|
0a12357997 | ||
|
|
2201c09219 | ||
|
|
ef912f91b2 | ||
|
|
0866ceccac | ||
|
|
526d01b16c | ||
|
|
7e424bfcda | ||
|
|
8eb86f2a8e | ||
|
|
1acb949f33 | ||
|
|
2e941b8a12 | ||
|
|
a9d010c0d9 | ||
|
|
8e22972551 | ||
|
|
47af4593e6 | ||
|
|
852b1e5317 | ||
|
|
026b07721a | ||
|
|
3bfbee4cc1 | ||
|
|
d7c4090c96 | ||
|
|
86e47190b6 | ||
|
|
e2d93053ba | ||
|
|
943cabf5cd | ||
|
|
7d5af8f4f1 | ||
|
|
0c9ee29d02 | ||
|
|
923b27d982 | ||
|
|
ae6641daa0 | ||
|
|
792c403f21 | ||
|
|
18889bc5cf | ||
|
|
81fc343a08 | ||
|
|
476c680574 | ||
|
|
319edf6a9c | ||
|
|
39a7815d42 | ||
|
|
ebc084f7e8 | ||
|
|
c7022cd7fc | ||
|
|
04bc68c3ce | ||
|
|
fe8ca5a447 | ||
|
|
9aaf06abeb | ||
|
|
4355f3dac0 | ||
|
|
5b0840b92d | ||
|
|
82349ba28b | ||
|
|
caad259e71 | ||
|
|
87604c9cdb | ||
|
|
8801dbf64d | ||
|
|
c578260fc7 | ||
|
|
99d398ae46 | ||
|
|
1640a0580d | ||
|
|
a60bf69197 | ||
|
|
a4bb393913 | ||
|
|
fddb834806 | ||
|
|
5d6646ccda | ||
|
|
bbb1c97c41 | ||
|
|
a8ea82e125 | ||
|
|
f4de3189ec | ||
|
|
2dec349f18 | ||
|
|
ac4e4aa0a2 | ||
|
|
9d7dc517fd | ||
|
|
ba0b8f1374 | ||
|
|
4c7c5cf4ba | ||
|
|
ce1a5476d6 | ||
|
|
eb804cbb5f | ||
|
|
b5750246f1 | ||
|
|
c0c68e8b59 | ||
|
|
ee1bd2b2b8 | ||
|
|
6c54c168a6 | ||
|
|
7ce7e7ae87 | ||
|
|
9d5f9ced41 | ||
|
|
8d78cc82ec | ||
|
|
2b067ce818 | ||
|
|
b97126d03e | ||
|
|
52f74d7b91 | ||
|
|
b4e018ee96 | ||
|
|
8883c47023 | ||
|
|
30e7a76de9 | ||
|
|
742dc67235 | ||
|
|
dad89b1c52 | ||
|
|
e090e669c4 | ||
|
|
c7796c9852 | ||
|
|
73d8889bc4 | ||
|
|
50e9e994b1 | ||
|
|
4d075cff2f | ||
|
|
6d5688693b | ||
|
|
8d9041964c | ||
|
|
91170cfdfe | ||
|
|
7d122982d6 | ||
|
|
efbeeff0c7 | ||
|
|
5122ecf862 | ||
|
|
64a357986a | ||
|
|
2d74bec5bf | ||
|
|
07820bb859 | ||
|
|
56c2dbdcc9 | ||
|
|
f43e25bd45 | ||
|
|
ea7bb4b817 | ||
|
|
5387be85ce | ||
|
|
cdc3184931 | ||
|
|
ad06c4f82a | ||
|
|
41e03ce52d | ||
|
|
3d55c460f1 | ||
|
|
1fd73cbc57 | ||
|
|
e7dd8e9ba4 | ||
|
|
a124f346e8 | ||
|
|
101b868c05 | ||
|
|
7ae5fcda1e | ||
|
|
c769deba5c | ||
|
|
99c82de77c | ||
|
|
b08636ec69 | ||
|
|
b841fe876d | ||
|
|
d30b04dae4 | ||
|
|
c51bcd72c7 | ||
|
|
a091b6dcda | ||
|
|
21590349a6 | ||
|
|
765634224f | ||
|
|
7d6afbb0c1 | ||
|
|
e84551a457 | ||
|
|
dfd8a7b7ae | ||
|
|
232c8deb10 | ||
|
|
006b79f21e | ||
|
|
37b84fcf12 | ||
|
|
06e54ae132 | ||
|
|
02a96387a4 | ||
|
|
3e1477ee0d | ||
|
|
52c2929889 | ||
|
|
acfa27baff | ||
|
|
d24daf5b15 | ||
|
|
1c0a57f5d9 | ||
|
|
9f3ca6b614 | ||
|
|
952e61bbba | ||
|
|
adf7004727 | ||
|
|
f6d0befd9d | ||
|
|
c4e65a1a47 | ||
|
|
11c6d04c65 | ||
|
|
1a0bcd4443 | ||
|
|
9e70e9ca09 | ||
|
|
1a14b2932c | ||
|
|
a672aab0b9 | ||
|
|
d9264e5164 | ||
|
|
d018d6babc | ||
|
|
7fb65ff24c | ||
|
|
f294d40769 | ||
|
|
71acbc6188 | ||
|
|
cd1f8e259a | ||
|
|
4b0b50ea3c | ||
|
|
2a32f2ab72 | ||
|
|
9b0136b92a | ||
|
|
9384cd98a4 | ||
|
|
17b98e0a3e | ||
|
|
b9b8d69146 | ||
|
|
d6a347ccb5 | ||
|
|
d90789f60e | ||
|
|
6e9db7aa79 | ||
|
|
c339aa7648 | ||
|
|
d6e309b117 | ||
|
|
78310dcd05 | ||
|
|
d907d30686 | ||
|
|
9c0aa14473 | ||
|
|
0b36885d9f | ||
|
|
1c2bf4019a | ||
|
|
d1eef46af7 | ||
|
|
9e9765b573 | ||
|
|
e15603bb70 | ||
|
|
c242a86e86 | ||
|
|
fe06b55a56 | ||
|
|
551fb08c7a | ||
|
|
d588a2b14d | ||
|
|
430b2dedc5 | ||
|
|
8107ac3755 | ||
|
|
e52b5ef914 | ||
|
|
e571e7a000 | ||
|
|
f0db75f623 | ||
|
|
b7fd270eb9 | ||
|
|
812f07fe96 | ||
|
|
bdefdeee0b | ||
|
|
30c5946a7a | ||
|
|
efe56bca0d | ||
|
|
11cd933fa2 | ||
|
|
015d546618 | ||
|
|
7fccaa5e6a | ||
|
|
02c1ed12d0 | ||
|
|
14132c1611 | ||
|
|
2fe63c613d | ||
|
|
aee8c6bf9e | ||
|
|
2770114254 | ||
|
|
338b4e0b55 | ||
|
|
d472f53dfb | ||
|
|
a7958358e0 | ||
|
|
3d241e85f2 | ||
|
|
308cb84ee4 | ||
|
|
4c8f2d6f28 | ||
|
|
424c7b1127 | ||
|
|
045e6c2e3c | ||
|
|
0bd594afe8 | ||
|
|
015dbb79ef | ||
|
|
2b67bb16f3 | ||
|
|
f26e4e478a | ||
|
|
93714457ab | ||
|
|
c1f0e51da7 | ||
|
|
d8faf22714 | ||
|
|
0c87b9ecac | ||
|
|
5094c17831 | ||
|
|
f9c3d978f0 | ||
|
|
02c1bd30e3 | ||
|
|
d5708546b7 | ||
|
|
d701411547 | ||
|
|
9b1c4fcf7a | ||
|
|
30d1e7dda2 | ||
|
|
9307614a94 | ||
|
|
ad563d2127 | ||
|
|
ddc86c9fa2 | ||
|
|
3ececee817 | ||
|
|
a29a4f7e17 | ||
|
|
f48c57a043 | ||
|
|
3f4f1e7fce | ||
|
|
4f0b57b2af | ||
|
|
2a35d9a9e5 | ||
|
|
7b000f86c7 | ||
|
|
23625ec334 | ||
|
|
d0d601e836 | ||
|
|
114285e791 | ||
|
|
94a8855b13 | ||
|
|
af1775b6e7 | ||
|
|
10c5e1d810 | ||
|
|
3cdbafa200 | ||
|
|
ef7efc768c | ||
|
|
30bf9c0f41 | ||
|
|
e733a181de | ||
|
|
4b94553704 | ||
|
|
70d080ff70 | ||
|
|
3d56037b44 | ||
|
|
292ae4d03c | ||
|
|
fbea58bde4 | ||
|
|
e7ea0e6f82 | ||
|
|
8bcec800da | ||
|
|
e082bd423a | ||
|
|
27c28d68ec | ||
|
|
3678986397 | ||
|
|
a454b48f47 | ||
|
|
4f979d7e5e | ||
|
|
ca87d195d1 | ||
|
|
f375d7bbc3 | ||
|
|
0ee06b9145 | ||
|
|
24dfd91c23 | ||
|
|
54e0879cce | ||
|
|
095b26c2a5 | ||
|
|
6c4d3fcdb0 | ||
|
|
d27339e170 | ||
|
|
d995edbc3a | ||
|
|
71eb82c2f8 | ||
|
|
5236e259cd | ||
|
|
7620be2ca5 | ||
|
|
89d8134fad | ||
|
|
5430bdfeed | ||
|
|
1d218ec253 | ||
|
|
0b37b54910 | ||
|
|
6c7847fecc | ||
|
|
7c70c95c3e | ||
|
|
2d4bd34e56 | ||
|
|
42d2b23ddd | ||
|
|
4bcc1159ff | ||
|
|
03f91353c3 | ||
|
|
a7e22a3fc6 | ||
|
|
b18e67face | ||
|
|
339d1305ce | ||
|
|
d744a04798 | ||
|
|
12e0606e01 | ||
|
|
540f5fa4d0 | ||
|
|
cd95ac2781 | ||
|
|
6ae4040ee2 | ||
|
|
e074af5208 | ||
|
|
6d3353da23 | ||
|
|
bd659b2e29 | ||
|
|
ccb954788b | ||
|
|
9a78b17b36 | ||
|
|
5846cbb254 | ||
|
|
57694d68e7 | ||
|
|
1ed7c1ab90 | ||
|
|
8d8fe7d066 | ||
|
|
bd2a150a57 | ||
|
|
3d6a3908ac | ||
|
|
5dacdfdf44 | ||
|
|
316bca8032 | ||
|
|
419098f7f3 | ||
|
|
b7bbe0d7f1 | ||
|
|
93350f0f6a | ||
|
|
2e9e972826 | ||
|
|
d6f15b48c7 | ||
|
|
3bd87d7b25 | ||
|
|
c16c9c6593 | ||
|
|
aac377fe6d | ||
|
|
62e3d92ed5 | ||
|
|
a4ec0080e9 | ||
|
|
b269933ffa | ||
|
|
61c43df51b | ||
|
|
82d800f943 | ||
|
|
4bc41fbde8 | ||
|
|
9222dec9f2 | ||
|
|
2abf83b6bc | ||
|
|
d2cc20288a | ||
|
|
e54de66103 | ||
|
|
7f1012274c | ||
|
|
9598965bda | ||
|
|
a8ac40770d | ||
|
|
c74b3957a6 | ||
|
|
0d726846fc | ||
|
|
2de274b95d | ||
|
|
62c85cc0cf | ||
|
|
5ee5c0fd58 | ||
|
|
c87a8a1da9 | ||
|
|
dea849cfdb | ||
|
|
d774a52c4f | ||
|
|
68b8809a1e | ||
|
|
3a256cbd88 | ||
|
|
c40d922ddb | ||
|
|
1d32e83e20 | ||
|
|
a7c7356d1f | ||
|
|
9182e97734 | ||
|
|
c11ef13c04 | ||
|
|
f54cad82ad | ||
|
|
651bd976f3 | ||
|
|
f49a556953 | ||
|
|
36f9fd2d49 | ||
|
|
ed5752b692 | ||
|
|
faafb02534 | ||
|
|
15d883a3ba | ||
|
|
56c2c82784 | ||
|
|
eae6de24c6 | ||
|
|
13467e569f | ||
|
|
1b6c1a3530 | ||
|
|
0c533575f4 | ||
|
|
2862858540 | ||
|
|
ddf0c02b75 | ||
|
|
ef5d861a96 | ||
|
|
a65a60eb89 | ||
|
|
e8748c2620 | ||
|
|
c1af34e1e9 | ||
|
|
734c428a6b | ||
|
|
4a4d281840 | ||
|
|
28e8cb4bcf | ||
|
|
5b4934ffb8 | ||
|
|
f0bbddf4e7 | ||
|
|
3a391665d2 | ||
|
|
6c0f488624 | ||
|
|
9043fc9493 | ||
|
|
b72f1157b7 | ||
|
|
2ec7386931 | ||
|
|
7923d0c260 | ||
|
|
90d7060a22 | ||
|
|
f0412e7fae | ||
|
|
d13be9a9a3 | ||
|
|
0ca176a974 | ||
|
|
d0d3c0b92a | ||
|
|
0bab279286 | ||
|
|
2fa647a183 | ||
|
|
3c7f0ef3c3 | ||
|
|
8aef6ea198 | ||
|
|
15d07ac439 | ||
|
|
f3bfe00aa9 | ||
|
|
bb4242e173 | ||
|
|
1d21fdb988 | ||
|
|
355c95785a | ||
|
|
117b9d0114 | ||
|
|
7599f28d7a | ||
|
|
012b64f00c | ||
|
|
cf5a29e0f8 | ||
|
|
ae93b81246 | ||
|
|
f64cd4dcf1 | ||
|
|
924a7b5863 | ||
|
|
a6b08b0bd1 | ||
|
|
9633dfa0b1 | ||
|
|
f62526c026 | ||
|
|
6aee7846d9 | ||
|
|
98a9067a2a | ||
|
|
336bf1d2e4 | ||
|
|
d1804817b0 | ||
|
|
d1661a7200 | ||
|
|
92ff8c7c25 | ||
|
|
6de7c26b6e | ||
|
|
6c24321a36 | ||
|
|
1201f1a6e4 | ||
|
|
390b1d0fde | ||
|
|
4baa5719a0 | ||
|
|
237caf150d | ||
|
|
a723f3056c | ||
|
|
ee071cacb3 | ||
|
|
e2aae34e0a | ||
|
|
bdecc2215f | ||
|
|
d427e6e7e7 | ||
|
|
5b564773fa | ||
|
|
ce748a34ad | ||
|
|
47c03d0960 | ||
|
|
4f1dc1acd7 | ||
|
|
ac55ace49b | ||
|
|
6533cf8e53 | ||
|
|
b8ff876278 | ||
|
|
804028d5be | ||
|
|
17108c2a2c | ||
|
|
fbde5295a6 | ||
|
|
e0b36ccdc8 | ||
|
|
094e7f3e67 | ||
|
|
728e3233cf | ||
|
|
8447504139 | ||
|
|
3aaa7a9cc0 | ||
|
|
03a2efe3c6 | ||
|
|
649ab1fe8c | ||
|
|
80e5dbd9cb | ||
|
|
18d976cf3c | ||
|
|
c4b6eed3e8 | ||
|
|
3308a7abbb | ||
|
|
d16bc0f157 | ||
|
|
be50eb99bf | ||
|
|
ae75d9b5e6 | ||
|
|
38fb7b381a | ||
|
|
2f2d87826c | ||
|
|
1bd67a6ea7 | ||
|
|
29384a3744 | ||
|
|
10a98da66e | ||
|
|
142e6db407 | ||
|
|
86c206c3c6 | ||
|
|
bd53d80d26 | ||
|
|
0e04549026 | ||
|
|
4545c84e7b | ||
|
|
dfc69e19c5 | ||
|
|
81a233a413 | ||
|
|
cb3fbf7ef1 | ||
|
|
97c92f7d73 | ||
|
|
4e7892632f | ||
|
|
5270fe5246 | ||
|
|
2769dc54ff | ||
|
|
ad16136636 | ||
|
|
ed93fe7818 | ||
|
|
cb54b1f51f | ||
|
|
990f1ccecc | ||
|
|
016f5b1ccd | ||
|
|
c4fcb4b516 | ||
|
|
f6af081806 | ||
|
|
505f119efa | ||
|
|
809d72de2a | ||
|
|
71fafe2cac | ||
|
|
baf5f10501 | ||
|
|
179fedf622 | ||
|
|
8bf439d726 | ||
|
|
8e83a6f68e | ||
|
|
eb9f863d5e | ||
|
|
f22994976c | ||
|
|
f75bb6d9a6 | ||
|
|
f969c25f84 | ||
|
|
08ccc64873 | ||
|
|
c1e1610837 | ||
|
|
94b06552f2 | ||
|
|
fc13c9f7bc | ||
|
|
5dc58362cc | ||
|
|
e89dc9d0e7 | ||
|
|
ab8f5d123b | ||
|
|
8000aaeb13 | ||
|
|
83dc88dbea | ||
|
|
2e96ee2d7c | ||
|
|
31e402f880 | ||
|
|
d7c0a21324 | ||
|
|
ceeded4539 | ||
|
|
88894dee40 | ||
|
|
ccb9bfe84b | ||
|
|
07d8cdc930 | ||
|
|
f8674167ab | ||
|
|
3ac7b574c4 | ||
|
|
ff79ec08ae | ||
|
|
af50a00111 | ||
|
|
fa476b6186 | ||
|
|
9c9bc98216 | ||
|
|
362456bdea | ||
|
|
ffceed63ca | ||
|
|
3cb4dbb12b | ||
|
|
cec82f85fb | ||
|
|
5a981109de | ||
|
|
fbfac4b82c | ||
|
|
e6b7a868a2 | ||
|
|
0aa3f68f6d | ||
|
|
4662f4d004 | ||
|
|
796bfd2c98 | ||
|
|
df0728ea12 | ||
|
|
7c745c5613 | ||
|
|
73090a6f1e | ||
|
|
e46ee17914 | ||
|
|
fe1f8a9736 | ||
|
|
26edf3acf0 | ||
|
|
93e5b38491 | ||
|
|
51dbe2363c | ||
|
|
37593bc257 | ||
|
|
b2eb54ca4b | ||
|
|
bfbc7edd31 | ||
|
|
a43b9fbdec | ||
|
|
5c4df5c824 | ||
|
|
5cc10c4198 | ||
|
|
b6d366e86d | ||
|
|
6e1740d2e2 | ||
|
|
2c6493105a | ||
|
|
889839f685 | ||
|
|
c290d407a3 | ||
|
|
43713ba7dc | ||
|
|
5e28c513a4 | ||
|
|
318a90f709 | ||
|
|
5326405a38 | ||
|
|
f8ec88ea64 | ||
|
|
0d5e6d6e53 | ||
|
|
c24e77d3af | ||
|
|
02e4ebf884 | ||
|
|
03b22f4af1 | ||
|
|
324edc27e1 | ||
|
|
cf63d5d086 | ||
|
|
f5c3f51db2 | ||
|
|
db9dca09e8 | ||
|
|
3e10592a74 | ||
|
|
3e5e1a9b41 | ||
|
|
9ee62dffca | ||
|
|
778be20ddc | ||
|
|
23e76a93f4 | ||
|
|
29eee8fa48 | ||
|
|
8bf3c3bb75 | ||
|
|
4c2ca2b635 | ||
|
|
a20f540027 | ||
|
|
bd7d3fe23e | ||
|
|
f0f8c86b0d | ||
|
|
0138db1b4f | ||
|
|
a7d433b62d | ||
|
|
6f93b1f599 | ||
|
|
2a9983047a | ||
|
|
e81d7e8b20 | ||
|
|
2c0658ce50 | ||
|
|
f97112f117 | ||
|
|
7cf39a0e58 | ||
|
|
4c290d64ba | ||
|
|
9707e4af0f | ||
|
|
9161374320 | ||
|
|
8d81ed3870 | ||
|
|
ef7dbba3ce | ||
|
|
e9e5b798e7 | ||
|
|
d0f3490bd5 | ||
|
|
2036a509f0 | ||
|
|
3c802d44f4 | ||
|
|
96def0107d | ||
|
|
f96a9c9d6f | ||
|
|
5220cae94a | ||
|
|
4048d4a418 | ||
|
|
872382b4a3 | ||
|
|
77a763db75 | ||
|
|
73ce3a8551 | ||
|
|
a56ddc9415 | ||
|
|
122635248e | ||
|
|
01bf37ce38 | ||
|
|
4a75cc4d11 | ||
|
|
d0260041ce | ||
|
|
e3d5860a41 | ||
|
|
650ee93368 | ||
|
|
ac85b72be8 | ||
|
|
fd8aeba700 | ||
|
|
dad4d41894 | ||
|
|
144ef06cd1 | ||
|
|
885387cb5a | ||
|
|
dd13a0844b | ||
|
|
b66205eda9 | ||
|
|
6ea3f0701e | ||
|
|
1aade9c4b8 | ||
|
|
6f5d1d9459 | ||
|
|
a8211c6a41 | ||
|
|
752cb744c0 | ||
|
|
c22d559195 | ||
|
|
2c834c1d62 | ||
|
|
cc97672fcc | ||
|
|
e49cf3dea2 | ||
|
|
abbf678e89 | ||
|
|
634b5c2bea | ||
|
|
e559ca928a | ||
|
|
04539d605d | ||
|
|
ddf067560a | ||
|
|
7e036261e8 | ||
|
|
0481d42f36 | ||
|
|
6bac8e10ba | ||
|
|
ce9d59896c | ||
|
|
e6da8d8b9f | ||
|
|
d8fcf4e7d3 | ||
|
|
56c3b9f935 | ||
|
|
7c871c775c | ||
|
|
c0e38e64db | ||
|
|
26eb3aef27 | ||
|
|
5d8d2cde3f | ||
|
|
369614af1e | ||
|
|
55d5f160a5 | ||
|
|
f25217c394 | ||
|
|
d7bc1b6d5c | ||
|
|
f101b476fb | ||
|
|
44a5e2dc4b | ||
|
|
1ece3072a0 | ||
|
|
8e1b56d74c | ||
|
|
ba0cc9cd82 | ||
|
|
1b5d0ee955 | ||
|
|
ae42dec906 | ||
|
|
31be6737f2 | ||
|
|
5987e83a12 | ||
|
|
73955aef09 | ||
|
|
0ddbdfce57 | ||
|
|
3af6bf3a4f | ||
|
|
3b8280ed3a | ||
|
|
644d761cba | ||
|
|
4d68a81ab4 | ||
|
|
b9e3053fe3 | ||
|
|
a48bdd08ff | ||
|
|
ad29bf5f26 | ||
|
|
e0bc13cccb | ||
|
|
aabc907864 | ||
|
|
df75da275b | ||
|
|
3087606a5d | ||
|
|
c653006045 | ||
|
|
a6e7158800 | ||
|
|
97e81d8d99 | ||
|
|
99cad606e7 | ||
|
|
c4a7c673f8 | ||
|
|
b23d8504d2 | ||
|
|
662c2fd4dd | ||
|
|
ae77a32c87 | ||
|
|
d1b9c1764d | ||
|
|
deca505b9c | ||
|
|
185936467d | ||
|
|
c3d1c4312c | ||
|
|
55119bee93 | ||
|
|
be992ab9b1 | ||
|
|
352a97d5c1 | ||
|
|
491246205e | ||
|
|
f2087205c1 | ||
|
|
4f55b881db | ||
|
|
2f24548cb1 | ||
|
|
92c7e1fce5 | ||
|
|
a2e2373dfd | ||
|
|
ef4beff52a | ||
|
|
7121a6b2f8 | ||
|
|
489560e670 | ||
|
|
bad3e31b0a | ||
|
|
854f7f15a4 | ||
|
|
d3d3cb440e | ||
|
|
c04f53a9c4 | ||
|
|
cfc2055af8 | ||
|
|
94ae80419d | ||
|
|
988153aaad | ||
|
|
77076136a6 | ||
|
|
628d66e80e | ||
|
|
d4ba828d08 | ||
|
|
05849a3d92 | ||
|
|
e7c227f4ae | ||
|
|
04cf44a528 | ||
|
|
c1d9702c58 | ||
|
|
884a70168d | ||
|
|
e24a029a78 | ||
|
|
c7d6403a09 | ||
|
|
6804a52e76 | ||
|
|
82a55b75b8 | ||
|
|
47aba057fd | ||
|
|
e6211cd523 | ||
|
|
9c9ab6c734 | ||
|
|
abfcbe27de | ||
|
|
a2bd41cd57 | ||
|
|
cab509b9a3 | ||
|
|
ee1b55cad9 | ||
|
|
27020b2920 | ||
|
|
99aea4b9d3 | ||
|
|
e1521a31ac | ||
|
|
97df12ee5f | ||
|
|
b9783b168f | ||
|
|
7b3012d8da | ||
|
|
455a9735e7 | ||
|
|
b277bd63c6 | ||
|
|
1c170bbb8a | ||
|
|
2234861cff | ||
|
|
0f30ac9694 | ||
|
|
b618ecfef2 | ||
|
|
56b96bfe44 | ||
|
|
c0bc170422 | ||
|
|
0f24b44269 | ||
|
|
0064a39403 | ||
|
|
4004b2e45e | ||
|
|
932aa038bb | ||
|
|
73488e9704 | ||
|
|
88764d77a8 | ||
|
|
94295a35bc | ||
|
|
530bb98782 | ||
|
|
47adc1378f | ||
|
|
a2389a5d99 | ||
|
|
b618f17978 | ||
|
|
563680f066 | ||
|
|
b462bd6f25 | ||
|
|
7cac99dd80 | ||
|
|
87d5c9ffb7 | ||
|
|
7fa4319bd1 | ||
|
|
05a048e5a8 | ||
|
|
a5dcc3d360 | ||
|
|
0193431c6d | ||
|
|
6c8d12f4e1 | ||
|
|
ceffd2ef0c | ||
|
|
1aa56d844a | ||
|
|
101a4ea27c | ||
|
|
8b1c775178 | ||
|
|
b3c1d83aed | ||
|
|
3adda1e3a4 | ||
|
|
610a8170ef | ||
|
|
9e21a1d036 | ||
|
|
305be7a187 | ||
|
|
1652bfedae | ||
|
|
6ebdceeafb | ||
|
|
5815ea9a0a | ||
|
|
c1bd7168e2 | ||
|
|
a10e9db14f | ||
|
|
50e789ee11 | ||
|
|
c48b7ddc10 | ||
|
|
b818df2ba0 | ||
|
|
7f49e83557 | ||
|
|
6d38d61816 | ||
|
|
f0e860f306 | ||
|
|
31f67232ae | ||
|
|
7fdc53e921 | ||
|
|
0624c60010 | ||
|
|
b1062d4673 | ||
|
|
f691bb8437 | ||
|
|
80fc026483 | ||
|
|
b512328a70 | ||
|
|
709d8196fc | ||
|
|
5e2621ca7c | ||
|
|
f6086f40e0 | ||
|
|
520f46adc3 | ||
|
|
be3e7b58b3 | ||
|
|
f23433091a | ||
|
|
8fdb068023 | ||
|
|
0db49d055f | ||
|
|
a7edef16f4 | ||
|
|
1b01fd81a8 | ||
|
|
32743391f8 | ||
|
|
6aa439c991 | ||
|
|
33ed0fa468 | ||
|
|
c1b1436473 | ||
|
|
006b28ba38 | ||
|
|
c987dd8816 | ||
|
|
23bbac7318 | ||
|
|
4b21e598db | ||
|
|
26e77dd46c | ||
|
|
88728357d8 | ||
|
|
580f5b1a3f | ||
|
|
2236100e3d | ||
|
|
5dd6f88a42 | ||
|
|
57be88e8aa | ||
|
|
26d249f942 | ||
|
|
0d3585503b | ||
|
|
f70576bbdc | ||
|
|
dcb7806847 | ||
|
|
8832da10c9 | ||
|
|
46f93ffb86 | ||
|
|
96e427ee08 | ||
|
|
dd824a8ca6 | ||
|
|
ca2d70df6e | ||
|
|
7eba381512 | ||
|
|
498743e965 | ||
|
|
4460a3269b | ||
|
|
d2d35e717d | ||
|
|
774c005306 | ||
|
|
e51a635445 | ||
|
|
643eed4858 | ||
|
|
ceac00f3eb | ||
|
|
12e85b61d2 | ||
|
|
f539b09361 | ||
|
|
0aac4efa1b | ||
|
|
1fac9e5254 | ||
|
|
41454cda38 | ||
|
|
31a84e4d87 | ||
|
|
42659a7360 | ||
|
|
83f73aab8d | ||
|
|
2030fcc711 | ||
|
|
32488a03cd | ||
|
|
6d4cfe29ba | ||
|
|
451913f087 | ||
|
|
7d3267959f | ||
|
|
e6209cc008 | ||
|
|
3eb3527226 | ||
|
|
2de57e93f5 | ||
|
|
0067d4fd5a | ||
|
|
f47c890d2f | ||
|
|
2096665118 | ||
|
|
102e50be8f | ||
|
|
7ed8fbfcbf | ||
|
|
93b85f09d8 | ||
|
|
c05f851e02 | ||
|
|
072918fc6f | ||
|
|
7218fe57fc | ||
|
|
942ff14d82 | ||
|
|
dc5186fb69 | ||
|
|
857879d700 | ||
|
|
144b2aa81c | ||
|
|
3bfdfea016 | ||
|
|
e3984e672d | ||
|
|
6875bcdbb8 | ||
|
|
ca587c9ee3 | ||
|
|
2abbac8b52 | ||
|
|
0415a68352 | ||
|
|
5a259269ce | ||
|
|
ace8c1c411 | ||
|
|
b196b5aee2 | ||
|
|
3db217e687 | ||
|
|
4107477b9b | ||
|
|
ce0c439f06 | ||
|
|
5d9b3d5a9b | ||
|
|
20b196a12a | ||
|
|
54555ece08 | ||
|
|
4c38abd198 | ||
|
|
5e502eed6d | ||
|
|
1c54bd836a | ||
|
|
46f80ea907 | ||
|
|
1688c6bf38 | ||
|
|
56a98c4d11 | ||
|
|
88bb915161 | ||
|
|
594c8f215f | ||
|
|
15166b6490 | ||
|
|
0bd22db048 | ||
|
|
ec572f8f04 | ||
|
|
8654a45e9b | ||
|
|
10c4729383 | ||
|
|
74a03b905c | ||
|
|
a295cb44f0 | ||
|
|
84c9e73e7b | ||
|
|
6ba668c5f8 | ||
|
|
55dcb43329 | ||
|
|
5ed7374592 | ||
|
|
578c177141 | ||
|
|
bd63169cbb | ||
|
|
831ae3a3db | ||
|
|
5cbd15992a | ||
|
|
d00ba1fdaa | ||
|
|
6a5fe679be | ||
|
|
6da5c613de | ||
|
|
8d0615bc95 | ||
|
|
503c9d6fca | ||
|
|
8a10a9cf82 | ||
|
|
30b43cdb82 | ||
|
|
1d1dd07c2f | ||
|
|
c2aeb420b2 | ||
|
|
b10bc2edc4 | ||
|
|
2561c18dec | ||
|
|
ce6f618ba8 | ||
|
|
2d05e8054c | ||
|
|
3ad3d8d9a0 | ||
|
|
0e83597ddc | ||
|
|
8f4ae6f3ba | ||
|
|
3c65fa806e | ||
|
|
48a6b14537 | ||
|
|
de0404705b | ||
|
|
f13b3ca630 | ||
|
|
84361cb5f5 | ||
|
|
34e0b6e610 | ||
|
|
6c941ffed5 | ||
|
|
012eed6f67 | ||
|
|
3eac0d1592 | ||
|
|
ea8a2b59d9 | ||
|
|
f84c72dc71 | ||
|
|
d735bc93ce | ||
|
|
4355c766fd | ||
|
|
2b47817d26 | ||
|
|
5f5b7bf2e3 | ||
|
|
64d9fbb989 | ||
|
|
ffe7911d4b | ||
|
|
aad72ec5b6 | ||
|
|
d0436ec478 | ||
|
|
5568c3cd2d | ||
|
|
a84f8f4411 | ||
|
|
fcdc26e9eb | ||
|
|
fa061c42ad | ||
|
|
db3c38a333 | ||
|
|
919117c408 | ||
|
|
2ff867ba5f | ||
|
|
4f26fc2763 | ||
|
|
0c5b5f96f1 | ||
|
|
3f5f827550 | ||
|
|
797a3e3f5b | ||
|
|
53e740bb1d | ||
|
|
11d09c4d63 | ||
|
|
76bb4c4038 | ||
|
|
ccac647ecc | ||
|
|
39692e3b8b | ||
|
|
7aeebff5df | ||
|
|
62dc625363 | ||
|
|
1784e79c83 | ||
|
|
a5374ee746 | ||
|
|
a71bd16103 | ||
|
|
bfa16ec438 | ||
|
|
5abfcfdd1b | ||
|
|
ca8cac3f1a | ||
|
|
3dc745d4ad | ||
|
|
6c871b071f | ||
|
|
87bc0aaced | ||
|
|
3584c1c95c | ||
|
|
6ee2bdcddb | ||
|
|
2a9d8e0845 | ||
|
|
47296f2607 | ||
|
|
6b913545db | ||
|
|
3836808d97 | ||
|
|
85beabe7c8 | ||
|
|
0109bcbfb9 | ||
|
|
b39bcd864c | ||
|
|
54d2125067 | ||
|
|
7c86560f68 | ||
|
|
c7f5508e07 | ||
|
|
b7618693b4 | ||
|
|
b1870296c0 | ||
|
|
d3e1cd2fdb | ||
|
|
79a35423c7 | ||
|
|
2e6c1f2431 | ||
|
|
ce28a96504 | ||
|
|
a84e922bc6 | ||
|
|
947ffb45d7 | ||
|
|
5dd14761b7 | ||
|
|
c149ea9449 | ||
|
|
c003ce76ad | ||
|
|
a8c2a989cb | ||
|
|
f287cf68ab | ||
|
|
190d2c60a8 | ||
|
|
b981640eae | ||
|
|
6ecd12ed07 | ||
|
|
8ec1626c1e | ||
|
|
23381fea37 | ||
|
|
cf1e4a0f8a | ||
|
|
3c6f6e70ef | ||
|
|
674f748d20 | ||
|
|
c095e15d6c | ||
|
|
15fc418fc4 | ||
|
|
2460fe4e86 | ||
|
|
908f33c849 | ||
|
|
11b5eee86a | ||
|
|
fc26544a85 | ||
|
|
0c4974ca1d | ||
|
|
00ee150c5d | ||
|
|
ea40cce9a4 | ||
|
|
2524b0ad2d | ||
|
|
8220f4b366 | ||
|
|
8da1a074a2 | ||
|
|
8fd7561971 | ||
|
|
c69f9b09ec | ||
|
|
875c267181 | ||
|
|
acd705da88 | ||
|
|
6ade215ea5 | ||
|
|
cabd46268e | ||
|
|
93540d4234 | ||
|
|
7564f816fc | ||
|
|
278782b0f8 | ||
|
|
d604f97b4c | ||
|
|
18a1304e5c | ||
|
|
ce308cf772 | ||
|
|
cb3b7e424e | ||
|
|
18f799cfd6 | ||
|
|
1c6c32f5f7 | ||
|
|
5983fa4de0 | ||
|
|
74c6443a86 | ||
|
|
4bb3739588 | ||
|
|
7f5153f5fa | ||
|
|
2c0b1955af | ||
|
|
290150fc5e | ||
|
|
6e1921d9eb | ||
|
|
d75697af0c | ||
|
|
01bb9a8939 | ||
|
|
df7e07c3e8 | ||
|
|
50907035b8 | ||
|
|
b4da5a925d | ||
|
|
00f392eae0 | ||
|
|
eb14531567 | ||
|
|
18b6acaed1 | ||
|
|
b2437e56ca | ||
|
|
348de945e3 | ||
|
|
3ec36194c7 | ||
|
|
f0f414400f | ||
|
|
79a438bc96 | ||
|
|
caf8586c7e | ||
|
|
c168eaa58e | ||
|
|
0ef0b65b02 | ||
|
|
d3caa77ba3 | ||
|
|
84864b759c | ||
|
|
6169d841ee | ||
|
|
e9363df523 | ||
|
|
99517313f7 | ||
|
|
219f57f037 | ||
|
|
d183d1120e | ||
|
|
1cafb9e84b | ||
|
|
e4776a1522 | ||
|
|
56e82d96c6 | ||
|
|
57dba3f9a2 | ||
|
|
3836131a27 | ||
|
|
dd8ad88f96 | ||
|
|
7b262d8b5b | ||
|
|
a151d12a99 | ||
|
|
a913fd9b2f | ||
|
|
c67df66098 | ||
|
|
5badafce62 | ||
|
|
5d48eea29b | ||
|
|
b6893d1208 | ||
|
|
b402969a44 | ||
|
|
3d1ed95bed | ||
|
|
4b2370f229 | ||
|
|
ab93fa0adf | ||
|
|
b608897742 | ||
|
|
0681e9217d | ||
|
|
6ed7c130cb | ||
|
|
7b8d996ef6 | ||
|
|
0423d66596 | ||
|
|
829a98e4e1 | ||
|
|
4e7e1e62b6 | ||
|
|
b678e389df | ||
|
|
5b88c7dae5 | ||
|
|
ca7bd08b57 | ||
|
|
afaccad16c | ||
|
|
98ce49ee03 | ||
|
|
66b4c457bf | ||
|
|
f0751499b3 | ||
|
|
a43d5778cb | ||
|
|
9d3f53c315 | ||
|
|
e02dad5e2c | ||
|
|
b4972eed39 | ||
|
|
f641889edd | ||
|
|
a0d0a5e214 | ||
|
|
2222af12c3 | ||
|
|
9ba6d71780 | ||
|
|
8c297737c0 | ||
|
|
8e815e90ab | ||
|
|
03628fd46b | ||
|
|
d067560776 | ||
|
|
b4aa89e810 | ||
|
|
0f0c631f2a | ||
|
|
28c4a133a6 | ||
|
|
5abdddc2e6 | ||
|
|
defb71569d | ||
|
|
efba045ad0 | ||
|
|
77a6b50307 | ||
|
|
dc7e3f5a06 | ||
|
|
3c6c059e2a | ||
|
|
00ba6554b1 | ||
|
|
dc347aeb0f | ||
|
|
15564813bc | ||
|
|
7ebe986b17 | ||
|
|
9f0ee71310 | ||
|
|
6f22bc6127 | ||
|
|
e9c263728b | ||
|
|
100ec84d57 | ||
|
|
8a30a763f0 | ||
|
|
295115b6be | ||
|
|
383b7c3cd5 | ||
|
|
895d1c8ac8 | ||
|
|
0b2a7920ae | ||
|
|
3a698e96be | ||
|
|
a5f54fd31f | ||
|
|
123b5a6073 | ||
|
|
d1bb15b883 | ||
|
|
c7a9c24871 | ||
|
|
0d5a592e1d | ||
|
|
68a37cc95d | ||
|
|
6706710d3c | ||
|
|
8be1eff5b4 | ||
|
|
69fca60836 | ||
|
|
5904d04e2e | ||
|
|
5e6ecfc3e5 | ||
|
|
879c1f3332 | ||
|
|
b36cf2bc7e | ||
|
|
70e606c071 | ||
|
|
77aae79bac | ||
|
|
2fafb3d7de | ||
|
|
38a49d68e5 | ||
|
|
525941512e | ||
|
|
079fc2bdb9 | ||
|
|
34177e00af | ||
|
|
bb2b11edf2 | ||
|
|
a41104118e | ||
|
|
f2d32d8256 | ||
|
|
5d585994ca | ||
|
|
536faa2778 | ||
|
|
793f4098b7 | ||
|
|
0d482ad9c4 | ||
|
|
eee2611c4e | ||
|
|
9d04515977 | ||
|
|
19c62d7b78 | ||
|
|
5861e38056 | ||
|
|
6cd2a06974 | ||
|
|
f0b21b3bf9 | ||
|
|
7654d29d10 | ||
|
|
c03b4c0263 | ||
|
|
daf5537aea | ||
|
|
b2ed8a57a7 | ||
|
|
7a1d64c7e2 | ||
|
|
504c461c57 | ||
|
|
2725f136fe | ||
|
|
00af3f90d8 | ||
|
|
a4c1b08ca1 | ||
|
|
8f419cbbbb | ||
|
|
8110173d8a | ||
|
|
70b4af4a65 | ||
|
|
851a4d58ec | ||
|
|
cd360a1833 | ||
|
|
96ea54a413 | ||
|
|
0d873e4ffa | ||
|
|
4b21f3a753 | ||
|
|
7d5f607b92 | ||
|
|
d7185522c0 | ||
|
|
f5ca879bff | ||
|
|
ddb541ade9 | ||
|
|
4cb9597ad9 | ||
|
|
1ae22cafa3 | ||
|
|
06f80a4645 | ||
|
|
7d744bb621 | ||
|
|
bb8f7c5ed4 | ||
|
|
aec646b5b0 | ||
|
|
91e041ba97 | ||
|
|
ab487d2a1d | ||
|
|
0faf7e24af | ||
|
|
ef74947572 | ||
|
|
b5e862e740 | ||
|
|
0053daed2f | ||
|
|
43b9b72369 | ||
|
|
55c500f34b | ||
|
|
10c6176a16 | ||
|
|
b98aeb1976 | ||
|
|
6b8b1e43ae | ||
|
|
2d7db3f0f6 | ||
|
|
c42e9ad0fb | ||
|
|
559bf2fe57 | ||
|
|
75291a9feb | ||
|
|
9ca618c3c5 | ||
|
|
bf020e3d3e | ||
|
|
d9ee41c892 | ||
|
|
0cb3cb3eae | ||
|
|
3d72d58e87 | ||
|
|
bdf7527824 | ||
|
|
2651b21b45 | ||
|
|
285fff6add | ||
|
|
80c5856732 | ||
|
|
15b908773d | ||
|
|
1b133890b0 | ||
|
|
b8db165f6e | ||
|
|
a45036c935 | ||
|
|
fe4184c6c4 | ||
|
|
5f7ebcf233 | ||
|
|
94672221e5 | ||
|
|
09e3140c0d | ||
|
|
c4971a9954 | ||
|
|
b5d54ed173 | ||
|
|
f4df648e5a | ||
|
|
b60843d3ed | ||
|
|
db0641c937 | ||
|
|
109a1a8d7a | ||
|
|
8cb8e6407a | ||
|
|
859024056a | ||
|
|
58688e6e93 | ||
|
|
e2e72ff9fd | ||
|
|
c3e5117b31 | ||
|
|
d37f316a86 | ||
|
|
41e7dc7ab1 | ||
|
|
524bea8744 | ||
|
|
ea75f161a7 | ||
|
|
e6a7ad9776 | ||
|
|
da38db1f4e | ||
|
|
adff55f89a | ||
|
|
55c8314613 | ||
|
|
a96df3cc13 | ||
|
|
4c6ed77806 | ||
|
|
5b5f59da91 | ||
|
|
5694f61e4d | ||
|
|
87b033c633 | ||
|
|
06caa046fa | ||
|
|
98100be99d | ||
|
|
f25ec3d6a7 | ||
|
|
a33e2f29e3 | ||
|
|
9bd14ebc0c | ||
|
|
5c595fdedf | ||
|
|
b9b7c75627 | ||
|
|
c2e01b3907 | ||
|
|
9295b93116 | ||
|
|
b0f5fd826c | ||
|
|
fb89f9b85b | ||
|
|
5c797b738e | ||
|
|
b817ee7f80 | ||
|
|
33174f8208 | ||
|
|
41798a2ec6 | ||
|
|
bea36accff | ||
|
|
6f74838e1e | ||
|
|
b2e255bb42 | ||
|
|
1028ea0302 | ||
|
|
f767e9aaba | ||
|
|
620c83b1e0 | ||
|
|
19b7853057 | ||
|
|
d1db7ad494 | ||
|
|
5298b8267f | ||
|
|
7f729d141f | ||
|
|
1f405b5055 | ||
|
|
516723e252 | ||
|
|
6e0ab15e47 | ||
|
|
977f1cade0 | ||
|
|
4075064384 | ||
|
|
26315f3424 | ||
|
|
f2af017925 | ||
|
|
e3575d0f43 | ||
|
|
cee302f208 | ||
|
|
922afd8310 | ||
|
|
cab18e29f5 | ||
|
|
6dbe603fcd | ||
|
|
9ed848e21f | ||
|
|
4e9e492c29 | ||
|
|
f8095ca52a | ||
|
|
211e7b08c4 | ||
|
|
6678b2858d | ||
|
|
8e9905816e | ||
|
|
edfdcee3a4 | ||
|
|
8fce610ec7 | ||
|
|
3923b49c9e | ||
|
|
1b7ee5cb2e | ||
|
|
166b2bb98f | ||
|
|
2690b06eff | ||
|
|
14010cce8f | ||
|
|
2bdc489827 | ||
|
|
b8639ceb7e | ||
|
|
eb685d3af4 | ||
|
|
6f68cc58d3 | ||
|
|
b550c3e541 | ||
|
|
40a129aafd | ||
|
|
c071cb5a49 | ||
|
|
adb5f353bf | ||
|
|
52418d7f70 | ||
|
|
3745e2afcd | ||
|
|
aa71bb545e | ||
|
|
d74fb21c9e | ||
|
|
b980c79ab4 | ||
|
|
f91b1d7f8a | ||
|
|
0b58dd4d17 | ||
|
|
c968853092 | ||
|
|
b32e06e03b | ||
|
|
69faf8db75 | ||
|
|
d689698ddd | ||
|
|
7e4eb8eed2 | ||
|
|
7d01528703 | ||
|
|
88f9f9efe1 | ||
|
|
23f09d33a2 | ||
|
|
de1652973c | ||
|
|
830d475215 | ||
|
|
c8437fd3ea | ||
|
|
df2c9eea98 | ||
|
|
09e253e833 | ||
|
|
9d541d5ac3 | ||
|
|
6d04bb8eea | ||
|
|
ec5e74019b | ||
|
|
8f15b0a32f | ||
|
|
0ce954588e | ||
|
|
0a7d817e60 | ||
|
|
483d1eb5e8 | ||
|
|
27f416a46e | ||
|
|
5e2f0ab6df | ||
|
|
c3096ed486 | ||
|
|
abaf8f07ad | ||
|
|
47a7ce9d6e | ||
|
|
41711b174f | ||
|
|
9876c7a802 | ||
|
|
cd91047b6e | ||
|
|
c5b1380299 | ||
|
|
7ec0af42b8 | ||
|
|
b9501cee37 | ||
|
|
c92510863f | ||
|
|
47456fb801 | ||
|
|
c6a7be352b | ||
|
|
0a223afab2 | ||
|
|
9f4e893290 | ||
|
|
ce6843f6a2 | ||
|
|
ae78ced3dd | ||
|
|
1749680268 | ||
|
|
379a6d259f | ||
|
|
ab8c84e1b9 | ||
|
|
b3d723d323 | ||
|
|
9659027502 | ||
|
|
9a1e23c661 | ||
|
|
66bcf066e0 | ||
|
|
5e07c2ca6d | ||
|
|
f57fa702d9 | ||
|
|
f44d119f16 | ||
|
|
be28b2990f | ||
|
|
a71180b71b | ||
|
|
1e915bc873 | ||
|
|
8faa6d516c | ||
|
|
43e557253f | ||
|
|
7a3af81d7a | ||
|
|
bbeba4a8d8 | ||
|
|
953b8c3486 | ||
|
|
0fc4d44ba2 | ||
|
|
e1a41a2853 | ||
|
|
3e4b3001ef | ||
|
|
5db0119bb6 | ||
|
|
4fc4cbf593 | ||
|
|
a8338ec49e | ||
|
|
20a1866923 | ||
|
|
cb14424110 | ||
|
|
56d00831d3 | ||
|
|
ec5fccb945 | ||
|
|
7262c4af22 | ||
|
|
d54c9d2388 | ||
|
|
5550e75893 | ||
|
|
6af050efb2 | ||
|
|
fec6c6f23e | ||
|
|
5843388d0b | ||
|
|
81881a8ed4 | ||
|
|
4bf319dcb4 | ||
|
|
d2fabeae5f | ||
|
|
b7a372e50f | ||
|
|
6850dd467d | ||
|
|
c4953e7afd | ||
|
|
0f7fbfcce8 | ||
|
|
8bdacd82c7 | ||
|
|
b03a495712 | ||
|
|
95e2cdc689 | ||
|
|
ea32cb1810 | ||
|
|
3a87f0dd30 | ||
|
|
5030cfe099 | ||
|
|
67b613dabf | ||
|
|
e8057361d6 | ||
|
|
7200242386 | ||
|
|
d5d5a72126 | ||
|
|
c582f72ea7 | ||
|
|
f665b75fc4 | ||
|
|
a0fdd752d4 | ||
|
|
072b8668fd | ||
|
|
9c74c26219 | ||
|
|
8c64abbe51 | ||
|
|
3d9cd8013d | ||
|
|
dcb2214c04 | ||
|
|
b349f3440b | ||
|
|
c8098f429d | ||
|
|
7c1bba409a | ||
|
|
fcc6b20fb6 | ||
|
|
698b5264ba | ||
|
|
a1d743aa74 | ||
|
|
1a659d4a60 | ||
|
|
2194ca5cd6 | ||
|
|
d9641d6690 | ||
|
|
291290d7f1 | ||
|
|
5cbdbf137d | ||
|
|
5cfdcc68b7 | ||
|
|
8951dcb60d | ||
|
|
4647caf383 | ||
|
|
1ae9197d89 | ||
|
|
0881225fda | ||
|
|
3ee85b7c7b | ||
|
|
11763d14c7 | ||
|
|
cf4e15c31e | ||
|
|
035dac762c | ||
|
|
a8de985e88 |
12
.env
@@ -1,8 +1,14 @@
|
||||
# port
|
||||
VITE_DEV_PORT = '8080'
|
||||
VITE_DEV_PORT = '8001'
|
||||
|
||||
# development path
|
||||
VITE_DEV_PATH = 'https://demo.mtruning.club'
|
||||
VITE_DEV_PATH = '/'
|
||||
|
||||
# production path
|
||||
VITE_PRO_PATH = 'https://demo.mtruning.club'
|
||||
VITE_PRO_PATH = '/'
|
||||
|
||||
# spa-title
|
||||
VITE_GLOB_APP_TITLE = GoView
|
||||
|
||||
# spa shortname
|
||||
VITE_GLOB_APP_SHORT_NAME = GoView
|
||||
|
||||
2
.gitignore
vendored
@@ -4,3 +4,5 @@ dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.vscode
|
||||
.idea
|
||||
pnpm-lock
|
||||
202
README.md
@@ -1,114 +1,146 @@
|
||||
## 总览
|
||||
|
||||
**`master-fetch` 分支是带有后端接口请求的分支**
|
||||

|
||||
|
||||
**后端项目地址:[https://gitee.com/MTrun/go-view-serve](https://gitee.com/MTrun/go-view-serve)**
|
||||
GoView 是一个高效的拖拽式低代码数据可视化开发平台,将图表或页面元素封装为基础组件,无需编写代码即可制作数据大屏,减少心智负担。
|
||||
|
||||
**接口说明地址:[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)**
|
||||
### 😶 纯 **前端** 分支: **`master`**
|
||||
|
||||
## 使用
|
||||
### 👻 携带 **后端** 请求分支: **`master-fetch`**
|
||||
|
||||
所有的接口地址位置:`src\api\path\*`
|
||||
### 📚 GoView **文档** 地址:[http://www.mtruning.club:81/](http://www.mtruning.club:81/)
|
||||
|
||||
接口地址修改:`.env`
|
||||
项目纯前端-Demo 地址:[https://www.mtruning.club](https://www.mtruning.club)
|
||||
|
||||
项目带后端-Demo 地址:[后端 Demo 地址](http://1.117.240.165:8080/goview/#/login)
|
||||
|
||||
文档-在线地址:[http://www.mtruning.club:81/](http://www.mtruning.club:81/)
|
||||
|
||||
文档-源码地址:[https://gitee.com/MTrun/go-view-doc](https://gitee.com/MTrun/go-view-doc)
|
||||
|
||||
### 🤯 后端项目
|
||||
|
||||
后端项目 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)
|
||||
|
||||
技术点:
|
||||
|
||||
- 框架:基于 `Vue3` 框架编写,使用 `hooks` 写法抽离部分逻辑,使代码结构更加清晰;
|
||||
|
||||
- 类型:使用 `TypeScript` 进行类型约束,减少未知错误发生概率,可以大胆修改逻辑内容;
|
||||
|
||||
- 性能:多处性能优化,使用页面懒加载、组件动态注册、数据滚动加载等方式,提升页面渲染速度;
|
||||
|
||||
- 存储:拥有本地记忆,部分配置项采用 `storage` 存储本地,提升使用体验;
|
||||
|
||||
- 封装:项目进行了详细的工具类封装如:路由、存储、加/解密、文件处理、主题、NaiveUI 全局方法、组件等
|
||||
|
||||
工作台:
|
||||

|
||||
|
||||
请求配置:
|
||||

|
||||
|
||||
数据过滤:
|
||||

|
||||
|
||||
主题色:
|
||||

|
||||
|
||||
主要技术栈为:
|
||||
|
||||
| 名称 | 版本 | 名称 | 版本 |
|
||||
| ------------------- | ----- | ----------- | ------ |
|
||||
| Vue | 3.2.x | TypeScript4 | 4.6.x |
|
||||
| Vite | 4.2.x | NaiveUI | 2.34.x |
|
||||
| ECharts | 5.3.x | Pinia | 2.0.x |
|
||||
| 详见 `package.json` | 😁 | 🥰 | 🤗 |
|
||||
|
||||
开发环境:
|
||||
|
||||
| 名称 | 版本 | 名称 | 版本 |
|
||||
| ---- | ------- | ------- | ----- |
|
||||
| node | 16.16.x | npm | 8.5.x |
|
||||
| pnpm | 7.1.x | windows | 11 |
|
||||
|
||||
已完成图表:
|
||||
|
||||
| 分类 | 名称 | 名称 | 名称 |
|
||||
| ------ | ---------------- | ---------------- | -------- |
|
||||
| 图表 | 柱状图 | 横向柱状图 | 折线图 |
|
||||
| \* | 单/多 折线面积图 | 饼图 | 水球图 |
|
||||
| \* | 环形图 | NaiveUI 多种进度 | 🤠 |
|
||||
| 信息 | 文字 | 图片 | 😶 |
|
||||
| 列表 | 滚动排名列表 | 滚动表格 | 🤓 |
|
||||
| 小组件 | 边框-01~13 | 装饰-01~05 | 数字翻牌 |
|
||||
|
||||
## 浏览器支持
|
||||
|
||||
开发和测试平台均在 `Google` 和最新版 `EDGE` 上完成,暂未测试 `IE11` 等其它浏览器,如有需求请自行测试与兼容。
|
||||
|
||||
## 安装
|
||||
|
||||
本项目采用` pnpm` 进行包管理
|
||||
|
||||
```shell
|
||||
# port
|
||||
VITE_DEV_PORT = '8080'
|
||||
#建议使用 nrm 切换到淘宝源 https://registry.npmmirror.com/
|
||||
#pnpm
|
||||
pnpm install
|
||||
|
||||
# development path
|
||||
VITE_DEV_PATH = 'http://127.0.0.1:8080'
|
||||
#yarn
|
||||
yarn install
|
||||
|
||||
# production path
|
||||
VITE_PRO_PATH = 'http://127.0.0.1:8080'
|
||||
#npm
|
||||
npm install
|
||||
```
|
||||
|
||||
公共前缀修改:`src\settings\httpSetting.ts`
|
||||
## 启动
|
||||
|
||||
```shell
|
||||
// 请求前缀
|
||||
export const axiosPre = '/api/goview'
|
||||
#pnpm
|
||||
pnpm dev
|
||||
|
||||
# npm
|
||||
npm run dev
|
||||
|
||||
#yarn
|
||||
yarn dev
|
||||
|
||||
#Makefile
|
||||
make dev
|
||||
```
|
||||
|
||||
接口封装:`src\api\http.ts`
|
||||
## 编译
|
||||
|
||||
```ts
|
||||
import axiosInstance from './axios'
|
||||
import { RequestHttpEnum, ContentTypeEnum } from '@/enums/httpEnum'
|
||||
```shell
|
||||
#pnpm
|
||||
pnpm run build
|
||||
|
||||
export const get = (url: string, params?: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.GET,
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
# npm
|
||||
npm run build
|
||||
|
||||
export const post = (url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.POST,
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': headersType || ContentTypeEnum.JSON
|
||||
}
|
||||
})
|
||||
}
|
||||
#yarn
|
||||
yarn run build
|
||||
|
||||
export const put = (url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.PUT,
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': headersType || ContentTypeEnum.JSON
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const del = (url: string, params?: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.DELETE,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取请求函数,默认get
|
||||
export const http = (type?: RequestHttpEnum) => {
|
||||
switch (type) {
|
||||
case RequestHttpEnum.GET:
|
||||
return get
|
||||
|
||||
case RequestHttpEnum.POST:
|
||||
return post
|
||||
|
||||
case RequestHttpEnum.PUT:
|
||||
return put
|
||||
|
||||
case RequestHttpEnum.DELETE:
|
||||
return del
|
||||
|
||||
default:
|
||||
return get
|
||||
}
|
||||
}
|
||||
#Makefile
|
||||
make dist
|
||||
|
||||
```
|
||||
|
||||
## 代码提交
|
||||
|
||||
* feat: 新功能
|
||||
* fix: 修复 Bug
|
||||
* docs: 文档修改
|
||||
* perf: 性能优化
|
||||
* revert: 版本回退
|
||||
* ci: CICD集成相关
|
||||
* test: 添加测试代码
|
||||
* refactor: 代码重构
|
||||
* build: 影响项目构建或依赖修改
|
||||
* style: 不影响程序逻辑的代码修改
|
||||
* chore: 不属于以上类型的其他类型(日常事务)
|
||||
- feat: 新功能
|
||||
- fix: 修复 Bug
|
||||
- docs: 文档修改
|
||||
- perf: 性能优化
|
||||
- revert: 版本回退
|
||||
- ci: CICD 集成相关
|
||||
- test: 添加测试代码
|
||||
- refactor: 代码重构
|
||||
- build: 影响项目构建或依赖修改
|
||||
- style: 不影响程序逻辑的代码修改
|
||||
- chore: 不属于以上类型的其他类型(日常事务)
|
||||
|
||||
## 交流
|
||||
|
||||
|
||||
9
build/getConfigFileName.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Get the configuration file variable name
|
||||
* @param env
|
||||
*/
|
||||
export const getConfigFileName = (env: Record<string, any>) => {
|
||||
return `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__`
|
||||
.toUpperCase()
|
||||
.replace(/\s/g, '');
|
||||
};
|
||||
@@ -7,10 +7,8 @@
|
||||
<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.0,maximum-scale=1.0,user-scalable=0"
|
||||
/>
|
||||
<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)">
|
||||
<link rel="icon" href="./favicon.ico" />
|
||||
<title>GoView</title>
|
||||
<link rel="stylesheet" href="./index.css" />
|
||||
|
||||
24
package.json
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "go-view",
|
||||
"version": "2.1.6",
|
||||
"version": "1.1.11",
|
||||
"engines": {
|
||||
"node": ">=16.14 <18.0.0"
|
||||
"node": ">=16.14"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
@@ -16,14 +16,18 @@
|
||||
"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": "^0.27.2",
|
||||
"axios": "^1.4.0",
|
||||
"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",
|
||||
@@ -31,15 +35,17 @@
|
||||
"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.34.3",
|
||||
"naive-ui": "2.40.3",
|
||||
"pinia": "^2.0.13",
|
||||
"screenfull": "^6.0.1",
|
||||
"three": "^0.145.0",
|
||||
"vue": "^3.2.31",
|
||||
"vue": "^3.5.13",
|
||||
"vue-demi": "^0.13.1",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-i18n": "9.2.2",
|
||||
"vue-router": "4.0.12",
|
||||
"vue3-lazyload": "^0.2.5-beta",
|
||||
"vue3-sketch-ruler": "^1.3.3",
|
||||
@@ -54,8 +60,8 @@
|
||||
"@typescript-eslint/parser": "^5.18.0",
|
||||
"@vicons/carbon": "^0.12.0",
|
||||
"@vicons/ionicons5": "~0.11.0",
|
||||
"@vitejs/plugin-vue": "^1.10.2",
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.9",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
||||
"@vue/compiler-sfc": "^3.2.31",
|
||||
"@vueuse/core": "^7.7.1",
|
||||
"commitlint": "^17.0.2",
|
||||
@@ -74,7 +80,7 @@
|
||||
"sass": "^1.49.11",
|
||||
"sass-loader": "^12.6.0",
|
||||
"typescript": "4.6.3",
|
||||
"vite": "2.9.9",
|
||||
"vite": "4.3.6",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-importer": "^0.2.5",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
|
||||
6442
pnpm-lock.yaml
generated
@@ -17,7 +17,7 @@
|
||||
import { NConfigProvider } from 'naive-ui'
|
||||
import { GoAppProvider } from '@/components/GoAppProvider'
|
||||
import { I18n } from '@/components/I18n'
|
||||
import { useSystemInit, useDarkThemeHook, useThemeOverridesHook, useCode, useLang } from '@/hooks'
|
||||
import { useDarkThemeHook, useThemeOverridesHook, useCode, useLang } from '@/hooks'
|
||||
|
||||
// 暗黑主题
|
||||
const darkTheme = useDarkThemeHook()
|
||||
@@ -28,10 +28,7 @@ const overridesTheme = useThemeOverridesHook()
|
||||
// 代码主题
|
||||
const hljsTheme = useCode()
|
||||
|
||||
// 系统全局数据初始化
|
||||
useSystemInit()
|
||||
|
||||
// 全局语言
|
||||
const { locale, dateLocale } = useLang()
|
||||
|
||||
//测试提交
|
||||
</script>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import { ModuleTypeEnum } from '@/enums/httpEnum'
|
||||
|
||||
// 接口白名单(免登录)
|
||||
export const fetchAllowList = [
|
||||
// 登录
|
||||
`${ModuleTypeEnum.SYSTEM}/login`,
|
||||
// 获取 OSS 接口
|
||||
`${ModuleTypeEnum.SYSTEM}/getOssInfo`,
|
||||
// 预览获取数据
|
||||
`${ModuleTypeEnum.PROJECT}/getData`,
|
||||
]
|
||||
|
||||
// 接口黑名单
|
||||
export const fetchBlockList = []
|
||||
@@ -1,82 +1,30 @@
|
||||
import axios, { AxiosResponse, AxiosRequestConfig, Axios } from 'axios'
|
||||
import { ResultEnum, ModuleTypeEnum } from "@/enums/httpEnum"
|
||||
import { PageEnum, ErrorPageNameMap } from "@/enums/pageEnum"
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
import { axiosPre } from '@/settings/httpSetting'
|
||||
import { SystemStoreEnum, SystemStoreUserInfoEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
import { redirectErrorPage, getLocalStorage, routerTurnByName, isPreview } from '@/utils'
|
||||
import { fetchAllowList } from './axios.config'
|
||||
import includes from 'lodash/includes'
|
||||
|
||||
export interface MyResponseType<T> {
|
||||
code: ResultEnum
|
||||
data: T
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface MyRequestInstance extends Axios {
|
||||
<T = any>(config: AxiosRequestConfig): Promise<MyResponseType<T>>
|
||||
}
|
||||
import axios, { AxiosResponse, InternalAxiosRequestConfig, AxiosError } from 'axios'
|
||||
import { ResultEnum } from "@/enums/httpEnum"
|
||||
import { ErrorPageNameMap } from "@/enums/pageEnum"
|
||||
import { redirectErrorPage } from '@/utils'
|
||||
|
||||
const axiosInstance = axios.create({
|
||||
baseURL: `${import.meta.env.PROD ? import.meta.env.VITE_PRO_PATH : ''}${axiosPre}`,
|
||||
baseURL: import.meta.env.DEV ? import.meta.env.VITE_DEV_PATH : import.meta.env.VITE_PRO_PATH,
|
||||
timeout: ResultEnum.TIMEOUT,
|
||||
}) as unknown as MyRequestInstance
|
||||
})
|
||||
|
||||
axiosInstance.interceptors.request.use(
|
||||
(config: AxiosRequestConfig) => {
|
||||
// 白名单校验
|
||||
if (includes(fetchAllowList, config.url)) return config
|
||||
// 获取 token
|
||||
const info = getLocalStorage(StorageEnum.GO_SYSTEM_STORE)
|
||||
// 重新登录
|
||||
if (!info) {
|
||||
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
|
||||
return config
|
||||
}
|
||||
const userInfo = info[SystemStoreEnum.USER_INFO]
|
||||
config.headers = {
|
||||
...config.headers,
|
||||
[userInfo[SystemStoreUserInfoEnum.TOKEN_NAME] || 'token']: userInfo[SystemStoreUserInfoEnum.USER_TOKEN] || ''
|
||||
}
|
||||
(config: InternalAxiosRequestConfig) => {
|
||||
return config
|
||||
},
|
||||
(err: AxiosRequestConfig) => {
|
||||
Promise.reject(err)
|
||||
(error: AxiosError) => {
|
||||
Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
// 响应拦截器
|
||||
axiosInstance.interceptors.response.use(
|
||||
(res: AxiosResponse) => {
|
||||
// 预览页面错误不进行处理
|
||||
if (isPreview()) {
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
const { code } = res.data as { code: number }
|
||||
|
||||
if (code === undefined || code === null) return Promise.resolve(res)
|
||||
|
||||
// 成功
|
||||
if (code === ResultEnum.SUCCESS) {
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
|
||||
// 登录过期
|
||||
if (code === ResultEnum.TOKEN_OVERDUE) {
|
||||
window['$message'].error(window['$t']('http.token_overdue_message'))
|
||||
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
|
||||
// 固定错误码重定向
|
||||
if (ErrorPageNameMap.get(code)) {
|
||||
redirectErrorPage(code)
|
||||
return Promise.resolve(res.data)
|
||||
}
|
||||
|
||||
// 提示错误
|
||||
window['$message'].error(window['$t']((res.data as any).msg))
|
||||
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)
|
||||
return Promise.resolve(res.data)
|
||||
},
|
||||
(err: AxiosResponse) => {
|
||||
|
||||
@@ -9,16 +9,16 @@ import {
|
||||
} from '@/enums/httpEnum'
|
||||
import type { RequestGlobalConfigType, RequestConfigType } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
|
||||
export const get = <T = any>(url: string, params?: object) => {
|
||||
return axiosInstance<T>({
|
||||
export const get = (url: string, params?: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.GET,
|
||||
params: params,
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
export const post = <T = any>(url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance<T>({
|
||||
export const post = (url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.POST,
|
||||
data: data,
|
||||
@@ -28,8 +28,8 @@ export const post = <T = any>(url: string, data?: object, headersType?: string)
|
||||
})
|
||||
}
|
||||
|
||||
export const patch = <T = any>(url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance<T>({
|
||||
export const patch = (url: string, data?: object, headersType?: string) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.PATCH,
|
||||
data: data,
|
||||
@@ -39,8 +39,8 @@ export const patch = <T = any>(url: string, data?: object, headersType?: string)
|
||||
})
|
||||
}
|
||||
|
||||
export const put = <T = any>(url: string, data?: object, headersType?: ContentTypeEnum) => {
|
||||
return axiosInstance<T>({
|
||||
export const put = (url: string, data?: object, headersType?: ContentTypeEnum) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.PUT,
|
||||
data: data,
|
||||
@@ -50,8 +50,8 @@ export const put = <T = any>(url: string, data?: object, headersType?: ContentTy
|
||||
})
|
||||
}
|
||||
|
||||
export const del = <T = any>(url: string, params?: object) => {
|
||||
return axiosInstance<T>({
|
||||
export const del = (url: string, params?: object) => {
|
||||
return axiosInstance({
|
||||
url: url,
|
||||
method: RequestHttpEnum.DELETE,
|
||||
params
|
||||
@@ -82,11 +82,11 @@ export const http = (type?: RequestHttpEnum) => {
|
||||
}
|
||||
const prefix = 'javascript:'
|
||||
// 对输入字符进行转义处理
|
||||
export const translateStr = (target: string | Record<any, any>) => {
|
||||
export const translateStr = (target: string | object) => {
|
||||
if (typeof target === 'string') {
|
||||
if (target.startsWith(prefix)) {
|
||||
const funcStr = target.split(prefix)[1]
|
||||
let result
|
||||
let result;
|
||||
try {
|
||||
result = new Function(`${funcStr}`)()
|
||||
} catch (error) {
|
||||
@@ -100,8 +100,8 @@ export const translateStr = (target: string | Record<any, any>) => {
|
||||
}
|
||||
for (const key in target) {
|
||||
if (Object.prototype.hasOwnProperty.call(target, key)) {
|
||||
const subTarget = target[key]
|
||||
target[key] = translateStr(subTarget)
|
||||
const subTarget = (target as any)[key];
|
||||
(target as any)[key] = translateStr(subTarget)
|
||||
}
|
||||
}
|
||||
return target
|
||||
@@ -163,7 +163,6 @@ export const customizeHttp = (targetParams: RequestConfigType, globalParams: Req
|
||||
params = translateStr(params)
|
||||
// form 类型处理
|
||||
let formData: FormData = new FormData()
|
||||
formData.set('default', 'defaultData')
|
||||
// 类型处理
|
||||
|
||||
switch (requestParamsBodyType) {
|
||||
@@ -172,7 +171,9 @@ export const customizeHttp = (targetParams: RequestConfigType, globalParams: Req
|
||||
|
||||
case RequestBodyEnum.JSON:
|
||||
headers['Content-Type'] = ContentTypeEnum.JSON
|
||||
data = translateStr(JSON.parse(targetRequestParams.Body['json']))
|
||||
//json对象也能使用'javasctipt:'来动态拼接参数
|
||||
data = translateStr(targetRequestParams.Body['json'])
|
||||
if(typeof data === 'string') data = JSON.parse(data)
|
||||
// json 赋值给 data
|
||||
break
|
||||
|
||||
|
||||
100
src/api/mock/graph.json
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"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,4 +1,5 @@
|
||||
import test from './test.mock'
|
||||
import vchart from './vchart.mock'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
import { RequestHttpEnum } from '@/enums/httpEnum'
|
||||
|
||||
@@ -19,6 +20,10 @@ 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[] = [
|
||||
{
|
||||
@@ -103,6 +108,21 @@ 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
|
||||
|
||||
86
src/api/mock/sankey.json
Normal file
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"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,6 +2,8 @@ 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 {
|
||||
// 单图表
|
||||
@@ -219,5 +221,19 @@ export default {
|
||||
'endArray|10': [{ 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
|
||||
},
|
||||
}
|
||||
|
||||
10
src/api/mock/vchart.mock.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import bar from './vchart/bar.json'
|
||||
|
||||
export default {
|
||||
bar: {
|
||||
code: 0,
|
||||
status: 200,
|
||||
msg: '请求成功',
|
||||
data: bar
|
||||
}
|
||||
}
|
||||
16
src/api/mock/vchart/bar.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"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 }
|
||||
]
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
export * from '@/api/path/project.api'
|
||||
export * from '@/api/path/system.api'
|
||||
@@ -1,98 +0,0 @@
|
||||
import { http } from '@/api/http'
|
||||
import { httpErrorHandle } from '@/utils'
|
||||
import { ContentTypeEnum, RequestHttpEnum, ModuleTypeEnum } from '@/enums/httpEnum'
|
||||
import { ProjectItem, ProjectDetail } from './project'
|
||||
|
||||
// * 项目列表
|
||||
export const projectListApi = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.GET)<ProjectItem[]>(`${ModuleTypeEnum.PROJECT}/list`, data)
|
||||
return res
|
||||
} catch {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
|
||||
// * 新增项目
|
||||
export const createProjectApi = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.POST)<{
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
id: number
|
||||
}>(`${ModuleTypeEnum.PROJECT}/create`, data)
|
||||
return res
|
||||
} catch {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
|
||||
// * 获取项目
|
||||
export const fetchProjectApi = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.GET)<ProjectDetail>(`${ModuleTypeEnum.PROJECT}/getData`, data)
|
||||
return res
|
||||
} catch {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
|
||||
// * 保存项目
|
||||
export const saveProjectApi = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.POST)(
|
||||
`${ModuleTypeEnum.PROJECT}/save/data`,
|
||||
data,
|
||||
ContentTypeEnum.FORM_URLENCODED
|
||||
)
|
||||
return res
|
||||
} catch {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
|
||||
// * 修改项目基础信息
|
||||
export const updateProjectApi = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.POST)(`${ModuleTypeEnum.PROJECT}/edit`, data)
|
||||
return res
|
||||
} catch {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
|
||||
// * 删除项目
|
||||
export const deleteProjectApi = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.DELETE)(`${ModuleTypeEnum.PROJECT}/delete`, data)
|
||||
return res
|
||||
} catch {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
|
||||
// * 修改发布状态 [-1未发布,1发布]
|
||||
export const changeProjectReleaseApi = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.PUT)(`${ModuleTypeEnum.PROJECT}/publish`, data)
|
||||
return res
|
||||
} catch {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
|
||||
// * 上传文件
|
||||
export const uploadFile = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.POST)<{
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
fileName: string
|
||||
}>(`${ModuleTypeEnum.PROJECT}/upload`, data, ContentTypeEnum.FORM_DATA)
|
||||
return res
|
||||
} catch {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
39
src/api/path/project.d.ts
vendored
@@ -1,39 +0,0 @@
|
||||
export type ProjectItem = {
|
||||
/**
|
||||
* 项目 id
|
||||
*/
|
||||
id: string
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
projectName: string
|
||||
/**
|
||||
* 项目状态:\
|
||||
* -1: 未发布\
|
||||
* 1: 已发布
|
||||
*/
|
||||
state: number
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string
|
||||
/**
|
||||
* 预览图片url
|
||||
*/
|
||||
indexImage: string
|
||||
/**
|
||||
* 创建者 id
|
||||
*/
|
||||
createUserId: string
|
||||
/**
|
||||
* 项目备注
|
||||
*/
|
||||
remarks: string
|
||||
}
|
||||
|
||||
export interface ProjectDetail extends ProjectItem {
|
||||
/**
|
||||
* 项目参数
|
||||
*/
|
||||
content: string
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import { http } from '@/api/http'
|
||||
import { httpErrorHandle } from '@/utils'
|
||||
import { RequestHttpEnum, ModuleTypeEnum } from '@/enums/httpEnum'
|
||||
import { LoginResult } from './system'
|
||||
|
||||
// * 登录
|
||||
export const loginApi = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.POST)<LoginResult>(`${ModuleTypeEnum.SYSTEM}/login`, data)
|
||||
return res
|
||||
} catch (err) {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
|
||||
// * 登出
|
||||
export const logoutApi = async () => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.GET)(`${ModuleTypeEnum.SYSTEM}/logout`)
|
||||
return res
|
||||
} catch (err) {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
|
||||
// * 获取 oss 上传接口
|
||||
export const ossUrlApi = async (data: object) => {
|
||||
try {
|
||||
const res = await http(RequestHttpEnum.GET)<{
|
||||
/**
|
||||
* bucket 地址
|
||||
*/
|
||||
bucketURL?: string
|
||||
}>(`${ModuleTypeEnum.SYSTEM}/getOssInfo`, data)
|
||||
return res
|
||||
} catch (err) {
|
||||
httpErrorHandle()
|
||||
}
|
||||
}
|
||||
26
src/api/path/system.d.ts
vendored
@@ -1,26 +0,0 @@
|
||||
export interface LoginResult {
|
||||
token: {
|
||||
/**
|
||||
* token 值
|
||||
*/
|
||||
tokenValue: string
|
||||
/**
|
||||
* token key
|
||||
*/
|
||||
tokenName: string
|
||||
}
|
||||
userinfo: {
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
nickname: string
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
username: string
|
||||
/**
|
||||
* 用户 id
|
||||
*/
|
||||
id: string
|
||||
}
|
||||
}
|
||||
BIN
src/assets/images/chart/charts/bar_line.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
src/assets/images/chart/charts/dial.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
src/assets/images/chart/charts/graph.png
Normal file
|
After Width: | Height: | Size: 377 KiB |
BIN
src/assets/images/chart/charts/sankey.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
src/assets/images/chart/decorates/Pipeline_H.png
Normal file
|
After Width: | Height: | Size: 999 B |
BIN
src/assets/images/chart/decorates/Pipeline_V.png
Normal file
|
After Width: | Height: | Size: 983 B |
BIN
src/assets/images/chart/decorates/flow-circle.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
src/assets/images/chart/decorates/flow-zhexian.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
src/assets/images/chart/decorates/fullScreen.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
src/assets/images/chart/icons/icon.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
src/assets/images/chart/informations/inputs_date.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
src/assets/images/chart/informations/inputs_input.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
src/assets/images/chart/informations/inputs_pagination.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/images/chart/informations/inputs_select.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/images/chart/informations/inputs_tab.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
src/assets/images/chart/informations/photo_carousel.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/images/chart/photos/upload.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
src/assets/images/chart/tables/tables_basic.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/images/chart/vchart/vchart_bar_x.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/images/chart/vchart/vchart_bar_x_stack.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
src/assets/images/project/moke-20211219181327.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
src/assets/images/tips/Integral-activity.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
src/assets/videos/earth.mp4
Normal file
3
src/components/GoIconify/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import GoIconify from './index.vue';
|
||||
|
||||
export { GoIconify };
|
||||
34
src/components/GoIconify/index.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<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>
|
||||
@@ -27,9 +27,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, ref } from 'vue'
|
||||
import { NAvatar, NText } from 'naive-ui'
|
||||
import { renderIcon, getLocalStorage } from '@/utils'
|
||||
import { SystemStoreEnum, SystemStoreUserInfoEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
import { renderIcon } from '@/utils'
|
||||
import { logout, renderLang } from '@/utils'
|
||||
import { GoSystemSet } from '@/components/GoSystemSet/index'
|
||||
import { GoSystemInfo } from '@/components/GoSystemInfo/index'
|
||||
@@ -66,17 +64,7 @@ const renderUserInfo = () => {
|
||||
}),
|
||||
h('div', null, [
|
||||
h('div', null, [
|
||||
h(NText, { depth: 2 }, {
|
||||
default: () => {
|
||||
const info = getLocalStorage(StorageEnum.GO_SYSTEM_STORE)
|
||||
if (info) {
|
||||
return info[SystemStoreEnum.USER_INFO][SystemStoreUserInfoEnum.USER_NAME];
|
||||
}
|
||||
else {
|
||||
return 'admin';
|
||||
}
|
||||
}
|
||||
})
|
||||
h(NText, { depth: 2 }, { default: () => '奔跑的面条' })
|
||||
])
|
||||
])
|
||||
]
|
||||
@@ -149,4 +137,4 @@ const handleSelect = (key: string) => {
|
||||
cursor: pointer;
|
||||
transform: scale(0.7);
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
3
src/components/GoVChart/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import GoVChart from './index.vue'
|
||||
|
||||
export { GoVChart }
|
||||
242
src/components/GoVChart/index.vue
Normal file
@@ -0,0 +1,242 @@
|
||||
<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>
|
||||
32
src/components/GoVChart/transformProps/bars.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
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
|
||||
}
|
||||
8
src/components/GoVChart/transformProps/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<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,4 +1,34 @@
|
||||
<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>
|
||||
@@ -227,9 +257,36 @@
|
||||
<n-switch v-model:value="legend.show" size="small"></n-switch>
|
||||
</template>
|
||||
<setting-item-box name="图例文字">
|
||||
<setting-item>
|
||||
<setting-item name="颜色">
|
||||
<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>
|
||||
|
||||
@@ -279,10 +336,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType, computed } from 'vue'
|
||||
import { PropType, computed, watch } from 'vue'
|
||||
import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
|
||||
import { axisConfig } from '@/packages/chartConfiguration/echarts/index'
|
||||
import { axisConfig, legendConfig } 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: {
|
||||
@@ -296,6 +358,12 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const chartEditStore = useChartEditStore()
|
||||
const themeSetting = computed(() => {
|
||||
const chartThemeSetting = chartEditStore.getEditCanvasConfig.chartThemeSetting
|
||||
return chartThemeSetting
|
||||
})
|
||||
|
||||
const title = computed(() => {
|
||||
return props.optionData.title
|
||||
})
|
||||
@@ -319,4 +387,18 @@ 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,6 +69,22 @@
|
||||
</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>
|
||||
@@ -149,10 +165,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import { ref, 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: {
|
||||
@@ -175,10 +193,48 @@ 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></style>
|
||||
<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>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="go-Flipper" :class="[flipType, { go: isFlipping }]">
|
||||
<div class="go-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" setup>
|
||||
import { ref, PropType, watch } from 'vue'
|
||||
import { FlipType } from './index'
|
||||
import { ref, PropType, watch, nextTick } from 'vue'
|
||||
import { FlipType } from './index'
|
||||
|
||||
const props = defineProps({
|
||||
flipType: {
|
||||
@@ -43,6 +43,10 @@ const props = defineProps({
|
||||
backColor: {
|
||||
type: String,
|
||||
default: '#000000'
|
||||
},
|
||||
borderWidth: {
|
||||
type: Number,
|
||||
default: 2
|
||||
}
|
||||
})
|
||||
|
||||
@@ -50,19 +54,27 @@ const isFlipping = ref(false)
|
||||
const frontTextFromData = ref(props.count || 0)
|
||||
const backTextFromData = ref(props.count || 0)
|
||||
|
||||
let timeoutID: any = 0
|
||||
|
||||
// 翻牌
|
||||
const flip = (front: string | number, back: string | number) => {
|
||||
const flip = async (front: string | number, back: string | number) => {
|
||||
// 如果处于翻转中,则不执行
|
||||
if (isFlipping.value) return
|
||||
if (isFlipping.value) {
|
||||
isFlipping.value = false // 立即结束此次动画
|
||||
clearTimeout(timeoutID) // 清除上一个计时器任务
|
||||
await nextTick()
|
||||
await flip(front, back) // 开始最后一次翻牌任务
|
||||
return
|
||||
}
|
||||
|
||||
// 设置翻盘前后数据
|
||||
backTextFromData.value = back
|
||||
frontTextFromData.value = front
|
||||
|
||||
// 设置翻转状态为true
|
||||
isFlipping.value = true
|
||||
|
||||
// 翻牌结束的行为
|
||||
setTimeout(() => {
|
||||
timeoutID = setTimeout(() => {
|
||||
isFlipping.value = false // 设置翻转状态为false
|
||||
frontTextFromData.value = back
|
||||
}, props.duration)
|
||||
@@ -86,6 +98,7 @@ $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;
|
||||
@@ -125,13 +138,12 @@ $lineColor: #4a9ef8;
|
||||
}
|
||||
// #endregion
|
||||
|
||||
.go-Flipper {
|
||||
.go-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;
|
||||
@@ -139,6 +151,17 @@ $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 {
|
||||
@@ -186,11 +209,13 @@ $lineColor: #4a9ef8;
|
||||
&.down.go .front:before {
|
||||
transform-origin: 50% 100%;
|
||||
animation: frontFlipDown $speed ease-in-out both;
|
||||
box-shadow: 0 -2px 6px rgba($color: $lineColor, $alpha: 0.3);
|
||||
box-shadow: 0 -2px $borderWidth 0 $frontColor;
|
||||
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 {
|
||||
@@ -208,11 +233,13 @@ $lineColor: #4a9ef8;
|
||||
&.up.go .front:after {
|
||||
transform-origin: 50% 0;
|
||||
animation: frontFlipUp $speed ease-in-out both;
|
||||
box-shadow: 0 2px 6px rgba($color: $lineColor, $alpha: 0.3);
|
||||
box-shadow: 0 2px $borderWidth 0 $frontColor;
|
||||
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>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div class="model-footer">
|
||||
中国色列表来自于:
|
||||
<n-a href="http://zhongguose.com">http://zhongguose.com</n-a>
|
||||
<n-a href="http://zhongguose.com" target="_blank">http://zhongguose.com</n-a>
|
||||
</div>
|
||||
</div>
|
||||
</n-modal>
|
||||
@@ -157,6 +157,7 @@ $height: 85vh;
|
||||
}
|
||||
}
|
||||
.model-footer {
|
||||
z-index: 1;
|
||||
text-align: end;
|
||||
}
|
||||
}
|
||||
|
||||
71
src/components/Pages/VChartItemSetting/Axis.vue
Normal file
@@ -0,0 +1,71 @@
|
||||
<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>
|
||||
38
src/components/Pages/VChartItemSetting/Legends.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<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>
|
||||
47
src/components/Pages/VChartItemSetting/Tooltip.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<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>
|
||||
@@ -0,0 +1,18 @@
|
||||
<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>
|
||||
33
src/components/Pages/VChartItemSetting/common/FontStyle.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<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>
|
||||
4
src/components/Pages/VChartItemSetting/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import VChartGlobalSetting from './VChartGlobalSetting.vue'
|
||||
import Axis from './Axis.vue'
|
||||
|
||||
export { VChartGlobalSetting, Axis }
|
||||
@@ -12,7 +12,9 @@ export enum DragKeyEnum {
|
||||
// 不同页面保存操作
|
||||
export enum SavePageEnum {
|
||||
CHART = 'SaveChart',
|
||||
JSON = 'SaveJSON'
|
||||
CHART_TO_PREVIEW = 'ChartToPreview',
|
||||
JSON = 'SaveJSON',
|
||||
CLOSE = 'close'
|
||||
}
|
||||
|
||||
// 操作枚举
|
||||
@@ -46,6 +48,7 @@ export enum MenuEnum {
|
||||
UN_GROUP = 'unGroup',
|
||||
// 后退
|
||||
BACK = 'back',
|
||||
// 前进
|
||||
FORWORD = 'forward',
|
||||
// 保存
|
||||
SAVE = 'save',
|
||||
@@ -81,15 +84,3 @@ export enum MacKeyboard {
|
||||
ALT_SOURCE_KEY = '⌥',
|
||||
SPACE = 'Space'
|
||||
}
|
||||
|
||||
// 同步状态枚举
|
||||
export enum SyncEnum {
|
||||
// 等待
|
||||
PENDING,
|
||||
// 开始
|
||||
START,
|
||||
// 成功
|
||||
SUCCESS,
|
||||
// 失败
|
||||
FAILURE
|
||||
}
|
||||
|
||||
@@ -7,15 +7,38 @@ export enum BaseEvent {
|
||||
// 移入
|
||||
ON_MOUSE_ENTER = 'mouseenter',
|
||||
// 移出
|
||||
ON_MOUSE_LEAVE = 'mouseleave',
|
||||
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 {
|
||||
export enum EventLife {
|
||||
// 渲染之后
|
||||
VNODE_MOUNTED = 'vnodeMounted',
|
||||
// 渲染之前
|
||||
VNODE_BEFORE_MOUNT = 'vnodeBeforeMount',
|
||||
VNODE_BEFORE_MOUNT = 'vnodeBeforeMount'
|
||||
}
|
||||
|
||||
// 内置字符串函数对象列表
|
||||
@@ -28,4 +51,9 @@ export const excludeParseEventKeyList = [
|
||||
BaseEvent.ON_MOUSE_LEAVE,
|
||||
//过滤器
|
||||
'filter'
|
||||
]
|
||||
]
|
||||
// 内置字符串函数键值列表
|
||||
export const excludeParseEventValueList = [
|
||||
// 请求里的函数语句
|
||||
'javascript:'
|
||||
]
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
// 模块 Path 前缀分类
|
||||
export enum ModuleTypeEnum {
|
||||
SYSTEM = 'sys',
|
||||
PROJECT = 'project',
|
||||
}
|
||||
|
||||
// 请求结果集
|
||||
/**
|
||||
* @description: 请求结果集
|
||||
*/
|
||||
export enum ResultEnum {
|
||||
DATA_SUCCESS = 0,
|
||||
SUCCESS = 200,
|
||||
SERVER_ERROR = 500,
|
||||
SERVER_FORBIDDEN = 403,
|
||||
NOT_FOUND = 404,
|
||||
TOKEN_OVERDUE = 886,
|
||||
TIMEOUT = 60000,
|
||||
TIMEOUT = 60000
|
||||
}
|
||||
|
||||
// 数据相关
|
||||
@@ -33,13 +28,9 @@ export enum RequestContentTypeEnum {
|
||||
SQL = 1
|
||||
}
|
||||
|
||||
// 头部
|
||||
export enum RequestHttpHeaderEnum {
|
||||
TOKEN = 'Token',
|
||||
COOKIE = 'Cookie'
|
||||
}
|
||||
|
||||
// 请求方法
|
||||
/**
|
||||
* @description: 请求方法
|
||||
*/
|
||||
export enum RequestHttpEnum {
|
||||
GET = 'get',
|
||||
POST = 'post',
|
||||
@@ -120,7 +111,9 @@ export type RequestParams = {
|
||||
}
|
||||
}
|
||||
|
||||
// 常用的contentTyp类型
|
||||
/**
|
||||
* @description: 常用的contentTyp类型
|
||||
*/
|
||||
export enum ContentTypeEnum {
|
||||
// json
|
||||
JSON = 'application/json;charset=UTF-8',
|
||||
|
||||
@@ -26,15 +26,10 @@ export enum PageEnum {
|
||||
//重定向
|
||||
REDIRECT = '/redirect',
|
||||
REDIRECT_NAME = 'Redirect',
|
||||
|
||||
// 未发布
|
||||
REDIRECT_UN_PUBLISH = '/redirect/unPublish',
|
||||
REDIRECT_UN_PUBLISH_NAME = 'redirect-un-publish',
|
||||
|
||||
// 重载
|
||||
RELOAD = '/reload',
|
||||
RELOAD_NAME = 'Reload',
|
||||
|
||||
|
||||
// 首页
|
||||
BASE_HOME = '/project',
|
||||
BASE_HOME_NAME = 'Project',
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
export enum StorageEnum {
|
||||
// 全局设置
|
||||
GO_SETTING_STORE = 'GO_SETTING',
|
||||
GO_SYSTEM_SETTING_STORE = 'GO_SYSTEM_SETTING',
|
||||
// token 等信息
|
||||
GO_ACCESS_TOKEN_STORE = 'GO_ACCESS_TOKEN',
|
||||
// 登录信息
|
||||
GO_SYSTEM_STORE = 'GO_SYSTEM',
|
||||
GO_LOGIN_INFO_STORE = 'GO_LOGIN_INFO',
|
||||
// 语言
|
||||
GO_LANG_STORE = 'GO_LANG',
|
||||
// 当前选择的主题
|
||||
@@ -10,5 +12,7 @@ export enum StorageEnum {
|
||||
// 工作台布局配置
|
||||
GO_CHART_LAYOUT_STORE = 'GO_CHART_LAYOUT',
|
||||
// 工作台需要保存的数据
|
||||
GO_CHART_STORAGE_LIST = 'GO_CHART_STORAGE_LIST'
|
||||
GO_CHART_STORAGE_LIST = 'GO_CHART_STORAGE_LIST',
|
||||
// 用户存储的图片媒体
|
||||
GO_USER_MEDIA_PHOTOS = 'GO_USER_MEDIA_PHOTOS'
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@ export * from '@/hooks/useTheme.hook'
|
||||
export * from '@/hooks/usePreviewScale.hook'
|
||||
export * from '@/hooks/useCode.hook'
|
||||
export * from '@/hooks/useChartDataFetch.hook'
|
||||
export * from '@/hooks/useSystemInit.hook'
|
||||
export * from '@/hooks/useChartDataPondFetch.hook'
|
||||
export * from '@/hooks/useLifeHandler.hook'
|
||||
export * from '@/hooks/useLang.hook'
|
||||
export * from '@/hooks/useLang.hook'
|
||||
export * from '@/hooks/useChartInteract.hook'
|
||||
export * from '@/hooks/useVCharts.hook'
|
||||
26
src/hooks/useCanvasInitOptions.hook.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
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,111 +1,130 @@
|
||||
import { ref, toRefs, toRaw } 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'
|
||||
|
||||
// 获取类型
|
||||
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) {
|
||||
vChartRef.value.setOption({ dataset: dataset })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
echartsUpdateHandle(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)
|
||||
}
|
||||
}
|
||||
|
||||
if (isPreview()) {
|
||||
// 判断是否是数据池类型
|
||||
targetComponent.request.requestDataType === RequestDataTypeEnum.Pond
|
||||
? addGlobalDataInterface(targetComponent, useChartEditStore, updateCallback || echartsUpdateHandle)
|
||||
: requestIntervalFn()
|
||||
}
|
||||
return { vChartRef }
|
||||
}
|
||||
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 }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { toRaw } from 'vue'
|
||||
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'
|
||||
@@ -20,7 +20,7 @@ const mittDataPondMap = new Map<string, DataPondMapType[]>()
|
||||
// 创建单个数据项轮询接口
|
||||
const newPondItemInterval = (
|
||||
requestGlobalConfig: RequestGlobalConfigType,
|
||||
requestDataPondItem: RequestDataPondItemType,
|
||||
requestDataPondItem: ComputedRef<RequestDataPondItemType>,
|
||||
dataPondMapItem?: DataPondMapType[]
|
||||
) => {
|
||||
if (!dataPondMapItem) return
|
||||
@@ -31,8 +31,7 @@ const newPondItemInterval = (
|
||||
// 请求
|
||||
const fetchFn = async () => {
|
||||
try {
|
||||
const res = await customizeHttp(toRaw(requestDataPondItem.dataPondRequestConfig), toRaw(requestGlobalConfig))
|
||||
|
||||
const res = await customizeHttp(toRaw(requestDataPondItem.value.dataPondRequestConfig), toRaw(requestGlobalConfig))
|
||||
if (res) {
|
||||
try {
|
||||
// 遍历更新回调函数
|
||||
@@ -49,19 +48,32 @@ const newPondItemInterval = (
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => requestDataPondItem.value.dataPondRequestConfig.requestParams.Params,
|
||||
() => {
|
||||
fetchFn()
|
||||
},
|
||||
{
|
||||
immediate: false,
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
// 立即调用
|
||||
fetchFn()
|
||||
|
||||
const targetInterval = requestDataPondItem.dataPondRequestConfig.requestInterval
|
||||
const targetUnit = requestDataPondItem.dataPondRequestConfig.requestIntervalUnit
|
||||
|
||||
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 time = targetInterval ? targetInterval : globalRequestInterval
|
||||
// 单位
|
||||
const unit = targetInterval ? targetUnit : globalUnit
|
||||
const unit = targetInterval ? targetUnit : globalUnit
|
||||
// 开启轮询
|
||||
if (time) fetchInterval = setInterval(fetchFn, intervalUnitHandle(time, unit))
|
||||
}
|
||||
@@ -96,13 +108,16 @@ export const useChartDataPondFetch = () => {
|
||||
}
|
||||
|
||||
// 初始化数据池
|
||||
const initDataPond = (requestGlobalConfig: RequestGlobalConfigType) => {
|
||||
const { requestDataPond } = requestGlobalConfig
|
||||
const initDataPond = (useChartEditStore: ChartEditStoreType) => {
|
||||
const { requestGlobalConfig } = useChartEditStore()
|
||||
const chartEditStore = useChartEditStore()
|
||||
// 根据 mapId 查找对应的数据池配置
|
||||
for (let pondKey of mittDataPondMap.keys()) {
|
||||
const requestDataPondItem = requestDataPond.find(item => item.dataPondId === pondKey)
|
||||
const requestDataPondItem = computed(() => {
|
||||
return requestGlobalConfig.requestDataPond.find(item => item.dataPondId === pondKey)
|
||||
}) as ComputedRef<RequestDataPondItemType>
|
||||
if (requestDataPondItem) {
|
||||
newPondItemInterval(requestGlobalConfig, requestDataPondItem, mittDataPondMap.get(pondKey))
|
||||
newPondItemInterval(chartEditStore.requestGlobalConfig, requestDataPondItem, mittDataPondMap.get(pondKey))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
59
src/hooks/useChartInteract.hook.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
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) => {
|
||||
|
||||
}
|
||||
@@ -48,10 +48,10 @@ export const useLifeHandler = (chartConfig: CreateComponentType | CreateComponen
|
||||
try {
|
||||
return new Function(`
|
||||
return (
|
||||
async function(mouseEvent){
|
||||
async function(components,mouseEvent){
|
||||
${fnStr}
|
||||
}
|
||||
)`)()
|
||||
)`)().bind(undefined,components)
|
||||
} 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,23 +0,0 @@
|
||||
import { useSystemStore } from '@/store/modules/systemStore/systemStore'
|
||||
import { SystemStoreEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
import { ResultEnum } from '@/enums/httpEnum'
|
||||
import { ossUrlApi } from '@/api/path'
|
||||
|
||||
|
||||
// * 初始化
|
||||
export const useSystemInit = async () => {
|
||||
const systemStore = useSystemStore()
|
||||
|
||||
// 获取 OSS 信息的 url 地址,用来拼接展示图片的地址
|
||||
const getOssUrl = async () => {
|
||||
const res = await ossUrlApi({})
|
||||
if (res && res.code === ResultEnum.SUCCESS) {
|
||||
systemStore.setItem(SystemStoreEnum.FETCH_INFO, {
|
||||
OSSUrl: res.data?.bucketURL
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 执行
|
||||
getOssUrl()
|
||||
}
|
||||
164
src/hooks/useVCharts.hook.ts
Normal file
@@ -0,0 +1,164 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,6 @@ const global = {
|
||||
help: 'Help',
|
||||
contact: 'About Software',
|
||||
logout: 'Logout',
|
||||
logout_success: 'Logout success!',
|
||||
logout_failure: 'Logout Failed!',
|
||||
// system setting
|
||||
sys_set: 'System Setting',
|
||||
lang_set: 'Language Setting',
|
||||
@@ -28,14 +26,8 @@ const global = {
|
||||
r_more: 'More',
|
||||
}
|
||||
|
||||
const http = {
|
||||
error_message: 'The interface is abnormal, please check the interface!',
|
||||
token_overdue_message: 'Login expired, please log in again!'
|
||||
}
|
||||
|
||||
export default {
|
||||
global,
|
||||
http,
|
||||
login,
|
||||
project
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@ export default {
|
||||
desc: "Login",
|
||||
form_auto: "Sign in automatically",
|
||||
form_button: "Login",
|
||||
login_success: "Login success!",
|
||||
login_message: "Please complete the letter!",
|
||||
login_success: "Login success",
|
||||
login_message: "Please complete the letter",
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
export default {
|
||||
create_btn: 'Creat',
|
||||
create_success: 'Creat Success!',
|
||||
create_failure: 'Failed to create, please try again later!',
|
||||
create_tip: 'Please select a content for development!',
|
||||
create_btn: 'Create',
|
||||
create_tip: 'Please select a content for development',
|
||||
project: 'Project',
|
||||
my: 'My',
|
||||
new_project: 'New Project',
|
||||
|
||||
@@ -11,8 +11,6 @@ const global = {
|
||||
help: '帮助中心',
|
||||
contact: '关于软件',
|
||||
logout: '退出登录',
|
||||
logout_success: '退出成功!',
|
||||
logout_failure: '退出失败!',
|
||||
// 系统设置
|
||||
sys_set: '系统设置',
|
||||
lang_set: '语言设置',
|
||||
@@ -20,27 +18,16 @@ const global = {
|
||||
r_edit: '编辑',
|
||||
r_preview: '预览',
|
||||
r_copy: '克隆',
|
||||
r_copy_success: '克隆成功!',
|
||||
r_rename: '重命名',
|
||||
r_rename_success: '重命名成功!',
|
||||
r_publish: '发布',
|
||||
r_publish_success: '成功发布!',
|
||||
r_unpublish: '取消发布',
|
||||
r_unpublish_success: '取消成功!',
|
||||
r_download: '下载',
|
||||
r_delete: '删除',
|
||||
r_delete_success: '删除成功!',
|
||||
r_more: '更多',
|
||||
}
|
||||
|
||||
const http = {
|
||||
error_message: '获取数据失败,请稍后重试!',
|
||||
token_overdue_message: '登录过期,请重新登录!'
|
||||
}
|
||||
|
||||
export default {
|
||||
global,
|
||||
http,
|
||||
login,
|
||||
project
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@ export default {
|
||||
desc: "登录",
|
||||
form_auto: "自动登录",
|
||||
form_button: "登录",
|
||||
login_success: "登录成功",
|
||||
login_message: "请填写完整信息",
|
||||
login_success: "登录成功!",
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
export default {
|
||||
// aside
|
||||
create_btn: '新建',
|
||||
create_success: '新建成功!',
|
||||
create_failure: '新建失败,请稍后重试!',
|
||||
create_tip: '从哪里出发好呢?',
|
||||
project: '项目',
|
||||
my: '我的',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<n-layout-header bordered class="go-header">
|
||||
<header class="go-header-box">
|
||||
<header class="go-header-box" :class="{ 'is-project': isProject }">
|
||||
<div class="header-item left">
|
||||
<n-space>
|
||||
<slot name="left"></slot>
|
||||
@@ -23,21 +23,31 @@
|
||||
</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: grid;
|
||||
grid-template-columns: repeat(3, 33.33%);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
&.is-project {
|
||||
grid-template-columns: none;
|
||||
}
|
||||
.header-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: $min-width;
|
||||
&.left {
|
||||
justify-content: start;
|
||||
}
|
||||
@@ -49,7 +59,7 @@ $min-width: 400px;
|
||||
}
|
||||
}
|
||||
height: $--header-height;
|
||||
padding: 0 60px;
|
||||
padding: 0 20px 0 60px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
<template>
|
||||
<router-view>
|
||||
<template #default="{ Component, route }">
|
||||
<component
|
||||
v-if="route.noKeepAlive"
|
||||
:is="Component"
|
||||
:key="route.fullPath"
|
||||
></component>
|
||||
<component v-if="route.meta.noKeepAlive" :is="Component"></component>
|
||||
<keep-alive v-else>
|
||||
<component :is="Component" :key="route.fullPath"></component>
|
||||
<component :is="Component"></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.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.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>
|
||||
|
||||
123
src/main.ts
@@ -1,56 +1,67 @@
|
||||
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()
|
||||
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()
|
||||
})
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './axis'
|
||||
export * from './line'
|
||||
export * from './label'
|
||||
export * from './label'
|
||||
export * from './legend'
|
||||
@@ -3,5 +3,11 @@ export const labelConfig = {
|
||||
{ label: '外侧', value: 'outside' },
|
||||
{ label: '内部', value: 'inside' },
|
||||
{ label: '中心', value: 'center' }
|
||||
],
|
||||
fontWeight: [
|
||||
{ label: '正常', value: 'normal' },
|
||||
{ label: '普通加粗', value: 'bold' },
|
||||
{ label: '加粗', value: 'bolder' },
|
||||
{ label: '细体', value: 'lighter' }
|
||||
]
|
||||
}
|
||||
|
||||
70
src/packages/chartConfiguration/echarts/legend.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
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
src/packages/chartConfiguration/vcharts/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './legends'
|
||||
99
src/packages/chartConfiguration/vcharts/legends.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
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'
|
||||
},
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<v-chart
|
||||
ref="vChartRef"
|
||||
:init-options="initOptions"
|
||||
:theme="themeColor"
|
||||
:option="option"
|
||||
:manual-update="isPreview()"
|
||||
:update-options="{
|
||||
replaceMerge: replaceMergeArr
|
||||
}"
|
||||
@@ -14,6 +14,7 @@
|
||||
<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'
|
||||
@@ -25,6 +26,7 @@ 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: {
|
||||
@@ -41,6 +43,8 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const initOptions = useCanvasInitOptions(props.chartConfig.option, props.themeSetting)
|
||||
|
||||
use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent, LegendComponent])
|
||||
|
||||
const replaceMergeArr = ref<string[]>()
|
||||
@@ -57,11 +61,23 @@ watch(
|
||||
if (!isObject(newData) || !('dimensions' in newData)) return
|
||||
if (Array.isArray(newData?.dimensions)) {
|
||||
const seriesArr = []
|
||||
for (let i = 0; i < newData.dimensions.length - 1; i++) {
|
||||
seriesArr.push(seriesItem)
|
||||
// 对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)
|
||||
}
|
||||
replaceMergeArr.value = ['series']
|
||||
props.chartConfig.option.series = seriesArr
|
||||
nextTick(() => {
|
||||
replaceMergeArr.value = []
|
||||
})
|
||||
@@ -75,5 +91,7 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore)
|
||||
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, (newData: any) => {
|
||||
props.chartConfig.option.dataset = newData
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<v-chart
|
||||
ref="vChartRef"
|
||||
:init-options="initOptions"
|
||||
:theme="themeColor"
|
||||
:option="option"
|
||||
:manual-update="isPreview()"
|
||||
:update-options="{
|
||||
replaceMerge: replaceMergeArr
|
||||
}"
|
||||
@@ -14,6 +14,7 @@
|
||||
<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'
|
||||
@@ -21,9 +22,9 @@ import { mergeTheme } from '@/packages/public/chart'
|
||||
import config, { includes, seriesItem } from './config'
|
||||
import { useChartDataFetch } from '@/hooks'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { isPreview } from '@/utils'
|
||||
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
import isObject from 'lodash/isObject'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
|
||||
const props = defineProps({
|
||||
themeSetting: {
|
||||
@@ -40,6 +41,8 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const initOptions = useCanvasInitOptions(props.chartConfig.option, props.themeSetting)
|
||||
|
||||
use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent, LegendComponent])
|
||||
|
||||
const replaceMergeArr = ref<string[]>()
|
||||
@@ -57,7 +60,7 @@ watch(
|
||||
if (Array.isArray(newData?.dimensions)) {
|
||||
const seriesArr = []
|
||||
for (let i = 0; i < newData.dimensions.length - 1; i++) {
|
||||
seriesArr.push(seriesItem)
|
||||
seriesArr.push(cloneDeep(seriesItem))
|
||||
}
|
||||
replaceMergeArr.value = ['series']
|
||||
props.chartConfig.option.series = seriesArr
|
||||
@@ -74,5 +77,7 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore)
|
||||
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, (newData: any) => {
|
||||
props.chartConfig.option.dataset = newData
|
||||
})
|
||||
</script>
|
||||
|
||||
74
src/packages/components/Charts/Bars/BarLine/config.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
|
||||
import { BarLineConfig } from './index'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
import dataJson from './data.json'
|
||||
|
||||
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
|
||||
// 柱状折线组合图 分别定义series
|
||||
// 写死name可以定义legend显示的名称
|
||||
export const barSeriesItem = {
|
||||
type: 'bar',
|
||||
barWidth: 15,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color: '#fff',
|
||||
fontSize: 12
|
||||
},
|
||||
itemStyle: {
|
||||
color: null,
|
||||
borderRadius: 2
|
||||
}
|
||||
}
|
||||
|
||||
export const lineSeriesItem = {
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color: '#fff',
|
||||
fontSize: 12
|
||||
},
|
||||
symbolSize: 5, //设定实心点的大小
|
||||
itemStyle: {
|
||||
borderWidth: 1
|
||||
},
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
width: 3,
|
||||
color: null
|
||||
}
|
||||
}
|
||||
|
||||
export const option = {
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
show: true,
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: null
|
||||
},
|
||||
xAxis: {
|
||||
show: true,
|
||||
type: 'category'
|
||||
},
|
||||
yAxis: {
|
||||
show: true,
|
||||
type: 'value'
|
||||
},
|
||||
dataset: { ...dataJson },
|
||||
series: [barSeriesItem, lineSeriesItem]
|
||||
}
|
||||
|
||||
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||
public key = BarLineConfig.key
|
||||
public chartConfig = cloneDeep(BarLineConfig)
|
||||
// 图表配置项
|
||||
public option = echartOptionProfixHandle(option, includes)
|
||||
}
|
||||
138
src/packages/components/Charts/Bars/BarLine/config.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<!-- Echarts 全局设置 -->
|
||||
<global-setting :optionData="optionData"></global-setting>
|
||||
<CollapseItem
|
||||
v-for="(item, index) in seriesList"
|
||||
:key="index"
|
||||
:name="`系列${index + 1}`"
|
||||
:expanded="true"
|
||||
>
|
||||
<template #header>
|
||||
<n-text class="go-fs-13" depth="3">
|
||||
{{ item.type == 'bar' ? '「柱状图」' : '「折线图」' }}
|
||||
</n-text>
|
||||
</template>
|
||||
<SettingItemBox name="类型">
|
||||
<SettingItem name="宽度">
|
||||
<n-select
|
||||
:value="item.type"
|
||||
size="small"
|
||||
:options="[
|
||||
{ label: '柱状图', value: 'bar' },
|
||||
{ label: '折线图', value: 'line' }
|
||||
]"
|
||||
@update:value="(value: any) => {
|
||||
updateHandle(item, value)
|
||||
}"
|
||||
/>
|
||||
</SettingItem>
|
||||
|
||||
</SettingItemBox>
|
||||
<SettingItemBox name="图形" v-if="item.type == 'bar'">
|
||||
<SettingItem name="宽度">
|
||||
<n-input-number
|
||||
v-model:value="item.barWidth"
|
||||
:min="1"
|
||||
:max="100"
|
||||
size="small"
|
||||
placeholder="自动计算"
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
<SettingItem name="圆角">
|
||||
<n-input-number v-model:value="item.itemStyle.borderRadius" :min="0" size="small"></n-input-number>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
<SettingItemBox name="线条" v-if="item.type == 'line'">
|
||||
<SettingItem name="宽度">
|
||||
<n-input-number
|
||||
v-model:value="item.lineStyle.width"
|
||||
:min="1"
|
||||
:max="100"
|
||||
size="small"
|
||||
placeholder="自动计算"
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
<SettingItem name="类型">
|
||||
<n-select v-model:value="item.lineStyle.type" size="small" :options="lineConf.lineStyle.type"></n-select>
|
||||
</SettingItem>
|
||||
<setting-item>
|
||||
<n-space>
|
||||
<n-switch v-model:value="item.smooth" size="small" />
|
||||
<n-text>曲线</n-text>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
</SettingItemBox>
|
||||
<SettingItemBox name="实心点" v-if="item.type == 'line'">
|
||||
<SettingItem name="大小">
|
||||
<n-input-number
|
||||
v-model:value="item.symbolSize"
|
||||
:min="1"
|
||||
:max="100"
|
||||
size="small"
|
||||
placeholder="自动计算"
|
||||
></n-input-number>
|
||||
</SettingItem>
|
||||
</SettingItemBox>
|
||||
<setting-item-box name="标签">
|
||||
<setting-item>
|
||||
<n-space>
|
||||
<n-switch v-model:value="item.label.show" size="small" />
|
||||
<n-text>展示标签</n-text>
|
||||
</n-space>
|
||||
</setting-item>
|
||||
<setting-item name="大小">
|
||||
<n-input-number v-model:value="item.label.fontSize" size="small" :min="1"></n-input-number>
|
||||
</setting-item>
|
||||
<setting-item name="tip颜色">
|
||||
<n-color-picker size="small" :modes="['hex']" v-model:value="item.label.color"></n-color-picker>
|
||||
</setting-item>
|
||||
<setting-item name="位置">
|
||||
<n-select
|
||||
v-model:value="item.label.position"
|
||||
:options="[
|
||||
{ label: '顶部', value: 'top' },
|
||||
{ label: '左侧', value: 'left' },
|
||||
{ label: '右侧', value: 'right' },
|
||||
{ label: '底部', value: 'bottom' }
|
||||
]"
|
||||
/>
|
||||
</setting-item>
|
||||
</setting-item-box>
|
||||
</CollapseItem>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType, computed, toRaw } from 'vue'
|
||||
import { merge, cloneDeep } from 'lodash';
|
||||
|
||||
import GlobalSetting from '@/components/Pages/ChartItemSetting/GlobalSetting.vue'
|
||||
import CollapseItem from '@/components/Pages/ChartItemSetting/CollapseItem.vue'
|
||||
import SettingItemBox from '@/components/Pages/ChartItemSetting/SettingItemBox.vue'
|
||||
import SettingItem from '@/components/Pages/ChartItemSetting/SettingItem.vue'
|
||||
|
||||
import { lineConf } from '@/packages/chartConfiguration/echarts'
|
||||
import { GlobalThemeJsonType } from '@/settings/chartThemes'
|
||||
import { barSeriesItem, lineSeriesItem } from './config'
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
optionData: {
|
||||
type: Object as PropType<GlobalThemeJsonType>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const seriesList = computed(() => {
|
||||
return props.optionData.series
|
||||
})
|
||||
|
||||
const updateHandle = (item:any, value:string) => {
|
||||
const _label = cloneDeep(toRaw(item.label))
|
||||
lineSeriesItem.label = _label
|
||||
if (value === 'line') {
|
||||
merge(item, lineSeriesItem)
|
||||
} else {
|
||||
merge(item, barSeriesItem)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
40
src/packages/components/Charts/Bars/BarLine/data.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"dimensions": ["product", "data1", "data2"],
|
||||
"source": [
|
||||
{
|
||||
"product": "1月",
|
||||
"data1": 104,
|
||||
"data2": 30
|
||||
},
|
||||
{
|
||||
"product": "2月",
|
||||
"data1": 56,
|
||||
"data2": 56
|
||||
},
|
||||
{
|
||||
"product": "3月",
|
||||
"data1": 136,
|
||||
"data2": 36
|
||||
},
|
||||
{
|
||||
"product": "4月",
|
||||
"data1": 86,
|
||||
"data2": 6
|
||||
},
|
||||
{
|
||||
"product": "5月",
|
||||
"data1": 98,
|
||||
"data2": 10
|
||||
},
|
||||
{
|
||||
"product": "6月",
|
||||
"data1": 86,
|
||||
"data2": 70
|
||||
},
|
||||
{
|
||||
"product": "7月",
|
||||
"data1": 77,
|
||||
"data2": 57
|
||||
}
|
||||
]
|
||||
}
|
||||
16
src/packages/components/Charts/Bars/BarLine/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// 公共类型声明
|
||||
import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d'
|
||||
// 当前[信息模块]分类声明
|
||||
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||
|
||||
export const BarLineConfig: ConfigType = {
|
||||
key: 'BarLine',
|
||||
chartKey: 'VBarLine',
|
||||
conKey: 'VCBarLine',
|
||||
title: '柱状图 & 折线图',
|
||||
category: ChatCategoryEnum.BAR,
|
||||
categoryName: ChatCategoryEnumName.BAR,
|
||||
package: PackagesCategoryEnum.CHARTS,
|
||||
chartFrame: ChartFrameEnum.ECHARTS,
|
||||
image: 'bar_line.png'
|
||||
}
|
||||
96
src/packages/components/Charts/Bars/BarLine/index.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<v-chart
|
||||
ref="vChartRef"
|
||||
:init-options="initOptions"
|
||||
:theme="themeColor"
|
||||
:option="option"
|
||||
:update-options="{
|
||||
replaceMerge: replaceMergeArr
|
||||
}"
|
||||
autoresize
|
||||
></v-chart>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch, PropType, nextTick } from 'vue'
|
||||
import VChart from 'vue-echarts'
|
||||
import { isObject, cloneDeep } from 'lodash'
|
||||
import { useCanvasInitOptions } from '@/hooks/useCanvasInitOptions.hook'
|
||||
import { use } from 'echarts/core'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
//引入柱状图 折线图
|
||||
import { BarChart, LineChart } from 'echarts/charts'
|
||||
import config, { includes, barSeriesItem, lineSeriesItem } from './config'
|
||||
import { mergeTheme } from '@/packages/public/chart'
|
||||
import { useChartDataFetch } from '@/hooks'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { isPreview } from '@/utils'
|
||||
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
|
||||
|
||||
const props = defineProps({
|
||||
themeSetting: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
themeColor: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
chartConfig: {
|
||||
type: Object as PropType<config>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const initOptions = useCanvasInitOptions(props.chartConfig.option, props.themeSetting)
|
||||
|
||||
use([DatasetComponent, CanvasRenderer, BarChart, LineChart, GridComponent, TooltipComponent, LegendComponent])
|
||||
|
||||
const replaceMergeArr = ref<string[]>()
|
||||
|
||||
const option = computed(() => {
|
||||
return mergeTheme(props.chartConfig.option, props.themeSetting, includes)
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.chartConfig.option.dataset,
|
||||
(newData: any, oldData) => {
|
||||
try {
|
||||
if (!isObject(newData) || !('dimensions' in newData)) return
|
||||
if (Array.isArray((newData as any)?.dimensions)) {
|
||||
const seriesArr: typeof barSeriesItem[] = []
|
||||
// 对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 as any).dimensions.length >= 1 ? (newData as any).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(barSeriesItem))
|
||||
}
|
||||
props.chartConfig.option.series.push(...seriesArr)
|
||||
}
|
||||
replaceMergeArr.value = ['series']
|
||||
nextTick(() => {
|
||||
replaceMergeArr.value = []
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: false
|
||||
}
|
||||
)
|
||||
|
||||
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, (newData: any) => {
|
||||
props.chartConfig.option.dataset = newData
|
||||
})
|
||||
</script>
|
||||