Compare commits
619
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a23cfd209f | ||
|
|
0f3df3a80b | ||
|
|
04754a022f | ||
|
|
61df24059c | ||
|
|
fbd41e2ebf | ||
|
|
cf7d234f91 | ||
|
|
b556dc36e6 | ||
|
|
0c6ea19878 | ||
|
|
0c52f2cf3b | ||
|
|
2470eed417 | ||
|
|
89c7b483d4 | ||
|
|
b26104b4bc | ||
|
|
acd8337606 | ||
|
|
eac0d957aa | ||
|
|
eae2dd5d30 | ||
|
|
fa1bb05548 | ||
|
|
6b855b8ff2 | ||
|
|
11bfae8c0f | ||
|
|
823114a6d0 | ||
|
|
99c6d233e5 | ||
|
|
728d4b00d8 | ||
|
|
8288184f15 | ||
|
|
6fc9a305ce | ||
|
|
e8b95a594b | ||
|
|
859eeda1fe | ||
|
|
3f20faf5be | ||
|
|
208d7a4725 | ||
|
|
1c44651ad2 | ||
|
|
f015f45601 | ||
|
|
dfe06e2098 | ||
|
|
44c05e964e | ||
|
|
e210dd7e33 | ||
|
|
920bca7912 | ||
|
|
b0d7b7d539 | ||
|
|
cf9968a899 | ||
|
|
f67d083e10 | ||
|
|
5124c0c04a | ||
|
|
d56c293ef5 | ||
|
|
e90bc539e9 | ||
|
|
7edcf1703e | ||
|
|
8ee0a4d191 | ||
|
|
bc1f897660 | ||
|
|
ba47d3a303 | ||
|
|
38e5e4a9e0 | ||
|
|
15d7d118c4 | ||
|
|
69d4348df7 | ||
|
|
fe81a2d924 | ||
|
|
cd53fab1f9 | ||
|
|
e6d62da386 | ||
|
|
752f8ccc70 | ||
|
|
3a0c85169e | ||
|
|
f845f3f4de | ||
|
|
63e3f352b2 | ||
|
|
d9ec9fd1e1 | ||
|
|
f198d2b9a2 | ||
|
|
1c3e6db4bc | ||
|
|
8199e16a17 | ||
|
|
0d736966dd | ||
|
|
fe5905ee35 | ||
|
|
9c27c32e26 | ||
|
|
4208ccc358 | ||
|
|
51a190771d | ||
|
|
3376d90b96 | ||
|
|
4105f4ef33 | ||
|
|
e6a4591fb6 | ||
|
|
fafe604323 | ||
|
|
f110d0e697 | ||
|
|
6210b87c84 | ||
|
|
5a761ece4e | ||
|
|
3fa2cffc82 | ||
|
|
e92004a69a | ||
|
|
a612d05429 | ||
|
|
c93dabc6cf | ||
|
|
5056de2c1a | ||
|
|
8725518450 | ||
|
|
596ee0bb8d | ||
|
|
d5f593647e | ||
|
|
37eb798c4a | ||
|
|
6536e8baba | ||
|
|
90a34302a8 | ||
|
|
84bbeda7fc | ||
|
|
cbefc04ac9 | ||
|
|
7564d6c6ab | ||
|
|
36ac9d0a5f | ||
|
|
be6e91390e | ||
|
|
f9016492be | ||
|
|
dd8dc63eab | ||
|
|
6303aecb47 | ||
|
|
0216c253d8 | ||
|
|
1076663511 | ||
|
|
8495192b83 | ||
|
|
88840cf88e | ||
|
|
97e453d880 | ||
|
|
dfc4a849f6 | ||
|
|
20b6c5c10a | ||
|
|
ab2154003e | ||
|
|
b2b837623a | ||
|
|
fb45c3fc10 | ||
|
|
d64c0f9e5e | ||
|
|
27cc02e0d6 | ||
|
|
12643cac12 | ||
|
|
205e07af45 | ||
|
|
a1443ebb95 | ||
|
|
b6d22014ce | ||
|
|
9abeb7be97 | ||
|
|
96d6cfcfa2 | ||
|
|
c16a1675f0 | ||
|
|
bddba89d1e | ||
|
|
eb49b4d29a | ||
|
|
9d0daca765 | ||
|
|
cc234ee081 | ||
|
|
e23438d910 | ||
|
|
4fccb85353 | ||
|
|
3a8f6964ae | ||
|
|
5f89732a61 | ||
|
|
8a7698b58f | ||
|
|
805785ccb7 | ||
|
|
f2d5379506 | ||
|
|
134406a82c | ||
|
|
19f4f2e1a1 | ||
|
|
fffc40b4a3 | ||
|
|
95fbce6b0e | ||
|
|
1784941670 | ||
|
|
38c3964f5c | ||
|
|
f9ab845feb | ||
|
|
48247bbb25 | ||
|
|
7c66d15e58 | ||
|
|
1c83d7ca46 | ||
|
|
ab79f577af | ||
|
|
14a8af033c | ||
|
|
572551dd76 | ||
|
|
c8e8cca410 | ||
|
|
642fff876a | ||
|
|
8e1edc680e | ||
|
|
6d9322f483 | ||
|
|
4cd896abfe | ||
|
|
ac93726a0f | ||
|
|
534f261bd4 | ||
|
|
a22213eae3 | ||
|
|
c21fbd133a | ||
|
|
55981f8936 | ||
|
|
252ed66ff8 | ||
|
|
44c9f0879b | ||
|
|
9f16fb3df6 | ||
|
|
a41936a199 | ||
|
|
dff94061e2 | ||
|
|
37d59bf7da | ||
|
|
7be72be2f8 | ||
|
|
ec21656385 | ||
|
|
c1d513bc82 | ||
|
|
a6542145e3 | ||
|
|
c5c3c9be71 | ||
|
|
ac14a207c4 | ||
|
|
a991cf3370 | ||
|
|
af53fe1d89 | ||
|
|
8370598e17 | ||
|
|
5094b91f28 | ||
|
|
4c06ddd5f9 | ||
|
|
133affa551 | ||
|
|
03a3899377 | ||
|
|
9f5f35c79d | ||
|
|
44ee479b32 | ||
|
|
62a15150b6 | ||
|
|
5accdd1b31 | ||
|
|
f3fc415338 | ||
|
|
018196eb88 | ||
|
|
3e29706b26 | ||
|
|
627e579729 | ||
|
|
030254db4e | ||
|
|
0e7b6fa6e4 | ||
|
|
57f126b5f2 | ||
|
|
8fa758d747 | ||
|
|
2030509cbb | ||
|
|
10a48af368 | ||
|
|
5101b1bae3 | ||
|
|
c590482fa4 | ||
|
|
c1c6500df2 | ||
|
|
12499e78ea | ||
|
|
6ada29bc9b | ||
|
|
0f988f65e4 | ||
|
|
c8a53c0c0f | ||
|
|
d870f12daf | ||
|
|
a960e77fc6 | ||
|
|
f32d5dd06e | ||
|
|
f9bd9f7292 | ||
|
|
6ecd98650b | ||
|
|
c49da78996 | ||
|
|
c4f3eabc71 | ||
|
|
3a6059263f | ||
|
|
a104fbf7eb | ||
|
|
407e15ca3c | ||
|
|
60adbce55d | ||
|
|
5e8049c3b3 | ||
|
|
129c9085d5 | ||
|
|
3bc4fafde7 | ||
|
|
2e165fbcff | ||
|
|
474502b45b | ||
|
|
081523db42 | ||
|
|
21cd314c46 | ||
|
|
5c792b9ac5 | ||
|
|
14eabfe1fe | ||
|
|
1e5874d7e7 | ||
|
|
e9054e320f | ||
|
|
9fdd322757 | ||
|
|
4c9388ffcb | ||
|
|
dc4d91eb41 | ||
|
|
86e3795693 | ||
|
|
03411444e4 | ||
|
|
f401ded041 | ||
|
|
010cb6d45b | ||
|
|
bb577bef0b | ||
|
|
69bd3879b1 | ||
|
|
ae6feb15a2 | ||
|
|
b8feb6fa35 | ||
|
|
bb92be64fd | ||
|
|
ce556f8a57 | ||
|
|
6f246c5800 | ||
|
|
6ceee6498f | ||
|
|
261806ccda | ||
|
|
bfc0afdb14 | ||
|
|
1238dc3a35 | ||
|
|
7d5ee27bee | ||
|
|
b9f8426b3f | ||
|
|
a5d380209e | ||
|
|
65c6571c79 | ||
|
|
2ef4261e1b | ||
|
|
84e7e2ef9f | ||
|
|
5980c7d881 | ||
|
|
de6271df00 | ||
|
|
4f18fe2552 | ||
|
|
b569fa57b6 | ||
|
|
c1a0c6f208 | ||
|
|
e2b4a54943 | ||
|
|
a8854b4e71 | ||
|
|
28483a7a8b | ||
|
|
b928d9a05c | ||
|
|
e5a41b550e | ||
|
|
07779ebd37 | ||
|
|
38c2c6bdc3 | ||
|
|
0aca52e556 | ||
|
|
fc7b4e7223 | ||
|
|
3389146569 | ||
|
|
7a93768fd0 | ||
|
|
cca9973b28 | ||
|
|
66322caf23 | ||
|
|
b7340ff101 | ||
|
|
3ae8a7c237 | ||
|
|
1c82719af0 | ||
|
|
9c28e19413 | ||
|
|
447a8a5e0d | ||
|
|
7ffcc2f881 | ||
|
|
d72ba4622e | ||
|
|
753c73dbd1 | ||
|
|
ca4493aaa6 | ||
|
|
6a683f8754 | ||
|
|
b8190bd640 | ||
|
|
1d4db90b1e | ||
|
|
0bc4db4a52 | ||
|
|
e5481638f5 | ||
|
|
973534a6ab | ||
|
|
9778244167 | ||
|
|
d02339c1ea | ||
|
|
7d361f5c31 | ||
|
|
04a7b3887f | ||
|
|
be4e1b1d09 | ||
|
|
946db8848c | ||
|
|
e4b504825d | ||
|
|
b41d3c3882 | ||
|
|
22f2cd9a2e | ||
|
|
c71e56a937 | ||
|
|
a43b5b8ab3 | ||
|
|
ffb9ac6090 | ||
|
|
178a08cccc | ||
|
|
4eb8341340 | ||
|
|
f458c18dbd | ||
|
|
74eb29d64d | ||
|
|
760e7663f2 | ||
|
|
27bac11d3c | ||
|
|
abec41af58 | ||
|
|
a91d0e7736 | ||
|
|
c3b46d0f0c | ||
|
|
b983d77aeb | ||
|
|
5ed9c4a775 | ||
|
|
5630f73cca | ||
|
|
7fbac3b32e | ||
|
|
c5eb853a21 | ||
|
|
bca6170f0a | ||
|
|
f8b036b462 | ||
|
|
4631fb2061 | ||
|
|
12eeac3c11 | ||
|
|
72a6c78230 | ||
|
|
7eccfd6877 | ||
|
|
d27577b799 | ||
|
|
3c39afd4eb | ||
|
|
0915fe6821 | ||
|
|
7f5fef0c8b | ||
|
|
4688634205 | ||
|
|
de48ffa10c | ||
|
|
d9940c7c0d | ||
|
|
d19d2c868c | ||
|
|
dff8f0dd61 | ||
|
|
1b57794b76 | ||
|
|
98a445daae | ||
|
|
1bc9358d30 | ||
|
|
8e467b95a2 | ||
|
|
21c702ce9b | ||
|
|
50cef777d5 | ||
|
|
3297d1f00b | ||
|
|
b69c0a7526 | ||
|
|
4acdbbb1f6 | ||
|
|
8c8e28d894 | ||
|
|
14dcdc7fb4 | ||
|
|
e4e24a6d76 | ||
|
|
4083a9bf1c | ||
|
|
0580fdf941 | ||
|
|
33f16f6173 | ||
|
|
8165bacace | ||
|
|
4e3e07f603 | ||
|
|
5db5c50f73 | ||
|
|
2a999a81fa | ||
|
|
a931d7006f | ||
|
|
d09a0c9743 | ||
|
|
ca0913a8cf | ||
|
|
de16c3d1f5 | ||
|
|
0b58c00566 | ||
|
|
81d1b3f9cd | ||
|
|
f9fd5fec8f | ||
|
|
76b15319ab | ||
|
|
9d1782f806 | ||
|
|
0979a8f391 | ||
|
|
a7b128b53a | ||
|
|
fa7645bd5d | ||
|
|
17826f916a | ||
|
|
7b794574cb | ||
|
|
9a37522231 | ||
|
|
fdad06d327 | ||
|
|
ba1f38c07d | ||
|
|
8f5f6e1d7e | ||
|
|
ac27336985 | ||
|
|
0eb2744a25 | ||
|
|
9adc5f402d | ||
|
|
13e2008a17 | ||
|
|
e97943bf10 | ||
|
|
6cfe080a94 | ||
|
|
940c0d2134 | ||
|
|
ba0ab5bad3 | ||
|
|
0835afa374 | ||
|
|
25f7b105eb | ||
|
|
97329fa3c9 | ||
|
|
45ddbd3bc2 | ||
|
|
dcbd75b8c9 | ||
|
|
a824e64063 | ||
|
|
150f547e50 | ||
|
|
d16d044a7e | ||
|
|
a2a4e49692 | ||
|
|
3da932a05e | ||
|
|
0c5cf00927 | ||
|
|
c68cd17c8a | ||
|
|
27a00a08ca | ||
|
|
11ccc10a01 | ||
|
|
49b4feac56 | ||
|
|
21160b9500 | ||
|
|
44ca068b1e | ||
|
|
bb7618905e | ||
|
|
e26e73b6fe | ||
|
|
94a075e8bb | ||
|
|
1d6ea3c345 | ||
|
|
72bcb47505 | ||
|
|
0faeeec2d9 | ||
|
|
b6f685e389 | ||
|
|
898224b5b1 | ||
|
|
2012837024 | ||
|
|
5d30d738ca | ||
|
|
6b7e69cc12 | ||
|
|
5d039db772 | ||
|
|
7d0d062e45 | ||
|
|
dd51475c58 | ||
|
|
abdf52e32f | ||
|
|
c305777183 | ||
|
|
459fc0f2b3 | ||
|
|
f17e998e05 | ||
|
|
5a72287fca | ||
|
|
d3399e5b4f | ||
|
|
859a0389cd | ||
|
|
855bdcdf81 | ||
|
|
3950ec3159 | ||
|
|
b56530d44c | ||
|
|
749d83e00f | ||
|
|
566020baa2 | ||
|
|
cdb8057736 | ||
|
|
daa74f148c | ||
|
|
77d648edba | ||
|
|
e1cc984837 | ||
|
|
ee63e8add1 | ||
|
|
a7ad5208b9 | ||
|
|
31687125f8 | ||
|
|
e3238194ce | ||
|
|
9b00ec91b9 | ||
|
|
c3597b929e | ||
|
|
869c09ac3c | ||
|
|
d47a87df64 | ||
|
|
891e3c458d | ||
|
|
48ff1b57f7 | ||
|
|
78e6ceff63 | ||
|
|
0d43d8f0fc | ||
|
|
28f487aff6 | ||
|
|
92c71958ae | ||
|
|
a5a2d68e0f | ||
|
|
49c12f1723 | ||
|
|
da6ae18028 | ||
|
|
8cafa39539 | ||
|
|
5100642c97 | ||
|
|
8bcf6f9c45 | ||
|
|
1dd30dbd08 | ||
|
|
af5d3c0c98 | ||
|
|
2e59573fbf | ||
|
|
0fe562e934 | ||
|
|
e744e0da0c | ||
|
|
5839698cf9 | ||
|
|
9092d1d051 | ||
|
|
b9d0bed03f | ||
|
|
cf527f1d76 | ||
|
|
6752c9c6e9 | ||
|
|
ee05ebd73e | ||
|
|
422ff4674a | ||
|
|
2be2cf8289 | ||
|
|
3a7d127033 | ||
|
|
08167b3d0a | ||
|
|
149fac7448 | ||
|
|
50caa4f178 | ||
|
|
a7fa5c8127 | ||
|
|
917777c25a | ||
|
|
456d2a9613 | ||
|
|
bb8bde9977 | ||
|
|
154cd976c0 | ||
|
|
4b1c2c4024 | ||
|
|
cdae43d46a | ||
|
|
d282ac2fca | ||
|
|
7149588b35 | ||
|
|
820eca7bbe | ||
|
|
a746d14c48 | ||
|
|
9c8d008528 | ||
|
|
8c154115e1 | ||
|
|
a4c5972fbe | ||
|
|
a13e65b39b | ||
|
|
f6c4c5ed4b | ||
|
|
54578da895 | ||
|
|
0845751a76 | ||
|
|
caa0016626 | ||
|
|
febf86c5c7 | ||
|
|
1bb86ef997 | ||
|
|
b92e225fd4 | ||
|
|
f57b2bccfb | ||
|
|
bf91430786 | ||
|
|
bd81a077d9 | ||
|
|
6f10d49384 | ||
|
|
a1a93d290f | ||
|
|
2d98d257cc | ||
|
|
226be89e31 | ||
|
|
743568861d | ||
|
|
771320a839 | ||
|
|
168d2cd590 | ||
|
|
70ebae02ca | ||
|
|
eef693b716 | ||
|
|
b2724f3279 | ||
|
|
366538ef0d | ||
|
|
eaba814cd2 | ||
|
|
9cf276a7f9 | ||
|
|
a245e74ff6 | ||
|
|
0853e29a04 | ||
|
|
b2f7e1d69b | ||
|
|
bbf3c20057 | ||
|
|
ff8bffc247 | ||
|
|
d0cfe66a7c | ||
|
|
5b220260b6 | ||
|
|
6541683bd8 | ||
|
|
a5397c4d37 | ||
|
|
ed399331ae | ||
|
|
8eb21e722c | ||
|
|
e381a0bcf7 | ||
|
|
451c10b896 | ||
|
|
b6632b1d68 | ||
|
|
52883f7051 | ||
|
|
de680e467b | ||
|
|
1472991c83 | ||
|
|
5002ba3297 | ||
|
|
3ef38f12c5 | ||
|
|
7ef429c511 | ||
|
|
f7a1a78679 | ||
|
|
62410620ed | ||
|
|
7e723d0440 | ||
|
|
fd37866dd4 | ||
|
|
aab98b016f | ||
|
|
ee2a5290b1 | ||
|
|
16f7ea4f51 | ||
|
|
5b0f801e9c | ||
|
|
11e4159368 | ||
|
|
4cdf40b3b1 | ||
|
|
f8d06b0573 | ||
|
|
297cd870fa | ||
|
|
5ee3b168fa | ||
|
|
6d164cfdf2 | ||
|
|
0dee0fecc0 | ||
|
|
09bcf2dc25 | ||
|
|
72313018cb | ||
|
|
35ca8e2fe7 | ||
|
|
209eb4377e | ||
|
|
1807cb9214 | ||
|
|
70ebb76bc1 | ||
|
|
ccf2eeef4d | ||
|
|
3b9b56fec9 | ||
|
|
34c43c5af1 | ||
|
|
e0b408148e | ||
|
|
0dcb5e86a6 | ||
|
|
f40e9136fc | ||
|
|
8e4f22b533 | ||
|
|
806e1ca301 | ||
|
|
c22ad4e8a3 | ||
|
|
61eea0ec90 | ||
|
|
e77614a86c | ||
|
|
550a19e777 | ||
|
|
5f5cae28d1 | ||
|
|
b38444a201 | ||
|
|
ac3a4f2d0e | ||
|
|
1d1ec7e1e9 | ||
|
|
5903bb49ed | ||
|
|
67d77b1ae9 | ||
|
|
f37abd2f62 | ||
|
|
98a13ca691 | ||
|
|
21a4ad986d | ||
|
|
3525d7567e | ||
|
|
0bc2be52ef | ||
|
|
15bd6f5856 | ||
|
|
619920c104 | ||
|
|
6593419fb7 | ||
|
|
08fdeb89f1 | ||
|
|
92434e0cd3 | ||
|
|
c627d9f768 | ||
|
|
24df767f3f | ||
|
|
b59c906423 | ||
|
|
56e409bec3 | ||
|
|
d0058f7e17 | ||
|
|
c1541976ff | ||
|
|
f10bc91bed | ||
|
|
fb9f465e12 | ||
|
|
0118e5d1b8 | ||
|
|
cbe769f26b | ||
|
|
f660663331 | ||
|
|
1bc06e0608 | ||
|
|
7b5c38ab48 | ||
|
|
021446b04b | ||
|
|
2b5aecc570 | ||
|
|
4bb44dc7ee | ||
|
|
4ec1035dc8 | ||
|
|
3789f0db02 | ||
|
|
0e95866854 | ||
|
|
4e4d7ad61a | ||
|
|
ead5dbcc76 | ||
|
|
e98020a17b | ||
|
|
1a3d1e0d49 | ||
|
|
43f4451269 | ||
|
|
5cb99ff153 | ||
|
|
262160c23b | ||
|
|
8e73979bd1 | ||
|
|
2aa1720dcf | ||
|
|
307ab8bcf6 | ||
|
|
429f30c322 | ||
|
|
c0a5eba8f3 | ||
|
|
b245a78777 | ||
|
|
81d70cefdc | ||
|
|
60978d5261 | ||
|
|
a2980686c0 | ||
|
|
289fc57441 | ||
|
|
041ff78a19 | ||
|
|
c0daed6e3e | ||
|
|
32e64de018 | ||
|
|
479e397e4f | ||
|
|
03e1b4b8bd | ||
|
|
9a88d9b8de | ||
|
|
1348cb94ec | ||
|
|
3125b112f7 | ||
|
|
d0b0d34862 | ||
|
|
2188c2e0a6 | ||
|
|
545fa5f301 | ||
|
|
39504233c0 | ||
|
|
fc1c590cc4 | ||
|
|
7773fca9c8 | ||
|
|
7f132edb72 | ||
|
|
020c3b259c | ||
|
|
ac45e9ef13 | ||
|
|
b1763092c6 | ||
|
|
0194d7f9b7 | ||
|
|
24c35d3e01 | ||
|
|
59992a63e7 | ||
|
|
51aa994a9e | ||
|
|
7207e0812e | ||
|
|
259ef50c0c | ||
|
|
90f55f4103 | ||
|
|
cd76015533 | ||
|
|
06a10144c2 | ||
|
|
db2466d639 | ||
|
|
def90a8aa0 | ||
|
|
421a8cdcb0 | ||
|
|
e30d7757c4 | ||
|
|
a07ad1ade2 | ||
|
|
ed72ca11be | ||
|
|
8343ccfe4e | ||
|
|
520d1ffcf9 | ||
|
|
1ab5c4f3c6 | ||
|
|
0beb0c278e | ||
|
|
9b443b0a2a | ||
|
|
2d6f358ec8 | ||
|
|
c89ba642b5 | ||
|
|
8e72ad7f2f | ||
|
|
0c9d28fdf1 | ||
|
|
dd6bcb8d02 | ||
|
|
fc3b0a69d6 | ||
|
|
1075c8ae4f | ||
|
|
a5bc16ae4f |
No files matched your search
@@ -0,0 +1,11 @@
|
||||
# 🎨 editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
@@ -0,0 +1,17 @@
|
||||
# 历史路径-哈希带井号标识
|
||||
VITE_HISTORY_HASH = false
|
||||
|
||||
# 历史路径-前缀URL如:/h5
|
||||
VITE_HISTORY_BASE_URL = "/"
|
||||
|
||||
# 应用名称
|
||||
VITE_APP_NAME = "Core Network EMS"
|
||||
|
||||
# 应用标识
|
||||
VITE_APP_CODE = "CN EMS"
|
||||
|
||||
# 应用版本
|
||||
VITE_APP_VERSION = "2.2312.9"
|
||||
|
||||
# 接口基础URL地址-不带/后缀
|
||||
VITE_API_BASE_URL = "/omc-api"
|
||||
@@ -0,0 +1,18 @@
|
||||
# 历史路径-哈希带井号标识
|
||||
VITE_HISTORY_HASH = true
|
||||
|
||||
# 历史路径-前缀URL如:/h5
|
||||
VITE_HISTORY_BASE_URL = "/"
|
||||
|
||||
# 应用名称
|
||||
VITE_APP_NAME = "Core Network EMS"
|
||||
|
||||
# 应用标识
|
||||
VITE_APP_CODE = "CN EMS"
|
||||
|
||||
# 应用版本
|
||||
VITE_APP_VERSION = "2.231222.9"
|
||||
|
||||
# 接口基础URL地址-不带/后缀
|
||||
VITE_API_BASE_URL = "/omc-api"
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
**/*.log
|
||||
|
||||
tests/**/coverage/
|
||||
tests/e2e/reports
|
||||
selenium-debug.log
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.local
|
||||
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
components.d.ts
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"semi": true,
|
||||
"trailingComma": "es5",
|
||||
"bracketSpacing": true,
|
||||
"jsxBracketSameLine": false,
|
||||
"arrowParens": "avoid"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
# 版本发布日志
|
||||
|
||||
## 2.2312.9-20231222
|
||||
|
||||
- 新增 日志管理查看网元日志文件并下载功能页面
|
||||
- 新增 国际化切换权限控制,系统设置里控制切换默认语言
|
||||
- 新增 性能管理 KPI 指标集功能页面
|
||||
- 新增 UE 管理 PCF 用户策略控制功能页面
|
||||
- 修复 参数配置新增数据类型值不匹配导致的异常失败
|
||||
- 修复 多处英文显示词义不明确的信息提示
|
||||
- 修复 UE 管理 UDM 签约用户数据批量新增时EPSODB转换十六进制问题
|
||||
- 优化 网元管理重启接口超时导致网元信息不一致问题
|
||||
- 优化 参数配置新增编辑参数顺序,参数类型格式化
|
||||
- 优化 主页网元状态饼图颜色选择自定义
|
||||
- 优化 MML 操作 UDM 签约用户信息字段,必填项标红
|
||||
- 优化 软件管理回退功能操作页面
|
||||
- 优化 静态文件地址追加随机戳避免缓存
|
||||
- 优化 补充移动端样式适配调整
|
||||
- 主页修改增加OMC的序列号,点击网元信息不再覆盖右边信息框
|
||||
@@ -1,3 +1,63 @@
|
||||
# fe.ems.vue3
|
||||
# 核心网管理系统
|
||||
|
||||
OMC 前端
|
||||
## 简介
|
||||
|
||||
- 系统布局使用 [@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
|
||||
```
|
||||
|
||||
## 程序命令
|
||||
|
||||
项目目录下 `.env.[环境]` 文件对应环境的一些配置,启动前请检查文件内是否配置正确。
|
||||
|
||||
```bash
|
||||
# 使用阿里源可以加速下载依赖库
|
||||
npm install --registry https://registry.npmmirror.com
|
||||
```
|
||||
|
||||
### 开发 development
|
||||
|
||||
```bash
|
||||
# 检查配置参数 .env.development 和 vite.config.ts
|
||||
npm install # 安装项目所需依赖
|
||||
npm run dev # 开发模式启动项目
|
||||
Local http://localhost:6269 # 启动成功后得到服务访问地址
|
||||
```
|
||||
|
||||
### 部署 production
|
||||
|
||||
```bash
|
||||
# 检查配置参数 .env.development
|
||||
npm install # 安装项目所需依赖
|
||||
npm run build # 构建生产项目代码
|
||||
```
|
||||
|
||||
## 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
|
||||
```
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>loading...</title>
|
||||
<link rel="preload" href="/loading.js" as="script">
|
||||
<script async src="/loading.js"></script>
|
||||
<link rel="preload" href="/config.js" as="script">
|
||||
<script async src="/config.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "ems_frontend_vue3",
|
||||
"type": "module",
|
||||
"description": "核心网管理平台",
|
||||
"author": "TsMask",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons-vue": "^7.0.1",
|
||||
"@antv/g6": "^4.8.24",
|
||||
"@codemirror/lang-javascript": "^6.2.1",
|
||||
"@codemirror/merge": "^6.4.0",
|
||||
"@codemirror/theme-one-dark": "^6.1.2",
|
||||
"@tato30/vue-pdf": "^1.8.1",
|
||||
"@vueuse/core": "^10.7.0",
|
||||
"ant-design-vue": "^3.2.20",
|
||||
"antdv-pro-layout": "^3.2.6",
|
||||
"codemirror": "^6.0.1",
|
||||
"dayjs": "^1.11.10",
|
||||
"echarts": "^5.4.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"js-base64": "^3.7.5",
|
||||
"js-cookie": "^3.0.5",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.1.7",
|
||||
"vue": "^3.3.11",
|
||||
"vue-codemirror": "^6.1.1",
|
||||
"vue-i18n": "^9.8.0",
|
||||
"vue-router": "^4.2.5",
|
||||
"vue3-smooth-dnd": "^0.0.6",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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": "^4.5.2",
|
||||
"less": "^4.2.0",
|
||||
"typescript": "^5.3.3",
|
||||
"unplugin-vue-components": "^0.26.0",
|
||||
"vite": "^5.0.9",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vue-tsc": "^1.8.25"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* =============== Zh ===============
|
||||
* - Nginx部署
|
||||
* 删除loading.js同级下同名文件,Nginx代理地址: /omc-api
|
||||
*
|
||||
* - 非Nginx部署
|
||||
* 请将当前文件与loading.js同级,将host变量值修改为数据服务访问地址
|
||||
* !!!注意: 修改当前文件后,建议关闭浏览器后重新访问
|
||||
*
|
||||
* =============== En ===============
|
||||
* - Nginx Deployment
|
||||
* Delete the file with the same name under the same level of loading.js, Nginx proxy address: /omc-api
|
||||
*
|
||||
* - Non-Nginx Deployment
|
||||
* Please make the current file the same level as the loading.js, change the host variable value to the data service access address
|
||||
* !!! Note: After modifying the current file, it is recommended to revisit it after closing the browser.
|
||||
*
|
||||
*/
|
||||
(function () {
|
||||
// host = ip:port
|
||||
const host = '192.168.8.100:3030';
|
||||
|
||||
// Service Address 服务地址
|
||||
sessionStorage.setItem('baseUrl', `http://${host}`);
|
||||
// websocket Address
|
||||
sessionStorage.setItem('wsUrl', `ws://${host}`);
|
||||
})();
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 227 B |
@@ -0,0 +1 @@
|
||||
(function(window){var svgSprite="<svg>"+""+'<symbol id="icon-tuichu" viewBox="0 0 1024 1024">'+""+'<path d="M891.215448 714.840276c-24.275862 0-35.133793 19.667862-35.133793 43.926069l-0.088276 58.579862c-6.779586 33.227034-25.811862 46.362483-66.59531 49.716966l-568.125793 0.300138c-35.098483-4.272552-49.558069-17.831724-54.501517-49.469793l0.653241-604.318897c3.742897-32.114759 15.642483-46.962759 46.238897-52.524138l593.672828-0.317793c30.296276 6.249931 44.314483 21.910069 48.904828 54.377931l-0.141241 49.257931c0 24.275862 10.857931 43.926069 35.133793 43.926069 24.240552 0 34.868966-19.667862 34.868966-43.926069l0.300138-93.854897c-2.807172-45.868138-40.448-82.290759-86.987034-82.449655l-658.696828 0.353103C134.144 90.465103 96.926897 128.441379 96.697379 175.457103l0.370759 676.652138c2.065655 45.267862 38.170483 81.37269 83.42069 83.456l649.057103 0.406069 9.533793 0c47.298207 0 85.556966-37.428966 87.463724-84.250483l0.123586-92.936828C926.649379 734.525793 915.456 714.840276 891.215448 714.840276zM706.56 715.105103c11.723034 11.723034 35.169103 15.536552 47.280552 3.425103l165.005241-165.393655c6.426483-6.426483 8.492138-16.384 7.362207-26.07669-0.158897-6.232276-1.959724-12.111448-5.66731-16.807724-1.253517-2.048-2.665931-3.937103-4.272552-5.543724-1.112276-1.094621-2.401103-2.030345-3.707586-2.966069l-158.631724-159.002483c-12.111448-12.111448-36.422621-9.445517-48.145655 2.277517-11.687724 11.723034-14.689103 36.334345-2.577655 48.428138l100.175448 100.404966L542.455172 493.638621c-17.143172 0-39.000276 15.607172-39.000276 35.998897 0 21.53931 21.857103 35.716414 39.000276 35.716414l262.69131 0.211862-102.029241 102.258759C691.005793 679.936 694.81931 703.382069 706.56 715.105103z" ></path>'+""+"</symbol>"+""+'<symbol id="icon-fanhui" viewBox="0 0 1024 1024">'+""+'<path d="M461.141333 254.532267l0 106.24 0 33.792 33.792 0.341333c234.8032 2.269867 367.069867 106.7008 401.5104 318.327467-128.989867-149.1968-277.7088-149.265067-401.169067-149.2992L461.141333 563.933867l0 34.133333 0 104.704L144.708267 478.634667 461.141333 254.532267M495.274667 188.501333l-409.6 290.133333 409.6 290.133333L495.274667 598.0672c163.925333 0.068267 315.921067 8.328533 444.450133 237.533867 0-145.5616-24.046933-470.766933-444.450133-474.8288L495.274667 188.501333 495.274667 188.501333z" ></path>'+""+"</symbol>"+""+'<symbol id="icon-facebook" viewBox="0 0 1024 1024">'+""+'<path d="M535.9 1023.9c68.2 0 132.6 0 159.6 0l0 0.1C668.4 1024 604.1 1024 535.9 1023.9L535.9 1023.9zM253.5 0.6c-23 0.4-46.2 1.9-67 5.8-22.6 4.3-43.2 10-63.8 20.5-20.9 10.6-38.9 25.1-55 40.8-15.7 16.1-30.2 34.2-40.8 55-10.4 20.6-16.2 41.1-20.5 63.8-3.9 20.8-5.4 44-5.8 67-0.1 5.2-0.1 10-0.2 17.5l-0.3 450c0 5.7 0.1 11.9 0.1 18.7 0.2 16.3 0.3 23 0.4 30.7 0.4 23 1.9 46.2 5.8 67 1.9 9.9 4 19.4 6.7 28.6 3.5 11.9 7.9 23.5 13.8 35.1 10.6 20.9 25.1 38.9 40.8 55 16.1 15.7 34.2 30.2 55 40.8 20.6 10.4 41.1 16.2 63.8 20.5 20.8 3.9 44 5.4 67 5.8 7.7 0.1 14.4 0.2 30.7 0.4 15.5 0.1 28.2 0.2 37.6 0.2 26.1 0 123.5 0 214 0l0-397L407.1 626.8 407.1 478.3l127.8 0L534.9 340.1C534.9 234 616.9 158 722.9 158l137.2 3 0 142.6L755.3 303.6c-30.3 0-54.9 33.5-54.9 63.9l0 110.8 154.6 0-22 148.6L695.5 626.9l0 397c2.5 0 4.8 0 6.6 0 9.4 0 22.1-0.1 37.6-0.2 12.9-0.1 19.8-0.2 25.9-0.2 1.6 0 3.2 0 4.9-0.1 23-0.4 46.2-1.9 67-5.8 22.6-4.3 43.2-10 63.8-20.5 20.9-10.6 38.9-25.1 55-40.8 15.7-16.1 30.2-34.2 40.8-55 10.4-20.6 16.2-41.1 20.5-63.8 3.9-20.8 5.4-44 5.8-67 0.1-7.7 0.2-14.4 0.4-30.7 0.1-15.5 0.2-28.2 0.2-37.6L1024 321.9c0-3.2 0-6.9 0-10.9 0-7.6-0.1-16.6-0.2-26.8-0.2-16.3-0.3-23-0.4-30.7-0.4-23-1.9-46.2-5.8-67-4.3-22.6-10-43.2-20.5-63.8-10.6-20.9-25.1-38.9-40.8-55-16.1-15.7-34.2-30.2-55-40.8-20.6-10.4-41.1-16.2-63.8-20.5-20.8-3.9-44-5.4-67-5.8-7.7-0.1-14.4-0.2-30.7-0.4C724.2 0.1 711.5 0 702.1 0L321.8 0c-9.4 0-22.1 0.1-37.6 0.2C267.9 0.4 261.2 0.5 253.5 0.6z" ></path>'+""+"</symbol>"+""+'<symbol id="icon-twitter" viewBox="0 0 1024 1024">'+""+'<path d="M1023.8 284.2c-0.2-16.3-0.3-23-0.4-30.7-0.4-23-1.9-46.2-5.8-67-4.3-22.6-10-43.2-20.5-63.8-10.6-20.9-25.1-38.9-40.8-55-16.1-15.7-34.2-30.2-55-40.8-20.6-10.4-41.1-16.2-63.8-20.5-20.8-3.9-44-5.4-67-5.8-7.7-0.1-14.4-0.2-30.7-0.4C724.2 0.1 711.5 0 702.1 0c-47.6 0-332.6 0-380.3 0-9.4 0-22.1 0.1-37.6 0.2-16.3 0.2-23 0.3-30.7 0.4-23 0.4-46.2 1.9-67 5.8-22.6 4.3-43.2 10-63.8 20.5-20.9 10.6-38.9 25.1-55 40.8-15.7 16.1-30.2 34.2-40.8 55-10.4 20.6-16.2 41.1-20.5 63.8-3.9 20.8-5.4 44-5.8 67-0.1 7.7-0.2 14.4-0.4 30.7C0.1 299.8 0 312.5 0 321.9l0 380.3c0 9.4 0.1 22.1 0.2 37.6 0.2 16.3 0.3 23 0.4 30.7 0.4 23 1.9 46.2 5.8 67 4.3 22.6 10 43.2 20.5 63.8 10.6 20.9 25.1 38.9 40.8 55 16.1 15.7 34.2 30.2 55 40.8 20.6 10.4 41.1 16.2 63.8 20.5 20.8 3.9 44 5.4 67 5.8 7.7 0.1 14.4 0.2 30.7 0.4 15.5 0.1 28.2 0.2 37.6 0.2 47.6 0 332.6 0 380.3 0 9.4 0 22.1-0.1 37.6-0.2 16.3-0.2 23-0.3 30.7-0.4 23-0.4 46.2-1.9 67-5.8 22.6-4.3 43.2-10 63.8-20.5 20.9-10.6 38.9-25.1 55-40.8 15.7-16.1 30.2-34.2 40.8-55 10.4-20.6 16.2-41.1 20.5-63.8 3.9-20.8 5.4-44 5.8-67 0.1-7.7 0.2-14.4 0Line truncated
|
||||
@@ -0,0 +1,213 @@
|
||||
/**
|
||||
* loading 占位
|
||||
* 解决首次加载时白屏的问题
|
||||
*/
|
||||
(function () {
|
||||
const _app = document.querySelector('#app');
|
||||
if (_app && _app.innerHTML === '') {
|
||||
const styleStr = `
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#app {
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
.loading-title {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.loading-sub-title {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
font-size: 1rem;
|
||||
color: #888;
|
||||
}
|
||||
.page-loading-warp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 26px;
|
||||
}
|
||||
.ant-spin {
|
||||
position: absolute;
|
||||
display: none;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
color: #1890ff;
|
||||
font-size: 14px;
|
||||
font-variant: tabular-nums;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
opacity: 0;
|
||||
-webkit-transition: -webkit-transform 0.3s
|
||||
cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||
transition: -webkit-transform 0.3s
|
||||
cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
|
||||
-webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||
-webkit-font-feature-settings: "tnum";
|
||||
font-feature-settings: "tnum";
|
||||
}
|
||||
.ant-spin-spinning {
|
||||
position: static;
|
||||
display: inline-block;
|
||||
opacity: 1;
|
||||
}
|
||||
.ant-spin-dot {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.ant-spin-dot-item {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background-color: #1890ff;
|
||||
border-radius: 100%;
|
||||
-webkit-transform: scale(0.75);
|
||||
-ms-transform: scale(0.75);
|
||||
transform: scale(0.75);
|
||||
-webkit-transform-origin: 50% 50%;
|
||||
-ms-transform-origin: 50% 50%;
|
||||
transform-origin: 50% 50%;
|
||||
opacity: 0.3;
|
||||
-webkit-animation: antspinmove 1s infinite linear alternate;
|
||||
animation: antSpinMove 1s infinite linear alternate;
|
||||
}
|
||||
.ant-spin-dot-item:nth-child(1) {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.ant-spin-dot-item:nth-child(2) {
|
||||
top: 0;
|
||||
right: 0;
|
||||
-webkit-animation-delay: 0.4s;
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
.ant-spin-dot-item:nth-child(3) {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
-webkit-animation-delay: 0.8s;
|
||||
animation-delay: 0.8s;
|
||||
}
|
||||
.ant-spin-dot-item:nth-child(4) {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
-webkit-animation-delay: 1.2s;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
.ant-spin-dot-spin {
|
||||
-webkit-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
-webkit-animation: antrotate 1.2s infinite linear;
|
||||
animation: antRotate 1.2s infinite linear;
|
||||
}
|
||||
.ant-spin-lg .ant-spin-dot {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 32px;
|
||||
}
|
||||
.ant-spin-lg .ant-spin-dot i {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
||||
.ant-spin-blur {
|
||||
background: #fff;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes antSpinMove {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes antSpinMove {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes antRotate {
|
||||
to {
|
||||
-webkit-transform: rotate(405deg);
|
||||
transform: rotate(405deg);
|
||||
}
|
||||
}
|
||||
@keyframes antRotate {
|
||||
to {
|
||||
-webkit-transform: rotate(405deg);
|
||||
transform: rotate(405deg);
|
||||
}
|
||||
}
|
||||
</style>`;
|
||||
|
||||
const lang = localStorage.getItem('cache:local:i18n');
|
||||
// 根据浏览器选择语言
|
||||
// if (!lang) {
|
||||
// let preferredLanguage = navigator.language;
|
||||
// if (preferredLanguage.indexOf('-')) {
|
||||
// preferredLanguage = preferredLanguage.replace('-', '_');
|
||||
// }
|
||||
// localStorage.setItem('cache:local:i18n', preferredLanguage);
|
||||
// }
|
||||
|
||||
let loadInfo = {
|
||||
title: '正在加载资源',
|
||||
titleSub: '初次加载资源可能需要较多时间',
|
||||
msg: '请耐心等待',
|
||||
};
|
||||
// document.title = "AGrandEMS";
|
||||
|
||||
if (lang === 'en_US') {
|
||||
loadInfo = {
|
||||
title: 'Loading Resources',
|
||||
titleSub: 'Loading resources for the first time may take a lot of time',
|
||||
msg: 'Please be patient',
|
||||
};
|
||||
// document.title = "AGrandEMS";
|
||||
}
|
||||
|
||||
const divStr = `
|
||||
<div style="
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
min-height: 362px;
|
||||
">
|
||||
<div class="page-loading-warp">
|
||||
<div class="ant-spin ant-spin-lg ant-spin-spinning">
|
||||
<span class="ant-spin-dot ant-spin-dot-spin">
|
||||
<i class="ant-spin-dot-item"></i>
|
||||
<i class="ant-spin-dot-item"></i>
|
||||
<i class="ant-spin-dot-item"></i>
|
||||
<i class="ant-spin-dot-item"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loading-title">
|
||||
${loadInfo.title}
|
||||
</div>
|
||||
<div class="loading-sub-title">
|
||||
${loadInfo.titleSub} </br> ${loadInfo.msg}
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
_app.innerHTML = styleStr + divStr;
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702978675818" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4327" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512.1 955.7c-1.4 0-2.7-0.4-4-1.1L80.4 706.4c-2.4-1.4-3.9-4-3.9-6.8v-88.8c0-2.8 1.5-5.4 3.9-6.8l427.7-252c1.2-0.7 2.6-1.1 4-1.1s2.8 0.4 4 1.1l427.6 252c2.4 1.4 3.9 4 3.9 6.8v88.8c0 2.8-1.5 5.4-3.9 6.8L516 954.6c-1.2 0.7-2.6 1.1-3.9 1.1z" fill="#B5D6FB" p-id="4328"></path><path d="M512.1 358.8l427.5 252v88.8L869.9 740 512.1 947.8 154.1 740l-69.7-40.4v-88.8l427.7-252m0-15.8c-2.8 0-5.5 0.7-8 2.2l-427.7 252c-4.8 2.8-7.8 8-7.8 13.6v88.8c0 5.6 3 10.8 7.9 13.7l69.7 40.5 358 207.8c2.4 1.4 5.2 2.1 7.9 2.1s5.5-0.7 7.9-2.1l357.8-207.8 69.7-40.4c4.9-2.8 7.9-8 7.9-13.7v-88.8c0-5.6-3-10.8-7.8-13.6l-427.5-252c-2.5-1.5-5.3-2.3-8-2.3z" fill="#0276F7" p-id="4329"></path><path d="M84.4 610.8L512 860.7l427.6-249.9-427.5-252z" fill="#FFFFFF" p-id="4330"></path><path d="M500.9 70.3L232.1 562.1l277.7 159L791 561.2z" fill="#D4E4FC" p-id="4331"></path><path d="M214.6 601.2c-1.3 0-2.6-0.3-3.9-1-3.8-2.1-5.2-6.9-3-10.7l294.9-525c1.4-2.5 4-4 6.9-4 2.8 0 5.4 1.5 6.9 4l299.9 525c2.2 3.8 0.8 8.6-2.9 10.8-3.8 2.1-8.6 0.8-10.8-2.9l-293-512.9-288.1 512.7c-1.5 2.6-4.2 4-6.9 4z" fill="#0276F7" p-id="4332"></path><path d="M509.8 752.4c-4.4 0-7.9-3.5-7.9-7.9V86.7c0-4.4 3.5-7.9 7.9-7.9s7.9 3.5 7.9 7.9v657.9c0 4.3-3.6 7.8-7.9 7.8z" fill="#0276F7" p-id="4333"></path><path d="M509.8 729c-1.4 0-2.7-0.4-3.9-1L228.2 569c-3.8-2.2-5.1-7-2.9-10.8 2.2-3.8 7-5.1 10.8-2.9L509.8 712l277.3-157.7c3.8-2.2 8.6-0.8 10.8 3 2.2 3.8 0.8 8.6-3 10.8L513.7 728c-1.2 0.7-2.6 1-3.9 1z" fill="#0276F7" p-id="4334"></path><path d="M509.8 578.9c-1.4 0-2.7-0.4-4-1.1l-213-124c-3.8-2.2-5-7-2.9-10.8 2.2-3.8 7-5.1 10.8-2.8l209.1 121.7 212.8-120.5c3.8-2.2 8.6-0.8 10.8 3 2.2 3.8 0.8 8.6-3 10.7L513.7 577.9c-1.2 0.7-2.6 1-3.9 1zM507.2 423.5c-1.3 0-2.5-0.3-3.7-0.9L354.9 344c-3.9-2.1-5.3-6.8-3.3-10.7 2-3.9 6.8-5.3 10.7-3.3l145 76.7 150.8-78.8c3.9-2 8.6-0.5 10.7 3.3 2 3.9 0.5 8.6-3.3 10.7L511 422.6c-1.3 0.6-2.5 0.9-3.8 0.9zM509.8 277c-1.3 0-2.6-0.3-3.7-0.9l-86.8-46.8c-3.8-2.1-5.3-6.9-3.2-10.7 2.1-3.9 6.9-5.2 10.7-3.2l83 44.8 82.6-46.9c3.8-2.2 8.6-0.8 10.8 3 2.2 3.8 0.8 8.6-3 10.8l-86.4 49c-1.3 0.6-2.7 0.9-4 0.9z" fill="#0276F7" p-id="4335"></path><path d="M509.8 578.9h-0.3L231.9 570c-4.4-0.1-7.8-3.8-7.6-8.1 0.1-4.4 4.3-7.6 8.1-7.6l277.7 8.9c4.4 0.1 7.8 3.8 7.6 8.1-0.2 4.2-3.7 7.6-7.9 7.6zM509.8 729c-1.7 0-3.4-0.6-4.9-1.7-3.4-2.7-4-7.7-1.3-11.1l216.7-272.9c2.7-3.4 7.7-4 11.1-1.3 3.4 2.7 4 7.7 1.3 11.1L516 726c-1.6 2-3.9 3-6.2 3z" fill="#0276F7" p-id="4336"></path><path d="M509.8 578.9c-1.5 0-2.9-0.4-4.3-1.2-3.7-2.4-4.7-7.2-2.4-10.9l152-236.1c2.4-3.7 7.3-4.7 10.9-2.4 3.7 2.4 4.7 7.2 2.4 10.9l-152 236.1c-1.5 2.3-4 3.6-6.6 3.6zM507.2 423.5c-1.1 0-2.2-0.2-3.3-0.7-4-1.8-5.7-6.5-3.9-10.5l89-195.5c1.8-4 6.4-5.7 10.5-3.9 4 1.8 5.7 6.5 3.9 10.5l-88.9 195.5c-1.4 2.9-4.3 4.6-7.3 4.6z" fill="#0276F7" p-id="4337"></path><path d="M596.2 377c-2.9 0-5.7-1.6-7.1-4.4-1.9-3.9-0.3-8.6 3.6-10.5L729 295.7 343.3 120l22 205.3 141.3-63.4c3.9-1.8 8.6 0 10.4 4 1.8 4 0 8.6-4 10.4l-151.2 67.9c-2.3 1-4.9 0.9-7.2-0.4-2.2-1.3-3.6-3.5-3.9-6l-24.6-229.9c-0.3-2.8 0.9-5.6 3.2-7.2 2.3-1.6 5.3-2 7.9-0.8l413.6 188.4c2.8 1.3 4.6 4 4.6 7.1 0 3.1-1.7 5.9-4.4 7.2l-151.4 73.6c-1.1 0.6-2.3 0.8-3.4 0.8zM296.8 454.9c-3.8 0-7.2-2.8-7.8-6.7-0.6-4.3 2.3-8.3 6.6-9l210.5-31.4c4.3-0.6 8.3 2.3 9 6.6 0.6 4.3-2.3 8.3-6.6 9L298 454.8c-0.5 0.1-0.9 0.1-1.2 0.1z" fill="#0276F7" p-id="4338"></path></svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702978716365" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4633" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M817.3 505c2.7-14 4.3-28.4 4.3-43.2 0-123.8-100.4-224.2-224.2-224.2-81.9 0-153.3 44.1-192.5 109.7-15.1-5.9-31.5-9.2-48.7-9.2-72.6 0-131.6 57.6-134.3 129.5-69 18.6-119.9 81.5-119.9 156.5 0 89.6 72.7 162.3 162.3 162.3h514.3c79.2 0 143.4-64.2 143.4-143.4 0-65.8-44.3-121-104.7-138z" fill="#D4E4FC" p-id="4634"></path><path d="M778.6 793.2H264.3C171 793.2 95.2 717.3 95.2 624c0-74.5 49.2-140.3 120.2-161.8 5.3-73.9 66.2-131.1 140.9-131.1 15.6 0 30.9 2.6 45.8 7.7 42.7-67.8 115.3-108.1 195.4-108.1 127.4 0 231 103.6 231 231 0 12.7-1.1 25.6-3.3 38.4 61.3 20 103.6 77.8 103.6 142.7 0 83-67.4 150.4-150.2 150.4zM356.3 344.9c-68.9 0-124.9 54-127.4 122.9l-0.2 5.1-4.9 1.3c-67.6 18.3-114.9 79.9-114.9 149.9 0 85.7 69.7 155.4 155.4 155.4h514.3c75.3 0 136.5-61.2 136.5-136.5 0-60.9-41-114.9-99.6-131.3l-6.1-1.7 1.2-6.2c2.7-14 4.1-28.1 4.1-41.9 0-119.8-97.5-217.3-217.3-217.3-77.1 0-146.9 39.7-186.6 106.3l-3 5-5.4-2.1c-14.9-5.9-30.4-8.9-46.1-8.9z" fill="#0276F7" p-id="4635"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702974353127" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4174" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M470.9 954.6c-1.2 0-2.3-0.3-3.4-0.9l-240-132.2c-2.2-1.2-3.6-3.6-3.6-6.1V270.6c0-2.5 1.3-4.7 3.4-6L546.9 70.4c1.1-0.7 2.4-1 3.6-1 1.2 0 2.4 0.3 3.4 0.9l242.6 136.9c2.2 1.2 3.6 3.6 3.6 6.1v552.8c0 2.5-1.4 4.9-3.6 6.1L474.4 953.7c-1.1 0.6-2.3 0.9-3.5 0.9z" fill="#B5D6FB" p-id="4175"></path><path d="M550.5 76.4l242.6 136.9v552.8L470.9 947.6l-240-132.2V270.6L550.5 76.4m0-14c-2.5 0-5 0.7-7.3 2L223.6 258.6c-4.2 2.5-6.7 7.1-6.7 12v544.8c0 5.1 2.8 9.8 7.3 12.3l240 132.2c2.1 1.2 4.4 1.7 6.8 1.7 2.4 0 4.7-0.6 6.9-1.8L800 778.3c4.4-2.5 7.1-7.2 7.1-12.2V213.3c0-5.1-2.7-9.7-7.1-12.2L557.4 64.2c-2.1-1.2-4.5-1.8-6.9-1.8z" fill="#0276F7" p-id="4176"></path><path d="M550.5 76.4L230.9 270.6l240 130.5 322.2-187.8z" fill="#FFFFFF" p-id="4177"></path><path d="M470.9 916V401.1" fill="#B5D6FB" p-id="4178"></path><path d="M470.9 923.1c-3.9 0-7-3.1-7-7v-515c0-3.9 3.1-7 7-7s7 3.1 7 7V916c0 3.9-3.1 7.1-7 7.1z" fill="#0276F7" p-id="4179"></path><path d="M754.5 235.8L470.9 401.1" fill="#B5D6FB" p-id="4180"></path><path d="M470.9 408.1c-2.4 0-4.8-1.2-6.1-3.5-1.9-3.3-0.8-7.6 2.5-9.6L751 229.7c3.4-2 7.6-0.8 9.6 2.5 1.9 3.3 0.8 7.6-2.5 9.6L474.5 407.2c-1.1 0.6-2.4 0.9-3.6 0.9z" fill="#0276F7" p-id="4181"></path><path d="M261.5 287.2l209.4 113.9" fill="#B5D6FB" p-id="4182"></path><path d="M470.9 408.1c-1.1 0-2.3-0.3-3.3-0.8L258.1 293.4c-3.4-1.8-4.7-6.1-2.8-9.5 1.9-3.4 6.1-4.6 9.5-2.8L474.3 395c3.4 1.8 4.7 6.1 2.8 9.5-1.3 2.3-3.7 3.6-6.2 3.6z" fill="#0276F7" p-id="4183"></path><path d="M258.2 744.4l177.2 99.3" fill="#B5D6FB" p-id="4184"></path><path d="M435.4 850.7c-1.2 0-2.3-0.3-3.4-0.9l-177.1-99.3c-3.4-1.9-4.6-6.2-2.7-9.5 1.9-3.4 6.1-4.6 9.5-2.7l177.1 99.3c3.4 1.9 4.6 6.2 2.7 9.5-1.3 2.3-3.7 3.6-6.1 3.6z" fill="#0276F7" p-id="4185"></path><path d="M258.2 694.8l177.2 99.3" fill="#B5D6FB" p-id="4186"></path><path d="M435.4 801.1c-1.2 0-2.3-0.3-3.4-0.9l-177.1-99.3c-3.4-1.9-4.6-6.2-2.7-9.5 1.9-3.4 6.1-4.6 9.5-2.7L438.8 788c3.4 1.9 4.6 6.2 2.7 9.5-1.3 2.3-3.7 3.6-6.1 3.6z" fill="#0276F7" p-id="4187"></path><path d="M258.2 645.1l177.2 99.3" fill="#B5D6FB" p-id="4188"></path><path d="M435.4 751.4c-1.2 0-2.3-0.3-3.4-0.9l-177.1-99.3c-3.4-1.9-4.6-6.2-2.7-9.5 1.9-3.4 6.1-4.6 9.5-2.7l177.1 99.3c3.4 1.9 4.6 6.2 2.7 9.5-1.3 2.3-3.7 3.6-6.1 3.6z" fill="#0276F7" p-id="4189"></path><path d="M222.7 538.9l248.2 135.5" fill="#B5D6FB" p-id="4190"></path><path d="M219.335 545.028l6.708-12.289 248.241 135.49-6.707 12.289z" fill="#0276F7" p-id="4191"></path><path d="M393 430.7l40.3 20.1" fill="#B5D6FB" p-id="4192"></path><path d="M433.3 457.8c-1.1 0-2.1-0.2-3.1-0.7L389.9 437c-3.5-1.7-4.9-5.9-3.1-9.4 1.7-3.5 6-4.9 9.4-3.1l40.3 20.1c3.5 1.7 4.9 5.9 3.1 9.4-1.3 2.4-3.8 3.8-6.3 3.8z" fill="#0276F7" p-id="4193"></path></svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702978692882" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4472" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M384.3 952.9c-1.2 0-2.3-0.3-3.4-0.9L141.8 820.3c-2.2-1.2-3.6-3.6-3.6-6.1V271.6c0-2.4 1.3-4.7 3.4-6L459.9 72.2c1.1-0.7 2.4-1 3.6-1 1.2 0 2.4 0.3 3.4 0.9l241.6 136.3c2.2 1.2 3.6 3.6 3.6 6.1v550.7c0 2.5-1.4 4.8-3.6 6.1L387.7 952c-1.1 0.6-2.3 0.9-3.4 0.9z" fill="#B5D6FB" p-id="4473"></path><path d="M463.5 78.1l241.6 136.3v550.7L384.3 945.9 145.2 814.2V271.6L463.5 78.1m0-13.9c-2.5 0-5 0.7-7.3 2L137.9 259.6c-4.2 2.5-6.7 7.1-6.7 11.9v542.6c0 5.1 2.8 9.8 7.2 12.2L377.5 958c2.1 1.2 4.4 1.7 6.7 1.7 2.4 0 4.7-0.6 6.9-1.8L712 777.3c4.4-2.5 7.1-7.1 7.1-12.2V214.5c0-5-2.7-9.7-7.1-12.2L470.4 66c-2.1-1.2-4.5-1.8-6.9-1.8z" fill="#0276F7" p-id="4474"></path><path d="M463.5 78.1L145.2 271.6l239.1 130 320.8-187.1z" fill="#FFFFFF" p-id="4475"></path><path d="M384.3 914.5V401.6" fill="#B5D6FB" p-id="4476"></path><path d="M384.3 921.4c-3.9 0-7-3.1-7-7V401.6c0-3.9 3.1-7 7-7s7 3.1 7 7v512.9c-0.1 3.8-3.2 6.9-7 6.9z" fill="#0276F7" p-id="4477"></path><path d="M666.7 236.9L384.3 401.6" fill="#B5D6FB" p-id="4478"></path><path d="M384.3 408.5c-2.4 0-4.7-1.2-6-3.5-1.9-3.3-0.8-7.6 2.5-9.6l282.4-164.7c3.3-1.9 7.6-0.8 9.6 2.5 1.9 3.3 0.8 7.6-2.5 9.6L387.8 407.6c-1.1 0.6-2.3 0.9-3.5 0.9z" fill="#0276F7" p-id="4479"></path><path d="M175.6 288.1l208.7 113.5" fill="#B5D6FB" p-id="4480"></path><path d="M384.3 408.5c-1.1 0-2.3-0.3-3.3-0.8L172.3 294.2c-3.4-1.8-4.6-6.1-2.8-9.5 1.8-3.4 6.1-4.6 9.5-2.8l208.7 113.5c3.4 1.8 4.6 6.1 2.8 9.5-1.4 2.3-3.8 3.6-6.2 3.6z" fill="#0276F7" p-id="4481"></path><path d="M172.4 741.2l176.4 98.9" fill="#B5D6FB" p-id="4482"></path><path d="M348.8 847.1c-1.2 0-2.3-0.3-3.4-0.9L169 747.3c-3.4-1.9-4.6-6.1-2.7-9.5 1.9-3.4 6.1-4.6 9.5-2.7L352.3 834c3.4 1.9 4.6 6.1 2.7 9.5-1.4 2.3-3.7 3.6-6.2 3.6z" fill="#0276F7" p-id="4483"></path><path d="M172.4 691.7l176.4 98.9" fill="#B5D6FB" p-id="4484"></path><path d="M348.8 797.6c-1.2 0-2.3-0.3-3.4-0.9L169 697.8c-3.4-1.9-4.6-6.1-2.7-9.5 1.9-3.4 6.1-4.6 9.5-2.7l176.4 98.9c3.4 1.9 4.6 6.1 2.7 9.5-1.3 2.3-3.6 3.6-6.1 3.6z" fill="#0276F7" p-id="4485"></path><path d="M172.4 642.3l176.4 98.9" fill="#B5D6FB" p-id="4486"></path><path d="M348.8 748.2c-1.2 0-2.3-0.3-3.4-0.9L169 648.4c-3.4-1.9-4.6-6.1-2.7-9.5 1.9-3.4 6.1-4.6 9.5-2.7l176.4 98.9c3.4 1.9 4.6 6.1 2.7 9.5-1.3 2.3-3.6 3.6-6.1 3.6z" fill="#0276F7" p-id="4487"></path><path d="M137 538.8l247.3 134.9" fill="#B5D6FB" p-id="4488"></path><path d="M133.644 544.944l6.707-12.289 247.276 134.963-6.707 12.289z" fill="#0276F7" p-id="4489"></path><path d="M306.6 431l40.1 20" fill="#B5D6FB" p-id="4490"></path><path d="M346.7 458c-1.1 0-2.1-0.2-3.1-0.7l-40.1-20c-3.5-1.7-4.8-5.9-3.1-9.4 1.7-3.4 5.9-4.8 9.4-3.1l40.1 20c3.5 1.7 4.8 5.9 3.1 9.4-1.2 2.4-3.7 3.8-6.3 3.8z" fill="#0276F7" p-id="4491"></path><path d="M885.8 608.6c-0.1 13.7-6.3 27.4-18.6 39.5-5.7 5.6-12.7 10.9-21.1 15.8-53.4 31-140.1 31-193.7 0.1-8.7-5-16.1-10.6-21.8-16.5-11.3-11.2-17.5-23.6-18.6-36.2v-3.8c0-20.3 13.1-40.5 39.7-55.9 53.4-31 140.1-31 193.7 0 27.1 15.8 40.7 36.5 40.4 57z" fill="#FFFFFF" p-id="4492"></path><path d="M749.2 694.1c-36.3 0-72.6-8-100.3-23.9-9.3-5.4-17.1-11.3-23.3-17.7-12.1-12-19.2-26-20.5-40.4v-4.4c0-23.8 15.3-45.8 43.2-61.9 55.2-32.1 145.2-32.1 200.7 0 28.6 16.5 44.2 38.9 43.9 63-0.2 15.9-7.3 31.2-20.6 44.4-6.3 6.2-13.9 11.8-22.5 16.8-27.8 16-64.2 24.1-100.6 24.1z m-0.7-158.6c-33.8 0-67.6 7.5-93.2 22.4-23.4 13.4-36.3 31.1-36.3 49.8v3.8c1 10.5 6.7 21.5 16.5 31.2 5.4 5.5 12.2 10.7 20.4 15.4 51.6 29.7 135.4 29.7 186.7-0.1 7.6-4.4 14.3-9.4 19.7-14.7 10.6-10.5 16.3-22.5 16.5-34.6 0.3-18.8-12.8-36.8-36.9-50.7-25.8-15.1-59.6-22.5-93.4-22.5z" fill="#0276F7" p-id="4493"></path><path d="M605.1 606h14v5.4h-14zM841.4 796.3c-3.9 0-7-3.1-7-7v-4.6c0-3.9 3.1-7 7-7s7 3.1 7 7v4.6c0 3.9-3.2 7-7 7z" fill="#0276F7" p-id="4494"></path><path d="M885.8 608.6v79.5c0 13.8-6.1 27.8-18.6 40.1-5.7 5.6-12.7 10.9-21.1 15.8-53.4 31-140.1 31-193.7 0-8.7-5-15.9-10.5-21.8-16.3-11.3-11.2-17.5-23.6-18.6-36.2v-80c1.1 12.6 7.3 25 18.6 36.2 5.7 5.9 13.1 11.5 21.8 16.5 53.6 30.8 140.4 30.8 193.7-0.3 8.4-4.9 15.4-10.2 21.1-15.8 12.3-12.1 18.5-25.8 18.6-39.5z" fill="#B5D6FB" p-id="4495"></path><path d="M749.4 774.1c-36.3 0-72.7-8-100.5-24.1-9.1-5.3-17-11.2-23.2-17.4-12.2-12-19.3-26-20.6-40.5v-80.6c0-3.7 2.9-6.8 6.7-7 3.3-0.3 6.9 2.6 7.3 6.4 1 11.1 6.7 22.1 16.5 31.8 5.4 5.5 12.2 10.7 20.4 15.4 51.6 29.7 135.4 29.7 186.7-0.1 7.6-4.4 14.3-9.4 19.7-14.7 10.6-10.5 16.3-22.5 16.5-34.6 0-3.8 3.2-6.9 7-6.9s6.9 3.1 6.9 7v79.5c0 16.1-7.1 31.7-20.6 45.1-6.3 6.2-13.9 11.8-22.5 16.8-27.7 15.8-64 23.9-100.3 23.9zM619 645.2v46.3c1 10.5 6.7 21.5 16.5 31.2 5.4 5.4 12.3 10.6 20.4 15.3 51.6 29.8 135.4 29.8 186.7 0 7.6-4.4 14.3-9.4 19.7-14.7 10.8-10.6 16.5-22.8 16.5-35.1v-42.4c-2 2.5-4.2 5-6.7 7.4-6Line truncated
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
+142
@@ -0,0 +1,142 @@
|
||||
<script setup lang="ts">
|
||||
import { ConfigProvider } from 'ant-design-vue/lib';
|
||||
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 'dayjs/locale/zh-cn';
|
||||
import { ref, watch } from 'vue';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t, currentLocale } = useI18n();
|
||||
const appStore = useAppStore();
|
||||
|
||||
dayjs.locale('zh-cn'); // 默认中文
|
||||
usePrimaryColor(); // 载入用户自定义主题色
|
||||
|
||||
let locale = ref(zhCN); // 国际化初始中文
|
||||
|
||||
// 国际化切换语言
|
||||
function fnChangeLocale(v: string) {
|
||||
switch (v) {
|
||||
case 'zh_CN':
|
||||
locale.value = zhCN;
|
||||
dayjs.locale(zhCN.locale);
|
||||
break;
|
||||
case 'en_US':
|
||||
locale.value = enUS;
|
||||
dayjs.locale(enUS.locale);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 加载多语言并进行监听
|
||||
fnChangeLocale(currentLocale.value);
|
||||
watch(currentLocale, val => {
|
||||
fnChangeLocale(val);
|
||||
});
|
||||
|
||||
// 输出应用版本号
|
||||
console.info(
|
||||
`%c ${t('common.title')} %c ${appStore.appCode} - ${appStore.appVersion} `,
|
||||
'color: #fadfa3; background: #030307; padding: 4px 0;',
|
||||
'color: #030307; background: #fadfa3; padding: 4px 0;'
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ConfigProvider :locale="locale">
|
||||
<RouterView />
|
||||
</ConfigProvider>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
body .ant-pro-basicLayout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.ant-pro-sider {
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.slide-left-enter-active,
|
||||
.slide-left-leave-active,
|
||||
.slide-right-enter-active,
|
||||
.slide-right-leave-active {
|
||||
transition-duration: 0.5s;
|
||||
transition-property: height, opacity, transform;
|
||||
transition-timing-function: cubic-bezier(0.55, 0, 0.1, 1);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.slide-left-enter,
|
||||
.slide-right-leave-active {
|
||||
opacity: 0;
|
||||
transform: translate(2em, 0);
|
||||
}
|
||||
|
||||
.slide-left-leave-active,
|
||||
.slide-right-enter {
|
||||
opacity: 0;
|
||||
transform: translate(-2em, 0);
|
||||
}
|
||||
|
||||
/**强制改表格边距 */
|
||||
.ant-table.ant-table-small .ant-table-tbody > tr > td,
|
||||
.ant-table.ant-table-small .ant-table-thead > tr > th {
|
||||
padding: 6px !important;
|
||||
}
|
||||
|
||||
/** ==== 表格头按钮区域 S === **/
|
||||
/* 默认 */
|
||||
.button-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.button-container > button,
|
||||
.button-container > span {
|
||||
margin-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.button-container > button:last-child,
|
||||
.button-container > span:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
/* 平板端 */
|
||||
@media (max-width: 992px) {
|
||||
.button-container {
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
align-items: left;
|
||||
}
|
||||
.button-container > button,
|
||||
.button-container > span {
|
||||
margin-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
/* 手机端 */
|
||||
@media (max-width: 576px) {
|
||||
.button-container {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
align-items: left;
|
||||
}
|
||||
.button-container > button,
|
||||
.button-container > span {
|
||||
margin-right: 0px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
/** ==== 表格头按钮区域 E === **/
|
||||
</style>
|
||||
@@ -0,0 +1,95 @@
|
||||
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 listNeBackup(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(id) as total from ne_backup ';
|
||||
let rowsSQL = ' select * from ne_backup ';
|
||||
|
||||
// 查询
|
||||
let querySQL = 'where 1=1';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
|
||||
// 分页
|
||||
const pageNum = query.pageNum - 1;
|
||||
const limtSql = ` order by create_time desc limit ${pageNum},${query.pageSize} `;
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_backup`,
|
||||
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_backup'];
|
||||
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 noticeId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function delNeBackup(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/neBackup/${data.fileName}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取备份信息文件
|
||||
* @param menuId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function downloadNeBackup(data: Record<string, any>) {
|
||||
return await request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/neBackup/${data.fileName}`,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改备份说明
|
||||
* @param menuId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function updateBackInfo(data:Record<string,any>){
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/ne_backup?WHERE=id=${data.id}`,
|
||||
method: 'put',
|
||||
data: { data: { comment: data.backupInfo } },
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,464 @@
|
||||
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',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新网元配置重新载入
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @returns
|
||||
*/
|
||||
export async function updateNeConfigReload(neType: string, neId: string) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
||||
method: 'post',
|
||||
data: { mml: ['reload'] },
|
||||
timeout: 180_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
const v = result.data.data[0];
|
||||
const str = v.toLowerCase();
|
||||
if (str.indexOf('ok') !== -1) {
|
||||
delete result.data;
|
||||
} else if (str.indexOf('success') !== -1) {
|
||||
delete result.data;
|
||||
} else {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
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;
|
||||
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,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,298 @@
|
||||
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 listNeInfo(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from ne_info where status=0 ';
|
||||
let rowsSQL = 'select * from ne_info where status=0 ';
|
||||
|
||||
// 系统特定顺序
|
||||
const specificOrder = [
|
||||
'OMC',
|
||||
'MME',
|
||||
'AMF',
|
||||
'AUSF',
|
||||
'UDM',
|
||||
'SMF',
|
||||
'PCF',
|
||||
'UPF',
|
||||
'NRF',
|
||||
'NSSF',
|
||||
'IMS',
|
||||
'N3IWF',
|
||||
'NEF',
|
||||
'LMF',
|
||||
];
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type = '${query.neType}' `;
|
||||
}
|
||||
|
||||
// 分页
|
||||
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/ne_info`,
|
||||
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_info'];
|
||||
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));
|
||||
//通过sort进行冒泡排序
|
||||
data.rows.sort((a: any, b: any) => {
|
||||
const typeA = specificOrder.indexOf(a.neType);
|
||||
const typeB = specificOrder.indexOf(b.neType);
|
||||
if (typeA === -1) return 1; // 如果不在特定顺序中,排到后面
|
||||
if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面
|
||||
return typeA - typeB;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元详细
|
||||
* @param menuId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getNeInfo(id: string | number) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_info`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `select * from ne_info where status=0 and 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]),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网元
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addNeInfo(data: Record<string, any>) {
|
||||
data.port = `${data.port}`;
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/neInfo`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网元
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateNeInfo(data: Record<string, any>) {
|
||||
data.port = `${data.port}`;
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/neInfo`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网元
|
||||
* @param noticeId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function delNeInfo(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/neInfo?ne_id=${data.neId}`,
|
||||
method: 'delete',
|
||||
timeout:60*1000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网元网元列表
|
||||
* @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 = 0`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
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
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportSet(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/cm?ne_id=${data.neId}`,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
headers: {
|
||||
'Content-Type': 'application/octet-stream',
|
||||
},
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入网元配置文件
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function importFile(data: Record<string, any>) {
|
||||
let dataType: 'json' | 'form-data' = 'json';
|
||||
let url = `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/cm?ne_id=${data.neId}`;
|
||||
let obj: any = { fileName: data.fileName };
|
||||
if (data.importType === 'local') {
|
||||
let formData = new FormData();
|
||||
formData.append('nfType', data.neType);
|
||||
formData.append('nfId', data.neId);
|
||||
formData.append('file', data.file);
|
||||
obj = formData;
|
||||
dataType = 'form-data';
|
||||
}
|
||||
|
||||
// 处理FormData类型的data
|
||||
return request({
|
||||
url,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
dataType,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询远程服务器上网元配置文件
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function listServerFile(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/ne_backup?SQL= select * from ne_backup where ne_type ='${data.neType}'`,
|
||||
method: 'get',
|
||||
});
|
||||
// 解析数据
|
||||
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_backup']),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动网元
|
||||
* @param
|
||||
* @returns bolb
|
||||
*/
|
||||
export function startNf(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/start?neId=${data.neId}`,
|
||||
method: 'post',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重启网元
|
||||
* @param
|
||||
* @returns bolb
|
||||
*/
|
||||
export function restartNf(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/restart?neId=${data.neId}`,
|
||||
method: 'post',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止网元
|
||||
* @param
|
||||
* @returns bolb
|
||||
*/
|
||||
export function stopNf(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/stop?neId=${data.neId}`,
|
||||
method: 'post',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
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 listNeSoftware(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(id) as total from ne_software ';
|
||||
let rowsSQL = ' select * from ne_software ';
|
||||
|
||||
// 查询
|
||||
let querySQL = 'where 1=1';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
|
||||
// 分页
|
||||
const pageNum = query.pageNum - 1;
|
||||
const limtSql = ` order by update_time desc limit ${pageNum},${query.pageSize} `;
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_software`,
|
||||
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_software'];
|
||||
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 noticeId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function delNeSoftware(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取软件信息文件
|
||||
* @param menuId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function downloadNeSoftware(data: Record<string, any>) {
|
||||
return await request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}`,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function uploadNeSoftware(data: FormData) {
|
||||
return request({
|
||||
url: `/api/rest/systemManagement/v1/${data.get('nf')}/software/${data.get(
|
||||
'version'
|
||||
)}`,
|
||||
method: 'post',
|
||||
data,
|
||||
dataType: 'form-data',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 下发文件
|
||||
* @param data 数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function sendNeSoftware(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||
method: 'post',
|
||||
timeout: 180_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活文件
|
||||
* @param data 数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function runNeSoftware(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||
method: 'put',
|
||||
timeout: 180_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
|
||||
/**
|
||||
* 回退文件
|
||||
* @param data 数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function backNeSoftware(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||
method: 'PATCH',
|
||||
timeout: 180_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询版本列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listNeVersion(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(id) as total from ne_version ';
|
||||
let rowsSQL = 'select * from ne_version ';
|
||||
|
||||
// 查询
|
||||
let querySQL = 'where 1=1';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
if (query.status) {
|
||||
querySQL += ` and status = '${query.status}' `;
|
||||
}
|
||||
if (query.beginTime && query.endTime) {
|
||||
querySQL += ` and update_time BETWEEN '${query.beginTime}' AND '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 分页
|
||||
const pageNum = query.pageNum - 1;
|
||||
const limtSql = ` order by update_time desc limit ${pageNum},${query.pageSize} `;
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_version`,
|
||||
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_version'];
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
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';
|
||||
|
||||
/**
|
||||
* 获取活动告警数
|
||||
* @returns object
|
||||
*/
|
||||
export async function getActiveAlarmTotal() {
|
||||
let totalSQL = `select count(*) as total from alarm where alarm_status='1'`;
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: totalSQL,
|
||||
},
|
||||
});
|
||||
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
const itemData = result.data.data;
|
||||
if (Array.isArray(itemData)) {
|
||||
const v = itemData[0]['alarm'];
|
||||
if (Array.isArray(v)) {
|
||||
result.data = v[0]['total'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listAct(query: Record<string, any>, filterSQl: string) {
|
||||
let totalSQL = `select count(*) as total from alarm where alarm_status='1' ${filterSQl} `;
|
||||
let rowsSQL = `select * from alarm where alarm_status='1' ${filterSQl}`;
|
||||
// 查询
|
||||
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.origSeverity) {
|
||||
querySQL += ` and orig_severity in('${query.origSeverity}' )`;
|
||||
}
|
||||
|
||||
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`,
|
||||
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'];
|
||||
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 updateConfirm(data: Record<string, any>) {
|
||||
var time = new Date();
|
||||
const userName = useUserStore().userName;
|
||||
let finalData = {
|
||||
alarm: {
|
||||
ack_time: parseDateToStr(time),
|
||||
ack_user: userName,
|
||||
ack_state: '1',
|
||||
},
|
||||
};
|
||||
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id='${data.id}'`,
|
||||
method: 'put',
|
||||
data: finalData,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消确认告警
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function cancelConfirm(data: (string | number)[]) {
|
||||
var time = new Date();
|
||||
const userName = useUserStore().userName;
|
||||
let finalData = {
|
||||
alarm: {
|
||||
ack_time: parseDateToStr(time),
|
||||
ack_user: '',
|
||||
ack_state: '0',
|
||||
},
|
||||
};
|
||||
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id in(${data.join(
|
||||
','
|
||||
)})`,
|
||||
method: 'put',
|
||||
data: finalData,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置告警显示过滤
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function showPass(data: Record<string, any>) {
|
||||
let querySQL = '';
|
||||
querySQL += data.alarm_code ? ` and alarm_code != ${data.alarm_code} ` : '';
|
||||
querySQL += data.alarm_type
|
||||
? ` and alarm_type !=\\'${data.alarm_type}\\'`
|
||||
: '';
|
||||
querySQL += data.pv_flag ? ` and pv_flag !=\\'${data.pv_flag} \\'` : '';
|
||||
querySQL += data.orig_severity
|
||||
? ` and orig_severity !=\\'${data.orig_severity}\\'`
|
||||
: '';
|
||||
querySQL += data.ne_id ? ` and ne_id !=\\'${data.ne_id}\\' ` : '';
|
||||
querySQL += data.ne_type ? ` and ne_type !=\\'${data.ne_type}\\' ` : '';
|
||||
|
||||
let toBackJson = {
|
||||
data: {
|
||||
value: querySQL,
|
||||
value_json: JSON.stringify(data),
|
||||
},
|
||||
};
|
||||
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='displayFilter'`,
|
||||
method: 'put',
|
||||
data: toBackJson,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取告警显示过滤条件
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function getPass() {
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: "SELECT value_json,value FROM config WHERE config_tag ='displayFilter'",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除告警信息
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function clearAlarm(data: Record<string, any>) {
|
||||
var time = new Date();
|
||||
const userName = useUserStore().userName;
|
||||
let finalData = {
|
||||
data: {
|
||||
clear_time: parseDateToStr(time),
|
||||
clear_type: '2',
|
||||
alarm_status: '0',
|
||||
clear_user: userName,
|
||||
},
|
||||
};
|
||||
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id in(${data.join(
|
||||
','
|
||||
)})`,
|
||||
method: 'put',
|
||||
data: finalData,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 手工同步
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function listSync() {
|
||||
return request({
|
||||
url: `/api/rest/faultManagement/v1/elementType/all/objectType/alarms`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 活动告警导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export async function exportAll(query: Record<string, any>) {
|
||||
let rowsSQL = `select * from alarm where alarm_status='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`,
|
||||
method: 'get',
|
||||
params: {
|
||||
rowsSQL: rowsSQL + querySQL,
|
||||
},
|
||||
});
|
||||
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
let v = result.data.data[0];
|
||||
const vArr = parseObjLineToHump(v['alarm']);
|
||||
result.data = vArr == null ? [] : vArr;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
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 tag 配置ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getAlarmSet() {
|
||||
let arr = [];
|
||||
|
||||
// 历史告警保存时间
|
||||
const logDurationResult = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'historyDuration'`,
|
||||
},
|
||||
});
|
||||
arr.push(logDurationResult);
|
||||
// 同步设置
|
||||
const logCapacityResult = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'syncTaskPeriod'`,
|
||||
},
|
||||
});
|
||||
arr.push(logCapacityResult);
|
||||
|
||||
// 发起请求
|
||||
const result = await Promise.allSettled(arr).then(resArr => {
|
||||
let resultData: any = {};
|
||||
for (const item of resArr) {
|
||||
if (item.status === 'rejected') {
|
||||
continue;
|
||||
}
|
||||
const itemV = item.value;
|
||||
// 解析数据
|
||||
if (
|
||||
itemV.code === RESULT_CODE_SUCCESS &&
|
||||
Array.isArray(itemV.data.data)
|
||||
) {
|
||||
let itemData = itemV.data.data[0];
|
||||
const v = parseObjLineToHump(itemData['config'][0]);
|
||||
let vJSON: any = {};
|
||||
if (v.configTag == 'syncTaskPeriod') {
|
||||
try {
|
||||
vJSON = JSON.parse(v.valueJson);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
resultData = { ...resultData, ...vJSON };
|
||||
} else {
|
||||
resultData[v.configTag] = parseInt(v.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Object.keys(resultData).length === 0) {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language], data: {} };
|
||||
}
|
||||
return {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS,
|
||||
data: resultData,
|
||||
};
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改告警设置
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function updateAlarmSet(data: Record<string, any>) {
|
||||
let { historyDuration, ...syncTaskPeriodJson } = data;
|
||||
let arr = [];
|
||||
|
||||
// 历史告警保存时间
|
||||
const historyDurationResult = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='historyDuration'`,
|
||||
method: 'put',
|
||||
data: { data: { value: data.historyDuration.toString() } },
|
||||
});
|
||||
arr.push(historyDurationResult);
|
||||
// 同步设置
|
||||
const syncTaskPeriodResult = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='syncTaskPeriod'`,
|
||||
method: 'put',
|
||||
data: { data: { value_json: JSON.stringify(syncTaskPeriodJson) } },
|
||||
});
|
||||
arr.push(syncTaskPeriodResult);
|
||||
|
||||
// 发起请求
|
||||
const result = await Promise.allSettled(arr).then(resArr => {
|
||||
let resultNum = 0;
|
||||
for (const item of resArr) {
|
||||
if (item.status === 'rejected') {
|
||||
continue;
|
||||
}
|
||||
const itemV = item.value;
|
||||
// 解析数据
|
||||
let itemData = itemV.data.data;
|
||||
if (itemV.code === RESULT_CODE_SUCCESS && itemData) {
|
||||
let rows = itemData.affectedRows;
|
||||
if (rows) {
|
||||
resultNum += rows;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 无变更时
|
||||
if (resultNum === 0) {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language], data: 0 };
|
||||
}
|
||||
return {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS,
|
||||
data: resultNum,
|
||||
};
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询告警前转接口设置
|
||||
* @param tag 配置ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getForwardSet() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'forwardAlarm'`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
const v = parseObjLineToHump(data['config'][0]);
|
||||
let vJSON: any = {};
|
||||
try {
|
||||
vJSON = JSON.parse(v.valueJson);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
return Object.assign(result, {
|
||||
data: vJSON,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改告警前转接口配置
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function updateForwardSet(data: Record<string, any>) {
|
||||
// return false;
|
||||
console.log(data)
|
||||
let obj:any=[
|
||||
{interface:"Email",to_user:data.emailObj},
|
||||
{interface:"SMS",to_user:data.smsObj}
|
||||
]
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='forwardAlarm'`,
|
||||
method: 'put',
|
||||
data: { data: { value_json: JSON.stringify(obj) } },
|
||||
});
|
||||
// 解析数据
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
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 where alarm_status='0'`;
|
||||
let rowsSQL = `select * from alarm where alarm_status='0'`;
|
||||
// 查询
|
||||
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 pageNum = (query.pageNum - 1) * query.pageSize;
|
||||
const limtSql = ` order by clear_time desc limit ${pageNum},${query.pageSize} `;
|
||||
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
|
||||
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'];
|
||||
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 updateConfirm(data: Record<string, any>) {
|
||||
var time = new Date();
|
||||
const userName = useUserStore().userName;
|
||||
let finalData = {
|
||||
alarm: {
|
||||
ack_time: parseDateToStr(time),
|
||||
ack_user: userName,
|
||||
ack_state: '1',
|
||||
},
|
||||
};
|
||||
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id='${data.id}'`,
|
||||
method: 'put',
|
||||
data: finalData,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消确认告警
|
||||
* @param data 鉴权对象
|
||||
* @returns object
|
||||
*/
|
||||
export function cancelConfirm(data: (string | number)[]) {
|
||||
var time = new Date();
|
||||
let finalData = {
|
||||
alarm: {
|
||||
ack_time: parseDateToStr(time),
|
||||
ack_user: '',
|
||||
ack_state: '0',
|
||||
},
|
||||
};
|
||||
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id in(${data.join(
|
||||
','
|
||||
)})`,
|
||||
method: 'put',
|
||||
data: finalData,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史告警导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export async function exportAll(query: Record<string, any>) {
|
||||
let rowsSQL = `select * from alarm where alarm_status='0'`;
|
||||
// 查询
|
||||
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`,
|
||||
method: 'get',
|
||||
params: {
|
||||
rowsSQL: rowsSQL + querySQL,
|
||||
},
|
||||
});
|
||||
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
let v = result.data.data[0];
|
||||
const vArr = parseObjLineToHump(v['alarm']);
|
||||
result.data = vArr == null ? [] : vArr;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
/**
|
||||
* 查询公告列表
|
||||
* @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',
|
||||
timeout: 60_000,
|
||||
});
|
||||
// console.log(result);
|
||||
let realData = result.data.data;
|
||||
const mergedData = realData.map((obj: any) => {
|
||||
// console.log(obj);
|
||||
const [key, value] = Object.entries(obj)[0];
|
||||
const ipAddress = (value as any).ipAddress;
|
||||
const systemState = (value as any).systemState;
|
||||
const errCode = systemState && systemState['errorCode'];
|
||||
var time = new Date();
|
||||
// console.log(key, value);
|
||||
let mergedObj;
|
||||
if (errCode === undefined && systemState) {
|
||||
mergedObj = {
|
||||
...systemState,
|
||||
refresh: parseDateToStr(time),
|
||||
ipAddress: ipAddress,
|
||||
name: key.split('/').join('_'),
|
||||
status: 'Normal',
|
||||
};
|
||||
} else {
|
||||
mergedObj = {
|
||||
version: '-',
|
||||
refresh: parseDateToStr(time),
|
||||
ipAddress: ipAddress,
|
||||
name: key.split('/').join('_'),
|
||||
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]);
|
||||
if (typeA === -1) return 1; // 如果不在特定顺序中,排到后面
|
||||
if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面
|
||||
return typeA - typeB;
|
||||
});
|
||||
//console.log(mergedData);
|
||||
|
||||
return mergedData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务器时间
|
||||
* @returns object
|
||||
*/
|
||||
export async function getServerTime() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/systemManagement/v1/elementType/OMC/objectType/time`,
|
||||
method: 'get',
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data) {
|
||||
return Object.assign(result, {
|
||||
data: result.data.data,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统暴露的配置信息
|
||||
* @returns object
|
||||
*/
|
||||
export function getSysConf() {
|
||||
return request({
|
||||
url: `/sys-conf`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
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 listAlarm(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from alarm_log where 1=1 ';
|
||||
let rowsSQL = 'select * from alarm_log where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
if (query.status) {
|
||||
querySQL += ` and alarm_status = '${query.status}' `;
|
||||
}
|
||||
if (query.beginTime) {
|
||||
querySQL += ` and log_time >= '${query.beginTime}' `;
|
||||
}
|
||||
if (query.endTime) {
|
||||
querySQL += ` and log_time <= '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by log_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/alarm_log`,
|
||||
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['alarm_log'];
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
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 listForwarding(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from alarm_forward_log where 1=1 ';
|
||||
let rowsSQL = 'select * from alarm_forward_log where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
if (query.beginTime) {
|
||||
querySQL += ` and log_time >= '${query.beginTime}' `;
|
||||
}
|
||||
if (query.endTime) {
|
||||
querySQL += ` and log_time <= '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by log_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/alarm_forward_log`,
|
||||
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['alarm_forward_log'];
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,328 @@
|
||||
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 tag 配置ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getLogSet() {
|
||||
let arr = [];
|
||||
|
||||
// 日志保存时间
|
||||
const logDurationResult = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'logDuration'`,
|
||||
},
|
||||
});
|
||||
arr.push(logDurationResult);
|
||||
// 日志最大容量
|
||||
const logCapacityResult = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'logCapacity'`,
|
||||
},
|
||||
});
|
||||
arr.push(logCapacityResult);
|
||||
|
||||
// 发起请求
|
||||
const result = await Promise.allSettled(arr).then(resArr => {
|
||||
let resultData: any = {};
|
||||
for (const item of resArr) {
|
||||
if (item.status === 'rejected') {
|
||||
continue;
|
||||
}
|
||||
const itemV = item.value;
|
||||
// 解析数据
|
||||
if (
|
||||
itemV.code === RESULT_CODE_SUCCESS &&
|
||||
Array.isArray(itemV.data.data)
|
||||
) {
|
||||
let itemData = itemV.data.data[0];
|
||||
const v = parseObjLineToHump(itemData['config'][0]);
|
||||
resultData[v.configTag] = parseInt(v.value);
|
||||
}
|
||||
}
|
||||
if (Object.keys(resultData).length === 0) {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language], data: {} };
|
||||
}
|
||||
|
||||
return {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS,
|
||||
data: resultData,
|
||||
};
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改日志设置
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function updateLogSet(data: Record<string, any>) {
|
||||
let arr = [];
|
||||
for (const key in data) {
|
||||
const value = `${data[key]}`;
|
||||
const result = request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='${key}'`,
|
||||
method: 'put',
|
||||
data: { data: { value } },
|
||||
});
|
||||
arr.push(result);
|
||||
}
|
||||
|
||||
const result = await Promise.allSettled(arr).then(resArr => {
|
||||
let resultNum = 0;
|
||||
for (const item of resArr) {
|
||||
if (item.status === 'rejected') {
|
||||
continue;
|
||||
}
|
||||
const itemV = item.value;
|
||||
// 解析数据
|
||||
let itemData = itemV.data.data;
|
||||
if (itemV.code === RESULT_CODE_SUCCESS && itemData) {
|
||||
let rows = itemData.affectedRows;
|
||||
if (rows) {
|
||||
resultNum += rows;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 无变更时
|
||||
if (resultNum === 0) {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language], data: 0 };
|
||||
}
|
||||
return {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS,
|
||||
data: resultNum,
|
||||
};
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询FTP日志设置
|
||||
* @param tag 配置ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getFtpLogSet() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'ftpLogSet'`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
const v = parseObjLineToHump(data['config'][0]);
|
||||
let vJSON: any = {};
|
||||
try {
|
||||
vJSON = JSON.parse(v.valueJson);
|
||||
vJSON['ftpLog'] = parseInt(vJSON['ftpLog']) || 12;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
return Object.assign(result, {
|
||||
data: vJSON,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改FTP日志配置
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function updateFtpLogSet(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='ftpLogSet'`,
|
||||
method: 'put',
|
||||
data: { data: { value_json: JSON.stringify(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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询日志远程输出设置
|
||||
* @param tag 配置ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getRemoteOut() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'remoteLogSet'`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
const v = parseObjLineToHump(data['config'][0]);
|
||||
let vJSON = {};
|
||||
try {
|
||||
vJSON = JSON.parse(v.valueJson);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
return Object.assign(result, {
|
||||
data: vJSON,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改日志远程输出配置
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function updateRemoteOut(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='remoteLogSet'`,
|
||||
method: 'put',
|
||||
data: { data: { value_json: JSON.stringify(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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 日志查询导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export async function exportLog(query: Record<string, any>) {
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.logType === 'security_log') {
|
||||
querySQL = `SELECT account_name,account_type,op_ip,op_type,op_content,op_result,op_time
|
||||
FROM security_log
|
||||
WHERE op_time >= '${query.beginTime}' AND op_time <= '${query.endTime}'
|
||||
order by op_time`;
|
||||
}
|
||||
if (query.logType === 'alarm_log') {
|
||||
querySQL = `SELECT ne_type,ne_id,alarm_id,alarm_seq,alarm_code,alarm_status,event_time,log_time
|
||||
FROM security_log
|
||||
WHERE log_time >= '${query.beginTime}' AND log_time <= '${query.endTime}'
|
||||
order event_time,log_time`;
|
||||
}
|
||||
if (query.logType === 'operation_log') {
|
||||
querySQL = `SELECT account_name,account_type,op_ip,subsys_tag,op_type,op_content,op_result,begin_time,end_time,vnf_flag
|
||||
FROM operation_log
|
||||
WHERE begin_time >= '${query.beginTime}' AND end_time <= '${query.endTime}' AND op_type ='${query.opType}'
|
||||
order begin_time,end_time`;
|
||||
}
|
||||
if (!querySQL) {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language], data: [] };
|
||||
}
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/${query.logType}`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: querySQL,
|
||||
},
|
||||
});
|
||||
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
let v = result.data.data[0];
|
||||
const vArr = parseObjLineToHump(v[query.logType]);
|
||||
result.data = vArr == null ? [] : vArr;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 日志手动备份
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function backupLog(logType: string) {
|
||||
const result = await request({
|
||||
url: `/api/rest/dataManagement/v1/omc_db/${logType}/backup`,
|
||||
method: 'post',
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data.data) {
|
||||
let v = result.data.data[logType].affectedRows || 0;
|
||||
if (v) {
|
||||
result.data = v;
|
||||
return result;
|
||||
} else {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language], data: 0 };
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 日志手动备份文件下载
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function backupDownload(path: string) {
|
||||
return request({
|
||||
url: `/api/rest/fileManagement/v1/path/file?path=${path}`,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 日志手动备份文件列表
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export function backupFileList() {
|
||||
return request({
|
||||
url: `/api/rest/fileManagement/v1/files/listFiles`,
|
||||
method: 'post',
|
||||
data: {
|
||||
path: '/usr/local/omc/database',
|
||||
expand: true,
|
||||
showHidden: false,
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
search: '',
|
||||
containSub: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
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 listMML(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from mml_log where 1=1 ';
|
||||
let rowsSQL = 'select * from mml_log where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.accountName) {
|
||||
querySQL += ` and user like '%${query.accountName}%' `;
|
||||
}
|
||||
if (query.beginTime) {
|
||||
querySQL += ` and log_time >= '${query.beginTime}' `;
|
||||
}
|
||||
if (query.endTime) {
|
||||
querySQL += ` and log_time <= '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by log_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/mml_log`,
|
||||
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['mml_log'];
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
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 listOperationLog(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from operation_log where 1=1 ';
|
||||
let rowsSQL = 'select * from operation_log where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.accountName) {
|
||||
querySQL += ` and account_name like '%${query.accountName}%' `;
|
||||
}
|
||||
if (query.opType) {
|
||||
querySQL += ` and op_type = '${query.opType}' `;
|
||||
}
|
||||
if (query.beginTime) {
|
||||
querySQL += ` and begin_time >= '${query.beginTime}' `;
|
||||
}
|
||||
if (query.endTime) {
|
||||
querySQL += ` and end_time <= '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by begin_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/operation_log`,
|
||||
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['operation_log'];
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
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 listSecurityLog(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from security_log where 1=1 ';
|
||||
let rowsSQL = 'select * from security_log where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.accountName) {
|
||||
querySQL += ` and account_name like '%${query.accountName}%' `;
|
||||
}
|
||||
if (query.opType) {
|
||||
querySQL += ` and op_type = '${query.opType}' `;
|
||||
}
|
||||
if (query.beginTime) {
|
||||
querySQL += ` and op_time >= '${query.beginTime}' `;
|
||||
}
|
||||
if (query.endTime) {
|
||||
querySQL += ` and op_time <= '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by op_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/security_log`,
|
||||
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['security_log'];
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
// 登录方法
|
||||
export function login(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/login',
|
||||
method: 'post',
|
||||
data: data,
|
||||
whithToken: false,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册方法
|
||||
* @param data 注册对象
|
||||
* @returns object
|
||||
*/
|
||||
export function register(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/register',
|
||||
method: 'post',
|
||||
data: data,
|
||||
whithToken: false,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户详细信息
|
||||
* @returns object
|
||||
*/
|
||||
export function getInfo() {
|
||||
return request({
|
||||
url: '/getInfo',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出方法
|
||||
* @returns object
|
||||
*/
|
||||
export function logout() {
|
||||
return request({
|
||||
url: '/logout',
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取验证码
|
||||
* @returns object
|
||||
*/
|
||||
export function getCaptchaImage() {
|
||||
return request({
|
||||
url: '/captchaImage',
|
||||
method: 'get',
|
||||
whithToken: false,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
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 getOperationSet() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM config WHERE config_tag = 'operationSet'`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
const v = parseObjLineToHump(data['config'][0]);
|
||||
let vJSON = {};
|
||||
try {
|
||||
vJSON = JSON.parse(v.valueJson);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
return Object.assign(result, {
|
||||
data: vJSON,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改操作维护接口设置
|
||||
* @param data 配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function updateOperationSet(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='operationSet'`,
|
||||
method: 'put',
|
||||
data: { data: { value_json: JSON.stringify(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;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询网元可用cmd命令
|
||||
* @param neType 网元类型
|
||||
* @returns object
|
||||
*/
|
||||
export async function getMMLByNE(neType: string) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/mml_system`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `select * from mml_system where ne_type = '${neType}' and status = 'Active'`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['mml_system']),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送网元的mml命令
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @param cmdStr 命令串
|
||||
* @returns
|
||||
*/
|
||||
export async function sendMMlByNE(
|
||||
neType: string,
|
||||
neId: string,
|
||||
cmdArr: string[]
|
||||
) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
||||
method: 'post',
|
||||
data: { mml: cmdArr },
|
||||
timeout: 180_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
result.data = result.data.data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询OMC可用cmd命令
|
||||
* @returns object
|
||||
*/
|
||||
export async function getMMLByOMC() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/mml_command`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `select * from mml_command where ne_type = 'OMC' and status = 'Active'`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['mml_command']),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送OMC的mml命令
|
||||
* @param neId 网元ID
|
||||
* @param cmdStr 命令串
|
||||
* @returns
|
||||
*/
|
||||
export async function sendMMlByOMC(neId: string, cmdArr: string[]) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/operationManagement/v1/elementType/OMC/objectType/mml?ne_id=${neId}`,
|
||||
method: 'post',
|
||||
data: { mml: cmdArr },
|
||||
timeout: 180_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
result.data = result.data.data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询UDM可用cmd命令
|
||||
* @returns object
|
||||
*/
|
||||
export async function getMMLByUDM() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/mml_subscriber`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `select * from mml_subscriber where ne_type = 'UDM' and status = 'Active'`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['mml_subscriber']),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送UDM的mml命令
|
||||
* @param neId 网元ID
|
||||
* @param cmdStr 命令串
|
||||
* @returns
|
||||
*/
|
||||
export async function sendMMlByUDM(neId: string, cmdArr: string[]) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/operationManagement/v1/elementType/UDM/objectType/mml?ne_id=${neId}`,
|
||||
method: 'post',
|
||||
data: { mml: cmdArr },
|
||||
timeout: 180_000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
result.data = result.data.data;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询缓存详细
|
||||
* @returns object
|
||||
*/
|
||||
export function getCache() {
|
||||
return request({
|
||||
url: '/monitor/cache',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缓存名称列表
|
||||
* @returns object
|
||||
*/
|
||||
export function listCacheName() {
|
||||
return request({
|
||||
url: '/monitor/cache/getNames',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缓存名称下键名列表
|
||||
* @param cacheName 缓存名称列表中得到的缓存名称
|
||||
* @returns object
|
||||
*/
|
||||
export function listCacheKey(cacheName: string) {
|
||||
return request({
|
||||
url: `/monitor/cache/getKeys/${cacheName}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缓存内容
|
||||
* @param cacheName 键名列表中得到的缓存名称
|
||||
* @param cacheKey 键名列表中得到的缓存键名
|
||||
* @returns object
|
||||
*/
|
||||
export function getCacheValue(cacheName: string, cacheKey: string) {
|
||||
return request({
|
||||
url: `/monitor/cache/getValue/${cacheName}/${cacheKey}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除缓存名称下键名列表
|
||||
* @param cacheName 缓存名称列表中得到的缓存名称
|
||||
* @returns object
|
||||
*/
|
||||
export function clearCacheName(cacheName: string) {
|
||||
return request({
|
||||
url: `/monitor/cache/clearCacheName/${cacheName}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除缓存键名
|
||||
* @param cacheName 键名列表中得到的缓存名称
|
||||
* @param cacheKey 键名列表中得到的缓存键名
|
||||
* @returns object
|
||||
*/
|
||||
export function clearCacheKey(cacheName: string, cacheKey: string) {
|
||||
return request({
|
||||
url: `/monitor/cache/clearCacheKey/${cacheName}/${cacheKey}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全清理缓存名称
|
||||
*
|
||||
* 指定可清理的缓存key
|
||||
* @returns object
|
||||
*/
|
||||
export function clearCacheSafe() {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheSafe',
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 定时任务调度列表导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportJob(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/monitor/job/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询定时任务调度列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listJob(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/monitor/job/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询定时任务调度详细
|
||||
* @param jobId 任务ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getJob(jobId: string | number) {
|
||||
return request({
|
||||
url: `/monitor/job/${jobId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增定时任务调度
|
||||
* @param data 任务对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addJob(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/monitor/job',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改定时任务调度
|
||||
* @param data 任务对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateJob(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/monitor/job',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除定时任务调度
|
||||
* @param jobId 任务ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delJob(jobId: string | number) {
|
||||
return request({
|
||||
url: `/monitor/job/${jobId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务状态修改
|
||||
* @param jobId 任务ID
|
||||
* @param status 变更状态值
|
||||
* @returns
|
||||
*/
|
||||
export function changeJobStatus(
|
||||
jobId: string | number,
|
||||
status: string | number
|
||||
) {
|
||||
return request({
|
||||
url: '/monitor/job/changeStatus',
|
||||
method: 'put',
|
||||
data: {
|
||||
jobId,
|
||||
status,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时任务立即执行一次
|
||||
* @param jobId 任务ID
|
||||
* @returns object
|
||||
*/
|
||||
export function runJob(jobId: string) {
|
||||
return request({
|
||||
url: `/monitor/job/run/${jobId}`,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置刷新队列
|
||||
* @returns object
|
||||
*/
|
||||
export function resetQueueJob() {
|
||||
return request({
|
||||
url: '/monitor/job/resetQueueJob',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 定时任务调度日志列表导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportJobLog(
|
||||
query: Record<string, any>
|
||||
) {
|
||||
return request({
|
||||
url: '/monitor/jobLog/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询调度日志列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listJobLog(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/monitor/jobLog/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除调度日志
|
||||
* @param jobLogId 任务日志Id
|
||||
* @returns object
|
||||
*/
|
||||
export function delJobLog(jobLogId: string) {
|
||||
return request({
|
||||
url: `/monitor/jobLog/${jobLogId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空调度日志
|
||||
* @returns object
|
||||
*/
|
||||
export function cleanJobLog() {
|
||||
return request({
|
||||
url: '/monitor/jobLog/clean',
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**资源监控信息加载 */
|
||||
export function getLoad(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/monitor/load',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询在线用户列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listOnline(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/monitor/online/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 强退用户
|
||||
* @param tokenId 授权标识
|
||||
* @returns object
|
||||
*/
|
||||
export function forceLogout(tokenId: string) {
|
||||
return request({
|
||||
url: `/monitor/online/${tokenId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**服务器服务信息 */
|
||||
export function getSystemInfo() {
|
||||
return request({
|
||||
url: '/monitor/system-info',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
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 },
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
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',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询鉴权列表
|
||||
* @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, data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/udm/auth/${neId}/${data.imsi}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除鉴权
|
||||
* @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',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
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 listBase5G(query: Record<string, any>) {
|
||||
query.nbId = query.id;
|
||||
const result = await request({
|
||||
url: '/api/rest/ueManagement/v1/elementType/amf/objectType/nbInfo',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
let data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
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;
|
||||
}
|
||||
// 模拟数据
|
||||
// data.rows =[{"address":"192.168.1.137:38412","id":"217","name":"","ueNum":0}]
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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 listIMS(query: Record<string, any>) {
|
||||
query.nbId = query.id;
|
||||
const result = await request({
|
||||
url: '/api/rest/ueManagement/v1/elementType/ims/objectType/ueInfo',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
let data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
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;
|
||||
}
|
||||
|
||||
// 测试数据
|
||||
// data.rows = [
|
||||
// {
|
||||
// activeTime: '2023-11-29 17:04:54',
|
||||
// barring: 0,
|
||||
// impu: 'sip:12307551232@ims.mnc000.mcc460.3gppnetwork.org',
|
||||
// imsi: '460001230000002',
|
||||
// msisdn: '12307551232',
|
||||
// regState: 1,
|
||||
// },
|
||||
// ];
|
||||
return data;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
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 listN3iwf(query: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: '/api/rest/ueManagement/v1/elementType/n3iwf/objectType/ueInfo',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
let data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
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;
|
||||
}
|
||||
// 模拟数据
|
||||
// data.rows = [
|
||||
// {
|
||||
// "activeTime": "2023-11-29 06:35:43",
|
||||
// "imsi": "460302072701181",
|
||||
// "nai": "0460302072701181@nai.epc.mnc030.mcc460.3gppnetwork.org",
|
||||
// "regState": 1
|
||||
// }
|
||||
// ]
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
import {
|
||||
RESULT_CODE_ERROR,
|
||||
RESULT_CODE_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 规则导出
|
||||
* @param data 表单数据对象
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportRule(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/file/export`,
|
||||
method: 'get',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入规则数据
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function importRuleData(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/file/import?neId=${data.neId}&filePath=${data.filePath}&fileType=${data.fileType}`,
|
||||
method: 'put',
|
||||
data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询规则列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listRules(query: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: '/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
let data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
msg: result.msg,
|
||||
};
|
||||
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
if (result.data?.status) {
|
||||
return {
|
||||
code: RESULT_CODE_ERROR,
|
||||
msg: result.data?.cause,
|
||||
rows: result.data,
|
||||
};
|
||||
}
|
||||
if (Array.isArray(result.data.data)) {
|
||||
const rows = parseObjLineToHump(result.data.data);
|
||||
data.total = rows.length;
|
||||
data.rows = rows;
|
||||
}
|
||||
}
|
||||
|
||||
// 模拟数据
|
||||
// data.rows = [
|
||||
// {
|
||||
// "hdrEnrich": "dnn",
|
||||
// "imsi": "160990100000003",
|
||||
// "msisdn": "86755900011",
|
||||
// "pccRules": "internet|ims_sig",
|
||||
// "qosAudio": "qos_audio",
|
||||
// "qosVideo": "qos_video",
|
||||
// "rfsp": 0,
|
||||
// "sar": "def_sar",
|
||||
// "sessRules": "internet|ims_sig",
|
||||
// "uePolicy": "uep_001"
|
||||
// }
|
||||
// ]
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询规则详细
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function getRule(neId: string, imsi: string) {
|
||||
const result = await request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${imsi}`,
|
||||
method: 'get',
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
result.data = result.data.data[0];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改规则
|
||||
* @param data 规则对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function updateRule(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${data.neId}`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data?.status) {
|
||||
return {
|
||||
code: RESULT_CODE_ERROR,
|
||||
msg: result.data?.cause,
|
||||
data: result.data,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改规则
|
||||
* @param data 规则对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function batchUpdateRule(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}`,
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data?.status) {
|
||||
return {
|
||||
code: RESULT_CODE_ERROR,
|
||||
msg: result.data?.cause,
|
||||
data: result.data,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增规则
|
||||
* @param data 规则对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function addRule(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${data.neId}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data?.status) {
|
||||
return {
|
||||
code: RESULT_CODE_ERROR,
|
||||
msg: result.data?.cause,
|
||||
data: result.data,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增规则
|
||||
* @param data 规则对象
|
||||
* @returns object
|
||||
*/
|
||||
export async function batchAddRule(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data?.status) {
|
||||
return {
|
||||
code: RESULT_CODE_ERROR,
|
||||
msg: result.data?.cause,
|
||||
data: result.data,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除规则
|
||||
* @param data 规则对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delRule(neId: string, data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${data.imsi}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除规则
|
||||
* @param data 规则对象
|
||||
* @returns object
|
||||
*/
|
||||
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',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
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',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除签约
|
||||
* @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',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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 listUE(query: Record<string, any>) {
|
||||
query.nbId = query.id;
|
||||
const result = await request({
|
||||
url: '/api/rest/ueManagement/v1/elementType/smf/objectType/ueInfo',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
let data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
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;
|
||||
}
|
||||
|
||||
// 模拟数据
|
||||
// data.rows = [
|
||||
// {
|
||||
// imsi: 'imsi-460029004200044',
|
||||
// msisdn: 'msisdn-12346002044',
|
||||
// pduSessionInfo: [
|
||||
// {
|
||||
// activeTime: '2023-11-29 18:39:06',
|
||||
// dnn: 'ims',
|
||||
// ipv4: '10.10.48.97',
|
||||
// ipv6: '',
|
||||
// pduSessionID: 6,
|
||||
// ranN3IP: '192.168.8.223',
|
||||
// sstSD: '1-000001',
|
||||
// tai: '46000-0001',
|
||||
// upfN3IP: '192.168.1.161',
|
||||
// },
|
||||
// {
|
||||
// activeTime: '2023-11-29 18:39:05',
|
||||
// dnn: 'cmnet',
|
||||
// ipv4: '10.10.48.62',
|
||||
// ipv6: '',
|
||||
// pduSessionID: 5,
|
||||
// ranN3IP: '192.168.8.223',
|
||||
// sstSD: '1-000001',
|
||||
// tai: '46000-0001',
|
||||
// upfN3IP: '192.168.1.163',
|
||||
// },
|
||||
// ],
|
||||
// ratType: 'EUTRAN',
|
||||
// },
|
||||
// ];
|
||||
return data;
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
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 listgoldData(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from gold_kpi where 1=1 ';
|
||||
let rowsSQL =
|
||||
'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 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.neType) {
|
||||
querySQL += ` and gold_kpi.ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
if (query.beginTime) {
|
||||
querySQL += ` and start_time >= '${query.beginTime}' `;
|
||||
}
|
||||
if (query.endTime) {
|
||||
querySQL += ` and end_time <= '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by ';
|
||||
if (query.sortField) {
|
||||
sortSql += ` ${query.sortField} `;
|
||||
} else {
|
||||
sortSql += ` start_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/gold_kpi`,
|
||||
method: 'get',
|
||||
params: {
|
||||
totalSQL: totalSQL + querySQL,
|
||||
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
|
||||
},
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
// 解析数据
|
||||
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['gold_kpi'];
|
||||
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 goldData(query: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/ne/kpi/data`,
|
||||
method: 'get',
|
||||
params: {
|
||||
neType: query.neType[0],
|
||||
neId: query.neType[1],
|
||||
startTime: query.beginTime,
|
||||
endTime: query.endTime,
|
||||
interval: query.particle,
|
||||
},
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元可用黄金指标
|
||||
* @param neType 网元类型
|
||||
* @returns object
|
||||
*/
|
||||
export async function getGoldTitleByNE(neType: string) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/ne/kpi/title`,
|
||||
method: 'get',
|
||||
params: { neType },
|
||||
});
|
||||
// 解析数据
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
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 listperfData(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from measure_data where 1=1 ';
|
||||
let rowsSQL = 'select * from measure_data where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
if (query.taskId) {
|
||||
querySQL += ` and task_id like '%${query.taskId}%' `;
|
||||
}
|
||||
if (query.beginTime) {
|
||||
querySQL += ` and start_time >= '${query.beginTime}' `;
|
||||
}
|
||||
if (query.endTime) {
|
||||
querySQL += ` and end_time <= '${query.endTime}' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by ';
|
||||
if (query.sortField) {
|
||||
sortSql += ` ${query.sortField} `;
|
||||
}else{
|
||||
sortSql += ` start_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/measure_data`,
|
||||
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['measure_data'];
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
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 listPerfThreshold(query: Record<string, any>) {
|
||||
let totalSQL = 'select count(*) as total from measure_threshold where 1=1 ';
|
||||
let rowsSQL = 'select * from measure_threshold where 1=1 ';
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by create_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/measure_threshold`,
|
||||
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['measure_threshold'];
|
||||
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 getPerfThre(id: string | number) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/measure_threshold`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `select * from measure_threshold 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['measure_threshold'][0]),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增性能门限
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addPerfThre(data: Record<string, any>) {
|
||||
let obj: any = {
|
||||
ne_type: data.neType,
|
||||
kpi_set: data.kpiSet,
|
||||
status: 'Inactive',
|
||||
orig_severity: data.origSeverity,
|
||||
threshold: data.threshold,
|
||||
};
|
||||
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold`,
|
||||
method: 'post',
|
||||
data: { measure_task: [obj] },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改性能测量任务
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updatePerfThre(data: Record<string, any>) {
|
||||
let obj: any = {
|
||||
ne_type: data.neType,
|
||||
kpi_set: data.performanceArr,
|
||||
status: 'Inactive',
|
||||
orig_severity: data.origSeverity,
|
||||
threshold: data.threshold,
|
||||
};
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_task?WHERE=id=${data.id}`,
|
||||
method: 'put',
|
||||
data: { data: obj },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除性能门限
|
||||
* @param noticeId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function delPerfThre(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold?WHERE=id=${data.id}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网元跟踪接口列表
|
||||
* @returns object
|
||||
*/
|
||||
export async function getNePerformanceList() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/measure_title`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM measure_title`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['measure_title']),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活任务
|
||||
* @param
|
||||
* @returns bolb
|
||||
*/
|
||||
export function threRun(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold?WHERE=id=${data.id}`,
|
||||
method: 'put',
|
||||
data: { data: { status: 'Active' } },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 挂起任务
|
||||
* @param
|
||||
* @returns bolb
|
||||
*/
|
||||
export function threStop(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold?WHERE=id=${data.id}`,
|
||||
method: 'put',
|
||||
data: { data: { status: 'Inactive' } },
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
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 listPerfTask(query: Record<string, any>) {
|
||||
let totalSQL = "select count(*) as total from measure_task where status!='DELETED' ";
|
||||
let rowsSQL = "select * from measure_task where status!='DELETED' ";
|
||||
|
||||
// 查询
|
||||
let querySQL = '';
|
||||
if (query.neType) {
|
||||
querySQL += ` and ne_type like '%${query.neType}%' `;
|
||||
}
|
||||
|
||||
// 排序
|
||||
let sortSql = ' order by create_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/measure_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['measure_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 getPerfTask(id: string | number) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/select/omc_db/measure_task`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `select * from measure_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['measure_task'][0]),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增性能测量任务
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addPerfTask(data: Record<string, any>) {
|
||||
var time = new Date();
|
||||
var periods: any = [];
|
||||
var scheduule: any = [];
|
||||
//如果没选测量计划 则选择了测量时段也要置为空。因为二者是绑定关系
|
||||
if (data.smPlan.length && data.bigPlan.length) {
|
||||
data.periods.forEach((item: any) => {
|
||||
periods.push({ Start: item.split(',')[0], End: item.split(',')[1] });
|
||||
});
|
||||
scheduule.push({ Type: data.bigPlan, Days: data.smPlan });
|
||||
}
|
||||
|
||||
let obj: any = {
|
||||
ne_type: data.neType,
|
||||
ne_ids: JSON.stringify([data.neId]),
|
||||
kpi_set: data.kpiSet,
|
||||
schedule: JSON.stringify(scheduule),
|
||||
start_time: data.startTime,
|
||||
end_time: data.endTime,
|
||||
granul_option: data.granulOption,
|
||||
status: 'Inactive',
|
||||
account_id: data.accountId,
|
||||
create_time: parseDateToStr(time),
|
||||
periods: JSON.stringify(periods),
|
||||
comment: data.comment,
|
||||
};
|
||||
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_task`,
|
||||
method: 'post',
|
||||
data: { measure_task: [obj] },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改性能测量任务
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updatePerfTask(data: Record<string, any>) {
|
||||
var time = new Date();
|
||||
var periods: any = [];
|
||||
var scheduule: any = [];
|
||||
//如果没选测量计划 则选择了测量时段也要置为空。因为二者是绑定关系
|
||||
if (data.smPlan.length && data.bigPlan.length) {
|
||||
data.periods.forEach((item: any) => {
|
||||
periods.push({ Start: item.split(',')[0], End: item.split(',')[1] });
|
||||
});
|
||||
scheduule.push({ Type: data.bigPlan, Days: data.smPlan });
|
||||
}
|
||||
|
||||
let obj: any = {
|
||||
ne_type: data.neType,
|
||||
ne_ids: JSON.stringify([data.neId]),
|
||||
kpi_set: data.kpiSet,
|
||||
schedule: JSON.stringify(scheduule),
|
||||
start_time: data.startTime,
|
||||
end_time: data.endTime,
|
||||
granul_option: data.granulOption,
|
||||
status: 'Inactive',
|
||||
account_id: data.accountId,
|
||||
create_time: parseDateToStr(time),
|
||||
periods: JSON.stringify(periods),
|
||||
comment: data.comment,
|
||||
};
|
||||
return request({
|
||||
url: `/api/rest/databaseManagement/v1/omc_db/measure_task?WHERE=id=${data.id}`,
|
||||
method: 'put',
|
||||
data: { measure_task: obj },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
* @param noticeId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function delPerfTask(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/performanceManagement/v1/elementType/${data.neType.toLowerCase()}/objectType/measureTask?id=${
|
||||
data.id
|
||||
}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取性能测量指标列表
|
||||
* @returns object
|
||||
*/
|
||||
export async function getNePerformanceList() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/measure_title`,
|
||||
method: 'get',
|
||||
params: {
|
||||
SQL: `SELECT * FROM measure_title`,
|
||||
},
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
let data = result.data.data[0];
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['measure_title']),
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 激活任务
|
||||
* @param
|
||||
* @returns bolb
|
||||
*/
|
||||
export function taskRun(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/performanceManagement/v1/elementType/${data.neType.toLowerCase()}/objectType/measureTask?id=${data.id}`,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 挂起任务
|
||||
* @param
|
||||
* @returns bolb
|
||||
*/
|
||||
export function taskStop(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/api/rest/performanceManagement/v1/elementType/${data.neType.toLowerCase()}/objectType/measureTask?id=${data.id}`,
|
||||
method: 'PATCH',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询用户个人信息
|
||||
* @returns object
|
||||
*/
|
||||
export function getUserProfile() {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户个人信息
|
||||
* @param data 用户对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateUserProfile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户密码重置
|
||||
* @param userId 用户ID
|
||||
* @param status 变更状态值
|
||||
* @returns object
|
||||
*/
|
||||
export function updateUserPwd(oldPassword: string, newPassword: string) {
|
||||
return request({
|
||||
url: '/system/user/profile/updatePwd',
|
||||
method: 'put',
|
||||
data: {
|
||||
oldPassword,
|
||||
newPassword,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户头像上传
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function uploadAvatar(data: FormData) {
|
||||
return request({
|
||||
url: '/system/user/profile/avatar',
|
||||
method: 'post',
|
||||
data,
|
||||
dataType: 'form-data',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 获取路由
|
||||
* @returns object
|
||||
*/
|
||||
export const getRouters = () => {
|
||||
return request({
|
||||
url: '/getRouters',
|
||||
method: 'get',
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,114 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 参数配置列表导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportConfig(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/config/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参数配置列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listConfig(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/config/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参数详细
|
||||
* @param configId 参数配置ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getConfig(configId: string | number) {
|
||||
return request({
|
||||
url: `/system/config/${configId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数键名查询参数值
|
||||
* @param configKey 参数键名
|
||||
* @returns object
|
||||
*/
|
||||
export function getConfigKey(configKey: string) {
|
||||
return request({
|
||||
url: `/system/config/configKey/${configKey}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增参数配置
|
||||
* @param data 参数配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addConfig(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改参数配置
|
||||
* @param data 参数配置对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateConfig(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除参数配置
|
||||
* @param configId 参数配置ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delConfig(configId: string | number) {
|
||||
return request({
|
||||
url: `/system/config/${configId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新参数缓存
|
||||
* @returns object
|
||||
*/
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/config/refreshCache',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数键名改值
|
||||
* @param data 参数配置对象 { "key": "sys", "value": "核心网" }
|
||||
* @returns object
|
||||
*/
|
||||
export function changeValue(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/system/config/changeValue',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询部门列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listDept(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dept/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询部门列表(排除节点)
|
||||
* @param deptId 部门ID
|
||||
* @returns object
|
||||
*/
|
||||
export function listDeptExcludeChild(deptId: string | number) {
|
||||
return request({
|
||||
url: `/system/dept/list/exclude/${deptId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询部门详细
|
||||
* @param deptId 部门ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getDept(deptId: string | number) {
|
||||
return request({
|
||||
url: `/system/dept/${deptId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增部门
|
||||
* @param data 部门对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addDept(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dept',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改部门
|
||||
* @param data 部门对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateDept(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dept',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除部门
|
||||
* @param deptId 部门ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delDept(deptId: string | number) {
|
||||
return request({
|
||||
url: `/system/dept/${deptId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询部门下拉树结构
|
||||
* @returns object
|
||||
*/
|
||||
export function deptTreeSelect() {
|
||||
return request({
|
||||
url: '/system/dept/treeSelect',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门树结构列表(指定角色)
|
||||
* @param roleId 角色ID
|
||||
* @returns object
|
||||
*/
|
||||
export function roleDeptTreeSelect(roleId: string | number) {
|
||||
return request({
|
||||
url: `/system/dept/roleDeptTreeSelect/${roleId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 字典数据列表导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportData(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dict/data/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典数据列表
|
||||
* @param query 查询值
|
||||
* @returns
|
||||
*/
|
||||
export function listData(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dict/data/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典数据详细
|
||||
* @param dictCode 字典代码值
|
||||
* @returns object
|
||||
*/
|
||||
export function getData(dictCode: string | number) {
|
||||
return request({
|
||||
url: `/system/dict/data/${dictCode}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典数据
|
||||
* @param data 字典数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addData(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改字典数据
|
||||
* @param data 字典数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateData(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典数据
|
||||
* @param dictCode 字典代码值
|
||||
* @returns object
|
||||
*/
|
||||
export function delData(dictCode: string | number) {
|
||||
return request({
|
||||
url: `/system/dict/data/${dictCode}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典数据列表(指定字典类型)
|
||||
* @param dictType 字典类型
|
||||
* @returns object
|
||||
*/
|
||||
export function getDictDataType(dictType: string) {
|
||||
return request({
|
||||
url: `/system/dict/data/type/${dictType}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 字典类型列表导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportType(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dict/type/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典类型列表
|
||||
* @param query 查询值
|
||||
* @returns
|
||||
*/
|
||||
export function listType(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dict/type/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典类型详细
|
||||
* @param dictId 字典编号
|
||||
* @returns object
|
||||
*/
|
||||
export function getType(dictId: string | number) {
|
||||
return request({
|
||||
url: `/system/dict/type/${dictId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典类型
|
||||
* @param data 字典数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addType(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改字典类型
|
||||
* @param data 字典数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateType(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典类型
|
||||
* @param dictCode 字典代码值
|
||||
* @returns object
|
||||
*/
|
||||
export function delType(dictId: string | number) {
|
||||
return request({
|
||||
url: `/system/dict/type/${dictId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新字典缓存
|
||||
* @param data 字典数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/dict/type/refreshCache',
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典选择框列表
|
||||
* @param data 字典数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function getDictOptionselect() {
|
||||
return request({
|
||||
url: '/system/dict/type/getDictOptionselect',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 登录日志列表导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportSysLogLogin(
|
||||
query: Record<string, any>
|
||||
) {
|
||||
return request({
|
||||
url: '/system/log/login/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询登录日志列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listSysLogLogin(
|
||||
query: Record<string, any>
|
||||
) {
|
||||
return request({
|
||||
url: '/system/log/login/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除登录日志
|
||||
* @param loginIds 登录Id
|
||||
* @returns object
|
||||
*/
|
||||
export function delSysLogLogin(loginIds: string) {
|
||||
return request({
|
||||
url: `/system/log/login/${loginIds}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空登录日志
|
||||
* @returns object
|
||||
*/
|
||||
export function cleanSysLogLogin() {
|
||||
return request({
|
||||
url: '/system/log/login/clean',
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 解锁用户登录状态
|
||||
* @param userName 登录账号
|
||||
* @returns object
|
||||
*/
|
||||
export function unlock(userName: string) {
|
||||
return request({
|
||||
url: `/system/log/login/unlock/${userName}`,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 操作日志列表导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportSysLogOperate(
|
||||
query: Record<string, any>
|
||||
) {
|
||||
return request({
|
||||
url: '/system/log/operate/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询操作日志列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listSysLogOperate(
|
||||
query: Record<string, any>
|
||||
) {
|
||||
return request({
|
||||
url: '/system/log/operate/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除操作日志
|
||||
* @param operId 操作日志ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delSysLogOperate(operId: string) {
|
||||
return request({
|
||||
url: `/system/log/operate/${operId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空操作日志
|
||||
* @returns object
|
||||
*/
|
||||
export function cleanSysLogOperate() {
|
||||
return request({
|
||||
url: '/system/log/operate/clean',
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询菜单列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listMenu(query?: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/menu/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜单详细
|
||||
* @param menuId 菜单ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getMenu(menuId: string | number) {
|
||||
return request({
|
||||
url: `/system/menu/${menuId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜单下拉树结构
|
||||
* @returns object
|
||||
*/
|
||||
export function menuTreeSelect() {
|
||||
return request({
|
||||
url: '/system/menu/treeSelect',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据角色ID查询菜单下拉树结构
|
||||
* @param roleId 角色ID
|
||||
* @returns object
|
||||
*/
|
||||
export function roleMenuTreeSelect(roleId: string | number) {
|
||||
return request({
|
||||
url: `/system/menu/roleMenuTreeSelect/${roleId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增菜单
|
||||
* @param data 菜单对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addMenu(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/menu',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改菜单
|
||||
* @param data 菜单对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateMenu(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/menu',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜单
|
||||
* @param menuId 菜单ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delMenu(menuId: string | number) {
|
||||
return request({
|
||||
url: `/system/menu/${menuId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 岗位列表导出
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportPost(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/post/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询岗位列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listPost(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/post/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询岗位详细
|
||||
* @param postId 岗位ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getPost(postId: string | number) {
|
||||
return request({
|
||||
url: `/system/post/${postId}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增岗位
|
||||
* @param data 岗位对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addPost(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/post',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改岗位
|
||||
* @param data 岗位对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updatePost(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/system/post',
|
||||
method: 'put',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除岗位
|
||||
* @param postId 岗位ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delPost(postId: string | number) {
|
||||
return request({
|
||||
url: `/system/post/${postId}`,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
Loaded 100 of 262 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user