Compare commits
692 Commits
2.2402.5-2
...
2.2410.4-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33a8ce97d3 | ||
|
|
6ee9d464fb | ||
|
|
df5072bae7 | ||
|
|
e12dce1f0f | ||
|
|
d0457fc285 | ||
|
|
63d32f0a39 | ||
|
|
cf5d08aaab | ||
|
|
7ad566d74f | ||
|
|
c312186d91 | ||
|
|
72fd372fe0 | ||
|
|
acdadcbb6f | ||
|
|
7a49de71ea | ||
|
|
56e4419e77 | ||
|
|
3abb4dd4bd | ||
|
|
726a284ab5 | ||
|
|
a45243390b | ||
|
|
1faed9bc3d | ||
|
|
9bd700eeb7 | ||
|
|
5cc3b9c8cf | ||
|
|
208895c7d5 | ||
|
|
46578ce97b | ||
|
|
0ff5bd5e20 | ||
|
|
f08e637e69 | ||
|
|
a600e056b8 | ||
|
|
671c80972e | ||
|
|
d07230b582 | ||
|
|
35c24407ac | ||
|
|
cf33756548 | ||
|
|
1ef98298bc | ||
|
|
b1c2a95ec4 | ||
|
|
147b2fad8d | ||
|
|
b629088406 | ||
|
|
430a067280 | ||
|
|
8a71e8f773 | ||
|
|
ff556ce1ec | ||
|
|
9ed7aed4b4 | ||
|
|
9e14297488 | ||
|
|
8e70706ed5 | ||
|
|
3e0529cf87 | ||
|
|
91af2bed92 | ||
|
|
1ecefb91dc | ||
|
|
72d9895902 | ||
|
|
41fa214137 | ||
|
|
1565f25a03 | ||
|
|
c5c2926d99 | ||
|
|
55456f9220 | ||
|
|
cf1686c348 | ||
|
|
f7833bcd9f | ||
|
|
5a621053a4 | ||
|
|
2a6451ef2a | ||
|
|
f1b440c8dd | ||
|
|
a67e54ca6e | ||
|
|
53d9e63c36 | ||
|
|
b4623d19e5 | ||
|
|
700bff6e38 | ||
|
|
d77c4e43d4 | ||
|
|
6e11d2b16a | ||
|
|
405842bc0b | ||
|
|
bf8d7f2124 | ||
|
|
ba98b37306 | ||
|
|
aa8ed65fd8 | ||
|
|
936a4410b3 | ||
|
|
58ec76f9e5 | ||
|
|
c1a77c8e48 | ||
|
|
477e8e4631 | ||
|
|
4f9d65a3a7 | ||
|
|
b1799d8ccb | ||
|
|
86833e7d6b | ||
|
|
59cf57898b | ||
|
|
fb9382e3a0 | ||
|
|
dae4697cd2 | ||
|
|
1b2e892f74 | ||
|
|
c66c640f75 | ||
|
|
30849416b6 | ||
|
|
5edcee8da5 | ||
|
|
311beed2a7 | ||
|
|
eb5fdfb635 | ||
|
|
78bcde9ef2 | ||
|
|
630e2a16ad | ||
|
|
e1fe031f25 | ||
|
|
855ba7dc9e | ||
|
|
3a72e73d5d | ||
|
|
4cb13a1419 | ||
|
|
8dd84a5255 | ||
|
|
c0e62f48b7 | ||
|
|
b992225e28 | ||
|
|
2f04562a34 | ||
|
|
d3a452cfd8 | ||
|
|
d81b8cdf38 | ||
|
|
39a417368a | ||
|
|
adfce5d2f7 | ||
|
|
977286d6b3 | ||
|
|
c33000045a | ||
|
|
b995ac378a | ||
|
|
6bea64f345 | ||
|
|
94886e255e | ||
|
|
45f66afe52 | ||
|
|
b9105c1e77 | ||
|
|
909d306942 | ||
|
|
f7273457e9 | ||
|
|
2e5ad2f65d | ||
|
|
776e9c5837 | ||
|
|
0d4979d3d9 | ||
|
|
686c7dd273 | ||
|
|
d41b308c6d | ||
|
|
84dac247d2 | ||
|
|
f8439bb40a | ||
|
|
d268d920e7 | ||
|
|
f730ef1e3a | ||
|
|
af1ce32063 | ||
|
|
678ff2d09d | ||
|
|
48f674b6ef | ||
|
|
02f0820a69 | ||
|
|
ca8605fd6e | ||
|
|
6d5e96421b | ||
|
|
bcc29007bf | ||
|
|
bdf904078d | ||
|
|
e37cfa5066 | ||
|
|
f1bff23bbc | ||
|
|
53106ddb5c | ||
|
|
3a04882fe5 | ||
|
|
19202a5e81 | ||
|
|
7b311ff673 | ||
|
|
9dba98e0ee | ||
|
|
71338670f0 | ||
|
|
7dcdfabce2 | ||
|
|
ddfe1723c9 | ||
|
|
57b5f76db7 | ||
|
|
9ac3524877 | ||
|
|
ca82a0a74b | ||
|
|
23007c3bf2 | ||
|
|
5d69d7612a | ||
|
|
ddd8930af4 | ||
|
|
757f2ec20a | ||
|
|
30caa79424 | ||
|
|
e3f83a0b98 | ||
|
|
147a3ed77b | ||
|
|
5d35d950b3 | ||
|
|
6874508d3f | ||
|
|
33f468209a | ||
|
|
e8ef2816df | ||
|
|
e38d7bbffa | ||
|
|
2f1265c47a | ||
|
|
66b6b60505 | ||
|
|
249d14320d | ||
|
|
313b90ad31 | ||
|
|
2ebc90e974 | ||
|
|
640257dd55 | ||
|
|
c1a3ce8068 | ||
|
|
0080e9c26e | ||
|
|
2ccafe622d | ||
|
|
d7a515ed9a | ||
| cd82b71b77 | |||
|
|
9d6a7dcd9c | ||
|
|
46c2affcc8 | ||
|
|
3d00a80588 | ||
|
|
a3c1fe154f | ||
|
|
07dce5a27e | ||
|
|
255cf026a6 | ||
|
|
840ea56c42 | ||
|
|
09917cc9c9 | ||
|
|
4c9fe192f2 | ||
|
|
32ec55d44e | ||
|
|
527cf89d1a | ||
|
|
ac7b57c0ae | ||
|
|
8be1a8968e | ||
|
|
999ccf64ad | ||
|
|
03352f3aa8 | ||
|
|
61a58fc661 | ||
|
|
4268fa3198 | ||
|
|
f6b62c6c7e | ||
|
|
b4cbc1c190 | ||
|
|
1871f6f656 | ||
|
|
409f9836a6 | ||
|
|
b3f40ee683 | ||
|
|
aa07b51663 | ||
|
|
19b77ed005 | ||
|
|
06503fd079 | ||
|
|
2321dacd2a | ||
|
|
a8b4e91b95 | ||
|
|
a5075bef43 | ||
|
|
f4ffbc1c86 | ||
|
|
6cafa284c7 | ||
|
|
049c0e7a0f | ||
|
|
377ffc6e10 | ||
|
|
858431e86e | ||
|
|
70fca5ca41 | ||
|
|
e972d14a9a | ||
|
|
c1187383b6 | ||
|
|
8d8605e0cd | ||
|
|
8af48936e5 | ||
|
|
e21a8dc898 | ||
|
|
3c1ee63359 | ||
|
|
bc3940016a | ||
|
|
6ab4fbea6f | ||
|
|
c73fcbd91c | ||
|
|
023e317b0d | ||
|
|
543a2b7434 | ||
|
|
4ae9051411 | ||
|
|
532546c3f5 | ||
|
|
ab0d26513c | ||
|
|
8e9498ec83 | ||
|
|
ca048f223c | ||
|
|
e9ff6493dd | ||
|
|
396fb0b124 | ||
|
|
3a854be8fe | ||
|
|
c1f34f56ac | ||
|
|
b80bae0126 | ||
|
|
6c383b58c8 | ||
|
|
06db1344c3 | ||
|
|
fac47279b5 | ||
|
|
a36a12f783 | ||
|
|
acd19ebdbd | ||
|
|
d53c4c34f0 | ||
|
|
2d9011cf6b | ||
|
|
fcf53d0995 | ||
|
|
a2d93ddafe | ||
|
|
79920542c1 | ||
|
|
6efd9cb61a | ||
|
|
4dc6699974 | ||
|
|
3bdae264e1 | ||
|
|
9e0a99d160 | ||
|
|
5ac0ca41eb | ||
|
|
a7de701d4d | ||
|
|
f0561242ca | ||
|
|
6102972373 | ||
|
|
d095531952 | ||
|
|
d49dc9ebfd | ||
|
|
43a99e9328 | ||
|
|
d333221620 | ||
|
|
481734cfe1 | ||
|
|
1fa8601675 | ||
|
|
c1aabdbe42 | ||
|
|
953a36f142 | ||
|
|
c5f62e8d76 | ||
|
|
946139facb | ||
|
|
95931b2b6e | ||
|
|
e31c85835d | ||
|
|
847bae4c77 | ||
|
|
e69f43a0c2 | ||
|
|
d96e1ad259 | ||
|
|
3829d339e7 | ||
|
|
cd4073bec3 | ||
|
|
e67126c57a | ||
|
|
2f651b5d1f | ||
|
|
525854604f | ||
|
|
d42a8701da | ||
|
|
2b680d6d20 | ||
|
|
de79760a0e | ||
|
|
a5b5269b91 | ||
|
|
8a2d0ccfa1 | ||
|
|
650b02dc30 | ||
|
|
b42d8cb370 | ||
|
|
a213be0d64 | ||
|
|
2a2b441e09 | ||
|
|
84bdb44286 | ||
|
|
06b6175a76 | ||
|
|
11b790e140 | ||
|
|
296a9ba02b | ||
|
|
1801a46396 | ||
|
|
f6644a0d97 | ||
|
|
57f575aa84 | ||
|
|
68cbbe7133 | ||
|
|
c11d814312 | ||
|
|
e1548d2c98 | ||
|
|
1ec374eb26 | ||
|
|
0955a79965 | ||
|
|
374a9bde7e | ||
|
|
639a4f0b1f | ||
|
|
d1b9d7b9ba | ||
|
|
3298203f60 | ||
|
|
8f3cce52c0 | ||
|
|
ce06a88e89 | ||
|
|
749a04972d | ||
|
|
a311f0a09b | ||
|
|
c74d311537 | ||
|
|
1492f18791 | ||
|
|
cbc81643a5 | ||
|
|
c18b557c97 | ||
|
|
b6bd9bc3d5 | ||
|
|
199607e322 | ||
|
|
ee10119d77 | ||
|
|
1b1a56e49b | ||
|
|
afdc188e17 | ||
|
|
5de7d0a73f | ||
|
|
8f73d80a42 | ||
|
|
5a85f245b0 | ||
|
|
ff600c49f6 | ||
|
|
4c7e99fdd7 | ||
|
|
a6037a9737 | ||
|
|
1d55c092b1 | ||
|
|
8bdfd7ea28 | ||
|
|
39ad75fbd3 | ||
|
|
7ef775209d | ||
|
|
a8e0f36562 | ||
|
|
be50fc9c5c | ||
|
|
375f236e32 | ||
|
|
c9eb0240d8 | ||
|
|
b67d591d0a | ||
|
|
7275a87fba | ||
|
|
c103222b65 | ||
|
|
5133d09ec2 | ||
|
|
d88cec34df | ||
|
|
eadd4709ee | ||
|
|
04cbdc6b11 | ||
|
|
233496e184 | ||
|
|
919f8ef2a5 | ||
|
|
8f8d056f45 | ||
|
|
8fcd7974e4 | ||
|
|
cb7fc418a5 | ||
|
|
e6d4a898a8 | ||
|
|
be4fc896d7 | ||
|
|
e5a5ef6f96 | ||
|
|
530662bf5d | ||
|
|
2e7514d3ca | ||
|
|
1db61a5d4e | ||
|
|
618499e777 | ||
|
|
71c0306587 | ||
|
|
a3cd8f05fb | ||
|
|
d8ca0ca5ef | ||
|
|
da08e1cc5b | ||
|
|
8e4c5d0b90 | ||
|
|
467c93f710 | ||
|
|
22ced8bdb2 | ||
|
|
2ee26a6958 | ||
|
|
c63e892544 | ||
|
|
cce3088f73 | ||
|
|
2211896768 | ||
|
|
5bb3cd814c | ||
|
|
266d816a21 | ||
|
|
90c64c029a | ||
|
|
d06e2da72e | ||
|
|
7714d506c4 | ||
|
|
0b7a198235 | ||
|
|
68362ba3e3 | ||
|
|
a9633e652f | ||
|
|
6592561bca | ||
|
|
09e0353053 | ||
|
|
c1e95fd1e9 | ||
|
|
89857e0c1b | ||
|
|
7aa37ee330 | ||
|
|
4c16888184 | ||
|
|
a61716d40d | ||
|
|
3f02cb628b | ||
|
|
22805924fb | ||
|
|
e00229e5ff | ||
|
|
939a235a87 | ||
|
|
cd49162dfc | ||
|
|
b7f2df5d1c | ||
|
|
8b24bc55b9 | ||
|
|
9f2b80718e | ||
|
|
38cb406687 | ||
|
|
c25fe63a26 | ||
|
|
b84d6bb9fc | ||
|
|
b325cde5c0 | ||
|
|
34266da44e | ||
|
|
d82d6b7b47 | ||
|
|
b1c7a068cf | ||
|
|
c155160cf7 | ||
|
|
2ae4559958 | ||
|
|
782283bba6 | ||
|
|
1b50708786 | ||
|
|
206d3755a0 | ||
|
|
6470effbda | ||
|
|
f94b1ef44a | ||
|
|
7c78eab431 | ||
|
|
814b7b0058 | ||
|
|
624f67ecca | ||
|
|
c1a9497b77 | ||
|
|
1ad2ed2d26 | ||
|
|
48f278997f | ||
|
|
9b9d6222e1 | ||
|
|
2e8a878365 | ||
|
|
bc59dc67e6 | ||
|
|
df6022b4a8 | ||
|
|
f2c67d087b | ||
|
|
7a0298a419 | ||
|
|
b40e798090 | ||
|
|
d48d5d6c95 | ||
|
|
69f3347a4d | ||
|
|
85ae7dc5ea | ||
|
|
531cd6d03d | ||
|
|
9fd8c4597a | ||
|
|
7060a3d887 | ||
|
|
c12ffa583c | ||
|
|
05aabb8c61 | ||
|
|
6b461ead7c | ||
|
|
7c54e372e5 | ||
|
|
5be95a7af6 | ||
|
|
08515541b4 | ||
|
|
3948924f61 | ||
|
|
ce1944881a | ||
|
|
f6122c0758 | ||
|
|
3d3f4c2cc6 | ||
|
|
e8e5b92a57 | ||
|
|
4ad704398d | ||
|
|
26289b7787 | ||
|
|
7ad8c1706e | ||
|
|
424a596613 | ||
|
|
6d5b9f417c | ||
|
|
7278e24dce | ||
|
|
76839ae18a | ||
|
|
c8a6aa3210 | ||
|
|
9b4bbcedc5 | ||
|
|
3b793c107c | ||
|
|
a076e6d079 | ||
|
|
fb2a7c51f9 | ||
|
|
1e2c2b5170 | ||
|
|
56833b654e | ||
|
|
f50e02e6e7 | ||
|
|
52cc24813f | ||
|
|
c8a0d4c3f7 | ||
|
|
7560f21f11 | ||
|
|
8a5f80fe47 | ||
|
|
29eb1f08b1 | ||
|
|
9981de2271 | ||
|
|
207acb3f3d | ||
|
|
873a76f48f | ||
|
|
4ca700092a | ||
|
|
ad9f8574bd | ||
|
|
75faae6d7c | ||
|
|
c88c146a5e | ||
|
|
c65cda1468 | ||
|
|
d8059341fe | ||
|
|
ad86bee5f9 | ||
|
|
f44cc44a1b | ||
|
|
ad93588796 | ||
|
|
b5f6a5d24a | ||
|
|
fa4be253f7 | ||
|
|
2db0220c98 | ||
|
|
05fd678ce2 | ||
|
|
165b28bab1 | ||
|
|
dc67cdc262 | ||
|
|
c97394a0ed | ||
|
|
6b9297d30e | ||
|
|
ace7f26b53 | ||
|
|
976f72f79a | ||
|
|
530e7fd43f | ||
|
|
b76fed7dcf | ||
|
|
60a26dd015 | ||
|
|
7bdfc257c1 | ||
|
|
e3395b47cf | ||
|
|
4c9b4de12f | ||
|
|
1cfe5e2777 | ||
|
|
0cae26a1ee | ||
|
|
ed4d556384 | ||
|
|
6d9d7362a4 | ||
|
|
5a40733f20 | ||
|
|
45ee884529 | ||
|
|
7de3f7f05d | ||
|
|
97bb4db1eb | ||
|
|
fc6dfe9894 | ||
|
|
607660124a | ||
|
|
c50b3add95 | ||
|
|
2f7f0e9e20 | ||
|
|
6875ffd113 | ||
|
|
44844bfa7f | ||
|
|
21ab066761 | ||
|
|
83bdf289fa | ||
|
|
d7aa0fc91a | ||
|
|
a6be5190ec | ||
|
|
03cd06e835 | ||
|
|
2d7fe5a73b | ||
|
|
dd5604c8b7 | ||
|
|
7bf2672981 | ||
|
|
6e616c63f0 | ||
|
|
3ded481cce | ||
|
|
1baff582d8 | ||
|
|
957868cc27 | ||
|
|
efb98ac577 | ||
|
|
ff228daae7 | ||
|
|
c93e693517 | ||
|
|
55863c1c58 | ||
|
|
8a2d6c91ba | ||
|
|
86a939f206 | ||
|
|
2b86f724b1 | ||
|
|
68fbc45b7c | ||
|
|
4629ef28ff | ||
|
|
e3a11b0ede | ||
|
|
3df9ee4f3a | ||
|
|
e64d558c27 | ||
|
|
5a2aa383fe | ||
|
|
fe9f458465 | ||
|
|
8e2e9aec67 | ||
|
|
ad48e8e2e1 | ||
|
|
6f8b1000ba | ||
|
|
f5549992c2 | ||
|
|
19771ea6dc | ||
|
|
5965737384 | ||
|
|
b3cb40fd8c | ||
|
|
0ab5141369 | ||
|
|
a23284da4c | ||
|
|
1c8cc13436 | ||
|
|
e6a439faea | ||
|
|
f8b1b1f6c3 | ||
|
|
3844e07258 | ||
|
|
1fab9b3d97 | ||
|
|
1bfacbf2e0 | ||
|
|
c01f9f3830 | ||
|
|
28f9d365fd | ||
|
|
1085fa16aa | ||
|
|
e351960229 | ||
|
|
03caa354da | ||
|
|
34754ea0b6 | ||
|
|
86e1f07f08 | ||
|
|
2add7547d6 | ||
|
|
ecb89e9f26 | ||
|
|
7a9b38dc66 | ||
|
|
979b18092d | ||
|
|
ba43a647dd | ||
|
|
3be14590c6 | ||
|
|
857f8c4313 | ||
|
|
c9c39d2d4a | ||
|
|
845084f77f | ||
|
|
becba4919e | ||
|
|
b797055df9 | ||
|
|
8101c852c8 | ||
|
|
9bbeb9fc9a | ||
|
|
19a9bd3f5c | ||
|
|
399bddc635 | ||
|
|
5a67a1a51c | ||
|
|
9a168d2ba0 | ||
|
|
e42a620aed | ||
|
|
eb902594b8 | ||
|
|
817fd97496 | ||
|
|
96aab47003 | ||
|
|
432666b1ab | ||
|
|
662583c73b | ||
|
|
f73c21e6e6 | ||
|
|
17e72f1db1 | ||
|
|
55d4a36efb | ||
|
|
d3794ba904 | ||
|
|
832f18e2ee | ||
|
|
cd2e282624 | ||
|
|
3db88f1d3a | ||
|
|
f291bb0907 | ||
|
|
69c32b2593 | ||
|
|
1a2939ab01 | ||
|
|
8bf4a2a9ce | ||
|
|
efd389f98a | ||
|
|
f1125cc042 | ||
|
|
f1a0e200dc | ||
|
|
70c025f0f5 | ||
|
|
b9f0a3923d | ||
|
|
5c942c9ef7 | ||
|
|
4294fe82c5 | ||
|
|
4e7fb90544 | ||
|
|
f050e500e9 | ||
|
|
6bc10babba | ||
|
|
4d36f9952a | ||
|
|
b03f4bb1d6 | ||
|
|
4aaedf0f77 | ||
|
|
c1ea851705 | ||
|
|
47103249ef | ||
|
|
2642f18204 | ||
|
|
e2e22eabf5 | ||
|
|
325ecc8029 | ||
|
|
dc6f4560d5 | ||
|
|
3970797d5b | ||
|
|
73776ed0f9 | ||
|
|
aca842f8c2 | ||
|
|
612fb77861 | ||
|
|
6ba695ceaf | ||
|
|
070f77d3b8 | ||
|
|
15de63212f | ||
|
|
2202540763 | ||
|
|
c674b9b3f9 | ||
|
|
43d30e7bfa | ||
|
|
cd0633d519 | ||
|
|
b8bff2a159 | ||
|
|
638f890228 | ||
|
|
4460f7201c | ||
|
|
d0bbfafedc | ||
|
|
16dc1c2e20 | ||
|
|
73ed5f5285 | ||
|
|
50cb92a95b | ||
|
|
3888fd2bca | ||
|
|
4194d8cca6 | ||
|
|
ac84a0ca0a | ||
|
|
e6faa59f32 | ||
|
|
65fab4de1b | ||
| b044f01b1d | |||
|
|
f4ed68fc44 | ||
|
|
4de98923b7 | ||
|
|
1e0e3a89cf | ||
|
|
edabd9a104 | ||
|
|
c11893566a | ||
|
|
c88bef959a | ||
|
|
ffd1b02bf9 | ||
|
|
075ad76d19 | ||
|
|
fbbd0496de | ||
|
|
00e8b7acbb | ||
|
|
3d40e0856e | ||
|
|
32d7897818 | ||
|
|
fa14f50e2d | ||
|
|
4eff5d48cd | ||
|
|
5380c4fb3f | ||
|
|
e10a82ff35 | ||
|
|
f85535672e | ||
|
|
3c1c0620d1 | ||
|
|
9531230fc0 | ||
|
|
151175fb3f | ||
|
|
9faf02a1a6 | ||
|
|
c2e95f607b | ||
|
|
3a50300bf9 | ||
|
|
188a108d87 | ||
|
|
11e788cb8f | ||
|
|
74195bc88b | ||
|
|
2a622aa1d6 | ||
|
|
d15b75e8fd | ||
|
|
4ae5f64da3 | ||
|
|
16ab366136 | ||
|
|
85abd7bca4 | ||
|
|
cd66ff927d | ||
|
|
d242a87191 | ||
|
|
e1eaba0d68 | ||
|
|
5a7c161ed2 | ||
|
|
a0a4e65d5e | ||
|
|
a6751424a5 | ||
|
|
8abaff86e5 | ||
|
|
e7442bf750 | ||
|
|
dce068fcb1 | ||
| 249d89af88 | |||
|
|
0f3a689b04 | ||
|
|
569eea08cb | ||
|
|
3cb80bbd85 | ||
|
|
e0d590724b | ||
|
|
2cfab00e8f | ||
|
|
06170ba38f | ||
|
|
7e28df210d | ||
|
|
a69e8c89f8 | ||
|
|
f5544c66bd | ||
|
|
7339f45193 | ||
|
|
739025935a | ||
|
|
eaa0e2d70c | ||
|
|
2bffdaef3a | ||
|
|
79809b56e9 | ||
|
|
e5896c8513 | ||
|
|
104041eea5 | ||
|
|
0b576ed446 | ||
|
|
c1174fc273 | ||
|
|
90e1cd022b | ||
|
|
001e5e887b | ||
|
|
8230dbf257 | ||
|
|
49fa7bdec8 | ||
|
|
bd13b70a88 | ||
|
|
9b5b43c2bf | ||
|
|
dee4733ad0 | ||
|
|
c07c1dfde3 | ||
|
|
181da5836b | ||
|
|
7a787db45d | ||
|
|
49c98697e1 | ||
|
|
7dedbb927c | ||
|
|
c2cc81fccf | ||
|
|
92b2a4fb37 | ||
|
|
b7d02ff669 | ||
|
|
b4179b4c60 | ||
|
|
d7e08a1fff | ||
|
|
d52fdc115c | ||
|
|
e86ae12801 | ||
|
|
87b2fd965c | ||
|
|
8397847e66 | ||
|
|
84b0575ab4 | ||
|
|
f19e5e48f3 | ||
|
|
073f17b61f | ||
|
|
4cdfe6097d | ||
|
|
d55a4e3da7 | ||
|
|
dd6c38c57e | ||
|
|
f705ba3a2e | ||
|
|
8721aa3a49 | ||
|
|
d2507e4706 | ||
| 0937efc6e6 | |||
| 57445cd48f | |||
| a193655353 | |||
|
|
10b150f13c | ||
|
|
c9fdd1785a | ||
|
|
a821d49eed | ||
|
|
28122bbfae | ||
|
|
3b4b085499 | ||
|
|
51b3388cdc | ||
|
|
908d9341db | ||
|
|
82a2ab158f | ||
|
|
ce893f32e0 | ||
|
|
65696dee09 | ||
|
|
625b39d901 | ||
|
|
4c20e639d8 | ||
|
|
f28dfeb9b4 | ||
|
|
a75c89c451 | ||
|
|
883816c540 | ||
|
|
24ba825365 | ||
|
|
accb02963c | ||
|
|
abe5595fa7 |
@@ -5,13 +5,13 @@ VITE_HISTORY_HASH = false
|
||||
VITE_HISTORY_BASE_URL = "/"
|
||||
|
||||
# 应用名称
|
||||
VITE_APP_NAME = "Core Network EMS"
|
||||
VITE_APP_NAME = "Core Network OMC"
|
||||
|
||||
# 应用标识
|
||||
VITE_APP_CODE = "CN EMS"
|
||||
VITE_APP_CODE = "OMC"
|
||||
|
||||
# 应用版本
|
||||
VITE_APP_VERSION = "2.2402.5"
|
||||
VITE_APP_VERSION = "2.241102"
|
||||
|
||||
# 接口基础URL地址-不带/后缀
|
||||
VITE_API_BASE_URL = "/omc-api"
|
||||
|
||||
@@ -5,13 +5,13 @@ VITE_HISTORY_HASH = true
|
||||
VITE_HISTORY_BASE_URL = "/"
|
||||
|
||||
# 应用名称
|
||||
VITE_APP_NAME = "Core Network EMS"
|
||||
VITE_APP_NAME = "Core Network OMC"
|
||||
|
||||
# 应用标识
|
||||
VITE_APP_CODE = "CN EMS"
|
||||
VITE_APP_CODE = "OMC"
|
||||
|
||||
# 应用版本
|
||||
VITE_APP_VERSION = "2.240205.5"
|
||||
VITE_APP_VERSION = "2.241102"
|
||||
|
||||
# 接口基础URL地址-不带/后缀
|
||||
VITE_API_BASE_URL = "/omc-api"
|
||||
|
||||
61
CHANGELOG.md
61
CHANGELOG.md
@@ -1,5 +1,52 @@
|
||||
# 版本发布日志
|
||||
|
||||
## 2.2404.1-20240402
|
||||
|
||||
- 新增 网元安装流程相关页面与操作相关接口联调
|
||||
- 新增 终端远程连接组件添加消息监听和发送句柄
|
||||
- 优化 移除vue-codemirror库改为codemirror,编辑输入支持 yaml语法
|
||||
- 优化 终端-基站信息Radio Name列宽调整
|
||||
- 更新 依赖版本
|
||||
|
||||
## 2.2403.1-20240319
|
||||
|
||||
- 新增 ws 工具连接状态函数
|
||||
- 新增 终端主机配置页面
|
||||
- 新增 终端主机命令页面
|
||||
- 新增 网元信息关联主机页面,表格支持勾选删除记录并展开看网元资源 sn
|
||||
- 新增 数据级缓存工具,支持表格字段排序状态缓存记录,表格字段排序支持缓存变更状态
|
||||
- 新增 网元主机操作翻译提示,网元主机操作 Hooks 包
|
||||
- 新增 IMS-CDR 和 AMF-UE 页面,以及翻译
|
||||
- 新增 网元快速安装页面,网元安装步骤页面模块
|
||||
- 新增 MML 网元操作 UPF 支持区分 telnet 发送端
|
||||
- 新增 网元快速安装步骤选择安装包界面
|
||||
- 新增 网元版本接口/网元软件包接口
|
||||
- 新增 自定义指标界面
|
||||
- 修复 帮助文档中英标题翻译文件名称指定《5G 核心网网管操作手册.pdf》
|
||||
- 修复 ws 函数发送消息判断是否连接正常
|
||||
- 修复 网元管理表单主键 id 重置失效导致新增操作为更新操作
|
||||
- 修复 网元选择列表不进行可操作使用网元状态过滤
|
||||
- 修复 移除获取网元列表,取消 status 状态过滤
|
||||
- 修复 缓存信息页面标题翻译,图表 Echart 语言数据设置
|
||||
- 修复 性能门限提交失败异常
|
||||
- 修复 提交异常并去除对 smdata 的校验
|
||||
- 优化 全局缓存网元列表,接口改换查询网元列表全部无分页
|
||||
- 优化 网元默认可选常量值,删除无效变量声明
|
||||
- 优化 UE-PCF 页面提示信息、网元信息页面样式、网元主机表单校验和提示翻译
|
||||
- 优化 拖动框地脚 null 类型异常,不支持 footer 插槽
|
||||
- 优化 切片文件上传文件名去除非法字符和空格,开发服务端口改为 33020
|
||||
- 更新 包依赖版本
|
||||
|
||||
## 2.2402.6-20240222
|
||||
|
||||
- 修复 UDM 用户数据超时时间 180s
|
||||
- 修复 UDM 鉴权 ki 和 opc 显示禁用输入
|
||||
- 新增 MML 命令输入框 shift+回车进行换行,回车直接发送
|
||||
- 修复 文档查看下载文件名称?显示问题
|
||||
- 修复 看板栏目添加跳转事件
|
||||
- 修复 看板用户行为字典数据翻译
|
||||
- 优化 看板用户行为 CDR 短信号码显示区间样式
|
||||
|
||||
## 2.2402.5-20240205
|
||||
|
||||
- 修复 拓扑架构图调整缺失的节点非网元元素,看板拓扑非网元点击排除
|
||||
@@ -17,14 +64,14 @@
|
||||
- 优化 配置参数编辑页面记录类型多语言是否系统内置
|
||||
- 优化 看板用户行为小屏幕换行显示字内容,格子高度百分比充满
|
||||
- 优化 看板推送用户行为插入又弹出减少渲染数量
|
||||
- 修复 看班告警统计判断修复,超时30秒,图渲染逻辑优化
|
||||
- 修复 参数配置DNN List参数显示null问题
|
||||
- 优化 ws消息队列延迟处理
|
||||
- 新增 看板用户事件CDR短信类型,短信结果200显示成功
|
||||
- 优化 看板告警统计0数字不显示
|
||||
- 优化 看板用户事件CDR指定类型MOC/MTSM
|
||||
- 修复 看班告警统计判断修复,超时 30 秒,图渲染逻辑优化
|
||||
- 修复 参数配置 DNN List 参数显示 null 问题
|
||||
- 优化 ws 消息队列延迟处理
|
||||
- 新增 看板用户事件 CDR 短信类型,短信结果 200 显示成功
|
||||
- 优化 看板告警统计 0 数字不显示
|
||||
- 优化 看板用户事件 CDR 指定类型 MOC/MTSM
|
||||
- 新增 黄金指标项图表显示全部开关控制
|
||||
- 新增 黄金指标项随机颜色,图表实时5s动态显示
|
||||
- 新增 黄金指标项随机颜色,图表实时 5s 动态显示
|
||||
|
||||
## 2.2401.4-20240130
|
||||
|
||||
|
||||
29
README.md
29
README.md
@@ -2,21 +2,14 @@
|
||||
|
||||
## 简介
|
||||
|
||||
- 系统布局使用 [@ant-design-vue/pro-layout](https://github.com/vueComponent/pro-components)
|
||||
- 图标来源 [@ant-design/icons-vue](https://ant.design/components/icon)
|
||||
- 菜单图标使用自定义 iconfont `font_8d5l8fzk5b87iudi.js`图标文件
|
||||
|
||||
## 测试环境
|
||||
|
||||
```text
|
||||
Jenkins: http://192.168.2.166:3185/
|
||||
Nginx: http://192.168.2.166:3188/#/index
|
||||
后端暴露端口: http://192.168.2.166:3186 \ http://192.168.2.166:3187
|
||||
|
||||
|
||||
新网管:192.168.5.13
|
||||
旧网管:192.168.5.14
|
||||
登录账户:manager/manager
|
||||
后端暴露端口: http://192.168.2.166:33030
|
||||
```
|
||||
|
||||
## 程序命令
|
||||
@@ -60,23 +53,5 @@ export NODE_OPTIONS=--max-old-space-size=50000
|
||||
|
||||
```text
|
||||
https://192.168.5.23/
|
||||
admin
|
||||
admin
|
||||
```
|
||||
|
||||
## k8s
|
||||
|
||||
master 192.168.5.27 agtuser/admin123
|
||||
|
||||
https://192.168.5.27:31325/#/workloads?namespace=default
|
||||
|
||||
```text
|
||||
eyJhbGciOiJSUzI1NiIsImtpZCI6ImZFVUhIb1puLW04M1dfSUYyRU8zWlZueXBpNUh4T0hTRVlzU19jNlVGQ0kifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJhZG1pbi11c2VyLXRva2VuLW44ZzRtIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImFkbWluLXVzZXIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiI2M2NmYjAyNS01ZmQ0LTQ0ZTgtOTdiNC0yYWRiYWIxNzc5M2MiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZXJuZXRlcy1kYXNoYm9hcmQ6YWRtaW4tdXNlciJ9.R3GRygFOjngTj-mEMBAHDeBxm3lpsXZYvC6cdTxByONtLrcMXDebwNVeKtAZ1V9qh2OrjD8n9CIygjULGPdfV6S520vjMh7Oa2q68nOyW49DNWQyYD8xLo-dQ6sX07fI7X_I3H35YUWW80jJAXjJawqIGXBSMG5intlo4tLTUSXmjCfhoQvFsgeRWu0j76pDvhMAvLPcgEXfTCi9tyL3yqJBIKONcKwmMlJeaKSR3pQk3KiibqrBO0MZclRozpke6J0ulfzTemwDDyCqBZmLsRPZ2yDd5hVBIJ9bHEcK0a25NmSFFzmd8XWQPZwg3Y4IbbY-8UhByGq0p9xS-7pGCQ
|
||||
```
|
||||
|
||||
```ssh
|
||||
# https://blog.csdn.net/m0_54706625/article/details/129721121
|
||||
sudo chmod 700 -/.ssh/
|
||||
sudo chmod 700 /home/mask/.ssh #这个尤其容易忽视掉,我就是从这个坑里爬出来。有木有很高兴呀!
|
||||
sudo chmod 600 ~/.ssh/authorized_keys
|
||||
admin / admin
|
||||
```
|
||||
|
||||
48
package.json
48
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ems_frontend_vue3",
|
||||
"type": "module",
|
||||
"description": "核心网管理平台",
|
||||
"description": "Core Network EMS",
|
||||
"author": "TsMask",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
@@ -14,40 +14,48 @@
|
||||
"dependencies": {
|
||||
"@ant-design/icons-vue": "^7.0.1",
|
||||
"@antv/g6": "~4.8.24",
|
||||
"@codemirror/lang-javascript": "^6.2.1",
|
||||
"@codemirror/merge": "^6.5.0",
|
||||
"@codemirror/lang-javascript": "^6.2.2",
|
||||
"@codemirror/lang-yaml": "^6.1.1",
|
||||
"@codemirror/merge": "^6.6.3",
|
||||
"@codemirror/theme-one-dark": "^6.1.2",
|
||||
"@tato30/vue-pdf": "^1.9.3",
|
||||
"@vueuse/core": "^10.7.0",
|
||||
"@tato30/vue-pdf": "^1.10.0",
|
||||
"@vueuse/core": "~10.10.1",
|
||||
"@xterm/addon-fit": "^0.10.0",
|
||||
"@xterm/xterm": "^5.5.0",
|
||||
"ant-design-vue": "^3.2.20",
|
||||
"antdv-pro-layout": "^3.2.6",
|
||||
"antdv-pro-layout": "~3.3.5",
|
||||
"antdv-pro-modal": "^3.1.0",
|
||||
"codemirror": "^6.0.1",
|
||||
"dayjs": "^1.11.10",
|
||||
"echarts": "~5.4.2",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dayjs": "^1.11.11",
|
||||
"echarts": "~5.5.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"js-base64": "^3.7.5",
|
||||
"grid-layout-plus": "^1.0.5",
|
||||
"intl-tel-input": "^23.8.1",
|
||||
"js-base64": "^3.7.7",
|
||||
"js-cookie": "^3.0.5",
|
||||
"localforage": "^1.10.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"p-queue": "^8.0.1",
|
||||
"p-queue": "~8.0.1",
|
||||
"pinia": "^2.1.7",
|
||||
"vue": "~3.3.13",
|
||||
"vue-codemirror": "^6.1.1",
|
||||
"vue-i18n": "~9.9.0",
|
||||
"vue-router": "^4.2.5",
|
||||
"vue-i18n": "^9.13.1",
|
||||
"vue-router": "^4.4.0",
|
||||
"vue3-smooth-dnd": "^0.0.6",
|
||||
"xlsx": "^0.18.5"
|
||||
"xlsx": "~0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/file-saver": "^2.0.7",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@vitejs/plugin-vue": "^5.0.2",
|
||||
"@vitejs/plugin-vue": "^5.0.5",
|
||||
"less": "^4.2.0",
|
||||
"typescript": "^5.3.3",
|
||||
"unplugin-vue-components": "^0.26.0",
|
||||
"vite": "^5.0.10",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vue-tsc": "^1.8.27"
|
||||
"typescript": "~5.4.5",
|
||||
"unplugin-vue-components": "~0.26.0",
|
||||
"vite": "~5.3.1",
|
||||
"vite-plugin-compression": "~0.5.1",
|
||||
"vue-tsc": "~2.0.22"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
*/
|
||||
(function () {
|
||||
// host = ip:port
|
||||
const host = '192.168.8.100:3030';
|
||||
|
||||
// const host = '192.168.8.100:33030';
|
||||
const host = `${window.location.hostname}:33030`;
|
||||
|
||||
// Service Address
|
||||
sessionStorage.setItem('baseUrl', `http://${host}`);
|
||||
// websocket Address
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
}
|
||||
</style>`;
|
||||
|
||||
const lang = localStorage.getItem('cache:local:i18n');
|
||||
const lang = localStorage.getItem('cache:local:i18n') || 'en_US';
|
||||
// 根据浏览器选择语言
|
||||
// if (!lang) {
|
||||
// let preferredLanguage = navigator.language;
|
||||
|
||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
BIN
public/wiregasm/test_ethernet.pcap
Normal file
BIN
public/wiregasm/test_ethernet.pcap
Normal file
Binary file not shown.
178925
public/wiregasm/wiregasm.data
Normal file
178925
public/wiregasm/wiregasm.data
Normal file
File diff suppressed because it is too large
Load Diff
BIN
public/wiregasm/wiregasm.wasm
Normal file
BIN
public/wiregasm/wiregasm.wasm
Normal file
Binary file not shown.
9768
public/wiregasm/wiregasm_load.js
Normal file
9768
public/wiregasm/wiregasm_load.js
Normal file
File diff suppressed because one or more lines are too long
166
public/wiregasm/wiregasm_new.js
Normal file
166
public/wiregasm/wiregasm_new.js
Normal file
@@ -0,0 +1,166 @@
|
||||
/**
|
||||
* Wraps the WiregasmLib lib functionality and manages a single DissectSession
|
||||
*/
|
||||
class Wiregasm {
|
||||
constructor() {
|
||||
this.initialized = false;
|
||||
this.session = null;
|
||||
}
|
||||
/**
|
||||
* Initialize the wrapper and the Wiregasm module
|
||||
*
|
||||
* @param loader Loader function for the Emscripten module
|
||||
* @param overrides Overrides
|
||||
*/
|
||||
async init(loader, overrides = {}, beforeInit = null) {
|
||||
if (this.initialized) {
|
||||
return;
|
||||
}
|
||||
this.lib = await loader(overrides);
|
||||
this.uploadDir = this.lib.getUploadDirectory();
|
||||
this.pluginsDir = this.lib.getPluginsDirectory();
|
||||
if (beforeInit !== null) {
|
||||
await beforeInit(this.lib);
|
||||
}
|
||||
this.lib.init();
|
||||
this.initialized = true;
|
||||
}
|
||||
list_modules() {
|
||||
return this.lib.listModules();
|
||||
}
|
||||
list_prefs(module) {
|
||||
return this.lib.listPreferences(module);
|
||||
}
|
||||
apply_prefs() {
|
||||
this.lib.applyPreferences();
|
||||
}
|
||||
set_pref(module, key, value) {
|
||||
const ret = this.lib.setPref(module, key, value);
|
||||
if (ret.code != PrefSetResult.PREFS_SET_OK) {
|
||||
const message =
|
||||
ret.error != '' ? ret.error : preferenceSetCodeToError(ret.code);
|
||||
throw new Error(
|
||||
`Failed to set preference (${module}.${key}): ${message}`
|
||||
);
|
||||
}
|
||||
}
|
||||
get_pref(module, key) {
|
||||
const response = this.lib.getPref(module, key);
|
||||
if (response.code != 0) {
|
||||
throw new Error(`Failed to get preference (${module}.${key})`);
|
||||
}
|
||||
return response.data;
|
||||
}
|
||||
/**
|
||||
* Check the validity of a filter expression.
|
||||
*
|
||||
* @param filter A display filter expression
|
||||
*/
|
||||
test_filter(filter) {
|
||||
return this.lib.checkFilter(filter);
|
||||
}
|
||||
complete_filter(filter) {
|
||||
const out = this.lib.completeFilter(filter);
|
||||
return {
|
||||
err: out.err,
|
||||
fields: vectorToArray(out.fields),
|
||||
};
|
||||
}
|
||||
reload_lua_plugins() {
|
||||
this.lib.reloadLuaPlugins();
|
||||
}
|
||||
add_plugin(name, data, opts = {}) {
|
||||
const path = this.pluginsDir + '/' + name;
|
||||
this.lib.FS.writeFile(path, data, opts);
|
||||
}
|
||||
/**
|
||||
* Load a packet trace file for analysis.
|
||||
*
|
||||
* @returns Response containing the status and summary
|
||||
*/
|
||||
load(name, data, opts = {}) {
|
||||
if (this.session != null) {
|
||||
this.session.delete();
|
||||
}
|
||||
const path = this.uploadDir + '/' + name;
|
||||
this.lib.FS.writeFile(path, data, opts);
|
||||
this.session = new this.lib.DissectSession(path);
|
||||
return this.session.load();
|
||||
}
|
||||
/**
|
||||
* Get Packet List information for a range of packets.
|
||||
*
|
||||
* @param filter Output those frames that pass this filter expression
|
||||
* @param skip Skip N frames
|
||||
* @param limit Limit the output to N frames
|
||||
*/
|
||||
frames(filter, skip = 0, limit = 0) {
|
||||
return this.session.getFrames(filter, skip, limit);
|
||||
}
|
||||
/**
|
||||
* Get full information about a frame including the protocol tree.
|
||||
*
|
||||
* @param number Frame number
|
||||
*/
|
||||
frame(num) {
|
||||
return this.session.getFrame(num);
|
||||
}
|
||||
follow(follow, filter) {
|
||||
return this.session.follow(follow, filter);
|
||||
}
|
||||
destroy() {
|
||||
if (this.initialized) {
|
||||
if (this.session !== null) {
|
||||
this.session.delete();
|
||||
this.session = null;
|
||||
}
|
||||
this.lib.destroy();
|
||||
this.initialized = false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Returns the column headers
|
||||
*/
|
||||
columns() {
|
||||
const vec = this.lib.getColumns();
|
||||
// convert it from a vector to array
|
||||
return vectorToArray(vec);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a Vector to a JS array
|
||||
*
|
||||
* @param vec Vector
|
||||
* @returns JS array of the Vector contents
|
||||
*/
|
||||
function vectorToArray(vec) {
|
||||
return new Array(vec.size()).fill(0).map((_, id) => vec.get(id));
|
||||
}
|
||||
function preferenceSetCodeToError(code) {
|
||||
switch (code) {
|
||||
case PrefSetResult.PREFS_SET_SYNTAX_ERR:
|
||||
return 'Syntax error in string';
|
||||
case PrefSetResult.PREFS_SET_NO_SUCH_PREF:
|
||||
return 'No such preference';
|
||||
case PrefSetResult.PREFS_SET_OBSOLETE:
|
||||
return 'Preference used to exist but no longer does';
|
||||
default:
|
||||
return 'Unknown error';
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = Wiregasm;
|
||||
module.exports = vectorToArray;
|
||||
} else if (typeof define === 'function' && define['amd']) {
|
||||
define([], function () {
|
||||
return Wiregasm;
|
||||
});
|
||||
define([], function () {
|
||||
return vectorToArray;
|
||||
});
|
||||
} else if (typeof exports === 'object') {
|
||||
exports['loadWiregasm'] = Wiregasm;
|
||||
exports['vectorToArray'] = vectorToArray;
|
||||
}
|
||||
162
public/wiregasm/worker.js
Normal file
162
public/wiregasm/worker.js
Normal file
@@ -0,0 +1,162 @@
|
||||
// load the Wiregasm library
|
||||
importScripts(
|
||||
'/wiregasm/wiregasm_new.js', // self-compilation es5
|
||||
'/wiregasm/wiregasm_load.js'
|
||||
// 'https://cdn.jsdelivr.net/npm/@goodtools/wiregasm/dist/wiregasm.js'
|
||||
);
|
||||
|
||||
const wg = new Wiregasm();
|
||||
|
||||
const inflateRemoteBuffer = async url => {
|
||||
const res = await fetch(url);
|
||||
return await res.arrayBuffer();
|
||||
};
|
||||
|
||||
const fetchPackages = async () => {
|
||||
console.log('Fetching packages');
|
||||
let [wasmBuffer, dataBuffer] = await Promise.all([
|
||||
await inflateRemoteBuffer(
|
||||
'/wiregasm/wiregasm.wasm'
|
||||
// 'https://cdn.jsdelivr.net/npm/@goodtools/wiregasm/dist/wiregasm.wasm'
|
||||
),
|
||||
await inflateRemoteBuffer(
|
||||
'/wiregasm/wiregasm.data'
|
||||
// 'https://cdn.jsdelivr.net/npm/@goodtools/wiregasm/dist/wiregasm.data'
|
||||
),
|
||||
]);
|
||||
|
||||
return { wasmBuffer, dataBuffer };
|
||||
};
|
||||
|
||||
// Load the Wiregasm Wasm data
|
||||
fetchPackages()
|
||||
.then(({ wasmBuffer, dataBuffer }) => {
|
||||
return wg.init(loadWiregasm, {
|
||||
wasmBinary: wasmBuffer,
|
||||
getPreloadedPackage() {
|
||||
return dataBuffer;
|
||||
},
|
||||
handleStatus: (type, status) => {
|
||||
postMessage({ type: 'status', code: type, status: status });
|
||||
},
|
||||
printErr: error => {
|
||||
postMessage({ type: 'error', error: error });
|
||||
},
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
postMessage({ type: 'init' });
|
||||
})
|
||||
.catch(e => {
|
||||
postMessage({ type: 'error', error: e });
|
||||
});
|
||||
|
||||
/**Converts a Vector to a JS array */
|
||||
function replacer(key, value) {
|
||||
if (value.constructor.name.startsWith('Vector')) {
|
||||
return vectorToArray(value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
// Event listener to receive messages from the main script
|
||||
this.onmessage = ev => {
|
||||
const data = ev.data;
|
||||
switch (data.type) {
|
||||
case 'close':
|
||||
wg.destroy();
|
||||
break;
|
||||
case 'columns':
|
||||
const columns = wg.columns();
|
||||
if (Array.isArray(columns)) {
|
||||
this.postMessage({ type: 'columns', data: columns });
|
||||
}
|
||||
break;
|
||||
case 'select': // select a frame
|
||||
const number = data.number;
|
||||
const frameData = wg.frame(number);
|
||||
const frameDataToJSON = JSON.parse(JSON.stringify(frameData, replacer));
|
||||
this.postMessage({
|
||||
type: 'selected',
|
||||
data: frameDataToJSON,
|
||||
});
|
||||
break;
|
||||
case 'frames': // get frames list
|
||||
const skip = data.skip;
|
||||
const limit = data.limit;
|
||||
const filter = data.filter;
|
||||
const framesData = wg.frames(filter, skip, limit);
|
||||
const framesDataToJSON = JSON.parse(JSON.stringify(framesData, replacer));
|
||||
this.postMessage({
|
||||
type: 'frames',
|
||||
data: framesDataToJSON,
|
||||
});
|
||||
break;
|
||||
case 'process-data':
|
||||
const loadData = wg.load(data.name, new Uint8Array(data.data));
|
||||
this.postMessage({ type: 'processed', data: loadData });
|
||||
break;
|
||||
case 'process':
|
||||
const f = data.file;
|
||||
const reader = new FileReader();
|
||||
reader.addEventListener('load', event => {
|
||||
// XXX: this blocks the worker thread
|
||||
const loadData = wg.load(f.name, new Uint8Array(event.target.result));
|
||||
postMessage({ type: 'processed', data: loadData });
|
||||
});
|
||||
reader.readAsArrayBuffer(f);
|
||||
break;
|
||||
case 'check-filter':
|
||||
const filterStr = data.filter;
|
||||
const checkFilterRes = wg.lib.checkFilter(filterStr);
|
||||
this.postMessage({ type: 'filter', data: checkFilterRes });
|
||||
break;
|
||||
}
|
||||
|
||||
if (data.type === 'reload-quick') {
|
||||
if (wg.session) {
|
||||
// TODO: this is a hack, we should be able to reload the session
|
||||
const name = data.name;
|
||||
const res = wg.session.load();
|
||||
|
||||
postMessage({ type: 'processed', name: name, data: res });
|
||||
}
|
||||
} else if (data.type === 'module-tree') {
|
||||
const res = wg.list_modules();
|
||||
// send it to the correct port
|
||||
event.ports[0].postMessage({
|
||||
result: JSON.parse(JSON.stringify(res, replacer)),
|
||||
});
|
||||
} else if (data.type === 'module-prefs') {
|
||||
const res = wg.list_prefs(data.name);
|
||||
// send it to the correct port
|
||||
event.ports[0].postMessage({
|
||||
result: JSON.parse(JSON.stringify(res, replacer)),
|
||||
});
|
||||
} else if (data.type === 'upload-file') {
|
||||
const f = data.file;
|
||||
const reader = new FileReader();
|
||||
reader.addEventListener('load', e => {
|
||||
// XXX: this blocks the worker thread
|
||||
const path = '/uploads/' + f.name;
|
||||
wg.lib.FS.writeFile(path, Buffer.from(e.target.result));
|
||||
event.ports[0].postMessage({ result: path });
|
||||
});
|
||||
reader.readAsArrayBuffer(f);
|
||||
} else if (data.type === 'update-pref') {
|
||||
try {
|
||||
console.log(`set_pref(${data.module}, ${data.key}, ${data.value})`);
|
||||
wg.set_pref(data.module, data.key, data.value);
|
||||
event.ports[0].postMessage({ result: 'ok' });
|
||||
} catch (e) {
|
||||
console.error(
|
||||
`set_pref(${data.module}, ${data.key}, ${data.value}) failed: ${e.message}`
|
||||
);
|
||||
event.ports[0].postMessage({ error: e.message });
|
||||
}
|
||||
} else if (data.type === 'apply-prefs') {
|
||||
console.log(`apply_prefs()`);
|
||||
wg.apply_prefs();
|
||||
event.ports[0].postMessage({ result: 'ok' });
|
||||
}
|
||||
};
|
||||
@@ -4,6 +4,7 @@ import { usePrimaryColor } from '@/hooks/useTheme';
|
||||
import zhCN from 'ant-design-vue/lib/locale/zh_CN';
|
||||
import enUS from 'ant-design-vue/lib/locale/en_US';
|
||||
import dayjs from 'dayjs';
|
||||
import advancedFormat from 'dayjs/plugin/advancedFormat';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import { ref, watch } from 'vue';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
@@ -11,6 +12,7 @@ import useI18n from '@/hooks/useI18n';
|
||||
const { t, currentLocale } = useI18n();
|
||||
const appStore = useAppStore();
|
||||
|
||||
dayjs.extend(advancedFormat);
|
||||
dayjs.locale('zh-cn'); // 默认中文
|
||||
usePrimaryColor(); // 载入用户自定义主题色
|
||||
|
||||
@@ -50,10 +52,11 @@ console.info(
|
||||
</ConfigProvider>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
<style lang="css">
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body .ant-pro-basicLayout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -61,10 +64,6 @@ body .ant-pro-basicLayout {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.ant-pro-sider {
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.slide-left-enter-active,
|
||||
.slide-left-leave-active,
|
||||
.slide-right-enter-active,
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
import {
|
||||
RESULT_CODE_ERROR,
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_ERROR,
|
||||
} from '@/constants/result-constants';
|
||||
import { language, request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询配置详细
|
||||
* @param tag 配置ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getConfigInfo(tag: string) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = '${tag}'`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['config'][0]),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配置
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function updateConfig(tag: string, data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='${tag}'`,
|
||||
method: 'put',
|
||||
data: { data },
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data.data) {
|
||||
let rows = result.data.data.affectedRows;
|
||||
if (rows) {
|
||||
delete result.data;
|
||||
return result;
|
||||
} else {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -2,437 +2,8 @@ import {
|
||||
RESULT_CODE_ERROR,
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_ERROR,
|
||||
RESULT_MSG_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import { language, request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询配置参数标签栏
|
||||
* @param neType 网元类型
|
||||
* @returns object
|
||||
*/
|
||||
export async function getParamConfigTopTab(neType: string) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/param_config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT top_display,top_tag,method FROM param_config WHERE ne_type = '${neType}'`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
data = data['param_config'];
|
||||
if (Array.isArray(data)) {
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data),
|
||||
});
|
||||
}
|
||||
return Object.assign(result, {
|
||||
data: [],
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配置参数标签栏对应信息
|
||||
* @param neType 网元类型
|
||||
* @param topTag
|
||||
* @param neId
|
||||
* @returns object { wrRule, dataArr }
|
||||
*/
|
||||
async function getParamConfigInfo(
|
||||
neType: string,
|
||||
topTag: string,
|
||||
neId: string
|
||||
) {
|
||||
return await Promise.allSettled([
|
||||
// 获取参数规则
|
||||
request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/param_config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT param_json FROM param_config WHERE ne_type = '${neType}' AND top_tag='${topTag}'`,
|
||||
},
|
||||
timeout: 1_000,
|
||||
}),
|
||||
// 获取对应信息
|
||||
request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${neType.toLowerCase()}/objectType/config/${topTag}`,
|
||||
method: 'get',
|
||||
params: {
|
||||
ne_id: neId,
|
||||
},
|
||||
timeout: 1_000,
|
||||
}),
|
||||
]).then(resArr => {
|
||||
let wrRule: Record<string, any> = {};
|
||||
// 规则数据
|
||||
if (resArr[0].status === 'fulfilled') {
|
||||
const itemV = resArr[0].value;
|
||||
// 解析数据
|
||||
if (
|
||||
itemV.code === RESULT_CODE_SUCCESS &&
|
||||
Array.isArray(itemV.data?.data)
|
||||
) {
|
||||
let itemData = itemV.data.data;
|
||||
const data = itemData[0]['param_config'];
|
||||
if (Array.isArray(data)) {
|
||||
const v = data[0]['param_json'];
|
||||
try {
|
||||
itemData = parseObjLineToHump(JSON.parse(v));
|
||||
wrRule = itemData;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let dataArr: Record<string, any>[] = [];
|
||||
// 对应信息
|
||||
if (resArr[1].status === 'fulfilled') {
|
||||
const itemV = resArr[1].value;
|
||||
// 解析数据
|
||||
if (
|
||||
itemV.code === RESULT_CODE_SUCCESS &&
|
||||
Array.isArray(itemV.data?.data)
|
||||
) {
|
||||
let itemData = itemV.data.data;
|
||||
dataArr = parseObjLineToHump(itemData);
|
||||
}
|
||||
}
|
||||
return { wrRule, dataArr };
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配置参数标签栏对应信息-表格处理
|
||||
* @param neType 网元类型
|
||||
* @param topTag
|
||||
* @param neId
|
||||
* @returns object
|
||||
*/
|
||||
export async function getParamConfigInfoTable(
|
||||
neType: string,
|
||||
topTag: string,
|
||||
neId: string
|
||||
) {
|
||||
const { wrRule, dataArr } = await getParamConfigInfo(neType, topTag, neId);
|
||||
|
||||
// UPF参数不统一
|
||||
// if (neType === 'UPF') {
|
||||
// if (Reflect.has(wrRule, 'list')) {
|
||||
// for (const arr of wrRule['list']) {
|
||||
// arr['name'] = parseFirstLower(arr['name']);
|
||||
// }
|
||||
// for (const item of dataArr) {
|
||||
// for (const k in item) {
|
||||
// item[parseFirstLower(k)] = item[k];
|
||||
// Reflect.deleteProperty(item, k);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (Reflect.has(wrRule, 'array')) {
|
||||
// for (const arr of wrRule['array']) {
|
||||
// if (Array.isArray(arr['array'])) {
|
||||
// for (const child of arr['array']) {
|
||||
// child['name'] = parseFirstLower(child['name']);
|
||||
// }
|
||||
// }
|
||||
// arr['name'] = parseFirstLower(arr['name']);
|
||||
// }
|
||||
// for (const item of dataArr) {
|
||||
// for (const k in item) {
|
||||
// // 处理子列表
|
||||
// if (Array.isArray(item[k])) {
|
||||
// for (const child of item[k]) {
|
||||
// for (const childKey in child) {
|
||||
// child[parseFirstLower(childKey)] = child[childKey];
|
||||
// Reflect.deleteProperty(child, childKey);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// item[parseFirstLower(k)] = item[k];
|
||||
// Reflect.deleteProperty(item, k);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// 拼装数据
|
||||
const result = {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS,
|
||||
data: {
|
||||
type: 'list' as 'list' | 'array',
|
||||
data: [] as any[],
|
||||
dataRule: {},
|
||||
columns: [] as any[],
|
||||
},
|
||||
};
|
||||
|
||||
// kv单列表
|
||||
if (Reflect.has(wrRule, 'list')) {
|
||||
result.data.type = 'list';
|
||||
const ruleArr = Object.freeze(wrRule['list']);
|
||||
|
||||
// 列表项数据
|
||||
let dataList = [];
|
||||
for (const item of dataArr) {
|
||||
for (const key of Object.keys(item)) {
|
||||
// 规则为准
|
||||
for (const rule of ruleArr) {
|
||||
if (rule['name'] === key) {
|
||||
const ruleItem = Object.assign({ optional: 'true' }, rule, {
|
||||
value: item[key],
|
||||
});
|
||||
dataList.push(ruleItem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result.data.data = dataList;
|
||||
|
||||
// 列表字段
|
||||
result.data.columns = [
|
||||
{
|
||||
title: 'Key',
|
||||
dataIndex: 'display',
|
||||
align: 'left',
|
||||
width: '30%',
|
||||
},
|
||||
{
|
||||
title: 'Value',
|
||||
dataIndex: 'value',
|
||||
align: 'left',
|
||||
width: '70%',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
// 多列表
|
||||
if (Reflect.has(wrRule, 'array')) {
|
||||
result.data.type = 'array';
|
||||
const ruleArr = Object.freeze(wrRule['array']);
|
||||
|
||||
// 列表项数据
|
||||
const dataArray = [];
|
||||
for (const item of dataArr) {
|
||||
let record: Record<string, any> = {};
|
||||
for (const key of Object.keys(item)) {
|
||||
// 规则为准
|
||||
for (const rule of ruleArr) {
|
||||
if (rule['name'] === key) {
|
||||
const ruleItem = Object.assign({ optional: 'true' }, rule, {
|
||||
value: item[key],
|
||||
});
|
||||
record[ruleItem.name] = ruleItem;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dataArray.push(record);
|
||||
}
|
||||
result.data.data = dataArray;
|
||||
|
||||
// 无数据时,用于新增
|
||||
let dataRule: Record<string, any> = {};
|
||||
for (const rule of ruleArr) {
|
||||
dataRule[rule.name] = rule;
|
||||
}
|
||||
result.data.dataRule = dataRule;
|
||||
|
||||
// 列表字段
|
||||
const columns: Record<string, any>[] = [];
|
||||
for (const rule of ruleArr) {
|
||||
columns.push({
|
||||
title: rule.display,
|
||||
dataIndex: rule.name,
|
||||
align: 'left',
|
||||
width: 5,
|
||||
});
|
||||
}
|
||||
result.data.columns = columns;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配置参数标签栏对应信息-表单结构处理
|
||||
* @param neType 网元类型
|
||||
* @param topTag
|
||||
* @param neId
|
||||
* @returns object
|
||||
*/
|
||||
export async function getParamConfigInfoForm(
|
||||
neType: string,
|
||||
topTag: string,
|
||||
neId: string
|
||||
) {
|
||||
const { wrRule, dataArr } = await getParamConfigInfo(neType, topTag, neId);
|
||||
|
||||
// 拼装数据
|
||||
const result = {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS,
|
||||
data: {
|
||||
type: 'list' as 'list' | 'array',
|
||||
data: [] as Record<string, any>[],
|
||||
dataRule: {},
|
||||
},
|
||||
};
|
||||
|
||||
// kv单列表
|
||||
if (Reflect.has(wrRule, 'list')) {
|
||||
result.data.type = 'list';
|
||||
const ruleArr = Object.freeze(wrRule['list']);
|
||||
|
||||
// 列表项数据
|
||||
const dataList = [];
|
||||
for (const item of dataArr) {
|
||||
for (const key in item) {
|
||||
// 规则为准
|
||||
for (const rule of ruleArr) {
|
||||
if (rule['name'] === key) {
|
||||
const ruleItem = Object.assign({ optional: 'true' }, rule, {
|
||||
value: item[key],
|
||||
});
|
||||
dataList.push(ruleItem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result.data.data = dataList;
|
||||
}
|
||||
// 多列表
|
||||
if (Reflect.has(wrRule, 'array')) {
|
||||
result.data.type = 'array';
|
||||
const ruleArr = Object.freeze(wrRule['array']);
|
||||
// 列表项数据
|
||||
const dataArray = [];
|
||||
for (const item of dataArr) {
|
||||
const index = item['index'];
|
||||
let record: Record<string, any>[] = [];
|
||||
for (const key in item) {
|
||||
// 规则为准
|
||||
for (const rule of ruleArr) {
|
||||
if (rule['name'] === key) {
|
||||
const ruleItem = Object.assign({ optional: 'true' }, rule, {
|
||||
value: item[key],
|
||||
});
|
||||
record.push(ruleItem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dataArray.push({ title: `Index-${index}`, key: index, record });
|
||||
}
|
||||
result.data.data = dataArray;
|
||||
|
||||
// 无数据时,用于新增
|
||||
result.data.dataRule = { title: `Index-0`, key: 0, record: ruleArr };
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配置参数标签栏对应信息子节点
|
||||
* @param neType 网元类型
|
||||
* @param topTag
|
||||
* @param neId
|
||||
* @param loc 子节点(index/字段) 1/dnnList
|
||||
* @returns
|
||||
*/
|
||||
export async function getParamConfigInfoChild(
|
||||
neType: string,
|
||||
topTag: string,
|
||||
neId: string,
|
||||
loc: string
|
||||
) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${neType.toLowerCase()}/objectType/config/${topTag}`,
|
||||
method: 'get',
|
||||
params: {
|
||||
ne_id: neId,
|
||||
loc: loc,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(result.data.data),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配置参数标签栏对应信息
|
||||
* @param args 对象 {neType,neId,topTag,loc}
|
||||
* @param data 对象 {修改的数据kv}
|
||||
* @returns object
|
||||
*/
|
||||
export function updateParamConfigInfo(
|
||||
type: 'list' | 'array',
|
||||
args: Record<string, any>,
|
||||
data: Record<string, any>
|
||||
) {
|
||||
let url = `/api/rest/systemManagement/v1/elementType/${args.neType.toLowerCase()}/objectType/config/${
|
||||
args.topTag
|
||||
}?ne_id=${args.neId}`;
|
||||
|
||||
// 多列表需要loc
|
||||
if (type === 'array') {
|
||||
url += `&loc=${args.loc}`;
|
||||
}
|
||||
|
||||
return request({
|
||||
url,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配置参数标签栏对应信息
|
||||
* @param args 对象 {neType,neId,topTag,loc}
|
||||
* @param data 行记录对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addParamConfigInfo(
|
||||
args: Record<string, any>,
|
||||
data: Record<string, any>
|
||||
) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${args.neType.toLowerCase()}/objectType/config/${
|
||||
args.topTag
|
||||
}?ne_id=${args.neId}&loc=${args.loc}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配置参数标签栏对应信息
|
||||
* @param args 对象 {neType,neId,topTag,loc}
|
||||
* loc 多层表的定位信息{index0}/{paraName1}/{index1}
|
||||
* @param data 行记录对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delParamConfigInfo(args: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${args.neType.toLowerCase()}/objectType/config/${
|
||||
args.topTag
|
||||
}?ne_id=${args.neId}&loc=${args.loc}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新网元配置重新载入
|
||||
@@ -462,3 +33,53 @@ export async function updateNeConfigReload(neType: string, neId: string) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从参数配置PCF中获取对应信息提供给PCC用户策略输入框
|
||||
* @param neId
|
||||
* @returns object {pccRules,sessionRules,qosTemplate,headerEnrichTemplate,serviceAreaRestriction}
|
||||
*/
|
||||
export async function getPCCRule(neId: any) {
|
||||
const paramNameArr = [
|
||||
'pccRules',
|
||||
'sessionRules',
|
||||
'qosTemplate',
|
||||
'headerEnrichTemplate',
|
||||
'serviceAreaRestriction',
|
||||
];
|
||||
const reqArr = [];
|
||||
for (const paramName of paramNameArr) {
|
||||
reqArr.push(
|
||||
request({
|
||||
url: `/ne/config/data`,
|
||||
params: { neType: 'PCF', neId, paramName },
|
||||
method: 'get',
|
||||
})
|
||||
);
|
||||
}
|
||||
return await Promise.allSettled(reqArr).then(resArr => {
|
||||
// 规则数据
|
||||
const obj: any = {};
|
||||
resArr.forEach((item, i: number) => {
|
||||
if (item.status === 'fulfilled') {
|
||||
const res = item.value;
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
const key = paramNameArr[i];
|
||||
obj[key] = res.data.map((item: any) => {
|
||||
if ('qosTemplate' === key) {
|
||||
return { value: item.qosId, label: item.qosId };
|
||||
}
|
||||
if ('headerEnrichTemplate' === key) {
|
||||
return { value: item.templateName, label: item.templateName };
|
||||
}
|
||||
if ('serviceAreaRestriction' === key) {
|
||||
return { value: item.name, label: item.name };
|
||||
}
|
||||
return { value: item.ruleId, label: item.ruleId };
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询软件列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listLicense(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(id) as total from ne_license ';
|
||||
let rowsSQL = ' select * from ne_license ';
|
||||
|
||||
// 查询
|
||||
let querySQL = 'where 1=1';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
|
||||
// 分页
|
||||
const pageNum = (query.pageNum - 1) * query.pageSize;
|
||||
const limtSql = ` order by created_at desc limit ${pageNum},${query.pageSize} `;
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_license`,
|
||||
method: 'get',
|
||||
params: {
|
||||
totalSQL: totalSQL + querySQL,
|
||||
rowsSQL: rowsSQL + querySQL + limtSql,
|
||||
},
|
||||
});
|
||||
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
const data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
msg: result.msg,
|
||||
};
|
||||
result.data.data.forEach((item: any) => {
|
||||
const itemData = item['ne_license'];
|
||||
if (Array.isArray(itemData)) {
|
||||
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
|
||||
data.total = itemData[0]['total'];
|
||||
} else {
|
||||
data.rows = itemData.map(v => parseObjLineToHump(v));
|
||||
}
|
||||
}
|
||||
});
|
||||
return data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function uploadLicense(data: FormData) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${data.get(
|
||||
'nfType'
|
||||
)}/objectType/license?neId=${data.get('nfId')}`,
|
||||
method: 'post',
|
||||
data,
|
||||
dataType: 'form-data',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import {
|
||||
RESULT_CODE_ERROR,
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_ERROR,
|
||||
} from '@/constants/result-constants';
|
||||
import { language, request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
||||
|
||||
/**
|
||||
* 查询网元列表
|
||||
@@ -8,27 +13,8 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
* @returns object
|
||||
*/
|
||||
export async function listNeInfo(query: Record<string, any>) {
|
||||
let totalSQL =
|
||||
'select count(*) as total from ne_info where (status=0 or status=3)';
|
||||
let rowsSQL = 'select * from ne_info where (status=0 or status=3) ';
|
||||
|
||||
// 系统特定顺序
|
||||
const specificOrder = [
|
||||
'OMC',
|
||||
'MME',
|
||||
'AMF',
|
||||
'AUSF',
|
||||
'UDM',
|
||||
'SMF',
|
||||
'PCF',
|
||||
'UPF',
|
||||
'NRF',
|
||||
'NSSF',
|
||||
'IMS',
|
||||
'N3IWF',
|
||||
'NEF',
|
||||
'LMF',
|
||||
];
|
||||
let totalSQL = 'select count(*) as total from ne_info where 1=1 ';
|
||||
let rowsSQL = 'select * from ne_info where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
@@ -67,8 +53,8 @@ export async function listNeInfo(query: Record<string, any>) {
|
||||
data.rows = itemData.map(v => parseObjLineToHump(v));
|
||||
//通过sort进行冒泡排序
|
||||
data.rows.sort((a: any, b: any) => {
|
||||
const typeA = specificOrder.indexOf(a.neType);
|
||||
const typeB = specificOrder.indexOf(b.neType);
|
||||
const typeA = NE_TYPE_LIST.indexOf(a.neType);
|
||||
const typeB = NE_TYPE_LIST.indexOf(b.neType);
|
||||
if (typeA === -1) return 1; // 如果不在特定顺序中,排到后面
|
||||
if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面
|
||||
return typeA - typeB;
|
||||
@@ -92,15 +78,18 @@ export async function getNeInfo(id: string | number) {
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_info`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `select * from ne_info where (status=0 or status=3) and id = ${id}`,
|
||||
SQL: `select * from ne_info where id = ${id}`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['ne_info'][0]),
|
||||
});
|
||||
let neInfo = result.data.data[0]['ne_info'];
|
||||
if (neInfo) {
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(neInfo[0]),
|
||||
});
|
||||
}
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -148,57 +137,9 @@ export async function delNeInfo(data: Record<string, any>) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网元网元列表
|
||||
* @returns object
|
||||
*/
|
||||
export async function getNelistAll() {
|
||||
// 系统特定顺序
|
||||
const specificOrder = [
|
||||
'OMC',
|
||||
'MME',
|
||||
'AMF',
|
||||
'AUSF',
|
||||
'UDM',
|
||||
'SMF',
|
||||
'PCF',
|
||||
'UPF',
|
||||
'NRF',
|
||||
'NSSF',
|
||||
'IMS',
|
||||
'N3IWF',
|
||||
'NEF',
|
||||
'LMF',
|
||||
];
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/ne_info`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT ne_type,ne_name,ne_id,ip FROM ne_info WHERE status in ('0','3')`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
//通过sort进行冒泡排序
|
||||
data['ne_info'].sort((a: any, b: any) => {
|
||||
const typeA = specificOrder.indexOf(a.ne_type);
|
||||
const typeB = specificOrder.indexOf(b.ne_type);
|
||||
if (typeA === -1) return 1;
|
||||
if (typeB === -1) return -1;
|
||||
return typeA - typeB;
|
||||
});
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['ne_info']),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出网元配置文件
|
||||
* @param
|
||||
* @param data data {neType neId}
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportSet(data: Record<string, any>) {
|
||||
|
||||
@@ -111,6 +111,7 @@ export async function sendNeSoftware(data: Record<string, any>) {
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||
method: 'post',
|
||||
timeout: 180_000,
|
||||
repeatSubmit: false,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
@@ -130,6 +131,7 @@ export async function runNeSoftware(data: Record<string, any>) {
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||
method: 'put',
|
||||
timeout: 180_000,
|
||||
repeatSubmit: false,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
@@ -149,6 +151,7 @@ export async function backNeSoftware(data: Record<string, any>) {
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||
method: 'PATCH',
|
||||
timeout: 180_000,
|
||||
repeatSubmit: false,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
|
||||
@@ -241,6 +241,7 @@ export function listSync() {
|
||||
return request({
|
||||
url: `/api/rest/faultManagement/v1/elementType/all/objectType/alarms`,
|
||||
method: 'get',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -294,7 +295,7 @@ export async function exportAll(query: Record<string, any>) {
|
||||
* @returns bolb
|
||||
*/
|
||||
export async function origGet() {
|
||||
let totalSQL = `select count(*) as value,orig_severity as name from alarm group by orig_severity`;
|
||||
let totalSQL = `select count(*) as value,orig_severity as name from alarm WHERE alarm_status='1' and orig_severity!='Event' group by orig_severity`;
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
@@ -329,10 +330,10 @@ export async function origGet() {
|
||||
* @returns object
|
||||
*/
|
||||
export async function top3Sel(filterFlag?: string) {
|
||||
let filter = ` WHERE orig_severity='${filterFlag}'`;
|
||||
if (!filterFlag) filter = '';
|
||||
let filter = ` WHERE alarm_status='1'and orig_severity='${filterFlag}'`;
|
||||
if (!filterFlag) filter = "WHERE alarm_status='1'";
|
||||
|
||||
let top3SQL = `select count(*) as value,ne_type as name from alarm ${filter} group by ne_type ORDER BY value desc limit 0,3 `;
|
||||
let top3SQL = `select count(*) as value,ne_type as name from alarm ${filter} and orig_severity!='Event' group by ne_type ORDER BY value desc limit 0,3 `;
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
|
||||
124
src/api/faultManage/eventAlarm.ts
Normal file
124
src/api/faultManage/eventAlarm.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listAct(query: Record<string, any>) {
|
||||
let totalSQL = `select count(*) as total from alarm_event where 1=1 `;
|
||||
let rowsSQL = `select * from alarm_event where 1=1 `;
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.alarmCode) {
|
||||
querySQL += ` and alarm_code = '${query.alarmCode}' `;
|
||||
}
|
||||
|
||||
if (query.alarmType) {
|
||||
querySQL += ` and alarm_type = '${query.alarmType}' `;
|
||||
}
|
||||
|
||||
if (query.pvFlag) {
|
||||
querySQL += ` and pv_flag = '${query.pvFlag}' `;
|
||||
}
|
||||
|
||||
if (query.neId) {
|
||||
querySQL += ` and ne_id like '%${query.neId}%' `;
|
||||
}
|
||||
|
||||
if (query.neName) {
|
||||
querySQL += ` and ne_name like '%${query.neName}%' `;
|
||||
}
|
||||
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
|
||||
if (query.beginTime && query.endTime) {
|
||||
querySQL += ` and event_time BETWEEN '${query.beginTime}' and ' ${query.endTime}'`;
|
||||
}
|
||||
|
||||
// 分页
|
||||
const pageNum = (query.pageNum - 1) * query.pageSize;
|
||||
const limtSql = ` order by event_time desc limit ${pageNum},${query.pageSize} `;
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm_event`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: totalSQL + querySQL,
|
||||
rowsSQL: rowsSQL + querySQL + limtSql,
|
||||
},
|
||||
});
|
||||
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
const data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
msg: result.msg,
|
||||
};
|
||||
result.data.data.forEach((item: any) => {
|
||||
const itemData = item['alarm_event'];
|
||||
if (Array.isArray(itemData)) {
|
||||
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
|
||||
data.total = itemData[0]['total'];
|
||||
} else {
|
||||
data.rows = itemData.map(v => parseObjLineToHump(v));
|
||||
}
|
||||
}
|
||||
});
|
||||
return data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 事件告警导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export async function exportAll(query: Record<string, any>) {
|
||||
let rowsSQL = `select * from alarm_event where 1=1`;
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
querySQL += query.alarm_code
|
||||
? ` and alarm_code = '${query.alarm_code}' `
|
||||
: '';
|
||||
querySQL += query.alarm_type
|
||||
? ` and alarm_type = '${query.alarm_type}' `
|
||||
: '';
|
||||
querySQL += query.pv_flag ? ` and pv_flag = '${query.pv_flag}' ` : '';
|
||||
querySQL += query.orig_severity
|
||||
? ` and orig_severity in('${query.orig_severity}' )`
|
||||
: '';
|
||||
querySQL += query.ne_id ? ` and ne_id like '%${query.ne_id}%' ` : '';
|
||||
querySQL += query.ne_name ? ` and ne_name like '%${query.ne_name}%' ` : '';
|
||||
querySQL += query.ne_type ? ` and ne_type like '%${query.ne_type}%' ` : '';
|
||||
querySQL +=
|
||||
query.beginTime && query.endTime
|
||||
? ` and event_time BETWEEN '${query.beginTime}' and ' ${query.endTime}'`
|
||||
: '';
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm_event`,
|
||||
method: 'get',
|
||||
params: {
|
||||
rowsSQL: rowsSQL + querySQL,
|
||||
},
|
||||
});
|
||||
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
let v = result.data.data[0];
|
||||
const vArr = parseObjLineToHump(v['alarm_event']);
|
||||
result.data = vArr == null ? [] : vArr;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1,29 +1,14 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
||||
|
||||
/**
|
||||
* 查询公告列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listMain() {
|
||||
// 系统特定顺序
|
||||
const specificOrder = [
|
||||
'OMC',
|
||||
'MME',
|
||||
'AMF',
|
||||
'AUSF',
|
||||
'UDM',
|
||||
'SMF',
|
||||
'PCF',
|
||||
'UPF',
|
||||
'NRF',
|
||||
'NSSF',
|
||||
'IMS',
|
||||
'N3IWF',
|
||||
'NEF',
|
||||
'LMF',
|
||||
];
|
||||
const result = await request({
|
||||
url: '/api/rest/systemManagement/v1/elementType/all/objectType/systemState',
|
||||
method: 'get',
|
||||
@@ -39,7 +24,6 @@ export async function listMain() {
|
||||
const serialNum = (value as any).serialNum;
|
||||
const version = (value as any).version;
|
||||
|
||||
|
||||
const errCode = systemState && systemState['errorCode'];
|
||||
var time = new Date();
|
||||
// console.log(key, value);
|
||||
@@ -59,21 +43,20 @@ export async function listMain() {
|
||||
ipAddress,
|
||||
serialNum,
|
||||
name: key.split('/').join('_'),
|
||||
expiryDate: '-',
|
||||
status: 'Abnormal',
|
||||
};
|
||||
}
|
||||
return mergedObj;
|
||||
});
|
||||
|
||||
//通过sort进行冒泡排序
|
||||
mergedData.sort((a: any, b: any) => {
|
||||
const typeA = specificOrder.indexOf(a.name.split('_')[0]);
|
||||
const typeB = specificOrder.indexOf(b.name.split('_')[0]);
|
||||
const typeA = NE_TYPE_LIST.indexOf(a.name.split('_')[0]);
|
||||
const typeB = NE_TYPE_LIST.indexOf(b.name.split('_')[0]);
|
||||
if (typeA === -1) return 1; // 如果不在特定顺序中,排到后面
|
||||
if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面
|
||||
return typeA - typeB;
|
||||
});
|
||||
//console.log(mergedData);
|
||||
|
||||
return mergedData;
|
||||
}
|
||||
@@ -105,5 +88,6 @@ export function getSysConf() {
|
||||
return request({
|
||||
url: `/sys-conf`,
|
||||
method: 'get',
|
||||
whithToken: false,
|
||||
});
|
||||
}
|
||||
|
||||
53
src/api/logManage/exportFile.ts
Normal file
53
src/api/logManage/exportFile.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 获取下拉框数据
|
||||
* @returns object
|
||||
*/
|
||||
export function getBakFile() {
|
||||
return request({
|
||||
url: '/lm/table/list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对应类型的文件列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function getBakFileList(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/lm/file/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载远端文件
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function downFile(query: Record<string, any>) {
|
||||
return request({
|
||||
url: `/lm/file/${query.fileName}`,
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除远端获取文件
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function delFile(query: Record<string, any>) {
|
||||
return request({
|
||||
url: `/lm/file/${query.fileName}`,
|
||||
method: 'delete',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
@@ -7,6 +7,7 @@ export function login(data: Record<string, string>) {
|
||||
method: 'post',
|
||||
data: data,
|
||||
whithToken: false,
|
||||
crypto: true,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,6 +22,7 @@ export function register(data: Record<string, any>) {
|
||||
method: 'post',
|
||||
data: data,
|
||||
whithToken: false,
|
||||
crypto: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -30,17 +30,19 @@ export async function getMMLByNE(neType: string) {
|
||||
* 发送网元的mml命令
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @param objectType 接口类型
|
||||
* @param cmdStr 命令串
|
||||
* @returns
|
||||
*/
|
||||
export async function sendMMlByNE(
|
||||
neType: string,
|
||||
neId: string,
|
||||
objectType: string,
|
||||
cmdArr: string[]
|
||||
) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
||||
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/${objectType}?ne_id=${neId}`,
|
||||
method: 'post',
|
||||
data: { mml: cmdArr },
|
||||
timeout: 180_000,
|
||||
|
||||
@@ -6,5 +6,6 @@ export function getLoad(query: Record<string, any>) {
|
||||
url: '/monitor/load',
|
||||
method: 'get',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
import {
|
||||
RESULT_CODE_ERROR,
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_ERROR,
|
||||
} from '@/constants/result-constants';
|
||||
import { language, request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询用户会话列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listSession(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from session where 1=1 ';
|
||||
let rowsSQL = 'select * from session where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.accountId) {
|
||||
querySQL += ` and account_id like '%${query.accountId}%' `;
|
||||
}
|
||||
if (query.ip) {
|
||||
querySQL += ` and host like '%${query.ip}%' `;
|
||||
}
|
||||
|
||||
// 分页
|
||||
const pageNum = (query.pageNum - 1) * query.pageSize;
|
||||
const limtSql = ` limit ${pageNum},${query.pageSize} `;
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by login_time ';
|
||||
if (query.sortOrder === 'desc') {
|
||||
sortSql += ' desc ';
|
||||
} else {
|
||||
sortSql += ' asc ';
|
||||
}
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/session`,
|
||||
method: 'get',
|
||||
params: {
|
||||
totalSQL: totalSQL + querySQL,
|
||||
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
|
||||
},
|
||||
});
|
||||
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
const data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
msg: result.msg,
|
||||
};
|
||||
result.data.data.forEach((item: any) => {
|
||||
const itemData = item['session'];
|
||||
if (Array.isArray(itemData)) {
|
||||
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
|
||||
data.total = itemData[0]['total'];
|
||||
} else {
|
||||
data.rows = itemData.map(v => parseObjLineToHump(v));
|
||||
}
|
||||
}
|
||||
});
|
||||
return data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 强退用户会话
|
||||
* @param tokenId 授权标识
|
||||
* @returns object
|
||||
*/
|
||||
export async function logoutSession(id: string) {
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/session?WHERE=id='${id}'`,
|
||||
method: 'delete',
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data.data) {
|
||||
let rows = result.data.data.affectedRows;
|
||||
if (rows) {
|
||||
delete result.data;
|
||||
return result;
|
||||
} else {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -5,5 +5,6 @@ export function getSystemInfo() {
|
||||
return request({
|
||||
url: '/monitor/system-info',
|
||||
method: 'get',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询网元列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listNe(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元状态
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function stateNe(neType: string, neId: string) {
|
||||
return request({
|
||||
url: '/ne/state',
|
||||
method: 'get',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
66
src/api/ne/neConfig.ts
Normal file
66
src/api/ne/neConfig.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 网元参数配置可用属性值列表指定网元类型全部无分页
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function getAllNeConfig(neType: string) {
|
||||
return request({
|
||||
url: `/ne/config/list/${neType}`,
|
||||
method: 'get',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元参数配置数据信息
|
||||
* @param params 数据 {neType,neId,paramName}
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeConfigData(params: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
params,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元参数配置数据更新
|
||||
* @param data 数据 {neType,neId,paramName:"参数名",paramData:{参数},loc:"层级index仅array"}
|
||||
* @returns object
|
||||
*/
|
||||
export function editNeConfigData(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元参数配置数据新增(array)
|
||||
* @param data 数据 {neType,neId,paramName:"参数名",paramData:{参数},loc:"层级index"}
|
||||
* @returns object
|
||||
*/
|
||||
export function addNeConfigData(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元参数配置数据删除(array)
|
||||
* @param params 数据 {neType,neId,paramName:"参数名",loc:"层级index"}
|
||||
* @returns object
|
||||
*/
|
||||
export function delNeConfigData(params: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
method: 'delete',
|
||||
params,
|
||||
});
|
||||
}
|
||||
83
src/api/ne/neConfigBackup.ts
Normal file
83
src/api/ne/neConfigBackup.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 网元配置文件备份记录列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listNeConfigBackup(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/config/backup/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元配置文件备份记录修改
|
||||
* @param data 数据 { id, name, remark }
|
||||
* @returns object
|
||||
*/
|
||||
export function updateNeConfigBackup(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/config/backup',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元配置文件备份记录下载
|
||||
* @param id 记录ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function downNeConfigBackup(id: string) {
|
||||
return await request({
|
||||
url: '/ne/config/backup/download',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元配置文件备份记录删除
|
||||
* @param id 记录ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function delNeConfigBackup(id: string) {
|
||||
return request({
|
||||
url: '/ne/config/backup',
|
||||
method: 'delete',
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元配置文件备份导出
|
||||
* @param data 数据 { neType, neId }
|
||||
* @returns object
|
||||
*/
|
||||
export function exportNeConfigBackup(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/config/backup/export',
|
||||
method: 'post',
|
||||
data: data,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元配置文件备份导入
|
||||
* @param data 数据 { neType, neId, type, path }
|
||||
* @returns object
|
||||
*/
|
||||
export function importNeConfigBackup(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/config/backup/import',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
103
src/api/ne/neHost.ts
Normal file
103
src/api/ne/neHost.ts
Normal file
@@ -0,0 +1,103 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询网元主机列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listNeHost(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/host/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元主机详细
|
||||
* @param hostId 网元主机ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeHost(hostId: string | number) {
|
||||
return request({
|
||||
url: `/ne/host/${hostId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网元主机
|
||||
* @param data 网元主机对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addNeHost(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/host',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网元主机
|
||||
* @param data 网元主机对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateNeHost(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/host',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网元主机
|
||||
* @param hostId 网元主机ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delNeHost(hostId: string | number) {
|
||||
return request({
|
||||
url: `/ne/host/${hostId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试连接网元主机
|
||||
* @param data 网元主机对象
|
||||
* @returns object
|
||||
*/
|
||||
export function testNeHost(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/host/test',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元主机SSH方式检查服务器环境
|
||||
* @param data 网元主机对象
|
||||
* @returns object
|
||||
*/
|
||||
export function neHostCheckInfo(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/host/checkBySSH',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元主机SSH方式授权免密发送
|
||||
* @param data 网元主机对象
|
||||
* @returns object
|
||||
*/
|
||||
export function neHostAuthorizedRSA(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/host/authorizedBySSH',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
64
src/api/ne/neHostCmd.ts
Normal file
64
src/api/ne/neHostCmd.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询网元主机命令列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listNeHostCmd(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/hostCmd/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元主机命令详细
|
||||
* @param cmdId 网元主机命令ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeHostCmd(cmdId: string | number) {
|
||||
return request({
|
||||
url: `/ne/hostCmd/${cmdId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网元主机命令
|
||||
* @param data 网元主机命令对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addNeHostCmd(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/hostCmd',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网元主机命令
|
||||
* @param data 网元主机命令对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateNeHostCmd(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/hostCmd',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网元主机命令
|
||||
* @param cmdId 网元主机命令ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delNeHostCmd(cmdId: string | number) {
|
||||
return request({
|
||||
url: `/ne/hostCmd/${cmdId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
183
src/api/ne/neInfo.ts
Normal file
183
src/api/ne/neInfo.ts
Normal file
@@ -0,0 +1,183 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询网元列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listNeInfo(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/info/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元信息详细
|
||||
* @param infoId 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeInfo(infoId: string | number) {
|
||||
return request({
|
||||
url: `/ne/info/${infoId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元信息新增
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addNeInfo(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/info`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
crypto: true,
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元信息修改
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateNeInfo(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/info`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
crypto: true,
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元信息删除
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delNeInfo(infoIds: string | number) {
|
||||
return request({
|
||||
url: `/ne/info/${infoIds}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元列表全部无分页
|
||||
* @param query 查询参数 neType neId bandStatus bandHost
|
||||
* @returns object
|
||||
*/
|
||||
export function listAllNeInfo(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/info/listAll',
|
||||
method: 'get',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元状态
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function stateNeInfo(neType: string, neId: string) {
|
||||
return request({
|
||||
url: '/ne/info/state',
|
||||
method: 'get',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元信息
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeInfoByTypeAndID(neType: string, neId: string) {
|
||||
return request({
|
||||
url: '/ne/info/byTypeAndID',
|
||||
method: 'get',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端OAM配置文件读取
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getOAMFile(neType: string, neId: string) {
|
||||
return request({
|
||||
url: '/ne/info/oamFile',
|
||||
method: 'get',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端配置文件写入
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @param content 用json对象
|
||||
* @param sync 同步到网元
|
||||
* @returns object
|
||||
*/
|
||||
export function saveOAMFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/info/oamFile`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端公共配置文件读取
|
||||
* @returns object
|
||||
*/
|
||||
export function getPara5GFilee() {
|
||||
return request({
|
||||
url: '/ne/info/para5GFile',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端公共配置文件写入
|
||||
* @param content txt内容为字符串 其他文件格式都用json对象
|
||||
* @param syncNe 同步到网元端 NeType@ NeId
|
||||
* @returns object
|
||||
*/
|
||||
export function savePara5GFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/info/para5GFile`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元服务操作
|
||||
* @param data 对象 {neType,neId,action}
|
||||
* @returns object
|
||||
*/
|
||||
export function serviceNeAction(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/action/service`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
83
src/api/ne/neLicense.ts
Normal file
83
src/api/ne/neLicense.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询网元授权列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listNeLicense(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/license/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元授权详细
|
||||
* @param licenseId 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeLicense(licenseId: string | number) {
|
||||
return request({
|
||||
url: `/ne/license/${licenseId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元neType和neID查询
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeLicenseByTypeAndID(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/license/byTypeAndID`,
|
||||
method: 'get',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元授权激活授权申请码
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元id
|
||||
* @returns object
|
||||
*/
|
||||
export function codeNeLicense(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/license/code`,
|
||||
method: 'get',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元授权激活授权文件替换
|
||||
* @param data 网元对象 {"neType": "", "neId": "", "licensePath": "", "reload": true}
|
||||
* @returns object
|
||||
*/
|
||||
export function changeNeLicense(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/license/change`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元授权激活状态
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元id
|
||||
* @returns object
|
||||
*/
|
||||
export function stateNeLicense(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/license/state`,
|
||||
method: 'get',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
80
src/api/ne/neSoftware.ts
Normal file
80
src/api/ne/neSoftware.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询网元版本列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listNeSoftware(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/software/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元软件包详细
|
||||
* @param softwareId 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeSoftware(softwareId: string | number) {
|
||||
return request({
|
||||
url: `/ne/software/${softwareId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元软件包新增
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addNeSoftware(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/software`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
repeatSubmit: false,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元软件包修改
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateNeSoftware(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/software`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元软件包删除
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delNeSoftware(softwareIds: string | number) {
|
||||
return request({
|
||||
url: `/ne/software/${softwareIds}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元软件包设为网元新版本
|
||||
* @param data data { "version": "2.2404.18", "neType": "SMF", "name": "smf-r2.2404.18-ub22.deb"}
|
||||
* @returns object
|
||||
*/
|
||||
export function newNeVersion(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/software/newNeVersion`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
41
src/api/ne/neVersion.ts
Normal file
41
src/api/ne/neVersion.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询网元版本列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listNeVersion(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/version/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元版本详细
|
||||
* @param versionId 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeVersion(versionId: string | number) {
|
||||
return request({
|
||||
url: `/ne/version/${versionId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元版本操作
|
||||
* @param data {neType,neId,preinput:{参数},action:"upgrade"}
|
||||
* @returns object
|
||||
*/
|
||||
export function operateNeVersion(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/version/operate`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
42
src/api/neData/amf.ts
Normal file
42
src/api/neData/amf.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询AMF-UE会话事件列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listAMFDataUE(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/amf/ue/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* AMF-UE会话删除
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delAMFDataUE(ueIds: string | number) {
|
||||
return request({
|
||||
url: `/neData/amf/ue/${ueIds}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* AMF-UE会话列表导出
|
||||
* @param data 查询列表条件
|
||||
* @returns object
|
||||
*/
|
||||
export function exportAMFDataUE(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/amf/ue/export',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
42
src/api/neData/ims.ts
Normal file
42
src/api/neData/ims.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询IMS-CDR会话事件
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listIMSDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/ims/cdr/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* IMS-CDR会话删除
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delIMSDataCDR(cdrIds: string | number) {
|
||||
return request({
|
||||
url: `/neData/ims/cdr/${cdrIds}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* IMS-CDR会话列表导出
|
||||
* @param data 查询列表条件
|
||||
* @returns object
|
||||
*/
|
||||
export function exportIMSDataCDR(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/ims/cdr/export',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
42
src/api/neData/mme.ts
Normal file
42
src/api/neData/mme.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询MME-UE会话事件列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listMMEDataUE(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/mme/ue/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* MME-UE会话删除
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delMMEDataUE(ueIds: string | number) {
|
||||
return request({
|
||||
url: `/neData/mme/ue/${ueIds}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* MME-UE会话列表导出
|
||||
* @param data 查询列表条件
|
||||
* @returns object
|
||||
*/
|
||||
export function exportMMEDataUE(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/mme/ue/export',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
55
src/api/neData/smf.ts
Normal file
55
src/api/neData/smf.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询SMF-CDR会话事件
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listSMFDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/smf/cdr/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* SMF-CDR会话删除
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delSMFDataCDR(cdrIds: string | number) {
|
||||
return request({
|
||||
url: `/neData/smf/cdr/${cdrIds}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* SMF-CDR会话列表导出
|
||||
* @param data 查询列表条件
|
||||
* @returns object
|
||||
*/
|
||||
export function exportSMFDataCDR(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/smf/cdr/export',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* SMF-在线订阅用户列表信息
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listSMFSubscribers(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/smf/subscribers',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
42
src/api/neData/smsc.ts
Normal file
42
src/api/neData/smsc.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询SMSC-CDR会话事件
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listSMSCDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/smsc/cdr/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* SMSC-CDR会话删除
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delSMSCDataCDR(cdrIds: string | number) {
|
||||
return request({
|
||||
url: `/neData/smsc/cdr/${cdrIds}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* SMSC-CDR会话列表导出
|
||||
* @param data 查询列表条件
|
||||
* @returns object
|
||||
*/
|
||||
export function exportSMSCDataCDR(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/smsc/cdr/export',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
141
src/api/neData/udm_auth.ts
Normal file
141
src/api/neData/udm_auth.ts
Normal file
@@ -0,0 +1,141 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* UDM鉴权用户重载数据
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function resetUDMAuth(neId: string) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/resetData/${neId}`,
|
||||
method: 'put',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listUDMAuth(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/udm/auth/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户信息
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @returns object
|
||||
*/
|
||||
export function getUDMAuth(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/${neId}/${imsi}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户新增
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addUDMAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/${data.neId}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户批量新增
|
||||
* @param data 鉴权对象
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchAddUDMAuth(data: Record<string, any>, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/${data.neId}/${num}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户修改
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateUDMAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/${data.neId}`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户删除
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @returns object
|
||||
*/
|
||||
export function delUDMAuth(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/${neId}/${imsi}`,
|
||||
method: 'delete',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户批量删除
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchDelUDMAuth(neId: string, imsi: string, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/${neId}/${imsi}/${num}`,
|
||||
method: 'delete',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户导入
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function importUDMAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/import`,
|
||||
method: 'post',
|
||||
data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户导出
|
||||
* @param data 数据参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportUDMAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/udm/auth/export',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
140
src/api/neData/udm_sub.ts
Normal file
140
src/api/neData/udm_sub.ts
Normal file
@@ -0,0 +1,140 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* UDM签约用户重载数据
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function resetUDMSub(neId: string) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/resetData/${neId}`,
|
||||
method: 'put',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listUDMSub(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/udm/sub/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户信息
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @returns object
|
||||
*/
|
||||
export function getUDMSub(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/${neId}/${imsi}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户新增
|
||||
* @param data 签约对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addUDMSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/${data.neId}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户批量新增
|
||||
* @param data 签约对象
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchAddUDMSub(data: Record<string, any>, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/${data.neId}/${num}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户修改
|
||||
* @param data 签约对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateUDMSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/${data.neId}`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户删除
|
||||
* @param data 签约对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delUDMSub(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/${neId}/${imsi}`,
|
||||
method: 'delete',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户批量删除
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchDelUDMSub(neId: string, imsi: string, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/${neId}/${imsi}/${num}`,
|
||||
method: 'delete',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户导出
|
||||
* @param data 数据参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportUDMSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/udm/sub/export',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户导入
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function importUDMSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/import`,
|
||||
method: 'post',
|
||||
data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 签约鉴权导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportAuth(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/udm/auth/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入鉴权数据
|
||||
* @param neId 网元ID
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function importAuthData(data: FormData) {
|
||||
return request({
|
||||
url: `/ne/udm/auth/import`,
|
||||
method: 'post',
|
||||
data,
|
||||
dataType: 'form-data',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询鉴权列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listAuth(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/udm/auth/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询重新更新加载全部
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function loadAuth(neId: string) {
|
||||
return request({
|
||||
url: `/ne/udm/auth/resetData/${neId}`,
|
||||
method: 'put',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询鉴权详细
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getAuth(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/ne/udm/auth/${neId}/${imsi}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改鉴权
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/udm/auth/${data.neId}`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增鉴权
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/udm/auth/${data.neId}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增鉴权
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function batchAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/udm/auth/${data.neID}/${data.num}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除鉴权
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delAuth(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/ne/udm/auth/${neId}/${imsi}`,
|
||||
method: 'delete',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除鉴权
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function batchDelAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/udm/auth/${data.neID}/${data.imsi}/${data.num}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
@@ -25,8 +25,10 @@ export async function listBase5G(query: Record<string, any>) {
|
||||
data.total = rows.length;
|
||||
data.rows = rows;
|
||||
}
|
||||
|
||||
// 模拟数据
|
||||
// data.rows =[{"address":"192.168.1.137:38412","id":"217","name":"","ueNum":0}]
|
||||
// data.rows = [{"address":"192.168.1.137:38412","id":"217","name":"attach-enb-100000-20","ueNum":0}]
|
||||
// data.rows = [{address: "192.168.8.223", id: 257, name: "SmallCell", ueNum: 0}]
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -52,9 +52,11 @@ export async function listUENumByIMS(neId: String) {
|
||||
method: 'get',
|
||||
});
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
return Object.assign(result, {
|
||||
data: result.data['ueNum'],
|
||||
});
|
||||
let num = result.data['ueNum'] || 0;
|
||||
if (num === 0) {
|
||||
num = result.data.data['ueNum'] || 0;
|
||||
}
|
||||
return Object.assign(result, { data: num });
|
||||
}
|
||||
|
||||
// 模拟数据
|
||||
|
||||
@@ -136,14 +136,21 @@ export async function batchUpdateRule(data: Record<string, any>) {
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data?.status) {
|
||||
return {
|
||||
code: RESULT_CODE_ERROR,
|
||||
msg: result.data?.cause,
|
||||
data: result.data,
|
||||
};
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
if (result.data?.status) {
|
||||
return {
|
||||
code: RESULT_CODE_ERROR,
|
||||
msg: result.data?.cause,
|
||||
data: result.data,
|
||||
};
|
||||
}
|
||||
if (result.data?.data) {
|
||||
result.data = result.data.data;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -158,6 +165,7 @@ export async function addRule(data: Record<string, any>) {
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${data.neId}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data?.status) {
|
||||
@@ -180,14 +188,21 @@ export async function batchAddRule(data: Record<string, any>) {
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data?.status) {
|
||||
return {
|
||||
code: RESULT_CODE_ERROR,
|
||||
msg: result.data?.cause,
|
||||
data: result.data,
|
||||
};
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
if (result.data?.status) {
|
||||
return {
|
||||
code: RESULT_CODE_ERROR,
|
||||
msg: result.data?.cause,
|
||||
data: result.data,
|
||||
};
|
||||
}
|
||||
if (result.data?.data) {
|
||||
result.data = result.data.data;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -197,10 +212,11 @@ export async function batchAddRule(data: Record<string, any>) {
|
||||
* @param data 规则对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delRule(neId: string, data: Record<string, any>) {
|
||||
export function delRule(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${data.imsi}`,
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${imsi}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -213,5 +229,6 @@ export async function batchDelRule(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}&imsi=${data.imsi}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
@@ -21,39 +20,66 @@ export async function listUEInfoBySMF(query: Record<string, any>) {
|
||||
msg: result.msg,
|
||||
};
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
const rows = parseObjLineToHump(result.data.data);
|
||||
data.total = rows.length;
|
||||
data.rows = rows;
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data) {
|
||||
if (Array.isArray(result.data.data)) {
|
||||
const rows = result.data.data;
|
||||
data.total = rows.length;
|
||||
data.rows = rows;
|
||||
} else {
|
||||
Object.assign(data, result.data);
|
||||
}
|
||||
}
|
||||
|
||||
// 模拟数据
|
||||
// data.code = RESULT_CODE_SUCCESS;
|
||||
// data.total = 2;
|
||||
// data.rows = [
|
||||
// {
|
||||
// imsi: 'imsi-460029004200044',
|
||||
// msisdn: 'msisdn-12346002044',
|
||||
// imsi: 'imsi-460000100000090',
|
||||
// msisdn: 'msisdn-12307550090',
|
||||
// pduSessionInfo: [
|
||||
// {
|
||||
// activeTime: '2023-11-29 18:39:06',
|
||||
// activeTime: '2024-06-19 14:35:26',
|
||||
// dnn: 'ims',
|
||||
// ipv4: '10.10.48.97',
|
||||
// ipv4: '10.10.48.8',
|
||||
// ipv6: '',
|
||||
// pduSessionID: 6,
|
||||
// ranN3IP: '192.168.8.223',
|
||||
// ranN3IP: '192.168.1.137',
|
||||
// sstSD: '1-000001',
|
||||
// tai: '46000-0001',
|
||||
// tai: '46000-001124',
|
||||
// upState: 'Active',
|
||||
// upfN3IP: '192.168.1.161',
|
||||
// },
|
||||
// {
|
||||
// activeTime: '2023-11-29 18:39:05',
|
||||
// activeTime: '2024-06-19 14:35:26',
|
||||
// dnn: 'cmnet',
|
||||
// ipv4: '10.10.48.62',
|
||||
// ipv4: '10.10.48.9',
|
||||
// ipv6: '2001:4860:4860::/64',
|
||||
// pduSessionID: 7,
|
||||
// ranN3IP: '192.168.1.137',
|
||||
// sstSD: '1-000001',
|
||||
// tai: '46000-001124',
|
||||
// upState: 'Active',
|
||||
// upfN3IP: '192.168.1.161',
|
||||
// },
|
||||
// ],
|
||||
// ratType: 'NR',
|
||||
// },
|
||||
// {
|
||||
// imsi: 'imsi-460602072701180',
|
||||
// msisdn: 'msisdn-123460600080',
|
||||
// pduSessionInfo: [
|
||||
// {
|
||||
// activeTime: '2024-06-19 14:31:09',
|
||||
// dnn: 'cmnet',
|
||||
// ipv4: '10.10.48.4',
|
||||
// ipv6: '',
|
||||
// pduSessionID: 5,
|
||||
// ranN3IP: '192.168.8.223',
|
||||
// sstSD: '1-000001',
|
||||
// tai: '46000-0001',
|
||||
// upfN3IP: '192.168.1.163',
|
||||
// tai: '46060-0001',
|
||||
// upState: 'Active',
|
||||
// upfN3IP: '192.168.1.161',
|
||||
// },
|
||||
// ],
|
||||
// ratType: 'EUTRAN',
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 签约列表导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportSub(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/udm/sub/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入签约数据
|
||||
* @param neId 网元ID
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function importSubData(data: FormData) {
|
||||
return request({
|
||||
url: `/ne/udm/sub/import`,
|
||||
method: 'post',
|
||||
data,
|
||||
dataType: 'form-data',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询重新更新加载全部
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function loadSub(neId: string) {
|
||||
return request({
|
||||
url: `/ne/udm/sub/resetData/${neId}`,
|
||||
method: 'put',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询签约列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listSub(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/udm/sub/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询签约详细
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getSub(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/ne/udm/sub/${neId}/${imsi}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改签约
|
||||
* @param data 签约对象
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function updateSub(neId: string, data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/udm/sub/${neId}`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增签约
|
||||
* @param data 签约对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addSub(neID: string, data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/udm/sub/${neID}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增新增签约
|
||||
* @param data 签约对象
|
||||
* @returns object
|
||||
*/
|
||||
export function batchAddSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/udm/sub/${data.neID}/${data.num}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除签约
|
||||
* @param data 签约对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delSub(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/ne/udm/sub/${neId}/${imsi}`,
|
||||
method: 'delete',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除签约
|
||||
* @param data 签约对象
|
||||
* @returns object
|
||||
*/
|
||||
export function batchDelSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/udm/sub/${data.neID}/${data.imsi}/${data.num}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
19
src/api/perfManage/customData.ts
Normal file
19
src/api/perfManage/customData.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
|
||||
/**
|
||||
* 新 查询自定义指标数据
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listCustomData(query: Record<string, any>) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/pm/kpiC/report`,
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
return result;
|
||||
}
|
||||
127
src/api/perfManage/customTarget.ts
Normal file
127
src/api/perfManage/customTarget.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
|
||||
/**
|
||||
* 查询自定义指标
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
// export async function listCustom(query: Record<string, any>) {
|
||||
// let totalSQL = 'select count(*) as total from pm_custom_title where 1=1 ';
|
||||
// let rowsSQL = 'select * from pm_custom_title where 1=1 ';
|
||||
|
||||
// // 查询
|
||||
// let querySQL = '';
|
||||
// if (query.neType) {
|
||||
// querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
// }
|
||||
|
||||
// // 排序
|
||||
// let sortSql = ' order by update_time ';
|
||||
// if (query.sortOrder === 'asc') {
|
||||
// sortSql += ' asc ';
|
||||
// } else {
|
||||
// sortSql += ' desc ';
|
||||
// }
|
||||
// // 分页
|
||||
// const pageNum = (query.pageNum - 1) * query.pageSize;
|
||||
// const limtSql = ` limit ${pageNum},${query.pageSize} `;
|
||||
|
||||
// // 发起请求
|
||||
// const result = await request({
|
||||
// url: `/api/rest/databaseManagement/v1/select/omc_db/pm_custom_title`,
|
||||
// method: 'get',
|
||||
// params: {
|
||||
// totalSQL: totalSQL + querySQL,
|
||||
// rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
|
||||
// },
|
||||
// });
|
||||
|
||||
// // 解析数据
|
||||
// if (result.code === RESULT_CODE_SUCCESS) {
|
||||
// const data: DataList = {
|
||||
// total: 0,
|
||||
// rows: [],
|
||||
// code: result.code,
|
||||
// msg: result.msg,
|
||||
// };
|
||||
// result.data.data.forEach((item: any) => {
|
||||
// const itemData = item['pm_custom_title'];
|
||||
// if (Array.isArray(itemData)) {
|
||||
// if (itemData.length === 1 && itemData[0]['total'] >= 0) {
|
||||
// data.total = itemData[0]['total'];
|
||||
// } else {
|
||||
// data.rows = itemData.map(v => parseObjLineToHump(v));
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// return data;
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 新 查询自定义指标
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listCustom(query?: Record<string, any>) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/pm/kpiC/title/totalList`,
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询自定义指标详细
|
||||
* @param id 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getCustom(id: string | number) {
|
||||
return request({
|
||||
url: `/pm/kpiC/title/${id}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增自定义指标
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addCustom(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/pm/kpiC/title`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改自定义指标
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateCustom(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/pm/kpiC/title/${data.id}`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除自定义指标
|
||||
* @returns object
|
||||
*/
|
||||
export async function delCustom(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/pm/kpiC/title/${data.id}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* Todo 废弃
|
||||
* 查询黄金指标数据
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
@@ -110,6 +110,7 @@ export async function getKPITitle(neType: string) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Todo 废弃
|
||||
* 查询UPF上下行速率数据
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
@@ -126,9 +127,7 @@ export async function listUPFData(timeArr: any) {
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.03' and timestamp BETWEEN '${parseDateToStr(
|
||||
twentyFourHoursAgo
|
||||
)}' AND '${parseDateToStr(initTime)}' `,
|
||||
SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.03' AND timestamp BETWEEN DATE_SUB(NOW(), INTERVAL 10 MINUTE) AND NOW()`,
|
||||
},
|
||||
timeout: 60_000,
|
||||
}),
|
||||
@@ -137,9 +136,7 @@ export async function listUPFData(timeArr: any) {
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.06' and timestamp BETWEEN '${parseDateToStr(
|
||||
twentyFourHoursAgo
|
||||
)}' AND '${parseDateToStr(initTime)}' `,
|
||||
SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.06' AND timestamp BETWEEN DATE_SUB(NOW(), INTERVAL 10 MINUTE) AND NOW()`,
|
||||
},
|
||||
timeout: 60_000,
|
||||
}),
|
||||
|
||||
@@ -103,7 +103,7 @@ export function addPerfThre(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold`,
|
||||
method: 'post',
|
||||
data: { measure_task: [obj] },
|
||||
data: { measure_threshold: [obj] },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -115,15 +115,15 @@ export function addPerfThre(data: Record<string, any>) {
|
||||
export function updatePerfThre(data: Record<string, any>) {
|
||||
let obj: any = {
|
||||
ne_type: data.neType,
|
||||
kpi_set: data.performanceArr,
|
||||
kpi_set: data.kpiSet,
|
||||
status: 'Inactive',
|
||||
orig_severity: data.origSeverity,
|
||||
threshold: data.threshold,
|
||||
threshold: ''+data.threshold,
|
||||
};
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_task?WHERE=id=${data.id}`,
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold?WHERE=id=${data.id}`,
|
||||
method: 'put',
|
||||
data: { data: obj },
|
||||
data: { measure_threshold: obj },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
52
src/api/system/quick-start/bootloader.ts
Normal file
52
src/api/system/quick-start/bootloader.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 首次引导开始
|
||||
* @returns object
|
||||
*/
|
||||
export function bootloaderStart() {
|
||||
return request({
|
||||
url: `/bootloader`,
|
||||
method: 'post',
|
||||
whithToken: false,
|
||||
repeatSubmit: false,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首次引导完成
|
||||
* @returns object
|
||||
*/
|
||||
export function bootloaderDone() {
|
||||
return request({
|
||||
url: `/bootloader`,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 引导系统数据重置
|
||||
* @returns object
|
||||
*/
|
||||
export function bootloaderReset() {
|
||||
return request({
|
||||
url: `/bootloader`,
|
||||
method: 'delete',
|
||||
timeout: 180_000
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员账号变更
|
||||
* @returns object
|
||||
*/
|
||||
export function bootloaderAccount(username: string, password: string) {
|
||||
return request({
|
||||
url: `/bootloader/account`,
|
||||
method: 'put',
|
||||
data: {
|
||||
username,
|
||||
password,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -18,6 +18,7 @@ export async function downloadFile(filePath: string, range?: string) {
|
||||
method: 'get',
|
||||
headers: range ? { range } : {},
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -79,6 +80,7 @@ export function uploadFile(data: FormData) {
|
||||
method: 'post',
|
||||
data,
|
||||
dataType: 'form-data',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -94,7 +96,12 @@ export async function uploadFileChunk(
|
||||
chunkSize: number = 1,
|
||||
subPath: string = 'default'
|
||||
) {
|
||||
const { name, size } = fileData;
|
||||
let { name, size } = fileData;
|
||||
// 去除非法字符
|
||||
const cleanedFilename = name.replace(/[\\/:*?"<>|]/g, '');
|
||||
// 去除空格
|
||||
name = cleanedFilename.replace(/\s/g, '_');
|
||||
// 数据块大小
|
||||
const chunkSizeInBytes = chunkSize * 1024 * 1024;
|
||||
// 文件标识使用唯一编码 MD5(文件名+文件大小)
|
||||
const fileIdentifier = `${name}-${size}`;
|
||||
@@ -125,6 +132,7 @@ export async function uploadFileChunk(
|
||||
const chunksIndex = `${index}`;
|
||||
// 跳过已上传块
|
||||
if (resCheck.data.includes(chunksIndex)) {
|
||||
uploadedSize += chunk.size;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -163,6 +171,7 @@ export function chunkCheck(identifier: string, fileName: string) {
|
||||
url: '/file/chunkCheck',
|
||||
method: 'post',
|
||||
data: { identifier, fileName },
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -182,6 +191,7 @@ export function chunkMerge(
|
||||
url: '/file/chunkMerge',
|
||||
method: 'post',
|
||||
data: { identifier, fileName, subPath },
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -196,6 +206,7 @@ export function chunkUpload(data: FormData) {
|
||||
method: 'post',
|
||||
data,
|
||||
dataType: 'form-data',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -208,6 +219,7 @@ export function transferStaticFile(data: Record<string, any>) {
|
||||
url: `/file/transferStaticFile`,
|
||||
method: 'post',
|
||||
data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -235,6 +247,7 @@ export async function uploadFileToNE(
|
||||
neType,
|
||||
neId,
|
||||
},
|
||||
timeout: 60_000,
|
||||
});
|
||||
return transferToNeFileRes;
|
||||
}
|
||||
|
||||
20
src/api/tool/iperf.ts
Normal file
20
src/api/tool/iperf.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
// iperf 版本信息
|
||||
export function iperfV(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tool/iperf/v',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// iperf 软件安装
|
||||
export function iperfI(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tool/iperf/i',
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询文件列表列表
|
||||
* 查询网元端文件列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
@@ -14,7 +14,7 @@ export function listNeFiles(query: Record<string, any>) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 从网元端获取文件
|
||||
* 从网元到本地获取文件
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
@@ -27,3 +27,24 @@ export function getNeFile(query: Record<string, any>) {
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
// 从网元到本地获取目录压缩为ZIP
|
||||
export function getNeDirZip(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/pullDirZip',
|
||||
method: 'get',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
// 查看网元端文件内容
|
||||
export function getNeViewFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/viewFile',
|
||||
method: 'get',
|
||||
params: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
10
src/api/tool/ping.ts
Normal file
10
src/api/tool/ping.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
// ping 网元端版本信息
|
||||
export function pingV(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tool/ping/v',
|
||||
method: 'get',
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
64
src/api/trace/packet.ts
Normal file
64
src/api/trace/packet.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 信令跟踪网卡设备列表
|
||||
* @returns
|
||||
*/
|
||||
export function packetDevices() {
|
||||
return request({
|
||||
url: '/trace/packet/devices',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 信令跟踪开始
|
||||
* @param data 对象
|
||||
* @returns
|
||||
*/
|
||||
export function packetStart(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/trace/packet/start',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 信令跟踪结束
|
||||
* @param data 对象
|
||||
* @returns
|
||||
*/
|
||||
export function packetStop(taskNo: string) {
|
||||
return request({
|
||||
url: '/trace/packet/stop',
|
||||
method: 'post',
|
||||
data: { taskNo },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 信令跟踪过滤
|
||||
* @param data 对象
|
||||
* @returns
|
||||
*/
|
||||
export function packetFilter(taskNo: string, expr: string) {
|
||||
return request({
|
||||
url: '/trace/packet/filter',
|
||||
method: 'put',
|
||||
data: { taskNo, expr },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 信令跟踪续期保活
|
||||
* @param data 对象
|
||||
* @returns
|
||||
*/
|
||||
export function packetKeep(taskNo: string, duration: number = 120) {
|
||||
return request({
|
||||
url: '/trace/packet/keep-alive',
|
||||
method: 'put',
|
||||
data: { taskNo, duration },
|
||||
});
|
||||
}
|
||||
@@ -3,26 +3,29 @@ import { request } from '@/plugins/http-fetch';
|
||||
// 网元抓包PACP 开始
|
||||
export function dumpStart(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tcpdump/start',
|
||||
url: '/trace/tcpdump/start',
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
// 网元抓包PACP 结束
|
||||
export function dumpStop(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tcpdump/stop',
|
||||
url: '/trace/tcpdump/stop',
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
// UPF标准版内部抓包
|
||||
export function traceUPF(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tcpdump/traceUPF',
|
||||
url: '/trace/tcpdump/upf',
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
104
src/api/trace/task.ts
Normal file
104
src/api/trace/task.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询跟踪任务列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listTraceTask(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/trace/task/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询跟踪任务信息
|
||||
* @param id 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getTraceTask(id: string | number) {
|
||||
return request({
|
||||
url: `/trace/task/${id}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addTraceTask(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/trace/task`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateTraceTask(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/trace/task`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 跟踪任务删除
|
||||
* @param ids ID多个逗号分隔
|
||||
* @returns object
|
||||
*/
|
||||
export async function delTraceTask(ids: string) {
|
||||
return request({
|
||||
url: `/trace/task/${ids}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 跟踪任务文件
|
||||
* @param query 对象
|
||||
* @returns object
|
||||
*/
|
||||
export function filePullTask(traceId: string) {
|
||||
return request({
|
||||
url: '/trace/task/filePull',
|
||||
method: 'get',
|
||||
params: { traceId },
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网元跟踪接口列表
|
||||
* @returns object
|
||||
*/
|
||||
export async function getNeTraceInterfaceAll() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/ne_info`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT ne_type,interface FROM trace_info GROUP BY ne_type,interface`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['trace_info']),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
83
src/api/trace/taskHLR.ts
Normal file
83
src/api/trace/taskHLR.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询跟踪任务列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listTaskHLR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/trace/task/hlr/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 跟踪任务删除
|
||||
* @param ids 任务ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delTaskHLR(ids: string | number) {
|
||||
return request({
|
||||
url: `/trace/task/hlr/${ids}`,
|
||||
method: 'delete',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 跟踪任务创建
|
||||
* @param data 对象
|
||||
* @returns object
|
||||
*/
|
||||
export function startTaskHLR(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/trace/task/hlr/start',
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 跟踪任务停止
|
||||
* @param data 对象
|
||||
* @returns object
|
||||
*/
|
||||
export function stopTaskHLR(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/trace/task/hlr/stop',
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 跟踪任务文件
|
||||
* @param data 对象
|
||||
* @returns object
|
||||
*/
|
||||
export function fileTaskHLR(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/trace/task/hlr/file',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 跟踪任务文件从网元到本地
|
||||
* @param query 对象
|
||||
* @returns object
|
||||
*/
|
||||
export function filePullTaskHLR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/trace/task/hlr/filePull',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询任务列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listTraceTask(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from trace_task where 1=1 ';
|
||||
let rowsSQL = 'select * from trace_task where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.imsi) {
|
||||
querySQL += ` and imsi like '%${query.imsi}%' `;
|
||||
}
|
||||
if (query.beginTime) {
|
||||
querySQL += ` and start_time >= '${query.beginTime}' `;
|
||||
}
|
||||
if (query.endTime) {
|
||||
querySQL += ` and end_time <= '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 分页
|
||||
const pageNum = (query.pageNum - 1) * query.pageSize;
|
||||
const limtSql = ` limit ${pageNum},${query.pageSize} `;
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by start_time ';
|
||||
if (query.sortOrder === 'asc') {
|
||||
sortSql += ' asc ';
|
||||
} else {
|
||||
sortSql += ' desc ';
|
||||
}
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/trace_task`,
|
||||
method: 'get',
|
||||
params: {
|
||||
totalSQL: totalSQL + querySQL,
|
||||
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
|
||||
},
|
||||
});
|
||||
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
const data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
msg: result.msg,
|
||||
};
|
||||
result.data.data.forEach((item: any) => {
|
||||
const itemData = item['trace_task'];
|
||||
if (Array.isArray(itemData)) {
|
||||
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
|
||||
data.total = itemData[0]['total'];
|
||||
} else {
|
||||
data.rows = itemData.map(v => parseObjLineToHump(v));
|
||||
}
|
||||
}
|
||||
});
|
||||
return data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询任务详细
|
||||
* @param id 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getTraceTask(id: string | number) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/trace_task`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `select * from trace_task where id = ${id}`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['trace_task'][0]),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addTraceTask(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/traceManagement/v1/subscriptions`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateTraceTask(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/traceManagement/v1/subscriptions`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
* @param noticeId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function delTraceTask(id: string) {
|
||||
return request({
|
||||
url: `/api/rest/traceManagement/v1/subscriptions?id=${id}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网元跟踪接口列表
|
||||
* @returns object
|
||||
*/
|
||||
export async function getNeTraceInterfaceAll() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/ne_info`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT ne_type,interface FROM trace_info GROUP BY ne_type,interface`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['trace_info']),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
11
src/assets/js/wiregasm_worker.ts
Normal file
11
src/assets/js/wiregasm_worker.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* worker文件-静态资源文件路径
|
||||
*/
|
||||
const baseUrl = import.meta.env.VITE_HISTORY_BASE_URL;
|
||||
export const scriptUrl = `${
|
||||
baseUrl.length === 1 && baseUrl.indexOf('/') === 0
|
||||
? ''
|
||||
: baseUrl.indexOf('/') === -1
|
||||
? '/' + baseUrl
|
||||
: baseUrl
|
||||
}/wiregasm/worker.js`;
|
||||
@@ -1,70 +1,117 @@
|
||||
<template>
|
||||
<codemirror
|
||||
:model-value="modelValue"
|
||||
:placeholder="props.placeholder"
|
||||
:style="props.editorStyle"
|
||||
:disabled="props.disabled"
|
||||
:autofocus="false"
|
||||
:indent-with-tab="true"
|
||||
:tab-size="props.tabSize"
|
||||
:extensions="[javascript(), oneDark]"
|
||||
@ready="fnReady"
|
||||
@change="fnChange"
|
||||
/>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { Codemirror } from 'vue-codemirror';
|
||||
import { javascript } from '@codemirror/lang-javascript';
|
||||
import { yaml } from '@codemirror/lang-yaml';
|
||||
import { oneDark } from '@codemirror/theme-one-dark';
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
const emit = defineEmits(['update:value']);
|
||||
import { basicSetup, EditorView } from 'codemirror';
|
||||
import { indentWithTab } from '@codemirror/commands';
|
||||
import { keymap } from '@codemirror/view';
|
||||
import { EditorState } from '@codemirror/state';
|
||||
import { ref, watch, onMounted, onBeforeUnmount } from 'vue';
|
||||
const emit = defineEmits(['update:value', 'change']);
|
||||
const props = defineProps({
|
||||
/**禁用输入使用v-model:value时不生效 */
|
||||
value: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
placeholder: {
|
||||
/**编辑框高度 */
|
||||
height: {
|
||||
type: String,
|
||||
default: 'input context here...',
|
||||
},
|
||||
/**是否禁止输入 */
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
editorStyle: {
|
||||
type: Object,
|
||||
default: () => ({ height: '400px !important' }),
|
||||
default: '400px',
|
||||
},
|
||||
/**缩进2空格 */
|
||||
tabSize: {
|
||||
type: Number,
|
||||
default: 2,
|
||||
},
|
||||
/**是否禁止输入 */
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
/**高亮语言 支持javascript、yaml */
|
||||
lang: {
|
||||
type: String,
|
||||
default: 'javascript',
|
||||
},
|
||||
});
|
||||
|
||||
// 绑定值
|
||||
const modelValue = ref<string>('');
|
||||
/**视图容器 */
|
||||
const viewContainerDom = ref<HTMLElement | undefined>(undefined);
|
||||
let viewContainer: EditorView | null = null;
|
||||
|
||||
/**变更时更新绑定值 */
|
||||
function fnChange(value: string, viewUpdate: any) {
|
||||
if (props.disabled) return;
|
||||
emit('update:value', value);
|
||||
/**高亮语言拓展 */
|
||||
function fnLangExtension() {
|
||||
if (props.lang === 'yaml') {
|
||||
return yaml();
|
||||
}
|
||||
return javascript();
|
||||
}
|
||||
|
||||
/**组件渲染后 */
|
||||
function fnReady(payload: any) {
|
||||
modelValue.value = props.value;
|
||||
/**初始化渲染视图 */
|
||||
function handleRanderView(container: HTMLElement | undefined) {
|
||||
if (!container) return;
|
||||
viewContainer = new EditorView({
|
||||
doc: props.value,
|
||||
extensions: [
|
||||
oneDark,
|
||||
basicSetup,
|
||||
keymap.of([indentWithTab]),
|
||||
fnLangExtension(),
|
||||
EditorView.editable.of(!props.disabled),
|
||||
EditorState.readOnly.of(props.disabled),
|
||||
EditorState.tabSize.of(props.tabSize),
|
||||
EditorView.updateListener.of(v => {
|
||||
if (v.docChanged) {
|
||||
const docStr = v.state.doc.toString();
|
||||
emit('change', docStr, v.state.doc);
|
||||
// 禁用时不双向绑定,防止监听重复变化数值
|
||||
if (!props.disabled) {
|
||||
emit('update:value', docStr);
|
||||
}
|
||||
}
|
||||
}),
|
||||
],
|
||||
parent: container,
|
||||
});
|
||||
}
|
||||
|
||||
/**监听是否value改变 */
|
||||
watch(
|
||||
() => props.value,
|
||||
val => {
|
||||
modelValue.value = val;
|
||||
// 禁用时无输入靠外部值变化改变数值
|
||||
if (props.disabled && viewContainer) {
|
||||
const docLine = viewContainer.state.doc.length;
|
||||
viewContainer.dispatch({
|
||||
changes: { from: 0, to: docLine, insert: val },
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
handleRanderView(viewContainerDom.value);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
viewContainer?.destroy();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
<template>
|
||||
<div
|
||||
ref="viewContainerDom"
|
||||
class="container"
|
||||
:style="{ '--editor-height': height }"
|
||||
></div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
--editor-height: 400px;
|
||||
}
|
||||
.container :deep(.cm-editor) {
|
||||
height: var(--editor-height);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,116 +1,131 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="props.title"
|
||||
width="80%"
|
||||
:visible="props.visible"
|
||||
:body-style="{ padding: '0 24px' }"
|
||||
:destroy-on-close="true"
|
||||
@cancel="fnCronModal(false)"
|
||||
@ok="fnCronModal(true)"
|
||||
>
|
||||
<div ref="mergeViewContainer" class="mergeViewContainer"></div>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { javascript } from '@codemirror/lang-javascript';
|
||||
import { yaml } from '@codemirror/lang-yaml';
|
||||
import { oneDark } from '@codemirror/theme-one-dark';
|
||||
import { MergeView } from '@codemirror/merge';
|
||||
import { EditorView, basicSetup } from 'codemirror';
|
||||
import { EditorState } from '@codemirror/state';
|
||||
|
||||
import { watch, ref } from 'vue';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const emit = defineEmits(['cancel', 'ok', 'update:visible']);
|
||||
import { ref, onMounted, onBeforeUnmount, watch } from 'vue';
|
||||
const emit = defineEmits(['update:newArea', 'change']);
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '内容比较',
|
||||
},
|
||||
newArea: {
|
||||
type: String,
|
||||
default: '当前内容',
|
||||
},
|
||||
oldArea: {
|
||||
type: String,
|
||||
default: '原始内容',
|
||||
},
|
||||
/**当前变更内容 */
|
||||
newArea: {
|
||||
type: String,
|
||||
default: '当前内容',
|
||||
},
|
||||
/**编辑框高度 */
|
||||
height: {
|
||||
type: String,
|
||||
default: '400px !important',
|
||||
default: '400px',
|
||||
},
|
||||
/**缩进2空格 */
|
||||
tabSize: {
|
||||
type: Number,
|
||||
default: 2,
|
||||
},
|
||||
/**是否禁止输入 */
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
/**高亮语言 */
|
||||
lang: {
|
||||
type: String,
|
||||
default: 'javascript',
|
||||
},
|
||||
});
|
||||
|
||||
const mergeViewContainer = ref();
|
||||
/**视图容器 */
|
||||
const viewContainerDom = ref<HTMLElement | undefined>(undefined);
|
||||
let viewContainer: MergeView | null = null;
|
||||
|
||||
/**监听是否显示,初始cron属性 */
|
||||
/**高亮语言拓展 */
|
||||
function fnLangExtension() {
|
||||
if (props.lang === 'yaml') {
|
||||
return yaml();
|
||||
}
|
||||
return javascript();
|
||||
}
|
||||
|
||||
/**初始化渲染视图 */
|
||||
function handleRanderView(container: HTMLElement | undefined) {
|
||||
if (!container) return;
|
||||
viewContainer = new MergeView({
|
||||
a: {
|
||||
doc: props.oldArea,
|
||||
extensions: [
|
||||
fnLangExtension(),
|
||||
oneDark,
|
||||
basicSetup,
|
||||
EditorView.editable.of(false),
|
||||
EditorState.readOnly.of(true),
|
||||
],
|
||||
},
|
||||
b: {
|
||||
doc: props.newArea,
|
||||
extensions: [
|
||||
fnLangExtension(),
|
||||
oneDark,
|
||||
basicSetup,
|
||||
EditorView.editable.of(!props.disabled),
|
||||
EditorState.readOnly.of(props.disabled),
|
||||
EditorState.tabSize.of(props.tabSize),
|
||||
EditorView.updateListener.of(v => {
|
||||
if (v.docChanged) {
|
||||
const docStr = v.state.doc.toString();
|
||||
emit('change', docStr, v.state.doc);
|
||||
// 禁用时不双向绑定,防止监听重复变化数值
|
||||
if (!props.disabled) {
|
||||
emit('update:newArea', docStr);
|
||||
}
|
||||
}
|
||||
}),
|
||||
],
|
||||
},
|
||||
parent: container,
|
||||
});
|
||||
}
|
||||
|
||||
/**监听是否value改变 */
|
||||
watch(
|
||||
() => props.visible,
|
||||
() => props.newArea,
|
||||
val => {
|
||||
if (val) {
|
||||
// 开启时等待dom完成
|
||||
|
||||
nextTick(() => {
|
||||
// 设置高度
|
||||
mergeViewContainer.value.style.height = props.height;
|
||||
// 实例到dom
|
||||
new MergeView({
|
||||
a: {
|
||||
doc: props.oldArea,
|
||||
extensions: [
|
||||
javascript(),
|
||||
oneDark,
|
||||
basicSetup,
|
||||
EditorView.editable.of(false),
|
||||
EditorState.readOnly.of(true),
|
||||
],
|
||||
},
|
||||
b: {
|
||||
doc: props.newArea,
|
||||
extensions: [
|
||||
javascript(),
|
||||
oneDark,
|
||||
basicSetup,
|
||||
EditorView.editable.of(!props.disabled),
|
||||
EditorState.readOnly.of(props.disabled),
|
||||
],
|
||||
},
|
||||
parent: mergeViewContainer.value,
|
||||
});
|
||||
// 禁用时无输入靠外部值变化改变数值
|
||||
if (props.disabled && viewContainer) {
|
||||
const docLine = viewContainer.b.state.doc.length;
|
||||
viewContainer.b.dispatch({
|
||||
changes: { from: 0, to: docLine, insert: val },
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* 窗口事件
|
||||
* @param val modal触发事件
|
||||
*/
|
||||
function fnCronModal(val: boolean) {
|
||||
emit('update:visible', false);
|
||||
if (val) {
|
||||
emit('ok', true);
|
||||
} else {
|
||||
emit('cancel');
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
handleRanderView(viewContainerDom.value);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
viewContainer?.destroy();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
ref="viewContainerDom"
|
||||
class="container"
|
||||
:style="{ '--editor-height': height }"
|
||||
></div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.mergeViewContainer {
|
||||
height: 400px;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
color: #abb2bf;
|
||||
background-color: #282c34;
|
||||
.container {
|
||||
--editor-height: 400px;
|
||||
}
|
||||
.container :deep(.cm-editor) {
|
||||
height: var(--editor-height);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<a-modal
|
||||
<ProModal
|
||||
:drag="true"
|
||||
:destroyOnClose="true"
|
||||
:title="t('components.CronModal.title')"
|
||||
:visible="props.visible"
|
||||
:body-style="{ padding: '0 24px' }"
|
||||
:destroy-on-close="true"
|
||||
@cancel="fnCronModal(false)"
|
||||
@ok="fnCronModal(true)"
|
||||
>
|
||||
@@ -31,7 +32,7 @@
|
||||
v-model:value="cronStr"
|
||||
disabled
|
||||
/>
|
||||
</a-modal>
|
||||
</ProModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import CronSecond from './components/Second.vue';
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { computed, PropType } from 'vue';
|
||||
const props = defineProps({
|
||||
/**数据 */
|
||||
options: {
|
||||
type: Array,
|
||||
type: Array as PropType<DictType[]>,
|
||||
},
|
||||
/**当前的值对应数据中的项字段 */
|
||||
valueField: {
|
||||
type: String,
|
||||
type: String as PropType<keyof DictType>,
|
||||
default: 'value',
|
||||
},
|
||||
/**当前的值 */
|
||||
@@ -15,14 +15,24 @@ const props = defineProps({
|
||||
type: [Number, String],
|
||||
default: '',
|
||||
},
|
||||
/**数据默认值,当前值不存在时 */
|
||||
valueDefault: {
|
||||
type: [Number, String],
|
||||
},
|
||||
});
|
||||
|
||||
/**遍历找到对应值数据项 */
|
||||
const item = computed(() => {
|
||||
if (Array.isArray(props.options) && props.options.length > 0) {
|
||||
const option = (props.options as any[]).find(
|
||||
let option = props.options.find(
|
||||
item => `${item[props.valueField]}` === `${props.value}`
|
||||
);
|
||||
// 数据默认值
|
||||
if (!option && props.valueDefault != undefined) {
|
||||
option = props.options.find(
|
||||
item => `${item[props.valueField]}` === `${props.valueDefault}`
|
||||
);
|
||||
}
|
||||
return option;
|
||||
}
|
||||
return undefined;
|
||||
@@ -31,14 +41,10 @@ const item = computed(() => {
|
||||
|
||||
<template>
|
||||
<template v-if="item">
|
||||
<a-tag
|
||||
v-if="item.elTagType"
|
||||
:class="item.elTagClass"
|
||||
:color="item.elTagType"
|
||||
>
|
||||
<a-tag v-if="item.tagType" :class="item.tagClass" :color="item.tagType">
|
||||
{{ item.label }}
|
||||
</a-tag>
|
||||
<span v-else :class="item.elTagClass">
|
||||
<span v-else :class="item.tagClass">
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, watchEffect, CSSProperties, computed } from 'vue';
|
||||
import { useDraggable } from '@vueuse/core';
|
||||
const emit = defineEmits(['update:visible', 'ok', 'cancel']);
|
||||
/**于a-modal保持一致 */
|
||||
const props = defineProps({
|
||||
/**是否弹出显示,必传 */
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
/**窗口标题 */
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
/**窗口宽度 */
|
||||
width: {
|
||||
type: [String, Number],
|
||||
default: '520px',
|
||||
},
|
||||
bodyStyle: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
keyboard: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
mask: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
maskClosable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
maskStyle: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
destroyOnClose: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
confirmLoading: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
footer: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
|
||||
// 对标题进行监听
|
||||
const modalTitleRef = ref<HTMLElement | null>(null);
|
||||
const { x, y, isDragging } = useDraggable(modalTitleRef);
|
||||
|
||||
const startX = ref<number>(0);
|
||||
const startY = ref<number>(0);
|
||||
const startedDrag = ref(false);
|
||||
const transformX = ref(0);
|
||||
const transformY = ref(0);
|
||||
const preTransformX = ref(0);
|
||||
const preTransformY = ref(0);
|
||||
const dragRect = ref({ left: 0, right: 0, top: 0, bottom: 0 });
|
||||
|
||||
watch([x, y], () => {
|
||||
if (!startedDrag.value) {
|
||||
startX.value = x.value;
|
||||
startY.value = y.value;
|
||||
const bodyRect = document.body.getBoundingClientRect();
|
||||
const titleRectEl = modalTitleRef.value;
|
||||
if (titleRectEl) {
|
||||
const titleRect = titleRectEl.getBoundingClientRect();
|
||||
dragRect.value.right = bodyRect.width - (titleRect.width + 24);
|
||||
dragRect.value.bottom = bodyRect.height - (titleRect.height + 16);
|
||||
}
|
||||
preTransformX.value = transformX.value;
|
||||
preTransformY.value = transformY.value;
|
||||
}
|
||||
startedDrag.value = true;
|
||||
});
|
||||
|
||||
watchEffect(() => {
|
||||
if (!isDragging.value) {
|
||||
startedDrag.value = false;
|
||||
}
|
||||
if (startedDrag.value) {
|
||||
const dragRectX = Math.min(
|
||||
Math.max(dragRect.value.left + 24, x.value),
|
||||
dragRect.value.right
|
||||
);
|
||||
transformX.value = preTransformX.value + dragRectX - startX.value;
|
||||
|
||||
const dragRectY = Math.min(
|
||||
Math.max(dragRect.value.top + 16, y.value),
|
||||
dragRect.value.bottom
|
||||
);
|
||||
transformY.value = preTransformY.value + dragRectY - startY.value;
|
||||
}
|
||||
});
|
||||
|
||||
// 位移
|
||||
const transformStyle = computed<CSSProperties>(() => {
|
||||
return {
|
||||
transform: `translate(${transformX.value}px, ${transformY.value}px)`,
|
||||
};
|
||||
});
|
||||
|
||||
/**监听是否显示,位置还原 */
|
||||
watch(
|
||||
() => props.visible,
|
||||
val => {
|
||||
if (val) {
|
||||
transformX.value = 0;
|
||||
transformY.value = 0;
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal
|
||||
wrapClassName="draggable-modal"
|
||||
:width="props.width"
|
||||
:keyboard="props.keyboard"
|
||||
:mask="props.mask"
|
||||
:mask-closable="props.maskClosable"
|
||||
:visible="props.visible"
|
||||
:confirm-loading="props.confirmLoading"
|
||||
:body-style="props.bodyStyle"
|
||||
:mask-style="props.maskStyle"
|
||||
:destroy-on-close="props.destroyOnClose"
|
||||
:footer="props.footer"
|
||||
@ok="(e:any) => emit('ok', e)"
|
||||
@cancel="(e:any) => emit('cancel', e)"
|
||||
>
|
||||
<template #title>
|
||||
<div
|
||||
ref="modalTitleRef"
|
||||
class="draggable-modal-title"
|
||||
v-text="title"
|
||||
></div>
|
||||
</template>
|
||||
<template #modalRender="{ originVNode }">
|
||||
<div :style="transformStyle">
|
||||
<component :is="originVNode" />
|
||||
</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<style lang="less">
|
||||
.draggable-modal {
|
||||
// 穿透选择文字
|
||||
// 给a-modal设置 get-container=".ant-pro-page-container"
|
||||
// 防止跳转显示
|
||||
// &.ant-modal-wrap {
|
||||
// pointer-events: none;
|
||||
// }
|
||||
&-title {
|
||||
width: 100%;
|
||||
cursor: move;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
141
src/components/GlobalMask/index.vue
Normal file
141
src/components/GlobalMask/index.vue
Normal file
@@ -0,0 +1,141 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, computed } from 'vue';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useMaskStore from '@/store/modules/mask';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useThrottleFn } from '@vueuse/core';
|
||||
import { getConfigKey } from '@/api/system/config';
|
||||
const maskStore = useMaskStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**显示遮罩 */
|
||||
const isVisible = computed(() => !['none', 'lock'].includes(maskStore.type));
|
||||
|
||||
// 用户无操作一段时间后进行锁屏
|
||||
function idleTimeout(time: number, callback: Function) {
|
||||
if (time === 0) return;
|
||||
let timeoutId: any;
|
||||
let idleTime = 0;
|
||||
function resetIdleTime() {
|
||||
idleTime = 0;
|
||||
}
|
||||
// 监听用户活动事件
|
||||
document.addEventListener('mousemove', useThrottleFn(resetIdleTime, 1000));
|
||||
document.addEventListener('keydown', useThrottleFn(resetIdleTime, 1000));
|
||||
document.addEventListener('click', useThrottleFn(resetIdleTime, 1000));
|
||||
// 定时检查用户是否长时间无操作
|
||||
timeoutId = setInterval(() => {
|
||||
idleTime += 1000;
|
||||
if (idleTime >= time) {
|
||||
clearTimeout(timeoutId);
|
||||
callback();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
/**组件实例挂载之后调用 */
|
||||
onMounted(() => {
|
||||
// 本地锁定类型设置;
|
||||
maskStore.handleMaskType(maskStore.type);
|
||||
getConfigKey('sys.lockTime')
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||
maskStore.lockTimeout = +res.data;
|
||||
}
|
||||
maskStore.handleMaskType(maskStore.type);
|
||||
// 是锁屏的调整到页面
|
||||
if (maskStore.type === 'lock') {
|
||||
maskStore.handleMaskType('lock');
|
||||
router.push({ name: 'LockScreen', query: { redirect: route.path } });
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
// 无操作x秒后跳转锁屏
|
||||
idleTimeout(maskStore.lockTimeout * 1000, () => {
|
||||
if (route.name === 'LockScreen') return;
|
||||
maskStore.handleMaskType('lock');
|
||||
router.push({ name: 'LockScreen', query: { redirect: route.path } });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/**组件实例被卸载之后调用 */
|
||||
onUnmounted(() => {});
|
||||
</script>
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:visible="isVisible"
|
||||
get-container="#app"
|
||||
:footer="null"
|
||||
:zIndex="1008"
|
||||
:closable="false"
|
||||
:keyboard="false"
|
||||
:centered="true"
|
||||
:maskClosable="false"
|
||||
:maskStyle="{
|
||||
backdropFilter: 'blur(10px)',
|
||||
WebkitBackdropFilter: 'blur(10px)',
|
||||
}"
|
||||
wrapClassName="lock-screen"
|
||||
:wrap-style="{
|
||||
background: 'rgba(0, 0, 0, 0.85)',
|
||||
}"
|
||||
>
|
||||
<!-- 锁屏-OMC重启升级 -->
|
||||
<div class="lock-screen_reload" v-if="maskStore.type === 'reload'">
|
||||
<LoadingOutlined style="font-size: 56px" />
|
||||
<div class="text">
|
||||
{{ t('components.LockScreen.backReload') }}
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{ t('components.LockScreen.backReload2') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 锁屏-OMC系统重置 -->
|
||||
<div class="lock-screen_reload" v-if="maskStore.type === 'reset'">
|
||||
<LoadingOutlined style="font-size: 56px" />
|
||||
<div class="text">
|
||||
{{ t('components.LockScreen.systemReset') }}
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{ t('components.LockScreen.systemReset2') }}
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.lock-screen_reload {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: transparent;
|
||||
|
||||
color: #fff;
|
||||
|
||||
& .text {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 4px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
& .desc {
|
||||
margin-top: 8px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
.lock-screen {
|
||||
.ant-modal-content {
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
252
src/components/IntlTelInput/i18n/en/countries.ts
Normal file
252
src/components/IntlTelInput/i18n/en/countries.ts
Normal file
@@ -0,0 +1,252 @@
|
||||
//* THIS FILE IS AUTO-GENERATED. DO NOT EDIT.
|
||||
export default {
|
||||
af: "Afghanistan",
|
||||
ax: "Åland Islands",
|
||||
al: "Albania",
|
||||
dz: "Algeria",
|
||||
as: "American Samoa",
|
||||
ad: "Andorra",
|
||||
ao: "Angola",
|
||||
ai: "Anguilla",
|
||||
aq: "Antarctica",
|
||||
ag: "Antigua & Barbuda",
|
||||
ar: "Argentina",
|
||||
am: "Armenia",
|
||||
aw: "Aruba",
|
||||
au: "Australia",
|
||||
at: "Austria",
|
||||
az: "Azerbaijan",
|
||||
bs: "Bahamas",
|
||||
bh: "Bahrain",
|
||||
bd: "Bangladesh",
|
||||
bb: "Barbados",
|
||||
by: "Belarus",
|
||||
be: "Belgium",
|
||||
bz: "Belize",
|
||||
bj: "Benin",
|
||||
bm: "Bermuda",
|
||||
bt: "Bhutan",
|
||||
bo: "Bolivia",
|
||||
ba: "Bosnia & Herzegovina",
|
||||
bw: "Botswana",
|
||||
bv: "Bouvet Island",
|
||||
br: "Brazil",
|
||||
io: "British Indian Ocean Territory",
|
||||
vg: "British Virgin Islands",
|
||||
bn: "Brunei",
|
||||
bg: "Bulgaria",
|
||||
bf: "Burkina Faso",
|
||||
bi: "Burundi",
|
||||
kh: "Cambodia",
|
||||
cm: "Cameroon",
|
||||
ca: "Canada",
|
||||
cv: "Cape Verde",
|
||||
bq: "Caribbean Netherlands",
|
||||
ky: "Cayman Islands",
|
||||
cf: "Central African Republic",
|
||||
td: "Chad",
|
||||
cl: "Chile",
|
||||
cn: "China",
|
||||
cx: "Christmas Island",
|
||||
cc: "Cocos (Keeling) Islands",
|
||||
co: "Colombia",
|
||||
km: "Comoros",
|
||||
cg: "Congo - Brazzaville",
|
||||
cd: "Congo - Kinshasa",
|
||||
ck: "Cook Islands",
|
||||
cr: "Costa Rica",
|
||||
ci: "Côte d’Ivoire",
|
||||
hr: "Croatia",
|
||||
cu: "Cuba",
|
||||
cw: "Curaçao",
|
||||
cy: "Cyprus",
|
||||
cz: "Czechia",
|
||||
dk: "Denmark",
|
||||
dj: "Djibouti",
|
||||
dm: "Dominica",
|
||||
do: "Dominican Republic",
|
||||
ec: "Ecuador",
|
||||
eg: "Egypt",
|
||||
sv: "El Salvador",
|
||||
gq: "Equatorial Guinea",
|
||||
er: "Eritrea",
|
||||
ee: "Estonia",
|
||||
sz: "Eswatini",
|
||||
et: "Ethiopia",
|
||||
fk: "Falkland Islands",
|
||||
fo: "Faroe Islands",
|
||||
fj: "Fiji",
|
||||
fi: "Finland",
|
||||
fr: "France",
|
||||
gf: "French Guiana",
|
||||
pf: "French Polynesia",
|
||||
tf: "French Southern Territories",
|
||||
ga: "Gabon",
|
||||
gm: "Gambia",
|
||||
ge: "Georgia",
|
||||
de: "Germany",
|
||||
gh: "Ghana",
|
||||
gi: "Gibraltar",
|
||||
gr: "Greece",
|
||||
gl: "Greenland",
|
||||
gd: "Grenada",
|
||||
gp: "Guadeloupe",
|
||||
gu: "Guam",
|
||||
gt: "Guatemala",
|
||||
gg: "Guernsey",
|
||||
gn: "Guinea",
|
||||
gw: "Guinea-Bissau",
|
||||
gy: "Guyana",
|
||||
ht: "Haiti",
|
||||
hm: "Heard & McDonald Islands",
|
||||
hn: "Honduras",
|
||||
hk: "Hong Kong SAR China",
|
||||
hu: "Hungary",
|
||||
is: "Iceland",
|
||||
in: "India",
|
||||
id: "Indonesia",
|
||||
ir: "Iran",
|
||||
iq: "Iraq",
|
||||
ie: "Ireland",
|
||||
im: "Isle of Man",
|
||||
il: "Israel",
|
||||
it: "Italy",
|
||||
jm: "Jamaica",
|
||||
jp: "Japan",
|
||||
je: "Jersey",
|
||||
jo: "Jordan",
|
||||
kz: "Kazakhstan",
|
||||
ke: "Kenya",
|
||||
ki: "Kiribati",
|
||||
kw: "Kuwait",
|
||||
kg: "Kyrgyzstan",
|
||||
la: "Laos",
|
||||
lv: "Latvia",
|
||||
lb: "Lebanon",
|
||||
ls: "Lesotho",
|
||||
lr: "Liberia",
|
||||
ly: "Libya",
|
||||
li: "Liechtenstein",
|
||||
lt: "Lithuania",
|
||||
lu: "Luxembourg",
|
||||
mo: "Macao SAR China",
|
||||
mg: "Madagascar",
|
||||
mw: "Malawi",
|
||||
my: "Malaysia",
|
||||
mv: "Maldives",
|
||||
ml: "Mali",
|
||||
mt: "Malta",
|
||||
mh: "Marshall Islands",
|
||||
mq: "Martinique",
|
||||
mr: "Mauritania",
|
||||
mu: "Mauritius",
|
||||
yt: "Mayotte",
|
||||
mx: "Mexico",
|
||||
fm: "Micronesia",
|
||||
md: "Moldova",
|
||||
mc: "Monaco",
|
||||
mn: "Mongolia",
|
||||
me: "Montenegro",
|
||||
ms: "Montserrat",
|
||||
ma: "Morocco",
|
||||
mz: "Mozambique",
|
||||
mm: "Myanmar (Burma)",
|
||||
na: "Namibia",
|
||||
nr: "Nauru",
|
||||
np: "Nepal",
|
||||
nl: "Netherlands",
|
||||
nc: "New Caledonia",
|
||||
nz: "New Zealand",
|
||||
ni: "Nicaragua",
|
||||
ne: "Niger",
|
||||
ng: "Nigeria",
|
||||
nu: "Niue",
|
||||
nf: "Norfolk Island",
|
||||
kp: "North Korea",
|
||||
mk: "North Macedonia",
|
||||
mp: "Northern Mariana Islands",
|
||||
no: "Norway",
|
||||
om: "Oman",
|
||||
pk: "Pakistan",
|
||||
pw: "Palau",
|
||||
ps: "Palestinian Territories",
|
||||
pa: "Panama",
|
||||
pg: "Papua New Guinea",
|
||||
py: "Paraguay",
|
||||
pe: "Peru",
|
||||
ph: "Philippines",
|
||||
pn: "Pitcairn Islands",
|
||||
pl: "Poland",
|
||||
pt: "Portugal",
|
||||
pr: "Puerto Rico",
|
||||
qa: "Qatar",
|
||||
re: "Réunion",
|
||||
ro: "Romania",
|
||||
ru: "Russia",
|
||||
rw: "Rwanda",
|
||||
ws: "Samoa",
|
||||
sm: "San Marino",
|
||||
st: "São Tomé & Príncipe",
|
||||
sa: "Saudi Arabia",
|
||||
sn: "Senegal",
|
||||
rs: "Serbia",
|
||||
sc: "Seychelles",
|
||||
sl: "Sierra Leone",
|
||||
sg: "Singapore",
|
||||
sx: "Sint Maarten",
|
||||
sk: "Slovakia",
|
||||
si: "Slovenia",
|
||||
sb: "Solomon Islands",
|
||||
so: "Somalia",
|
||||
za: "South Africa",
|
||||
gs: "South Georgia & South Sandwich Islands",
|
||||
kr: "South Korea",
|
||||
ss: "South Sudan",
|
||||
es: "Spain",
|
||||
lk: "Sri Lanka",
|
||||
bl: "St. Barthélemy",
|
||||
sh: "St. Helena",
|
||||
kn: "St. Kitts & Nevis",
|
||||
lc: "St. Lucia",
|
||||
mf: "St. Martin",
|
||||
pm: "St. Pierre & Miquelon",
|
||||
vc: "St. Vincent & Grenadines",
|
||||
sd: "Sudan",
|
||||
sr: "Suriname",
|
||||
sj: "Svalbard & Jan Mayen",
|
||||
se: "Sweden",
|
||||
ch: "Switzerland",
|
||||
sy: "Syria",
|
||||
tw: "Taiwan",
|
||||
tj: "Tajikistan",
|
||||
tz: "Tanzania",
|
||||
th: "Thailand",
|
||||
tl: "Timor-Leste",
|
||||
tg: "Togo",
|
||||
tk: "Tokelau",
|
||||
to: "Tonga",
|
||||
tt: "Trinidad & Tobago",
|
||||
tn: "Tunisia",
|
||||
tr: "Turkey",
|
||||
tm: "Turkmenistan",
|
||||
tc: "Turks & Caicos Islands",
|
||||
tv: "Tuvalu",
|
||||
um: "U.S. Outlying Islands",
|
||||
vi: "U.S. Virgin Islands",
|
||||
ug: "Uganda",
|
||||
ua: "Ukraine",
|
||||
ae: "United Arab Emirates",
|
||||
gb: "United Kingdom",
|
||||
us: "United States",
|
||||
uy: "Uruguay",
|
||||
uz: "Uzbekistan",
|
||||
vu: "Vanuatu",
|
||||
va: "Vatican City",
|
||||
ve: "Venezuela",
|
||||
vn: "Vietnam",
|
||||
wf: "Wallis & Futuna",
|
||||
eh: "Western Sahara",
|
||||
ye: "Yemen",
|
||||
zm: "Zambia",
|
||||
zw: "Zimbabwe",
|
||||
};
|
||||
4
src/components/IntlTelInput/i18n/en/index.ts
Normal file
4
src/components/IntlTelInput/i18n/en/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import countryTranslations from './countries';
|
||||
import interfaceTranslations from './interface';
|
||||
|
||||
export default { ...countryTranslations, ...interfaceTranslations };
|
||||
14
src/components/IntlTelInput/i18n/en/interface.ts
Normal file
14
src/components/IntlTelInput/i18n/en/interface.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
//* English. Translated by: Jack O'Connor (jackocnr).
|
||||
export default {
|
||||
selectedCountryAriaLabel: "Selected country",
|
||||
noCountrySelected: "No country selected",
|
||||
countryListAriaLabel: "List of countries",
|
||||
searchPlaceholder: "Search",
|
||||
zeroSearchResults: "No results found",
|
||||
oneSearchResult: "1 result found",
|
||||
multipleSearchResults: "${count} results found",
|
||||
|
||||
// additional countries (not supported by country-list library)
|
||||
ac: "Ascension Island",
|
||||
xk: "Kosovo",
|
||||
};
|
||||
252
src/components/IntlTelInput/i18n/zh/countries.ts
Normal file
252
src/components/IntlTelInput/i18n/zh/countries.ts
Normal file
@@ -0,0 +1,252 @@
|
||||
//* THIS FILE IS AUTO-GENERATED. DO NOT EDIT.
|
||||
export default {
|
||||
al: "阿尔巴尼亚",
|
||||
dz: "阿尔及利亚",
|
||||
af: "阿富汗",
|
||||
ar: "阿根廷",
|
||||
ae: "阿拉伯联合酋长国",
|
||||
aw: "阿鲁巴",
|
||||
om: "阿曼",
|
||||
az: "阿塞拜疆",
|
||||
eg: "埃及",
|
||||
et: "埃塞俄比亚",
|
||||
ie: "爱尔兰",
|
||||
ee: "爱沙尼亚",
|
||||
ad: "安道尔",
|
||||
ao: "安哥拉",
|
||||
ai: "安圭拉",
|
||||
ag: "安提瓜和巴布达",
|
||||
at: "奥地利",
|
||||
ax: "奥兰群岛",
|
||||
au: "澳大利亚",
|
||||
bb: "巴巴多斯",
|
||||
pg: "巴布亚新几内亚",
|
||||
bs: "巴哈马",
|
||||
pk: "巴基斯坦",
|
||||
py: "巴拉圭",
|
||||
ps: "巴勒斯坦领土",
|
||||
bh: "巴林",
|
||||
pa: "巴拿马",
|
||||
br: "巴西",
|
||||
by: "白俄罗斯",
|
||||
bm: "百慕大",
|
||||
bg: "保加利亚",
|
||||
mp: "北马里亚纳群岛",
|
||||
mk: "北马其顿",
|
||||
bj: "贝宁",
|
||||
be: "比利时",
|
||||
is: "冰岛",
|
||||
pr: "波多黎各",
|
||||
pl: "波兰",
|
||||
ba: "波斯尼亚和黑塞哥维那",
|
||||
bo: "玻利维亚",
|
||||
bz: "伯利兹",
|
||||
bw: "博茨瓦纳",
|
||||
bt: "不丹",
|
||||
bf: "布基纳法索",
|
||||
bi: "布隆迪",
|
||||
bv: "布韦岛",
|
||||
kp: "朝鲜",
|
||||
gq: "赤道几内亚",
|
||||
dk: "丹麦",
|
||||
de: "德国",
|
||||
tl: "东帝汶",
|
||||
tg: "多哥",
|
||||
do: "多米尼加共和国",
|
||||
dm: "多米尼克",
|
||||
ru: "俄罗斯",
|
||||
ec: "厄瓜多尔",
|
||||
er: "厄立特里亚",
|
||||
fr: "法国",
|
||||
fo: "法罗群岛",
|
||||
pf: "法属波利尼西亚",
|
||||
gf: "法属圭亚那",
|
||||
tf: "法属南部领地",
|
||||
mf: "法属圣马丁",
|
||||
va: "梵蒂冈",
|
||||
ph: "菲律宾",
|
||||
fj: "斐济",
|
||||
fi: "芬兰",
|
||||
cv: "佛得角",
|
||||
fk: "福克兰群岛",
|
||||
gm: "冈比亚",
|
||||
cg: "刚果(布)",
|
||||
cd: "刚果(金)",
|
||||
co: "哥伦比亚",
|
||||
cr: "哥斯达黎加",
|
||||
gd: "格林纳达",
|
||||
gl: "格陵兰",
|
||||
ge: "格鲁吉亚",
|
||||
gg: "根西岛",
|
||||
cu: "古巴",
|
||||
gp: "瓜德罗普",
|
||||
gu: "关岛",
|
||||
gy: "圭亚那",
|
||||
kz: "哈萨克斯坦",
|
||||
ht: "海地",
|
||||
kr: "韩国",
|
||||
nl: "荷兰",
|
||||
bq: "荷属加勒比区",
|
||||
sx: "荷属圣马丁",
|
||||
hm: "赫德岛和麦克唐纳群岛",
|
||||
me: "黑山",
|
||||
hn: "洪都拉斯",
|
||||
ki: "基里巴斯",
|
||||
dj: "吉布提",
|
||||
kg: "吉尔吉斯斯坦",
|
||||
gn: "几内亚",
|
||||
gw: "几内亚比绍",
|
||||
ca: "加拿大",
|
||||
gh: "加纳",
|
||||
ga: "加蓬",
|
||||
kh: "柬埔寨",
|
||||
cz: "捷克",
|
||||
zw: "津巴布韦",
|
||||
cm: "喀麦隆",
|
||||
qa: "卡塔尔",
|
||||
ky: "开曼群岛",
|
||||
cc: "科科斯(基林)群岛",
|
||||
km: "科摩罗",
|
||||
ci: "科特迪瓦",
|
||||
kw: "科威特",
|
||||
hr: "克罗地亚",
|
||||
ke: "肯尼亚",
|
||||
ck: "库克群岛",
|
||||
cw: "库拉索",
|
||||
lv: "拉脱维亚",
|
||||
ls: "莱索托",
|
||||
la: "老挝",
|
||||
lb: "黎巴嫩",
|
||||
lt: "立陶宛",
|
||||
lr: "利比里亚",
|
||||
ly: "利比亚",
|
||||
li: "列支敦士登",
|
||||
re: "留尼汪",
|
||||
lu: "卢森堡",
|
||||
rw: "卢旺达",
|
||||
ro: "罗马尼亚",
|
||||
mg: "马达加斯加",
|
||||
im: "马恩岛",
|
||||
mv: "马尔代夫",
|
||||
mt: "马耳他",
|
||||
mw: "马拉维",
|
||||
my: "马来西亚",
|
||||
ml: "马里",
|
||||
mh: "马绍尔群岛",
|
||||
mq: "马提尼克",
|
||||
yt: "马约特",
|
||||
mu: "毛里求斯",
|
||||
mr: "毛里塔尼亚",
|
||||
us: "美国",
|
||||
um: "美国本土外小岛屿",
|
||||
as: "美属萨摩亚",
|
||||
vi: "美属维尔京群岛",
|
||||
mn: "蒙古",
|
||||
ms: "蒙特塞拉特",
|
||||
bd: "孟加拉国",
|
||||
pe: "秘鲁",
|
||||
fm: "密克罗尼西亚",
|
||||
mm: "缅甸",
|
||||
md: "摩尔多瓦",
|
||||
ma: "摩洛哥",
|
||||
mc: "摩纳哥",
|
||||
mz: "莫桑比克",
|
||||
mx: "墨西哥",
|
||||
na: "纳米比亚",
|
||||
za: "南非",
|
||||
aq: "南极洲",
|
||||
gs: "南乔治亚和南桑威奇群岛",
|
||||
ss: "南苏丹",
|
||||
nr: "瑙鲁",
|
||||
ni: "尼加拉瓜",
|
||||
np: "尼泊尔",
|
||||
ne: "尼日尔",
|
||||
ng: "尼日利亚",
|
||||
nu: "纽埃",
|
||||
no: "挪威",
|
||||
nf: "诺福克岛",
|
||||
pw: "帕劳",
|
||||
pn: "皮特凯恩群岛",
|
||||
pt: "葡萄牙",
|
||||
jp: "日本",
|
||||
se: "瑞典",
|
||||
ch: "瑞士",
|
||||
sv: "萨尔瓦多",
|
||||
ws: "萨摩亚",
|
||||
rs: "塞尔维亚",
|
||||
sl: "塞拉利昂",
|
||||
sn: "塞内加尔",
|
||||
cy: "塞浦路斯",
|
||||
sc: "塞舌尔",
|
||||
sa: "沙特阿拉伯",
|
||||
bl: "圣巴泰勒米",
|
||||
cx: "圣诞岛",
|
||||
st: "圣多美和普林西比",
|
||||
sh: "圣赫勒拿",
|
||||
kn: "圣基茨和尼维斯",
|
||||
lc: "圣卢西亚",
|
||||
sm: "圣马力诺",
|
||||
pm: "圣皮埃尔和密克隆群岛",
|
||||
vc: "圣文森特和格林纳丁斯",
|
||||
lk: "斯里兰卡",
|
||||
sk: "斯洛伐克",
|
||||
si: "斯洛文尼亚",
|
||||
sj: "斯瓦尔巴和扬马延",
|
||||
sz: "斯威士兰",
|
||||
sd: "苏丹",
|
||||
sr: "苏里南",
|
||||
sb: "所罗门群岛",
|
||||
so: "索马里",
|
||||
tj: "塔吉克斯坦",
|
||||
tw: "台湾",
|
||||
th: "泰国",
|
||||
tz: "坦桑尼亚",
|
||||
to: "汤加",
|
||||
tc: "特克斯和凯科斯群岛",
|
||||
tt: "特立尼达和多巴哥",
|
||||
tn: "突尼斯",
|
||||
tv: "图瓦卢",
|
||||
tr: "土耳其",
|
||||
tm: "土库曼斯坦",
|
||||
tk: "托克劳",
|
||||
wf: "瓦利斯和富图纳",
|
||||
vu: "瓦努阿图",
|
||||
gt: "危地马拉",
|
||||
ve: "委内瑞拉",
|
||||
bn: "文莱",
|
||||
ug: "乌干达",
|
||||
ua: "乌克兰",
|
||||
uy: "乌拉圭",
|
||||
uz: "乌兹别克斯坦",
|
||||
es: "西班牙",
|
||||
eh: "西撒哈拉",
|
||||
gr: "希腊",
|
||||
sg: "新加坡",
|
||||
nc: "新喀里多尼亚",
|
||||
nz: "新西兰",
|
||||
hu: "匈牙利",
|
||||
sy: "叙利亚",
|
||||
jm: "牙买加",
|
||||
am: "亚美尼亚",
|
||||
ye: "也门",
|
||||
iq: "伊拉克",
|
||||
ir: "伊朗",
|
||||
il: "以色列",
|
||||
it: "意大利",
|
||||
in: "印度",
|
||||
id: "印度尼西亚",
|
||||
gb: "英国",
|
||||
vg: "英属维尔京群岛",
|
||||
io: "英属印度洋领地",
|
||||
jo: "约旦",
|
||||
vn: "越南",
|
||||
zm: "赞比亚",
|
||||
je: "泽西岛",
|
||||
td: "乍得",
|
||||
gi: "直布罗陀",
|
||||
cl: "智利",
|
||||
cf: "中非共和国",
|
||||
cn: "中国",
|
||||
mo: "中国澳门特别行政区",
|
||||
hk: "中国香港特别行政区",
|
||||
};
|
||||
4
src/components/IntlTelInput/i18n/zh/index.ts
Normal file
4
src/components/IntlTelInput/i18n/zh/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import countryTranslations from './countries';
|
||||
import interfaceTranslations from './interface';
|
||||
|
||||
export default { ...countryTranslations, ...interfaceTranslations };
|
||||
15
src/components/IntlTelInput/i18n/zh/interface.ts
Normal file
15
src/components/IntlTelInput/i18n/zh/interface.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
//* Chinese (Simplified). Translated by: Google Translate.
|
||||
export default {
|
||||
selectedCountryAriaLabel: "所选国家",
|
||||
noCountrySelected: "未选择国家/地区",
|
||||
countryListAriaLabel: "国家名单",
|
||||
searchPlaceholder: "搜索",
|
||||
zeroSearchResults: "未找到结果",
|
||||
oneSearchResult: "找到 1 个结果",
|
||||
multipleSearchResults: "找到 ${count} 个结果",
|
||||
|
||||
// additional countries (not supported by country-list library)
|
||||
ac: "阿森松岛",
|
||||
xk: "科索沃",
|
||||
};
|
||||
|
||||
145
src/components/IntlTelInput/index.vue
Normal file
145
src/components/IntlTelInput/index.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<!-- https://github.com/jackocnr/intl-tel-input/blob/master/react/src/intl-tel-input/react.tsx -->
|
||||
<script lang="ts" setup>
|
||||
import intlTelInput, { Iti, SomeOptions } from 'intl-tel-input';
|
||||
import 'intl-tel-input/build/css/intlTelInput.min.css';
|
||||
import 'intl-tel-input/build/js/utils.js';
|
||||
import { ref, onMounted, onBeforeUnmount, nextTick, watch } from 'vue';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { currentLocale } = useI18n();
|
||||
const emit = defineEmits(['update:value', 'update:change']);
|
||||
const props = defineProps({
|
||||
/**有效检验 */
|
||||
preciseValidation: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
/**手机号 */
|
||||
value: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
/**禁用输入 */
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
/**手机号输入提示 */
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
/**手机号输入最大字符串长度 */
|
||||
maxlength: {
|
||||
type: Number,
|
||||
default: 255,
|
||||
},
|
||||
/**允许清空手机号输入框 */
|
||||
allowClear: {
|
||||
type: Boolean,
|
||||
},
|
||||
});
|
||||
|
||||
const inputRef = ref<HTMLInputElement | null>(null);
|
||||
const itiRef = ref<Iti | null>(null);
|
||||
|
||||
function fnChange() {
|
||||
if (!itiRef.value) return;
|
||||
|
||||
const num = itiRef.value?.getNumber() || '';
|
||||
const countryIso = itiRef.value?.getSelectedCountryData().iso2 || '';
|
||||
// note: this number will be in standard E164 format, but any container component can use
|
||||
// intlTelInputUtils.formatNumber() to convert this to another format
|
||||
// as well as intlTelInputUtils.getNumberType() etc. if need be
|
||||
let data = {
|
||||
num,
|
||||
countryIso,
|
||||
validity: false,
|
||||
errorCode: -1,
|
||||
};
|
||||
|
||||
const isValid = props.preciseValidation
|
||||
? itiRef.value.isValidNumberPrecise()
|
||||
: itiRef.value.isValidNumber();
|
||||
if (isValid) {
|
||||
data.validity = true;
|
||||
data.errorCode = 0;
|
||||
} else {
|
||||
const errorCode = itiRef.value.getValidationError();
|
||||
data.validity = false;
|
||||
data.errorCode = errorCode;
|
||||
}
|
||||
// console.log(data);
|
||||
emit('update:value', num);
|
||||
emit('update:change', data);
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.value,
|
||||
v => {
|
||||
if (v) {
|
||||
itiRef.value?.setNumber(v);
|
||||
} else {
|
||||
itiRef.value?.setNumber('');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(async () => {
|
||||
if (inputRef.value) {
|
||||
let i18n = undefined;
|
||||
let initialCountry = 'us';
|
||||
// 语言文件导入问题只能复制到项目内处理
|
||||
// import fr from "intl-tel-input/i18n/fr";
|
||||
if (currentLocale.value.startsWith('zh')) {
|
||||
const { default: zh } = await import('./i18n/zh');
|
||||
i18n = zh;
|
||||
initialCountry = 'cn';
|
||||
} else {
|
||||
const { default: en } = await import('./i18n/en');
|
||||
i18n = en;
|
||||
initialCountry = 'us';
|
||||
}
|
||||
|
||||
itiRef.value = intlTelInput(inputRef.value, {
|
||||
initialCountry: initialCountry,
|
||||
formatOnDisplay: true,
|
||||
autoPlaceholder: 'polite',
|
||||
i18n: i18n,
|
||||
} as SomeOptions);
|
||||
inputRef.value.addEventListener('countrychange', fnChange);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (inputRef.value) {
|
||||
inputRef.value.removeEventListener('countrychange', fnChange);
|
||||
}
|
||||
itiRef.value?.destroy();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input
|
||||
type="tel"
|
||||
class="ant-input"
|
||||
ref="inputRef"
|
||||
:value="value"
|
||||
:disabled="disabled"
|
||||
:placeholder="placeholder"
|
||||
:maxlength="maxlength"
|
||||
:allow-clear="allowClear"
|
||||
@input="fnChange"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style lang="css">
|
||||
.iti {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.iti .iti__country-container .iti__search-input {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,217 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, toRaw, onMounted, onUnmounted } from 'vue';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { message } from 'ant-design-vue/lib';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useLockedStore from '@/store/modules/locked';
|
||||
import { getConfigKey } from '@/api/system/config';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { computed } from 'vue';
|
||||
const lockedStore = useLockedStore();
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
const password = ref('');
|
||||
/**设置定时器ID */
|
||||
let timeoutDuration = 10 * 60 * 1000; // 设置超时时间为10分钟,单位为毫秒
|
||||
let timeoutId: any = null;
|
||||
|
||||
// 超时锁屏
|
||||
function resetTimeout() {
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
timeoutId = setTimeout(() => {
|
||||
lockedStore.fnLock('lock');
|
||||
}, timeoutDuration);
|
||||
}
|
||||
|
||||
/**解锁 */
|
||||
function handleUnlock() {
|
||||
let lockFrom: any = {};
|
||||
lockFrom.username = userStore.userName;
|
||||
lockFrom.password = password.value;
|
||||
userStore.fnLogin(toRaw(lockFrom)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success(t('components.LockScreen.validSucc'), 3);
|
||||
password.value = '';
|
||||
lockedStore.fnLock('none');
|
||||
} else {
|
||||
message.error(t('components.LockScreen.validError'), 3);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**返回登录界面 */
|
||||
function backLogin() {
|
||||
lockedStore.fnLock('none');
|
||||
userStore.fnLogOut().finally(() => router.push({ name: 'Login' }));
|
||||
}
|
||||
|
||||
const isLocked = computed(() => lockedStore.type !== 'none');
|
||||
|
||||
onMounted(() => {
|
||||
getConfigKey('sys.lockTime')
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||
lockedStore.lockTimeout = res.data;
|
||||
timeoutDuration = res.data * 1000;
|
||||
}
|
||||
// 本地锁定类型设置
|
||||
lockedStore.fnLock(lockedStore.type);
|
||||
})
|
||||
.finally(() => {
|
||||
if (timeoutDuration !== 0) {
|
||||
resetTimeout();
|
||||
// 监听用户的操作,重置超时时间
|
||||
window.addEventListener('mousemove', resetTimeout);
|
||||
window.addEventListener('keydown', resetTimeout);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**组件实例被卸载之后调用 */
|
||||
onUnmounted(() => {
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:visible="isLocked"
|
||||
get-container="#app"
|
||||
:footer="null"
|
||||
:zIndex="1008"
|
||||
:closable="false"
|
||||
:keyboard="false"
|
||||
:centered="true"
|
||||
:maskClosable="false"
|
||||
:maskStyle="{
|
||||
backdropFilter: 'blur(10px)',
|
||||
WebkitBackdropFilter: 'blur(10px)',
|
||||
}"
|
||||
wrapClassName="lock-screen"
|
||||
:wrap-style="{
|
||||
background: 'rgba(0, 0, 0, 0.85)',
|
||||
}"
|
||||
>
|
||||
<!-- 锁屏-登录 -->
|
||||
<div class="lock-screen_login" v-if="lockedStore.type === 'lock'">
|
||||
<div class="lock-screen_login-user">
|
||||
<a-avatar
|
||||
shape="circle"
|
||||
:size="100"
|
||||
:src="userStore.getAvatar"
|
||||
:alt="userStore.userName"
|
||||
></a-avatar>
|
||||
<span class="nick">
|
||||
{{ userStore.nickName }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="lock-screen_login-from">
|
||||
<a-input-group compact>
|
||||
<a-input
|
||||
type="password"
|
||||
v-model:value="password"
|
||||
:placeholder="t('components.LockScreen.inputPlacePwd')"
|
||||
:maxlength="32"
|
||||
style="width: calc(100% - 50px)"
|
||||
@keyup.enter="handleUnlock"
|
||||
/>
|
||||
<a-button type="primary" @click="handleUnlock">
|
||||
<LoginOutlined />
|
||||
</a-button>
|
||||
</a-input-group>
|
||||
<a-button type="text" class="logout" @click="backLogin">
|
||||
{{ t('components.LockScreen.backLogin') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 锁屏-OMC重启升级 -->
|
||||
<div class="lock-screen_reload" v-if="lockedStore.type === 'reload'">
|
||||
<LoadingOutlined style="font-size: 56px" />
|
||||
<div class="text">
|
||||
{{ t('components.LockScreen.backReload') }}
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{ t('components.LockScreen.backReload2') }}
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.lock-screen_login {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: transparent;
|
||||
|
||||
&-user {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.nick {
|
||||
font-size: 28px;
|
||||
max-width: 164px;
|
||||
white-space: nowrap;
|
||||
text-align: start;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
&-from {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
width: 256px;
|
||||
margin-top: 30px;
|
||||
|
||||
.logout {
|
||||
margin-top: 8px;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
|
||||
&:hover {
|
||||
color: var(--ant-primary-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lock-screen_reload {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: transparent;
|
||||
|
||||
color: #fff;
|
||||
|
||||
& .text {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 4px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
& .desc {
|
||||
margin-top: 8px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
.lock-screen {
|
||||
.ant-modal-content {
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,9 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, watch, onMounted, PropType } from 'vue';
|
||||
import { reactive, watch, onMounted, PropType, nextTick } from 'vue';
|
||||
import { Container, Draggable } from 'vue3-smooth-dnd';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { type ColumnsType } from 'ant-design-vue/lib/table';
|
||||
const { t } = useI18n();
|
||||
import { dbGetJSON, dbSetJSON } from '@/utils/cache-db-utils';
|
||||
import { CACHE_DB_TABLE_DND } from '@/constants/cache-keys-constants';
|
||||
const { t, currentLocale } = useI18n();
|
||||
|
||||
const emit = defineEmits(['update:columns-dnd']);
|
||||
const props = defineProps({
|
||||
@@ -16,7 +18,8 @@ const props = defineProps({
|
||||
type: Array<any>,
|
||||
required: true,
|
||||
},
|
||||
/**按钮类型
|
||||
/**
|
||||
* 按钮类型
|
||||
* text 图标
|
||||
* ghost 图标按钮带文字
|
||||
*/
|
||||
@@ -24,16 +27,29 @@ const props = defineProps({
|
||||
type: String as PropType<'text' | 'ghost'>,
|
||||
default: 'text',
|
||||
},
|
||||
/**
|
||||
* 缓存列变更数据标识,不传则不缓存
|
||||
*/
|
||||
cacheId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
/**表格字段列 */
|
||||
const tableColumns = reactive<ColumnsType>(props.columns);
|
||||
|
||||
/**表格字段列勾选状态 */
|
||||
const state = reactive({
|
||||
const state = reactive<{
|
||||
indeterminate: boolean;
|
||||
/**是否全选 */
|
||||
checkAll: boolean;
|
||||
/**字段标题列表 */
|
||||
columnsTitleList: string[];
|
||||
}>({
|
||||
indeterminate: false,
|
||||
checkAll: true,
|
||||
columnsTitleList: tableColumns.map(s => `${s.title}`),
|
||||
columnsTitleList: [],
|
||||
});
|
||||
|
||||
/**表格字段列全选操作 */
|
||||
@@ -46,12 +62,13 @@ function fnTableColumnsCheckAllChange(e: any) {
|
||||
/**表格字段列拖拽操作 */
|
||||
function fnTableColumnsDrop(dropResult: any) {
|
||||
const { removedIndex, addedIndex, payload } = dropResult;
|
||||
if (removedIndex !== null && addedIndex !== null) {
|
||||
let itemToAdd = payload;
|
||||
itemToAdd = tableColumns.splice(removedIndex, 1)[0];
|
||||
tableColumns.splice(addedIndex, 0, itemToAdd);
|
||||
fnUpdateColumns();
|
||||
if (removedIndex === null || addedIndex === null) {
|
||||
return;
|
||||
}
|
||||
let itemToAdd = payload;
|
||||
itemToAdd = tableColumns.splice(removedIndex, 1)[0];
|
||||
tableColumns.splice(addedIndex, 0, itemToAdd);
|
||||
fnUpdateColumns();
|
||||
}
|
||||
|
||||
/**表格字段列固定操作 */
|
||||
@@ -66,6 +83,7 @@ function fnTableColumnsFixed(row: Record<string, any>) {
|
||||
} else {
|
||||
row.fixed = !row.fixed;
|
||||
}
|
||||
fnUpdateColumns();
|
||||
}
|
||||
|
||||
/**表格字段列勾选字段变化 */
|
||||
@@ -77,7 +95,18 @@ function fnUpdateColumns() {
|
||||
if (list.length === 0) {
|
||||
list = [tableColumns[0]];
|
||||
}
|
||||
emit('update:columns-dnd', list);
|
||||
|
||||
if (props.cacheId) {
|
||||
// 存入数据
|
||||
dbSetJSON(
|
||||
CACHE_DB_TABLE_DND,
|
||||
`${props.cacheId}#${currentLocale.value}`,
|
||||
list
|
||||
);
|
||||
}
|
||||
nextTick(() => {
|
||||
emit('update:columns-dnd', list);
|
||||
});
|
||||
}
|
||||
|
||||
/**表格字段列勾选监听 */
|
||||
@@ -92,7 +121,34 @@ watch(
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
fnUpdateColumns();
|
||||
if (props.cacheId) {
|
||||
// 读取数据后响应
|
||||
dbGetJSON(CACHE_DB_TABLE_DND, `${props.cacheId}#${currentLocale.value}`)
|
||||
.then(data => {
|
||||
if (data) {
|
||||
const titleList: string[] = [];
|
||||
for (const item of data) {
|
||||
titleList.push(`${item.title}`);
|
||||
// 固定标记还原
|
||||
if (item.fixed !== undefined) {
|
||||
const fixedItem = tableColumns.find(s => s.title === item.title);
|
||||
if (fixedItem) {
|
||||
fixedItem.fixed = item.fixed;
|
||||
}
|
||||
}
|
||||
}
|
||||
state.columnsTitleList = titleList;
|
||||
} else {
|
||||
state.columnsTitleList = tableColumns.map(s => `${s.title}`);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
fnUpdateColumns();
|
||||
});
|
||||
} else {
|
||||
state.columnsTitleList = tableColumns.map(s => `${s.title}`);
|
||||
fnUpdateColumns();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -128,6 +184,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
v-if="c.fixed !== undefined"
|
||||
size="small"
|
||||
:title="c.fixed ? `Fixed ${c.fixed} side` : ''"
|
||||
:type="c.fixed ? 'primary' : 'dashed'"
|
||||
@click="fnTableColumnsFixed(c)"
|
||||
>
|
||||
|
||||
258
src/components/TerminalSSH/index.vue
Normal file
258
src/components/TerminalSSH/index.vue
Normal file
@@ -0,0 +1,258 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
||||
import { FitAddon } from '@xterm/addon-fit';
|
||||
import { Terminal } from '@xterm/xterm';
|
||||
import '@xterm/xterm/css/xterm.css';
|
||||
import { RESULT_CODE_ERROR } from '@/constants/result-constants';
|
||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||
const ws = new WS();
|
||||
const emit = defineEmits(['connect', 'close', 'message']);
|
||||
const props = defineProps({
|
||||
/**终端ID,必传 */
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**连接主机ID,必传 */
|
||||
hostId: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**窗口单行字符数 */
|
||||
cols: {
|
||||
type: Number,
|
||||
default: 80,
|
||||
},
|
||||
/**窗口行数 */
|
||||
rows: {
|
||||
type: Number,
|
||||
default: 40,
|
||||
},
|
||||
/**禁止输入 */
|
||||
disable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
/**初始发送命令 */
|
||||
initCmd: {
|
||||
type: [String, Boolean],
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
/**终端输入DOM节点实例对象 */
|
||||
const terminalDom = ref<HTMLElement | undefined>(undefined);
|
||||
|
||||
/**终端输入实例对象 */
|
||||
const terminal = ref<any>(null);
|
||||
|
||||
/**终端输入渲染 */
|
||||
function handleRanderXterm(container: HTMLElement | undefined) {
|
||||
if (!container) return;
|
||||
const xterm = new Terminal({
|
||||
cols: props.cols,
|
||||
rows: props.rows,
|
||||
lineHeight: 1.2,
|
||||
fontSize: 12,
|
||||
fontFamily: "Monaco, Menlo, Consolas, 'Courier New', monospace",
|
||||
theme: {
|
||||
background: '#000000',
|
||||
},
|
||||
cursorBlink: true, // 光标闪烁
|
||||
cursorStyle: 'block',
|
||||
scrollback: 1000,
|
||||
scrollSensitivity: 15,
|
||||
tabStopWidth: 4,
|
||||
disableStdin: props.disable, // 禁止输入
|
||||
});
|
||||
// 挂载
|
||||
xterm.open(container);
|
||||
// 自适应尺寸
|
||||
const fitAddon = new FitAddon();
|
||||
xterm.loadAddon(fitAddon);
|
||||
// 终端输入字符按键监听
|
||||
xterm.onData(char => {
|
||||
ws.send({
|
||||
requestId: `ssh_${props.hostId}`,
|
||||
type: 'ssh',
|
||||
data: char,
|
||||
});
|
||||
// const printable = char.match(/[\x20-\x7E]/); // 匹配可打印字符的正则表达式
|
||||
// if (char === '\r' || char === '\x0D') {
|
||||
// // 处理回车键,添加换行
|
||||
// xterm.writeln('');
|
||||
// } else if (char === '\x08' || char === '\x7F') {
|
||||
// // 处理退格键,删除最后一个字符
|
||||
// xterm.write('\b \b');
|
||||
// } else if (printable) {
|
||||
// // 处理可打印字符
|
||||
// xterm.write(char);
|
||||
// }
|
||||
});
|
||||
// 终端输入按键监听
|
||||
// xterm.onKey(({ key, domEvent }) => {
|
||||
// // console.log(key, domEvent);
|
||||
// // 单键输入
|
||||
// // switch (domEvent.key) {
|
||||
// // case 'ArrowUp':
|
||||
// // // 按“↑”方向键时要做的事。
|
||||
// // break;
|
||||
// // case 'ArrowDown':
|
||||
// // // 按“↓”方向键时要做的事。
|
||||
// // break;
|
||||
// // case 'ArrowLeft':
|
||||
// // // 按“←”方向键时要做的事。
|
||||
// // break;
|
||||
// // case 'ArrowRight':
|
||||
// // // 按“→”方向键时要做的事。
|
||||
// // break;
|
||||
// // case 'Enter':
|
||||
// // // 处理回车键,添加换行
|
||||
// // term.writeln('');
|
||||
// // break;
|
||||
// // case 'Backspace':
|
||||
// // // 处理退格键,删除最后一个字符
|
||||
// // term.write('\b \b');
|
||||
// // break;
|
||||
// // case 'Escape':
|
||||
// // // 按“ESC”键时要做的事。
|
||||
// // break;
|
||||
// // default:
|
||||
// // return; // 什么都没按就退出吧。
|
||||
// // }
|
||||
// });
|
||||
// 终端尺寸变化触发
|
||||
xterm.onResize(({ cols, rows }) => {
|
||||
// console.log('尺寸', cols, rows);
|
||||
ws.send({
|
||||
requestId: `ssh_resize_${props.hostId}`,
|
||||
type: 'ssh_resize',
|
||||
data: { cols, rows },
|
||||
});
|
||||
});
|
||||
|
||||
// 创建 ResizeObserver 实例
|
||||
var observer = new ResizeObserver(entries => {
|
||||
fitAddon.fit();
|
||||
});
|
||||
// 监听元素大小变化
|
||||
observer.observe(container);
|
||||
|
||||
terminal.value = xterm;
|
||||
}
|
||||
|
||||
/**连接打开后回调 */
|
||||
function wsOpen(ev: any) {
|
||||
// console.info('wsOpen', ev);
|
||||
nextTick(() => {
|
||||
handleRanderXterm(terminalDom.value);
|
||||
// 连接事件
|
||||
emit('connect', {
|
||||
timeStamp: ev.timeStamp,
|
||||
cols: terminal.value.cols,
|
||||
rows: terminal.value.rows,
|
||||
hostId: props.hostId,
|
||||
id: props.id,
|
||||
});
|
||||
// 初始发送命令
|
||||
if (typeof props.initCmd === 'string') {
|
||||
ws.send({
|
||||
requestId: `ssh_${props.hostId}`,
|
||||
type: 'ssh',
|
||||
data: `${props.initCmd}\n`,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**连接错误后回调 */
|
||||
function wsError(ev: any) {
|
||||
// console.error('wsError', ev);
|
||||
if (terminal.value != null) {
|
||||
let message = 'disconnected';
|
||||
terminal.value.write(`\x1b[31m${message}\x1b[m\r\n`);
|
||||
} else if (terminalDom.value) {
|
||||
terminalDom.value.style.background = '#000';
|
||||
terminalDom.value.style.color = '#ff4d4f';
|
||||
terminalDom.value.style.height = '60%';
|
||||
terminalDom.value.innerText = 'disconnected';
|
||||
}
|
||||
}
|
||||
|
||||
/**连接关闭后回调 */
|
||||
function wsClose(code: number) {
|
||||
// console.warn('wsClose', code);
|
||||
if (terminal.value != null) {
|
||||
let message = 'disconnected';
|
||||
terminal.value.write(`\x1b[31m${message}\x1b[m\r\n`);
|
||||
}
|
||||
// 关闭事件
|
||||
emit('close', {
|
||||
code: code,
|
||||
hostId: props.hostId,
|
||||
id: props.id,
|
||||
});
|
||||
}
|
||||
|
||||
/**接收消息后回调 */
|
||||
function wsMessage(res: Record<string, any>) {
|
||||
emit('message', res);
|
||||
// console.log('wsMessage', res);
|
||||
const { code, requestId, data } = res;
|
||||
if (code === RESULT_CODE_ERROR) {
|
||||
console.warn(res.msg);
|
||||
return;
|
||||
}
|
||||
if (!requestId) return;
|
||||
if (terminal.value != null) {
|
||||
terminal.value.write(data);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (props.hostId) {
|
||||
// 建立链接
|
||||
const options: OptionsType = {
|
||||
url: '/ws/ssh',
|
||||
params: {
|
||||
hostId: props.hostId,
|
||||
cols: props.cols,
|
||||
rows: props.rows,
|
||||
},
|
||||
onmessage: wsMessage,
|
||||
onerror: wsError,
|
||||
onopen: wsOpen,
|
||||
onclose: wsClose,
|
||||
};
|
||||
ws.connect(options);
|
||||
}
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
ws.close();
|
||||
});
|
||||
|
||||
// 给组件设置属性 ref="xxxTerminal"
|
||||
// setup内使用 const xxxTerminal = ref();
|
||||
defineExpose({
|
||||
/**发送方法 */
|
||||
send: (data: string) => {
|
||||
ws.send({
|
||||
requestId: `ssh_${props.hostId}`,
|
||||
type: 'ssh',
|
||||
data: `${data}\n`,
|
||||
});
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="terminalDom" :id="id" class="terminal"></div>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.terminal {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
242
src/components/TerminalSSHView/index.vue
Normal file
242
src/components/TerminalSSHView/index.vue
Normal file
@@ -0,0 +1,242 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
||||
import { FitAddon } from '@xterm/addon-fit';
|
||||
import { Terminal } from '@xterm/xterm';
|
||||
import '@xterm/xterm/css/xterm.css';
|
||||
import { RESULT_CODE_ERROR } from '@/constants/result-constants';
|
||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||
const ws = new WS();
|
||||
const emit = defineEmits(['connect', 'close', 'message']);
|
||||
const props = defineProps({
|
||||
/**终端ID,必传 */
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**ws连接地址,必传 如/ws/view */
|
||||
url: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**网元类型,必传 */
|
||||
neType: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**网元ID,必传 */
|
||||
neId: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**窗口单行字符数 */
|
||||
cols: {
|
||||
type: Number,
|
||||
default: 80,
|
||||
},
|
||||
/**窗口行数 */
|
||||
rows: {
|
||||
type: Number,
|
||||
default: 40,
|
||||
},
|
||||
/**ws发送requestId前缀 如ssh_id */
|
||||
prefix: {
|
||||
type: String,
|
||||
default: 'ssh',
|
||||
},
|
||||
});
|
||||
|
||||
/**终端输入DOM节点实例对象 */
|
||||
const terminalDom = ref<HTMLElement | undefined>(undefined);
|
||||
|
||||
/**终端输入实例对象 */
|
||||
const terminal = ref<any>(null);
|
||||
|
||||
/**终端输入渲染 */
|
||||
function handleRanderXterm(container: HTMLElement | undefined) {
|
||||
if (!container) return;
|
||||
const xterm = new Terminal({
|
||||
cols: props.cols,
|
||||
rows: props.rows,
|
||||
lineHeight: 1.2,
|
||||
fontSize: 12,
|
||||
fontFamily: "Monaco, Menlo, Consolas, 'Courier New', monospace",
|
||||
theme: {
|
||||
background: '#000000',
|
||||
},
|
||||
cursorBlink: true, // 光标闪烁
|
||||
cursorStyle: 'block',
|
||||
scrollback: 1000, // 设置历史缓冲区大小为 1000 行
|
||||
scrollSensitivity: 15,
|
||||
tabStopWidth: 4,
|
||||
disableStdin: true, // 禁止输入
|
||||
});
|
||||
// 挂载
|
||||
xterm.open(container);
|
||||
// 自适应尺寸
|
||||
const fitAddon = new FitAddon();
|
||||
xterm.loadAddon(fitAddon);
|
||||
// 终端尺寸变化触发
|
||||
xterm.onResize(({ cols, rows }) => {
|
||||
// console.log('尺寸', cols, rows);
|
||||
ws.send({
|
||||
requestId: `resize_${props.id}`,
|
||||
type: 'resize',
|
||||
data: { cols, rows },
|
||||
});
|
||||
});
|
||||
|
||||
// 创建 ResizeObserver 实例
|
||||
var observer = new ResizeObserver(entries => {
|
||||
fitAddon.fit();
|
||||
});
|
||||
// 监听元素大小变化
|
||||
observer.observe(container);
|
||||
|
||||
terminal.value = xterm;
|
||||
}
|
||||
|
||||
/**连接打开后回调 */
|
||||
function wsOpen(ev: any) {
|
||||
// console.info('wsOpen', ev);
|
||||
nextTick(() => {
|
||||
handleRanderXterm(terminalDom.value);
|
||||
// 连接事件
|
||||
emit('connect', {
|
||||
timeStamp: ev.timeStamp,
|
||||
cols: terminal.value.cols,
|
||||
rows: terminal.value.rows,
|
||||
neType: props.neType,
|
||||
neId: props.neId,
|
||||
id: props.id,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**连接错误后回调 */
|
||||
function wsError(ev: any) {
|
||||
console.error('wsError', ev);
|
||||
if (terminal.value != null) {
|
||||
let message = 'disconnected';
|
||||
terminal.value.write(`\x1b[31m${message}\x1b[m\r\n`);
|
||||
} else if (terminalDom.value) {
|
||||
terminalDom.value.style.background = '#000';
|
||||
terminalDom.value.style.color = '#ff4d4f';
|
||||
terminalDom.value.style.height = '60%';
|
||||
terminalDom.value.innerText = 'disconnected';
|
||||
}
|
||||
}
|
||||
|
||||
/**连接关闭后回调 */
|
||||
function wsClose(code: number) {
|
||||
// console.warn('wsClose', code);
|
||||
if (terminal.value != null) {
|
||||
let message = 'disconnected ' + code;
|
||||
terminal.value.write(`\x1b[31m${message}\x1b[m\r\n`);
|
||||
}
|
||||
// 关闭事件
|
||||
emit('close', {
|
||||
code: code,
|
||||
neType: props.neType,
|
||||
neId: props.neId,
|
||||
id: props.id,
|
||||
});
|
||||
}
|
||||
|
||||
/**接收消息后回调 */
|
||||
function wsMessage(res: Record<string, any>) {
|
||||
emit('message', res);
|
||||
// console.log('wsMessage', res);
|
||||
const { code, requestId, data } = res;
|
||||
if (code === RESULT_CODE_ERROR) {
|
||||
console.warn(res.msg);
|
||||
return;
|
||||
}
|
||||
if (!requestId) return;
|
||||
if (terminal.value != null) {
|
||||
// 查找的开始输出标记
|
||||
const parts: string[] = data.split('\u001b[?2004l\r');
|
||||
if (parts.length > 0) {
|
||||
let text = parts[parts.length - 1];
|
||||
// 找到最后输出标记
|
||||
let lestIndex = text.lastIndexOf('\u001b[?2004h\u001b]0;');
|
||||
if (lestIndex !== -1) {
|
||||
text = text.substring(0, lestIndex);
|
||||
}
|
||||
if (text === '' || text === '\r\n' || text.startsWith('^C\r\n')) {
|
||||
return;
|
||||
}
|
||||
// 是否还有最后输出标记
|
||||
lestIndex = text.lastIndexOf('\u001b[?2004h');
|
||||
if (lestIndex !== -1) {
|
||||
text = text.substring(0, lestIndex);
|
||||
}
|
||||
// console.log({ parts, text });
|
||||
terminal.value.write(text);
|
||||
return;
|
||||
}
|
||||
// 无标记
|
||||
terminal.value.write(data);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (props.neType && props.neId) {
|
||||
// 建立链接
|
||||
const options: OptionsType = {
|
||||
url: props.url,
|
||||
params: {
|
||||
neType: props.neType,
|
||||
neId: props.neId,
|
||||
cols: props.cols,
|
||||
rows: props.rows,
|
||||
},
|
||||
onmessage: wsMessage,
|
||||
onerror: wsError,
|
||||
onopen: wsOpen,
|
||||
onclose: wsClose,
|
||||
};
|
||||
ws.connect(options);
|
||||
}
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (ws.state() === WebSocket.OPEN) ws.close();
|
||||
});
|
||||
|
||||
// 给组件设置属性 ref="xxxTerminal"
|
||||
// setup内使用 const xxxTerminal = ref();
|
||||
defineExpose({
|
||||
/**清除 */
|
||||
clear: () => {
|
||||
if (terminal.value != null) {
|
||||
terminal.value.clear();
|
||||
}
|
||||
},
|
||||
/**发送命令 */
|
||||
send: (type: string, data: Record<string, any>) => {
|
||||
ws.send({
|
||||
requestId: `${props.prefix}_${props.id}`,
|
||||
type,
|
||||
data,
|
||||
});
|
||||
},
|
||||
/**模拟按下 Ctrl+C */
|
||||
ctrlC: () => {
|
||||
ws.send({
|
||||
requestId: `${props.prefix}_${props.id}`,
|
||||
type: 'ctrl-c',
|
||||
});
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="terminalDom" :id="id" class="terminal"></div>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.terminal {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
314
src/components/TerminalTelnet/index.vue
Normal file
314
src/components/TerminalTelnet/index.vue
Normal file
@@ -0,0 +1,314 @@
|
||||
<script lang="ts" setup>
|
||||
import { message } from 'ant-design-vue/lib';
|
||||
import { ref, reactive, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
||||
import { FitAddon } from '@xterm/addon-fit';
|
||||
import { Terminal } from '@xterm/xterm';
|
||||
import '@xterm/xterm/css/xterm.css';
|
||||
import { RESULT_CODE_ERROR } from '@/constants/result-constants';
|
||||
import { OptionsType, WS } from '@/plugins/ws-websocket';
|
||||
const ws = new WS();
|
||||
const emit = defineEmits(['connect', 'close', 'message']);
|
||||
const props = defineProps({
|
||||
/**终端ID,必传 */
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**连接主机ID,必传 */
|
||||
hostId: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**窗口单行字符数 */
|
||||
cols: {
|
||||
type: Number,
|
||||
default: 120,
|
||||
},
|
||||
/**窗口行数 */
|
||||
rows: {
|
||||
type: Number,
|
||||
default: 128,
|
||||
},
|
||||
/**禁止输入 */
|
||||
disable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
/**初始发送命令 */
|
||||
initCmd: {
|
||||
type: [String, Boolean],
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
/**终端输入DOM节点实例对象 */
|
||||
const terminalDom = ref<HTMLElement | undefined>(undefined);
|
||||
|
||||
/**终端输入实例对象 */
|
||||
const terminal = ref<any>(null);
|
||||
|
||||
/**终端输入文字状态 */
|
||||
const terminalState = reactive<{
|
||||
/**输入值 */
|
||||
text: string;
|
||||
/**历史 */
|
||||
history: {
|
||||
label?: string;
|
||||
value: string;
|
||||
}[];
|
||||
}>({
|
||||
text: '',
|
||||
history: [
|
||||
{
|
||||
value: 'help',
|
||||
},
|
||||
{
|
||||
value: 'quit',
|
||||
},
|
||||
{
|
||||
value: 'list ver',
|
||||
},
|
||||
{
|
||||
value: 'list lic',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
/**自动完成根据输入项进行筛选 */
|
||||
function fnAutoCompleteFilter(input: string, option: any) {
|
||||
return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
}
|
||||
|
||||
/**自动完成按键触发 */
|
||||
function fnAutoCompleteKeydown(evt: any) {
|
||||
if (evt.key === 'Enter') {
|
||||
// 阻止默认的换行行为
|
||||
evt.preventDefault();
|
||||
// 按下 Shift + Enter 键时换行
|
||||
if (evt.shiftKey) {
|
||||
// 插入换行符
|
||||
const textarea = evt.target;
|
||||
const start = textarea.selectionStart;
|
||||
const end = textarea.selectionEnd;
|
||||
const text = textarea.value;
|
||||
textarea.value = text.substring(0, start) + '\n' + text.substring(end);
|
||||
terminalState.text = textarea.value;
|
||||
// 更新光标位置
|
||||
textarea.selectionStart = textarea.selectionEnd = start + 1;
|
||||
} else {
|
||||
// ws未连接
|
||||
if (ws.state() !== WebSocket.OPEN) {
|
||||
message.error('disconnected');
|
||||
return;
|
||||
}
|
||||
|
||||
// 输入历史
|
||||
const cmdStr = terminalState.text.trim().replace(/\n/g, '\r\n');
|
||||
const hisIndex = terminalState.history.findIndex(
|
||||
item => item.value === cmdStr
|
||||
);
|
||||
if (hisIndex === -1) {
|
||||
terminalState.history.push({
|
||||
value: cmdStr,
|
||||
});
|
||||
}
|
||||
|
||||
// 发送文本
|
||||
terminal.value.scrollToBottom();
|
||||
terminal.value.writeln(cmdStr);
|
||||
ws.send({
|
||||
requestId: `telnet_${props.hostId}`,
|
||||
type: 'telnet',
|
||||
data: `${cmdStr}\r\n`,
|
||||
});
|
||||
terminalState.text = ' ';
|
||||
|
||||
// 退出登录
|
||||
if (['q', 'quit', 'exit'].includes(cmdStr)) {
|
||||
setTimeout(() => {
|
||||
ws.close();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**终端输入渲染 */
|
||||
function handleRanderXterm(container: HTMLElement | undefined) {
|
||||
if (!container) return;
|
||||
const xterm = new Terminal({
|
||||
lineHeight: 1.2,
|
||||
fontSize: 12,
|
||||
fontFamily: "Monaco, Menlo, Consolas, 'Courier New', monospace",
|
||||
theme: {
|
||||
background: '#000000',
|
||||
},
|
||||
cursorBlink: true, // 光标闪烁
|
||||
cursorStyle: 'block',
|
||||
scrollback: 1000,
|
||||
scrollSensitivity: 15,
|
||||
tabStopWidth: 4,
|
||||
disableStdin: props.disable, // 禁止输入
|
||||
});
|
||||
// 挂载
|
||||
xterm.open(container);
|
||||
// 自适应尺寸
|
||||
const fitAddon = new FitAddon();
|
||||
xterm.loadAddon(fitAddon);
|
||||
// 终端尺寸变化触发
|
||||
xterm.onResize(({ cols, rows }) => {
|
||||
// console.log('尺寸', cols, rows);
|
||||
ws.send({
|
||||
requestId: `telnet_resize_${props.hostId}`,
|
||||
type: 'telnet_resize',
|
||||
data: { cols, rows },
|
||||
});
|
||||
});
|
||||
|
||||
// 创建 ResizeObserver 实例
|
||||
var observer = new ResizeObserver(entries => {
|
||||
fitAddon.fit();
|
||||
});
|
||||
// 监听元素大小变化
|
||||
observer.observe(container);
|
||||
|
||||
terminal.value = xterm;
|
||||
}
|
||||
|
||||
/**连接打开后回调 */
|
||||
function wsOpen(ev: any) {
|
||||
// console.info('wsOpen', ev);
|
||||
nextTick(() => {
|
||||
handleRanderXterm(terminalDom.value);
|
||||
|
||||
// 连接事件
|
||||
emit('connect', {
|
||||
timeStamp: ev.timeStamp,
|
||||
cols: terminal.value.cols,
|
||||
rows: terminal.value.rows,
|
||||
hostId: props.hostId,
|
||||
id: props.id,
|
||||
});
|
||||
// 初始发送命令
|
||||
if (typeof props.initCmd === 'string') {
|
||||
ws.send({
|
||||
requestId: `telnet_${props.hostId}`,
|
||||
type: 'telnet',
|
||||
data: `${props.initCmd}\r\n`,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**连接错误后回调 */
|
||||
function wsError(ev: any) {
|
||||
console.error('wsError', ev);
|
||||
if (terminal.value != null) {
|
||||
let message = 'disconnected';
|
||||
terminal.value.write(`\x1b[31m${message}\x1b[m\r\n`);
|
||||
} else if (terminalDom.value) {
|
||||
terminalDom.value.style.background = '#000';
|
||||
terminalDom.value.style.color = '#ff4d4f';
|
||||
terminalDom.value.style.height = '60%';
|
||||
terminalDom.value.innerText = 'disconnected';
|
||||
}
|
||||
}
|
||||
|
||||
/**连接关闭后回调 */
|
||||
function wsClose(code: number) {
|
||||
// console.warn('wsClose', code);
|
||||
if (terminal.value != null) {
|
||||
let message = 'disconnected';
|
||||
terminal.value.write(`\x1b[31m${message}\x1b[m\r\n`);
|
||||
}
|
||||
// 关闭事件
|
||||
emit('close', {
|
||||
code: code,
|
||||
hostId: props.hostId,
|
||||
id: props.id,
|
||||
});
|
||||
}
|
||||
|
||||
/**接收消息后回调 */
|
||||
function wsMessage(res: Record<string, any>) {
|
||||
emit('message', res);
|
||||
// console.log('wsMessage', res);
|
||||
const { code, requestId, data } = res;
|
||||
if (code === RESULT_CODE_ERROR) {
|
||||
console.warn(res.msg);
|
||||
return;
|
||||
}
|
||||
if (!requestId) return;
|
||||
if (terminal.value != null) {
|
||||
// terminal.value.write(data.trim().replace(/\n/g, "\r\n"));
|
||||
// 是否n结尾
|
||||
if (/[\r\n]$/.test(data)) {
|
||||
terminal.value.writeln(data.trim().replace(/\n/g, '\r\n'));
|
||||
} else {
|
||||
terminal.value.write(data.replace(/\n/g, '\r\n'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (props.hostId) {
|
||||
// 建立链接
|
||||
const options: OptionsType = {
|
||||
url: '/ws/telnet',
|
||||
params: {
|
||||
hostId: props.hostId,
|
||||
cols: props.cols,
|
||||
rows: props.rows,
|
||||
},
|
||||
onmessage: wsMessage,
|
||||
onerror: wsError,
|
||||
onopen: wsOpen,
|
||||
onclose: wsClose,
|
||||
};
|
||||
ws.connect(options);
|
||||
}
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
ws.close();
|
||||
});
|
||||
|
||||
// 给组件设置属性 ref="xxxTerminal"
|
||||
// setup内使用 const xxxTerminal = ref();
|
||||
defineExpose({
|
||||
/**发送方法 */
|
||||
send: (data: string) => {
|
||||
ws.send({
|
||||
requestId: `telnet_${props.hostId}`,
|
||||
type: 'telnet',
|
||||
data: `${data}\r\n`,
|
||||
});
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="terminal">
|
||||
<div ref="terminalDom" style="height: calc(100% - 36px)" :id="id"></div>
|
||||
<a-auto-complete
|
||||
v-model:value="terminalState.text"
|
||||
:dropdown-match-select-width="500"
|
||||
style="width: 100%"
|
||||
:options="terminalState.history"
|
||||
:filter-option="fnAutoCompleteFilter"
|
||||
@keydown="fnAutoCompleteKeydown"
|
||||
>
|
||||
<a-textarea
|
||||
:auto-size="{ minRows: 1, maxRows: 6 }"
|
||||
placeholder="Execute command. Shift+Enter to line feed, Enter to send"
|
||||
/>
|
||||
</a-auto-complete>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.terminal {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
97
src/components/TerminalText/index.vue
Normal file
97
src/components/TerminalText/index.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
||||
import { FitAddon } from '@xterm/addon-fit';
|
||||
import { Terminal } from '@xterm/xterm';
|
||||
import '@xterm/xterm/css/xterm.css';
|
||||
const emit = defineEmits(['update:value']);
|
||||
const props = defineProps({
|
||||
/**终端ID,必传 */
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**窗口单行字符数 */
|
||||
cols: {
|
||||
type: Number,
|
||||
default: 80,
|
||||
},
|
||||
/**窗口行数 */
|
||||
rows: {
|
||||
type: Number,
|
||||
default: 40,
|
||||
},
|
||||
/**信息 */
|
||||
value: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
/**终端输入DOM节点实例对象 */
|
||||
const terminalDom = ref<HTMLElement | undefined>(undefined);
|
||||
|
||||
/**终端输入实例对象 */
|
||||
const terminal = ref<any>(null);
|
||||
|
||||
/**终端输入渲染 */
|
||||
function handleRanderXterm(container: HTMLElement | undefined) {
|
||||
if (!container) return;
|
||||
const xterm = new Terminal({
|
||||
cols: props.cols,
|
||||
rows: props.rows,
|
||||
lineHeight: 1.2,
|
||||
fontSize: 12,
|
||||
fontFamily: "Monaco, Menlo, Consolas, 'Courier New', monospace",
|
||||
theme: {
|
||||
background: '#000000',
|
||||
},
|
||||
cursorBlink: false, // 光标闪烁
|
||||
cursorStyle: 'block',
|
||||
scrollback: 1000,
|
||||
scrollSensitivity: 15,
|
||||
tabStopWidth: 4,
|
||||
disableStdin: true, // 禁止输入
|
||||
});
|
||||
// 挂载
|
||||
xterm.open(container);
|
||||
// 自适应尺寸
|
||||
const fitAddon = new FitAddon();
|
||||
xterm.loadAddon(fitAddon);
|
||||
|
||||
// 创建 ResizeObserver 实例
|
||||
var observer = new ResizeObserver(entries => {
|
||||
fitAddon.fit();
|
||||
});
|
||||
// 监听元素大小变化
|
||||
observer.observe(container);
|
||||
|
||||
terminal.value = xterm;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
handleRanderXterm(terminalDom.value);
|
||||
// 初始发送命令
|
||||
if (typeof props.value === 'string') {
|
||||
terminal.value.write(props.value);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (terminal.value != null) {
|
||||
terminal.value.dispose();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="terminalDom" :id="id" class="terminal"></div>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.terminal {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -35,19 +35,22 @@ const props = defineProps({
|
||||
|
||||
/**弹框关闭事件 */
|
||||
function fnModalClose() {
|
||||
if(props.loading) return
|
||||
if (props.loading) return;
|
||||
emit('close');
|
||||
}
|
||||
|
||||
/**上传前检查或转换压缩 */
|
||||
function fnBeforeUpload(file: FileType) {
|
||||
if (props.loading) return false;
|
||||
// 检查文件大小
|
||||
if (props.size > 0) {
|
||||
// 检查文件大小
|
||||
if (props.size > 0) {
|
||||
const fileSize = file.size;
|
||||
const isLtM = fileSize / 1024 / 1024 < props.size;
|
||||
if (!isLtM) {
|
||||
message.error(`${t('components.UploadModal.allowFilter')} ${props.size}MB`, 3);
|
||||
message.error(
|
||||
`${t('components.UploadModal.allowFilter')} ${props.size}MB`,
|
||||
3
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -56,7 +59,10 @@ function fnBeforeUpload(file: FileType) {
|
||||
const fileName = file.name;
|
||||
const isAllowType = props.ext.some(v => fileName.endsWith(v));
|
||||
if (!isAllowType) {
|
||||
message.error(`${t('components.UploadModal.onlyAllow')} ${props.ext.join('、')}`, 3);
|
||||
message.error(
|
||||
`${t('components.UploadModal.onlyAllow')} ${props.ext.join('、')}`,
|
||||
3
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -65,19 +71,20 @@ function fnBeforeUpload(file: FileType) {
|
||||
|
||||
/**上传请求发出 */
|
||||
function fnUpload(up: UploadRequestOption) {
|
||||
emit('upload', up.file)
|
||||
emit('upload', up.file);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-modal
|
||||
width="500px"
|
||||
<ProModal
|
||||
:drag="true"
|
||||
:destroyOnClose="true"
|
||||
:title="props.title"
|
||||
:visible="props.visible"
|
||||
:keyboard="false"
|
||||
:mask-closable="false"
|
||||
:confirm-loading="props.loading"
|
||||
:footer="null"
|
||||
:footer="false"
|
||||
@cancel="fnModalClose"
|
||||
>
|
||||
<a-space :size="8" direction="vertical" style="width: 100%">
|
||||
@@ -93,20 +100,26 @@ function fnUpload(up: UploadRequestOption) {
|
||||
<p class="ant-upload-drag-icon">
|
||||
<inbox-outlined></inbox-outlined>
|
||||
</p>
|
||||
<p class="ant-upload-text">{{t('components.UploadModal.uploadTip')}}</p>
|
||||
<p class="ant-upload-text">
|
||||
{{ t('components.UploadModal.uploadTip') }}
|
||||
</p>
|
||||
<p class="ant-upload-hint">
|
||||
<div v-if="props.size > 0">
|
||||
{{t('components.UploadModal.allowSize')}} {{ props.size }} MB
|
||||
</div>
|
||||
<div v-if="props.ext.length > 0">
|
||||
{{t('components.UploadModal.allowFormat')}} {{ props.ext.join('、') }}
|
||||
|
||||
</div>
|
||||
<template v-if="props.size > 0">
|
||||
<div>
|
||||
{{ t('components.UploadModal.allowSize') }} {{ props.size }} MB
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="props.ext.length > 0">
|
||||
<div>
|
||||
{{ t('components.UploadModal.allowFormat') }}
|
||||
{{ props.ext.join('、') }}
|
||||
</div>
|
||||
</template>
|
||||
</p>
|
||||
</a-upload-dragger>
|
||||
<slot></slot>
|
||||
</a-space>
|
||||
</a-modal>
|
||||
</ProModal>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
|
||||
204
src/components/VirtualList/index.vue
Normal file
204
src/components/VirtualList/index.vue
Normal file
@@ -0,0 +1,204 @@
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref, computed, unref, onUpdated, watchEffect } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
/**列表高度 */
|
||||
height: {
|
||||
type: Number,
|
||||
default: 300,
|
||||
},
|
||||
/**列表项高度 */
|
||||
itemHeight: {
|
||||
type: Number,
|
||||
default: 30,
|
||||
},
|
||||
/**数据 */
|
||||
data: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
/**预先兜底缓存数量 */
|
||||
cache: {
|
||||
type: Number,
|
||||
default: 2,
|
||||
},
|
||||
/**是否动态加载 */
|
||||
dynamic: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const state = reactive<any>({
|
||||
start: 0,
|
||||
end: 10,
|
||||
scrollOffset: 0,
|
||||
cacheData: [],
|
||||
});
|
||||
const virtualListRef = ref();
|
||||
|
||||
const getWrapperStyle = computed(() => {
|
||||
const { height } = props;
|
||||
return {
|
||||
height: `${height}px`,
|
||||
};
|
||||
});
|
||||
|
||||
const getInnerStyle = computed(() => {
|
||||
return {
|
||||
height: `${unref(getTotalHeight)}px`,
|
||||
width: '100%',
|
||||
};
|
||||
});
|
||||
|
||||
const getListStyle = computed(() => {
|
||||
return {
|
||||
willChange: 'transform',
|
||||
transform: `translateY(${state.scrollOffset}px)`,
|
||||
};
|
||||
});
|
||||
|
||||
// 数据数量
|
||||
const total = computed(() => {
|
||||
return props.data.length;
|
||||
});
|
||||
|
||||
// 总体高度
|
||||
const getTotalHeight = computed(() => {
|
||||
if (!props.dynamic) return unref(total) * props.itemHeight;
|
||||
return getCurrentTop(unref(total));
|
||||
});
|
||||
|
||||
// 当前屏幕显示的数量
|
||||
const clientCount = computed(() => {
|
||||
return Math.ceil(props.height / props.itemHeight);
|
||||
});
|
||||
|
||||
// 当前屏幕显示的数据
|
||||
const clientData = computed(() => {
|
||||
return props.data.slice(state.start, state.end);
|
||||
});
|
||||
|
||||
const onScroll = (e: any) => {
|
||||
const { scrollTop } = e.target;
|
||||
if (state.scrollOffset === scrollTop) return;
|
||||
const { cache, dynamic, itemHeight } = props;
|
||||
const cacheCount = Math.max(1, cache);
|
||||
|
||||
let startIndex = dynamic
|
||||
? getStartIndex(scrollTop)
|
||||
: Math.floor(scrollTop / itemHeight);
|
||||
|
||||
const endIndex = Math.max(
|
||||
0,
|
||||
Math.min(unref(total), startIndex + unref(clientCount) + cacheCount)
|
||||
);
|
||||
|
||||
if (startIndex > cacheCount) {
|
||||
startIndex = startIndex - cacheCount;
|
||||
}
|
||||
|
||||
// 偏移量
|
||||
const offset = dynamic
|
||||
? getCurrentTop(startIndex)
|
||||
: scrollTop - (scrollTop % itemHeight);
|
||||
|
||||
Object.assign(state, {
|
||||
start: startIndex,
|
||||
end: endIndex,
|
||||
scrollOffset: offset,
|
||||
});
|
||||
};
|
||||
|
||||
// 二分法去查找对应的index
|
||||
const getStartIndex = (scrollTop = 0): number => {
|
||||
let low = 0;
|
||||
let high = state.cacheData.length - 1;
|
||||
while (low <= high) {
|
||||
const middle = low + Math.floor((high - low) / 2);
|
||||
const middleTopValue = getCurrentTop(middle);
|
||||
const middleBottomValue = getCurrentTop(middle + 1);
|
||||
|
||||
if (middleTopValue <= scrollTop && scrollTop <= middleBottomValue) {
|
||||
return middle;
|
||||
} else if (middleBottomValue < scrollTop) {
|
||||
low = middle + 1;
|
||||
} else if (middleBottomValue > scrollTop) {
|
||||
high = middle - 1;
|
||||
}
|
||||
}
|
||||
return Math.min(
|
||||
unref(total) - unref(clientCount),
|
||||
Math.floor(scrollTop / props.itemHeight)
|
||||
);
|
||||
};
|
||||
|
||||
const getCurrentTop = (index: number) => {
|
||||
const lastIndex = state.cacheData.length - 1;
|
||||
|
||||
if (Object.hasOwn(state.cacheData, index)) {
|
||||
return state.cacheData[index].top;
|
||||
} else if (Object.hasOwn(state.cacheData, index - 1)) {
|
||||
return state.cacheData[index - 1].bottom;
|
||||
} else if (index > lastIndex) {
|
||||
return (
|
||||
state.cacheData[lastIndex].bottom +
|
||||
Math.max(0, index - state.cacheData[lastIndex].index) * props.itemHeight
|
||||
);
|
||||
} else {
|
||||
return index * props.itemHeight;
|
||||
}
|
||||
};
|
||||
|
||||
onUpdated(() => {
|
||||
if (!props.dynamic) return;
|
||||
const childrenList = virtualListRef.value.children || [];
|
||||
[...childrenList].forEach((node: any, index: number) => {
|
||||
const height = node.getBoundingClientRect().height;
|
||||
const currentIndex = state.start + index;
|
||||
if (state.cacheData[currentIndex].height === height) return;
|
||||
|
||||
state.cacheData[currentIndex].height = height;
|
||||
state.cacheData[currentIndex].top = getCurrentTop(currentIndex);
|
||||
state.cacheData[currentIndex].bottom =
|
||||
state.cacheData[currentIndex].top + state.cacheData[currentIndex].height;
|
||||
});
|
||||
});
|
||||
|
||||
watchEffect(() => {
|
||||
clientData.value.forEach((_, index) => {
|
||||
const currentIndex = state.start + index;
|
||||
if (Object.hasOwn(state.cacheData, currentIndex)) return;
|
||||
state.cacheData[currentIndex] = {
|
||||
top: currentIndex * props.itemHeight,
|
||||
height: props.itemHeight,
|
||||
bottom: (currentIndex + 1) * props.itemHeight,
|
||||
index: currentIndex,
|
||||
};
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="virtual-list-wrapper"
|
||||
ref="wrapperRef"
|
||||
:style="getWrapperStyle"
|
||||
@scroll="onScroll"
|
||||
>
|
||||
<div class="virtual-list-inner" ref="innerRef" :style="getInnerStyle">
|
||||
<div class="virtual-list" :style="getListStyle" ref="virtualListRef">
|
||||
<div v-for="(item, index) in clientData" :key="index + state.start">
|
||||
<slot name="default" :item="item"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.virtual-list-wrapper {
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
/**管理员-系统指定角色KEY */
|
||||
export const ADMIN_ROLE_KEY = 'admin';
|
||||
/**系统管理员-系统指定角色KEY */
|
||||
export const ADMIN_ROLE_KEY = 'system';
|
||||
|
||||
/**管理员-系统指定权限 */
|
||||
/**系统管理员-系统指定权限 */
|
||||
export const ADMIN_PERMISSION = '*:*:*';
|
||||
|
||||
@@ -3,3 +3,6 @@ export const APP_REQUEST_HEADER_CODE = 'X-App-Code';
|
||||
|
||||
/**应用-请求头-系统版本 */
|
||||
export const APP_REQUEST_HEADER_VERSION = 'X-App-Version';
|
||||
|
||||
/**应用-请求数据-密钥 */
|
||||
export const APP_DATA_API_KEY = 'T9ox2DCzpLfJIPzkH9pKhsOTMOEMJcFv';
|
||||
|
||||
@@ -10,5 +10,11 @@ export const CACHE_LOCAL_PRIMARY_COLOR = 'cache:local:primaryColor';
|
||||
/**本地缓存-多语言 */
|
||||
export const CACHE_LOCAL_I18N = 'cache:local:i18n';
|
||||
|
||||
/**本地缓存-锁屏设置 */
|
||||
export const CACHE_LOCAL_LOCK = 'cache:local:Lock';
|
||||
/**本地缓存-遮罩设置 */
|
||||
export const CACHE_LOCAL_MASK = 'cache:local:mask';
|
||||
|
||||
/**本地缓存-锁屏密码 */
|
||||
export const CACHE_LOCAL_LOCK_PASSWD = 'cache:local:lock:passwd';
|
||||
|
||||
/**数据缓存表-表格排序 */
|
||||
export const CACHE_DB_TABLE_DND = 'tbl_dnd';
|
||||
|
||||
27
src/constants/ne-constants.ts
Normal file
27
src/constants/ne-constants.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
/**网元列表,默认顺序 */
|
||||
export const NE_TYPE_LIST = [
|
||||
'OMC',
|
||||
'IMS',
|
||||
'AMF',
|
||||
'AUSF',
|
||||
'UDM',
|
||||
'SMF',
|
||||
'PCF',
|
||||
'NSSF',
|
||||
'NRF',
|
||||
'UPF',
|
||||
'LMF',
|
||||
'NEF',
|
||||
'MME',
|
||||
'N3IWF',
|
||||
'MOCNGW',
|
||||
'SMSC',
|
||||
'CBC',
|
||||
];
|
||||
|
||||
/**
|
||||
* 网元拓展包列表,默认顺序
|
||||
* IMS-adb/kvdb/rtproxy/mf
|
||||
* UDM-adb/kvdb
|
||||
*/
|
||||
export const NE_EXPAND_LIST = ['ADB', 'KVDB', 'RTPROXY', 'MF'];
|
||||
@@ -1,3 +1,12 @@
|
||||
/**响应-code加密数据 */
|
||||
export const RESULT_CODE_ENCRYPT = 2;
|
||||
|
||||
/**响应-msg加密数据 */
|
||||
export const RESULT_MSG_ENCRYPT: Record<string, string> = {
|
||||
zh_CN: '加密!',
|
||||
en_US: 'encrypt!',
|
||||
};
|
||||
|
||||
/**响应-code正常成功 */
|
||||
export const RESULT_CODE_SUCCESS = 1;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { onBeforeMount } from 'vue';
|
||||
import { ConfigProvider } from 'ant-design-vue/lib';
|
||||
import { ConfigProvider, message } from 'ant-design-vue/lib';
|
||||
import { CACHE_LOCAL_PRIMARY_COLOR } from '@/constants/cache-keys-constants';
|
||||
import { localGet, localSet } from '@/utils/cache-local-utils';
|
||||
|
||||
@@ -8,6 +8,7 @@ import { localGet, localSet } from '@/utils/cache-local-utils';
|
||||
*/
|
||||
export const usePrimaryColor = () => {
|
||||
onBeforeMount(() => {
|
||||
message.config({ top: '100px' }); // 全局配置消息距离顶部的位置
|
||||
changePrimaryColor(getLocalColor());
|
||||
});
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@ export default {
|
||||
// 语言
|
||||
i18n: '中文',
|
||||
hello: '你好',
|
||||
welcome: '欢迎使用,核心网管理平台',
|
||||
|
||||
// 通用
|
||||
common: {
|
||||
@@ -34,7 +35,6 @@ export default {
|
||||
unableNull:'不能为空',
|
||||
moreText: '更多',
|
||||
searchBarText: '搜索栏',
|
||||
tableStripedText: '表格斑马纹',
|
||||
reloadText: '刷新',
|
||||
columnSetText: '列设置',
|
||||
columnSetTitle: '列展示/排序',
|
||||
@@ -53,7 +53,15 @@ export default {
|
||||
fold: '折叠',
|
||||
},
|
||||
rowId: '编号',
|
||||
operate: '操作',
|
||||
createTime: '创建时间',
|
||||
updateTime: '更新时间',
|
||||
remark: '备注',
|
||||
description: '说明',
|
||||
operate: '更多操作',
|
||||
operateOk: '操作成功!',
|
||||
operateErr: '操作失败!',
|
||||
copyText: "复制",
|
||||
copyOk: '复制成功!',
|
||||
units: {
|
||||
second: '秒',
|
||||
minute: '分钟',
|
||||
@@ -122,12 +130,14 @@ export default {
|
||||
onlyAllow:'只支持上传文件格式',
|
||||
},
|
||||
LockScreen: {
|
||||
inputPlacePwd:'请输入登录密码',
|
||||
inputPlacePwd:'请输入锁屏密码',
|
||||
validSucc:'校验通过',
|
||||
validError:'校验失败',
|
||||
backLogin:'退出并重新登录',
|
||||
backReload:'正在重启,请稍等...',
|
||||
backReload2:'当准备就绪的时候,你的浏览器会自动刷新。',
|
||||
systemReset:'正在重置,请稍等...',
|
||||
systemReset2:'数据信息正在重置',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -139,6 +149,8 @@ export default {
|
||||
page403: '没有访问权限',
|
||||
page404: '找不到匹配页面',
|
||||
helpDoc: '系统使用文档',
|
||||
traceTaskHLR: '跟踪任务 HLR',
|
||||
lockScreen: '锁屏',
|
||||
account: {
|
||||
index: "个人中心",
|
||||
profile: "个人信息",
|
||||
@@ -162,6 +174,9 @@ export default {
|
||||
codeHit: '验证码',
|
||||
codeText: '获取验证码',
|
||||
codeSmsSend: '发送成功,请注意查看短信',
|
||||
ipPlease: '请输入有效的IP地址',
|
||||
ipv4Reg: '不是有效IPv4地址',
|
||||
ipv6Reg: '不是有效IPv6地址',
|
||||
},
|
||||
|
||||
// 布局
|
||||
@@ -171,9 +186,11 @@ export default {
|
||||
helpDoc: '使用手册',
|
||||
},
|
||||
rightContent: {
|
||||
alarm: "活动告警",
|
||||
lock: "锁屏",
|
||||
lockTip: "确认要进行锁屏吗?",
|
||||
helpDoc: "系统使用文档",
|
||||
lockPasswd: "解锁密码",
|
||||
lockPasswdTip: "可不设置密码",
|
||||
fullscreen: "全屏显示",
|
||||
logout: "退出登录",
|
||||
profile: "个人中心",
|
||||
@@ -260,10 +277,10 @@ export default {
|
||||
email: "电子邮箱",
|
||||
emailPleace: "请输入正确的电子邮箱",
|
||||
phonenumber: "手机号码",
|
||||
phonenumberPleace: "请输入正确的电子邮箱",
|
||||
phonenumberPleace: "请输入正确的手机号码",
|
||||
nick: "用户昵称",
|
||||
nickPleace: "请输入用户昵称",
|
||||
nickTip: "昵称只能包含字母、数字、中文和下划线,且不少于2位",
|
||||
nickTip: "昵称少于2位",
|
||||
profileTip: "确认要提交修改用户基本信息吗?",
|
||||
profileOk: "用户基本信息修改成功!",
|
||||
know: "我知道了",
|
||||
@@ -280,10 +297,10 @@ export default {
|
||||
newPassword: "新密码",
|
||||
newPasswordTip: "密码至少包含大小写字母、数字、特殊符号,且不少于6位",
|
||||
newPassworddPleace: "请输入新密码",
|
||||
confirmPassword: "确认新密码",
|
||||
confirmPassword: "确认新密码",
|
||||
confirmPasswordPleace: "请确认新密码",
|
||||
submit: "提交修改",
|
||||
reset: "重置",
|
||||
reset: "重置",
|
||||
submitTip: "确认要提交修改密码吗?",
|
||||
submitOkTip: "恭喜您,{num} 账号密码修改成功!",
|
||||
submitOk: "重新登录",
|
||||
@@ -362,6 +379,7 @@ export default {
|
||||
totalSure:'确认{oper}网元名称为 {msg} 的网元',
|
||||
stop: '停止',
|
||||
start: '启动',
|
||||
log: '日志',
|
||||
export: '导出',
|
||||
import: '导入',
|
||||
fileForm:'文件来源',
|
||||
@@ -421,15 +439,14 @@ export default {
|
||||
letUpTime:'激活时间',
|
||||
createTime:'创建时间',
|
||||
onlyAble:'只支持上传文件格式 {fileText}',
|
||||
nullData:'暂无网元列表数据',
|
||||
nullVersion:'当前网元无可回退版本',
|
||||
},
|
||||
license: {
|
||||
neTypePlease: '选择网元类型',
|
||||
neType: '网元类型',
|
||||
fileName: '文件名',
|
||||
createTime: '上传时间',
|
||||
comment: '文件说明',
|
||||
serialNum: '序列号',
|
||||
createTime: '时间',
|
||||
comment: '说明',
|
||||
updateComment: 'License说明',
|
||||
updateCommentPlease: '请输入License说明',
|
||||
updateFile: 'License文件',
|
||||
@@ -468,21 +485,21 @@ export default {
|
||||
neType: "网元类型",
|
||||
neTypePleace: "请选择网元类型",
|
||||
noConfigData: "暂无配置项数据",
|
||||
updateValue: "{num} 属性值修改成功",
|
||||
updateValue: "【 {num} 】 属性值修改成功",
|
||||
updateValueErr: "属性值修改失败",
|
||||
updateItem: "修改 Index 为 {num} 记录成功",
|
||||
updateItemErr: "记录修改失败",
|
||||
delItemOk: "删除 Index 为 {num} 记录成功",
|
||||
addItemOk: "新增 Index 为 {num} 记录成功",
|
||||
addItemErr: "记录新增失败",
|
||||
requireUn: "{display} 输入值是未知类型",
|
||||
requireString: "{display} 参数值不合理",
|
||||
requireInt: "{display} 参数值不在合理范围 {filter}",
|
||||
requireIpv4: "{display} 不是合法的IPV4地址",
|
||||
requireIpv6: "{display} 不是合法的IPV6地址",
|
||||
requireEnum: "{display} 不是合理的枚举值",
|
||||
requireBool: "{display} 不是合理的布尔类型的值",
|
||||
editOkTip: "确认更新该{num}属性值吗?",
|
||||
requireUn: "【 {display} 】输入值是未知类型",
|
||||
requireString: "【 {display} 】参数值不合理",
|
||||
requireInt: "【 {display} 】参数值不在合理范围 {filter}",
|
||||
requireIpv4: "【 {display} 】不是合法的IPV4地址",
|
||||
requireIpv6: "【 {display} 】不是合法的IPV6地址",
|
||||
requireEnum: "【 {display} 】不是合理的枚举值",
|
||||
requireBool: "【 {display} 】不是合理的布尔类型的值",
|
||||
editOkTip: "确认更新该【 {num} 】属性值吗?",
|
||||
updateItemTip: "确认更新Index为 【{num}】 的数据项?",
|
||||
delItemTip: "确认删除Index为 【{num}】 的数据项?",
|
||||
arrayMore: "展开",
|
||||
@@ -492,12 +509,17 @@ export default {
|
||||
overview:{
|
||||
title: "核心网系统看板",
|
||||
fullscreen: "点击全屏显示",
|
||||
toRouter: "点击跳转详情页面",
|
||||
skim: {
|
||||
users: "用户数",
|
||||
userTitle:'用户信息',
|
||||
session: "会话数",
|
||||
base: "基站数",
|
||||
baseTitle:'基站信息',
|
||||
imsUeNum: "IMS 会话数",
|
||||
smfUeNum: "Data 会话数",
|
||||
gnbBase: "5G 基站数",
|
||||
gnbUeNum:'5G 用户数',
|
||||
enbBase: "4G 基站数",
|
||||
enbUeNum:'4G 用户数',
|
||||
baseTitle:'在线信息',
|
||||
},
|
||||
upfFlow:{
|
||||
title: "用户面吞吐量",
|
||||
@@ -535,7 +557,303 @@ export default {
|
||||
time: "时间",
|
||||
resultOK: "成功",
|
||||
},
|
||||
}
|
||||
},
|
||||
cdr: {
|
||||
recordType: "记录行为",
|
||||
realTimeDataStart: "开启实时数据",
|
||||
realTimeDataStop: "关闭实时数据",
|
||||
cdrInfo: "CDR信息",
|
||||
time: "记录时间",
|
||||
rowInfo: "记录信息",
|
||||
type: "记录类型",
|
||||
duration: "通话时长",
|
||||
seizureTime: "呼叫开始时间",
|
||||
releaseTime: "挂断结束时间",
|
||||
caller: "主叫",
|
||||
called: "被叫",
|
||||
result: "结果",
|
||||
resultOk: "成功",
|
||||
resultFail: "失败",
|
||||
delTip: "确认删除编号为【{msg}】的数据项?",
|
||||
exportTip: "确认导出当前查询条件的话单数据吗?(导出最大支持一万条)",
|
||||
smfChargingID: '计费ID',
|
||||
smfSubscriptionIDData: '订阅 ID 数据',
|
||||
smfSubscriptionIDType: '订阅 ID 类型',
|
||||
smfDataVolumeUplink: '数据量上行链路',
|
||||
smfDataVolumeDownlink: '数据量下行链路',
|
||||
smfDataTotalVolume: '数据总量',
|
||||
smfDuration: '持续时间',
|
||||
smfInvocationTime: '调用时间',
|
||||
},
|
||||
ue: {
|
||||
eventType: "事件类型",
|
||||
realTimeDataStart: "开启实时数据",
|
||||
realTimeDataStop: "关闭实时数据",
|
||||
ueInfo: "UE信息",
|
||||
rowInfo: "记录信息",
|
||||
time: "记录时间",
|
||||
result: "结果",
|
||||
resultOk: "成功",
|
||||
delTip: "确认删除编号为【{msg}】的数据项?",
|
||||
exportTip: "确认导出当前查询条件的事件数据吗?(导出最大支持一万条)",
|
||||
},
|
||||
},
|
||||
ne: {
|
||||
common: {
|
||||
neType: '网元类型',
|
||||
neTypePlease: "请选择网元类型",
|
||||
neTypeTip: '填写创建的网元类型,如:SMF',
|
||||
neId: '网元标识',
|
||||
neIdPlease: '请输入网元标识',
|
||||
neIdTip: '填写网元绑定的唯一标识',
|
||||
rmUid: '资源唯一标识',
|
||||
rmUidPlease: '请输入资源唯一标识',
|
||||
rmUidTip: "用于网元日志、告警、指标等数据上报的标记",
|
||||
neName: '网元名称',
|
||||
neNamePlease: '请输入网元名称',
|
||||
ipAddr: '服务IP',
|
||||
ipAddrPlease: '请输入网元服务IP地址',
|
||||
ipAddrTip: "支持IPV4/IPV6,同步变更配置地址",
|
||||
port: '服务端口',
|
||||
portTip: "网元服务端口,默认:33030",
|
||||
serialNum: '序列号',
|
||||
expiryDate: '许可证到期日期',
|
||||
normalcy: '正常',
|
||||
exceptions: '异常',
|
||||
restart: '重启',
|
||||
restartTip: '确认要重新启动网元服务吗?',
|
||||
start: '启动',
|
||||
startTip: '确认要启动网元服务吗?',
|
||||
stop: '停止',
|
||||
stopTip: '确认要停止网元服务吗?',
|
||||
reload: '重载',
|
||||
reloadTip: '确认要重载网元配置信息吗?',
|
||||
oam: 'OAM',
|
||||
log: '日志',
|
||||
},
|
||||
neInfo: {
|
||||
version: "网元版本",
|
||||
state: "网元状态",
|
||||
serviceState: "服务状态",
|
||||
info: '状态信息',
|
||||
resourceInfo: '资源情况',
|
||||
sysMem: "系统内存",
|
||||
sysCpu: "系统CPU",
|
||||
sysDisk: "系统存储",
|
||||
neCpu: "网元CPU",
|
||||
hostConfig: "终端连接配置",
|
||||
pvflag: '网元虚拟化标识',
|
||||
pnf: '物理网元',
|
||||
vnf: '虚拟网元',
|
||||
neAddress: '物理地址(MAC)',
|
||||
neAddressTip: '记录网元的网卡物理地址(MAC)',
|
||||
dn: '网络标识',
|
||||
vendorName: '提供厂商',
|
||||
province: '服务地域',
|
||||
addTitle: '新增网元信息',
|
||||
editTitle: '编辑网元信息',
|
||||
delTip: '确认删除网元信息数据项吗?',
|
||||
oam: {
|
||||
title: 'OAM配置',
|
||||
sync: '同步到网元',
|
||||
oamEnable: '服务',
|
||||
oamPort: '端口',
|
||||
snmpEnable: '服务',
|
||||
snmpPort: '端口',
|
||||
kpiEnable: '上报',
|
||||
kpiTimer: '上报周期',
|
||||
kpiTimerPlease: '请输入上报周期(单位秒)',
|
||||
omcIP: 'OMC IP',
|
||||
},
|
||||
backConf: {
|
||||
export: '配置导出',
|
||||
import: '配置导入',
|
||||
title: '配置文件导入',
|
||||
importType: '文件来源',
|
||||
server:'服务器文件',
|
||||
local:'本地文件',
|
||||
localUpload:'本地上传',
|
||||
exportTip:'确认要导出网元配置信息到文件?',
|
||||
exportMsg:'导出网元配置信息到文件成功',
|
||||
pathPlease: '未发现文件',
|
||||
},
|
||||
},
|
||||
neHost: {
|
||||
hostType: "主机类型",
|
||||
groupId: "分组",
|
||||
title: "主机名称",
|
||||
titlePlease: "请正确填写主机名称",
|
||||
addr: "IP地址",
|
||||
addrPlease: "请正确填写主机IP地址",
|
||||
port: "端口",
|
||||
portPlease: "请正确填写主机端口号",
|
||||
user: "用户名",
|
||||
userPlease: "请正确填写主机用户",
|
||||
database: "数据库",
|
||||
authMode: "认证模式",
|
||||
password: "密码",
|
||||
passwordPlease: "请正确填写主机密码",
|
||||
privateKey: "私钥",
|
||||
privateKeyPlease: "请正确填写私钥字符内容 ~/.ssh/id_rsa",
|
||||
passPhrase: "私钥密码",
|
||||
delTip: "确认要删除主机编号为【{num}】的信息吗?",
|
||||
addTitle: "新增主机连接",
|
||||
editTitle: "编辑主机连接",
|
||||
test: "测试连接",
|
||||
testOk: "测试连接成功",
|
||||
authRSA: "免密授权",
|
||||
authRSATip: "是否要配置免密授权?",
|
||||
},
|
||||
neHostCmd: {
|
||||
cmdType: "命令类型",
|
||||
groupId: "分组",
|
||||
title: "名称",
|
||||
titlePlease: "请正确填写命令名称",
|
||||
command: "命令",
|
||||
commandPlease: "请正确输入有效命令字符串",
|
||||
delTip: "确认要删除命令编号为【{num}】的信息吗?",
|
||||
addTitle: "新增主机命令",
|
||||
editTitle: "编辑主机命令",
|
||||
},
|
||||
neSoftware: {
|
||||
uploadTitle: "上传软件",
|
||||
upload: "上传",
|
||||
uploadNotFile: "未上传软件文件",
|
||||
uploadBatch: "批量上传",
|
||||
uploadBatchMax: "可上传多个软件包,最多同时选择{txt}个。",
|
||||
uploadFileName: "解析文件名称格式如: amf-r2.240x.xx-xxx",
|
||||
name: "文件名",
|
||||
path: "软件文件",
|
||||
pathPlease: "请上传软件包文件",
|
||||
version: "软件版本",
|
||||
versionPlease: "请输入软件版本号",
|
||||
delTip: "确认要删除软件包吗?",
|
||||
downTip: "确认要下载软件包【{txt}】吗?",
|
||||
fileCheckType: '未解析出对应的网元类型',
|
||||
fileCheckVer: '未解析出对应的版本号',
|
||||
fileTypeNotEq: '不是指定网元类型 {txt}',
|
||||
fileTypeExists: '已存在相同类型文件',
|
||||
fileNameExists: '已存在相同名称文件',
|
||||
fileCheckTypeDep: '未解析出对应指定的依赖包类型',
|
||||
dependFile: '软件包依赖',
|
||||
dependFileTip: '文件名解析同上,依据上传顺序安装',
|
||||
},
|
||||
neVersion: {
|
||||
upgrade: "升级到新版本",
|
||||
upgradeTip: "确认要升级到新版本吗?",
|
||||
upgradeTipEmpty: "当前没有可用的新版本",
|
||||
upgradeTipEqual: "当前版本与新版本相同,确认要进行更新吗?",
|
||||
rollback: '切换到上一个版本',
|
||||
rollbackTip: "确认切换到上一个版本吗?",
|
||||
rollbackTipEmpty: "目前没有可用的上一个版本",
|
||||
rollbackTipEqual: '当前版本与之前版本相同,确认要进行切换吗?',
|
||||
version: "当前版本",
|
||||
preVersion: "上一个版本",
|
||||
newVersion: "新版本",
|
||||
status: "版本状态",
|
||||
upgradeBatch: "批量更新",
|
||||
upgradeBatchTip: "对勾选的记录进行新版本升级吗?",
|
||||
upgradeNotNewVer: '没有发现新版本',
|
||||
upgradeOMCVer: '拒绝批量操作升级OMC',
|
||||
upgradeDone: '更新完成,服务正在重载',
|
||||
upgradeFail: '更新失败,请检查软件文件是否存在且服务终端环境是否可用!',
|
||||
upgradeModal: '网元版本更新',
|
||||
},
|
||||
neLicense: {
|
||||
status: "许可证状态",
|
||||
change: "变更许可证",
|
||||
reload: "刷新信息",
|
||||
reloadTip: "确认要刷新许可证信息吗?",
|
||||
reloadBatch: "批量刷新",
|
||||
reloadBatchTip: "对勾选的记录进行信息刷新吗?",
|
||||
updateTtile: "更新许可证",
|
||||
downCodeTop: "确认要将许可激活码保存到文件吗?",
|
||||
activationRequestCode: "许可激活码",
|
||||
licensePath: "许可证文件",
|
||||
licensePathTip: "请上传许可证文件",
|
||||
upload: '上传',
|
||||
uploadFile: "上传许可证",
|
||||
uploadChangeOk: '网元更新许可证成功,正在后台校验!',
|
||||
uploadChangeFail: "部分网元更新许可证失败,请检查服务终端环境是否可用!",
|
||||
},
|
||||
neConfig: {
|
||||
treeTitle: "配置导航",
|
||||
treeSelectTip: "左侧配置导航中选择配置项信息!",
|
||||
neType: "网元类型",
|
||||
neTypePleace: "请选择网元类型",
|
||||
noConfigData: "暂无配置项数据",
|
||||
updateValue: "【 {num} 】 属性值修改成功",
|
||||
updateValueErr: "属性值修改失败",
|
||||
updateItem: "修改 Index 为 {num} 记录成功",
|
||||
updateItemErr: "记录修改失败",
|
||||
delItemOk: "删除 Index 为 {num} 记录成功",
|
||||
addItemOk: "新增 Index 为 {num} 记录成功",
|
||||
addItemErr: "记录新增失败",
|
||||
requireUn: "【 {display} 】输入值是未知类型",
|
||||
requireString: "【 {display} 】参数值不合理",
|
||||
requireInt: "【 {display} 】参数值不在合理范围 {filter}",
|
||||
requireIpv4: "【 {display} 】不是合法的IPV4地址",
|
||||
requireIpv6: "【 {display} 】不是合法的IPV6地址",
|
||||
requireEnum: "【 {display} 】不是合理的枚举值",
|
||||
requireBool: "【 {display} 】不是合理的布尔类型的值",
|
||||
editOkTip: "确认更新该【 {num} 】属性值吗?",
|
||||
updateItemTip: "确认更新Index为 【{num}】 的数据项?",
|
||||
delItemTip: "确认删除Index为 【{num}】 的数据项?",
|
||||
arrayMore: "展开",
|
||||
},
|
||||
neConfigBackup: {
|
||||
name: "名称",
|
||||
downTip: '确认要下载备份文件【{txt}】吗?',
|
||||
title: "修改备份信息 {txt}",
|
||||
},
|
||||
neQuickSetup: {
|
||||
reloadPara5G: '刷新',
|
||||
stepPrev: '上一步',
|
||||
stepPrevTip: '确认要放弃当前变更返回上一步吗?',
|
||||
stepNext: '下一步',
|
||||
stepSave: '保存信息',
|
||||
startTitle: '服务终端环境',
|
||||
startDesc: '测试连接网元服务',
|
||||
startStepNext: '确认要下一步进行配置网元信息?',
|
||||
addr: '终端IP',
|
||||
kernelName: '系统',
|
||||
kernelRelease: '内核',
|
||||
machine: '架构',
|
||||
prettyName: '平台',
|
||||
prettyNameTip: '支持 Ubuntu',
|
||||
nodename: '主机名',
|
||||
auth: '权限授予',
|
||||
sudo: '提权',
|
||||
sudoErr: '确保有权限进行软件包安装,请配置授予当前用户允许无密码 sudo 权限。',
|
||||
sshLink: '免密直连',
|
||||
configTitle: "配置网元",
|
||||
configDesc: "填写网元基础信息",
|
||||
configAddTitle: '新增提示',
|
||||
configAddTip: '是否新增为新的网元信息并继续?',
|
||||
configUpdateTitle: '更新提示',
|
||||
configUpdateTip: '是否更新到已存在网元信息并继续?',
|
||||
configStepNext: '确认要下一步进行网元软件安装?',
|
||||
installTitle: "网元安装",
|
||||
installDesc: "安装到服务终端",
|
||||
installConfirmTip: '确认要安装软件包【{name}】吗?',
|
||||
installStepNext: '确认要下一步进行网元授权吗?',
|
||||
installSource: '软件来源',
|
||||
installSourceOption: '已上传',
|
||||
installSourceUpload: '新上传',
|
||||
installSelect: '选择记录',
|
||||
installUpload: '上传文件',
|
||||
installText: '安装',
|
||||
licenseTitle: "授权许可",
|
||||
licenseDesc: "网元服务授权认证",
|
||||
licenseResultTitle: "是否立即授权激活",
|
||||
licenseResultTitleOk: '成功激活',
|
||||
licenseUpload: '许可证',
|
||||
licenseEnd: '结束',
|
||||
licenseEndTip: "确认要结束安装吗?",
|
||||
licenseCheack: '等待网元验证',
|
||||
licenseTip1: '1. 点击【许可证】可获取许可激活码,随后联系网元厂商进行激活',
|
||||
licenseTip2: '2. 点击【结束】将结束安装过程',
|
||||
},
|
||||
},
|
||||
neUser: {
|
||||
auth: {
|
||||
@@ -549,7 +867,7 @@ export default {
|
||||
import: '导入',
|
||||
loadDataConfirm: '确认要重新加载数据吗?',
|
||||
loadData: '加载数据',
|
||||
loadDataTip: '成功获取加载数据:{num}条,系统内部正在进行数据更新。加载结束后可点击重置刷新数据列表,请勿重复点击获取更新!!!',
|
||||
loadDataTip: '成功获取加载数据:{num}条,系统内部正在进行数据更新,请稍候!!!',
|
||||
startIMSI: '起始IMSI',
|
||||
batchAddText: '批量新增',
|
||||
batchDelText: '批量删除',
|
||||
@@ -562,9 +880,10 @@ export default {
|
||||
imsiTip3: 'MSIN=移动客户识别码,采用等长10位数字构成',
|
||||
amfTip: '鉴权管理域,参数最大长度为 4',
|
||||
algoIndexTip: '算法索引,介于0到15之间',
|
||||
kiTip: '用户签权密钥信息,最大长度为32',
|
||||
kiTip: '用户签权密钥信息,长度只能是32',
|
||||
opcTip: '鉴权秘钥,OPC是由Ki和OP经过计算得来的,OP为运营商的根秘钥,ki是鉴权秘钥,最大长度为32',
|
||||
delSure:'确认删除IMSI编号为: {imsi} 的用户吗?',
|
||||
imsiConfirm:'IMSI的长度必须为15',
|
||||
},
|
||||
sub: {
|
||||
subInfo:'签约信息',
|
||||
@@ -576,7 +895,7 @@ export default {
|
||||
import: '导入',
|
||||
loadDataConfirm: '确认要重新加载数据吗?',
|
||||
loadData: '加载数据',
|
||||
loadDataTip: '成功获取加载数据:{num}条,系统内部正在进行数据更新。加载结束后可点击重置刷新数据列表,请勿重复点击获取更新!!!',
|
||||
loadDataTip: '成功获取加载数据:{num}条,系统内部正在进行数据更新,请稍候!!!',
|
||||
numAdd: '放号个数',
|
||||
numDel: '删除个数',
|
||||
checkDel:'勾选删除',
|
||||
@@ -596,14 +915,16 @@ export default {
|
||||
micoTip: '签约的 MICO 业务标志位',
|
||||
rfspTip:'RFSP 索引,在 NG-RAN 中,特定 RRM 配置的索引,参数介于0到127之间',
|
||||
ueTypeTip: '运营商定义的用户 UE Usage Type,整型,参数介于0到127之间',
|
||||
epsFlagTip: '是否开启4G EPS 服务',
|
||||
cnFlag: '是否开启 5G Core Network 服务',
|
||||
epsFlagTip: '是否开启 4G EPS 服务',
|
||||
contextIdTip: '签约APN 上下文ID,必须从APN Context list 中选择。',
|
||||
apnContextTip: '手机可用的APN列表,最多六个,在HSS中定义。',
|
||||
staticIpTip: '指定手机用户上网时使用的静态IP地址,为"-"时表示使用动态IP地址',
|
||||
epsOdbTip: 'ODB(Operator-Determined Barring)运营商决定的闭锁,即用户接入EPS网络的业务能力由运营商决定.选中 ---对应服务被允许 未选 --- 对应服务被禁止',
|
||||
hplmnOdbTip: 'HPLMN-ODB归属运营商决定的闭锁,即用户接入EPS网络的业务能力由用户归宿运营商决定.选中 --- 对应服务被允许 未选 -- 对应服务被禁止',
|
||||
ardTip:'接入控制标志(Access-Restriction-Data),可用于区分2G/3G/LTE用户,便于为2G/3G/LTE网络共存时,对不同类型用户进行区分服务',
|
||||
smDataTip:'sm_data=1-000001&internet-1.2.3.4&ims-1.2.3.5中的IP:1.2.3.4为5G用户internet这个APN分配的静态IP,1.2.3.5为5G用户ims这个APN分配的静态IP。如果是动态分配,把IP以及前面一个连接符去掉即可。需支持多个dnn用&连接'
|
||||
smDataTip:'sm_data=1-000001&internet-1.2.3.4&ims-1.2.3.5中的IP:1.2.3.4为5G用户internet这个APN分配的静态IP,1.2.3.5为5G用户ims这个APN分配的静态IP。如果是动态分配,把IP以及前面一个连接符去掉即可。需支持多个dnn用&连接',
|
||||
smDataArrTip:'SST,DNN/APN为必填项',
|
||||
},
|
||||
pcf: {
|
||||
neType: 'PCF网元对象',
|
||||
@@ -613,17 +934,28 @@ export default {
|
||||
addTitle: '新增策略控制信息',
|
||||
updateTitle: '{imsi} 策略控制信息',
|
||||
startIMSI: '起始IMSI',
|
||||
batchOper: '批量操作',
|
||||
batchAddText: '批量新增',
|
||||
batchDelText: '批量删除',
|
||||
batchUpdateText: '批量更新',
|
||||
batchNum: '批量个数',
|
||||
batchNum: '批量个数',
|
||||
imsiTip: 'IMSI=MCC+MNC+MSIN',
|
||||
imsiTip1: 'MCC=移动国家号码, 由三位数字组成',
|
||||
imsiTip2: 'MNC=移动网络号,由两位数字组成',
|
||||
imsiTip3: 'MSIN=移动客户识别码,采用等长10位数字构成',
|
||||
delSure:'确认删除IMSI编号为: {imsi} 的用户吗?',
|
||||
checkDel:'勾选删除',
|
||||
delSure:'确认删除IMSI编号为: {imsi} 的数据项吗?',
|
||||
uploadFileOk: '文件上传成功',
|
||||
uploadFileErr: '文件上传失败',
|
||||
pccRuleTip:'PCC策略规则模板(对应参数配置-PCC Rules)',
|
||||
sessRuleTip:'会话策略规则模板(对应参数配置-Session Rules)',
|
||||
qosAudioTip:'语音呼叫QoS(对应参数配置-QoS Template的QoS ID)',
|
||||
qosVideoTip:'视频呼叫QoS(对应参数配置-QoS Template的QoS ID)',
|
||||
hdrTip:'HTTP头增强(对应参数配置-Header Enrich Template)',
|
||||
ueTip:'UE策略模板(样例: uep_001)',
|
||||
sarTip1:'服务区限制',
|
||||
sarTip2:'(对应参数配置-Service Area Restriction)',
|
||||
rfsfTip:'无线频率选择优先级',
|
||||
},
|
||||
base5G: {
|
||||
neType: '网元对象',
|
||||
@@ -659,7 +991,7 @@ export default {
|
||||
viewTask:'查看任务',
|
||||
editTask:'修改任务',
|
||||
addTask:'新增任务',
|
||||
stopTask:'挂起',
|
||||
stopTask:'停止',
|
||||
errorTaskInfo: '获取任务信息失败',
|
||||
granulOptionPlease:'请选择测量粒度',
|
||||
letupSure:'确认激活编号为 【{id}】 的任务?',
|
||||
@@ -719,8 +1051,50 @@ export default {
|
||||
exportSure:'确认是否导出全部统计数据',
|
||||
exportEmpty: "导出数据为空",
|
||||
showChartSelected: "显示全部",
|
||||
realTimeData: "实时5s数据",
|
||||
}
|
||||
realTimeData: "实时数据",
|
||||
},
|
||||
customTarget:{
|
||||
kpiId:'自定义指标项',
|
||||
kpiIdTip:'该网元没有自定义指标',
|
||||
period:'颗粒度',
|
||||
title:'自定义指标项标题',
|
||||
objectType:'对象类型',
|
||||
expression:'计算公式',
|
||||
description:'描述',
|
||||
kpiSet:'统计设置',
|
||||
delCustomTip:'确认删除记录编号为 {num} 的数据项?',
|
||||
delCustom:'成功删除记录编号为 {num} 自定义指标',
|
||||
addCustom:'添加自定义指标',
|
||||
editCustom:'编辑自定义指标',
|
||||
errorCustomInfo: '获取信息失败',
|
||||
status: '状态',
|
||||
active:'正常',
|
||||
inactive:'停用',
|
||||
symbol:"符号",
|
||||
element:'元素',
|
||||
granularity:'颗粒度',
|
||||
unit:'单位',
|
||||
},
|
||||
kpiKeyTarget:{
|
||||
"fullWidthLayout":"全宽布局",
|
||||
"twoColumnLayout":"两列布局",
|
||||
"saveLayout": "保存布局",
|
||||
"restoreSaved": "恢复布局",
|
||||
"saveSuccess": " {name} 保存成功",
|
||||
"restoreSavedSuccess": " {name} 恢复成功",
|
||||
"noSavedLayout": "没有找到保存的布局 {name}",
|
||||
"layout1": "布局1",
|
||||
"layout2": "布局2",
|
||||
"layout3": "布局3"
|
||||
},
|
||||
kpiOverView:{
|
||||
"kpiChartTitle":"网元指标概览",
|
||||
"changeLine":"切换为折线图",
|
||||
"changeBar":"切换为柱状图",
|
||||
"chooseShowMetrics":"选择需要显示的指标",
|
||||
"chooseMetrics":"选择指标",
|
||||
|
||||
},
|
||||
},
|
||||
traceManage: {
|
||||
analysis: {
|
||||
@@ -745,18 +1119,23 @@ export default {
|
||||
pcap: {
|
||||
capArgPlease: '请输入tcpdump -i any支持参数',
|
||||
cmd: '命令',
|
||||
execCmd: "通用tcpdump抓包命令",
|
||||
execCmdsSctp: "过滤sctp和port命令",
|
||||
execUPFCmdA: '适合其他网元异常,UPF配合抓包的情况',
|
||||
execUPFCmdB: '适合UPF异常需要抓包分析的情况',
|
||||
execCmd: "通用命令选项",
|
||||
execCmd2: "过滤协议端口命令",
|
||||
execCmd3: "分割文件按时间单位秒 (-G 10 ),最多生成文件数量 (-W 7)",
|
||||
execUPFCmdA: '标准版-UPF配合其他网元异常抓包分析',
|
||||
execUPFCmdB: '标准版-UPF异常需要抓包分析',
|
||||
batchOper: '批量操作',
|
||||
batchStartText: '批量开始',
|
||||
batchStopText: '批量停止',
|
||||
batchDownText: '批量下载',
|
||||
fileView: '历史抓包文件',
|
||||
fileUPF: '标准版',
|
||||
fileUPFTip: 'UPF内部抓包分析包',
|
||||
textStart: "开始",
|
||||
textStartBatch: "批量开始",
|
||||
textStop: "停止",
|
||||
textStopBatch: "批量停止",
|
||||
textLog: "日志",
|
||||
textLogMsg: "日志信息",
|
||||
textLog: "日志文件",
|
||||
textLogMsg: "日志文件信息",
|
||||
textDown: "下载",
|
||||
textDownBatch: "批量下载",
|
||||
downTip: "确认要下载 {title} 抓包数据文件吗?",
|
||||
downOk: "{title} 文件下载完成",
|
||||
downErr: "{title} 文件下载异常",
|
||||
@@ -770,12 +1149,13 @@ export default {
|
||||
stopNotRun: "{title} 任务未运行",
|
||||
},
|
||||
task: {
|
||||
neTypePlease: '请选择网元类型',
|
||||
neType: '网元类型',
|
||||
neID: '网元内部标识',
|
||||
traceId: '跟踪编号',
|
||||
trackType: '跟踪类型',
|
||||
trackTypePlease: '请选择跟踪类型',
|
||||
creater: '创建人',
|
||||
textStop: "停止",
|
||||
status: '状态',
|
||||
time: '时间',
|
||||
startTime: '开始时间',
|
||||
endTime: '结束时间',
|
||||
msisdn: 'MSISDN',
|
||||
@@ -794,17 +1174,22 @@ export default {
|
||||
interfacesPlease: '请输入信令接口',
|
||||
signalPort: '信令端口',
|
||||
signalPortPlease: '请输入信令端口',
|
||||
signalPortTip: '接口对应的端口',
|
||||
signalPortTip: '目标IP地址或源IP地址对应一方的端口',
|
||||
rangePicker: '开始结束时间',
|
||||
rangePickerPlease: '请选择任务时间开始结束时间',
|
||||
comment: '任务说明',
|
||||
commentPlease: '可输入任务说明',
|
||||
remark: '说明',
|
||||
remarkPlease: '可输入任务说明',
|
||||
addTask: '添加任务',
|
||||
editTask: '修改任务',
|
||||
viewTask: '查看任务',
|
||||
errorTaskInfo: '获取任务信息失败',
|
||||
delTask: '成功删除任务 {num}',
|
||||
delTaskTip: '确认删除记录编号为 {num} 的数据项?',
|
||||
delTaskTip: '确认删除记录编号为 {id} 的数据项?',
|
||||
stopTask: '成功停止任务 {id}',
|
||||
stopTaskTip: '确认停止记录编号为 {id} 的任务?',
|
||||
pcapView: "跟踪数据分析",
|
||||
traceFile: "跟踪文件",
|
||||
errMsg: "错误信息",
|
||||
imsiORmsisdn: "imsi 或 msisdn 是空值,不能开始任务",
|
||||
},
|
||||
},
|
||||
faultManage: {
|
||||
@@ -855,6 +1240,7 @@ export default {
|
||||
showSet:'显示过滤设置',
|
||||
exportSure:'确认是否导出全部活动告警信息',
|
||||
viewIdInfo:'查看{alarmId} 记录信息',
|
||||
closeModal:'关闭',
|
||||
},
|
||||
historyAlarm:{
|
||||
exportSure:'确认是否导出全部历史告警信息?',
|
||||
@@ -866,6 +1252,9 @@ export default {
|
||||
save:'保存设置',
|
||||
noChange:'告警前转接口设置无变更',
|
||||
forwardSet:'告警前转接口设置',
|
||||
},
|
||||
eventAlarm:{
|
||||
exportSure:'确认是否导出全部事件告警信息?',
|
||||
}
|
||||
},
|
||||
logManage:{
|
||||
@@ -875,7 +1264,7 @@ export default {
|
||||
alarmId:'告警唯一标识',
|
||||
alarmSeq:'告警流水号',
|
||||
alarmCode:'告警编号',
|
||||
alarmStatus:'原始告警级别',
|
||||
alarmStatus:'告警状态',
|
||||
eventTime:'告警产生时间',
|
||||
logTime:'记录时间',
|
||||
status:'告警状态'
|
||||
@@ -894,8 +1283,9 @@ export default {
|
||||
alarmId:'告警唯一标识',
|
||||
alarmSeq:'告警流水号',
|
||||
alarmObj:'告警前转对象',
|
||||
alarmInter:'告警前转接口',
|
||||
alarmTitle:'告警标题',
|
||||
alarmInfo:'告警内容',
|
||||
alarmInfo:'操作结果',
|
||||
eventTime:'告警产生时间',
|
||||
logTime:'记录时间'
|
||||
},
|
||||
@@ -912,8 +1302,21 @@ export default {
|
||||
downTip: "确认下载文件名为 【{fileName}】 文件?",
|
||||
downTipErr: "文件获取失败",
|
||||
dirCd: "进入目录",
|
||||
viewAs: '查看操作',
|
||||
reload: "重载",
|
||||
follow: '监视内容变化',
|
||||
tailChar: '末尾字数',
|
||||
tailLines: '末尾行数',
|
||||
},
|
||||
},
|
||||
exportFile:{
|
||||
fileName:'文件来源',
|
||||
downTip: "确认下载文件名为 【{fileName}】 文件?",
|
||||
downTipErr: "文件获取失败",
|
||||
deleteTip: "确认删除文件名为 【{fileName}】 文件?",
|
||||
deleteTipErr: "文件删除失败",
|
||||
selectTip:"请选择文件名",
|
||||
}
|
||||
},
|
||||
monitor: {
|
||||
session: {
|
||||
userName: "登录账号",
|
||||
@@ -1079,6 +1482,7 @@ export default {
|
||||
keyContent: "缓存内容",
|
||||
},
|
||||
cacheInfo: {
|
||||
baseInfo: "基本信息",
|
||||
version: "服务版本",
|
||||
mode: "运行模式",
|
||||
modeStandalone: "单机",
|
||||
@@ -1111,7 +1515,6 @@ export default {
|
||||
serialNum: '序列号',
|
||||
expiryDate: '许可证到期日期',
|
||||
switchLayout: "切换布局",
|
||||
viewLogFile: "查看日志文件",
|
||||
noData: "找不到对应的图组数据",
|
||||
},
|
||||
topologyBuild: {
|
||||
@@ -1230,7 +1633,7 @@ export default {
|
||||
edgeTypeLineAnimateState: "直线,含有状态动画",
|
||||
edgeLabelPositionStart: "开头",
|
||||
edgeLabelPositionMiddle: "中间",
|
||||
edgeLabelPositionEnd: "末尾",
|
||||
edgeLabelPositionEnd: "末尾",
|
||||
nodeTypeCircle: "圆形",
|
||||
nodeTypeRect: "矩形",
|
||||
nodeTypeEllipse: "椭圆",
|
||||
@@ -1288,9 +1691,9 @@ export default {
|
||||
loginIp: '登录地址',
|
||||
loginTime: '登录时间',
|
||||
status: '用户状态',
|
||||
userNameTip:'账号不能以数字开头,可包含大写小写字母,数字,且不少于5位',
|
||||
pwdTip:'密码至少包含大小写字母、数字、特殊符号,且不少于6位',
|
||||
nickNameTip:'昵称只能包含字母、数字、中文和下划线,且不少于2位',
|
||||
userNameTip:'账号只能包含大写字母、小写字母和数字的字符串,长度至少为6位',
|
||||
passwdTip:'密码至少包含大小写字母、数字、特殊符号,且不少于6位',
|
||||
nickNameTip:'昵称不少于2位',
|
||||
emailTip:'请输入正确的邮箱地址',
|
||||
phoneTip:'请输入正确的手机号码',
|
||||
resetPwd:'重置密码',
|
||||
@@ -1313,7 +1716,7 @@ export default {
|
||||
userWork:'用户岗位',
|
||||
userWorkPlease: '请选择用户岗位',
|
||||
userTip:'用户说明',
|
||||
loginPwd:'登入密码',
|
||||
loginPwd:'登录密码',
|
||||
updateSure:'是否更新已经存在的数据',
|
||||
downloadObj:'下载模板',
|
||||
importTitle:'用户导入',
|
||||
@@ -1399,6 +1802,13 @@ export default {
|
||||
i18nOpen: "显示切换",
|
||||
i18nDefault: "默认语言",
|
||||
i18nInstruction: '是否显示国际化切换,设置系统默认语言',
|
||||
reset: "系统重置",
|
||||
resetInstruction: "系统重置将会清除当前系统内所有数据,请谨慎操作!!!",
|
||||
resetTipContent: '确认要清除当前系统内所有数据并坚持继续吗?',
|
||||
homeInstruction:'设置系统首页界面',
|
||||
home: '系统首页',
|
||||
homeTip:'确认要提交当前界面为系统界面吗?',
|
||||
homeSet:'系统首页设置',
|
||||
},
|
||||
role:{
|
||||
allScopeOptions:'全部数据权限',
|
||||
@@ -1423,10 +1833,10 @@ export default {
|
||||
distributeUser:'分配用户',
|
||||
roleMark:'角色说明',
|
||||
menu:'菜单权限',
|
||||
roleKeyTip:"权限标识示例:dba 控制器中使用权限标识,如: @PreAuthorize({ hasRoles: ['dba'] })",
|
||||
roleKeyTip:"权限标识用于控制页面控件或路由接口",
|
||||
openSwitch:'展开/折叠',
|
||||
selAllSwitch:'全选/全不选',
|
||||
relationSwitch:'父子联动',
|
||||
relationSwitch:'节点联动',
|
||||
normal:'正常',
|
||||
stop:'暂停',
|
||||
preScope:'权限范围',
|
||||
@@ -1449,7 +1859,7 @@ export default {
|
||||
className:'部门名称',
|
||||
classId:'部门编号',
|
||||
classSort:'部门排序',
|
||||
status:'岗位状态',
|
||||
status:'部门状态',
|
||||
createTime:'创建时间',
|
||||
highClass:'上级部门',
|
||||
emailTip:'请输入正确的邮箱地址',
|
||||
@@ -1480,7 +1890,7 @@ export default {
|
||||
operate:{
|
||||
operId:'日志编号',
|
||||
moduleName:'模块名称',
|
||||
workType:'业务类型',
|
||||
workType:'操作类型',
|
||||
operUser:'操作人员',
|
||||
requestMe:'请求方式',
|
||||
host:'请求主机',
|
||||
@@ -1519,8 +1929,8 @@ export default {
|
||||
unlockSure:'确认解锁用户 【{username}】 数据项?',
|
||||
},
|
||||
},
|
||||
menu:{
|
||||
menuInfo:'菜单信息',
|
||||
menu:{
|
||||
menuInfo:'菜单信息',
|
||||
menuName:'菜单名称',
|
||||
menuId:'菜单编号',
|
||||
menuSort:'菜单排序',
|
||||
@@ -1552,7 +1962,7 @@ export default {
|
||||
componentTip:' 页面组件目录 views 访问的组件路径,如:system/user/index 注意:不带 .vue 文件后缀路由地址是网络地址可填入链接',
|
||||
perms:`权限标识示例:monitor:server:query 后端控制器中使用权限标识,如:['monitor:server:query'] 前端vue页面中使用权限标识,如:v-perms:has="['monitor:server:query']"`
|
||||
},
|
||||
dict:{
|
||||
dict:{
|
||||
dictInfo:'字典类型信息',
|
||||
dictId:'字典编号',
|
||||
dictName:'字典名称',
|
||||
@@ -1593,6 +2003,66 @@ export default {
|
||||
exportOk: "已完成导出",
|
||||
typeDataErr: "获取字典类型信息失败",
|
||||
},
|
||||
quickStart: {
|
||||
start: '开始设置',
|
||||
skip: '跳过',
|
||||
finish: '完成设置',
|
||||
stepPrev: '上一步',
|
||||
stepNext: '下一步',
|
||||
exit: '退出',
|
||||
save: '保存信息',
|
||||
sysTitle: '系统配置',
|
||||
sysAdmin: '管理员',
|
||||
sysInfo: '系统信息',
|
||||
sysLogo: '系统LOGO',
|
||||
sysLogoTip: '将图片展示到系统LOGO区域查看效果,请使用透明背景,尺寸比例适应区域大小',
|
||||
sysName: '系统名称',
|
||||
sysNameTip: '系统名称限制20个字符长度',
|
||||
sysUploadLogo: '确认要上传系统LOGO文件吗?',
|
||||
sysUploadOk: '文件上传成功,请进行保存信息',
|
||||
sysSave: '保存',
|
||||
sysSaveOk: '信息保存成功!',
|
||||
sysPrevTip: '确认要返回上一个步骤吗?',
|
||||
sysNextNe: '确认要进行网元安装吗?',
|
||||
sysNextDone: '确认要跳过网元安装吗?',
|
||||
stepNeInfoTitle: "网元服务配置",
|
||||
stepNeInfoDesc: "设置网元对应的服务终端",
|
||||
stepNeInfoStepPrev: '确认要退出网元安装步骤吗?',
|
||||
stepNeInfoStepNext: '确认要下一步进行网元配置参数?',
|
||||
stepPara5GTitle: "网元配置参数",
|
||||
stepPara5GDesc: "设置网元全局参数信息",
|
||||
savePara5GOk: '保存成功!',
|
||||
stepPara5GStepPrev: '确认要放弃当前变更返回上一步吗?',
|
||||
stepPara5GStepNext: '确认要下一步进行网元服务安装吗?',
|
||||
stepInstallTitle: "网元服务安装",
|
||||
stepInstallDesc: "将网元服务安装到服务终端",
|
||||
stepInstallStepPrev: '确认要放弃当前变更返回上一步吗?',
|
||||
stepInstallStepNext: '确认要下一步进行网元许可授权吗?',
|
||||
stepInstallText: '选择安装',
|
||||
stepInstallTip: '确认安装选择的网元新版本吗?',
|
||||
stepInstallModal: '网元进行安装',
|
||||
stepInstallNotNewVer: '没有发现新版本',
|
||||
stepInstallDone: '安装完成,服务进入初始化',
|
||||
stepInstallFail: '安装失败,请检查服务终端环境是否可用!',
|
||||
stepLicenseTitle: "网元许可授权",
|
||||
stepLicenseDesc: "获取网元许可激活码进行授权认证",
|
||||
stepLicenseReload: '选择刷新许可证',
|
||||
stepLicenseReloadTip: '确认刷新选择的许可证信息吗?',
|
||||
stepLicenseDownCode: '选择下载网元许可激活码',
|
||||
stepLicenseDownCodeTip: '确认下载选择的网元许可激活码到文本文件吗?',
|
||||
stepLicenseStepPrev: '确认要放弃当前变更返回上一步吗?',
|
||||
stepLicenseStepNext: '确认要结束网元安装步骤吗?',
|
||||
stepLicenseStepNext2: '请下载网元许可授权码文件保存,并联系网元厂商获取授权许可证',
|
||||
stepLicenseEnd: '结束',
|
||||
doneTitle: "完成配置",
|
||||
doneTip: '请进入系统后,根据情况进行更多相关配置',
|
||||
doneNETitle: '已经进行网元安装配置',
|
||||
doneNEDesc: '如有异常网元,可在系统内重新安装授权许可',
|
||||
doneSkipTitle: '未进行网元安装配置',
|
||||
doneSkipDesc: '系统将会默认初始网元信息,可在系统内自行修改或进行安装',
|
||||
donePrevTip: '确认要返回上一个步骤吗?',
|
||||
doneOkTip: '确认完成设置并开始使用吗?',
|
||||
},
|
||||
},
|
||||
mmlManage: {
|
||||
cmdTitle: "命令导航",
|
||||
@@ -1600,22 +2070,27 @@ export default {
|
||||
cmdOpTip: "左侧命令导航中选择要操作项!",
|
||||
cmdNoTip: "{num} 无可选命令操作",
|
||||
require: "必填参数:{num}",
|
||||
requireUn: "{display} 输入值是未知类型",
|
||||
requireString: "{display} 参数值不合理",
|
||||
requireInt: "{display} 参数值不在合理范围 {filter}",
|
||||
requireIpv4: "{display} 不是合法的IPV4地址",
|
||||
requireIpv6: "{display} 不是合法的IPV6地址",
|
||||
requireEnum: "{display} 不是合理的枚举值",
|
||||
requireBool: "{display} 不是合理的布尔类型的值",
|
||||
requireUn: "【 {display} 】输入值是未知类型",
|
||||
requireString: "【 {display} 】参数值不合理",
|
||||
requireInt: "【 {display} 】参数值不在合理范围 {filter}",
|
||||
requireIpv4: "【 {display} 】不是合法的IPV4地址",
|
||||
requireIpv6: "【 {display} 】不是合法的IPV6地址",
|
||||
requireEnum: "【 {display} 】不是合理的枚举值",
|
||||
requireBool: "【 {display} 】不是合理的布尔类型的值",
|
||||
requireFile: "【 {display} 】不是符合参数文件类型的值",
|
||||
cmdQuickEntry: "命令快速输入",
|
||||
cmdQuickEntryHelp: "换行(Shift + Enter) 执行发送(Enter)",
|
||||
cmdParamPanel: "参数面板",
|
||||
clearForm: "重置",
|
||||
clearLog: "清除日志",
|
||||
exec: "执行",
|
||||
cmdAwait: "等待发送命令",
|
||||
uploadFileTip: '确认要上传文件吗?',
|
||||
uploadFileOk: '文件上传成功',
|
||||
uploadFileErr: '文件上传失败',
|
||||
neOperate:{
|
||||
mml: "通用",
|
||||
mml2: "标准版",
|
||||
},
|
||||
omcOperate:{
|
||||
noOMC: "暂无OMC网元",
|
||||
},
|
||||
@@ -1635,10 +2110,50 @@ export default {
|
||||
},
|
||||
tool: {
|
||||
help: {
|
||||
fileName: "5G核心网网管操作手册.pdf",
|
||||
download: "下载",
|
||||
pdfViewer: "浏览器内预览",
|
||||
pdfViewerErr: "很抱歉,您的浏览器不支持 PDF 预览!",
|
||||
}
|
||||
},
|
||||
terminal: {
|
||||
start: "开始页",
|
||||
new: "去创建",
|
||||
more: "更多",
|
||||
reload: "断开重连",
|
||||
reloadTip: "确认要刷新重连当前 【{num}】 终端链接?",
|
||||
current: "关闭当前",
|
||||
other: "关闭其他",
|
||||
otherTip: "确认要关闭其他终端链接?",
|
||||
all: "关闭全部",
|
||||
allTip: "确认要关闭全部终端链接?",
|
||||
closeTip: "确认要关闭 【{num}】 终端链接?",
|
||||
hostSelectTitle: "选择已创建的主机进行连接",
|
||||
hostSelectShow: "打开选择",
|
||||
hostSelectMore: "加载更多 {num}",
|
||||
hostSelectHeader: "主机列表",
|
||||
},
|
||||
ps:{
|
||||
realTimeHigh:"高",
|
||||
realTimeLow:"低",
|
||||
realTimeRegular:"常规",
|
||||
realTimeStop:"已暂停",
|
||||
realTime:"实时更新速度",
|
||||
pid:"PID",
|
||||
name:"应用名称",
|
||||
username:"用户名",
|
||||
runTime:"运行时间",
|
||||
numThreads:"线程数",
|
||||
cpuPercent:"CPU使用率",
|
||||
diskRead:"磁盘读取",
|
||||
diskWrite:"磁盘写入",
|
||||
},
|
||||
net:{
|
||||
localAddr:"本地地址",
|
||||
remoteAddr:"远程地址",
|
||||
status:"状态",
|
||||
proto:"协议",
|
||||
port:"端口",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -4,12 +4,20 @@ import {
|
||||
WaterMark,
|
||||
getMenuData,
|
||||
clearMenuItem,
|
||||
MenuDataItem,
|
||||
type MenuDataItem,
|
||||
} from 'antdv-pro-layout';
|
||||
import RightContent from './components/RightContent.vue';
|
||||
import Tabs from './components/Tabs.vue';
|
||||
import GlobalMask from '@/components/GlobalMask/index.vue';
|
||||
import { scriptUrl } from '@/assets/js/icon_font_8d5l8fzk5b87iudi';
|
||||
import { computed, reactive, watch } from 'vue';
|
||||
import {
|
||||
computed,
|
||||
reactive,
|
||||
watch,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
nextTick,
|
||||
} from 'vue';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
import useRouterStore from '@/store/modules/router';
|
||||
import useTabsStore from '@/store/modules/tabs';
|
||||
@@ -21,7 +29,7 @@ const { proConfig, waterMarkContent } = useLayoutStore();
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { getServerTime } from '@/api';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import { parseUrlPath } from '@/plugins/file-static-url';
|
||||
const { t, currentLocale } = useI18n();
|
||||
@@ -51,7 +59,7 @@ watch(
|
||||
// 路由地址含有内嵌地址标识又是隐藏菜单需要处理打开高亮菜单栏
|
||||
if (v.path.includes(MENU_PATH_INLINE) && v.meta.hideInMenu) {
|
||||
const idx = v.path.lastIndexOf(MENU_PATH_INLINE);
|
||||
layoutState.openKeys.splice(-1);
|
||||
layoutState.openKeys = layoutState.selectedKeys.slice(0, -1);
|
||||
layoutState.selectedKeys[matched.length - 1] = v.path.slice(0, idx);
|
||||
}
|
||||
},
|
||||
@@ -160,8 +168,28 @@ function fnLocale(m: MenuDataItem) {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**检查系统名称是否超出范围进行滚动 */
|
||||
function fnCheckAppNameOverflow() {
|
||||
const container: HTMLDivElement | null = document.querySelector('.app-name');
|
||||
if (!container) return;
|
||||
const text: HTMLDivElement | null = container.querySelector('.marquee');
|
||||
if (!text) return;
|
||||
if (text.offsetWidth > container.offsetWidth) {
|
||||
text.classList.add('app-name_scrollable');
|
||||
text.setAttribute('data-content', text.innerText);
|
||||
} else {
|
||||
text.classList.remove('app-name_scrollable');
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => appStore.appName,
|
||||
() => nextTick(fnCheckAppNameOverflow)
|
||||
);
|
||||
|
||||
//
|
||||
onMounted(() => {
|
||||
fnCheckAppNameOverflow();
|
||||
fnGetServerTime();
|
||||
useAlarmStore().fnGetActiveAlarmInfo();
|
||||
});
|
||||
@@ -170,7 +198,7 @@ onMounted(() => {
|
||||
let serverTime = reactive({
|
||||
timestamp: 0,
|
||||
zone: 'UTC', // 时区 UTC
|
||||
interval: 0 as any, // 定时器
|
||||
interval: null as any, // 定时器
|
||||
});
|
||||
|
||||
// 获取服务器时间
|
||||
@@ -178,6 +206,9 @@ function fnGetServerTime() {
|
||||
getServerTime().then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||
const serverTimeDom = document.getElementById('serverTimeDom');
|
||||
// 时区
|
||||
const utcOffset = res.data.timeZone / 3600;
|
||||
serverTime.zone = `UTC ${utcOffset}`;
|
||||
// 时间戳
|
||||
serverTime.timestamp = parseInt(res.data.timestamp);
|
||||
serverTime.interval = setInterval(() => {
|
||||
@@ -188,10 +219,6 @@ function fnGetServerTime() {
|
||||
serverTimeDom.innerText = parseDateToStr(serverTime.timestamp);
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
// 时区
|
||||
const offsetHours = res.data.timeZone / 3600;
|
||||
serverTime.zone = `UTC ${offsetHours}`;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -201,14 +228,21 @@ document.addEventListener('visibilitychange', function () {
|
||||
if (document.visibilityState == 'hidden') {
|
||||
//切离该页面时执行
|
||||
clearInterval(serverTime.interval);
|
||||
serverTime.interval = null;
|
||||
}
|
||||
if (document.visibilityState == 'visible') {
|
||||
//切换到该页面时执行
|
||||
clearInterval(serverTime.interval);
|
||||
serverTime.interval = null;
|
||||
fnGetServerTime();
|
||||
useAlarmStore().fnGetActiveAlarmInfo();
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
clearInterval(serverTime.interval);
|
||||
serverTime.interval = null;
|
||||
});
|
||||
// ==== 服务器时间显示 end
|
||||
</script>
|
||||
|
||||
@@ -219,12 +253,10 @@ document.addEventListener('visibilitychange', function () {
|
||||
v-model:selectedKeys="layoutState.selectedKeys"
|
||||
v-model:openKeys="layoutState.openKeys"
|
||||
:menu-data="menuData"
|
||||
:breadcrumb="{ routes: breadcrumb } as any"
|
||||
disable-content-margin
|
||||
:breadcrumb="{ routes: breadcrumb }"
|
||||
v-bind="proConfig"
|
||||
:iconfont-url="scriptUrl"
|
||||
:sider-width="208"
|
||||
:locale="(fnLocale as any)"
|
||||
:locale="fnLocale"
|
||||
>
|
||||
<!--插槽-菜单头-->
|
||||
<template #menuHeaderRender>
|
||||
@@ -241,8 +273,10 @@ document.addEventListener('visibilitychange', function () {
|
||||
:alt="appStore.appName"
|
||||
:title="appStore.appName"
|
||||
/>
|
||||
<h1 class="title" :title="appStore.appName">
|
||||
{{ appStore.appName }}
|
||||
<h1 class="app-name" :title="appStore.appName">
|
||||
<span class="marquee app-name_scrollable">
|
||||
{{ appStore.appName }}
|
||||
</span>
|
||||
</h1>
|
||||
</template>
|
||||
<template v-if="appStore.logoType === 'brand'">
|
||||
@@ -260,7 +294,7 @@ document.addEventListener('visibilitychange', function () {
|
||||
<template #headerContentRender></template>
|
||||
|
||||
<!--插槽-顶部右侧-->
|
||||
<template #rightContentRender>
|
||||
<template #headerContentRightRender>
|
||||
<RightContent />
|
||||
</template>
|
||||
|
||||
@@ -295,9 +329,6 @@ document.addEventListener('visibilitychange', function () {
|
||||
</transition>
|
||||
</RouterView>
|
||||
|
||||
<!-- 锁屏遮罩 -->
|
||||
<LockScreen />
|
||||
|
||||
<!--插槽-内容底部-->
|
||||
<template #footerRender="{ width }">
|
||||
<footer class="footer">
|
||||
@@ -312,11 +343,17 @@ document.addEventListener('visibilitychange', function () {
|
||||
:href="appStore.officialUrl"
|
||||
target="_blank"
|
||||
size="small"
|
||||
v-perms:has="['system:setting:official']"
|
||||
v-if="appStore.officialUrl !== '#'"
|
||||
>
|
||||
{{ t('loayouts.basic.officialUrl') }}
|
||||
</a-button>
|
||||
<a-button type="link" size="small" @click="fnClickHelpDoc()">
|
||||
<a-button
|
||||
type="link"
|
||||
size="small"
|
||||
v-perms:has="['system:setting:doc']"
|
||||
@click="fnClickHelpDoc()"
|
||||
>
|
||||
{{ t('loayouts.basic.helpDoc') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
@@ -324,6 +361,9 @@ document.addEventListener('visibilitychange', function () {
|
||||
</footer>
|
||||
</template>
|
||||
</ProLayout>
|
||||
|
||||
<!-- 全局遮罩 -->
|
||||
<GlobalMask />
|
||||
</WaterMark>
|
||||
</template>
|
||||
|
||||
@@ -344,18 +384,40 @@ document.addEventListener('visibilitychange', function () {
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.title {
|
||||
.app-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
// text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 130px;
|
||||
width: 148px;
|
||||
> .app-name_scrollable {
|
||||
padding-right: 12px;
|
||||
display: inline-block;
|
||||
animation: scrollable-animation linear 6s infinite both;
|
||||
&::after {
|
||||
content: attr(data-content);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -100%;
|
||||
transition: right 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes scrollable-animation {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(calc(-100% - 12px));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
z-index: 16;
|
||||
margin: 0px;
|
||||
width: auto;
|
||||
margin-top: 52px;
|
||||
margin-top: 32px;
|
||||
&-fixed {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
@@ -373,7 +435,8 @@ document.addEventListener('visibilitychange', function () {
|
||||
}
|
||||
|
||||
& #serverTimeDom {
|
||||
color: #00000085;
|
||||
color: inherit;
|
||||
opacity: 0.85;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
|
||||
import Modal from 'ant-design-vue/lib/modal/Modal';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useFullscreen } from '@vueuse/core';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useAlarmStore from '@/store/modules/alarm';
|
||||
import useLockedStore from '@/store/modules/locked';
|
||||
import useMaskStore from '@/store/modules/mask';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
import { ref } from 'vue';
|
||||
const { isFullscreen, toggle } = useFullscreen();
|
||||
const { t, changeLocale, optionsLocale } = useI18n();
|
||||
const lockedStore = useLockedStore();
|
||||
const maskStore = useMaskStore();
|
||||
const userStore = useUserStore();
|
||||
const appStore = useAppStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
/**头像展开项点击 */
|
||||
@@ -31,15 +32,24 @@ function fnClick({ key }: MenuInfo) {
|
||||
}
|
||||
}
|
||||
|
||||
/**锁屏确认 */
|
||||
const lockConfirm = ref<boolean>(false);
|
||||
/**锁屏密码 */
|
||||
const lockPasswd = ref<string>('');
|
||||
|
||||
/**锁屏按钮提示 */
|
||||
function fnClickLock() {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('loayouts.rightContent.lockTip'),
|
||||
onOk() {
|
||||
lockedStore.fnLock('lock');
|
||||
},
|
||||
});
|
||||
lockConfirm.value = true;
|
||||
lockPasswd.value = '';
|
||||
maskStore.lockPasswd = '';
|
||||
}
|
||||
|
||||
/**锁屏确认跳转锁屏页面 */
|
||||
function fnClickLockToPage() {
|
||||
lockConfirm.value = false;
|
||||
maskStore.lockPasswd = lockPasswd.value;
|
||||
maskStore.handleMaskType('lock');
|
||||
router.push({ name: 'LockScreen', query: { redirect: route.path } });
|
||||
}
|
||||
|
||||
/**告警数按钮提示跳转 */
|
||||
@@ -47,16 +57,6 @@ function fnClickAlarm() {
|
||||
router.push({ name: 'ActiveAlarm_2088' });
|
||||
}
|
||||
|
||||
/**系统使用手册跳转 */
|
||||
function fnClickHelpDoc(language?: string) {
|
||||
const routeData = router.resolve({ name: 'HelpDoc' });
|
||||
let href = routeData.href;
|
||||
if (language) {
|
||||
href = `${routeData.href}?language=${language}`;
|
||||
}
|
||||
window.open(href, '_blank');
|
||||
}
|
||||
|
||||
/**改变多语言 */
|
||||
function fnChangeLocale(e: any) {
|
||||
changeLocale(e.key);
|
||||
@@ -65,39 +65,63 @@ function fnChangeLocale(e: any) {
|
||||
|
||||
<template>
|
||||
<a-space :size="12" align="center">
|
||||
<a-button type="text" @click="fnClickAlarm">
|
||||
<template #icon>
|
||||
<a-badge
|
||||
:count="useAlarmStore().activeAlarmTotal"
|
||||
:overflow-count="99"
|
||||
status="warning"
|
||||
<a-tooltip placement="bottom">
|
||||
<template #title>{{ t('loayouts.rightContent.alarm') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="fnClickAlarm">
|
||||
<template #icon>
|
||||
<a-badge
|
||||
:count="useAlarmStore().activeAlarmTotal"
|
||||
:overflow-count="99"
|
||||
status="warning"
|
||||
style="color: inherit"
|
||||
>
|
||||
<BellOutlined />
|
||||
</a-badge>
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<!-- 锁屏操作 -->
|
||||
<span v-perms:has="['system:setting:lock']">
|
||||
<a-tooltip placement="bottom">
|
||||
<template #title>{{ t('loayouts.rightContent.lock') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="fnClickLock()">
|
||||
<template #icon>
|
||||
<LockOutlined />
|
||||
</template>
|
||||
</a-button>
|
||||
<ProModal
|
||||
:drag="true"
|
||||
:width="400"
|
||||
:minHeight="200"
|
||||
:mask-closable="false"
|
||||
v-model:visible="lockConfirm"
|
||||
:title="t('loayouts.rightContent.lockTip')"
|
||||
@ok="fnClickLockToPage()"
|
||||
>
|
||||
<BellOutlined />
|
||||
</a-badge>
|
||||
</template>
|
||||
</a-button>
|
||||
|
||||
<a-tooltip placement="bottom">
|
||||
<template #title>{{ t('loayouts.rightContent.lock') }}</template>
|
||||
<a-button type="text" @click="fnClickLock">
|
||||
<template #icon>
|
||||
<LockOutlined />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<a-tooltip placement="bottom">
|
||||
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
|
||||
<a-button type="text" @click="fnClickHelpDoc()">
|
||||
<template #icon>
|
||||
<QuestionCircleOutlined />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-space>
|
||||
{{ t('loayouts.rightContent.lockPasswd') }}:
|
||||
<a-input-password
|
||||
v-model:value="lockPasswd"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip
|
||||
:title="t('loayouts.rightContent.lockPasswdTip')"
|
||||
placement="topLeft"
|
||||
>
|
||||
<UnlockOutlined />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input-password>
|
||||
</a-space>
|
||||
</ProModal>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
|
||||
<a-tooltip placement="bottom">
|
||||
<template #title>{{ t('loayouts.rightContent.fullscreen') }}</template>
|
||||
<a-button type="text" @click="toggle">
|
||||
<a-button type="text" style="color: inherit" @click="toggle">
|
||||
<template #icon>
|
||||
<FullscreenExitOutlined v-if="isFullscreen" />
|
||||
<FullscreenOutlined v-else />
|
||||
@@ -107,7 +131,7 @@ function fnChangeLocale(e: any) {
|
||||
|
||||
<a-dropdown
|
||||
placement="bottom"
|
||||
:trigger="['click', 'hover']"
|
||||
trigger="click"
|
||||
v-if="appStore.i18nOpen && hasPermissions(['system:setting:i18n'])"
|
||||
>
|
||||
<a-button size="small" type="default">
|
||||
@@ -123,7 +147,7 @@ function fnChangeLocale(e: any) {
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
||||
<a-dropdown placement="bottomRight" :trigger="['click', 'hover']">
|
||||
<a-dropdown placement="bottomRight" trigger="click">
|
||||
<div class="user">
|
||||
<a-avatar
|
||||
shape="circle"
|
||||
|
||||
@@ -95,7 +95,7 @@ function fnTabClose(path: string) {
|
||||
/**
|
||||
* 国际化翻译转换
|
||||
*/
|
||||
function fnLocale(title: string) {
|
||||
function fnLocale(title: string) {
|
||||
if (title.indexOf('router.') !== -1) {
|
||||
title = t(title);
|
||||
}
|
||||
@@ -150,7 +150,7 @@ watch(router.currentRoute, v => tabsStore.tabOpen(v), { immediate: true });
|
||||
</a-tooltip>
|
||||
<a-tooltip placement="topRight">
|
||||
<template #title>{{ t('loayouts.tabs.more') }}</template>
|
||||
<a-dropdown :trigger="['click', 'hover']" placement="bottomRight">
|
||||
<a-dropdown trigger="click" placement="bottomRight">
|
||||
<a-button type="ghost" shape="circle" size="small">
|
||||
<template #icon><DownOutlined /></template>
|
||||
</a-button>
|
||||
|
||||
@@ -4,7 +4,9 @@ import App from './App.vue';
|
||||
import router from './router';
|
||||
import directive from './directive';
|
||||
import i18n from './i18n';
|
||||
import ProModal from "antdv-pro-modal";
|
||||
import 'antdv-pro-layout/dist/style.css';
|
||||
import 'antdv-pro-modal/dist/style.css';
|
||||
import 'ant-design-vue/dist/antd.variable.min.css';
|
||||
|
||||
const app = createApp(App);
|
||||
@@ -12,5 +14,6 @@ app.use(store);
|
||||
app.use(router);
|
||||
app.use(directive);
|
||||
app.use(i18n);
|
||||
app.use(ProModal);
|
||||
|
||||
app.mount('#app');
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user