mirror of
https://gitee.com/yudaocode/yudao-ui-admin-vben.git
synced 2025-12-30 10:32:25 +00:00
Compare commits
708 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fffe060ab1 | ||
|
|
769510c4f6 | ||
|
|
2288748ca8 | ||
|
|
97e692d2fc | ||
|
|
4084009556 | ||
|
|
6577794b7d | ||
|
|
20f7a9d087 | ||
|
|
b23581ba3b | ||
|
|
23537b9f74 | ||
|
|
1629003cdc | ||
|
|
7704aef4c8 | ||
|
|
41baa56bf8 | ||
|
|
332de6dd91 | ||
|
|
e14d10a4ba | ||
|
|
14a83d91f1 | ||
|
|
a65a5d2aab | ||
|
|
22cf883cc4 | ||
|
|
09afe93a7a | ||
|
|
4f7b7c0e59 | ||
|
|
d4acf33a35 | ||
|
|
81d92da3ac | ||
|
|
ca1fefd197 | ||
|
|
15edcb1d7b | ||
|
|
6979dbfa52 | ||
|
|
a5e3406849 | ||
|
|
9499a80e8a | ||
|
|
ba7aa17dc3 | ||
|
|
c26d730a5a | ||
|
|
40a8e924a4 | ||
|
|
ee879055bb | ||
|
|
3055931904 | ||
|
|
22bd8b8f45 | ||
|
|
47a6a7284c | ||
|
|
1394688364 | ||
|
|
e358c85c15 | ||
|
|
dd1528d45a | ||
|
|
f6ad13b4f1 | ||
|
|
4319b4ec26 | ||
|
|
d92cd2e48e | ||
|
|
afdf859900 | ||
|
|
0094459b22 | ||
|
|
27c5dc65be | ||
|
|
757eb72018 | ||
|
|
bac9b0d747 | ||
|
|
ecc9bdaad7 | ||
|
|
6c82311b1f | ||
|
|
3f6c405376 | ||
|
|
d1089d7a50 | ||
|
|
79d7972172 | ||
|
|
27c1fdd1c0 | ||
|
|
4e03d3577c | ||
|
|
efc8607848 | ||
|
|
1f81f07191 | ||
|
|
dc874aa090 | ||
|
|
b8cfb196e9 | ||
|
|
402f9a9080 | ||
|
|
2ee3412aef | ||
|
|
466d0c829e | ||
|
|
bc6d0f7dd6 | ||
|
|
b28a35cd79 | ||
|
|
6c6e1d4720 | ||
|
|
68192bfacc | ||
|
|
d9da7bd6fb | ||
|
|
4052e3c8d2 | ||
|
|
daf01c0da8 | ||
|
|
ce5fc8cf3d | ||
|
|
7fd071a79b | ||
|
|
a82d492f58 | ||
|
|
318cbc31b2 | ||
|
|
8bd135414e | ||
|
|
26f3aa18c2 | ||
|
|
b40f10c68b | ||
|
|
a101cdf2f8 | ||
|
|
cc44ee3daa | ||
|
|
8c5680de81 | ||
|
|
fc9d7232be | ||
|
|
0d551f72a4 | ||
|
|
6fe61f9efb | ||
|
|
5e8c9175bb | ||
|
|
9f3a0a9f34 | ||
|
|
b512bcc134 | ||
|
|
68fbd98991 | ||
|
|
876c32e833 | ||
|
|
0a09970efb | ||
|
|
c19097ec0c | ||
|
|
5f6b876c11 | ||
|
|
c27378e75f | ||
|
|
03ce030e7c | ||
|
|
59097e2466 | ||
|
|
1cf77fe6de | ||
|
|
a3d56ae6a3 | ||
|
|
4261ca0a50 | ||
|
|
75c24789ff | ||
|
|
59b13842c4 | ||
|
|
e1cb380fdc | ||
|
|
f54424ced3 | ||
|
|
202a82bf44 | ||
|
|
57d3ea3446 | ||
|
|
137c3f46a3 | ||
|
|
6720882dc1 | ||
|
|
4358335d47 | ||
|
|
31e72c19ad | ||
|
|
2a71d61e21 | ||
|
|
8b423d3f08 | ||
|
|
e7f1eb0844 | ||
|
|
a3a292db80 | ||
|
|
938498ebc8 | ||
|
|
7b7ca39d83 | ||
|
|
a4561b3dd8 | ||
|
|
4b69721a90 | ||
|
|
4c4cd57ef0 | ||
|
|
99c0945989 | ||
|
|
1a9037f6ab | ||
|
|
8c6d1d68d1 | ||
|
|
0d02c60478 | ||
|
|
31a583419a | ||
|
|
4270916ce4 | ||
|
|
43dc2d4446 | ||
|
|
efd1bda0d0 | ||
|
|
7eeb52c582 | ||
|
|
53195748b8 | ||
|
|
a46fa6442c | ||
|
|
59bbe4cc93 | ||
|
|
7824506e86 | ||
|
|
5f88a54d60 | ||
|
|
9c079ca220 | ||
|
|
2f0ba0458e | ||
|
|
ced545a791 | ||
|
|
51a9f05c47 | ||
|
|
15c8146eda | ||
|
|
a156873437 | ||
|
|
28566a659f | ||
|
|
9bf2846a12 | ||
|
|
bc6dfad4c9 | ||
|
|
abcc062ba1 | ||
|
|
fac8cee297 | ||
|
|
7ef1da4f2c | ||
|
|
691f9aa764 | ||
|
|
8465941011 | ||
|
|
00a25ed1d3 | ||
|
|
c57c82264a | ||
|
|
196622a8d0 | ||
|
|
f740461c2a | ||
|
|
84cd10eb93 | ||
|
|
b6fee5c05b | ||
|
|
d789072aa3 | ||
|
|
5e66e6bfac | ||
|
|
2db27d522f | ||
|
|
5dfdf4b10c | ||
|
|
752a450add | ||
|
|
850df7149a | ||
|
|
f41e746a81 | ||
|
|
f77e731357 | ||
|
|
740da3f545 | ||
|
|
94d0550ecc | ||
|
|
db38eb23da | ||
|
|
b2ba1d9d37 | ||
|
|
378cdd4c38 | ||
|
|
d2f50c9388 | ||
|
|
f63dc0ecef | ||
|
|
ab54628f79 | ||
|
|
2e4b788c5d | ||
|
|
3d67a376a3 | ||
|
|
6f46dc90f2 | ||
|
|
41fe54e5f0 | ||
|
|
3829fa0b49 | ||
|
|
9520d7016e | ||
|
|
5e1187bab5 | ||
|
|
f2c34d42b0 | ||
|
|
7533486cf8 | ||
|
|
066b28b2cc | ||
|
|
99dd3350f4 | ||
|
|
96a1232b1e | ||
|
|
20adbc65a8 | ||
|
|
f83a0adb2b | ||
|
|
637d02d33c | ||
|
|
e226e09e8a | ||
|
|
276d91190c | ||
|
|
5cdf1af39f | ||
|
|
4648f2023b | ||
|
|
e84cd6147c | ||
|
|
1e9bfb419e | ||
|
|
9b36b84253 | ||
|
|
2e91f912d5 | ||
|
|
5e5ae1195e | ||
|
|
a2ed4445f2 | ||
|
|
2efefb30bb | ||
|
|
cdd7e69f8e | ||
|
|
877a03df4a | ||
|
|
d3e7c49255 | ||
|
|
412dd3c05c | ||
|
|
4978bbbcf1 | ||
|
|
25af653216 | ||
|
|
4809b7847a | ||
|
|
d88ba2ad4e | ||
|
|
a18126a761 | ||
|
|
dabbeaae81 | ||
|
|
3f1e48de54 | ||
|
|
d53e1f0397 | ||
|
|
a60c29169b | ||
|
|
b9593c7a4a | ||
|
|
e546247c0b | ||
|
|
9e89cdbced | ||
|
|
8d34744deb | ||
|
|
64eed7b39a | ||
|
|
3e5a1ea5aa | ||
|
|
d00f8538fd | ||
|
|
7b7323d519 | ||
|
|
960413ed58 | ||
|
|
ba47b627c8 | ||
|
|
2f6e7ced5e | ||
|
|
f6ca135efb | ||
|
|
d150475efb | ||
|
|
a025d12790 | ||
|
|
fb37b7eec3 | ||
|
|
2ce161e585 | ||
|
|
e4707ef380 | ||
|
|
825a052533 | ||
|
|
38040be98f | ||
|
|
584dcd5819 | ||
|
|
dd7e4d9513 | ||
|
|
5d9af538fd | ||
|
|
fbd6c86ee4 | ||
|
|
9fd1c507a2 | ||
|
|
4f2ffc58f7 | ||
|
|
b2de0e2a29 | ||
|
|
385b5eaaec | ||
|
|
0627f5072d | ||
|
|
c168045639 | ||
|
|
96026b85b5 | ||
|
|
fcc6162692 | ||
|
|
33306a5aff | ||
|
|
b587032597 | ||
|
|
25e434276a | ||
|
|
cb04558426 | ||
|
|
25fe87e94c | ||
|
|
112a7dfb93 | ||
|
|
73e64b468a | ||
|
|
8f20182050 | ||
|
|
22b0496428 | ||
|
|
b2e2fe7ccb | ||
|
|
5393623f45 | ||
|
|
e6e0621c20 | ||
|
|
7bdfa99042 | ||
|
|
98d7ed663f | ||
|
|
c6bd38f98d | ||
|
|
8266490674 | ||
|
|
ce709742fd | ||
|
|
8789cd1ff2 | ||
|
|
95ba94ee5e | ||
|
|
9a17613823 | ||
|
|
14dd95b915 | ||
|
|
43533b5499 | ||
|
|
af29a0e29b | ||
|
|
386919030d | ||
|
|
02adb68581 | ||
|
|
f98cef8c71 | ||
|
|
9567fb39c1 | ||
|
|
33de8dcdf2 | ||
|
|
a6c4fde2c4 | ||
|
|
a7c4e6ac11 | ||
|
|
7d3f5dc149 | ||
|
|
7d9b3f89fa | ||
|
|
1350342715 | ||
|
|
655b3d87c0 | ||
|
|
ff2f176917 | ||
|
|
f7c0b41199 | ||
|
|
c401000eb9 | ||
|
|
9406593d6e | ||
|
|
2039cbc0d0 | ||
|
|
5e13d28d46 | ||
|
|
7250934a41 | ||
|
|
dd9fd6e284 | ||
|
|
888a6d9ec8 | ||
|
|
a9c9e0f8b2 | ||
|
|
34167a38de | ||
|
|
b0c32a2a18 | ||
|
|
f63cb9ed2f | ||
|
|
480ed5c83d | ||
|
|
3182a86b80 | ||
|
|
ceabd731ba | ||
|
|
40b5d952eb | ||
|
|
86e701ba3a | ||
|
|
c603b7002c | ||
|
|
c8c4693983 | ||
|
|
e073a40153 | ||
|
|
d5712f2640 | ||
|
|
83cffeafc3 | ||
|
|
95295d5b93 | ||
|
|
e9fafab07c | ||
|
|
945e0902ae | ||
|
|
b57cbc798a | ||
|
|
3f0c60be04 | ||
|
|
3902005ad4 | ||
|
|
8d897e89a3 | ||
|
|
1a33f2562e | ||
|
|
c208c56f72 | ||
|
|
2572824d1a | ||
|
|
85b6d0c4d6 | ||
|
|
eeb1f1ebf9 | ||
|
|
325cede2ed | ||
|
|
7934cbdd7b | ||
|
|
f3390427ac | ||
|
|
bfbf97874c | ||
|
|
76b00821cb | ||
|
|
1bf4238609 | ||
|
|
63f58fa84d | ||
|
|
463a9fb509 | ||
|
|
783f510229 | ||
|
|
92c433a6aa | ||
|
|
599e1b342a | ||
|
|
2e2a147815 | ||
|
|
67b39cfe8a | ||
|
|
cdc0cbc431 | ||
|
|
5eec2050a9 | ||
|
|
3708af6738 | ||
|
|
6b0d783564 | ||
|
|
6e03de5011 | ||
|
|
6410c83b13 | ||
|
|
9e6d8ff3e9 | ||
|
|
0f6868febf | ||
|
|
0d07db46f0 | ||
|
|
2d5f24c626 | ||
|
|
0d1901abdb | ||
|
|
f381f934e8 | ||
|
|
05ec6a16b3 | ||
|
|
713281a8ba | ||
|
|
42e3de9e2c | ||
|
|
1e029dbc9a | ||
|
|
0afd36172b | ||
|
|
9bfd314311 | ||
|
|
e441978662 | ||
|
|
985dca4990 | ||
|
|
a4aa2b7711 | ||
|
|
876768e98d | ||
|
|
41530a40e5 | ||
|
|
252b530526 | ||
|
|
9c564ea3af | ||
|
|
1a3441b662 | ||
|
|
c60c2a5b76 | ||
|
|
3d2a53a6b2 | ||
|
|
ee3af0293b | ||
|
|
43c3169c54 | ||
|
|
968552ec4b | ||
|
|
3ba046def7 | ||
|
|
9dd6e0f687 | ||
|
|
45fb4dc3fe | ||
|
|
082fddcb64 | ||
|
|
10018fcc85 | ||
|
|
09abc9cead | ||
|
|
06633c336e | ||
|
|
84bb8331c2 | ||
|
|
af291928ad | ||
|
|
f50ca431ec | ||
|
|
9936be1346 | ||
|
|
a56ab2212d | ||
|
|
27d767f812 | ||
|
|
8229ca1335 | ||
|
|
f0fbaf45f4 | ||
|
|
0d018c37c5 | ||
|
|
3c0723d82f | ||
|
|
655940bc4f | ||
|
|
c64c770f54 | ||
|
|
daf0cd9f27 | ||
|
|
7157254482 | ||
|
|
1f1a26bc11 | ||
|
|
510825bb49 | ||
|
|
0b64363eeb | ||
|
|
fbeeb151ff | ||
|
|
484cd432fe | ||
|
|
9bd1252dd6 | ||
|
|
808b2970ca | ||
|
|
b26f9b1380 | ||
|
|
80b2e4fce4 | ||
|
|
0cfdbe75e4 | ||
|
|
959c747f69 | ||
|
|
aaa821fbee | ||
|
|
8324295ee6 | ||
|
|
7dc6929b79 | ||
|
|
81bb7456f8 | ||
|
|
26f8d2aa30 | ||
|
|
95ce3e40f7 | ||
|
|
a8b848d367 | ||
|
|
634b5be676 | ||
|
|
d3513782b0 | ||
|
|
b7bb7ecd5d | ||
|
|
94c5c4c57e | ||
|
|
5ddc25f4f2 | ||
|
|
3c67ecada0 | ||
|
|
af74cf6ad9 | ||
|
|
a143e0cee3 | ||
|
|
b6d7dda0b3 | ||
|
|
ac82b49425 | ||
|
|
be1250e71a | ||
|
|
47c0c847eb | ||
|
|
a1e756c0e5 | ||
|
|
6ca2b0f1ca | ||
|
|
c9f123be2a | ||
|
|
38919dfc8e | ||
|
|
d21031ecf4 | ||
|
|
c4babbecf0 | ||
|
|
ca3fae4611 | ||
|
|
65d24fa6be | ||
|
|
45a5c9bc8e | ||
|
|
66e2158fa7 | ||
|
|
d9a543ffaa | ||
|
|
a75754c2ec | ||
|
|
033bd21ff8 | ||
|
|
2f55bca2e4 | ||
|
|
7689aff790 | ||
|
|
482ce981ce | ||
|
|
97ad93ab1f | ||
|
|
319b7fcdaa | ||
|
|
4de8220ce6 | ||
|
|
fce9536213 | ||
|
|
e0c2ebae8a | ||
|
|
3c5285ba72 | ||
|
|
65bbccbe9e | ||
|
|
058e20d311 | ||
|
|
2458046afe | ||
|
|
40e04f773d | ||
|
|
9e3b4461cf | ||
|
|
9af3745670 | ||
|
|
26f00f3d37 | ||
|
|
391f08804f | ||
|
|
9114692f95 | ||
|
|
0f7731b611 | ||
|
|
8040bc1a22 | ||
|
|
11d273cbb6 | ||
|
|
85de19a422 | ||
|
|
9f1c3831fa | ||
|
|
6ffd3dbd67 | ||
|
|
71dd9f2d88 | ||
|
|
a4b8f8f795 | ||
|
|
39081139e2 | ||
|
|
2c5557aa30 | ||
|
|
5f5fb9e544 | ||
|
|
94d44340a3 | ||
|
|
dfa2ac3435 | ||
|
|
39820c783c | ||
|
|
ccbcb3d9bf | ||
|
|
66822a5f95 | ||
|
|
eb4f1f8164 | ||
|
|
e3e3c2e968 | ||
|
|
5ec4d8ab82 | ||
|
|
21f76355fa | ||
|
|
a277f0fa03 | ||
|
|
6759bd1b77 | ||
|
|
4cb1ecfb1c | ||
|
|
f17e4fdc58 | ||
|
|
b3a4a91a25 | ||
|
|
6bf1392edf | ||
|
|
69b662bb53 | ||
|
|
68f64c9d67 | ||
|
|
0bff8bd7a9 | ||
|
|
16f4892fac | ||
|
|
044db12224 | ||
|
|
a5156f1e10 | ||
|
|
08b4176fb3 | ||
|
|
b913ece251 | ||
|
|
be276ac651 | ||
|
|
29e5017913 | ||
|
|
b3a65f2492 | ||
|
|
96158f22b9 | ||
|
|
8d10030185 | ||
|
|
cdc350cef9 | ||
|
|
b52f7803ad | ||
|
|
6bb4005ae0 | ||
|
|
58ed3bfc2e | ||
|
|
cec3b7ab1e | ||
|
|
2e38b1906d | ||
|
|
51d2d66f76 | ||
|
|
2becb1b09d | ||
|
|
3665e655e2 | ||
|
|
3564c123a1 | ||
|
|
96dadf9971 | ||
|
|
28df31cc37 | ||
|
|
ed1b152a39 | ||
|
|
3036a174fc | ||
|
|
74ffefb09f | ||
|
|
4cbbad4d40 | ||
|
|
942c4ef389 | ||
|
|
35bd5adf45 | ||
|
|
8d5a6d8aa0 | ||
|
|
6d47871f02 | ||
|
|
1d11ebad3a | ||
|
|
c9e782fefe | ||
|
|
4bdd5552dd | ||
|
|
03618a6265 | ||
|
|
15359ab9a3 | ||
|
|
965ccdbea1 | ||
|
|
11f507ed2b | ||
|
|
94d778c0df | ||
|
|
a38e55651b | ||
|
|
5f77cde53f | ||
|
|
9565de2b5c | ||
|
|
e3b2f944a8 | ||
|
|
0539aece1b | ||
|
|
fcaa81ff3b | ||
|
|
84e32a0884 | ||
|
|
e81a759e0d | ||
|
|
8d93c843ad | ||
|
|
079dac3969 | ||
|
|
330b06e024 | ||
|
|
4183fee283 | ||
|
|
92044f8282 | ||
|
|
4cd1be1a31 | ||
|
|
c34fdcc5e8 | ||
|
|
5776bf99f8 | ||
|
|
817a157645 | ||
|
|
82fdcb5da5 | ||
|
|
f30a3451de | ||
|
|
2369f06654 | ||
|
|
2daebde092 | ||
|
|
a303a93a6d | ||
|
|
ffbaa89323 | ||
|
|
c288098e10 | ||
|
|
6e19749ca3 | ||
|
|
386370f640 | ||
|
|
5ef57590e0 | ||
|
|
0bf1635090 | ||
|
|
a153a86142 | ||
|
|
b79bebab18 | ||
|
|
48ec3e15ab | ||
|
|
cf8745d844 | ||
|
|
37fba1474e | ||
|
|
d7d445617f | ||
|
|
6b3818ff40 | ||
|
|
e7e2ebdb73 | ||
|
|
78d005f7e1 | ||
|
|
e802a39aa3 | ||
|
|
7f3e2a90ae | ||
|
|
1b4335760b | ||
|
|
50a3e6daba | ||
|
|
f0f094a28d | ||
|
|
046c8820ac | ||
|
|
a238f635be | ||
|
|
deb412662e | ||
|
|
44eebda749 | ||
|
|
e6f76c097d | ||
|
|
25468bece5 | ||
|
|
18a63913d1 | ||
|
|
18de49e2fe | ||
|
|
40566f8e4a | ||
|
|
41583c5e41 | ||
|
|
744eef46f4 | ||
|
|
5e85efb23e | ||
|
|
bb97aca0be | ||
|
|
d0457b4e4b | ||
|
|
6a85b3ab84 | ||
|
|
c57592f3a6 | ||
|
|
160846b665 | ||
|
|
c25ea731fd | ||
|
|
67da079606 | ||
|
|
4062bb03fb | ||
|
|
0f0ae5de48 | ||
|
|
71d2c380b3 | ||
|
|
06ea290306 | ||
|
|
8e4f52c8aa | ||
|
|
433d12ed35 | ||
|
|
f317508d39 | ||
|
|
b55c291af1 | ||
|
|
9301962e12 | ||
|
|
367a5b9924 | ||
|
|
bc2b71baa3 | ||
|
|
b0d7b177be | ||
|
|
566d3bdf7c | ||
|
|
adbf793e79 | ||
|
|
cf6c4c9aae | ||
|
|
ffaf85c8f3 | ||
|
|
2cc78f925f | ||
|
|
93f0eea4e7 | ||
|
|
4af5931e92 | ||
|
|
80e0d05f4e | ||
|
|
8e372fa7da | ||
|
|
3b2b0d5438 | ||
|
|
fb8179fef2 | ||
|
|
ebac48524d | ||
|
|
807451bf2a | ||
|
|
8fdbbfad22 | ||
|
|
1d5bfaac5a | ||
|
|
f5d9d7596a | ||
|
|
58e3941810 | ||
|
|
3ad433a50b | ||
|
|
8ac2db5b7c | ||
|
|
a441dcebae | ||
|
|
b546ea8720 | ||
|
|
90895db1e7 | ||
|
|
2dfa34d096 | ||
|
|
ff4704d5ea | ||
|
|
6ddfbd84b0 | ||
|
|
1e6417f95b | ||
|
|
e147a9d2fd | ||
|
|
cb1b441f7b | ||
|
|
43c8ce2d7d | ||
|
|
271546a98b | ||
|
|
4be6d26375 | ||
|
|
2920dabb99 | ||
|
|
5b50a91529 | ||
|
|
f0e09f78e8 | ||
|
|
133f90f34e | ||
|
|
4efebb8c0b | ||
|
|
9ce0df88ae | ||
|
|
5076e3ff72 | ||
|
|
7fb9f6e064 | ||
|
|
2a655a04c9 | ||
|
|
5eaeab0cff | ||
|
|
3cf0c0eb04 | ||
|
|
0c371a78dc | ||
|
|
ab7e363279 | ||
|
|
218f28f35c | ||
|
|
b8c66b23f9 | ||
|
|
d7397f28a0 | ||
|
|
9cac5a2937 | ||
|
|
8eae74879b | ||
|
|
ccf9c3fd53 | ||
|
|
6c425b4dbc | ||
|
|
9fc594434f | ||
|
|
63ce6f5669 | ||
|
|
9ef75f4fbe | ||
|
|
ce1f3735ad | ||
|
|
07d15f5c88 | ||
|
|
849f2becd8 | ||
|
|
d48b78a462 | ||
|
|
8e4ea3ca44 | ||
|
|
55061b73de | ||
|
|
73bddd119e | ||
|
|
e7fc44715b | ||
|
|
6d99bf3a46 | ||
|
|
02f1bd3251 | ||
|
|
9a305e6cbd | ||
|
|
990ae4463a | ||
|
|
3f1c3a283f | ||
|
|
229a6f017a | ||
|
|
93290bf441 | ||
|
|
c64be886b4 | ||
|
|
5f56b14733 | ||
|
|
9d80b9fc71 | ||
|
|
1433a0980d | ||
|
|
3afd957713 | ||
|
|
510ec12582 | ||
|
|
2e6575f368 | ||
|
|
8d660404dc | ||
|
|
1f155fa7c5 | ||
|
|
2166ce3e4e | ||
|
|
ec14751aeb | ||
|
|
aa6639a108 | ||
|
|
32ee1b11ec | ||
|
|
2c687266b2 | ||
|
|
38daaa2934 | ||
|
|
5a31e80c2d | ||
|
|
ff62e4c368 | ||
|
|
8d17d8d915 | ||
|
|
787f5168ad | ||
|
|
423bfffbea | ||
|
|
33cec7caee | ||
|
|
93c0d9e486 | ||
|
|
8b89a32813 | ||
|
|
b93e22c45a | ||
|
|
0694eb2b29 | ||
|
|
193f5b6512 | ||
|
|
cb3f96683f | ||
|
|
b3942bb8ff | ||
|
|
b3a2d29a3b | ||
|
|
f242f1c37d | ||
|
|
06ffdf164a | ||
|
|
5b75e5e917 | ||
|
|
fad0b49841 | ||
|
|
260e45cd7b | ||
|
|
8a7239ce24 | ||
|
|
e319888240 | ||
|
|
83010b6590 | ||
|
|
a24f08cbb0 | ||
|
|
f9407ca8bc | ||
|
|
7c2c249e5d | ||
|
|
1cad71f3bf | ||
|
|
0b47648650 | ||
|
|
f14954f7e2 | ||
|
|
7526ff5b87 | ||
|
|
b41ac68e06 | ||
|
|
dcffb9bbe3 | ||
|
|
f763ad2855 | ||
|
|
7b7402b986 | ||
|
|
7b06bd27b3 | ||
|
|
e6f4cf5660 | ||
|
|
c447145d62 | ||
|
|
27ad777c2c | ||
|
|
347f0ab852 | ||
|
|
df3215fef1 | ||
|
|
992f0bd2f0 | ||
|
|
4797791935 | ||
|
|
7031dbebe6 | ||
|
|
1575619d53 | ||
|
|
27a7e84def | ||
|
|
fc9ea347ca | ||
|
|
1a9b0509d5 | ||
|
|
a442eab9ea | ||
|
|
d2a2227c4c | ||
|
|
2cccbc949f | ||
|
|
4620ede9b9 | ||
|
|
73a73ac312 | ||
|
|
b480eb54c1 | ||
|
|
380a24358c | ||
|
|
ff53153782 | ||
|
|
8c2f982ab6 | ||
|
|
5edccd3efe | ||
|
|
e88c17f7e2 | ||
|
|
6ce1363dea |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -49,3 +49,4 @@ vite.config.ts.*
|
||||
*.sln
|
||||
*.sw?
|
||||
.history
|
||||
.cursor
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 40 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 495 KiB |
28
README.md
28
README.md
@@ -9,7 +9,7 @@
|
||||
|
||||
## 🐶 新手必读
|
||||
|
||||
- nodejs > 20.10.0 && pnpm > 10.10.0 (强制使用pnpm)
|
||||
- nodejs > 20.10.0 && pnpm > 10.14.0 (强制使用pnpm)
|
||||
- 演示地址【Vue3 + element-plus】:<http://dashboard-vue3.yudao.iocoder.cn>
|
||||
- 演示地址【Vue3 + vben5(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
|
||||
- 演示地址【Vue2 + element-ui】:<http://dashboard.yudao.iocoder.cn>
|
||||
@@ -35,30 +35,30 @@
|
||||
|
||||
## 外包项目请联系【非项目需求请勿扫码,非客服,不解答项目问题】
|
||||
|
||||

|
||||

|
||||
|
||||
## 技术栈
|
||||
|
||||
| 框架 | 说明 | 版本 |
|
||||
| --- | --- | --- |
|
||||
| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.13 |
|
||||
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 6.2.5 |
|
||||
| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.17 |
|
||||
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 7.1.2 |
|
||||
| [Ant Design Vue](https://www.antdv.com/) | Ant Design Vue | 4.2.6 |
|
||||
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.9.7 |
|
||||
| [Naive UI](https://www.naiveui.com/) | Naive UI | 2.41.0 |
|
||||
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.10.2 |
|
||||
| [Naive UI](https://www.naiveui.com/) | Naive UI | 2.42.0 |
|
||||
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 超集 | 5.8.3 |
|
||||
| [pinia](https://pinia.vuejs.org/) | Vue 存储库替代 vuex5 | 2.3.1 |
|
||||
| [vueuse](https://vueuse.org/) | 常用工具集 | 12.8.2 |
|
||||
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.1.3 |
|
||||
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.5.0 |
|
||||
| [pinia](https://pinia.vuejs.org/) | Vue 存储库替代 vuex5 | 3.0.3 |
|
||||
| [vueuse](https://vueuse.org/) | 常用工具集 | 13.4.0 |
|
||||
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.1.7 |
|
||||
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.5.1 |
|
||||
| [Tailwind CSS](https://tailwindcss.com/) | 原子 CSS | 3.4.17 |
|
||||
| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.324 |
|
||||
| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.354 |
|
||||
| [TinyMCE](https://www.tiny.cloud/) | 富文本编辑器 | 6.1.0 |
|
||||
| [Echarts](https://echarts.apache.org/) | 图表库 | 5.6.0 |
|
||||
| [axios](https://axios-http.com/) | http客户端 | 1.8.4 |
|
||||
| [axios](https://axios-http.com/) | http客户端 | 1.10.0 |
|
||||
| [dayjs](https://day.js.org/) | 日期处理库 | 1.11.13 |
|
||||
| [vee-validate](https://vee-validate.logaretm.com/) | 表单验证 | 4.15.0 |
|
||||
| [zod](https://zod.dev/) | 数据验证 | 3.24.2 |
|
||||
| [vee-validate](https://vee-validate.logaretm.com/) | 表单验证 | 4.15.1 |
|
||||
| [zod](https://zod.dev/) | 数据验证 | 3.25.67 |
|
||||
|
||||
## 🔥 后端架构
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandler } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { unAuthorizedResponse } from '~/utils/response';
|
||||
import { MOCK_CODES } from '~/utils/mock-data';
|
||||
import { unAuthorizedResponse, useResponseSuccess } from '~/utils/response';
|
||||
|
||||
export default eventHandler((event) => {
|
||||
const userinfo = verifyAccessToken(event);
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import { defineEventHandler, readBody, setResponseStatus } from 'h3';
|
||||
import {
|
||||
clearRefreshTokenCookie,
|
||||
setRefreshTokenCookie,
|
||||
} from '~/utils/cookie-utils';
|
||||
import { generateAccessToken, generateRefreshToken } from '~/utils/jwt-utils';
|
||||
import { forbiddenResponse } from '~/utils/response';
|
||||
import { MOCK_USERS } from '~/utils/mock-data';
|
||||
import {
|
||||
forbiddenResponse,
|
||||
useResponseError,
|
||||
useResponseSuccess,
|
||||
} from '~/utils/response';
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { password, username } = await readBody(event);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { defineEventHandler } from 'h3';
|
||||
import {
|
||||
clearRefreshTokenCookie,
|
||||
getRefreshTokenFromCookie,
|
||||
} from '~/utils/cookie-utils';
|
||||
import { useResponseSuccess } from '~/utils/response';
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const refreshToken = getRefreshTokenFromCookie(event);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { defineEventHandler } from 'h3';
|
||||
import {
|
||||
clearRefreshTokenCookie,
|
||||
getRefreshTokenFromCookie,
|
||||
setRefreshTokenCookie,
|
||||
} from '~/utils/cookie-utils';
|
||||
import { verifyRefreshToken } from '~/utils/jwt-utils';
|
||||
import { generateAccessToken, verifyRefreshToken } from '~/utils/jwt-utils';
|
||||
import { MOCK_USERS } from '~/utils/mock-data';
|
||||
import { forbiddenResponse } from '~/utils/response';
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import { eventHandler, setHeader } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { unAuthorizedResponse } from '~/utils/response';
|
||||
|
||||
export default eventHandler(async (event) => {
|
||||
const userinfo = verifyAccessToken(event);
|
||||
if (!userinfo) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandler } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { unAuthorizedResponse } from '~/utils/response';
|
||||
import { MOCK_MENUS } from '~/utils/mock-data';
|
||||
import { unAuthorizedResponse, useResponseSuccess } from '~/utils/response';
|
||||
|
||||
export default eventHandler(async (event) => {
|
||||
const userinfo = verifyAccessToken(event);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import { eventHandler, getQuery, setResponseStatus } from 'h3';
|
||||
import { useResponseError } from '~/utils/response';
|
||||
|
||||
export default eventHandler((event) => {
|
||||
const { status } = getQuery(event);
|
||||
setResponseStatus(event, Number(status));
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { eventHandler } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import {
|
||||
sleep,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { eventHandler } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import {
|
||||
sleep,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { eventHandler } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import {
|
||||
sleep,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { faker } from '@faker-js/faker';
|
||||
import { eventHandler } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { unAuthorizedResponse, useResponseSuccess } from '~/utils/response';
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { eventHandler } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { MOCK_MENU_LIST } from '~/utils/mock-data';
|
||||
import { unAuthorizedResponse, useResponseSuccess } from '~/utils/response';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { eventHandler, getQuery } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { MOCK_MENU_LIST } from '~/utils/mock-data';
|
||||
import { unAuthorizedResponse } from '~/utils/response';
|
||||
import { unAuthorizedResponse, useResponseSuccess } from '~/utils/response';
|
||||
|
||||
const namesMap: Record<string, any> = {};
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { eventHandler, getQuery } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { MOCK_MENU_LIST } from '~/utils/mock-data';
|
||||
import { unAuthorizedResponse } from '~/utils/response';
|
||||
import { unAuthorizedResponse, useResponseSuccess } from '~/utils/response';
|
||||
|
||||
const pathMap: Record<string, any> = { '/': 0 };
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { faker } from '@faker-js/faker';
|
||||
import { eventHandler, getQuery } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { getMenuIds, MOCK_MENU_LIST } from '~/utils/mock-data';
|
||||
import { unAuthorizedResponse, usePageResponseSuccess } from '~/utils/response';
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { faker } from '@faker-js/faker';
|
||||
import { eventHandler, getQuery } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { unAuthorizedResponse, usePageResponseSuccess } from '~/utils/response';
|
||||
import {
|
||||
sleep,
|
||||
unAuthorizedResponse,
|
||||
usePageResponseSuccess,
|
||||
} from '~/utils/response';
|
||||
|
||||
function generateMockDataList(count: number) {
|
||||
const dataList = [];
|
||||
@@ -44,30 +49,69 @@ export default eventHandler(async (event) => {
|
||||
await sleep(600);
|
||||
|
||||
const { page, pageSize, sortBy, sortOrder } = getQuery(event);
|
||||
// 规范化分页参数,处理 string[]
|
||||
const pageRaw = Array.isArray(page) ? page[0] : page;
|
||||
const pageSizeRaw = Array.isArray(pageSize) ? pageSize[0] : pageSize;
|
||||
const pageNumber = Math.max(
|
||||
1,
|
||||
Number.parseInt(String(pageRaw ?? '1'), 10) || 1,
|
||||
);
|
||||
const pageSizeNumber = Math.min(
|
||||
100,
|
||||
Math.max(1, Number.parseInt(String(pageSizeRaw ?? '10'), 10) || 10),
|
||||
);
|
||||
const listData = structuredClone(mockData);
|
||||
if (sortBy && Reflect.has(listData[0], sortBy as string)) {
|
||||
|
||||
// 规范化 query 入参,兼容 string[]
|
||||
const sortKeyRaw = Array.isArray(sortBy) ? sortBy[0] : sortBy;
|
||||
const sortOrderRaw = Array.isArray(sortOrder) ? sortOrder[0] : sortOrder;
|
||||
// 检查 sortBy 是否是 listData 元素的合法属性键
|
||||
if (
|
||||
typeof sortKeyRaw === 'string' &&
|
||||
listData[0] &&
|
||||
Object.prototype.hasOwnProperty.call(listData[0], sortKeyRaw)
|
||||
) {
|
||||
// 定义数组元素的类型
|
||||
type ItemType = (typeof listData)[0];
|
||||
const sortKey = sortKeyRaw as keyof ItemType; // 将 sortBy 断言为合法键
|
||||
const isDesc = sortOrderRaw === 'desc';
|
||||
listData.sort((a, b) => {
|
||||
if (sortOrder === 'asc') {
|
||||
if (sortBy === 'price') {
|
||||
return (
|
||||
Number.parseFloat(a[sortBy as string]) -
|
||||
Number.parseFloat(b[sortBy as string])
|
||||
);
|
||||
const aValue = a[sortKey] as unknown;
|
||||
const bValue = b[sortKey] as unknown;
|
||||
|
||||
let result = 0;
|
||||
|
||||
if (typeof aValue === 'number' && typeof bValue === 'number') {
|
||||
result = aValue - bValue;
|
||||
} else if (aValue instanceof Date && bValue instanceof Date) {
|
||||
result = aValue.getTime() - bValue.getTime();
|
||||
} else if (typeof aValue === 'boolean' && typeof bValue === 'boolean') {
|
||||
if (aValue === bValue) {
|
||||
result = 0;
|
||||
} else {
|
||||
return a[sortBy as string] > b[sortBy as string] ? 1 : -1;
|
||||
result = aValue ? 1 : -1;
|
||||
}
|
||||
} else {
|
||||
if (sortBy === 'price') {
|
||||
return (
|
||||
Number.parseFloat(b[sortBy as string]) -
|
||||
Number.parseFloat(a[sortBy as string])
|
||||
);
|
||||
} else {
|
||||
return a[sortBy as string] < b[sortBy as string] ? 1 : -1;
|
||||
}
|
||||
const aStr = String(aValue);
|
||||
const bStr = String(bValue);
|
||||
const aNum = Number(aStr);
|
||||
const bNum = Number(bStr);
|
||||
result =
|
||||
Number.isFinite(aNum) && Number.isFinite(bNum)
|
||||
? aNum - bNum
|
||||
: aStr.localeCompare(bStr, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: 'base',
|
||||
});
|
||||
}
|
||||
|
||||
return isDesc ? -result : result;
|
||||
});
|
||||
}
|
||||
|
||||
return usePageResponseSuccess(page as string, pageSize as string, listData);
|
||||
return usePageResponseSuccess(
|
||||
String(pageNumber),
|
||||
String(pageSizeNumber),
|
||||
listData,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
import { defineEventHandler } from 'h3';
|
||||
|
||||
export default defineEventHandler(() => 'Test get handler');
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
import { defineEventHandler } from 'h3';
|
||||
|
||||
export default defineEventHandler(() => 'Test post handler');
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { eventHandler } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { unAuthorizedResponse } from '~/utils/response';
|
||||
import { unAuthorizedResponse, useResponseSuccess } from '~/utils/response';
|
||||
|
||||
export default eventHandler((event) => {
|
||||
const userinfo = verifyAccessToken(event);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { eventHandler } from 'h3';
|
||||
import { verifyAccessToken } from '~/utils/jwt-utils';
|
||||
import { unAuthorizedResponse } from '~/utils/response';
|
||||
import { unAuthorizedResponse, useResponseSuccess } from '~/utils/response';
|
||||
|
||||
export default eventHandler((event) => {
|
||||
const userinfo = verifyAccessToken(event);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { defineEventHandler } from 'h3';
|
||||
import { forbiddenResponse, sleep } from '~/utils/response';
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { defineEventHandler } from 'h3';
|
||||
|
||||
export default defineEventHandler(() => {
|
||||
return `
|
||||
<h1>Hello Vben Admin</h1>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import type { EventHandlerRequest, H3Event } from 'h3';
|
||||
|
||||
import { deleteCookie, getCookie, setCookie } from 'h3';
|
||||
|
||||
export function clearRefreshTokenCookie(event: H3Event<EventHandlerRequest>) {
|
||||
deleteCookie(event, 'jwt', {
|
||||
httpOnly: true,
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import type { EventHandlerRequest, H3Event } from 'h3';
|
||||
|
||||
import type { UserInfo } from './mock-data';
|
||||
|
||||
import { getHeader } from 'h3';
|
||||
import jwt from 'jsonwebtoken';
|
||||
|
||||
import { UserInfo } from './mock-data';
|
||||
import { MOCK_USERS } from './mock-data';
|
||||
|
||||
// TODO: Replace with your own secret key
|
||||
const ACCESS_TOKEN_SECRET = 'access_token_secret';
|
||||
@@ -31,12 +34,22 @@ export function verifyAccessToken(
|
||||
return null;
|
||||
}
|
||||
|
||||
const token = authHeader.split(' ')[1];
|
||||
const tokenParts = authHeader.split(' ');
|
||||
if (tokenParts.length !== 2) {
|
||||
return null;
|
||||
}
|
||||
const token = tokenParts[1] as string;
|
||||
try {
|
||||
const decoded = jwt.verify(token, ACCESS_TOKEN_SECRET) as UserPayload;
|
||||
const decoded = jwt.verify(
|
||||
token,
|
||||
ACCESS_TOKEN_SECRET,
|
||||
) as unknown as UserPayload;
|
||||
|
||||
const username = decoded.username;
|
||||
const user = MOCK_USERS.find((item) => item.username === username);
|
||||
if (!user) {
|
||||
return null;
|
||||
}
|
||||
const { password: _pwd, ...userinfo } = user;
|
||||
return userinfo;
|
||||
} catch {
|
||||
@@ -50,7 +63,12 @@ export function verifyRefreshToken(
|
||||
try {
|
||||
const decoded = jwt.verify(token, REFRESH_TOKEN_SECRET) as UserPayload;
|
||||
const username = decoded.username;
|
||||
const user = MOCK_USERS.find((item) => item.username === username);
|
||||
const user = MOCK_USERS.find(
|
||||
(item) => item.username === username,
|
||||
) as UserInfo;
|
||||
if (!user) {
|
||||
return null;
|
||||
}
|
||||
const { password: _pwd, ...userinfo } = user;
|
||||
return userinfo;
|
||||
} catch {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import type { EventHandlerRequest, H3Event } from 'h3';
|
||||
|
||||
import { setResponseStatus } from 'h3';
|
||||
|
||||
export function useResponseSuccess<T = any>(data: T) {
|
||||
return {
|
||||
code: 0,
|
||||
|
||||
@@ -24,3 +24,12 @@ VITE_APP_BAIDU_CODE = e98f2eab6ceb8688bc6d8fc5332ff093
|
||||
|
||||
# GoView域名
|
||||
VITE_GOVIEW_URL='http://127.0.0.1:3000'
|
||||
|
||||
# API 加解密
|
||||
VITE_APP_API_ENCRYPT_ENABLE = true
|
||||
VITE_APP_API_ENCRYPT_HEADER = X-Api-Encrypt
|
||||
VITE_APP_API_ENCRYPT_ALGORITHM = AES
|
||||
VITE_APP_API_ENCRYPT_REQUEST_KEY = 52549111389893486934626385991395
|
||||
VITE_APP_API_ENCRYPT_RESPONSE_KEY = 96103715984234343991809655248883
|
||||
# VITE_APP_API_ENCRYPT_REQUEST_KEY = MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCls2rIpnGdYnLFgz1XU13GbNQ5DloyPpvW00FPGjqn5Z6JpK+kDtVlnkhwR87iRrE5Vf2WNqRX6vzbLSgveIQY8e8oqGCb829myjf1MuI+ZzN4ghf/7tEYhZJGPI9AbfxFqBUzm+kR3/HByAI22GLT96WM26QiMK8n3tIP/yiLswIDAQAB
|
||||
# VITE_APP_API_ENCRYPT_RESPONSE_KEY = MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAOH8IfIFxL/MR9XIg1UDv5z1fGXQI93E8wrU4iPFovL/sEt9uSgSkjyidC2O7N+m7EKtoN6b1u7cEwXSkwf3kfK0jdWLSQaNpX5YshqXCBzbDfugDaxuyYrNA4/tIMs7mzZAk0APuRXB35Dmupou7Yw7TFW/7QhQmGfzeEKULQvnAgMBAAECgYAw8LqlQGyQoPv5p3gRxEMOCfgL0JzD3XBJKztiRd35RDh40Nx1ejgjW4dPioFwGiVWd2W8cAGHLzALdcQT2KDJh+T/tsd4SPmI6uSBBK6Ff2DkO+kFFcuYvfclQQKqxma5CaZOSqhgenacmgTMFeg2eKlY3symV6JlFNu/IKU42QJBAOhxAK/Eq3e61aYQV2JSguhMR3b8NXJJRroRs/QHEanksJtl+M+2qhkC9nQVXBmBkndnkU/l2tYcHfSBlAyFySMCQQD445tgm/J2b6qMQmuUGQAYDN8FIkHjeKmha+l/fv0igWm8NDlBAem91lNDIPBUzHL1X1+pcts5bjmq99YdOnhtAkAg2J8dN3B3idpZDiQbC8fd5bGPmdI/pSUudAP27uzLEjr2qrE/QPPGdwm2m7IZFJtK7kK1hKio6u48t/bg0iL7AkEAuUUs94h+v702Fnym+jJ2CHEkXvz2US8UDs52nWrZYiM1o1y4tfSHm8H8bv8JCAa9GHyriEawfBraILOmllFdLQJAQSRZy4wmlaG48MhVXodB85X+VZ9krGXZ2TLhz7kz9iuToy53l9jTkESt6L5BfBDCVdIwcXLYgK+8KFdHN5W7HQ==
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vben/web-antd",
|
||||
"version": "5.5.7",
|
||||
"version": "5.5.9",
|
||||
"homepage": "https://vben.pro",
|
||||
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
|
||||
"repository": {
|
||||
@@ -46,17 +46,21 @@
|
||||
"@vueuse/core": "catalog:",
|
||||
"@vueuse/integrations": "catalog:",
|
||||
"ant-design-vue": "catalog:",
|
||||
"bpmn-js": "catalog:",
|
||||
"bpmn-js-properties-panel": "catalog:",
|
||||
"bpmn-js-token-simulation": "catalog:",
|
||||
"camunda-bpmn-moddle": "catalog:",
|
||||
"cropperjs": "catalog:",
|
||||
"crypto-js": "catalog:",
|
||||
"dayjs": "catalog:",
|
||||
"diagram-js": "catalog:",
|
||||
"fast-xml-parser": "catalog:",
|
||||
"highlight.js": "catalog:",
|
||||
"pinia": "catalog:",
|
||||
"steady-xml": "catalog:",
|
||||
"tinymce": "catalog:",
|
||||
"vue": "catalog:",
|
||||
"vue-dompurify-html": "catalog:",
|
||||
"vue-router": "catalog:",
|
||||
"vue3-signature": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/crypto-js": "catalog:"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ const AutoComplete = defineAsyncComponent(
|
||||
() => import('ant-design-vue/es/auto-complete'),
|
||||
);
|
||||
const Button = defineAsyncComponent(() => import('ant-design-vue/es/button'));
|
||||
const Cascader = defineAsyncComponent(
|
||||
() => import('ant-design-vue/es/cascader'),
|
||||
);
|
||||
const Checkbox = defineAsyncComponent(
|
||||
() => import('ant-design-vue/es/checkbox'),
|
||||
);
|
||||
@@ -59,6 +62,9 @@ const Textarea = defineAsyncComponent(() =>
|
||||
const TimePicker = defineAsyncComponent(
|
||||
() => import('ant-design-vue/es/time-picker'),
|
||||
);
|
||||
const TimeRangePicker = defineAsyncComponent(() =>
|
||||
import('ant-design-vue/es/time-picker').then((res) => res.TimeRangePicker),
|
||||
);
|
||||
const TreeSelect = defineAsyncComponent(
|
||||
() => import('ant-design-vue/es/tree-select'),
|
||||
);
|
||||
@@ -100,6 +106,7 @@ const withDefaultPlaceholder = <T extends Component>(
|
||||
|
||||
// 这里需要自行根据业务组件库进行适配,需要用到的组件都需要在这里类型说明
|
||||
export type ComponentType =
|
||||
| 'ApiCascader'
|
||||
| 'ApiSelect'
|
||||
| 'ApiTreeSelect'
|
||||
| 'AutoComplete'
|
||||
@@ -126,6 +133,7 @@ export type ComponentType =
|
||||
| 'Switch'
|
||||
| 'Textarea'
|
||||
| 'TimePicker'
|
||||
| 'TimeRangePicker'
|
||||
| 'TreeSelect'
|
||||
| 'Upload'
|
||||
| BaseFormComponentType;
|
||||
@@ -135,6 +143,21 @@ async function initComponentAdapter() {
|
||||
// 如果你的组件体积比较大,可以使用异步加载
|
||||
// Button: () =>
|
||||
// import('xxx').then((res) => res.Button),
|
||||
ApiCascader: withDefaultPlaceholder(
|
||||
{
|
||||
...ApiComponent,
|
||||
name: 'ApiCascader',
|
||||
},
|
||||
'select',
|
||||
{
|
||||
component: Cascader,
|
||||
fieldNames: { label: 'label', value: 'value', children: 'children' },
|
||||
loadingSlot: 'suffixIcon',
|
||||
modelPropName: 'value',
|
||||
optionsPropName: 'treeData',
|
||||
visibleEvent: 'onVisibleChange',
|
||||
},
|
||||
),
|
||||
ApiSelect: withDefaultPlaceholder(
|
||||
{
|
||||
...ApiComponent,
|
||||
@@ -195,6 +218,7 @@ async function initComponentAdapter() {
|
||||
Textarea: withDefaultPlaceholder(Textarea, 'input'),
|
||||
RichTextarea,
|
||||
TimePicker,
|
||||
TimeRangePicker,
|
||||
TreeSelect: withDefaultPlaceholder(TreeSelect, 'select'),
|
||||
Upload,
|
||||
FileUpload,
|
||||
|
||||
@@ -7,9 +7,7 @@ import type { ComponentType } from './component';
|
||||
|
||||
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
/** 手机号正则表达式(中国) */
|
||||
const MOBILE_REGEX = /(?:0|86|\+86)?1[3-9]\d{9}/;
|
||||
import { isMobile } from '@vben/utils';
|
||||
|
||||
async function initSetupVbenForm() {
|
||||
setupVbenForm<ComponentType>({
|
||||
@@ -44,7 +42,7 @@ async function initSetupVbenForm() {
|
||||
mobile: (value, _params, ctx) => {
|
||||
if (value === undefined || value === null || value.length === 0) {
|
||||
return true;
|
||||
} else if (!MOBILE_REGEX.test(value)) {
|
||||
} else if (!isMobile(value)) {
|
||||
return $t('ui.formRules.mobile', [ctx.label]);
|
||||
}
|
||||
return true;
|
||||
@@ -54,7 +52,7 @@ async function initSetupVbenForm() {
|
||||
if (value === undefined || value === null || value.length === 0) {
|
||||
return $t('ui.formRules.required', [ctx.label]);
|
||||
}
|
||||
if (!MOBILE_REGEX.test(value)) {
|
||||
if (!isMobile(value)) {
|
||||
return $t('ui.formRules.mobile', [ctx.label]);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
/* 来自 @vben/plugins/vxe-table style.css,覆盖 vxe-table 原有的样式定义,使用 vben 的样式主题 */
|
||||
:root {
|
||||
--vxe-ui-font-color: hsl(var(--foreground));
|
||||
--vxe-ui-font-primary-color: hsl(var(--primary));
|
||||
|
||||
/* --vxe-ui-font-lighten-color: #babdc0;
|
||||
--vxe-ui-font-darken-color: #86898e; */
|
||||
--vxe-ui-font-disabled-color: hsl(var(--foreground) / 50%);
|
||||
|
||||
/* base */
|
||||
--vxe-ui-base-popup-border-color: hsl(var(--border));
|
||||
--vxe-ui-input-disabled-color: hsl(var(--border) / 60%);
|
||||
|
||||
/* --vxe-ui-base-popup-box-shadow: 0px 12px 30px 8px rgb(0 0 0 / 50%); */
|
||||
|
||||
/* layout */
|
||||
--vxe-ui-layout-background-color: hsl(var(--background));
|
||||
--vxe-ui-table-resizable-line-color: hsl(var(--heavy));
|
||||
|
||||
/* --vxe-ui-table-fixed-left-scrolling-box-shadow: 8px 0px 10px -5px hsl(var(--accent));
|
||||
--vxe-ui-table-fixed-right-scrolling-box-shadow: -8px 0px 10px -5px hsl(var(--accent)); */
|
||||
|
||||
/* input */
|
||||
--vxe-ui-input-border-color: hsl(var(--border));
|
||||
|
||||
/* --vxe-ui-input-placeholder-color: #8d9095; */
|
||||
|
||||
/* --vxe-ui-input-disabled-background-color: #262727; */
|
||||
|
||||
/* loading */
|
||||
--vxe-ui-loading-background-color: hsl(var(--overlay-content));
|
||||
|
||||
/* table */
|
||||
--vxe-ui-table-header-background-color: hsl(var(--accent));
|
||||
--vxe-ui-table-border-color: hsl(var(--border));
|
||||
--vxe-ui-table-row-hover-background-color: hsl(var(--accent-hover));
|
||||
--vxe-ui-table-row-striped-background-color: hsl(var(--accent) / 60%);
|
||||
--vxe-ui-table-row-hover-striped-background-color: hsl(var(--accent));
|
||||
--vxe-ui-table-row-radio-checked-background-color: hsl(var(--accent));
|
||||
--vxe-ui-table-row-hover-radio-checked-background-color: hsl(
|
||||
var(--accent-hover)
|
||||
);
|
||||
--vxe-ui-table-row-checkbox-checked-background-color: hsl(var(--accent));
|
||||
--vxe-ui-table-row-hover-checkbox-checked-background-color: hsl(
|
||||
var(--accent-hover)
|
||||
);
|
||||
--vxe-ui-table-row-current-background-color: hsl(var(--accent));
|
||||
--vxe-ui-table-row-hover-current-background-color: hsl(var(--accent-hover));
|
||||
--vxe-ui-font-primary-tinge-color: hsl(var(--primary));
|
||||
--vxe-ui-font-primary-lighten-color: hsl(var(--primary) / 60%);
|
||||
--vxe-ui-font-primary-darken-color: hsl(var(--primary));
|
||||
|
||||
/* height: auto !important; */
|
||||
|
||||
/* --vxe-ui-table-fixed-scrolling-box-shadow-color: rgb(0 0 0 / 80%); */
|
||||
}
|
||||
|
||||
.vxe-tools--operate {
|
||||
margin-right: 0.25rem;
|
||||
margin-left: 0.75rem;
|
||||
}
|
||||
|
||||
.vxe-table-custom--checkbox-option:hover {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.vxe-toolbar {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.vxe-buttons--wrapper:not(:empty),
|
||||
.vxe-tools--operate:not(:empty),
|
||||
.vxe-tools--wrapper:not(:empty) {
|
||||
padding: 0.6em 0;
|
||||
}
|
||||
|
||||
.vxe-tools--operate:not(:has(button)) {
|
||||
margin-left: 0;
|
||||
}
|
||||
@@ -6,7 +6,9 @@ import { h } from 'vue';
|
||||
import { IconifyIcon } from '@vben/icons';
|
||||
import { $te } from '@vben/locales';
|
||||
import {
|
||||
AsyncComponents,
|
||||
AsyncVxeColumn,
|
||||
AsyncVxeTable,
|
||||
createRequiredValidation,
|
||||
setupVbenVxeTable,
|
||||
useVbenVxeGrid,
|
||||
} from '@vben/plugins/vxe-table';
|
||||
@@ -33,8 +35,6 @@ import { $t } from '#/locales';
|
||||
|
||||
import { useVbenForm } from './form';
|
||||
|
||||
import '#/adapter/style.css';
|
||||
|
||||
setupVbenVxeTable({
|
||||
configVxeTable: (vxeUI) => {
|
||||
vxeUI.setConfig({
|
||||
@@ -332,40 +332,44 @@ setupVbenVxeTable({
|
||||
},
|
||||
});
|
||||
|
||||
// add by 星语:数量格式化,例如说:金额
|
||||
vxeUI.formats.add('formatNumber', {
|
||||
// add by 星语:数量格式化,保留 3 位
|
||||
vxeUI.formats.add('formatAmount3', {
|
||||
tableCellFormatMethod({ cellValue }) {
|
||||
return erpCountInputFormatter(cellValue);
|
||||
},
|
||||
});
|
||||
|
||||
// add by 星语:数量格式化,保留 2 位
|
||||
vxeUI.formats.add('formatAmount2', {
|
||||
tableCellFormatMethod({ cellValue }, digits = 2) {
|
||||
return `${erpNumberFormatter(cellValue, digits)}元`;
|
||||
return `${erpNumberFormatter(cellValue, digits)}`;
|
||||
},
|
||||
});
|
||||
|
||||
vxeUI.formats.add('formatFenToYuanAmount', {
|
||||
tableCellFormatMethod({ cellValue }, digits = 2) {
|
||||
return `${erpNumberFormatter(fenToYuan(cellValue), digits)}元`;
|
||||
return `${erpNumberFormatter(fenToYuan(cellValue), digits)}`;
|
||||
},
|
||||
});
|
||||
|
||||
// add by 星语:文件大小格式化
|
||||
vxeUI.formats.add('formatFileSize', {
|
||||
tableCellFormatMethod({ cellValue }, digits = 2) {
|
||||
if (!cellValue) return '0 B';
|
||||
const unitArr = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
const index = Math.floor(Math.log(cellValue) / Math.log(1024));
|
||||
const size = cellValue / 1024 ** index;
|
||||
const formattedSize = size.toFixed(digits);
|
||||
return `${formattedSize} ${unitArr[index]}`;
|
||||
},
|
||||
});
|
||||
},
|
||||
useVbenForm,
|
||||
});
|
||||
|
||||
export { useVbenVxeGrid };
|
||||
export { createRequiredValidation, useVbenVxeGrid };
|
||||
|
||||
const [VxeTable, VxeColumn, VxeToolbar] = AsyncComponents;
|
||||
export { VxeColumn, VxeTable, VxeToolbar };
|
||||
export const [VxeTable, VxeColumn] = [AsyncVxeTable, AsyncVxeColumn];
|
||||
|
||||
// add by 芋艿:from https://github.com/vbenjs/vue-vben-admin/blob/main/playground/src/adapter/vxe-table.ts#L264-L270
|
||||
export type OnActionClickParams<T = Recordable<any>> = {
|
||||
code: string;
|
||||
row: T;
|
||||
};
|
||||
export type OnActionClickFn<T = Recordable<any>> = (
|
||||
params: OnActionClickParams<T>,
|
||||
) => void;
|
||||
export * from '#/components/table-action';
|
||||
|
||||
export type * from '@vben/plugins/vxe-table';
|
||||
|
||||
@@ -12,6 +12,7 @@ export namespace AiImageApi {
|
||||
// AI 绘图
|
||||
export interface Image {
|
||||
id: number; // 编号
|
||||
userId: number;
|
||||
platform: string; // 平台
|
||||
model: string; // 模型
|
||||
prompt: string; // 提示词
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { AiWriteTypeEnum } from '@vben/constants';
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { AiWriteTypeEnum } from '#/utils';
|
||||
|
||||
import { useAppConfig } from '@vben/hooks';
|
||||
import { fetchEventSource } from '@vben/request';
|
||||
import { useAccessStore } from '@vben/stores';
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ProductUnitApi {
|
||||
/** 产品单位信息 */
|
||||
export interface ProductUnit {
|
||||
id: number; // 编号
|
||||
groupId?: number; // 分组编号
|
||||
name?: string; // 单位名称
|
||||
basic?: number; // 基础单位
|
||||
number?: number; // 单位数量/相对于基础单位
|
||||
usageType: number; // 用途
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品单位分页 */
|
||||
export function getProductUnitPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ProductUnitApi.ProductUnit>>(
|
||||
'/basic/product-unit/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品单位详情 */
|
||||
export function getProductUnit(id: number) {
|
||||
return requestClient.get<ProductUnitApi.ProductUnit>(
|
||||
`/basic/product-unit/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增产品单位 */
|
||||
export function createProductUnit(data: ProductUnitApi.ProductUnit) {
|
||||
return requestClient.post('/basic/product-unit/create', data);
|
||||
}
|
||||
|
||||
/** 修改产品单位 */
|
||||
export function updateProductUnit(data: ProductUnitApi.ProductUnit) {
|
||||
return requestClient.put('/basic/product-unit/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品单位 */
|
||||
export function deleteProductUnit(id: number) {
|
||||
return requestClient.delete(`/basic/product-unit/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除产品单位 */
|
||||
export function deleteProductUnitListByIds(ids: number[]) {
|
||||
return requestClient.delete(
|
||||
`/basic/product-unit/delete-list?ids=${ids.join(',')}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 导出产品单位 */
|
||||
export function exportProductUnit(params: any) {
|
||||
return requestClient.download('/basic/product-unit/export-excel', params);
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ProductUnitGroupApi {
|
||||
/** 产品单位组信息 */
|
||||
export interface ProductUnitGroup {
|
||||
id: number; // 编号
|
||||
name?: string; // 产品单位组名称
|
||||
status?: number; // 开启状态
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品单位组分页 */
|
||||
export function getProductUnitGroupPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ProductUnitGroupApi.ProductUnitGroup>>(
|
||||
'/basic/product-unit-group/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品单位组详情 */
|
||||
export function getProductUnitGroup(id: number) {
|
||||
return requestClient.get<ProductUnitGroupApi.ProductUnitGroup>(
|
||||
`/basic/product-unit-group/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增产品单位组 */
|
||||
export function createProductUnitGroup(
|
||||
data: ProductUnitGroupApi.ProductUnitGroup,
|
||||
) {
|
||||
return requestClient.post('/basic/product-unit-group/create', data);
|
||||
}
|
||||
|
||||
/** 修改产品单位组 */
|
||||
export function updateProductUnitGroup(
|
||||
data: ProductUnitGroupApi.ProductUnitGroup,
|
||||
) {
|
||||
return requestClient.put('/basic/product-unit-group/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品单位组 */
|
||||
export function deleteProductUnitGroup(id: number) {
|
||||
return requestClient.delete(`/basic/product-unit-group/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除产品单位组 */
|
||||
export function deleteProductUnitGroupListByIds(ids: number[]) {
|
||||
return requestClient.delete(
|
||||
`/basic/product-unit-group/delete-list?ids=${ids.join(',')}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 导出产品单位组 */
|
||||
export function exportProductUnitGroup(params: any) {
|
||||
return requestClient.download(
|
||||
'/basic/product-unit-group/export-excel',
|
||||
params,
|
||||
);
|
||||
}
|
||||
@@ -49,5 +49,7 @@ export async function deleteProcessExpression(id: number) {
|
||||
|
||||
/** 导出流程表达式 */
|
||||
export async function exportProcessExpression(params: any) {
|
||||
return requestClient.download('/bpm/process-expression/export-excel', params);
|
||||
return requestClient.download('/bpm/process-expression/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import type {
|
||||
BpmCandidateStrategyEnum,
|
||||
BpmNodeTypeEnum,
|
||||
} from '@vben/constants';
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { BpmTaskApi } from '../task';
|
||||
|
||||
import type { BpmModelApi } from '#/api/bpm/model';
|
||||
import type { BpmCandidateStrategyEnum, BpmNodeTypeEnum } from '#/utils';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
@@ -40,6 +43,7 @@ export namespace BpmProcessInstanceApi {
|
||||
nodeType: BpmNodeTypeEnum;
|
||||
startTime?: Date;
|
||||
status: number;
|
||||
processInstanceId?: string;
|
||||
tasks: ApprovalTaskInfo[];
|
||||
}
|
||||
|
||||
|
||||
@@ -130,3 +130,10 @@ export const getChildrenTaskList = async (id: string) => {
|
||||
`/bpm/task/list-by-parent-task-id?parentTaskId=${id}`,
|
||||
);
|
||||
};
|
||||
|
||||
// 撤回任务
|
||||
export const withdrawTask = async (taskId: string) => {
|
||||
return await requestClient.put('/bpm/task/withdraw', null, {
|
||||
params: { taskId },
|
||||
});
|
||||
};
|
||||
|
||||
@@ -64,7 +64,11 @@ export namespace AuthApi {
|
||||
|
||||
/** 登录 */
|
||||
export async function loginApi(data: AuthApi.LoginParams) {
|
||||
return requestClient.post<AuthApi.LoginResult>('/system/auth/login', data);
|
||||
return requestClient.post<AuthApi.LoginResult>('/system/auth/login', data, {
|
||||
headers: {
|
||||
isEncrypt: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 刷新 accessToken */
|
||||
|
||||
@@ -108,7 +108,7 @@ export function deleteBusiness(id: number) {
|
||||
|
||||
/** 导出商机 */
|
||||
export function exportBusiness(params: any) {
|
||||
return requestClient.download('/crm/business/export-excel', params);
|
||||
return requestClient.download('/crm/business/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 联系人关联商机列表 */
|
||||
|
||||
@@ -67,7 +67,7 @@ export function deleteClue(id: number) {
|
||||
|
||||
/** 导出线索 */
|
||||
export function exportClue(params: any) {
|
||||
return requestClient.download('/crm/clue/export-excel', params);
|
||||
return requestClient.download('/crm/clue/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 线索转移 */
|
||||
|
||||
@@ -96,7 +96,7 @@ export function deleteContact(id: number) {
|
||||
|
||||
/** 导出联系人 */
|
||||
export function exportContact(params: any) {
|
||||
return requestClient.download('/crm/contact/export-excel', params);
|
||||
return requestClient.download('/crm/contact/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 获得联系人列表(精简) */
|
||||
|
||||
@@ -50,6 +50,7 @@ export namespace CrmContractApi {
|
||||
creatorName: string;
|
||||
updateTime?: Date;
|
||||
products?: ContractProduct[];
|
||||
contactName?: string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +109,7 @@ export function deleteContract(id: number) {
|
||||
|
||||
/** 导出合同 */
|
||||
export function exportContract(params: any) {
|
||||
return requestClient.download('/crm/contract/export-excel', params);
|
||||
return requestClient.download('/crm/contract/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 提交审核 */
|
||||
|
||||
@@ -16,6 +16,7 @@ export namespace CrmCustomerApi {
|
||||
ownerUserId: number; // 负责人的用户编号
|
||||
ownerUserName?: string; // 负责人的用户名称
|
||||
ownerUserDept?: string; // 负责人的部门名称
|
||||
ownerUserDeptName?: string; // 负责人的部门名称
|
||||
lockStatus?: boolean;
|
||||
dealStatus?: boolean;
|
||||
mobile: string; // 手机号
|
||||
@@ -34,7 +35,9 @@ export namespace CrmCustomerApi {
|
||||
creatorName?: string; // 创建人名称
|
||||
createTime: Date; // 创建时间
|
||||
updateTime: Date; // 更新时间
|
||||
poolDay?: number; // 距离进入公海天数
|
||||
}
|
||||
|
||||
export interface CustomerImport {
|
||||
ownerUserId: number;
|
||||
file: File;
|
||||
@@ -74,7 +77,7 @@ export function deleteCustomer(id: number) {
|
||||
|
||||
/** 导出客户 */
|
||||
export function exportCustomer(params: any) {
|
||||
return requestClient.download('/crm/customer/export-excel', params);
|
||||
return requestClient.download('/crm/customer/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 下载客户导入模板 */
|
||||
|
||||
@@ -53,5 +53,5 @@ export function deleteProduct(id: number) {
|
||||
|
||||
/** 导出产品 */
|
||||
export function exportProduct(params: any) {
|
||||
return requestClient.download('/crm/product/export-excel', params);
|
||||
return requestClient.download('/crm/product/export-excel', { params });
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ export function deleteReceivable(id: number) {
|
||||
|
||||
/** 导出回款 */
|
||||
export function exportReceivable(params: any) {
|
||||
return requestClient.download('/crm/receivable/export-excel', params);
|
||||
return requestClient.download('/crm/receivable/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 提交审核 */
|
||||
|
||||
@@ -98,7 +98,7 @@ export function deleteReceivablePlan(id: number) {
|
||||
}
|
||||
|
||||
/** 导出回款计划 Excel */
|
||||
export function exportReceivablePlan(params: PageParam) {
|
||||
export function exportReceivablePlan(params: any) {
|
||||
return requestClient.download('/crm/receivable-plan/export-excel', {
|
||||
params,
|
||||
});
|
||||
|
||||
68
apps/web-antd/src/api/erp/finance/account/index.ts
Normal file
68
apps/web-antd/src/api/erp/finance/account/index.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpAccountApi {
|
||||
/** ERP 结算账户信息 */
|
||||
export interface Account {
|
||||
id?: number; // 结算账户编号
|
||||
no: string; // 账户编码
|
||||
remark: string; // 备注
|
||||
status: number; // 开启状态
|
||||
sort: number; // 排序
|
||||
defaultStatus: boolean; // 是否默认
|
||||
name: string; // 账户名称
|
||||
}
|
||||
|
||||
/** 结算账户分页查询参数 */
|
||||
export interface AccountPageParam extends PageParam {
|
||||
name?: string;
|
||||
no?: string;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询结算账户分页 */
|
||||
export function getAccountPage(params: ErpAccountApi.AccountPageParam) {
|
||||
return requestClient.get<PageResult<ErpAccountApi.Account>>(
|
||||
'/erp/account/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询结算账户精简列表 */
|
||||
export function getAccountSimpleList() {
|
||||
return requestClient.get<ErpAccountApi.Account[]>('/erp/account/simple-list');
|
||||
}
|
||||
|
||||
/** 查询结算账户详情 */
|
||||
export function getAccount(id: number) {
|
||||
return requestClient.get<ErpAccountApi.Account>(`/erp/account/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增结算账户 */
|
||||
export function createAccount(data: ErpAccountApi.Account) {
|
||||
return requestClient.post('/erp/account/create', data);
|
||||
}
|
||||
|
||||
/** 修改结算账户 */
|
||||
export function updateAccount(data: ErpAccountApi.Account) {
|
||||
return requestClient.put('/erp/account/update', data);
|
||||
}
|
||||
|
||||
/** 修改结算账户默认状态 */
|
||||
export function updateAccountDefaultStatus(id: number, defaultStatus: boolean) {
|
||||
return requestClient.put('/erp/account/update-default-status', null, {
|
||||
params: { id, defaultStatus },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除结算账户 */
|
||||
export function deleteAccount(id: number) {
|
||||
return requestClient.delete(`/erp/account/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出结算账户 Excel */
|
||||
export function exportAccount(params: any) {
|
||||
return requestClient.download('/erp/account/export-excel', { params });
|
||||
}
|
||||
112
apps/web-antd/src/api/erp/finance/payment/index.ts
Normal file
112
apps/web-antd/src/api/erp/finance/payment/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpFinancePaymentApi {
|
||||
/** 付款单项 */
|
||||
export interface FinancePaymentItem {
|
||||
id?: number;
|
||||
row_id?: number; // 前端使用的临时ID
|
||||
bizId: number; // 业务ID
|
||||
bizType: number; // 业务类型
|
||||
bizNo: string; // 业务编号
|
||||
totalPrice: number; // 应付金额
|
||||
paidPrice: number; // 已付金额
|
||||
paymentPrice: number; // 本次付款
|
||||
remark?: string; // 备注
|
||||
}
|
||||
|
||||
/** 付款单信息 */
|
||||
export interface FinancePayment {
|
||||
id?: number; // 付款单编号
|
||||
no: string; // 付款单号
|
||||
supplierId: number; // 供应商编号
|
||||
supplierName?: string; // 供应商名称
|
||||
paymentTime: Date; // 付款时间
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
discountPrice: number; // 优惠金额
|
||||
paymentPrice: number; // 实际付款金额
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
accountId?: number; // 付款账户
|
||||
accountName?: string; // 账户名称
|
||||
financeUserId?: number; // 财务人员
|
||||
financeUserName?: string; // 财务人员姓名
|
||||
creator?: string; // 创建人
|
||||
creatorName?: string; // 创建人姓名
|
||||
items?: FinancePaymentItem[]; // 付款明细
|
||||
bizNo?: string; // 业务单号
|
||||
}
|
||||
|
||||
/** 付款单分页查询参数 */
|
||||
export interface FinancePaymentPageParams extends PageParam {
|
||||
no?: string;
|
||||
paymentTime?: [string, string];
|
||||
supplierId?: number;
|
||||
creator?: string;
|
||||
financeUserId?: number;
|
||||
accountId?: number;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
bizNo?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询付款单分页 */
|
||||
export function getFinancePaymentPage(
|
||||
params: ErpFinancePaymentApi.FinancePaymentPageParams,
|
||||
) {
|
||||
return requestClient.get<PageResult<ErpFinancePaymentApi.FinancePayment>>(
|
||||
'/erp/finance-payment/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询付款单详情 */
|
||||
export function getFinancePayment(id: number) {
|
||||
return requestClient.get<ErpFinancePaymentApi.FinancePayment>(
|
||||
`/erp/finance-payment/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增付款单 */
|
||||
export function createFinancePayment(
|
||||
data: ErpFinancePaymentApi.FinancePayment,
|
||||
) {
|
||||
return requestClient.post('/erp/finance-payment/create', data);
|
||||
}
|
||||
|
||||
/** 修改付款单 */
|
||||
export function updateFinancePayment(
|
||||
data: ErpFinancePaymentApi.FinancePayment,
|
||||
) {
|
||||
return requestClient.put('/erp/finance-payment/update', data);
|
||||
}
|
||||
|
||||
/** 更新付款单的状态 */
|
||||
export function updateFinancePaymentStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/finance-payment/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除付款单 */
|
||||
export function deleteFinancePayment(ids: number[]) {
|
||||
return requestClient.delete('/erp/finance-payment/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出付款单 Excel */
|
||||
export function exportFinancePayment(
|
||||
params: ErpFinancePaymentApi.FinancePaymentPageParams,
|
||||
) {
|
||||
return requestClient.download('/erp/finance-payment/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
112
apps/web-antd/src/api/erp/finance/receipt/index.ts
Normal file
112
apps/web-antd/src/api/erp/finance/receipt/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
namespace ErpFinanceReceiptApi {
|
||||
/** 收款单项 */
|
||||
export interface FinanceReceiptItem {
|
||||
id?: number;
|
||||
row_id?: number; // 前端使用的临时ID
|
||||
bizId: number; // 业务ID
|
||||
bizType: number; // 业务类型
|
||||
bizNo: string; // 业务编号
|
||||
totalPrice: number; // 应收金额
|
||||
receiptedPrice: number; // 已收金额
|
||||
receiptPrice: number; // 本次收款
|
||||
remark?: string; // 备注
|
||||
}
|
||||
|
||||
/** 收款单信息 */
|
||||
export interface FinanceReceipt {
|
||||
id?: number; // 收款单编号
|
||||
no: string; // 收款单号
|
||||
customerId: number; // 客户编号
|
||||
customerName?: string; // 客户名称
|
||||
receiptTime: Date; // 收款时间
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
discountPrice: number; // 优惠金额
|
||||
receiptPrice: number; // 实际收款金额
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
accountId?: number; // 收款账户
|
||||
accountName?: string; // 账户名称
|
||||
financeUserId?: number; // 财务人员
|
||||
financeUserName?: string; // 财务人员姓名
|
||||
creator?: string; // 创建人
|
||||
creatorName?: string; // 创建人姓名
|
||||
items?: FinanceReceiptItem[]; // 收款明细
|
||||
bizNo?: string; // 业务单号
|
||||
}
|
||||
|
||||
/** 收款单分页查询参数 */
|
||||
export interface FinanceReceiptPageParams extends PageParam {
|
||||
no?: string;
|
||||
receiptTime?: [string, string];
|
||||
customerId?: number;
|
||||
creator?: string;
|
||||
financeUserId?: number;
|
||||
accountId?: number;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
bizNo?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询收款单分页 */
|
||||
export function getFinanceReceiptPage(
|
||||
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
|
||||
) {
|
||||
return requestClient.get<PageResult<ErpFinanceReceiptApi.FinanceReceipt>>(
|
||||
'/erp/finance-receipt/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询收款单详情 */
|
||||
export function getFinanceReceipt(id: number) {
|
||||
return requestClient.get<ErpFinanceReceiptApi.FinanceReceipt>(
|
||||
`/erp/finance-receipt/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增收款单 */
|
||||
export function createFinanceReceipt(
|
||||
data: ErpFinanceReceiptApi.FinanceReceipt,
|
||||
) {
|
||||
return requestClient.post('/erp/finance-receipt/create', data);
|
||||
}
|
||||
|
||||
/** 修改收款单 */
|
||||
export function updateFinanceReceipt(
|
||||
data: ErpFinanceReceiptApi.FinanceReceipt,
|
||||
) {
|
||||
return requestClient.put('/erp/finance-receipt/update', data);
|
||||
}
|
||||
|
||||
/** 更新收款单的状态 */
|
||||
export function updateFinanceReceiptStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/finance-receipt/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除收款单 */
|
||||
export function deleteFinanceReceipt(ids: number[]) {
|
||||
return requestClient.delete('/erp/finance-receipt/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出收款单 Excel */
|
||||
export function exportFinanceReceipt(
|
||||
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
|
||||
) {
|
||||
return requestClient.download('/erp/finance-receipt/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
62
apps/web-antd/src/api/erp/product/category/index.ts
Normal file
62
apps/web-antd/src/api/erp/product/category/index.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpProductCategoryApi {
|
||||
/** ERP 产品分类信息 */
|
||||
export interface ProductCategory {
|
||||
id?: number; // 分类编号
|
||||
parentId?: number; // 父分类编号
|
||||
name: string; // 分类名称
|
||||
code?: string; // 分类编码
|
||||
sort?: number; // 分类排序
|
||||
status?: number; // 开启状态
|
||||
children?: ProductCategory[]; // 子分类
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品分类列表 */
|
||||
export function getProductCategoryList(params?: any) {
|
||||
return requestClient.get<ErpProductCategoryApi.ProductCategory[]>(
|
||||
'/erp/product-category/list',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品分类精简列表 */
|
||||
export function getProductCategorySimpleList() {
|
||||
return requestClient.get<ErpProductCategoryApi.ProductCategory[]>(
|
||||
'/erp/product-category/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品分类详情 */
|
||||
export function getProductCategory(id: number) {
|
||||
return requestClient.get<ErpProductCategoryApi.ProductCategory>(
|
||||
`/erp/product-category/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增产品分类 */
|
||||
export function createProductCategory(
|
||||
data: ErpProductCategoryApi.ProductCategory,
|
||||
) {
|
||||
return requestClient.post('/erp/product-category/create', data);
|
||||
}
|
||||
|
||||
/** 修改产品分类 */
|
||||
export function updateProductCategory(
|
||||
data: ErpProductCategoryApi.ProductCategory,
|
||||
) {
|
||||
return requestClient.put('/erp/product-category/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品分类 */
|
||||
export function deleteProductCategory(id: number) {
|
||||
return requestClient.delete(`/erp/product-category/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出产品分类 Excel */
|
||||
export function exportProductCategory(params: any) {
|
||||
return requestClient.download('/erp/product-category/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
61
apps/web-antd/src/api/erp/product/product/index.ts
Normal file
61
apps/web-antd/src/api/erp/product/product/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpProductApi {
|
||||
/** ERP 产品信息 */
|
||||
export interface Product {
|
||||
id?: number; // 产品编号
|
||||
name: string; // 产品名称
|
||||
barCode: string; // 产品条码
|
||||
categoryId: number; // 产品类型编号
|
||||
unitId: number; // 单位编号
|
||||
unitName?: string; // 单位名字
|
||||
status: number; // 产品状态
|
||||
standard: string; // 产品规格
|
||||
remark: string; // 产品备注
|
||||
expiryDay: number; // 保质期天数
|
||||
weight: number; // 重量(kg)
|
||||
purchasePrice: number; // 采购价格,单位:元
|
||||
salePrice: number; // 销售价格,单位:元
|
||||
minPrice: number; // 最低价格,单位:元
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品分页 */
|
||||
export function getProductPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpProductApi.Product>>(
|
||||
'/erp/product/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品精简列表 */
|
||||
export function getProductSimpleList() {
|
||||
return requestClient.get<ErpProductApi.Product[]>('/erp/product/simple-list');
|
||||
}
|
||||
|
||||
/** 查询产品详情 */
|
||||
export function getProduct(id: number) {
|
||||
return requestClient.get<ErpProductApi.Product>(`/erp/product/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增产品 */
|
||||
export function createProduct(data: ErpProductApi.Product) {
|
||||
return requestClient.post('/erp/product/create', data);
|
||||
}
|
||||
|
||||
/** 修改产品 */
|
||||
export function updateProduct(data: ErpProductApi.Product) {
|
||||
return requestClient.put('/erp/product/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品 */
|
||||
export function deleteProduct(id: number) {
|
||||
return requestClient.delete(`/erp/product/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出产品 Excel */
|
||||
export function exportProduct(params: any) {
|
||||
return requestClient.download('/erp/product/export-excel', { params });
|
||||
}
|
||||
62
apps/web-antd/src/api/erp/product/unit/index.ts
Normal file
62
apps/web-antd/src/api/erp/product/unit/index.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpProductUnitApi {
|
||||
/** ERP 产品单位信息 */
|
||||
export interface ProductUnit {
|
||||
id?: number; // 单位编号
|
||||
name: string; // 单位名字
|
||||
status: number; // 单位状态
|
||||
}
|
||||
|
||||
/** 产品单位分页查询参数 */
|
||||
export interface ProductUnitPageParam extends PageParam {
|
||||
name?: string;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品单位分页 */
|
||||
export function getProductUnitPage(
|
||||
params: ErpProductUnitApi.ProductUnitPageParam,
|
||||
) {
|
||||
return requestClient.get<PageResult<ErpProductUnitApi.ProductUnit>>(
|
||||
'/erp/product-unit/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品单位精简列表 */
|
||||
export function getProductUnitSimpleList() {
|
||||
return requestClient.get<ErpProductUnitApi.ProductUnit[]>(
|
||||
'/erp/product-unit/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品单位详情 */
|
||||
export function getProductUnit(id: number) {
|
||||
return requestClient.get<ErpProductUnitApi.ProductUnit>(
|
||||
`/erp/product-unit/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增产品单位 */
|
||||
export function createProductUnit(data: ErpProductUnitApi.ProductUnit) {
|
||||
return requestClient.post('/erp/product-unit/create', data);
|
||||
}
|
||||
|
||||
/** 修改产品单位 */
|
||||
export function updateProductUnit(data: ErpProductUnitApi.ProductUnit) {
|
||||
return requestClient.put('/erp/product-unit/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品单位 */
|
||||
export function deleteProductUnit(id: number) {
|
||||
return requestClient.delete(`/erp/product-unit/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出产品单位 Excel */
|
||||
export function exportProductUnit(params: any) {
|
||||
return requestClient.download('/erp/product-unit/export-excel', { params });
|
||||
}
|
||||
123
apps/web-antd/src/api/erp/purchase/in/index.ts
Normal file
123
apps/web-antd/src/api/erp/purchase/in/index.ts
Normal file
@@ -0,0 +1,123 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpPurchaseInApi {
|
||||
/** 采购入库信息 */
|
||||
export interface PurchaseIn {
|
||||
id?: number; // 入库工单编号
|
||||
no?: string; // 采购入库号
|
||||
supplierId?: number; // 供应商编号
|
||||
inTime?: Date; // 入库时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice?: number; // 合计金额,单位:元
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
outCount?: number; // 采购出库数量
|
||||
returnCount?: number; // 采购退货数量
|
||||
discountPercent?: number; // 折扣百分比
|
||||
discountPrice?: number; // 折扣金额
|
||||
paymentPrice?: number; // 实际支付金额
|
||||
otherPrice?: number; // 其他费用
|
||||
totalProductPrice?: number; // 合计商品金额
|
||||
taxPrice?: number; // 合计税额
|
||||
items?: PurchaseInItem[]; // 采购入库明细
|
||||
}
|
||||
export interface PurchaseInItem {
|
||||
count?: number;
|
||||
id?: number;
|
||||
orderItemId?: number;
|
||||
productBarCode?: string;
|
||||
productId?: number;
|
||||
productName: string;
|
||||
productPrice: number;
|
||||
productUnitId?: number;
|
||||
productUnitName?: string;
|
||||
totalProductPrice?: number;
|
||||
remark: string;
|
||||
stockCount?: number;
|
||||
taxPercent?: number;
|
||||
taxPrice?: number;
|
||||
totalPrice?: number;
|
||||
warehouseId?: number;
|
||||
inCount?: number;
|
||||
}
|
||||
|
||||
/** 采购入库分页查询参数 */
|
||||
export interface PurchaseInPageParams extends PageParam {
|
||||
no?: string;
|
||||
supplierId?: number;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购入库分页
|
||||
*/
|
||||
export function getPurchaseInPage(
|
||||
params: ErpPurchaseInApi.PurchaseInPageParams,
|
||||
) {
|
||||
return requestClient.get<PageResult<ErpPurchaseInApi.PurchaseIn>>(
|
||||
'/erp/purchase-in/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购入库详情
|
||||
*/
|
||||
export function getPurchaseIn(id: number) {
|
||||
return requestClient.get<ErpPurchaseInApi.PurchaseIn>(
|
||||
`/erp/purchase-in/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购入库
|
||||
*/
|
||||
export function createPurchaseIn(data: ErpPurchaseInApi.PurchaseIn) {
|
||||
return requestClient.post('/erp/purchase-in/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购入库
|
||||
*/
|
||||
export function updatePurchaseIn(data: ErpPurchaseInApi.PurchaseIn) {
|
||||
return requestClient.put('/erp/purchase-in/update', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新采购入库的状态
|
||||
*/
|
||||
export function updatePurchaseInStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/purchase-in/update-status', null, {
|
||||
params: {
|
||||
id,
|
||||
status,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购入库
|
||||
*/
|
||||
export function deletePurchaseIn(ids: number[]) {
|
||||
return requestClient.delete('/erp/purchase-in/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购入库 Excel
|
||||
*/
|
||||
export function exportPurchaseIn(
|
||||
params: ErpPurchaseInApi.PurchaseInPageParams,
|
||||
) {
|
||||
return requestClient.download('/erp/purchase-in/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
112
apps/web-antd/src/api/erp/purchase/order/index.ts
Normal file
112
apps/web-antd/src/api/erp/purchase/order/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpPurchaseOrderApi {
|
||||
/** ERP 采购订单项信息 */
|
||||
export interface PurchaseOrderItem {
|
||||
id?: number; // 订单项编号
|
||||
orderId?: number; // 采购订单编号
|
||||
productId?: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productBarCode?: string; // 产品条码
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productPrice?: number; // 产品单价,单位:元
|
||||
totalProductPrice?: number; // 产品总价,单位:元
|
||||
count?: number; // 数量
|
||||
totalPrice?: number; // 总价,单位:元
|
||||
taxPercent?: number; // 税率,百分比
|
||||
taxPrice?: number; // 税额,单位:元
|
||||
totalTaxPrice?: number; // 含税总价,单位:元
|
||||
remark?: string; // 备注
|
||||
stockCount?: number; // 库存数量(显示字段)
|
||||
}
|
||||
|
||||
/** ERP 采购订单信息 */
|
||||
export interface PurchaseOrder {
|
||||
id?: number; // 订单工单编号
|
||||
no?: string; // 采购订单号
|
||||
supplierId?: number; // 供应商编号
|
||||
supplierName?: string; // 供应商名称
|
||||
orderTime?: Date | string; // 订单时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice?: number; // 合计金额,单位:元
|
||||
totalProductPrice?: number; // 产品金额,单位:元
|
||||
discountPercent?: number; // 优惠率,百分比
|
||||
discountPrice?: number; // 优惠金额,单位:元
|
||||
depositPrice?: number; // 定金金额,单位:元
|
||||
accountId?: number; // 结算账户编号
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
fileUrl?: string; // 附件地址
|
||||
inCount?: number; // 采购入库数量
|
||||
count?: number; // 数量
|
||||
returnCount?: number; // 采购退货数量
|
||||
inStatus?: number; // 入库状态
|
||||
returnStatus?: number; // 退货状态
|
||||
productNames?: string; // 产品名称列表
|
||||
creatorName?: string; // 创建人名称
|
||||
createTime?: Date; // 创建时间
|
||||
items?: PurchaseOrderItem[]; // 订单项列表
|
||||
}
|
||||
|
||||
/** 采购订单分页查询参数 */
|
||||
export interface PurchaseOrderPageParam extends PageParam {
|
||||
no?: string;
|
||||
supplierId?: number;
|
||||
productId?: number;
|
||||
orderTime?: string[];
|
||||
status?: number;
|
||||
remark?: string;
|
||||
creator?: string;
|
||||
inStatus?: number;
|
||||
returnStatus?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询采购订单分页 */
|
||||
export function getPurchaseOrderPage(
|
||||
params: ErpPurchaseOrderApi.PurchaseOrderPageParam,
|
||||
) {
|
||||
return requestClient.get<PageResult<ErpPurchaseOrderApi.PurchaseOrder>>(
|
||||
'/erp/purchase-order/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询采购订单详情 */
|
||||
export function getPurchaseOrder(id: number) {
|
||||
return requestClient.get<ErpPurchaseOrderApi.PurchaseOrder>(
|
||||
`/erp/purchase-order/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增采购订单 */
|
||||
export function createPurchaseOrder(data: ErpPurchaseOrderApi.PurchaseOrder) {
|
||||
return requestClient.post('/erp/purchase-order/create', data);
|
||||
}
|
||||
|
||||
/** 修改采购订单 */
|
||||
export function updatePurchaseOrder(data: ErpPurchaseOrderApi.PurchaseOrder) {
|
||||
return requestClient.put('/erp/purchase-order/update', data);
|
||||
}
|
||||
|
||||
/** 更新采购订单的状态 */
|
||||
export function updatePurchaseOrderStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/purchase-order/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除采购订单 */
|
||||
export function deletePurchaseOrder(ids: number[]) {
|
||||
return requestClient.delete('/erp/purchase-order/delete', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出采购订单 Excel */
|
||||
export function exportPurchaseOrder(params: any) {
|
||||
return requestClient.download('/erp/purchase-order/export-excel', { params });
|
||||
}
|
||||
125
apps/web-antd/src/api/erp/purchase/return/index.ts
Normal file
125
apps/web-antd/src/api/erp/purchase/return/index.ts
Normal file
@@ -0,0 +1,125 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpPurchaseReturnApi {
|
||||
/** 采购退货信息 */
|
||||
export interface PurchaseReturn {
|
||||
id?: number; // 采购退货编号
|
||||
no?: string; // 采购退货号
|
||||
supplierId?: number; // 供应商编号
|
||||
returnTime?: Date; // 退货时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
discountPercent?: number; // 折扣百分比
|
||||
discountPrice?: number; // 折扣金额
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
totalTaxPrice?: number; // 合计税额
|
||||
otherPrice?: number; // 其他费用
|
||||
items?: PurchaseReturnItem[];
|
||||
}
|
||||
export interface PurchaseReturnItem {
|
||||
count?: number;
|
||||
id?: number;
|
||||
orderItemId?: number;
|
||||
productBarCode?: string;
|
||||
productId?: number;
|
||||
productName: string;
|
||||
productPrice: number;
|
||||
productUnitId?: number;
|
||||
productUnitName?: string;
|
||||
totalProductPrice?: number;
|
||||
remark: string;
|
||||
stockCount?: number;
|
||||
taxPercent?: number;
|
||||
taxPrice?: number;
|
||||
totalPrice?: number;
|
||||
warehouseId?: number;
|
||||
}
|
||||
|
||||
/** 采购退货分页查询参数 */
|
||||
export interface PurchaseReturnPageParams extends PageParam {
|
||||
no?: string;
|
||||
supplierId?: number;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
/** 采购退货状态更新参数 */
|
||||
export interface PurchaseReturnStatusParams {
|
||||
id: number;
|
||||
status: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购退货分页
|
||||
*/
|
||||
export function getPurchaseReturnPage(
|
||||
params: ErpPurchaseReturnApi.PurchaseReturnPageParams,
|
||||
) {
|
||||
return requestClient.get<PageResult<ErpPurchaseReturnApi.PurchaseReturn>>(
|
||||
'/erp/purchase-return/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购退货详情
|
||||
*/
|
||||
export function getPurchaseReturn(id: number) {
|
||||
return requestClient.get<ErpPurchaseReturnApi.PurchaseReturn>(
|
||||
`/erp/purchase-return/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购退货
|
||||
*/
|
||||
export function createPurchaseReturn(
|
||||
data: ErpPurchaseReturnApi.PurchaseReturn,
|
||||
) {
|
||||
return requestClient.post('/erp/purchase-return/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购退货
|
||||
*/
|
||||
export function updatePurchaseReturn(
|
||||
data: ErpPurchaseReturnApi.PurchaseReturn,
|
||||
) {
|
||||
return requestClient.put('/erp/purchase-return/update', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新采购退货的状态
|
||||
*/
|
||||
export function updatePurchaseReturnStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/purchase-return/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购退货
|
||||
*/
|
||||
export function deletePurchaseReturn(ids: number[]) {
|
||||
return requestClient.delete('/erp/purchase-return/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购退货 Excel
|
||||
*/
|
||||
export function exportPurchaseReturn(
|
||||
params: ErpPurchaseReturnApi.PurchaseReturnPageParams,
|
||||
) {
|
||||
return requestClient.download('/erp/purchase-return/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
73
apps/web-antd/src/api/erp/purchase/supplier/index.ts
Normal file
73
apps/web-antd/src/api/erp/purchase/supplier/index.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSupplierApi {
|
||||
/** ERP 供应商信息 */
|
||||
export interface Supplier {
|
||||
id?: number; // 供应商编号
|
||||
name: string; // 供应商名称
|
||||
contact: string; // 联系人
|
||||
mobile: string; // 手机号码
|
||||
telephone: string; // 联系电话
|
||||
email: string; // 电子邮箱
|
||||
fax: string; // 传真
|
||||
remark: string; // 备注
|
||||
status: number; // 开启状态
|
||||
sort: number; // 排序
|
||||
taxNo: string; // 纳税人识别号
|
||||
taxPercent: number; // 税率
|
||||
bankName: string; // 开户行
|
||||
bankAccount: string; // 开户账号
|
||||
bankAddress: string; // 开户地址
|
||||
}
|
||||
|
||||
/** 供应商分页查询参数 */
|
||||
export interface SupplierPageParam extends PageParam {
|
||||
name?: string;
|
||||
mobile?: string;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询供应商分页 */
|
||||
export function getSupplierPage(params: ErpSupplierApi.SupplierPageParam) {
|
||||
return requestClient.get<PageResult<ErpSupplierApi.Supplier>>(
|
||||
'/erp/supplier/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得供应商精简列表 */
|
||||
export function getSupplierSimpleList() {
|
||||
return requestClient.get<ErpSupplierApi.Supplier[]>(
|
||||
'/erp/supplier/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询供应商详情 */
|
||||
export function getSupplier(id: number) {
|
||||
return requestClient.get<ErpSupplierApi.Supplier>(
|
||||
`/erp/supplier/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增供应商 */
|
||||
export function createSupplier(data: ErpSupplierApi.Supplier) {
|
||||
return requestClient.post('/erp/supplier/create', data);
|
||||
}
|
||||
|
||||
/** 修改供应商 */
|
||||
export function updateSupplier(data: ErpSupplierApi.Supplier) {
|
||||
return requestClient.put('/erp/supplier/update', data);
|
||||
}
|
||||
|
||||
/** 删除供应商 */
|
||||
export function deleteSupplier(id: number) {
|
||||
return requestClient.delete(`/erp/supplier/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出供应商 Excel */
|
||||
export function exportSupplier(params: any) {
|
||||
return requestClient.download('/erp/supplier/export-excel', { params });
|
||||
}
|
||||
73
apps/web-antd/src/api/erp/sale/customer/index.ts
Normal file
73
apps/web-antd/src/api/erp/sale/customer/index.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpCustomerApi {
|
||||
/** ERP 客户信息 */
|
||||
export interface Customer {
|
||||
id?: number; // 客户编号
|
||||
name: string; // 客户名称
|
||||
contact: string; // 联系人
|
||||
mobile: string; // 手机号码
|
||||
telephone: string; // 联系电话
|
||||
email: string; // 电子邮箱
|
||||
fax: string; // 传真
|
||||
remark: string; // 备注
|
||||
status: number; // 开启状态
|
||||
sort: number; // 排序
|
||||
taxNo: string; // 纳税人识别号
|
||||
taxPercent: number; // 税率
|
||||
bankName: string; // 开户行
|
||||
bankAccount: string; // 开户账号
|
||||
bankAddress: string; // 开户地址
|
||||
}
|
||||
|
||||
/** 客户分页查询参数 */
|
||||
export interface CustomerPageParam extends PageParam {
|
||||
name?: string;
|
||||
mobile?: string;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询客户分页 */
|
||||
export function getCustomerPage(params: ErpCustomerApi.CustomerPageParam) {
|
||||
return requestClient.get<PageResult<ErpCustomerApi.Customer>>(
|
||||
'/erp/customer/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询客户精简列表 */
|
||||
export function getCustomerSimpleList() {
|
||||
return requestClient.get<ErpCustomerApi.Customer[]>(
|
||||
'/erp/customer/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询客户详情 */
|
||||
export function getCustomer(id: number) {
|
||||
return requestClient.get<ErpCustomerApi.Customer>(
|
||||
`/erp/customer/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增客户 */
|
||||
export function createCustomer(data: ErpCustomerApi.Customer) {
|
||||
return requestClient.post('/erp/customer/create', data);
|
||||
}
|
||||
|
||||
/** 修改客户 */
|
||||
export function updateCustomer(data: ErpCustomerApi.Customer) {
|
||||
return requestClient.put('/erp/customer/update', data);
|
||||
}
|
||||
|
||||
/** 删除客户 */
|
||||
export function deleteCustomer(id: number) {
|
||||
return requestClient.delete(`/erp/customer/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出客户 Excel */
|
||||
export function exportCustomer(params: any) {
|
||||
return requestClient.download('/erp/customer/export-excel', { params });
|
||||
}
|
||||
104
apps/web-antd/src/api/erp/sale/order/index.ts
Normal file
104
apps/web-antd/src/api/erp/sale/order/index.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSaleOrderApi {
|
||||
/** ERP 销售订单信息 */
|
||||
export interface SaleOrder {
|
||||
id?: number; // 订单工单编号
|
||||
no: string; // 销售订单号
|
||||
customerId: number; // 客户编号
|
||||
accountId?: number; // 收款账户编号
|
||||
orderTime: Date; // 订单时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
outCount: number; // 销售出库数量
|
||||
fileUrl?: string; // 附件地址
|
||||
inCount?: number; // 采购入库数量
|
||||
returnCount: number; // 销售退货数量
|
||||
totalProductPrice?: number; // 产品金额,单位:元
|
||||
discountPercent?: number; // 优惠率,百分比
|
||||
discountPrice?: number; // 优惠金额,单位:元
|
||||
depositPrice?: number; // 定金金额,单位:元
|
||||
items?: SaleOrderItem[]; // 销售订单产品明细列表
|
||||
}
|
||||
|
||||
export interface SaleOrderItem {
|
||||
id?: number; // 订单项编号
|
||||
orderId?: number; // 采购订单编号
|
||||
productId?: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productBarCode?: string; // 产品条码
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productPrice?: number; // 产品单价,单位:元
|
||||
totalProductPrice?: number; // 产品总价,单位:元
|
||||
count?: number; // 数量
|
||||
totalPrice?: number; // 总价,单位:元
|
||||
taxPercent?: number; // 税率,百分比
|
||||
taxPrice?: number; // 税额,单位:元
|
||||
totalTaxPrice?: number; // 含税总价,单位:元
|
||||
remark?: string; // 备注
|
||||
stockCount?: number; // 库存数量(显示字段)
|
||||
}
|
||||
|
||||
/** 销售订单分页查询参数 */
|
||||
export interface SaleOrderPageParam extends PageParam {
|
||||
no?: string;
|
||||
customerId?: number;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询销售订单分页 */
|
||||
export function getSaleOrderPage(params: ErpSaleOrderApi.SaleOrderPageParam) {
|
||||
return requestClient.get<PageResult<ErpSaleOrderApi.SaleOrder>>(
|
||||
'/erp/sale-order/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询销售订单详情 */
|
||||
export function getSaleOrder(id: number) {
|
||||
return requestClient.get<ErpSaleOrderApi.SaleOrder>(
|
||||
`/erp/sale-order/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询销售订单项列表 */
|
||||
export function getSaleOrderItemListByOrderId(orderId: number) {
|
||||
return requestClient.get<ErpSaleOrderApi.SaleOrderItem[]>(
|
||||
`/erp/sale-order/item/list-by-order-id?orderId=${orderId}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增销售订单 */
|
||||
export function createSaleOrder(data: ErpSaleOrderApi.SaleOrder) {
|
||||
return requestClient.post('/erp/sale-order/create', data);
|
||||
}
|
||||
|
||||
/** 修改销售订单 */
|
||||
export function updateSaleOrder(data: ErpSaleOrderApi.SaleOrder) {
|
||||
return requestClient.put('/erp/sale-order/update', data);
|
||||
}
|
||||
|
||||
/** 更新销售订单的状态 */
|
||||
export function updateSaleOrderStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/sale-order/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除销售订单 */
|
||||
export function deleteSaleOrder(ids: number[]) {
|
||||
return requestClient.delete('/erp/sale-order/delete', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出销售订单 Excel */
|
||||
export function exportSaleOrder(params: any) {
|
||||
return requestClient.download('/erp/sale-order/export-excel', { params });
|
||||
}
|
||||
101
apps/web-antd/src/api/erp/sale/out/index.ts
Normal file
101
apps/web-antd/src/api/erp/sale/out/index.ts
Normal file
@@ -0,0 +1,101 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSaleOutApi {
|
||||
/** 销售出库信息 */
|
||||
export interface SaleOut {
|
||||
id?: number; // 销售出库编号
|
||||
no?: string; // 销售出库号
|
||||
customerId?: number; // 客户编号
|
||||
saleUserId?: number; // 客户编号
|
||||
outTime?: Date; // 出库时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice?: number; // 合计金额,单位:元
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
discountPercent?: number; // 折扣百分比
|
||||
discountPrice?: number; // 折扣金额
|
||||
otherPrice?: number; // 其他费用
|
||||
totalProductPrice?: number; // 合计商品金额
|
||||
taxPrice?: number; // 合计税额
|
||||
totalTaxPrice?: number; // 合计税额
|
||||
fileUrl?: string; // 附件地址
|
||||
items?: SaleOutItem[];
|
||||
}
|
||||
|
||||
export interface SaleOutItem {
|
||||
count?: number;
|
||||
id?: number;
|
||||
orderItemId?: number;
|
||||
productBarCode?: string;
|
||||
productId?: number;
|
||||
productName: string;
|
||||
productPrice: number;
|
||||
productUnitId?: number;
|
||||
productUnitName?: string;
|
||||
totalProductPrice?: number;
|
||||
remark: string;
|
||||
stockCount?: number;
|
||||
taxPercent?: number;
|
||||
taxPrice?: number;
|
||||
totalPrice?: number;
|
||||
warehouseId?: number;
|
||||
outCount?: number;
|
||||
}
|
||||
|
||||
/** 销售出库分页查询参数 */
|
||||
export interface SaleOutPageParams extends PageParam {
|
||||
no?: string;
|
||||
customerId?: number;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询销售出库分页 */
|
||||
export function getSaleOutPage(params: ErpSaleOutApi.SaleOutPageParams) {
|
||||
return requestClient.get<PageResult<ErpSaleOutApi.SaleOut>>(
|
||||
'/erp/sale-out/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询销售出库详情 */
|
||||
export function getSaleOut(id: number) {
|
||||
return requestClient.get<ErpSaleOutApi.SaleOut>(`/erp/sale-out/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增销售出库 */
|
||||
export function createSaleOut(data: ErpSaleOutApi.SaleOut) {
|
||||
return requestClient.post('/erp/sale-out/create', data);
|
||||
}
|
||||
|
||||
/** 修改销售出库 */
|
||||
export function updateSaleOut(data: ErpSaleOutApi.SaleOut) {
|
||||
return requestClient.put('/erp/sale-out/update', data);
|
||||
}
|
||||
|
||||
/** 更新销售出库的状态 */
|
||||
export function updateSaleOutStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/sale-out/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除销售出库 */
|
||||
export function deleteSaleOut(ids: number[]) {
|
||||
return requestClient.delete('/erp/sale-out/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出销售出库 Excel */
|
||||
export function exportSaleOut(params: ErpSaleOutApi.SaleOutPageParams) {
|
||||
return requestClient.download('/erp/sale-out/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
120
apps/web-antd/src/api/erp/sale/return/index.ts
Normal file
120
apps/web-antd/src/api/erp/sale/return/index.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSaleReturnApi {
|
||||
/** 销售退货信息 */
|
||||
export interface SaleReturn {
|
||||
id?: number; // 销售退货编号
|
||||
no?: string; // 销售退货号
|
||||
customerId?: number; // 客户编号
|
||||
returnTime?: Date; // 退货时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice?: number; // 合计金额,单位:元
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
discountPercent?: number; // 折扣百分比
|
||||
discountPrice?: number; // 折扣金额
|
||||
otherPrice?: number; // 其他费用
|
||||
totalProductPrice?: number; // 合计商品金额
|
||||
taxPrice?: number; // 合计税额
|
||||
totalTaxPrice?: number; // 合计税额
|
||||
fileUrl?: string; // 附件地址
|
||||
items?: SaleReturnItem[];
|
||||
}
|
||||
|
||||
export interface SaleReturnItem {
|
||||
count?: number;
|
||||
id?: number;
|
||||
orderItemId?: number;
|
||||
productBarCode?: string;
|
||||
productId?: number;
|
||||
productName: string;
|
||||
productPrice: number;
|
||||
productUnitId?: number;
|
||||
productUnitName?: string;
|
||||
totalProductPrice?: number;
|
||||
remark: string;
|
||||
stockCount?: number;
|
||||
taxPercent?: number;
|
||||
taxPrice?: number;
|
||||
totalPrice?: number;
|
||||
warehouseId?: number;
|
||||
returnCount?: number;
|
||||
}
|
||||
|
||||
/** 销售退货分页查询参数 */
|
||||
export interface SaleReturnPageParams extends PageParam {
|
||||
no?: string;
|
||||
customerId?: number;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询销售退货分页
|
||||
*/
|
||||
export function getSaleReturnPage(
|
||||
params: ErpSaleReturnApi.SaleReturnPageParams,
|
||||
) {
|
||||
return requestClient.get<PageResult<ErpSaleReturnApi.SaleReturn>>(
|
||||
'/erp/sale-return/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询销售退货详情
|
||||
*/
|
||||
export function getSaleReturn(id: number) {
|
||||
return requestClient.get<ErpSaleReturnApi.SaleReturn>(
|
||||
`/erp/sale-return/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增销售退货
|
||||
*/
|
||||
export function createSaleReturn(data: ErpSaleReturnApi.SaleReturn) {
|
||||
return requestClient.post('/erp/sale-return/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改销售退货
|
||||
*/
|
||||
export function updateSaleReturn(data: ErpSaleReturnApi.SaleReturn) {
|
||||
return requestClient.put('/erp/sale-return/update', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新销售退货的状态
|
||||
*/
|
||||
export function updateSaleReturnStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/sale-return/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除销售退货
|
||||
*/
|
||||
export function deleteSaleReturn(ids: number[]) {
|
||||
return requestClient.delete('/erp/sale-return/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出销售退货 Excel
|
||||
*/
|
||||
export function exportSaleReturn(
|
||||
params: ErpSaleReturnApi.SaleReturnPageParams,
|
||||
) {
|
||||
return requestClient.download('/erp/sale-return/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
31
apps/web-antd/src/api/erp/statistics/purchase/index.ts
Normal file
31
apps/web-antd/src/api/erp/statistics/purchase/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpPurchaseStatisticsApi {
|
||||
/** ERP 采购全局统计 */
|
||||
export interface PurchaseSummary {
|
||||
todayPrice: number; // 今日采购金额
|
||||
yesterdayPrice: number; // 昨日采购金额
|
||||
monthPrice: number; // 本月采购金额
|
||||
yearPrice: number; // 今年采购金额
|
||||
}
|
||||
|
||||
/** ERP 采购时间段统计 */
|
||||
export interface PurchaseTimeSummary {
|
||||
time: string; // 时间
|
||||
price: number; // 采购金额
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得采购统计 */
|
||||
export function getPurchaseSummary() {
|
||||
return requestClient.get<ErpPurchaseStatisticsApi.PurchaseSummary>(
|
||||
'/erp/purchase-statistics/summary',
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得采购时间段统计 */
|
||||
export function getPurchaseTimeSummary() {
|
||||
return requestClient.get<ErpPurchaseStatisticsApi.PurchaseTimeSummary[]>(
|
||||
'/erp/purchase-statistics/time-summary',
|
||||
);
|
||||
}
|
||||
31
apps/web-antd/src/api/erp/statistics/sale/index.ts
Normal file
31
apps/web-antd/src/api/erp/statistics/sale/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSaleStatisticsApi {
|
||||
/** ERP 销售全局统计 */
|
||||
export interface SaleSummary {
|
||||
todayPrice: number; // 今日销售金额
|
||||
yesterdayPrice: number; // 昨日销售金额
|
||||
monthPrice: number; // 本月销售金额
|
||||
yearPrice: number; // 今年销售金额
|
||||
}
|
||||
|
||||
/** ERP 销售时间段统计 */
|
||||
export interface SaleTimeSummary {
|
||||
time: string; // 时间
|
||||
price: number; // 销售金额
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得销售统计 */
|
||||
export function getSaleSummary() {
|
||||
return requestClient.get<ErpSaleStatisticsApi.SaleSummary>(
|
||||
'/erp/sale-statistics/summary',
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得销售时间段统计 */
|
||||
export function getSaleTimeSummary() {
|
||||
return requestClient.get<ErpSaleStatisticsApi.SaleTimeSummary[]>(
|
||||
'/erp/sale-statistics/time-summary',
|
||||
);
|
||||
}
|
||||
110
apps/web-antd/src/api/erp/stock/check/index.ts
Normal file
110
apps/web-antd/src/api/erp/stock/check/index.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockCheckApi {
|
||||
/** 库存盘点单信息 */
|
||||
export interface StockCheck {
|
||||
id?: number; // 盘点编号
|
||||
no: string; // 盘点单号
|
||||
checkTime: Date; // 盘点时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
productNames?: string; // 产品信息
|
||||
creatorName?: string; // 创建人
|
||||
items?: StockCheckItem[]; // 盘点产品清单
|
||||
}
|
||||
|
||||
export interface StockCheckItem {
|
||||
id?: number; // 编号
|
||||
warehouseId?: number; // 仓库编号
|
||||
productId?: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productBarCode?: string; // 产品条码
|
||||
count?: number; // 盈亏数量
|
||||
actualCount?: number; // 实际库存
|
||||
productPrice?: number; // 产品单价
|
||||
totalPrice?: number; // 总价
|
||||
stockCount?: number; // 账面库存
|
||||
remark?: string; // 备注
|
||||
}
|
||||
|
||||
/** 库存盘点单分页查询参数 */
|
||||
export interface StockCheckPageParams extends PageParam {
|
||||
no?: string;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存盘点单分页
|
||||
*/
|
||||
export function getStockCheckPage(
|
||||
params: ErpStockCheckApi.StockCheckPageParams,
|
||||
) {
|
||||
return requestClient.get<PageResult<ErpStockCheckApi.StockCheck>>(
|
||||
'/erp/stock-check/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存盘点单详情
|
||||
*/
|
||||
export function getStockCheck(id: number) {
|
||||
return requestClient.get<ErpStockCheckApi.StockCheck>(
|
||||
`/erp/stock-check/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存盘点单
|
||||
*/
|
||||
export function createStockCheck(data: ErpStockCheckApi.StockCheck) {
|
||||
return requestClient.post('/erp/stock-check/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存盘点单
|
||||
*/
|
||||
export function updateStockCheck(data: ErpStockCheckApi.StockCheck) {
|
||||
return requestClient.put('/erp/stock-check/update', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新库存盘点单的状态
|
||||
*/
|
||||
export function updateStockCheckStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/stock-check/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存盘点单
|
||||
*/
|
||||
export function deleteStockCheck(ids: number[]) {
|
||||
return requestClient.delete('/erp/stock-check/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库存盘点单 Excel
|
||||
*/
|
||||
export function exportStockCheck(
|
||||
params: ErpStockCheckApi.StockCheckPageParams,
|
||||
) {
|
||||
return requestClient.download('/erp/stock-check/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
107
apps/web-antd/src/api/erp/stock/in/index.ts
Normal file
107
apps/web-antd/src/api/erp/stock/in/index.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockInApi {
|
||||
/** 其它入库单信息 */
|
||||
export interface StockIn {
|
||||
id?: number; // 入库编号
|
||||
no: string; // 入库单号
|
||||
supplierId: number; // 供应商编号
|
||||
supplierName?: string; // 供应商名称
|
||||
inTime: Date; // 入库时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
productNames?: string; // 产品信息
|
||||
creatorName?: string; // 创建人
|
||||
items?: StockInItem[]; // 入库产品清单
|
||||
}
|
||||
|
||||
/** 其它入库单产品信息 */
|
||||
export interface StockInItem {
|
||||
id?: number; // 编号
|
||||
warehouseId: number; // 仓库编号
|
||||
productId: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productBarCode?: string; // 产品条码
|
||||
count: number; // 数量
|
||||
productPrice: number; // 产品单价
|
||||
totalPrice: number; // 总价
|
||||
stockCount?: number; // 库存数量
|
||||
remark?: string; // 备注
|
||||
}
|
||||
|
||||
/** 其它入库单分页查询参数 */
|
||||
export interface StockInPageParams extends PageParam {
|
||||
no?: string;
|
||||
supplierId?: number;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询其它入库单分页
|
||||
*/
|
||||
export function getStockInPage(params: ErpStockInApi.StockInPageParams) {
|
||||
return requestClient.get<PageResult<ErpStockInApi.StockIn>>(
|
||||
'/erp/stock-in/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询其它入库单详情
|
||||
*/
|
||||
export function getStockIn(id: number) {
|
||||
return requestClient.get<ErpStockInApi.StockIn>(`/erp/stock-in/get?id=${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增其它入库单
|
||||
*/
|
||||
export function createStockIn(data: ErpStockInApi.StockIn) {
|
||||
return requestClient.post('/erp/stock-in/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改其它入库单
|
||||
*/
|
||||
export function updateStockIn(data: ErpStockInApi.StockIn) {
|
||||
return requestClient.put('/erp/stock-in/update', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新其它入库单的状态
|
||||
*/
|
||||
export function updateStockInStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/stock-in/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除其它入库单
|
||||
*/
|
||||
export function deleteStockIn(ids: number[]) {
|
||||
return requestClient.delete('/erp/stock-in/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出其它入库单 Excel
|
||||
*/
|
||||
export function exportStockIn(params: ErpStockInApi.StockInPageParams) {
|
||||
return requestClient.download('/erp/stock-in/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
107
apps/web-antd/src/api/erp/stock/move/index.ts
Normal file
107
apps/web-antd/src/api/erp/stock/move/index.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockMoveApi {
|
||||
/** 库存调拨单信息 */
|
||||
export interface StockMove {
|
||||
id?: number; // 调拨编号
|
||||
no: string; // 调拨单号
|
||||
outTime: Date; // 调拨时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
fromWarehouseId?: number; // 来源仓库编号
|
||||
createTime: Date; // 创建时间
|
||||
creator: string; // 创建人
|
||||
creatorName: string; // 创建人名称
|
||||
productNames: string; // 产品名称
|
||||
items?: StockMoveItem[]; // 子表信息
|
||||
}
|
||||
|
||||
/** 库存调拨单子表信息 */
|
||||
export interface StockMoveItem {
|
||||
count: number; // 数量
|
||||
fromWarehouseId?: number; // 来源仓库ID
|
||||
id?: number; // ID
|
||||
productBarCode: string; // 产品条形码
|
||||
productId?: number; // 产品ID
|
||||
productName?: string; // 产品名称
|
||||
productPrice: number; // 产品单价
|
||||
productUnitName?: string; // 产品单位
|
||||
remark?: string; // 备注
|
||||
stockCount: number; // 库存数量
|
||||
toWarehouseId?: number; // 目标仓库ID
|
||||
totalPrice?: number; // 总价
|
||||
}
|
||||
|
||||
/** 库存调拨单分页查询参数 */
|
||||
export interface StockMovePageParams extends PageParam {
|
||||
no?: string;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存调拨单分页
|
||||
*/
|
||||
export function getStockMovePage(params: ErpStockMoveApi.StockMovePageParams) {
|
||||
return requestClient.get<PageResult<ErpStockMoveApi.StockMove>>(
|
||||
'/erp/stock-move/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存调拨单详情
|
||||
*/
|
||||
export function getStockMove(id: number) {
|
||||
return requestClient.get<ErpStockMoveApi.StockMove>(
|
||||
`/erp/stock-move/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存调拨单
|
||||
*/
|
||||
export function createStockMove(data: ErpStockMoveApi.StockMove) {
|
||||
return requestClient.post('/erp/stock-move/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存调拨单
|
||||
*/
|
||||
export function updateStockMove(data: ErpStockMoveApi.StockMove) {
|
||||
return requestClient.put('/erp/stock-move/update', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新库存调拨单的状态
|
||||
*/
|
||||
export function updateStockMoveStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/stock-move/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存调拨单
|
||||
*/
|
||||
export function deleteStockMove(ids: number[]) {
|
||||
return requestClient.delete('/erp/stock-move/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库存调拨单 Excel
|
||||
*/
|
||||
export function exportStockMove(params: ErpStockMoveApi.StockMovePageParams) {
|
||||
return requestClient.download('/erp/stock-move/export-excel', { params });
|
||||
}
|
||||
106
apps/web-antd/src/api/erp/stock/out/index.ts
Normal file
106
apps/web-antd/src/api/erp/stock/out/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockOutApi {
|
||||
/** 其它出库单信息 */
|
||||
export interface StockOut {
|
||||
id?: number; // 出库编号
|
||||
no: string; // 出库单号
|
||||
customerId: number; // 客户编号
|
||||
outTime: Date; // 出库时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
items?: StockOutItem[]; // 出库产品清单
|
||||
}
|
||||
|
||||
/** 其它出库单产品信息 */
|
||||
export interface StockOutItem {
|
||||
id?: number; // 编号
|
||||
warehouseId?: number; // 仓库编号
|
||||
productId?: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productBarCode?: string; // 产品条码
|
||||
count: number; // 数量
|
||||
productPrice: number; // 产品单价
|
||||
totalPrice: number; // 总价
|
||||
stockCount?: number; // 库存数量
|
||||
remark?: string; // 备注
|
||||
}
|
||||
|
||||
/** 其它出库单分页查询参数 */
|
||||
export interface StockOutPageParams extends PageParam {
|
||||
no?: string;
|
||||
customerId?: number;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询其它出库单分页
|
||||
*/
|
||||
export function getStockOutPage(params: ErpStockOutApi.StockOutPageParams) {
|
||||
return requestClient.get<PageResult<ErpStockOutApi.StockOut>>(
|
||||
'/erp/stock-out/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询其它出库单详情
|
||||
*/
|
||||
export function getStockOut(id: number) {
|
||||
return requestClient.get<ErpStockOutApi.StockOut>(
|
||||
`/erp/stock-out/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增其它出库单
|
||||
*/
|
||||
export function createStockOut(data: ErpStockOutApi.StockOut) {
|
||||
return requestClient.post('/erp/stock-out/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改其它出库单
|
||||
*/
|
||||
export function updateStockOut(data: ErpStockOutApi.StockOut) {
|
||||
return requestClient.put('/erp/stock-out/update', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新其它出库单的状态
|
||||
*/
|
||||
export function updateStockOutStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/stock-out/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除其它出库单
|
||||
*/
|
||||
export function deleteStockOut(ids: number[]) {
|
||||
return requestClient.delete('/erp/stock-out/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出其它出库单 Excel
|
||||
*/
|
||||
export function exportStockOut(params: ErpStockOutApi.StockOutPageParams) {
|
||||
return requestClient.download('/erp/stock-out/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
47
apps/web-antd/src/api/erp/stock/record/index.ts
Normal file
47
apps/web-antd/src/api/erp/stock/record/index.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockRecordApi {
|
||||
/** ERP 产品库存明细 */
|
||||
export interface StockRecord {
|
||||
id?: number; // 编号
|
||||
productId: number; // 产品编号
|
||||
warehouseId: number; // 仓库编号
|
||||
count: number; // 出入库数量
|
||||
totalCount: number; // 总库存量
|
||||
bizType: number; // 业务类型
|
||||
bizId: number; // 业务编号
|
||||
bizItemId: number; // 业务项编号
|
||||
bizNo: string; // 业务单号
|
||||
}
|
||||
|
||||
/** 库存记录分页查询参数 */
|
||||
export interface StockRecordPageParam extends PageParam {
|
||||
productId?: number;
|
||||
warehouseId?: number;
|
||||
bizType?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品库存明细分页 */
|
||||
export function getStockRecordPage(
|
||||
params: ErpStockRecordApi.StockRecordPageParam,
|
||||
) {
|
||||
return requestClient.get<PageResult<ErpStockRecordApi.StockRecord>>(
|
||||
'/erp/stock-record/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品库存明细详情 */
|
||||
export function getStockRecord(id: number) {
|
||||
return requestClient.get<ErpStockRecordApi.StockRecord>(
|
||||
`/erp/stock-record/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 导出产品库存明细 Excel */
|
||||
export function exportStockRecord(params: any) {
|
||||
return requestClient.download('/erp/stock-record/export-excel', { params });
|
||||
}
|
||||
83
apps/web-antd/src/api/erp/stock/stock/index.ts
Normal file
83
apps/web-antd/src/api/erp/stock/stock/index.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockApi {
|
||||
/** 产品库存信息 */
|
||||
export interface Stock {
|
||||
id?: number; // 编号
|
||||
productId: number; // 产品编号
|
||||
warehouseId: number; // 仓库编号
|
||||
count: number; // 库存数量
|
||||
}
|
||||
|
||||
/** 产品库存分页查询参数 */
|
||||
export interface StockPageParams extends PageParam {
|
||||
productId?: number;
|
||||
warehouseId?: number;
|
||||
}
|
||||
|
||||
/** 产品库存查询参数 */
|
||||
export interface StockQueryParams {
|
||||
productId: number;
|
||||
warehouseId: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品库存分页
|
||||
*/
|
||||
export function getStockPage(params: ErpStockApi.StockPageParams) {
|
||||
return requestClient.get<PageResult<ErpStockApi.Stock>>('/erp/stock/page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品库存详情
|
||||
*/
|
||||
export function getStock(id: number) {
|
||||
return requestClient.get<ErpStockApi.Stock>(`/erp/stock/get?id=${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据产品和仓库查询库存详情
|
||||
*/
|
||||
export function getStockByProductAndWarehouse(
|
||||
params: ErpStockApi.StockQueryParams,
|
||||
) {
|
||||
return requestClient.get<ErpStockApi.Stock>('/erp/stock/get', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得产品库存数量
|
||||
*/
|
||||
export function getStockCount(productId: number, warehouseId?: number) {
|
||||
const params: any = { productId };
|
||||
if (warehouseId !== undefined) {
|
||||
params.warehouseId = warehouseId;
|
||||
}
|
||||
return requestClient.get<number>('/erp/stock/get-count', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产品库存 Excel
|
||||
*/
|
||||
export function exportStock(params: ErpStockApi.StockPageParams) {
|
||||
return requestClient.download('/erp/stock/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存数量
|
||||
*/
|
||||
export function getWarehouseStockCount(params: ErpStockApi.StockQueryParams) {
|
||||
return requestClient.get<number>('/erp/stock/get-count', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
77
apps/web-antd/src/api/erp/stock/warehouse/index.ts
Normal file
77
apps/web-antd/src/api/erp/stock/warehouse/index.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpWarehouseApi {
|
||||
/** ERP 仓库信息 */
|
||||
export interface Warehouse {
|
||||
id?: number; // 仓库编号
|
||||
name: string; // 仓库名称
|
||||
address: string; // 仓库地址
|
||||
sort: number; // 排序
|
||||
remark: string; // 备注
|
||||
principal: string; // 负责人
|
||||
warehousePrice: number; // 仓储费,单位:元
|
||||
truckagePrice: number; // 搬运费,单位:元
|
||||
status: number; // 开启状态
|
||||
defaultStatus: boolean; // 是否默认
|
||||
}
|
||||
|
||||
/** 仓库分页查询参数 */
|
||||
export interface WarehousePageParam extends PageParam {
|
||||
name?: string;
|
||||
status?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询仓库分页 */
|
||||
export function getWarehousePage(params: ErpWarehouseApi.WarehousePageParam) {
|
||||
return requestClient.get<PageResult<ErpWarehouseApi.Warehouse>>(
|
||||
'/erp/warehouse/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询仓库精简列表 */
|
||||
export function getWarehouseSimpleList() {
|
||||
return requestClient.get<ErpWarehouseApi.Warehouse[]>(
|
||||
'/erp/warehouse/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询仓库详情 */
|
||||
export function getWarehouse(id: number) {
|
||||
return requestClient.get<ErpWarehouseApi.Warehouse>(
|
||||
`/erp/warehouse/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增仓库 */
|
||||
export function createWarehouse(data: ErpWarehouseApi.Warehouse) {
|
||||
return requestClient.post('/erp/warehouse/create', data);
|
||||
}
|
||||
|
||||
/** 修改仓库 */
|
||||
export function updateWarehouse(data: ErpWarehouseApi.Warehouse) {
|
||||
return requestClient.put('/erp/warehouse/update', data);
|
||||
}
|
||||
|
||||
/** 修改仓库默认状态 */
|
||||
export function updateWarehouseDefaultStatus(
|
||||
id: number,
|
||||
defaultStatus: boolean,
|
||||
) {
|
||||
return requestClient.put('/erp/warehouse/update-default-status', null, {
|
||||
params: { id, defaultStatus },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除仓库 */
|
||||
export function deleteWarehouse(id: number) {
|
||||
return requestClient.delete(`/erp/warehouse/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出仓库 Excel */
|
||||
export function exportWarehouse(params: any) {
|
||||
return requestClient.download('/erp/warehouse/export-excel', { params });
|
||||
}
|
||||
@@ -65,13 +65,13 @@ export namespace InfraCodegenApi {
|
||||
}
|
||||
|
||||
/** 更新代码生成请求 */
|
||||
export interface CodegenUpdateReq {
|
||||
export interface CodegenUpdateReqVO {
|
||||
table: any | CodegenTable;
|
||||
columns: CodegenColumn[];
|
||||
}
|
||||
|
||||
/** 创建代码生成请求 */
|
||||
export interface CodegenCreateListReq {
|
||||
export interface CodegenCreateListReqVO {
|
||||
dataSourceConfigId?: number;
|
||||
tableNames: string[];
|
||||
}
|
||||
@@ -106,25 +106,36 @@ export function getCodegenTable(tableId: number) {
|
||||
}
|
||||
|
||||
/** 修改代码生成表定义 */
|
||||
export function updateCodegenTable(data: InfraCodegenApi.CodegenUpdateReq) {
|
||||
export function updateCodegenTable(data: InfraCodegenApi.CodegenUpdateReqVO) {
|
||||
return requestClient.put('/infra/codegen/update', data);
|
||||
}
|
||||
|
||||
/** 基于数据库的表结构,同步数据库的表和字段定义 */
|
||||
export function syncCodegenFromDB(tableId: number) {
|
||||
return requestClient.put(`/infra/codegen/sync-from-db?tableId=${tableId}`);
|
||||
return requestClient.put(
|
||||
'/infra/codegen/sync-from-db',
|
||||
{},
|
||||
{
|
||||
params: { tableId },
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 预览生成代码 */
|
||||
export function previewCodegen(tableId: number) {
|
||||
return requestClient.get<InfraCodegenApi.CodegenPreview[]>(
|
||||
`/infra/codegen/preview?tableId=${tableId}`,
|
||||
'/infra/codegen/preview',
|
||||
{
|
||||
params: { tableId },
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 下载生成代码 */
|
||||
export function downloadCodegen(tableId: number) {
|
||||
return requestClient.download(`/infra/codegen/download?tableId=${tableId}`);
|
||||
return requestClient.download('/infra/codegen/download', {
|
||||
params: { tableId },
|
||||
});
|
||||
}
|
||||
|
||||
/** 获得表定义 */
|
||||
@@ -136,7 +147,9 @@ export function getSchemaTableList(params: any) {
|
||||
}
|
||||
|
||||
/** 基于数据库的表结构,创建代码生成器的表定义 */
|
||||
export function createCodegenList(data: InfraCodegenApi.CodegenCreateListReq) {
|
||||
export function createCodegenList(
|
||||
data: InfraCodegenApi.CodegenCreateListReqVO,
|
||||
) {
|
||||
return requestClient.post('/infra/codegen/create-list', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,3 +44,10 @@ export function updateDataSourceConfig(
|
||||
export function deleteDataSourceConfig(id: number) {
|
||||
return requestClient.delete(`/infra/data-source-config/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除数据源配置 */
|
||||
export function deleteDataSourceConfigList(ids: number[]) {
|
||||
return requestClient.delete(
|
||||
`/infra/data-source-config/delete-list?ids=${ids.join(',')}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -55,5 +55,7 @@ export function deleteDemo01ContactList(ids: number[]) {
|
||||
|
||||
/** 导出示例联系人 */
|
||||
export function exportDemo01Contact(params: any) {
|
||||
return requestClient.download('/infra/demo01-contact/export-excel', params);
|
||||
return requestClient.download('/infra/demo01-contact/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -42,5 +42,7 @@ export function deleteDemo02Category(id: number) {
|
||||
|
||||
/** 导出示例分类 */
|
||||
export function exportDemo02Category(params: any) {
|
||||
return requestClient.download('/infra/demo02-category/export-excel', params);
|
||||
return requestClient.download('/infra/demo02-category/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -70,10 +70,9 @@ export function deleteDemo03StudentList(ids: number[]) {
|
||||
|
||||
/** 导出学生 */
|
||||
export function exportDemo03Student(params: any) {
|
||||
return requestClient.download(
|
||||
'/infra/demo03-student-erp/export-excel',
|
||||
return requestClient.download('/infra/demo03-student-erp/export-excel', {
|
||||
params,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== 子表(学生课程) ====================
|
||||
|
||||
@@ -72,10 +72,9 @@ export function deleteDemo03StudentList(ids: number[]) {
|
||||
|
||||
/** 导出学生 */
|
||||
export function exportDemo03Student(params: any) {
|
||||
return requestClient.download(
|
||||
'/infra/demo03-student-inner/export-excel',
|
||||
return requestClient.download('/infra/demo03-student-inner/export-excel', {
|
||||
params,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== 子表(学生课程) ====================
|
||||
|
||||
@@ -72,10 +72,9 @@ export function deleteDemo03StudentList(ids: number[]) {
|
||||
|
||||
/** 导出学生 */
|
||||
export function exportDemo03Student(params: any) {
|
||||
return requestClient.download(
|
||||
'/infra/demo03-student-normal/export-excel',
|
||||
return requestClient.download('/infra/demo03-student-normal/export-excel', {
|
||||
params,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== 子表(学生课程) ====================
|
||||
|
||||
@@ -16,6 +16,7 @@ export namespace InfraFileConfigApi {
|
||||
accessKey?: string;
|
||||
accessSecret?: string;
|
||||
pathStyle?: boolean;
|
||||
enablePublicAccess?: boolean;
|
||||
domain: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export namespace InfraFileApi {
|
||||
}
|
||||
|
||||
/** 文件预签名地址 */
|
||||
export interface FilePresignedUrlResp {
|
||||
export interface FilePresignedUrlRespVO {
|
||||
configId: number; // 文件配置编号
|
||||
uploadUrl: string; // 文件上传 URL
|
||||
url: string; // 文件 URL
|
||||
@@ -27,7 +27,7 @@ export namespace InfraFileApi {
|
||||
}
|
||||
|
||||
/** 上传文件 */
|
||||
export interface FileUploadReq {
|
||||
export interface FileUploadReqVO {
|
||||
file: globalThis.File;
|
||||
directory?: string;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ export function deleteFileList(ids: number[]) {
|
||||
|
||||
/** 获取文件预签名地址 */
|
||||
export function getFilePresignedUrl(name: string, directory?: string) {
|
||||
return requestClient.get<InfraFileApi.FilePresignedUrlResp>(
|
||||
return requestClient.get<InfraFileApi.FilePresignedUrlRespVO>(
|
||||
'/infra/file/presigned-url',
|
||||
{
|
||||
params: { name, directory },
|
||||
@@ -67,7 +67,7 @@ export function createFile(data: InfraFileApi.File) {
|
||||
|
||||
/** 上传文件 */
|
||||
export function uploadFile(
|
||||
data: InfraFileApi.FileUploadReq,
|
||||
data: InfraFileApi.FileUploadReqVO,
|
||||
onUploadProgress?: AxiosProgressEvent,
|
||||
) {
|
||||
// 特殊:由于 upload 内部封装,即使 directory 为 undefined,也会传递给后端
|
||||
|
||||
@@ -58,11 +58,12 @@ export function exportJob(params: any) {
|
||||
|
||||
/** 任务状态修改 */
|
||||
export function updateJobStatus(id: number, status: number) {
|
||||
const params = {
|
||||
id,
|
||||
status,
|
||||
};
|
||||
return requestClient.put('/infra/job/update-status', {}, { params });
|
||||
return requestClient.put('/infra/job/update-status', undefined, {
|
||||
params: {
|
||||
id,
|
||||
status,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 定时任务立即执行一次 */
|
||||
|
||||
94
apps/web-antd/src/api/iot/alert/config/index.ts
Normal file
94
apps/web-antd/src/api/iot/alert/config/index.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace AlertConfigApi {
|
||||
/** IoT 告警配置 VO */
|
||||
export interface AlertConfig {
|
||||
id?: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
level?: number;
|
||||
status?: number;
|
||||
sceneRuleIds?: number[];
|
||||
receiveUserIds?: number[];
|
||||
receiveUserNames?: string;
|
||||
receiveTypes?: number[];
|
||||
createTime?: Date;
|
||||
updateTime?: Date;
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT 告警配置 */
|
||||
export interface AlertConfig {
|
||||
id?: number;
|
||||
name?: string;
|
||||
description?: string;
|
||||
level?: number;
|
||||
status?: number;
|
||||
sceneRuleIds?: number[];
|
||||
receiveUserIds?: number[];
|
||||
receiveUserNames?: string;
|
||||
receiveTypes?: number[];
|
||||
createTime?: Date;
|
||||
updateTime?: Date;
|
||||
}
|
||||
|
||||
/** 查询告警配置分页 */
|
||||
export function getAlertConfigPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<AlertConfigApi.AlertConfig>>(
|
||||
'/iot/alert-config/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询告警配置详情 */
|
||||
export function getAlertConfig(id: number) {
|
||||
return requestClient.get<AlertConfigApi.AlertConfig>(
|
||||
`/iot/alert-config/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询所有告警配置列表 */
|
||||
export function getAlertConfigList() {
|
||||
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
||||
'/iot/alert-config/list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增告警配置 */
|
||||
export function createAlertConfig(data: AlertConfig) {
|
||||
return requestClient.post('/iot/alert-config/create', data);
|
||||
}
|
||||
|
||||
/** 修改告警配置 */
|
||||
export function updateAlertConfig(data: AlertConfig) {
|
||||
return requestClient.put('/iot/alert-config/update', data);
|
||||
}
|
||||
|
||||
/** 删除告警配置 */
|
||||
export function deleteAlertConfig(id: number) {
|
||||
return requestClient.delete(`/iot/alert-config/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除告警配置 */
|
||||
export function deleteAlertConfigList(ids: number[]) {
|
||||
return requestClient.delete('/iot/alert-config/delete-list', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 启用/禁用告警配置 */
|
||||
export function toggleAlertConfig(id: number, enabled: boolean) {
|
||||
return requestClient.put(`/iot/alert-config/toggle`, {
|
||||
id,
|
||||
enabled,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取告警配置简单列表 */
|
||||
export function getSimpleAlertConfigList() {
|
||||
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
||||
'/iot/alert-config/simple-list',
|
||||
);
|
||||
}
|
||||
82
apps/web-antd/src/api/iot/alert/record/index.ts
Normal file
82
apps/web-antd/src/api/iot/alert/record/index.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace AlertRecordApi {
|
||||
/** IoT 告警记录 VO */
|
||||
export interface AlertRecord {
|
||||
id?: number;
|
||||
configId?: number;
|
||||
configName?: string;
|
||||
configLevel?: number;
|
||||
deviceId?: number;
|
||||
deviceName?: string;
|
||||
productId?: number;
|
||||
productName?: string;
|
||||
deviceMessage?: string;
|
||||
processStatus?: boolean;
|
||||
processRemark?: string;
|
||||
processTime?: Date;
|
||||
createTime?: Date;
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT 告警记录 */
|
||||
export interface AlertRecord {
|
||||
id?: number;
|
||||
configId?: number;
|
||||
configName?: string;
|
||||
configLevel?: number;
|
||||
deviceId?: number;
|
||||
deviceName?: string;
|
||||
productId?: number;
|
||||
productName?: string;
|
||||
deviceMessage?: string;
|
||||
processStatus?: boolean;
|
||||
processRemark?: string;
|
||||
processTime?: Date;
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** 查询告警记录分页 */
|
||||
export function getAlertRecordPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<AlertRecordApi.AlertRecord>>(
|
||||
'/iot/alert-record/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询告警记录详情 */
|
||||
export function getAlertRecord(id: number) {
|
||||
return requestClient.get<AlertRecordApi.AlertRecord>(
|
||||
`/iot/alert-record/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 处理告警记录 */
|
||||
export function processAlertRecord(id: number, remark?: string) {
|
||||
return requestClient.put('/iot/alert-record/process', {
|
||||
id,
|
||||
remark,
|
||||
});
|
||||
}
|
||||
|
||||
/** 批量处理告警记录 */
|
||||
export function batchProcessAlertRecord(ids: number[], remark?: string) {
|
||||
return requestClient.put('/iot/alert-record/batch-process', {
|
||||
ids,
|
||||
remark,
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除告警记录 */
|
||||
export function deleteAlertRecord(id: number) {
|
||||
return requestClient.delete(`/iot/alert-record/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除告警记录 */
|
||||
export function deleteAlertRecordList(ids: number[]) {
|
||||
return requestClient.delete('/iot/alert-record/delete-list', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
196
apps/web-antd/src/api/iot/device/device/index.ts
Normal file
196
apps/web-antd/src/api/iot/device/device/index.ts
Normal file
@@ -0,0 +1,196 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace IotDeviceApi {
|
||||
/** IoT 设备 VO */
|
||||
export interface Device {
|
||||
id?: number; // 设备 ID,主键,自增
|
||||
deviceName: string; // 设备名称
|
||||
productId: number; // 产品编号
|
||||
productKey?: string; // 产品标识
|
||||
deviceType?: number; // 设备类型
|
||||
nickname?: string; // 设备备注名称
|
||||
gatewayId?: number; // 网关设备 ID
|
||||
state?: number; // 设备状态
|
||||
status?: number; // 设备状态(兼容字段)
|
||||
onlineTime?: Date; // 最后上线时间
|
||||
offlineTime?: Date; // 最后离线时间
|
||||
activeTime?: Date; // 设备激活时间
|
||||
createTime?: Date; // 创建时间
|
||||
ip?: string; // 设备的 IP 地址
|
||||
firmwareVersion?: string; // 设备的固件版本
|
||||
deviceSecret?: string; // 设备密钥,用于设备认证,需安全存储
|
||||
mqttClientId?: string; // MQTT 客户端 ID
|
||||
mqttUsername?: string; // MQTT 用户名
|
||||
mqttPassword?: string; // MQTT 密码
|
||||
authType?: string; // 认证类型
|
||||
locationType?: number; // 定位类型
|
||||
latitude?: number; // 设备位置的纬度
|
||||
longitude?: number; // 设备位置的经度
|
||||
areaId?: number; // 地区编码
|
||||
address?: string; // 设备详细地址
|
||||
serialNumber?: string; // 设备序列号
|
||||
config?: string; // 设备配置
|
||||
groupIds?: number[]; // 添加分组 ID
|
||||
picUrl?: string; // 设备图片
|
||||
location?: string; // 位置信息(格式:经度,纬度)
|
||||
}
|
||||
|
||||
/** IoT 设备属性详细 VO */
|
||||
export interface DevicePropertyDetail {
|
||||
identifier: string; // 属性标识符
|
||||
value: string; // 最新值
|
||||
updateTime: Date; // 更新时间
|
||||
name: string; // 属性名称
|
||||
dataType: string; // 数据类型
|
||||
dataSpecs: any; // 数据定义
|
||||
dataSpecsList: any[]; // 数据定义列表
|
||||
}
|
||||
|
||||
/** IoT 设备属性 VO */
|
||||
export interface DeviceProperty {
|
||||
identifier: string; // 属性标识符
|
||||
value: string; // 最新值
|
||||
updateTime: Date; // 更新时间
|
||||
}
|
||||
|
||||
/** 设备认证参数 VO */
|
||||
export interface DeviceAuthInfo {
|
||||
clientId: string; // 客户端 ID
|
||||
username: string; // 用户名
|
||||
password: string; // 密码
|
||||
}
|
||||
|
||||
/** IoT 设备发送消息 Request VO */
|
||||
export interface DeviceMessageSendReq {
|
||||
deviceId: number; // 设备编号
|
||||
method: string; // 请求方法
|
||||
params?: any; // 请求参数
|
||||
}
|
||||
|
||||
/** 设备分组更新请求 */
|
||||
export interface DeviceGroupUpdateReq {
|
||||
ids: number[]; // 设备 ID 列表
|
||||
groupIds: number[]; // 分组 ID 列表
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT 设备状态枚举 */
|
||||
export enum DeviceStateEnum {
|
||||
INACTIVE = 0, // 未激活
|
||||
OFFLINE = 2, // 离线
|
||||
ONLINE = 1, // 在线
|
||||
}
|
||||
|
||||
/** 查询设备分页 */
|
||||
export function getDevicePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<IotDeviceApi.Device>>(
|
||||
'/iot/device/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询设备详情 */
|
||||
export function getDevice(id: number) {
|
||||
return requestClient.get<IotDeviceApi.Device>(`/iot/device/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增设备 */
|
||||
export function createDevice(data: IotDeviceApi.Device) {
|
||||
return requestClient.post('/iot/device/create', data);
|
||||
}
|
||||
|
||||
/** 修改设备 */
|
||||
export function updateDevice(data: IotDeviceApi.Device) {
|
||||
return requestClient.put('/iot/device/update', data);
|
||||
}
|
||||
|
||||
/** 修改设备分组 */
|
||||
export function updateDeviceGroup(data: IotDeviceApi.DeviceGroupUpdateReq) {
|
||||
return requestClient.put('/iot/device/update-group', data);
|
||||
}
|
||||
|
||||
/** 删除单个设备 */
|
||||
export function deleteDevice(id: number) {
|
||||
return requestClient.delete(`/iot/device/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 删除多个设备 */
|
||||
export function deleteDeviceList(ids: number[]) {
|
||||
return requestClient.delete('/iot/device/delete-list', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出设备 */
|
||||
export function exportDeviceExcel(params: any) {
|
||||
return requestClient.download('/iot/device/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 获取设备数量 */
|
||||
export function getDeviceCount(productId: number) {
|
||||
return requestClient.get<number>(`/iot/device/count?productId=${productId}`);
|
||||
}
|
||||
|
||||
/** 获取设备的精简信息列表 */
|
||||
export function getSimpleDeviceList(deviceType?: number, productId?: number) {
|
||||
return requestClient.get<IotDeviceApi.Device[]>('/iot/device/simple-list', {
|
||||
params: { deviceType, productId },
|
||||
});
|
||||
}
|
||||
|
||||
/** 根据产品编号,获取设备的精简信息列表 */
|
||||
export function getDeviceListByProductId(productId: number) {
|
||||
return requestClient.get<IotDeviceApi.Device[]>('/iot/device/simple-list', {
|
||||
params: { productId },
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取导入模板 */
|
||||
export function importDeviceTemplate() {
|
||||
return requestClient.download('/iot/device/get-import-template');
|
||||
}
|
||||
|
||||
/** 获取设备属性最新数据 */
|
||||
export function getLatestDeviceProperties(params: any) {
|
||||
return requestClient.get<IotDeviceApi.DevicePropertyDetail[]>(
|
||||
'/iot/device/property/get-latest',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取设备属性历史数据 */
|
||||
export function getHistoryDevicePropertyList(params: any) {
|
||||
return requestClient.get<PageResult<IotDeviceApi.DeviceProperty>>(
|
||||
'/iot/device/property/history-list',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取设备认证信息 */
|
||||
export function getDeviceAuthInfo(id: number) {
|
||||
return requestClient.get<IotDeviceApi.DeviceAuthInfo>(
|
||||
'/iot/device/get-auth-info',
|
||||
{ params: { id } },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询设备消息分页 */
|
||||
export function getDeviceMessagePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<any>>('/iot/device/message/page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询设备消息配对分页 */
|
||||
export function getDeviceMessagePairPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<any>>('/iot/device/message/pair-page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 发送设备消息 */
|
||||
export function sendDeviceMessage(params: IotDeviceApi.DeviceMessageSendReq) {
|
||||
return requestClient.post('/iot/device/message/send', params);
|
||||
}
|
||||
51
apps/web-antd/src/api/iot/device/group/index.ts
Normal file
51
apps/web-antd/src/api/iot/device/group/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace IotDeviceGroupApi {
|
||||
/** IoT 设备分组 VO */
|
||||
export interface DeviceGroup {
|
||||
id?: number; // 分组 ID
|
||||
name: string; // 分组名字
|
||||
status?: number; // 分组状态
|
||||
description?: string; // 分组描述
|
||||
deviceCount?: number; // 设备数量
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询设备分组分页 */
|
||||
export function getDeviceGroupPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<IotDeviceGroupApi.DeviceGroup>>(
|
||||
'/iot/device-group/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询设备分组详情 */
|
||||
export function getDeviceGroup(id: number) {
|
||||
return requestClient.get<IotDeviceGroupApi.DeviceGroup>(
|
||||
`/iot/device-group/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增设备分组 */
|
||||
export function createDeviceGroup(data: IotDeviceGroupApi.DeviceGroup) {
|
||||
return requestClient.post('/iot/device-group/create', data);
|
||||
}
|
||||
|
||||
/** 修改设备分组 */
|
||||
export function updateDeviceGroup(data: IotDeviceGroupApi.DeviceGroup) {
|
||||
return requestClient.put('/iot/device-group/update', data);
|
||||
}
|
||||
|
||||
/** 删除设备分组 */
|
||||
export function deleteDeviceGroup(id: number) {
|
||||
return requestClient.delete(`/iot/device-group/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获取设备分组的精简信息列表 */
|
||||
export function getSimpleDeviceGroupList() {
|
||||
return requestClient.get<IotDeviceGroupApi.DeviceGroup[]>(
|
||||
'/iot/device-group/simple-list',
|
||||
);
|
||||
}
|
||||
90
apps/web-antd/src/api/iot/ota/firmware/index.ts
Normal file
90
apps/web-antd/src/api/iot/ota/firmware/index.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace IoTOtaFirmwareApi {
|
||||
/** IoT OTA 固件 VO */
|
||||
export interface Firmware {
|
||||
id?: number;
|
||||
name: string;
|
||||
version: string;
|
||||
productId: number;
|
||||
productName?: string;
|
||||
description?: string;
|
||||
fileUrl?: string;
|
||||
fileMd5?: string;
|
||||
fileSize?: number;
|
||||
status?: number;
|
||||
createTime?: Date;
|
||||
updateTime?: Date;
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT OTA 固件 */
|
||||
export interface IoTOtaFirmware {
|
||||
id?: number;
|
||||
name?: string;
|
||||
version?: string;
|
||||
productId?: number;
|
||||
productName?: string;
|
||||
description?: string;
|
||||
fileUrl?: string;
|
||||
fileMd5?: string;
|
||||
fileSize?: number;
|
||||
status?: number;
|
||||
createTime?: Date;
|
||||
updateTime?: Date;
|
||||
}
|
||||
|
||||
/** 查询 OTA 固件分页 */
|
||||
export function getOtaFirmwarePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<IoTOtaFirmwareApi.Firmware>>(
|
||||
'/iot/ota/firmware/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询 OTA 固件详情 */
|
||||
export function getOtaFirmware(id: number) {
|
||||
return requestClient.get<IoTOtaFirmwareApi.Firmware>(
|
||||
`/iot/ota/firmware/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增 OTA 固件 */
|
||||
export function createOtaFirmware(data: IoTOtaFirmware) {
|
||||
return requestClient.post('/iot/ota/firmware/create', data);
|
||||
}
|
||||
|
||||
/** 修改 OTA 固件 */
|
||||
export function updateOtaFirmware(data: IoTOtaFirmware) {
|
||||
return requestClient.put('/iot/ota/firmware/update', data);
|
||||
}
|
||||
|
||||
/** 删除 OTA 固件 */
|
||||
export function deleteOtaFirmware(id: number) {
|
||||
return requestClient.delete(`/iot/ota/firmware/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除 OTA 固件 */
|
||||
export function deleteOtaFirmwareList(ids: number[]) {
|
||||
return requestClient.delete('/iot/ota/firmware/delete-list', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新 OTA 固件状态 */
|
||||
export function updateOtaFirmwareStatus(id: number, status: number) {
|
||||
return requestClient.put(`/iot/ota/firmware/update-status`, {
|
||||
id,
|
||||
status,
|
||||
});
|
||||
}
|
||||
|
||||
/** 根据产品 ID 查询固件列表 */
|
||||
export function getOtaFirmwareListByProductId(productId: number) {
|
||||
return requestClient.get<IoTOtaFirmwareApi.Firmware[]>(
|
||||
'/iot/ota/firmware/list-by-product-id',
|
||||
{ params: { productId } },
|
||||
);
|
||||
}
|
||||
98
apps/web-antd/src/api/iot/ota/task/index.ts
Normal file
98
apps/web-antd/src/api/iot/ota/task/index.ts
Normal file
@@ -0,0 +1,98 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace IoTOtaTaskApi {
|
||||
/** IoT OTA 升级任务 VO */
|
||||
export interface Task {
|
||||
id?: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
firmwareId: number;
|
||||
firmwareName?: string;
|
||||
productId?: number;
|
||||
productName?: string;
|
||||
deviceScope?: number;
|
||||
deviceIds?: number[];
|
||||
status?: number;
|
||||
successCount?: number;
|
||||
failureCount?: number;
|
||||
pendingCount?: number;
|
||||
createTime?: Date;
|
||||
updateTime?: Date;
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT OTA 升级任务 */
|
||||
export interface OtaTask {
|
||||
id?: number;
|
||||
name?: string;
|
||||
description?: string;
|
||||
firmwareId?: number;
|
||||
firmwareName?: string;
|
||||
productId?: number;
|
||||
productName?: string;
|
||||
deviceScope?: number;
|
||||
deviceIds?: number[];
|
||||
status?: number;
|
||||
successCount?: number;
|
||||
failureCount?: number;
|
||||
pendingCount?: number;
|
||||
createTime?: Date;
|
||||
updateTime?: Date;
|
||||
}
|
||||
|
||||
/** 查询 OTA 升级任务分页 */
|
||||
export function getOtaTaskPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<IoTOtaTaskApi.Task>>(
|
||||
'/iot/ota/task/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询 OTA 升级任务详情 */
|
||||
export function getOtaTask(id: number) {
|
||||
return requestClient.get<IoTOtaTaskApi.Task>(`/iot/ota/task/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增 OTA 升级任务 */
|
||||
export function createOtaTask(data: OtaTask) {
|
||||
return requestClient.post('/iot/ota/task/create', data);
|
||||
}
|
||||
|
||||
/** 修改 OTA 升级任务 */
|
||||
export function updateOtaTask(data: OtaTask) {
|
||||
return requestClient.put('/iot/ota/task/update', data);
|
||||
}
|
||||
|
||||
/** 删除 OTA 升级任务 */
|
||||
export function deleteOtaTask(id: number) {
|
||||
return requestClient.delete(`/iot/ota/task/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除 OTA 升级任务 */
|
||||
export function deleteOtaTaskList(ids: number[]) {
|
||||
return requestClient.delete('/iot/ota/task/delete-list', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消 OTA 升级任务 */
|
||||
export function cancelOtaTask(id: number) {
|
||||
return requestClient.put(`/iot/ota/task/cancel?id=${id}`);
|
||||
}
|
||||
|
||||
/** 启动 OTA 升级任务 */
|
||||
export function startOtaTask(id: number) {
|
||||
return requestClient.put(`/iot/ota/task/start?id=${id}`);
|
||||
}
|
||||
|
||||
/** 暂停 OTA 升级任务 */
|
||||
export function pauseOtaTask(id: number) {
|
||||
return requestClient.put(`/iot/ota/task/pause?id=${id}`);
|
||||
}
|
||||
|
||||
/** 恢复 OTA 升级任务 */
|
||||
export function resumeOtaTask(id: number) {
|
||||
return requestClient.put(`/iot/ota/task/resume?id=${id}`);
|
||||
}
|
||||
101
apps/web-antd/src/api/iot/ota/task/record/index.ts
Normal file
101
apps/web-antd/src/api/iot/ota/task/record/index.ts
Normal file
@@ -0,0 +1,101 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace IoTOtaTaskRecordApi {
|
||||
/** IoT OTA 升级任务记录 VO */
|
||||
export interface TaskRecord {
|
||||
id?: number;
|
||||
taskId: number;
|
||||
taskName?: string;
|
||||
deviceId: number;
|
||||
deviceName?: string;
|
||||
firmwareId?: number;
|
||||
firmwareName?: string;
|
||||
firmwareVersion?: string;
|
||||
status?: number;
|
||||
progress?: number;
|
||||
errorMessage?: string;
|
||||
startTime?: Date;
|
||||
endTime?: Date;
|
||||
createTime?: Date;
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT OTA 升级任务记录 */
|
||||
export interface OtaTaskRecord {
|
||||
id?: number;
|
||||
taskId?: number;
|
||||
taskName?: string;
|
||||
deviceId?: number;
|
||||
deviceName?: string;
|
||||
firmwareId?: number;
|
||||
firmwareName?: string;
|
||||
firmwareVersion?: string;
|
||||
status?: number;
|
||||
progress?: number;
|
||||
errorMessage?: string;
|
||||
startTime?: Date;
|
||||
endTime?: Date;
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** 查询 OTA 升级任务记录分页 */
|
||||
export function getOtaTaskRecordPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<IoTOtaTaskRecordApi.TaskRecord>>(
|
||||
'/iot/ota/task/record/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询 OTA 升级任务记录详情 */
|
||||
export function getOtaTaskRecord(id: number) {
|
||||
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord>(
|
||||
`/iot/ota/task/record/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据任务 ID 查询记录列表 */
|
||||
export function getOtaTaskRecordListByTaskId(taskId: number) {
|
||||
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
|
||||
'/iot/ota/task/record/list-by-task-id',
|
||||
{ params: { taskId } },
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据设备 ID 查询记录列表 */
|
||||
export function getOtaTaskRecordListByDeviceId(deviceId: number) {
|
||||
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
|
||||
'/iot/ota/task/record/list-by-device-id',
|
||||
{ params: { deviceId } },
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据固件 ID 查询记录列表 */
|
||||
export function getOtaTaskRecordListByFirmwareId(firmwareId: number) {
|
||||
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
|
||||
'/iot/ota/task/record/list-by-firmware-id',
|
||||
{ params: { firmwareId } },
|
||||
);
|
||||
}
|
||||
|
||||
/** 重试升级任务记录 */
|
||||
export function retryOtaTaskRecord(id: number) {
|
||||
return requestClient.put(`/iot/ota/task/record/retry?id=${id}`);
|
||||
}
|
||||
|
||||
/** 取消升级任务记录 */
|
||||
export function cancelOtaTaskRecord(id: number) {
|
||||
return requestClient.put(`/iot/ota/task/record/cancel?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获取升级任务记录状态统计 */
|
||||
export function getOtaTaskRecordStatusStatistics(
|
||||
firmwareId?: number,
|
||||
taskId?: number,
|
||||
) {
|
||||
return requestClient.get<Record<string, number>>(
|
||||
'/iot/ota/task/record/status-statistics',
|
||||
{ params: { firmwareId, taskId } },
|
||||
);
|
||||
}
|
||||
57
apps/web-antd/src/api/iot/product/category/index.ts
Normal file
57
apps/web-antd/src/api/iot/product/category/index.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace IotProductCategoryApi {
|
||||
/** IoT 產品分類 VO */
|
||||
export interface ProductCategory {
|
||||
id?: number; // 分類 ID
|
||||
name: string; // 分類名稱
|
||||
parentId?: number; // 父级分類 ID
|
||||
sort?: number; // 分類排序
|
||||
status?: number; // 分類狀態
|
||||
description?: string; // 分類描述
|
||||
createTime?: string; // 創建時間
|
||||
}
|
||||
}
|
||||
|
||||
/** 查詢產品分類分頁 */
|
||||
export function getProductCategoryPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<IotProductCategoryApi.ProductCategory>>(
|
||||
'/iot/product-category/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查詢產品分類詳情 */
|
||||
export function getProductCategory(id: number) {
|
||||
return requestClient.get<IotProductCategoryApi.ProductCategory>(
|
||||
`/iot/product-category/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增產品分類 */
|
||||
export function createProductCategory(
|
||||
data: IotProductCategoryApi.ProductCategory,
|
||||
) {
|
||||
return requestClient.post('/iot/product-category/create', data);
|
||||
}
|
||||
|
||||
/** 修改產品分類 */
|
||||
export function updateProductCategory(
|
||||
data: IotProductCategoryApi.ProductCategory,
|
||||
) {
|
||||
return requestClient.put('/iot/product-category/update', data);
|
||||
}
|
||||
|
||||
/** 刪除產品分類 */
|
||||
export function deleteProductCategory(id: number) {
|
||||
return requestClient.delete(`/iot/product-category/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 獲取產品分類精簡列表 */
|
||||
export function getSimpleProductCategoryList() {
|
||||
return requestClient.get<IotProductCategoryApi.ProductCategory[]>(
|
||||
'/iot/product-category/simple-list',
|
||||
);
|
||||
}
|
||||
99
apps/web-antd/src/api/iot/product/product/index.ts
Normal file
99
apps/web-antd/src/api/iot/product/product/index.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace IotProductApi {
|
||||
/** IoT 产品 VO */
|
||||
export interface Product {
|
||||
id?: number; // 产品编号
|
||||
name: string; // 产品名称
|
||||
productKey?: string; // 产品标识
|
||||
protocolId?: number; // 协议编号
|
||||
protocolType?: number; // 接入协议类型
|
||||
categoryId?: number; // 产品所属品类标识符
|
||||
categoryName?: string; // 产品所属品类名称
|
||||
icon?: string; // 产品图标
|
||||
picUrl?: string; // 产品图片
|
||||
description?: string; // 产品描述
|
||||
status?: number; // 产品状态
|
||||
deviceType?: number; // 设备类型
|
||||
locationType?: number; // 定位类型
|
||||
netType?: number; // 联网方式
|
||||
codecType?: string; // 数据格式(编解码器类型)
|
||||
dataFormat?: number; // 数据格式
|
||||
validateType?: number; // 认证方式
|
||||
deviceCount?: number; // 设备数量
|
||||
createTime?: Date; // 创建时间
|
||||
}
|
||||
}
|
||||
|
||||
/** IOT 产品设备类型枚举类 */
|
||||
export enum DeviceTypeEnum {
|
||||
DEVICE = 0, // 直连设备
|
||||
GATEWAY = 2, // 网关设备
|
||||
GATEWAY_SUB = 1, // 网关子设备
|
||||
}
|
||||
|
||||
/** IOT 产品定位类型枚举类 */
|
||||
export enum LocationTypeEnum {
|
||||
IP = 1, // IP 定位
|
||||
MANUAL = 3, // 手动定位
|
||||
MODULE = 2, // 设备定位
|
||||
}
|
||||
|
||||
/** IOT 数据格式(编解码器类型)枚举类 */
|
||||
export enum CodecTypeEnum {
|
||||
ALINK = 'Alink', // 阿里云 Alink 协议
|
||||
}
|
||||
|
||||
/** 查询产品分页 */
|
||||
export function getProductPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<IotProductApi.Product>>(
|
||||
'/iot/product/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品详情 */
|
||||
export function getProduct(id: number) {
|
||||
return requestClient.get<IotProductApi.Product>(`/iot/product/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增产品 */
|
||||
export function createProduct(data: IotProductApi.Product) {
|
||||
return requestClient.post('/iot/product/create', data);
|
||||
}
|
||||
|
||||
/** 修改产品 */
|
||||
export function updateProduct(data: IotProductApi.Product) {
|
||||
return requestClient.put('/iot/product/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品 */
|
||||
export function deleteProduct(id: number) {
|
||||
return requestClient.delete(`/iot/product/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出产品 Excel */
|
||||
export function exportProduct(params: any) {
|
||||
return requestClient.download('/iot/product/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 更新产品状态 */
|
||||
export function updateProductStatus(id: number, status: number) {
|
||||
return requestClient.put(
|
||||
`/iot/product/update-status?id=${id}&status=${status}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品(精简)列表 */
|
||||
export function getSimpleProductList() {
|
||||
return requestClient.get<IotProductApi.Product[]>('/iot/product/simple-list');
|
||||
}
|
||||
|
||||
/** 根据 ProductKey 获取产品信息 */
|
||||
export function getProductByKey(productKey: string) {
|
||||
return requestClient.get<IotProductApi.Product>('/iot/product/get-by-key', {
|
||||
params: { productKey },
|
||||
});
|
||||
}
|
||||
83
apps/web-antd/src/api/iot/rule/data/rule/index.ts
Normal file
83
apps/web-antd/src/api/iot/rule/data/rule/index.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace DataRuleApi {
|
||||
/** IoT 数据流转规则 VO */
|
||||
export interface Rule {
|
||||
id?: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
status?: number;
|
||||
productId?: number;
|
||||
productKey?: string;
|
||||
sourceConfigs?: SourceConfig[];
|
||||
sinkIds?: number[];
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** IoT 数据源配置 */
|
||||
export interface SourceConfig {
|
||||
productId?: number;
|
||||
productKey?: string;
|
||||
deviceId?: number;
|
||||
type?: string;
|
||||
topic?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT 数据流转规则 */
|
||||
export interface DataRule {
|
||||
id?: number;
|
||||
name?: string;
|
||||
description?: string;
|
||||
status?: number;
|
||||
productId?: number;
|
||||
productKey?: string;
|
||||
sourceConfigs?: any[];
|
||||
sinkIds?: number[];
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** 查询数据流转规则分页 */
|
||||
export function getDataRulePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<DataRuleApi.Rule>>(
|
||||
'/iot/data-rule/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询数据流转规则详情 */
|
||||
export function getDataRule(id: number) {
|
||||
return requestClient.get<DataRuleApi.Rule>(`/iot/data-rule/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增数据流转规则 */
|
||||
export function createDataRule(data: DataRule) {
|
||||
return requestClient.post('/iot/data-rule/create', data);
|
||||
}
|
||||
|
||||
/** 修改数据流转规则 */
|
||||
export function updateDataRule(data: DataRule) {
|
||||
return requestClient.put('/iot/data-rule/update', data);
|
||||
}
|
||||
|
||||
/** 删除数据流转规则 */
|
||||
export function deleteDataRule(id: number) {
|
||||
return requestClient.delete(`/iot/data-rule/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除数据流转规则 */
|
||||
export function deleteDataRuleList(ids: number[]) {
|
||||
return requestClient.delete('/iot/data-rule/delete-list', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新数据流转规则状态 */
|
||||
export function updateDataRuleStatus(id: number, status: number) {
|
||||
return requestClient.put(`/iot/data-rule/update-status`, {
|
||||
id,
|
||||
status,
|
||||
});
|
||||
}
|
||||
148
apps/web-antd/src/api/iot/rule/data/sink/index.ts
Normal file
148
apps/web-antd/src/api/iot/rule/data/sink/index.ts
Normal file
@@ -0,0 +1,148 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace DataSinkApi {
|
||||
/** IoT 数据流转目的 VO */
|
||||
export interface Sink {
|
||||
id?: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
status?: number;
|
||||
type: string;
|
||||
config?: any;
|
||||
createTime?: Date;
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT 数据流转目的 */
|
||||
export interface DataSinkVO {
|
||||
id?: number;
|
||||
name?: string;
|
||||
description?: string;
|
||||
status?: number;
|
||||
type?: string;
|
||||
config?: any;
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** IoT 数据目的类型枚举 */
|
||||
export enum IotDataSinkTypeEnum {
|
||||
HTTP = 'HTTP',
|
||||
KAFKA = 'KAFKA',
|
||||
MQTT = 'MQTT',
|
||||
RABBITMQ = 'RABBITMQ',
|
||||
REDIS_STREAM = 'REDIS_STREAM',
|
||||
ROCKETMQ = 'ROCKETMQ',
|
||||
}
|
||||
|
||||
/** HTTP 配置 */
|
||||
export interface HttpConfig {
|
||||
url?: string;
|
||||
method?: string;
|
||||
headers?: Record<string, string>;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
/** MQTT 配置 */
|
||||
export interface MqttConfig {
|
||||
broker?: string;
|
||||
port?: number;
|
||||
topic?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
clientId?: string;
|
||||
qos?: number;
|
||||
}
|
||||
|
||||
/** Kafka 配置 */
|
||||
export interface KafkaMQConfig {
|
||||
bootstrapServers?: string;
|
||||
topic?: string;
|
||||
acks?: string;
|
||||
retries?: number;
|
||||
batchSize?: number;
|
||||
}
|
||||
|
||||
/** RabbitMQ 配置 */
|
||||
export interface RabbitMQConfig {
|
||||
host?: string;
|
||||
port?: number;
|
||||
virtualHost?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
exchange?: string;
|
||||
routingKey?: string;
|
||||
queue?: string;
|
||||
}
|
||||
|
||||
/** RocketMQ 配置 */
|
||||
export interface RocketMQConfig {
|
||||
nameServer?: string;
|
||||
topic?: string;
|
||||
tag?: string;
|
||||
producerGroup?: string;
|
||||
}
|
||||
|
||||
/** Redis Stream 配置 */
|
||||
export interface RedisStreamMQConfig {
|
||||
host?: string;
|
||||
port?: number;
|
||||
password?: string;
|
||||
database?: number;
|
||||
streamKey?: string;
|
||||
maxLen?: number;
|
||||
}
|
||||
|
||||
/** 查询数据流转目的分页 */
|
||||
export function getDataSinkPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<DataSinkApi.Sink>>(
|
||||
'/iot/data-sink/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询数据流转目的详情 */
|
||||
export function getDataSink(id: number) {
|
||||
return requestClient.get<DataSinkApi.Sink>(`/iot/data-sink/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 查询所有数据流转目的列表 */
|
||||
export function getDataSinkList() {
|
||||
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/list');
|
||||
}
|
||||
|
||||
/** 查询数据流转目的简单列表 */
|
||||
export function getDataSinkSimpleList() {
|
||||
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/simple-list');
|
||||
}
|
||||
|
||||
/** 新增数据流转目的 */
|
||||
export function createDataSink(data: DataSinkVO) {
|
||||
return requestClient.post('/iot/data-sink/create', data);
|
||||
}
|
||||
|
||||
/** 修改数据流转目的 */
|
||||
export function updateDataSink(data: DataSinkVO) {
|
||||
return requestClient.put('/iot/data-sink/update', data);
|
||||
}
|
||||
|
||||
/** 删除数据流转目的 */
|
||||
export function deleteDataSink(id: number) {
|
||||
return requestClient.delete(`/iot/data-sink/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除数据流转目的 */
|
||||
export function deleteDataSinkList(ids: number[]) {
|
||||
return requestClient.delete('/iot/data-sink/delete-list', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新数据流转目的状态 */
|
||||
export function updateDataSinkStatus(id: number, status: number) {
|
||||
return requestClient.put(`/iot/data-sink/update-status`, {
|
||||
id,
|
||||
status,
|
||||
});
|
||||
}
|
||||
156
apps/web-antd/src/api/iot/rule/scene/index.ts
Normal file
156
apps/web-antd/src/api/iot/rule/scene/index.ts
Normal file
@@ -0,0 +1,156 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace RuleSceneApi {
|
||||
/** IoT 场景联动规则 VO */
|
||||
export interface SceneRule {
|
||||
id?: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
status?: number;
|
||||
triggers?: Trigger[];
|
||||
actions?: Action[];
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** IoT 场景联动规则触发器 */
|
||||
export interface Trigger {
|
||||
type?: string;
|
||||
productId?: number;
|
||||
deviceId?: number;
|
||||
identifier?: string;
|
||||
operator?: string;
|
||||
value?: any;
|
||||
cronExpression?: string;
|
||||
conditionGroups?: TriggerConditionGroup[];
|
||||
}
|
||||
|
||||
/** IoT 场景联动规则触发条件组 */
|
||||
export interface TriggerConditionGroup {
|
||||
conditions?: TriggerCondition[];
|
||||
operator?: string;
|
||||
}
|
||||
|
||||
/** IoT 场景联动规则触发条件 */
|
||||
export interface TriggerCondition {
|
||||
productId?: number;
|
||||
deviceId?: number;
|
||||
identifier?: string;
|
||||
operator?: string;
|
||||
value?: any;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
/** IoT 场景联动规则动作 */
|
||||
export interface Action {
|
||||
type?: string;
|
||||
productId?: number;
|
||||
deviceId?: number;
|
||||
identifier?: string;
|
||||
value?: any;
|
||||
alertConfigId?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT 场景联动规则 */
|
||||
export interface IotSceneRule {
|
||||
id?: number;
|
||||
name?: string;
|
||||
description?: string;
|
||||
status?: number;
|
||||
triggers?: Trigger[];
|
||||
actions?: Action[];
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** IoT 场景联动规则触发器 */
|
||||
export interface Trigger {
|
||||
type?: string;
|
||||
productId?: number;
|
||||
deviceId?: number;
|
||||
identifier?: string;
|
||||
operator?: string;
|
||||
value?: any;
|
||||
cronExpression?: string;
|
||||
conditionGroups?: TriggerConditionGroup[];
|
||||
}
|
||||
|
||||
/** IoT 场景联动规则触发条件组 */
|
||||
export interface TriggerConditionGroup {
|
||||
conditions?: TriggerCondition[];
|
||||
operator?: string;
|
||||
}
|
||||
|
||||
/** IoT 场景联动规则触发条件 */
|
||||
export interface TriggerCondition {
|
||||
productId?: number;
|
||||
deviceId?: number;
|
||||
identifier?: string;
|
||||
operator?: string;
|
||||
value?: any;
|
||||
type?: string;
|
||||
param?: string;
|
||||
}
|
||||
|
||||
/** IoT 场景联动规则动作 */
|
||||
export interface Action {
|
||||
type?: string;
|
||||
productId?: number;
|
||||
deviceId?: number;
|
||||
identifier?: string;
|
||||
value?: any;
|
||||
alertConfigId?: number;
|
||||
}
|
||||
|
||||
/** 查询场景联动规则分页 */
|
||||
export function getSceneRulePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<RuleSceneApi.SceneRule>>(
|
||||
'/iot/scene-rule/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询场景联动规则详情 */
|
||||
export function getSceneRule(id: number) {
|
||||
return requestClient.get<RuleSceneApi.SceneRule>(
|
||||
`/iot/scene-rule/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增场景联动规则 */
|
||||
export function createSceneRule(data: IotSceneRule) {
|
||||
return requestClient.post('/iot/scene-rule/create', data);
|
||||
}
|
||||
|
||||
/** 修改场景联动规则 */
|
||||
export function updateSceneRule(data: IotSceneRule) {
|
||||
return requestClient.put('/iot/scene-rule/update', data);
|
||||
}
|
||||
|
||||
/** 删除场景联动规则 */
|
||||
export function deleteSceneRule(id: number) {
|
||||
return requestClient.delete(`/iot/scene-rule/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除场景联动规则 */
|
||||
export function deleteSceneRuleList(ids: number[]) {
|
||||
return requestClient.delete('/iot/scene-rule/delete-list', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新场景联动规则状态 */
|
||||
export function updateSceneRuleStatus(id: number, status: number) {
|
||||
return requestClient.put(`/iot/scene-rule/update-status`, {
|
||||
id,
|
||||
status,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取场景联动规则简单列表 */
|
||||
export function getSimpleRuleSceneList() {
|
||||
return requestClient.get<RuleSceneApi.SceneRule[]>(
|
||||
'/iot/scene-rule/simple-list',
|
||||
);
|
||||
}
|
||||
69
apps/web-antd/src/api/iot/statistics/index.ts
Normal file
69
apps/web-antd/src/api/iot/statistics/index.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace IotStatisticsApi {
|
||||
/** IoT 统计摘要数据 */
|
||||
export interface StatisticsSummary {
|
||||
productCategoryCount: number;
|
||||
productCount: number;
|
||||
deviceCount: number;
|
||||
deviceMessageCount: number;
|
||||
productCategoryTodayCount: number;
|
||||
productTodayCount: number;
|
||||
deviceTodayCount: number;
|
||||
deviceMessageTodayCount: number;
|
||||
deviceOnlineCount: number;
|
||||
deviceOfflineCount: number;
|
||||
deviceInactiveCount: number;
|
||||
productCategoryDeviceCounts: Record<string, number>;
|
||||
}
|
||||
|
||||
/** 时间戳-数值的键值对类型 */
|
||||
export interface TimeValueItem {
|
||||
[key: string]: number;
|
||||
}
|
||||
|
||||
/** IoT 消息统计数据类型 */
|
||||
export interface DeviceMessageSummary {
|
||||
statType: number;
|
||||
upstreamCounts: TimeValueItem[];
|
||||
downstreamCounts: TimeValueItem[];
|
||||
}
|
||||
|
||||
/** 消息统计数据项(按日期) */
|
||||
export interface DeviceMessageSummaryByDate {
|
||||
time: string;
|
||||
upstreamCount: number;
|
||||
downstreamCount: number;
|
||||
}
|
||||
|
||||
/** 消息统计接口参数 */
|
||||
export interface DeviceMessageReq {
|
||||
interval: number;
|
||||
times?: string[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 获取 IoT 统计摘要数据 */
|
||||
export function getStatisticsSummary() {
|
||||
return requestClient.get<IotStatisticsApi.StatisticsSummary>(
|
||||
'/iot/statistics/get-summary',
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取设备消息的数据统计(按日期) */
|
||||
export function getDeviceMessageSummaryByDate(
|
||||
params: IotStatisticsApi.DeviceMessageReq,
|
||||
) {
|
||||
return requestClient.get<IotStatisticsApi.DeviceMessageSummaryByDate[]>(
|
||||
'/iot/statistics/get-device-message-summary-by-date',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取设备消息统计摘要 */
|
||||
export function getDeviceMessageSummary(statType: number) {
|
||||
return requestClient.get<IotStatisticsApi.DeviceMessageSummary>(
|
||||
'/iot/statistics/get-device-message-summary',
|
||||
{ params: { statType } },
|
||||
);
|
||||
}
|
||||
191
apps/web-antd/src/api/iot/thingmodel/index.ts
Normal file
191
apps/web-antd/src/api/iot/thingmodel/index.ts
Normal file
@@ -0,0 +1,191 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ThingModelApi {
|
||||
/** IoT 物模型数据 VO */
|
||||
export interface ThingModel {
|
||||
id?: number;
|
||||
productId?: number;
|
||||
productKey?: string;
|
||||
identifier: string;
|
||||
name: string;
|
||||
desc?: string;
|
||||
type: string;
|
||||
property?: ThingModelProperty;
|
||||
event?: ThingModelEvent;
|
||||
service?: ThingModelService;
|
||||
}
|
||||
|
||||
/** IoT 物模型属性 */
|
||||
export interface Property {
|
||||
identifier: string;
|
||||
name: string;
|
||||
accessMode: string;
|
||||
dataType: string;
|
||||
dataSpecs?: any;
|
||||
dataSpecsList?: any[];
|
||||
desc?: string;
|
||||
}
|
||||
|
||||
/** IoT 物模型服务 */
|
||||
export interface Service {
|
||||
identifier: string;
|
||||
name: string;
|
||||
callType: string;
|
||||
inputData?: any[];
|
||||
outputData?: any[];
|
||||
desc?: string;
|
||||
}
|
||||
|
||||
/** IoT 物模型事件 */
|
||||
export interface Event {
|
||||
identifier: string;
|
||||
name: string;
|
||||
type: string;
|
||||
outputData?: any[];
|
||||
desc?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** IoT 物模型数据 */
|
||||
export interface ThingModelData {
|
||||
id?: number;
|
||||
productId?: number;
|
||||
productKey?: string;
|
||||
identifier?: string;
|
||||
name?: string;
|
||||
desc?: string;
|
||||
type?: string;
|
||||
dataType?: string;
|
||||
property?: ThingModelProperty;
|
||||
event?: ThingModelEvent;
|
||||
service?: ThingModelService;
|
||||
}
|
||||
|
||||
/** IoT 物模型属性 */
|
||||
export interface ThingModelProperty {
|
||||
identifier?: string;
|
||||
name?: string;
|
||||
accessMode?: string;
|
||||
dataType?: string;
|
||||
dataSpecs?: any;
|
||||
dataSpecsList?: any[];
|
||||
desc?: string;
|
||||
}
|
||||
|
||||
/** IoT 物模型服务 */
|
||||
export interface ThingModelService {
|
||||
identifier?: string;
|
||||
name?: string;
|
||||
callType?: string;
|
||||
inputData?: any[];
|
||||
outputData?: any[];
|
||||
desc?: string;
|
||||
}
|
||||
|
||||
/** IoT 物模型事件 */
|
||||
export interface ThingModelEvent {
|
||||
identifier?: string;
|
||||
name?: string;
|
||||
type?: string;
|
||||
outputData?: any[];
|
||||
desc?: string;
|
||||
}
|
||||
|
||||
/** IoT 数据定义(数值型) */
|
||||
export interface DataSpecsNumberData {
|
||||
min?: number | string;
|
||||
max?: number | string;
|
||||
step?: number | string;
|
||||
unit?: string;
|
||||
unitName?: string;
|
||||
}
|
||||
|
||||
/** IoT 数据定义(枚举/布尔型) */
|
||||
export interface DataSpecsEnumOrBoolData {
|
||||
value: number | string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/** IoT 物模型表单校验规则 */
|
||||
export interface ThingModelFormRules {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/** 验证布尔型名称 */
|
||||
export function validateBoolName(_rule: any, value: any, callback: any) {
|
||||
if (value) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('枚举描述不能为空'));
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品物模型分页 */
|
||||
export function getThingModelPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ThingModelApi.ThingModel>>(
|
||||
'/iot/thing-model/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品物模型详情 */
|
||||
export function getThingModel(id: number) {
|
||||
return requestClient.get<ThingModelApi.ThingModel>(
|
||||
`/iot/thing-model/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据产品 ID 查询物模型列表 */
|
||||
export function getThingModelListByProductId(productId: number) {
|
||||
return requestClient.get<ThingModelApi.ThingModel[]>(
|
||||
'/iot/thing-model/list-by-product-id',
|
||||
{ params: { productId } },
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据产品标识查询物模型列表 */
|
||||
export function getThingModelListByProductKey(productKey: string) {
|
||||
return requestClient.get<ThingModelApi.ThingModel[]>(
|
||||
'/iot/thing-model/list-by-product-key',
|
||||
{ params: { productKey } },
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增物模型 */
|
||||
export function createThingModel(data: ThingModelData) {
|
||||
return requestClient.post('/iot/thing-model/create', data);
|
||||
}
|
||||
|
||||
/** 修改物模型 */
|
||||
export function updateThingModel(data: ThingModelData) {
|
||||
return requestClient.put('/iot/thing-model/update', data);
|
||||
}
|
||||
|
||||
/** 删除物模型 */
|
||||
export function deleteThingModel(id: number) {
|
||||
return requestClient.delete(`/iot/thing-model/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 批量删除物模型 */
|
||||
export function deleteThingModelList(ids: number[]) {
|
||||
return requestClient.delete('/iot/thing-model/delete-list', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 导入物模型 TSL */
|
||||
export function importThingModelTSL(productId: number, tslData: any) {
|
||||
return requestClient.post('/iot/thing-model/import-tsl', {
|
||||
productId,
|
||||
tslData,
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出物模型 TSL */
|
||||
export function exportThingModelTSL(productId: number) {
|
||||
return requestClient.get<any>('/iot/thing-model/export-tsl', {
|
||||
params: { productId },
|
||||
});
|
||||
}
|
||||
@@ -5,18 +5,18 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallBannerApi {
|
||||
/** Banner 信息 */
|
||||
export interface Banner {
|
||||
id: number;
|
||||
title: string;
|
||||
picUrl: string;
|
||||
status: number;
|
||||
url: string;
|
||||
position: number;
|
||||
sort: number;
|
||||
memo: string;
|
||||
id: number; // Banner 编号
|
||||
title: string; // Banner 标题
|
||||
picUrl: string; // Banner 图片
|
||||
status: number; // 状态
|
||||
url: string; // 链接地址
|
||||
position: number; // Banner 位置
|
||||
sort: number; // 排序
|
||||
memo: string; // 备注
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询Banner管理列表 */
|
||||
/** 查询 Banner 管理列表 */
|
||||
export function getBannerPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallBannerApi.Banner>>(
|
||||
'/promotion/banner/page',
|
||||
@@ -24,24 +24,24 @@ export function getBannerPage(params: PageParam) {
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询Banner管理详情 */
|
||||
/** 查询 Banner 管理详情 */
|
||||
export function getBanner(id: number) {
|
||||
return requestClient.get<MallBannerApi.Banner>(
|
||||
`/promotion/banner/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增Banner管理 */
|
||||
/** 新增 Banner 管理 */
|
||||
export function createBanner(data: MallBannerApi.Banner) {
|
||||
return requestClient.post('/promotion/banner/create', data);
|
||||
}
|
||||
|
||||
/** 修改Banner管理 */
|
||||
/** 修改 Banner 管理 */
|
||||
export function updateBanner(data: MallBannerApi.Banner) {
|
||||
return requestClient.put('/promotion/banner/update', data);
|
||||
}
|
||||
|
||||
/** 删除Banner管理 */
|
||||
/** 删除 Banner 管理 */
|
||||
export function deleteBanner(id: number) {
|
||||
return requestClient.delete(`/promotion/banner/delete?id=${id}`);
|
||||
}
|
||||
|
||||
@@ -5,18 +5,12 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallBrandApi {
|
||||
/** 商品品牌 */
|
||||
export interface Brand {
|
||||
/** 品牌编号 */
|
||||
id?: number;
|
||||
/** 品牌名称 */
|
||||
name: string;
|
||||
/** 品牌图片 */
|
||||
picUrl: string;
|
||||
/** 品牌排序 */
|
||||
sort?: number;
|
||||
/** 品牌描述 */
|
||||
description?: string;
|
||||
/** 开启状态 */
|
||||
status: number;
|
||||
id?: number; // 品牌编号
|
||||
name: string; // 品牌名称
|
||||
picUrl: string; // 品牌图片
|
||||
sort?: number; // 品牌排序
|
||||
description?: string; // 品牌描述
|
||||
status: number; // 开启状态
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user