Compare commits
514 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
b37657a92d | |
|
|
f23c9f5e19 | |
|
|
21998d8044 | |
|
|
413ec8c060 | |
|
|
fd4d247e37 | |
|
|
c376a60e83 | |
|
|
aad62cf5ca | |
|
|
e6ecade0ee | |
|
|
9c68eb18c1 | |
|
|
f2a5bc522d | |
|
|
f8fb3d881d | |
|
|
4b77779e60 | |
|
|
7bc60c481a | |
|
|
8fe46edfba | |
|
|
4f5caf1566 | |
|
|
d3bcfd7177 | |
|
|
852fd0e44f | |
|
|
08a246d472 | |
|
|
9d2446b6ff | |
|
|
1900c051fc | |
|
|
4646900de1 | |
|
|
13acbdd556 | |
|
|
651a525187 | |
|
|
8e0564cc42 | |
|
|
b02d602a21 | |
|
|
017b3c3fce | |
|
|
126275b417 | |
|
|
bc908e29eb | |
|
|
72f3d62a20 | |
|
|
efe3c25310 | |
|
|
d85ac2c976 | |
|
|
c816591b69 | |
|
|
564b349700 | |
|
|
ce495d67a0 | |
|
|
8094d1ffb9 | |
|
|
5c9a163c46 | |
|
|
2aa2c8676f | |
|
|
d7b23d67ce | |
|
|
b8d992f828 | |
|
|
693f0b48c2 | |
|
|
4f66adb999 | |
|
|
da85dcf87c | |
|
|
1123f00795 | |
|
|
0efde47539 | |
|
|
569ded85f9 | |
|
|
e046050ef0 | |
|
|
615749daf1 | |
|
|
db3081ee62 | |
|
|
58d4be5893 | |
|
|
0483d5cd8b | |
|
|
a0735e1bba | |
|
|
705aa2fa7b | |
|
|
1b5a06f3a2 | |
|
|
748b182e44 | |
|
|
cf0f7cedca | |
|
|
70aed10752 | |
|
|
03f167b7d0 | |
|
|
f6a8c6e652 | |
|
|
09970d89a4 | |
|
|
6315055c08 | |
|
|
82b22173c0 | |
|
|
e6e4d8ce1e | |
|
|
bac2f92d1a | |
|
|
a357dbf940 | |
|
|
6544340d80 | |
|
|
8146ebde8c | |
|
|
b91268923f | |
|
|
4a597c0806 | |
|
|
6b7cb7b1fc | |
|
|
d90d45a128 | |
|
|
66077b3bcf | |
|
|
0328594747 | |
|
|
790e114d41 | |
|
|
cc60ca9592 | |
|
|
79707a2ebd | |
|
|
0eb72ca4fd | |
|
|
7fd4b1de04 | |
|
|
1f8e9f6bb0 | |
|
|
044ba2382d | |
|
|
9ffd42f013 | |
|
|
72aac700ff | |
|
|
e943f4fcfd | |
|
|
840f4efbbe | |
|
|
64eea34a63 | |
|
|
54e5036171 | |
|
|
1896c60f53 | |
|
|
099d480ff4 | |
|
|
3327655d46 | |
|
|
40101911f0 | |
|
|
04fbb7a556 | |
|
|
e5f9106caa | |
|
|
2fc7390091 | |
|
|
a188c8245d | |
|
|
61172b9a68 | |
|
|
4dff39ddc5 | |
|
|
06f8b74790 | |
|
|
b00a67deb9 | |
|
|
c25b631c10 | |
|
|
0fe9607302 | |
|
|
26d07e2e28 | |
|
|
1edaf023c2 | |
|
|
7e62f9a5ef | |
|
|
3007539f0e | |
|
|
3f7134d3fc | |
|
|
22e9081a45 | |
|
|
b3154ef87a | |
|
|
70ca594a4c | |
|
|
51e633f6c9 | |
|
|
c9a32ba780 | |
|
|
71cec9ac6a | |
|
|
c8deb9e91e | |
|
|
dd4b7e045a | |
|
|
7d75ab8d8e | |
|
|
a237758516 | |
|
|
b325db0450 | |
|
|
37b9db148f | |
|
|
83482781d6 | |
|
|
f5fbd85e26 | |
|
|
2fd44246f8 | |
|
|
3ef3f246c2 | |
|
|
60a423f44a | |
|
|
be213b6b31 | |
|
|
7bf65041f9 | |
|
|
753fd0e506 | |
|
|
e313de09c4 | |
|
|
79af870afe | |
|
|
b6d1154b8f | |
|
|
990d0a78fb | |
|
|
4b38533c6e | |
|
|
6b6d45132f | |
|
|
7ee42b9888 | |
|
|
f1523e417b | |
|
|
25bbe79cb2 | |
|
|
e09db73f73 | |
|
|
2a7051cceb | |
|
|
93024d0061 | |
|
|
05cf59b4bc | |
|
|
974527ed31 | |
|
|
e91d30e899 | |
|
|
a8d60580be | |
|
|
b2ccdf80b2 | |
|
|
76e9df6e8e | |
|
|
b4e7573d10 | |
|
|
f79dffcf2e | |
|
|
eeff84b63f | |
|
|
8028d8b6ef | |
|
|
8192bb4777 | |
|
|
f27942c8f9 | |
|
|
d245eca60d | |
|
|
76260e67f3 | |
|
|
fe71f18d21 | |
|
|
cea628b1a1 | |
|
|
abc8789fe3 | |
|
|
d3233c4bb4 | |
|
|
2d1325f11a | |
|
|
ec5b607171 | |
|
|
16d6ab0722 | |
|
|
0ec301cfb3 | |
|
|
177cf37c1f | |
|
|
a1d6c8bdb3 | |
|
|
751af9b9af | |
|
|
7ad2d43121 | |
|
|
108d7ff335 | |
|
|
1d6842fa69 | |
|
|
d6a9eaf9e9 | |
|
|
f7540c119b | |
|
|
08dad4ef5d | |
|
|
e9cb162aea | |
|
|
59cc3bbd61 | |
|
|
2a868b809f | |
|
|
d1e2202e59 | |
|
|
5a1100aed4 | |
|
|
44b62e14ac | |
|
|
3acc821de5 | |
|
|
4a92762d44 | |
|
|
9c7986d230 | |
|
|
f4e71137e0 | |
|
|
6b6228bc9c | |
|
|
be3d9eaed7 | |
|
|
adb57ed364 | |
|
|
acf289381e | |
|
|
4949ed1c07 | |
|
|
995666e4ce | |
|
|
80a25ca767 | |
|
|
01a1d3e001 | |
|
|
54d0459f07 | |
|
|
272757995e | |
|
|
fab333fbb7 | |
|
|
d2763dc044 | |
|
|
ab697925cf | |
|
|
3c592887b9 | |
|
|
4ba9390f25 | |
|
|
8ab0c53011 | |
|
|
13561b933f | |
|
|
19911a19c0 | |
|
|
1edf29abeb | |
|
|
617d50f68f | |
|
|
53a00f6e15 | |
|
|
2bcd81dc94 | |
|
|
858011bfab | |
|
|
48547bc53b | |
|
|
eb0f2a5ff2 | |
|
|
51a05bfc39 | |
|
|
6fb45f1ded | |
|
|
aeff25209d | |
|
|
241cf76788 | |
|
|
ef57c96b2f | |
|
|
d646a23f7d | |
|
|
fb2595ef90 | |
|
|
eaaf55eafa | |
|
|
d910450426 | |
|
|
f813245827 | |
|
|
cfbd13289f | |
|
|
e98f0b7558 | |
|
|
cd86de54e1 | |
|
|
152964395d | |
|
|
60eb1335f8 | |
|
|
f2b3b12553 | |
|
|
c066889c37 | |
|
|
f8c869f1ff | |
|
|
00779aacb3 | |
|
|
6b81d1b0d5 | |
|
|
126b33687a | |
|
|
9d665bd6b9 | |
|
|
5b67c2e740 | |
|
|
2d7c3c3072 | |
|
|
5cc68c9dd0 | |
|
|
df8e23542b | |
|
|
e7361a60ec | |
|
|
66843f2392 | |
|
|
83bf576daf | |
|
|
2a97bed546 | |
|
|
c8ce1a8911 | |
|
|
d1a2601b6c | |
|
|
d2587c17b0 | |
|
|
33cdfcac3c | |
|
|
58f2e23654 | |
|
|
d207e3b82c | |
|
|
1afa70bb53 | |
|
|
751ba2c782 | |
|
|
057ca0bfde | |
|
|
df720b2c1a | |
|
|
4b6e2de778 | |
|
|
e6e15ca4ef | |
|
|
0d175cbe9c | |
|
|
f02a5975b8 | |
|
|
b35ce18c6e | |
|
|
63a38dce49 | |
|
|
629f747795 | |
|
|
c11db17376 | |
|
|
b3462c3286 | |
|
|
9cc52f128c | |
|
|
67997bd44d | |
|
|
5790211897 | |
|
|
6b1425d541 | |
|
|
13c3028ecc | |
|
|
cb175e331f | |
|
|
3f09fc1498 | |
|
|
8585008f79 | |
|
|
00990d9453 | |
|
|
2a84b590b5 | |
|
|
769c970e08 | |
|
|
4d3c481a93 | |
|
|
fda4b39c01 | |
|
|
74d8942f39 | |
|
|
9ec98f0846 | |
|
|
f71094e878 | |
|
|
e816288b82 | |
|
|
f1f8f4e64a | |
|
|
9badda3d11 | |
|
|
250d3eb39f | |
|
|
5607f23322 | |
|
|
538d04a380 | |
|
|
b9d333f7ec | |
|
|
dab9509ba0 | |
|
|
b1bd32a89b | |
|
|
ec796b8336 | |
|
|
e7a61ce150 | |
|
|
1bdc0d992f | |
|
|
8bcfa20577 | |
|
|
ab15c884bf | |
|
|
9c57ae07a6 | |
|
|
03fcecadcc | |
|
|
3a88adb8a6 | |
|
|
c759cb2593 | |
|
|
f77166b3a2 | |
|
|
f7928b34b2 | |
|
|
454a5b54bd | |
|
|
09c19526bb | |
|
|
b9a7eddb72 | |
|
|
0bc1981675 | |
|
|
a4dd9d30ce | |
|
|
9d54f60b10 | |
|
|
76cfcda2e9 | |
|
|
7ec4df4995 | |
|
|
d71c81e8ff | |
|
|
a70fcc9616 | |
|
|
4821d49017 | |
|
|
a1b66588ec | |
|
|
a098c201e1 | |
|
|
8da5c12dfc | |
|
|
3d0917f1a9 | |
|
|
0280df114f | |
|
|
6b61004b6a | |
|
|
8d69e4d9f0 | |
|
|
cd42a653c5 | |
|
|
56de1f1412 | |
|
|
80f071d57f | |
|
|
68800c96d7 | |
|
|
2dfa863d68 | |
|
|
4cded0a674 | |
|
|
aac626da32 | |
|
|
584370358e | |
|
|
76bed17ed9 | |
|
|
e9e534018f | |
|
|
5db93a345a | |
|
|
7c943cc06b | |
|
|
5c8dd1a6da | |
|
|
6592135cc5 | |
|
|
2f16ee7cf5 | |
|
|
0c1b737325 | |
|
|
5bbdcffb97 | |
|
|
1867015e97 | |
|
|
b6aeadd9a2 | |
|
|
1e44b87359 | |
|
|
a1081bf7a6 | |
|
|
9bb2026b4d | |
|
|
4554cd016a | |
|
|
350d5ee60e | |
|
|
1ec058cbe3 | |
|
|
709951e6db | |
|
|
fbc03a9713 | |
|
|
1bbb7eb1d5 | |
|
|
88515705dc | |
|
|
81b4690998 | |
|
|
cfb1f8401e | |
|
|
5182cdbffa | |
|
|
d649a617ac | |
|
|
71a23487f7 | |
|
|
89f75428d6 | |
|
|
179881bd3d | |
|
|
58f8b7fb22 | |
|
|
6740401f6c | |
|
|
b42e9b36e5 | |
|
|
f8c2d4b1ff | |
|
|
41d5aa93d6 | |
|
|
3135b28211 | |
|
|
08511191f7 | |
|
|
0246fa1ebc | |
|
|
0e4012c623 | |
|
|
4933180560 | |
|
|
aa577d84e9 | |
|
|
8710da9383 | |
|
|
5a1f4901da | |
|
|
3da4a3f417 | |
|
|
84b91c6795 | |
|
|
735ff018be | |
|
|
0163794e3f | |
|
|
bb63ca9541 | |
|
|
6b28518165 | |
|
|
0d7d7aea73 | |
|
|
4adce844d3 | |
|
|
19b5f38e23 | |
|
|
80fa8b74e8 | |
|
|
5710761dbe | |
|
|
877ba2727f | |
|
|
70a639967c | |
|
|
6cbbe88902 | |
|
|
eb9cdbab9b | |
|
|
4907f281af | |
|
|
aadf9b6e39 | |
|
|
84e77f64ea | |
|
|
3e89077d46 | |
|
|
c8c425538f | |
|
|
b04c10aab6 | |
|
|
b5f79db321 | |
|
|
42d82875ce | |
|
|
4d8d2de6ad | |
|
|
294700a247 | |
|
|
f55b18ffd7 | |
|
|
ca5931e8c4 | |
|
|
ccfc122eae | |
|
|
59183029b6 | |
|
|
e81ca2c13f | |
|
|
dcccef1c02 | |
|
|
9a5bee4dce | |
|
|
29665f02bf | |
|
|
06f776d1ef | |
|
|
40f0ba71f5 | |
|
|
0fced45a9c | |
|
|
2ea7da06c5 | |
|
|
aac4e88353 | |
|
|
30356a24e6 | |
|
|
ba60bc3c14 | |
|
|
f5feddc6c7 | |
|
|
0868deb82b | |
|
|
1299acd8f9 | |
|
|
43717807a4 | |
|
|
1b4e126128 | |
|
|
d23b246aee | |
|
|
71f2e5f504 | |
|
|
4bbd34fab9 | |
|
|
08e4bb40b4 | |
|
|
9c49f4bb1e | |
|
|
28905b0bec | |
|
|
bbcad709ca | |
|
|
a5f0537cb0 | |
|
|
c78d89f549 | |
|
|
f2a17cbe78 | |
|
|
9667232684 | |
|
|
1f584ff0c9 | |
|
|
75ed17a1f9 | |
|
|
cc6ccaab38 | |
|
|
0be4b51eaa | |
|
|
b40822e3ed | |
|
|
df5cb426d1 | |
|
|
2d36d6b510 | |
|
|
88d5661e0c | |
|
|
8ce773f264 | |
|
|
329fa68207 | |
|
|
e1f6449073 | |
|
|
51e8b27d4c | |
|
|
e555ee065e | |
|
|
c164904a14 | |
|
|
a0ceb45df9 | |
|
|
c641542c71 | |
|
|
b5dacd992f | |
|
|
a3d8e4bfc1 | |
|
|
e385823d46 | |
|
|
897220e19a | |
|
|
b293e112c6 | |
|
|
627e31f1b0 | |
|
|
8020b4b743 | |
|
|
228c5463da | |
|
|
50ee691191 | |
|
|
eda6ffaf1e | |
|
|
d55f17670a | |
|
|
9f20d52b4e | |
|
|
86445a38e4 | |
|
|
9a73e961fc | |
|
|
c0b2ef980e | |
|
|
e8dc464e79 | |
|
|
99c38c93c8 | |
|
|
244c0a5884 | |
|
|
c6fd599784 | |
|
|
4ca2f1c6e8 | |
|
|
36d7dc23fa | |
|
|
42317ddf41 | |
|
|
c7fd6ffb0e | |
|
|
3a83fb0c3e | |
|
|
5907c04e00 | |
|
|
6885927441 | |
|
|
c8c589ae7e | |
|
|
d0889b5cc4 | |
|
|
2f1a866cb4 | |
|
|
fee32c1d12 | |
|
|
f2652833a1 | |
|
|
c3aa63982f | |
|
|
4a968d9379 | |
|
|
ec9b323195 | |
|
|
d69455e8ef | |
|
|
33e2582f60 | |
|
|
991408b451 | |
|
|
a096073a8e | |
|
|
f30157fa59 | |
|
|
12a81a7a7d | |
|
|
e808fe74c1 | |
|
|
4665a787a0 | |
|
|
b7774fc9d9 | |
|
|
6f18718c87 | |
|
|
2a32715c99 | |
|
|
46f323431c | |
|
|
2b1fcb038b | |
|
|
d779a39862 | |
|
|
0c8db0f6be | |
|
|
37393e1820 | |
|
|
93e23c6b05 | |
|
|
e023a0852a | |
|
|
306739cabb | |
|
|
093479bb33 | |
|
|
bd369df3bc | |
|
|
4f7b396ebb | |
|
|
d700b04841 | |
|
|
243456d928 | |
|
|
7e8b9c2368 | |
|
|
92298bac2b | |
|
|
436a865bef | |
|
|
185011ee21 | |
|
|
feca01484b | |
|
|
35e1166b9f | |
|
|
d0c17090ef | |
|
|
cc32ebeb12 | |
|
|
02372f12ba | |
|
|
e9bdbb610a | |
|
|
2013ba4de4 | |
|
|
e417a2c209 | |
|
|
f1273571c7 | |
|
|
064a6a20f0 | |
|
|
cb5e7e00f1 | |
|
|
5ed39c03a4 | |
|
|
794b103aa9 | |
|
|
c7b1bb3492 | |
|
|
89349f8d91 | |
|
|
8e0b65a0e1 | |
|
|
b096e83f93 | |
|
|
4a69c9e665 | |
|
|
7a60a081a2 | |
|
|
c693c854a7 | |
|
|
5eca357a5c | |
|
|
2930dcd78e | |
|
|
e421d9d99b | |
|
|
6c029bfa32 | |
|
|
fe77bc8bc9 | |
|
|
e136679934 |
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"singleQuote": true
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
'@vben/styles': patch
|
||||||
|
'@vben-core/form-ui': patch
|
||||||
|
'@vben/web-naive': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
feat(@core/form-ui): 新增 useVbenForm 数组编辑器 VbenFormFieldArray
|
||||||
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 216 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
|
@ -6,7 +6,7 @@ runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v6
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v5
|
uses: pnpm/action-setup@v6
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ jobs:
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v4
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
build-mode: ${{ matrix.build-mode }}
|
build-mode: ${{ matrix.build-mode }}
|
||||||
|
|
@ -89,6 +89,6 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v4
|
||||||
with:
|
with:
|
||||||
category: '/language:${{matrix.language}}'
|
category: '/language:${{matrix.language}}'
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
run: pnpm build:play
|
run: pnpm build:play
|
||||||
|
|
||||||
- name: Sync Playground files
|
- name: Sync Playground files
|
||||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
|
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
|
||||||
with:
|
with:
|
||||||
server: ${{ secrets.PRO_FTP_HOST }}
|
server: ${{ secrets.PRO_FTP_HOST }}
|
||||||
username: ${{ secrets.WEB_PLAYGROUND_FTP_ACCOUNT }}
|
username: ${{ secrets.WEB_PLAYGROUND_FTP_ACCOUNT }}
|
||||||
|
|
@ -54,7 +54,7 @@ jobs:
|
||||||
run: pnpm build:docs
|
run: pnpm build:docs
|
||||||
|
|
||||||
- name: Sync Docs files
|
- name: Sync Docs files
|
||||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
|
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
|
||||||
with:
|
with:
|
||||||
server: ${{ secrets.PRO_FTP_HOST }}
|
server: ${{ secrets.PRO_FTP_HOST }}
|
||||||
username: ${{ secrets.WEBSITE_FTP_ACCOUNT }}
|
username: ${{ secrets.WEBSITE_FTP_ACCOUNT }}
|
||||||
|
|
@ -85,7 +85,7 @@ jobs:
|
||||||
run: pnpm run build:antd
|
run: pnpm run build:antd
|
||||||
|
|
||||||
- name: Sync files
|
- name: Sync files
|
||||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
|
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
|
||||||
with:
|
with:
|
||||||
server: ${{ secrets.PRO_FTP_HOST }}
|
server: ${{ secrets.PRO_FTP_HOST }}
|
||||||
username: ${{ secrets.WEB_ANTD_FTP_ACCOUNT }}
|
username: ${{ secrets.WEB_ANTD_FTP_ACCOUNT }}
|
||||||
|
|
@ -116,7 +116,7 @@ jobs:
|
||||||
run: pnpm run build:ele
|
run: pnpm run build:ele
|
||||||
|
|
||||||
- name: Sync files
|
- name: Sync files
|
||||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
|
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
|
||||||
with:
|
with:
|
||||||
server: ${{ secrets.PRO_FTP_HOST }}
|
server: ${{ secrets.PRO_FTP_HOST }}
|
||||||
username: ${{ secrets.WEB_ELE_FTP_ACCOUNT }}
|
username: ${{ secrets.WEB_ELE_FTP_ACCOUNT }}
|
||||||
|
|
@ -147,7 +147,7 @@ jobs:
|
||||||
run: pnpm run build:naive
|
run: pnpm run build:naive
|
||||||
|
|
||||||
- name: Sync files
|
- name: Sync files
|
||||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
|
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
|
||||||
with:
|
with:
|
||||||
server: ${{ secrets.PRO_FTP_HOST }}
|
server: ${{ secrets.PRO_FTP_HOST }}
|
||||||
username: ${{ secrets.WEB_NAIVE_FTP_ACCOUNT }}
|
username: ${{ secrets.WEB_NAIVE_FTP_ACCOUNT }}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
# 关闭未活动的 Issues
|
# 关闭未活动的 Issues
|
||||||
- name: Close Inactive Issues
|
- name: Close Inactive Issues
|
||||||
uses: actions/stale@v9
|
uses: actions/stale@v10
|
||||||
with:
|
with:
|
||||||
days-before-stale: -1 # Issues and PR will never be flagged stale automatically.
|
days-before-stale: -1 # Issues and PR will never be flagged stale automatically.
|
||||||
stale-issue-label: needs-reproduction # Label that flags an issue as stale.
|
stale-issue-label: needs-reproduction # Label that flags an issue as stale.
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: remove enhancement pending
|
- name: remove enhancement pending
|
||||||
if: github.event.label.name == 'enhancement'
|
if: github.event.label.name == 'enhancement'
|
||||||
uses: actions-cool/issues-helper@v3
|
uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -27,7 +27,7 @@ jobs:
|
||||||
|
|
||||||
- name: remove bug pending
|
- name: remove bug pending
|
||||||
if: github.event.label.name == 'bug'
|
if: github.event.label.name == 'bug'
|
||||||
uses: actions-cool/issues-helper@v3
|
uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
|
||||||
with:
|
with:
|
||||||
actions: 'remove-labels'
|
actions: 'remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -36,7 +36,7 @@ jobs:
|
||||||
|
|
||||||
- name: needs reproduction
|
- name: needs reproduction
|
||||||
if: github.event.label.name == 'needs reproduction'
|
if: github.event.label.name == 'needs reproduction'
|
||||||
uses: actions-cool/issues-helper@v3
|
uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment, remove-labels'
|
actions: 'create-comment, remove-labels'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
if: github.repository == 'vbenjs/vue-vben-admin'
|
if: github.repository == 'vbenjs/vue-vben-admin'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v5
|
- uses: dessant/lock-threads@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-inactive-days: '14'
|
issue-inactive-days: '14'
|
||||||
|
|
|
||||||
|
|
@ -3,60 +3,44 @@ name: Create Release Tag
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
- 'v*.*.*'
|
||||||
|
workflow_dispatch:
|
||||||
env:
|
inputs:
|
||||||
HUSKY: '0'
|
tag:
|
||||||
|
description: 'Tag to create (e.g. v1.2.3)'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
if: github.repository == 'vbenjs/vue-vben-admin'
|
if: github.repository == 'vbenjs/vue-vben-admin'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [22]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# - name: Checkout code
|
- name: Extract version
|
||||||
# uses: actions/checkout@v6
|
|
||||||
# with:
|
|
||||||
# fetch-depth: 0
|
|
||||||
|
|
||||||
# - name: Install pnpm
|
|
||||||
# uses: pnpm/action-setup@v4
|
|
||||||
|
|
||||||
# - name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
# uses: actions/setup-node@v4
|
|
||||||
# with:
|
|
||||||
# node-version: ${{ matrix.node-version }}
|
|
||||||
# cache: "pnpm"
|
|
||||||
|
|
||||||
# - name: Install dependencies
|
|
||||||
# run: pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
# - name: Test and Build
|
|
||||||
# run: |
|
|
||||||
# pnpm run test
|
|
||||||
# pnpm run build
|
|
||||||
|
|
||||||
- name: version
|
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
tag=${GITHUB_REF/refs\/tags\//}
|
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||||
version=${tag#v}
|
raw_tag="${{ inputs.tag }}"
|
||||||
major=${version%%.*}
|
else
|
||||||
echo "tag=${tag}" >> $GITHUB_OUTPUT
|
raw_tag="${GITHUB_REF_NAME}"
|
||||||
echo "version=${version}" >> $GITHUB_OUTPUT
|
fi
|
||||||
echo "major=${major}" >> $GITHUB_OUTPUT
|
# Normalize: ensure v prefix
|
||||||
|
tag="${raw_tag}"
|
||||||
|
[[ "${tag:0:1}" != "v" ]] && tag="v${tag}"
|
||||||
|
version="${tag#v}"
|
||||||
|
major="${version%%.*}"
|
||||||
|
echo "tag=${tag}" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "version=${version}" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "major=${major}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- uses: release-drafter/release-drafter@v7
|
- uses: release-drafter/release-drafter@v7
|
||||||
with:
|
with:
|
||||||
|
|
@ -64,17 +48,3 @@ jobs:
|
||||||
publish: true
|
publish: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# - name: force update major tag
|
|
||||||
# run: |
|
|
||||||
# git tag v${{ steps.version.outputs.major }} ${{ steps.version.outputs.tag }} -f
|
|
||||||
# git push origin refs/tags/v${{ steps.version.outputs.major }} -f
|
|
||||||
|
|
||||||
# - name: Create Release for Tag
|
|
||||||
# id: release_tag
|
|
||||||
# uses: ncipollo/release-action@v1
|
|
||||||
# with:
|
|
||||||
# token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# generateReleaseNotes: "true"
|
|
||||||
# body: |
|
|
||||||
# > Please refer to [CHANGELOG.md](https://github.com/vbenjs/vue-vben-admin/blob/main/CHANGELOG.md) for details.
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Validate PR title
|
- name: Validate PR title
|
||||||
uses: amannn/action-semantic-pull-request@v5
|
uses: amannn/action-semantic-pull-request@v6
|
||||||
with:
|
with:
|
||||||
wip: true
|
wip: true
|
||||||
subjectPattern: ^(?![A-Z]).+$
|
subjectPattern: ^(?![A-Z]).+$
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ jobs:
|
||||||
if: github.repository == 'vbenjs/vue-vben-admin'
|
if: github.repository == 'vbenjs/vue-vben-admin'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v9
|
- uses: actions/stale@v10
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
|
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ package-lock.json
|
||||||
.VSCodeCounter
|
.VSCodeCounter
|
||||||
**/backend-mock/data
|
**/backend-mock/data
|
||||||
.omx
|
.omx
|
||||||
|
.pnpm-store
|
||||||
# local env files
|
# local env files
|
||||||
.env.local
|
.env.local
|
||||||
.env.*.local
|
.env.*.local
|
||||||
|
|
@ -57,3 +58,8 @@ vite.config.ts.*
|
||||||
.claude
|
.claude
|
||||||
.codex
|
.codex
|
||||||
skills-lock.json
|
skills-lock.json
|
||||||
|
.atomcode
|
||||||
|
datalog
|
||||||
|
|
||||||
|
# Playwright CLI 录制产物(本地调试,不入库)
|
||||||
|
.playwright-cli
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
22.22.0
|
24.16.0
|
||||||
|
|
|
||||||
12
.npmrc
|
|
@ -1,13 +1 @@
|
||||||
registry=https://registry.npmmirror.com
|
registry=https://registry.npmmirror.com
|
||||||
public-hoist-pattern[]=lefthook
|
|
||||||
public-hoist-pattern[]=eslint
|
|
||||||
public-hoist-pattern[]=oxfmt
|
|
||||||
public-hoist-pattern[]=oxlint
|
|
||||||
public-hoist-pattern[]=stylelint
|
|
||||||
public-hoist-pattern[]=*postcss*
|
|
||||||
public-hoist-pattern[]=@commitlint/*
|
|
||||||
public-hoist-pattern[]=czg
|
|
||||||
|
|
||||||
strict-peer-dependencies=false
|
|
||||||
auto-install-peers=true
|
|
||||||
dedupe-peer-dependents=true
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,15 @@
|
||||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "chrome",
|
||||||
|
"name": "vben admin antd dev",
|
||||||
|
"request": "launch",
|
||||||
|
"url": "http://localhost:5999",
|
||||||
|
"env": { "NODE_ENV": "development" },
|
||||||
|
"sourceMaps": true,
|
||||||
|
"webRoot": "${workspaceFolder}/apps/web-antdv-next"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "chrome",
|
"type": "chrome",
|
||||||
"name": "vben admin antd dev",
|
"name": "vben admin antd dev",
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
// lint && format
|
// lint && format
|
||||||
"oxc.enable": true,
|
"oxc.enable": true,
|
||||||
"oxc.typeAware": true,
|
"oxc.typeAware": false,
|
||||||
"oxc.configPath": "oxlint.config.ts",
|
"oxc.configPath": "oxlint.config.ts",
|
||||||
"oxc.fmt.configPath": "oxfmt.config.ts",
|
"oxc.fmt.configPath": "oxfmt.config.ts",
|
||||||
"eslint.useFlatConfig": true,
|
"eslint.useFlatConfig": true,
|
||||||
|
|
|
||||||
70
README.md
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
## 🐶 新手必读
|
## 🐶 新手必读
|
||||||
|
|
||||||
- nodejs >= v20.19.0(推荐 v22 / v24) && pnpm >= 10.32.1(强制使用 pnpm)
|
- nodejs >= v22.18.0(推荐v24) && pnpm >= 11.0.0(强制使用 pnpm)
|
||||||
- 演示地址【Vue3 + element-plus】:<http://dashboard-vue3.yudao.iocoder.cn>
|
- 演示地址【Vue3 + element-plus】:<http://dashboard-vue3.yudao.iocoder.cn>
|
||||||
- 演示地址【Vue3 + vben5(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
|
- 演示地址【Vue3 + vben5(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
|
||||||
- 演示地址【Vue2 + element-ui】:<http://dashboard.yudao.iocoder.cn>
|
- 演示地址【Vue2 + element-ui】:<http://dashboard.yudao.iocoder.cn>
|
||||||
|
|
@ -41,24 +41,24 @@
|
||||||
|
|
||||||
| 框架 | 说明 | 版本 |
|
| 框架 | 说明 | 版本 |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.30 |
|
| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.35 |
|
||||||
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 8.0.0 |
|
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 8.0.10 |
|
||||||
| [Ant Design Vue](https://www.antdv.com/) | Ant Design Vue | 4.2.6 |
|
| [Ant Design Vue](https://www.antdv.com/) | Ant Design Vue | 4.2.6 |
|
||||||
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.13.5 |
|
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.14.1 |
|
||||||
| [Naive UI](https://www.naiveui.com/) | Naive UI | 2.44.1 |
|
| [Naive UI](https://www.naiveui.com/) | Naive UI | 2.44.1 |
|
||||||
| [TDesign](https://tdesign.tencent.com/) | TDesign | 1.18.5 |
|
| [TDesign](https://tdesign.tencent.com/) | TDesign | 1.20.0 |
|
||||||
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 超集 | 5.9.3 |
|
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 超集 | 6.0.3 |
|
||||||
| [pinia](https://pinia.vuejs.org/) | Vue 存储库替代 vuex5 | 3.0.4 |
|
| [pinia](https://pinia.vuejs.org/) | Vue 存储库替代 vuex5 | 3.0.4 |
|
||||||
| [vueuse](https://vueuse.org/) | 常用工具集 | 14.2.1 |
|
| [vueuse](https://vueuse.org/) | 常用工具集 | 14.3.0 |
|
||||||
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.3.0 |
|
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.4.4 |
|
||||||
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 5.0.3 |
|
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 5.1.0 |
|
||||||
| [Tailwind CSS](https://tailwindcss.com/) | 原子 CSS | 4.2.1 |
|
| [Tailwind CSS](https://tailwindcss.com/) | 原子 CSS | 4.3.0 |
|
||||||
| [Iconify](https://iconify.design/) | 图标组件 | 5.0.0 |
|
| [Iconify](https://iconify.design/) | 图标组件 | 5.0.1 |
|
||||||
| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.449 |
|
| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.481 |
|
||||||
| [TinyMCE](https://www.tiny.cloud/) | 富文本编辑器 | 7.3.0 |
|
| [TinyMCE](https://www.tiny.cloud/) | 富文本编辑器 | 7.3.0 |
|
||||||
| [Echarts](https://echarts.apache.org/) | 图表库 | 6.0.0 |
|
| [Echarts](https://echarts.apache.org/) | 图表库 | 6.1.0 |
|
||||||
| [axios](https://axios-http.com/) | http客户端 | 1.13.6 |
|
| [axios](https://axios-http.com/) | http客户端 | 1.16.1 |
|
||||||
| [dayjs](https://day.js.org/) | 日期处理库 | 1.11.20 |
|
| [dayjs](https://day.js.org/) | 日期处理库 | 1.11.21 |
|
||||||
| [vee-validate](https://vee-validate.logaretm.com/) | 表单验证 | 4.15.1 |
|
| [vee-validate](https://vee-validate.logaretm.com/) | 表单验证 | 4.15.1 |
|
||||||
| [zod](https://zod.dev/) | 数据验证 | 3.25.76 |
|
| [zod](https://zod.dev/) | 数据验证 | 3.25.76 |
|
||||||
|
|
||||||
|
|
@ -82,9 +82,9 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
* 通用模块(必选):系统功能、基础设施
|
- 通用模块(必选):系统功能、基础设施
|
||||||
* 通用模块(可选):工作流程、支付系统、数据报表、会员中心
|
- 通用模块(可选):工作流程、支付系统、数据报表、会员中心
|
||||||
* 业务系统(按需):ERP 系统、CRM 系统、MES 系统、商城系统、微信公众号、AI 大模型、IoT 物联网
|
- 业务系统(按需):Mall 电子商城、OA 办公自动化、ERP 企业资源计划系统、WMS 仓库管理系统、CRM 客户关系管理、CMS 内容管理系统、MES 执行制造系统、AI 大模型平台、IoT 物联网系统、IM 即时通讯系统、Mobile 手机移动端、Report 数据大屏
|
||||||
|
|
||||||
### 系统功能
|
### 系统功能
|
||||||
|
|
||||||
|
|
@ -221,13 +221,13 @@
|
||||||
|
|
||||||
### 会员中心
|
### 会员中心
|
||||||
|
|
||||||
| | 功能 | 描述 |
|
| | 功能 | 描述 |
|
||||||
|-----|------|----------------------------------|
|
| --- | --- | --- |
|
||||||
| 🚀 | 会员管理 | 会员是 C 端的消费者,该功能用于会员的搜索与管理 |
|
| 🚀 | 会员管理 | 会员是 C 端的消费者,该功能用于会员的搜索与管理 |
|
||||||
| 🚀 | 会员标签 | 对会员的标签进行创建、查询、修改、删除等操作 |
|
| 🚀 | 会员标签 | 对会员的标签进行创建、查询、修改、删除等操作 |
|
||||||
| 🚀 | 会员等级 | 对会员的等级、成长值进行管理,可用于订单折扣等会员权益 |
|
| 🚀 | 会员等级 | 对会员的等级、成长值进行管理,可用于订单折扣等会员权益 |
|
||||||
| 🚀 | 会员分组 | 对会员进行分组,用于用户画像、内容推送等运营手段 |
|
| 🚀 | 会员分组 | 对会员进行分组,用于用户画像、内容推送等运营手段 |
|
||||||
| 🚀 | 积分签到 | 回馈给签到、消费等行为的积分,会员可订单抵现、积分兑换等途径消耗 |
|
| 🚀 | 积分签到 | 回馈给签到、消费等行为的积分,会员可订单抵现、积分兑换等途径消耗 |
|
||||||
|
|
||||||
### ERP 系统
|
### ERP 系统
|
||||||
|
|
||||||
|
|
@ -235,6 +235,14 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### WMS 系统
|
||||||
|
|
||||||
|
演示地址:<https://doc.iocoder.cn/wms-preview/>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### CRM 系统
|
### CRM 系统
|
||||||
|
|
||||||
演示地址:<https://doc.iocoder.cn/crm-preview/>
|
演示地址:<https://doc.iocoder.cn/crm-preview/>
|
||||||
|
|
@ -264,3 +272,15 @@
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### IM 即时通讯
|
||||||
|
|
||||||
|
演示地址(Vue3 + Vben5):<http://dashboard-vben.yudao.iocoder.cn>
|
||||||
|
|
||||||
|
使用文档:<https://doc.iocoder.cn/im-preview/>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
| 聊天界面 | 聊天管理 |
|
||||||
|
| --- | --- |
|
||||||
|
|  |  |
|
||||||
|
|
|
||||||
|
|
@ -54,12 +54,14 @@
|
||||||
"camunda-bpmn-moddle": "catalog:",
|
"camunda-bpmn-moddle": "catalog:",
|
||||||
"cropperjs": "catalog:",
|
"cropperjs": "catalog:",
|
||||||
"dayjs": "catalog:",
|
"dayjs": "catalog:",
|
||||||
|
"dhtmlx-gantt": "catalog:",
|
||||||
"diagram-js": "catalog:",
|
"diagram-js": "catalog:",
|
||||||
"fast-xml-parser": "catalog:",
|
"fast-xml-parser": "catalog:",
|
||||||
"highlight.js": "catalog:",
|
"highlight.js": "catalog:",
|
||||||
"pinia": "catalog:",
|
"pinia": "catalog:",
|
||||||
"steady-xml": "catalog:",
|
"steady-xml": "catalog:",
|
||||||
"tinymce": "catalog:",
|
"tinymce": "catalog:",
|
||||||
|
"tyme4ts": "catalog:",
|
||||||
"video.js": "catalog:",
|
"video.js": "catalog:",
|
||||||
"vue": "catalog:",
|
"vue": "catalog:",
|
||||||
"vue-dompurify-html": "catalog:",
|
"vue-dompurify-html": "catalog:",
|
||||||
|
|
|
||||||
|
|
@ -136,8 +136,8 @@ const PreviewGroup = defineAsyncComponent(() =>
|
||||||
import('ant-design-vue/es/image').then((res) => res.ImagePreviewGroup),
|
import('ant-design-vue/es/image').then((res) => res.ImagePreviewGroup),
|
||||||
);
|
);
|
||||||
|
|
||||||
const withDefaultPlaceholder = <T extends Component>(
|
const withDefaultPlaceholder = (
|
||||||
component: T,
|
component: Component,
|
||||||
type: 'input' | 'select',
|
type: 'input' | 'select',
|
||||||
componentProps: Recordable<any> = {},
|
componentProps: Recordable<any> = {},
|
||||||
) => {
|
) => {
|
||||||
|
|
@ -711,7 +711,9 @@ async function initComponentAdapter() {
|
||||||
modelValueProp: 'value',
|
modelValueProp: 'value',
|
||||||
}),
|
}),
|
||||||
Input: withDefaultPlaceholder(Input, 'input'),
|
Input: withDefaultPlaceholder(Input, 'input'),
|
||||||
InputNumber: withDefaultPlaceholder(InputNumber, 'input'),
|
InputNumber: withDefaultPlaceholder(InputNumber, 'input', {
|
||||||
|
style: { width: '100%' },
|
||||||
|
}),
|
||||||
InputPassword: withDefaultPlaceholder(InputPassword, 'input'),
|
InputPassword: withDefaultPlaceholder(InputPassword, 'input'),
|
||||||
Mentions: withDefaultPlaceholder(Mentions, 'input'),
|
Mentions: withDefaultPlaceholder(Mentions, 'input'),
|
||||||
// 自定义主要按钮
|
// 自定义主要按钮
|
||||||
|
|
|
||||||
|
|
@ -65,5 +65,6 @@ const useVbenForm = useForm<ComponentType, ComponentPropsMap>;
|
||||||
|
|
||||||
export { initSetupVbenForm, useVbenForm, z };
|
export { initSetupVbenForm, useVbenForm, z };
|
||||||
|
|
||||||
|
export type VbenFormApi = ReturnType<typeof useVbenForm>[1]; // add by 芋艿:用于 data.ts 表单 schema 内调用 setFieldValue
|
||||||
export type VbenFormSchema = FormSchema<ComponentType, ComponentPropsMap>;
|
export type VbenFormSchema = FormSchema<ComponentType, ComponentPropsMap>;
|
||||||
export type VbenFormProps = FormProps<ComponentType, ComponentPropsMap>;
|
export type VbenFormProps = FormProps<ComponentType, ComponentPropsMap>;
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,6 @@ export async function createLeave(data: BpmOALeaveApi.Leave) {
|
||||||
return requestClient.post('/bpm/oa/leave/create', data);
|
return requestClient.post('/bpm/oa/leave/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 更新请假申请 */
|
|
||||||
export async function updateLeave(data: BpmOALeaveApi.Leave) {
|
|
||||||
return requestClient.post('/bpm/oa/leave/update', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 获得请假申请 */
|
/** 获得请假申请 */
|
||||||
export async function getLeave(id: number) {
|
export async function getLeave(id: number) {
|
||||||
return requestClient.get<BpmOALeaveApi.Leave>(`/bpm/oa/leave/get?id=${id}`);
|
return requestClient.get<BpmOALeaveApi.Leave>(`/bpm/oa/leave/get?id=${id}`);
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,10 @@ export namespace CrmReceivablePlanApi {
|
||||||
returnTime: Date;
|
returnTime: Date;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
export interface PlanPageParam extends PageParam {
|
||||||
|
customerId?: number;
|
||||||
|
contractId?: number;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询回款计划列表 */
|
/** 查询回款计划列表 */
|
||||||
|
|
|
||||||
|
|
@ -3,37 +3,24 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace AlertConfigApi {
|
export namespace AlertConfigApi {
|
||||||
/** IoT 告警配置 VO */
|
/** IoT 告警配置 */
|
||||||
export interface AlertConfig {
|
export interface AlertConfig {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
level?: number;
|
level?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
sceneRuleIds?: number[];
|
sceneRuleIds?: number[];
|
||||||
receiveUserIds?: number[];
|
receiveUserIds?: number[];
|
||||||
receiveUserNames?: string;
|
receiveUserNames?: string[];
|
||||||
receiveTypes?: number[];
|
receiveTypes?: number[];
|
||||||
|
smsTemplateCode?: string;
|
||||||
|
mailTemplateCode?: string;
|
||||||
|
notifyTemplateCode?: string;
|
||||||
createTime?: Date;
|
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) {
|
export function getAlertConfigPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<AlertConfigApi.AlertConfig>>(
|
return requestClient.get<PageResult<AlertConfigApi.AlertConfig>>(
|
||||||
|
|
@ -49,20 +36,20 @@ export function getAlertConfig(id: number) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询所有告警配置列表 */
|
/** 获取告警配置简单列表 */
|
||||||
export function getAlertConfigList() {
|
export function getSimpleAlertConfigList() {
|
||||||
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
return requestClient.get<AlertConfigApi.AlertConfig[]>(
|
||||||
'/iot/alert-config/list',
|
'/iot/alert-config/simple-list',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增告警配置 */
|
/** 新增告警配置 */
|
||||||
export function createAlertConfig(data: AlertConfig) {
|
export function createAlertConfig(data: AlertConfigApi.AlertConfig) {
|
||||||
return requestClient.post('/iot/alert-config/create', data);
|
return requestClient.post('/iot/alert-config/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改告警配置 */
|
/** 修改告警配置 */
|
||||||
export function updateAlertConfig(data: AlertConfig) {
|
export function updateAlertConfig(data: AlertConfigApi.AlertConfig) {
|
||||||
return requestClient.put('/iot/alert-config/update', data);
|
return requestClient.put('/iot/alert-config/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,25 +57,3 @@ export function updateAlertConfig(data: AlertConfig) {
|
||||||
export function deleteAlertConfig(id: number) {
|
export function deleteAlertConfig(id: number) {
|
||||||
return requestClient.delete(`/iot/alert-config/delete?id=${id}`);
|
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',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -3,41 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace AlertRecordApi {
|
export namespace AlertRecordApi {
|
||||||
/** IoT 告警记录 VO */
|
/** IoT 告警记录 */
|
||||||
export interface AlertRecord {
|
export interface AlertRecord {
|
||||||
id?: number;
|
id?: number;
|
||||||
configId?: number;
|
configId?: number;
|
||||||
configName?: string;
|
configName?: string;
|
||||||
configLevel?: number;
|
configLevel?: number;
|
||||||
deviceId?: number;
|
deviceId?: number;
|
||||||
deviceName?: string;
|
|
||||||
productId?: number;
|
productId?: number;
|
||||||
productName?: string;
|
deviceMessage?: any;
|
||||||
deviceMessage?: string;
|
|
||||||
processStatus?: boolean;
|
processStatus?: boolean;
|
||||||
processRemark?: string;
|
processRemark?: string;
|
||||||
processTime?: Date;
|
|
||||||
createTime?: 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) {
|
export function getAlertRecordPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<AlertRecordApi.AlertRecord>>(
|
return requestClient.get<PageResult<AlertRecordApi.AlertRecord>>(
|
||||||
|
|
@ -54,29 +34,9 @@ export function getAlertRecord(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 处理告警记录 */
|
/** 处理告警记录 */
|
||||||
export function processAlertRecord(id: number, remark?: string) {
|
export function processAlertRecord(id: number, processRemark?: string) {
|
||||||
return requestClient.put('/iot/alert-record/process', {
|
return requestClient.put('/iot/alert-record/process', {
|
||||||
id,
|
id,
|
||||||
remark,
|
processRemark,
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 批量处理告警记录 */
|
|
||||||
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(',') },
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,11 +150,8 @@ export function importDeviceTemplate() {
|
||||||
/** 导入设备 */
|
/** 导入设备 */
|
||||||
export function importDevice(file: File, updateSupport: boolean) {
|
export function importDevice(file: File, updateSupport: boolean) {
|
||||||
return requestClient.upload<IotDeviceApi.DeviceImportRespVO>(
|
return requestClient.upload<IotDeviceApi.DeviceImportRespVO>(
|
||||||
'/iot/device/import',
|
`/iot/device/import?updateSupport=${updateSupport}`,
|
||||||
{
|
{ file },
|
||||||
file,
|
|
||||||
updateSupport,
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,7 +165,7 @@ export function getLatestDeviceProperties(params: any) {
|
||||||
|
|
||||||
/** 获取设备属性历史数据 */
|
/** 获取设备属性历史数据 */
|
||||||
export function getHistoryDevicePropertyList(params: any) {
|
export function getHistoryDevicePropertyList(params: any) {
|
||||||
return requestClient.get<PageResult<IotDeviceApi.DeviceProperty>>(
|
return requestClient.get<IotDeviceApi.DeviceProperty[]>(
|
||||||
'/iot/device/property/history-list',
|
'/iot/device/property/history-list',
|
||||||
{ params },
|
{ params },
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -3,39 +3,22 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace IoTOtaFirmwareApi {
|
export namespace IoTOtaFirmwareApi {
|
||||||
/** IoT OTA 固件 VO */
|
/** IoT OTA 固件信息 */
|
||||||
export interface Firmware {
|
export interface Firmware {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
version: string;
|
|
||||||
productId: number;
|
|
||||||
productName?: string;
|
|
||||||
description?: string;
|
description?: string;
|
||||||
|
version?: string;
|
||||||
|
productId?: number;
|
||||||
|
productName?: string;
|
||||||
fileUrl?: string;
|
fileUrl?: string;
|
||||||
fileMd5?: string;
|
|
||||||
fileSize?: number;
|
fileSize?: number;
|
||||||
status?: number;
|
fileDigestAlgorithm?: string;
|
||||||
|
fileDigestValue?: string;
|
||||||
createTime?: Date;
|
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 固件分页 */
|
/** 查询 OTA 固件分页 */
|
||||||
export function getOtaFirmwarePage(params: PageParam) {
|
export function getOtaFirmwarePage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<IoTOtaFirmwareApi.Firmware>>(
|
return requestClient.get<PageResult<IoTOtaFirmwareApi.Firmware>>(
|
||||||
|
|
@ -52,12 +35,12 @@ export function getOtaFirmware(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增 OTA 固件 */
|
/** 新增 OTA 固件 */
|
||||||
export function createOtaFirmware(data: IoTOtaFirmware) {
|
export function createOtaFirmware(data: IoTOtaFirmwareApi.Firmware) {
|
||||||
return requestClient.post('/iot/ota/firmware/create', data);
|
return requestClient.post('/iot/ota/firmware/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改 OTA 固件 */
|
/** 修改 OTA 固件 */
|
||||||
export function updateOtaFirmware(data: IoTOtaFirmware) {
|
export function updateOtaFirmware(data: IoTOtaFirmwareApi.Firmware) {
|
||||||
return requestClient.put('/iot/ota/firmware/update', data);
|
return requestClient.put('/iot/ota/firmware/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -65,26 +48,3 @@ export function updateOtaFirmware(data: IoTOtaFirmware) {
|
||||||
export function deleteOtaFirmware(id: number) {
|
export function deleteOtaFirmware(id: number) {
|
||||||
return requestClient.delete(`/iot/ota/firmware/delete?id=${id}`);
|
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 } },
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -3,45 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace IoTOtaTaskApi {
|
export namespace IoTOtaTaskApi {
|
||||||
/** IoT OTA 升级任务 VO */
|
/** IoT OTA 升级任务 */
|
||||||
export interface Task {
|
export interface Task {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
firmwareId: number;
|
firmwareId?: number;
|
||||||
firmwareName?: string;
|
status?: number;
|
||||||
productId?: number;
|
|
||||||
productName?: string;
|
|
||||||
deviceScope?: number;
|
deviceScope?: number;
|
||||||
deviceIds?: number[];
|
deviceIds?: number[];
|
||||||
status?: number;
|
deviceTotalCount?: number;
|
||||||
successCount?: number;
|
deviceSuccessCount?: number;
|
||||||
failureCount?: number;
|
|
||||||
pendingCount?: number;
|
|
||||||
createTime?: Date;
|
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 升级任务分页 */
|
/** 查询 OTA 升级任务分页 */
|
||||||
export function getOtaTaskPage(params: PageParam) {
|
export function getOtaTaskPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<IoTOtaTaskApi.Task>>(
|
return requestClient.get<PageResult<IoTOtaTaskApi.Task>>(
|
||||||
|
|
@ -56,43 +32,11 @@ export function getOtaTask(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增 OTA 升级任务 */
|
/** 新增 OTA 升级任务 */
|
||||||
export function createOtaTask(data: OtaTask) {
|
export function createOtaTask(data: IoTOtaTaskApi.Task) {
|
||||||
return requestClient.post('/iot/ota/task/create', data);
|
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 升级任务 */
|
/** 取消 OTA 升级任务 */
|
||||||
export function cancelOtaTask(id: number) {
|
export function cancelOtaTask(id: number) {
|
||||||
return requestClient.put(`/iot/ota/task/cancel?id=${id}`);
|
return requestClient.post(`/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}`);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,44 +3,24 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace IoTOtaTaskRecordApi {
|
export namespace IoTOtaTaskRecordApi {
|
||||||
/** IoT OTA 升级任务记录 VO */
|
/** IoT OTA 升级任务记录 */
|
||||||
export interface TaskRecord {
|
export interface TaskRecord {
|
||||||
id?: number;
|
id?: number;
|
||||||
taskId: number;
|
|
||||||
taskName?: string;
|
|
||||||
deviceId: number;
|
|
||||||
deviceName?: string;
|
|
||||||
firmwareId?: number;
|
firmwareId?: number;
|
||||||
firmwareName?: string;
|
|
||||||
firmwareVersion?: string;
|
firmwareVersion?: string;
|
||||||
|
taskId?: number;
|
||||||
|
deviceId?: string;
|
||||||
|
deviceName?: string;
|
||||||
|
currentVersion?: string;
|
||||||
|
fromFirmwareId?: number;
|
||||||
|
fromFirmwareVersion?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
progress?: number;
|
progress?: number;
|
||||||
errorMessage?: string;
|
description?: string;
|
||||||
startTime?: Date;
|
updateTime?: Date;
|
||||||
endTime?: Date;
|
|
||||||
createTime?: Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @AI:这里应该拿到 IoTOtaTaskRecordApi 里
|
|
||||||
/** 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 升级任务记录分页 */
|
/** 查询 OTA 升级任务记录分页 */
|
||||||
export function getOtaTaskRecordPage(params: PageParam) {
|
export function getOtaTaskRecordPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<IoTOtaTaskRecordApi.TaskRecord>>(
|
return requestClient.get<PageResult<IoTOtaTaskRecordApi.TaskRecord>>(
|
||||||
|
|
@ -49,48 +29,12 @@ export function getOtaTaskRecordPage(params: PageParam) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询 OTA 升级任务记录详情 */
|
/** 取消 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) {
|
export function cancelOtaTaskRecord(id: number) {
|
||||||
return requestClient.put(`/iot/ota/task/record/cancel?id=${id}`);
|
return requestClient.put(`/iot/ota/task/record/cancel?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取升级任务记录状态统计 */
|
/** 获取 OTA 升级任务记录状态统计 */
|
||||||
export function getOtaTaskRecordStatusStatistics(
|
export function getOtaTaskRecordStatusStatistics(
|
||||||
firmwareId?: number,
|
firmwareId?: number,
|
||||||
taskId?: number,
|
taskId?: number,
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,10 @@ export namespace IotProductCategoryApi {
|
||||||
export interface ProductCategory {
|
export interface ProductCategory {
|
||||||
id?: number; // 分类 ID
|
id?: number; // 分类 ID
|
||||||
name: string; // 分类名称
|
name: string; // 分类名称
|
||||||
parentId?: number; // 父级分类 ID
|
|
||||||
sort?: number; // 分类排序
|
sort?: number; // 分类排序
|
||||||
status?: number; // 分类状态
|
status?: number; // 分类状态
|
||||||
description?: string; // 分类描述
|
description?: string; // 分类描述
|
||||||
createTime?: string; // 创建时间
|
createTime?: Date; // 创建时间
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@ export namespace IotProductApi {
|
||||||
deviceType?: number; // 设备类型
|
deviceType?: number; // 设备类型
|
||||||
netType?: number; // 联网方式
|
netType?: number; // 联网方式
|
||||||
serializeType?: string; // 序列化类型
|
serializeType?: string; // 序列化类型
|
||||||
dataFormat?: number; // 数据格式
|
|
||||||
validateType?: number; // 认证方式
|
|
||||||
registerEnabled?: boolean; // 是否开启动态注册
|
registerEnabled?: boolean; // 是否开启动态注册
|
||||||
deviceCount?: number; // 设备数量
|
deviceCount?: number; // 设备数量
|
||||||
createTime?: Date; // 创建时间
|
createTime?: Date; // 创建时间
|
||||||
|
|
@ -103,3 +101,10 @@ export function getProductByKey(productKey: string) {
|
||||||
params: { productKey },
|
params: { productKey },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 同步产品物模型 TDengine 超级表结构 */
|
||||||
|
export function syncProductPropertyTable(productId: number) {
|
||||||
|
return requestClient.post(
|
||||||
|
`/iot/product/sync-property-table?productId=${productId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,45 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace DataRuleApi {
|
export namespace DataRuleApi {
|
||||||
/** IoT 数据流转规则 VO */
|
/** IoT 数据流转规则 */
|
||||||
export interface Rule {
|
export interface DataRule {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
productId?: number;
|
sourceConfigs?: any[];
|
||||||
productKey?: string;
|
|
||||||
sourceConfigs?: SourceConfig[];
|
|
||||||
sinkIds?: number[];
|
sinkIds?: number[];
|
||||||
createTime?: Date;
|
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) {
|
export function getDataRulePage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<DataRuleApi.Rule>>(
|
return requestClient.get<PageResult<DataRuleApi.DataRule>>(
|
||||||
'/iot/data-rule/page',
|
'/iot/data-rule/page',
|
||||||
{ params },
|
{ params },
|
||||||
);
|
);
|
||||||
|
|
@ -49,16 +25,16 @@ export function getDataRulePage(params: PageParam) {
|
||||||
|
|
||||||
/** 查询数据流转规则详情 */
|
/** 查询数据流转规则详情 */
|
||||||
export function getDataRule(id: number) {
|
export function getDataRule(id: number) {
|
||||||
return requestClient.get<DataRuleApi.Rule>(`/iot/data-rule/get?id=${id}`);
|
return requestClient.get<DataRuleApi.DataRule>(`/iot/data-rule/get?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增数据流转规则 */
|
/** 新增数据流转规则 */
|
||||||
export function createDataRule(data: DataRule) {
|
export function createDataRule(data: DataRuleApi.DataRule) {
|
||||||
return requestClient.post('/iot/data-rule/create', data);
|
return requestClient.post('/iot/data-rule/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改数据流转规则 */
|
/** 修改数据流转规则 */
|
||||||
export function updateDataRule(data: DataRule) {
|
export function updateDataRule(data: DataRuleApi.DataRule) {
|
||||||
return requestClient.put('/iot/data-rule/update', data);
|
return requestClient.put('/iot/data-rule/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,18 +42,3 @@ export function updateDataRule(data: DataRule) {
|
||||||
export function deleteDataRule(id: number) {
|
export function deleteDataRule(id: number) {
|
||||||
return requestClient.delete(`/iot/data-rule/delete?id=${id}`);
|
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,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -2,101 +2,147 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
interface BaseConfig {
|
||||||
|
type: string;
|
||||||
|
}
|
||||||
|
|
||||||
export namespace DataSinkApi {
|
export namespace DataSinkApi {
|
||||||
/** IoT 数据流转目的 VO */
|
/** IoT 数据流转目的 VO */
|
||||||
export interface Sink {
|
export interface DataSink {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
type: string;
|
direction?: number;
|
||||||
config?: any;
|
type?: number;
|
||||||
|
config?:
|
||||||
|
| DatabaseConfig
|
||||||
|
| HttpConfig
|
||||||
|
| KafkaMQConfig
|
||||||
|
| MqttConfig
|
||||||
|
| RabbitMQConfig
|
||||||
|
| RedisStreamMQConfig
|
||||||
|
| RocketMQConfig
|
||||||
|
| TcpConfig
|
||||||
|
| WebSocketConfig;
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** HTTP 配置 */
|
||||||
|
export interface HttpConfig extends BaseConfig {
|
||||||
|
url: string;
|
||||||
|
method: string;
|
||||||
|
headers: Record<string, string>;
|
||||||
|
query: Record<string, string>;
|
||||||
|
body: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** TCP 配置 */
|
||||||
|
export interface TcpConfig extends BaseConfig {
|
||||||
|
host: string;
|
||||||
|
port: number;
|
||||||
|
connectTimeoutMs: number;
|
||||||
|
readTimeoutMs: number;
|
||||||
|
ssl: boolean;
|
||||||
|
sslCertPath: string;
|
||||||
|
dataFormat: string;
|
||||||
|
heartbeatIntervalMs: number;
|
||||||
|
reconnectIntervalMs: number;
|
||||||
|
maxReconnectAttempts: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** WebSocket 配置 */
|
||||||
|
export interface WebSocketConfig extends BaseConfig {
|
||||||
|
serverUrl: string;
|
||||||
|
connectTimeoutMs: number;
|
||||||
|
sendTimeoutMs: number;
|
||||||
|
heartbeatIntervalMs: number;
|
||||||
|
heartbeatMessage: string;
|
||||||
|
subprotocols: string;
|
||||||
|
customHeaders: string;
|
||||||
|
verifySslCert: boolean;
|
||||||
|
dataFormat: string;
|
||||||
|
reconnectIntervalMs: number;
|
||||||
|
maxReconnectAttempts: number;
|
||||||
|
enableCompression: boolean;
|
||||||
|
sendRetryCount: number;
|
||||||
|
sendRetryIntervalMs: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MQTT 配置 */
|
||||||
|
export interface MqttConfig extends BaseConfig {
|
||||||
|
url: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
clientId: string;
|
||||||
|
topic: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Database 配置 */
|
||||||
|
export interface DatabaseConfig extends BaseConfig {
|
||||||
|
jdbcUrl: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
tableName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** RocketMQ 配置 */
|
||||||
|
export interface RocketMQConfig extends BaseConfig {
|
||||||
|
nameServer: string;
|
||||||
|
accessKey: string;
|
||||||
|
secretKey: string;
|
||||||
|
group: string;
|
||||||
|
topic: string;
|
||||||
|
tags: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Kafka 配置 */
|
||||||
|
export interface KafkaMQConfig extends BaseConfig {
|
||||||
|
bootstrapServers: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
ssl: boolean;
|
||||||
|
topic: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** RabbitMQ 配置 */
|
||||||
|
export interface RabbitMQConfig extends BaseConfig {
|
||||||
|
host: string;
|
||||||
|
port: number;
|
||||||
|
virtualHost: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
exchange: string;
|
||||||
|
routingKey: string;
|
||||||
|
queue: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Redis Stream MQ 配置 */
|
||||||
|
export interface RedisStreamMQConfig extends BaseConfig {
|
||||||
|
host: string;
|
||||||
|
port: number;
|
||||||
|
password: string;
|
||||||
|
database: number;
|
||||||
|
topic: string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 数据流转目的 */
|
/** 数据流转目的类型 */
|
||||||
export interface DataSinkVO {
|
export const IotDataSinkTypeEnum = {
|
||||||
id?: number;
|
HTTP: 1,
|
||||||
name?: string;
|
TCP: 2,
|
||||||
description?: string;
|
WEBSOCKET: 3,
|
||||||
status?: number;
|
MQTT: 10,
|
||||||
type?: string;
|
DATABASE: 20,
|
||||||
config?: any;
|
REDIS_STREAM: 21,
|
||||||
createTime?: Date;
|
ROCKETMQ: 30,
|
||||||
}
|
RABBITMQ: 31,
|
||||||
|
KAFKA: 32,
|
||||||
/** IoT 数据目的类型枚举 */
|
} as const;
|
||||||
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) {
|
export function getDataSinkPage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<DataSinkApi.Sink>>(
|
return requestClient.get<PageResult<DataSinkApi.DataSink>>(
|
||||||
'/iot/data-sink/page',
|
'/iot/data-sink/page',
|
||||||
{ params },
|
{ params },
|
||||||
);
|
);
|
||||||
|
|
@ -104,26 +150,23 @@ export function getDataSinkPage(params: PageParam) {
|
||||||
|
|
||||||
/** 查询数据流转目的详情 */
|
/** 查询数据流转目的详情 */
|
||||||
export function getDataSink(id: number) {
|
export function getDataSink(id: number) {
|
||||||
return requestClient.get<DataSinkApi.Sink>(`/iot/data-sink/get?id=${id}`);
|
return requestClient.get<DataSinkApi.DataSink>(`/iot/data-sink/get?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询所有数据流转目的列表 */
|
/** 查询数据流转目的(精简)列表 */
|
||||||
export function getDataSinkList() {
|
|
||||||
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/list');
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询数据流转目的简单列表 */
|
|
||||||
export function getDataSinkSimpleList() {
|
export function getDataSinkSimpleList() {
|
||||||
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/simple-list');
|
return requestClient.get<DataSinkApi.DataSink[]>(
|
||||||
|
'/iot/data-sink/simple-list',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增数据流转目的 */
|
/** 新增数据流转目的 */
|
||||||
export function createDataSink(data: DataSinkVO) {
|
export function createDataSink(data: DataSinkApi.DataSink) {
|
||||||
return requestClient.post('/iot/data-sink/create', data);
|
return requestClient.post('/iot/data-sink/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改数据流转目的 */
|
/** 修改数据流转目的 */
|
||||||
export function updateDataSink(data: DataSinkVO) {
|
export function updateDataSink(data: DataSinkApi.DataSink) {
|
||||||
return requestClient.put('/iot/data-sink/update', data);
|
return requestClient.put('/iot/data-sink/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -131,18 +174,3 @@ export function updateDataSink(data: DataSinkVO) {
|
||||||
export function deleteDataSink(id: number) {
|
export function deleteDataSink(id: number) {
|
||||||
return requestClient.delete(`/iot/data-sink/delete?id=${id}`);
|
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,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -11,25 +11,20 @@ export namespace RuleSceneApi {
|
||||||
status?: number;
|
status?: number;
|
||||||
triggers?: Trigger[];
|
triggers?: Trigger[];
|
||||||
actions?: Action[];
|
actions?: Action[];
|
||||||
|
lastTriggerTime?: Date;
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 场景联动规则的触发器 */
|
/** 场景联动规则的触发器 */
|
||||||
export interface Trigger {
|
export interface Trigger {
|
||||||
type?: string;
|
type?: number;
|
||||||
productId?: number;
|
productId?: number;
|
||||||
deviceId?: number;
|
deviceId?: number;
|
||||||
identifier?: string;
|
identifier?: string;
|
||||||
operator?: string;
|
operator?: string;
|
||||||
value?: any;
|
value?: any;
|
||||||
cronExpression?: string;
|
cronExpression?: string;
|
||||||
conditionGroups?: TriggerConditionGroup[];
|
conditionGroups?: TriggerCondition[][]; // 后端结构:List<List<TriggerCondition>>;外层「或」、组内「且」
|
||||||
}
|
|
||||||
|
|
||||||
/** 场景联动规则的触发条件组 */
|
|
||||||
export interface TriggerConditionGroup {
|
|
||||||
conditions?: TriggerCondition[];
|
|
||||||
operator?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 场景联动规则的触发条件 */
|
/** 场景联动规则的触发条件 */
|
||||||
|
|
@ -39,72 +34,22 @@ export namespace RuleSceneApi {
|
||||||
identifier?: string;
|
identifier?: string;
|
||||||
operator?: string;
|
operator?: string;
|
||||||
value?: any;
|
value?: any;
|
||||||
type?: string;
|
type?: number;
|
||||||
|
param?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 场景联动规则的动作 */
|
/** 场景联动规则的动作 */
|
||||||
export interface Action {
|
export interface Action {
|
||||||
type?: string;
|
type?: number;
|
||||||
productId?: number;
|
productId?: number;
|
||||||
deviceId?: number;
|
deviceId?: number;
|
||||||
identifier?: string;
|
identifier?: string;
|
||||||
value?: any;
|
value?: any;
|
||||||
alertConfigId?: number;
|
alertConfigId?: number;
|
||||||
|
params?: string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @haohao:貌似下面的,和 RuleSceneApi 重复了。
|
|
||||||
/** 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;
|
|
||||||
params?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询场景联动规则分页 */
|
/** 查询场景联动规则分页 */
|
||||||
export function getSceneRulePage(params: PageParam) {
|
export function getSceneRulePage(params: PageParam) {
|
||||||
return requestClient.get<PageResult<RuleSceneApi.SceneRule>>(
|
return requestClient.get<PageResult<RuleSceneApi.SceneRule>>(
|
||||||
|
|
@ -121,12 +66,12 @@ export function getSceneRule(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增场景联动规则 */
|
/** 新增场景联动规则 */
|
||||||
export function createSceneRule(data: IotSceneRule) {
|
export function createSceneRule(data: RuleSceneApi.SceneRule) {
|
||||||
return requestClient.post('/iot/scene-rule/create', data);
|
return requestClient.post('/iot/scene-rule/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改场景联动规则 */
|
/** 修改场景联动规则 */
|
||||||
export function updateSceneRule(data: IotSceneRule) {
|
export function updateSceneRule(data: RuleSceneApi.SceneRule) {
|
||||||
return requestClient.put('/iot/scene-rule/update', data);
|
return requestClient.put('/iot/scene-rule/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -135,14 +80,6 @@ export function deleteSceneRule(id: number) {
|
||||||
return requestClient.delete(`/iot/scene-rule/delete?id=${id}`);
|
return requestClient.delete(`/iot/scene-rule/delete?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除场景联动规则 */
|
|
||||||
// TODO @haohao:貌似用上。
|
|
||||||
export function deleteSceneRuleList(ids: number[]) {
|
|
||||||
return requestClient.delete('/iot/scene-rule/delete-list', {
|
|
||||||
params: { ids: ids.join(',') },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 更新场景联动规则状态 */
|
/** 更新场景联动规则状态 */
|
||||||
export function updateSceneRuleStatus(id: number, status: number) {
|
export function updateSceneRuleStatus(id: number, status: number) {
|
||||||
return requestClient.put(`/iot/scene-rule/update-status`, {
|
return requestClient.put(`/iot/scene-rule/update-status`, {
|
||||||
|
|
|
||||||
|
|
@ -17,18 +17,6 @@ export namespace IotStatisticsApi {
|
||||||
productCategoryDeviceCounts: Record<string, number>; // 按品类统计的设备数量
|
productCategoryDeviceCounts: Record<string, number>; // 按品类统计的设备数量
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 时间戳-数值的键值对类型 */
|
|
||||||
export interface TimeValueItem {
|
|
||||||
[key: string]: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 消息统计数据类型 */
|
|
||||||
export interface DeviceMessageSummary {
|
|
||||||
statType: number;
|
|
||||||
upstreamCounts: TimeValueItem[];
|
|
||||||
downstreamCounts: TimeValueItem[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 设备消息数量统计(按日期) */
|
/** 设备消息数量统计(按日期) */
|
||||||
export interface DeviceMessageSummaryByDateRespVO {
|
export interface DeviceMessageSummaryByDateRespVO {
|
||||||
time: string; // 时间轴
|
time: string; // 时间轴
|
||||||
|
|
|
||||||
|
|
@ -1,126 +1,209 @@
|
||||||
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
|
|
||||||
import type { PageParam, PageResult } from '@vben/request';
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { isEmpty } from '@vben/utils';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace ThingModelApi {
|
export namespace ThingModelApi {
|
||||||
/** IoT 物模型数据 VO */
|
/** IoT 物模型数据 */
|
||||||
export interface ThingModel {
|
export interface ThingModel {
|
||||||
id?: number;
|
id?: number;
|
||||||
productId?: number;
|
productId?: number;
|
||||||
productKey?: string;
|
productKey?: string;
|
||||||
identifier: string;
|
identifier?: string;
|
||||||
name: string;
|
name?: string;
|
||||||
desc?: string;
|
description?: string;
|
||||||
type: string;
|
dataType?: string;
|
||||||
property?: ThingModelProperty;
|
type?: number; // 参见 IoTThingModelTypeEnum 枚举类
|
||||||
event?: ThingModelEvent;
|
property?: Property;
|
||||||
service?: ThingModelService;
|
event?: Event;
|
||||||
|
service?: Service;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型属性 */
|
/** IoT 物模型属性 */
|
||||||
export interface Property {
|
export interface Property {
|
||||||
identifier: string;
|
identifier?: string;
|
||||||
name: string;
|
name?: string;
|
||||||
accessMode: string;
|
accessMode?: string;
|
||||||
dataType: string;
|
required?: boolean;
|
||||||
|
dataType?: string;
|
||||||
|
description?: string;
|
||||||
dataSpecs?: any;
|
dataSpecs?: any;
|
||||||
dataSpecsList?: any[];
|
dataSpecsList?: any[];
|
||||||
desc?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型服务 */
|
/** IoT 物模型服务 */
|
||||||
export interface Service {
|
export interface Service {
|
||||||
identifier: string;
|
identifier?: string;
|
||||||
name: string;
|
name?: string;
|
||||||
callType: string;
|
required?: boolean;
|
||||||
inputData?: any[];
|
callType?: string;
|
||||||
outputData?: any[];
|
description?: string;
|
||||||
desc?: string;
|
inputParams?: Param[];
|
||||||
|
outputParams?: Param[];
|
||||||
|
method?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型事件 */
|
/** IoT 物模型事件 */
|
||||||
export interface Event {
|
export interface Event {
|
||||||
identifier: string;
|
identifier?: string;
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
type?: string;
|
||||||
|
description?: string;
|
||||||
|
outputParams?: Param[];
|
||||||
|
method?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型参数 */
|
||||||
|
export interface Param {
|
||||||
|
identifier?: string;
|
||||||
|
name?: string;
|
||||||
|
direction?: string;
|
||||||
|
paraOrder?: number;
|
||||||
|
dataType?: string;
|
||||||
|
dataSpecs?: any;
|
||||||
|
dataSpecsList?: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** IoT 物模型 TSL(树形)响应 */
|
||||||
|
export interface ThingModelTSL {
|
||||||
|
productId?: number;
|
||||||
|
productKey?: string;
|
||||||
|
properties?: Property[];
|
||||||
|
events?: Event[];
|
||||||
|
services?: Service[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 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;
|
name: string;
|
||||||
type: string;
|
|
||||||
outputData?: any[];
|
|
||||||
desc?: string;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型数据 */
|
/** 生成「必填 + 数字」类校验器:拼到 size / length / 枚举值上 */
|
||||||
export interface ThingModelData {
|
function buildRequiredNumberValidator(label: string) {
|
||||||
id?: number;
|
return (_rule: any, value: any, callback: any) => {
|
||||||
productId?: number;
|
if (isEmpty(value)) {
|
||||||
productKey?: string;
|
callback(new Error(`${label}不能为空`));
|
||||||
identifier?: string;
|
return;
|
||||||
name?: string;
|
}
|
||||||
desc?: string;
|
if (Number.isNaN(Number(value))) {
|
||||||
type?: string;
|
callback(new Error(`${label}必须是数字`));
|
||||||
dataType?: string;
|
return;
|
||||||
property?: ThingModelProperty;
|
}
|
||||||
event?: ThingModelEvent;
|
callback();
|
||||||
service?: ThingModelService;
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 物模型属性 */
|
/** 生成「标识符样式」名称校验器:开头需为中文 / 英文 / 数字,整体仅允许中文、英文、数字、下划线、短划线,长度 ≤ 20 */
|
||||||
export interface ThingModelProperty {
|
export function buildIdentifierLikeNameValidator(label: string) {
|
||||||
identifier?: string;
|
return (_rule: any, value: string, callback: any) => {
|
||||||
name?: string;
|
if (isEmpty(value)) {
|
||||||
accessMode?: string;
|
callback(new Error(`${label}不能为空`));
|
||||||
dataType?: string;
|
return;
|
||||||
dataSpecs?: any;
|
}
|
||||||
dataSpecsList?: any[];
|
if (!/^[一-龥A-Za-z0-9]/.test(value)) {
|
||||||
desc?: string;
|
callback(new Error(`${label}必须以中文、英文字母或数字开头`));
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
/** IoT 物模型服务 */
|
if (!/^[一-龥A-Za-z0-9][\w一-龥-]*$/.test(value)) {
|
||||||
export interface ThingModelService {
|
callback(
|
||||||
identifier?: string;
|
new Error(`${label}只能包含中文、英文字母、数字、下划线和短划线`),
|
||||||
name?: string;
|
);
|
||||||
callType?: string;
|
return;
|
||||||
inputData?: any[];
|
}
|
||||||
outputData?: any[];
|
if (value.length > 20) {
|
||||||
desc?: string;
|
callback(new Error(`${label}长度不能超过 20 个字符`));
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
/** IoT 物模型事件 */
|
callback();
|
||||||
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 物模型表单校验规则 */
|
/** IoT 物模型表单校验规则 */
|
||||||
export interface ThingModelFormRules {
|
export const ThingModelFormRules: Record<string, Rule[]> = {
|
||||||
[key: string]: any;
|
name: [
|
||||||
}
|
{ required: true, message: '功能名称不能为空', trigger: 'blur' },
|
||||||
|
{
|
||||||
|
pattern: /^[一-龥A-Za-z0-9][一-龥A-Za-z0-9\-_/.]{0,29}$/,
|
||||||
|
message:
|
||||||
|
'支持中文、大小写字母、日文、数字、短划线、下划线、斜杠和小数点,必须以中文、英文或数字开头,不超过 30 个字符',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
type: [{ required: true, message: '功能类型不能为空', trigger: 'blur' }],
|
||||||
|
identifier: [
|
||||||
|
{ required: true, message: '标识符不能为空', trigger: 'blur' },
|
||||||
|
{
|
||||||
|
pattern: /^[a-zA-Z][a-zA-Z0-9_]{0,31}$/,
|
||||||
|
message: '支持大小写字母、数字和下划线,必须以字母开头,不超过 32 个字符',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: (_rule: any, value: string, callback: any) => {
|
||||||
|
const reservedKeywords = [
|
||||||
|
'set',
|
||||||
|
'get',
|
||||||
|
'post',
|
||||||
|
'property',
|
||||||
|
'event',
|
||||||
|
'time',
|
||||||
|
'value',
|
||||||
|
];
|
||||||
|
if (reservedKeywords.includes(value)) {
|
||||||
|
callback(
|
||||||
|
new Error(
|
||||||
|
'set, get, post, property, event, time, value 是系统保留字段,不能用于标识符定义',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (/^\d+$/.test(value)) {
|
||||||
|
callback(new Error('标识符不能是纯数字'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
childDataType: [{ required: true, message: '元素类型不能为空' }],
|
||||||
|
size: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: buildRequiredNumberValidator('元素个数'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
length: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: buildRequiredNumberValidator('文本长度'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
accessMode: [
|
||||||
|
{ required: true, message: '请选择读写类型', trigger: 'change' },
|
||||||
|
],
|
||||||
|
callType: [{ required: true, message: '请选择调用方式', trigger: 'change' }],
|
||||||
|
eventType: [{ required: true, message: '请选择事件类型', trigger: 'change' }],
|
||||||
|
};
|
||||||
|
|
||||||
/** 验证布尔型名称 */
|
/** 校验布尔值名称 */
|
||||||
export function validateBoolName(_rule: any, value: any, callback: any) {
|
export const validateBoolName = buildIdentifierLikeNameValidator('布尔值名称');
|
||||||
if (value) {
|
|
||||||
callback();
|
|
||||||
} else {
|
|
||||||
callback(new Error('枚举描述不能为空'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询产品物模型分页 */
|
/** 查询产品物模型分页 */
|
||||||
export function getThingModelPage(params: PageParam) {
|
export function getThingModelPage(params: PageParam) {
|
||||||
|
|
@ -141,17 +224,19 @@ export function getThingModel(id: number) {
|
||||||
export function getThingModelListByProductId(productId: number) {
|
export function getThingModelListByProductId(productId: number) {
|
||||||
return requestClient.get<ThingModelApi.ThingModel[]>(
|
return requestClient.get<ThingModelApi.ThingModel[]>(
|
||||||
'/iot/thing-model/list',
|
'/iot/thing-model/list',
|
||||||
{ params: { productId } },
|
{
|
||||||
|
params: { productId },
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增物模型 */
|
/** 新增物模型 */
|
||||||
export function createThingModel(data: ThingModelData) {
|
export function createThingModel(data: ThingModelApi.ThingModel) {
|
||||||
return requestClient.post('/iot/thing-model/create', data);
|
return requestClient.post('/iot/thing-model/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改物模型 */
|
/** 修改物模型 */
|
||||||
export function updateThingModel(data: ThingModelData) {
|
export function updateThingModel(data: ThingModelApi.ThingModel) {
|
||||||
return requestClient.put('/iot/thing-model/update', data);
|
return requestClient.put('/iot/thing-model/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -161,26 +246,11 @@ export function deleteThingModel(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取物模型 TSL */
|
/** 获取物模型 TSL */
|
||||||
export function getThingModelTSL(productId: number) {
|
export function getThingModelTSLByProductId(productId: number) {
|
||||||
return requestClient.get<ThingModelApi.ThingModel[]>(
|
return requestClient.get<ThingModelApi.ThingModelTSL>(
|
||||||
'/iot/thing-model/get-tsl',
|
'/iot/thing-model/get-tsl',
|
||||||
{ params: { productId } },
|
{
|
||||||
|
params: { productId },
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导入物模型 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 },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { requestClient } from '#/api/request';
|
||||||
export namespace MallTradeStatisticsApi {
|
export namespace MallTradeStatisticsApi {
|
||||||
/** 交易状况 Request */
|
/** 交易状况 Request */
|
||||||
export interface TradeTrendReqVO {
|
export interface TradeTrendReqVO {
|
||||||
times: [Date, Date];
|
times?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 交易统计 Response */
|
/** 交易统计 Response */
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ export namespace MemberUserApi {
|
||||||
loginIp: string;
|
loginIp: string;
|
||||||
mark: string;
|
mark: string;
|
||||||
mobile: string;
|
mobile: string;
|
||||||
|
email?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
nickname?: string;
|
nickname?: string;
|
||||||
registerIp: string;
|
registerIp: string;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalCalendarApi {
|
||||||
|
/** 排班日历班组排班项 */
|
||||||
|
export interface CalendarTeamShiftItem {
|
||||||
|
teamId?: number; // 班组编号
|
||||||
|
teamName?: string; // 班组名称
|
||||||
|
shiftId?: number; // 班次编号
|
||||||
|
shiftName?: string; // 班次名称
|
||||||
|
sort?: number; // 排序
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 排班日历天 */
|
||||||
|
export interface CalendarDay {
|
||||||
|
day?: string; // 日期
|
||||||
|
shiftType?: number; // 轮班方式
|
||||||
|
teamShifts?: CalendarTeamShiftItem[]; // 班组班次
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询排班日历列表 */
|
||||||
|
export function getCalendarList(params: any) {
|
||||||
|
return requestClient.get<MesCalCalendarApi.CalendarDay[]>(
|
||||||
|
'/mes/cal/calendar/list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalHolidayApi {
|
||||||
|
/** MES 假期设置 */
|
||||||
|
export interface Holiday {
|
||||||
|
id?: number; // 编号
|
||||||
|
day?: number | string; // 日期
|
||||||
|
type?: number; // 日期类型
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 假期查询参数 */
|
||||||
|
export interface HolidayQuery {
|
||||||
|
startDay?: string;
|
||||||
|
endDay?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询假期设置列表 */
|
||||||
|
export function getHolidayList(params?: MesCalHolidayApi.HolidayQuery) {
|
||||||
|
return requestClient.get<MesCalHolidayApi.Holiday[]>(
|
||||||
|
'/mes/cal/holiday/list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据日期查询假期设置 */
|
||||||
|
export function getHolidayByDay(day: string) {
|
||||||
|
return requestClient.get<MesCalHolidayApi.Holiday>(
|
||||||
|
'/mes/cal/holiday/get-by-day',
|
||||||
|
{ params: { day } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 保存假期设置 */
|
||||||
|
export function saveHoliday(data: MesCalHolidayApi.Holiday) {
|
||||||
|
return requestClient.post('/mes/cal/holiday/save', data);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalPlanApi {
|
||||||
|
/** MES 排班计划 */
|
||||||
|
export interface Plan {
|
||||||
|
id?: number; // 计划编号
|
||||||
|
code?: string; // 计划编码
|
||||||
|
name?: string; // 计划名称
|
||||||
|
calendarType?: number; // 班组类型
|
||||||
|
startDate?: number; // 开始日期
|
||||||
|
endDate?: number; // 结束日期
|
||||||
|
shiftType?: number; // 轮班方式
|
||||||
|
shiftMethod?: number; // 倒班方式
|
||||||
|
shiftCount?: number; // 倒班天数
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询排班计划分页 */
|
||||||
|
export function getPlanPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesCalPlanApi.Plan>>(
|
||||||
|
'/mes/cal/plan/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询排班计划详情 */
|
||||||
|
export function getPlan(id: number) {
|
||||||
|
return requestClient.get<MesCalPlanApi.Plan>(`/mes/cal/plan/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增排班计划 */
|
||||||
|
export function createPlan(data: MesCalPlanApi.Plan) {
|
||||||
|
return requestClient.post<number>('/mes/cal/plan/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改排班计划 */
|
||||||
|
export function updatePlan(data: MesCalPlanApi.Plan) {
|
||||||
|
return requestClient.put('/mes/cal/plan/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 确认排班计划 */
|
||||||
|
export function confirmPlan(id: number) {
|
||||||
|
return requestClient.put(`/mes/cal/plan/confirm?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除排班计划 */
|
||||||
|
export function deletePlan(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/plan/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出排班计划 */
|
||||||
|
export function exportPlan(params: any) {
|
||||||
|
return requestClient.download('/mes/cal/plan/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalPlanShiftApi {
|
||||||
|
/** MES 计划班次 */
|
||||||
|
export interface PlanShift {
|
||||||
|
id?: number; // 班次编号
|
||||||
|
planId?: number; // 排班计划编号
|
||||||
|
sort?: number; // 显示顺序
|
||||||
|
name?: string; // 班次名称
|
||||||
|
startTime?: string; // 开始时间
|
||||||
|
endTime?: string; // 结束时间
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定排班计划的班次列表 */
|
||||||
|
export function getPlanShiftListByPlan(planId: number) {
|
||||||
|
return requestClient.get<MesCalPlanShiftApi.PlanShift[]>(
|
||||||
|
`/mes/cal/plan-shift/list-by-plan?planId=${planId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增计划班次 */
|
||||||
|
export function createPlanShift(data: MesCalPlanShiftApi.PlanShift) {
|
||||||
|
return requestClient.post('/mes/cal/plan-shift/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改计划班次 */
|
||||||
|
export function updatePlanShift(data: MesCalPlanShiftApi.PlanShift) {
|
||||||
|
return requestClient.put('/mes/cal/plan-shift/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除计划班次 */
|
||||||
|
export function deletePlanShift(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/plan-shift/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalPlanTeamApi {
|
||||||
|
/** MES 计划班组关联 */
|
||||||
|
export interface PlanTeam {
|
||||||
|
id?: number; // 关联编号
|
||||||
|
planId?: number; // 排班计划编号
|
||||||
|
teamId?: number; // 班组编号
|
||||||
|
teamCode?: string; // 班组编码
|
||||||
|
teamName?: string; // 班组名称
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定排班计划的班组列表 */
|
||||||
|
export function getPlanTeamListByPlan(planId: number) {
|
||||||
|
return requestClient.get<MesCalPlanTeamApi.PlanTeam[]>(
|
||||||
|
`/mes/cal/plan-team/list-by-plan?planId=${planId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增计划班组关联 */
|
||||||
|
export function createPlanTeam(data: MesCalPlanTeamApi.PlanTeam) {
|
||||||
|
return requestClient.post('/mes/cal/plan-team/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除计划班组关联 */
|
||||||
|
export function deletePlanTeam(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/plan-team/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalTeamApi {
|
||||||
|
/** MES 班组 */
|
||||||
|
export interface Team {
|
||||||
|
id?: number; // 班组编号
|
||||||
|
code?: string; // 班组编码
|
||||||
|
name?: string; // 班组名称
|
||||||
|
calendarType?: number; // 班组类型
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询班组分页 */
|
||||||
|
export function getTeamPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesCalTeamApi.Team>>(
|
||||||
|
'/mes/cal/team/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询班组列表 */
|
||||||
|
export function getTeamList() {
|
||||||
|
return requestClient.get<MesCalTeamApi.Team[]>('/mes/cal/team/list');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询班组详情 */
|
||||||
|
export function getTeam(id: number) {
|
||||||
|
return requestClient.get<MesCalTeamApi.Team>(`/mes/cal/team/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增班组 */
|
||||||
|
export function createTeam(data: MesCalTeamApi.Team) {
|
||||||
|
return requestClient.post('/mes/cal/team/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改班组 */
|
||||||
|
export function updateTeam(data: MesCalTeamApi.Team) {
|
||||||
|
return requestClient.put('/mes/cal/team/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除班组 */
|
||||||
|
export function deleteTeam(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/team/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出班组 */
|
||||||
|
export function exportTeam(params: any) {
|
||||||
|
return requestClient.download('/mes/cal/team/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesCalTeamMemberApi {
|
||||||
|
/** MES 班组成员 */
|
||||||
|
export interface TeamMember {
|
||||||
|
id?: number; // 成员编号
|
||||||
|
teamId?: number; // 班组编号
|
||||||
|
userId?: number; // 用户编号
|
||||||
|
nickname?: string; // 用户昵称
|
||||||
|
telephone?: string; // 用户手机号
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 创建班组成员 */
|
||||||
|
export function createTeamMember(data: MesCalTeamMemberApi.TeamMember) {
|
||||||
|
return requestClient.post('/mes/cal/team-member/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除班组成员 */
|
||||||
|
export function deleteTeamMember(id: number) {
|
||||||
|
return requestClient.delete(`/mes/cal/team-member/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询班组成员分页 */
|
||||||
|
export function getTeamMemberPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesCalTeamMemberApi.TeamMember>>(
|
||||||
|
'/mes/cal/team-member/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定班组的成员列表 */
|
||||||
|
export function getTeamMemberListByTeam(teamId: number) {
|
||||||
|
return requestClient.get<MesCalTeamMemberApi.TeamMember[]>(
|
||||||
|
'/mes/cal/team-member/list-by-team',
|
||||||
|
{ params: { teamId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询多个班组的成员列表 */
|
||||||
|
export function getTeamMemberListByTeamIds(teamIds: number[]) {
|
||||||
|
return requestClient.get<MesCalTeamMemberApi.TeamMember[]>(
|
||||||
|
'/mes/cal/team-member/list-by-team',
|
||||||
|
{
|
||||||
|
params: { teamIds: teamIds.join(',') },
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckPlanApi {
|
||||||
|
/** MES 点检保养方案 */
|
||||||
|
export interface CheckPlan {
|
||||||
|
id?: number; // 方案编号
|
||||||
|
code?: string; // 方案编码
|
||||||
|
name?: string; // 方案名称
|
||||||
|
type?: number; // 方案类型
|
||||||
|
startDate?: Date | number; // 开始日期
|
||||||
|
endDate?: Date | number; // 结束日期
|
||||||
|
cycleType?: number; // 周期类型
|
||||||
|
cycleCount?: number; // 周期数量
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养方案分页 */
|
||||||
|
export function getCheckPlanPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvCheckPlanApi.CheckPlan>>(
|
||||||
|
'/mes/dv/check-plan/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养方案详情 */
|
||||||
|
export function getCheckPlan(id: number) {
|
||||||
|
return requestClient.get<MesDvCheckPlanApi.CheckPlan>(
|
||||||
|
`/mes/dv/check-plan/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增点检保养方案 */
|
||||||
|
export function createCheckPlan(data: MesDvCheckPlanApi.CheckPlan) {
|
||||||
|
return requestClient.post<number>('/mes/dv/check-plan/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改点检保养方案 */
|
||||||
|
export function updateCheckPlan(data: MesDvCheckPlanApi.CheckPlan) {
|
||||||
|
return requestClient.put('/mes/dv/check-plan/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 启用点检保养方案 */
|
||||||
|
export function enableCheckPlan(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/check-plan/enable?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 停用点检保养方案 */
|
||||||
|
export function disableCheckPlan(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/check-plan/disable?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除点检保养方案 */
|
||||||
|
export function deleteCheckPlan(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-plan/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出点检保养方案 */
|
||||||
|
export function exportCheckPlan(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/check-plan/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckPlanMachineryApi {
|
||||||
|
/** MES 点检保养方案设备 */
|
||||||
|
export interface CheckPlanMachinery {
|
||||||
|
id?: number; // 关联编号
|
||||||
|
planId?: number; // 方案编号
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
machineryBrand?: string; // 品牌
|
||||||
|
machinerySpecification?: string; // 规格型号
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定方案的设备列表 */
|
||||||
|
export function getCheckPlanMachineryListByPlan(planId: number) {
|
||||||
|
return requestClient.get<MesDvCheckPlanMachineryApi.CheckPlanMachinery[]>(
|
||||||
|
`/mes/dv/check-plan-machinery/list-by-plan?planId=${planId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增方案设备关联 */
|
||||||
|
export function createCheckPlanMachinery(
|
||||||
|
data: MesDvCheckPlanMachineryApi.CheckPlanMachinery,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/dv/check-plan-machinery/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除方案设备关联 */
|
||||||
|
export function deleteCheckPlanMachinery(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-plan-machinery/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckPlanSubjectApi {
|
||||||
|
/** MES 点检保养方案项目 */
|
||||||
|
export interface CheckPlanSubject {
|
||||||
|
id?: number; // 关联编号
|
||||||
|
planId?: number; // 方案编号
|
||||||
|
subjectId?: number; // 项目编号
|
||||||
|
subjectCode?: string; // 项目编码
|
||||||
|
subjectName?: string; // 项目名称
|
||||||
|
subjectType?: number; // 项目类型
|
||||||
|
subjectContent?: string; // 项目内容
|
||||||
|
subjectStandard?: string; // 标准
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询指定方案的项目列表 */
|
||||||
|
export function getCheckPlanSubjectListByPlan(planId: number) {
|
||||||
|
return requestClient.get<MesDvCheckPlanSubjectApi.CheckPlanSubject[]>(
|
||||||
|
`/mes/dv/check-plan-subject/list-by-plan?planId=${planId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增方案项目关联 */
|
||||||
|
export function createCheckPlanSubject(
|
||||||
|
data: MesDvCheckPlanSubjectApi.CheckPlanSubject,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/dv/check-plan-subject/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除方案项目关联 */
|
||||||
|
export function deleteCheckPlanSubject(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-plan-subject/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckRecordApi {
|
||||||
|
/** MES 设备点检记录 */
|
||||||
|
export interface CheckRecord {
|
||||||
|
id?: number; // 记录编号
|
||||||
|
planId?: number; // 点检计划编号
|
||||||
|
planName?: string; // 计划名称
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
machineryBrand?: string; // 品牌
|
||||||
|
machinerySpecification?: string; // 规格型号
|
||||||
|
checkTime?: Date | number; // 点检时间
|
||||||
|
userId?: number; // 点检人编号
|
||||||
|
nickname?: string; // 点检人名称
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备点检记录分页 */
|
||||||
|
export function getCheckRecordPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvCheckRecordApi.CheckRecord>>(
|
||||||
|
'/mes/dv/check-record/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备点检记录详情 */
|
||||||
|
export function getCheckRecord(id: number) {
|
||||||
|
return requestClient.get<MesDvCheckRecordApi.CheckRecord>(
|
||||||
|
`/mes/dv/check-record/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备点检记录 */
|
||||||
|
export function createCheckRecord(data: MesDvCheckRecordApi.CheckRecord) {
|
||||||
|
return requestClient.post<number>('/mes/dv/check-record/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备点检记录 */
|
||||||
|
export function updateCheckRecord(data: MesDvCheckRecordApi.CheckRecord) {
|
||||||
|
return requestClient.put('/mes/dv/check-record/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交设备点检记录 */
|
||||||
|
export function submitCheckRecord(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/check-record/submit?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备点检记录 */
|
||||||
|
export function deleteCheckRecord(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-record/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出设备点检记录 */
|
||||||
|
export function exportCheckRecord(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/check-record/export-excel', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvCheckRecordLineApi {
|
||||||
|
/** MES 设备点检记录明细 */
|
||||||
|
export interface CheckRecordLine {
|
||||||
|
id?: number; // 明细编号
|
||||||
|
recordId?: number; // 点检记录编号
|
||||||
|
subjectId?: number; // 点检项目编号
|
||||||
|
subjectCode?: string; // 项目编码
|
||||||
|
subjectName?: string; // 项目名称
|
||||||
|
subjectContent?: string; // 检查内容
|
||||||
|
subjectStandard?: string; // 检查标准
|
||||||
|
checkStatus?: number; // 点检结果
|
||||||
|
checkResult?: string; // 异常描述
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备点检记录明细分页 */
|
||||||
|
export function getCheckRecordLinePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvCheckRecordLineApi.CheckRecordLine>>(
|
||||||
|
'/mes/dv/check-record-line/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备点检记录明细详情 */
|
||||||
|
export function getCheckRecordLine(id: number) {
|
||||||
|
return requestClient.get<MesDvCheckRecordLineApi.CheckRecordLine>(
|
||||||
|
`/mes/dv/check-record-line/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备点检记录明细 */
|
||||||
|
export function createCheckRecordLine(
|
||||||
|
data: MesDvCheckRecordLineApi.CheckRecordLine,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/dv/check-record-line/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备点检记录明细 */
|
||||||
|
export function updateCheckRecordLine(
|
||||||
|
data: MesDvCheckRecordLineApi.CheckRecordLine,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/dv/check-record-line/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备点检记录明细 */
|
||||||
|
export function deleteCheckRecordLine(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/check-record-line/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvMachineryApi {
|
||||||
|
/** MES 设备台账 */
|
||||||
|
export interface Machinery {
|
||||||
|
id?: number; // 设备编号
|
||||||
|
code?: string; // 设备编码
|
||||||
|
name?: string; // 设备名称
|
||||||
|
brand?: string; // 品牌
|
||||||
|
specification?: string; // 规格型号
|
||||||
|
machineryTypeId?: number; // 设备类型编号
|
||||||
|
machineryTypeName?: string; // 设备类型名称
|
||||||
|
workshopId?: number; // 所属车间编号
|
||||||
|
workshopName?: string; // 所属车间名称
|
||||||
|
status?: number; // 设备状态
|
||||||
|
lastMaintenTime?: Date; // 最近保养时间
|
||||||
|
lastCheckTime?: Date; // 最近点检时间
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 设备导入结果 */
|
||||||
|
export interface MachineryImportRespVO {
|
||||||
|
createCodes?: string[]; // 新增成功的设备编码
|
||||||
|
updateCodes?: string[]; // 更新成功的设备编码
|
||||||
|
failureCodes?: Record<string, string>; // 导入失败的设备编码及原因
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备分页 */
|
||||||
|
export function getMachineryPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvMachineryApi.Machinery>>(
|
||||||
|
'/mes/dv/machinery/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备精简列表 */
|
||||||
|
export function getMachinerySimpleList() {
|
||||||
|
return requestClient.get<MesDvMachineryApi.Machinery[]>(
|
||||||
|
'/mes/dv/machinery/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备详情 */
|
||||||
|
export function getMachinery(id: number) {
|
||||||
|
return requestClient.get<MesDvMachineryApi.Machinery>(
|
||||||
|
`/mes/dv/machinery/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备 */
|
||||||
|
export function createMachinery(data: MesDvMachineryApi.Machinery) {
|
||||||
|
return requestClient.post('/mes/dv/machinery/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备 */
|
||||||
|
export function updateMachinery(data: MesDvMachineryApi.Machinery) {
|
||||||
|
return requestClient.put('/mes/dv/machinery/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备 */
|
||||||
|
export function deleteMachinery(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/machinery/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出设备 */
|
||||||
|
export function exportMachinery(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/machinery/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载设备导入模板 */
|
||||||
|
export function importMachineryTemplate() {
|
||||||
|
return requestClient.download('/mes/dv/machinery/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入设备 */
|
||||||
|
export function importMachinery(file: File, updateSupport: boolean) {
|
||||||
|
return requestClient.upload<MesDvMachineryApi.MachineryImportRespVO>(
|
||||||
|
`/mes/dv/machinery/import?updateSupport=${updateSupport}`,
|
||||||
|
{ file },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvMachineryTypeApi {
|
||||||
|
/** MES 设备类型 */
|
||||||
|
export interface MachineryType {
|
||||||
|
id?: number; // 设备类型编号
|
||||||
|
parentId?: number; // 父类型编号
|
||||||
|
code?: string; // 类型编码
|
||||||
|
name?: string; // 类型名称
|
||||||
|
sort?: number; // 显示排序
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
children?: MachineryType[]; // 子类型
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备类型列表 */
|
||||||
|
export function getMachineryTypeList(params?: any) {
|
||||||
|
return requestClient.get<MesDvMachineryTypeApi.MachineryType[]>(
|
||||||
|
'/mes/dv/machinery-type/list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备类型精简列表 */
|
||||||
|
export function getMachineryTypeSimpleList() {
|
||||||
|
return requestClient.get<MesDvMachineryTypeApi.MachineryType[]>(
|
||||||
|
'/mes/dv/machinery-type/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备类型详情 */
|
||||||
|
export function getMachineryType(id: number) {
|
||||||
|
return requestClient.get<MesDvMachineryTypeApi.MachineryType>(
|
||||||
|
`/mes/dv/machinery-type/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备类型 */
|
||||||
|
export function createMachineryType(data: MesDvMachineryTypeApi.MachineryType) {
|
||||||
|
return requestClient.post('/mes/dv/machinery-type/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备类型 */
|
||||||
|
export function updateMachineryType(data: MesDvMachineryTypeApi.MachineryType) {
|
||||||
|
return requestClient.put('/mes/dv/machinery-type/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备类型 */
|
||||||
|
export function deleteMachineryType(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/machinery-type/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvMaintenRecordApi {
|
||||||
|
/** MES 设备保养记录 */
|
||||||
|
export interface MaintenRecord {
|
||||||
|
id?: number; // 记录编号
|
||||||
|
planId?: number; // 计划编号
|
||||||
|
planName?: string; // 计划名称
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
machineryBrand?: string; // 品牌
|
||||||
|
machinerySpecification?: string; // 规格型号
|
||||||
|
maintenTime?: Date | number; // 保养时间
|
||||||
|
userId?: number; // 用户编号
|
||||||
|
nickname?: string; // 保养人名称
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备保养记录分页 */
|
||||||
|
export function getMaintenRecordPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvMaintenRecordApi.MaintenRecord>>(
|
||||||
|
'/mes/dv/mainten-record/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备保养记录详情 */
|
||||||
|
export function getMaintenRecord(id: number) {
|
||||||
|
return requestClient.get<MesDvMaintenRecordApi.MaintenRecord>(
|
||||||
|
`/mes/dv/mainten-record/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备保养记录 */
|
||||||
|
export function createMaintenRecord(data: MesDvMaintenRecordApi.MaintenRecord) {
|
||||||
|
return requestClient.post<number>('/mes/dv/mainten-record/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备保养记录 */
|
||||||
|
export function updateMaintenRecord(data: MesDvMaintenRecordApi.MaintenRecord) {
|
||||||
|
return requestClient.put('/mes/dv/mainten-record/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交设备保养记录 */
|
||||||
|
export function submitMaintenRecord(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/mainten-record/submit?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备保养记录 */
|
||||||
|
export function deleteMaintenRecord(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/mainten-record/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出设备保养记录 */
|
||||||
|
export function exportMaintenRecord(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/mainten-record/export-excel', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvMaintenRecordLineApi {
|
||||||
|
/** MES 设备保养记录明细 */
|
||||||
|
export interface MaintenRecordLine {
|
||||||
|
id?: number; // 明细编号
|
||||||
|
recordId?: number; // 保养记录编号
|
||||||
|
subjectId?: number; // 项目编号
|
||||||
|
subjectName?: string; // 项目名称
|
||||||
|
subjectContent?: string; // 项目内容
|
||||||
|
subjectStandard?: string; // 项目标准
|
||||||
|
status?: number; // 保养结果
|
||||||
|
result?: string; // 异常描述
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备保养记录明细分页 */
|
||||||
|
export function getMaintenRecordLinePage(params: PageParam) {
|
||||||
|
return requestClient.get<
|
||||||
|
PageResult<MesDvMaintenRecordLineApi.MaintenRecordLine>
|
||||||
|
>('/mes/dv/mainten-record-line/page', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询设备保养记录明细详情 */
|
||||||
|
export function getMaintenRecordLine(id: number) {
|
||||||
|
return requestClient.get<MesDvMaintenRecordLineApi.MaintenRecordLine>(
|
||||||
|
`/mes/dv/mainten-record-line/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增设备保养记录明细 */
|
||||||
|
export function createMaintenRecordLine(
|
||||||
|
data: MesDvMaintenRecordLineApi.MaintenRecordLine,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/dv/mainten-record-line/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改设备保养记录明细 */
|
||||||
|
export function updateMaintenRecordLine(
|
||||||
|
data: MesDvMaintenRecordLineApi.MaintenRecordLine,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/dv/mainten-record-line/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除设备保养记录明细 */
|
||||||
|
export function deleteMaintenRecordLine(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/mainten-record-line/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvRepairApi {
|
||||||
|
/** MES 维修工单 */
|
||||||
|
export interface Repair {
|
||||||
|
id?: number; // 工单编号
|
||||||
|
code?: string; // 维修工单编码
|
||||||
|
name?: string; // 维修工单名称
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
machineryBrand?: string; // 品牌
|
||||||
|
machinerySpecification?: string; // 规格型号
|
||||||
|
requireDate?: Date | number; // 报修日期
|
||||||
|
finishDate?: Date | number; // 维修完成日期
|
||||||
|
confirmDate?: Date | number; // 验收日期
|
||||||
|
result?: number; // 维修结果
|
||||||
|
acceptedUserId?: number; // 维修人编号
|
||||||
|
acceptedUserNickname?: string; // 维修人名称
|
||||||
|
confirmUserId?: number; // 验收人编号
|
||||||
|
confirmUserNickname?: string; // 验收人名称
|
||||||
|
sourceDocType?: number; // 来源单据类型
|
||||||
|
sourceDocId?: number; // 来源单据编号
|
||||||
|
sourceDocCode?: string; // 来源单据编码
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询维修工单分页 */
|
||||||
|
export function getRepairPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvRepairApi.Repair>>(
|
||||||
|
'/mes/dv/repair/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询维修工单详情 */
|
||||||
|
export function getRepair(id: number) {
|
||||||
|
return requestClient.get<MesDvRepairApi.Repair>(
|
||||||
|
`/mes/dv/repair/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增维修工单 */
|
||||||
|
export function createRepair(data: MesDvRepairApi.Repair) {
|
||||||
|
return requestClient.post<number>('/mes/dv/repair/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改维修工单 */
|
||||||
|
export function updateRepair(data: MesDvRepairApi.Repair) {
|
||||||
|
return requestClient.put('/mes/dv/repair/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除维修工单 */
|
||||||
|
export function deleteRepair(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/repair/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出维修工单 */
|
||||||
|
export function exportRepair(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/repair/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交维修工单 */
|
||||||
|
export function submitRepair(id: number) {
|
||||||
|
return requestClient.put(`/mes/dv/repair/submit?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 确认维修完成 */
|
||||||
|
export function confirmRepair(data: MesDvRepairApi.Repair) {
|
||||||
|
return requestClient.put('/mes/dv/repair/confirm', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 完成验收 */
|
||||||
|
export function finishRepair(id: number, result: number) {
|
||||||
|
return requestClient.put(`/mes/dv/repair/finish?id=${id}&result=${result}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvRepairLineApi {
|
||||||
|
/** MES 维修工单行 */
|
||||||
|
export interface RepairLine {
|
||||||
|
id?: number; // 明细编号
|
||||||
|
repairId?: number; // 维修工单编号
|
||||||
|
subjectId?: number; // 项目编号
|
||||||
|
subjectName?: string; // 项目名称
|
||||||
|
subjectContent?: string; // 项目内容
|
||||||
|
subjectStandard?: string; // 项目标准
|
||||||
|
malfunction?: string; // 故障描述
|
||||||
|
malfunctionUrl?: string; // 故障图片 URL
|
||||||
|
description?: string; // 维修描述
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询维修工单行分页 */
|
||||||
|
export function getRepairLinePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvRepairLineApi.RepairLine>>(
|
||||||
|
'/mes/dv/repair-line/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询维修工单行详情 */
|
||||||
|
export function getRepairLine(id: number) {
|
||||||
|
return requestClient.get<MesDvRepairLineApi.RepairLine>(
|
||||||
|
`/mes/dv/repair-line/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增维修工单行 */
|
||||||
|
export function createRepairLine(data: MesDvRepairLineApi.RepairLine) {
|
||||||
|
return requestClient.post('/mes/dv/repair-line/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改维修工单行 */
|
||||||
|
export function updateRepairLine(data: MesDvRepairLineApi.RepairLine) {
|
||||||
|
return requestClient.put('/mes/dv/repair-line/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除维修工单行 */
|
||||||
|
export function deleteRepairLine(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/repair-line/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesDvSubjectApi {
|
||||||
|
/** MES 点检保养项目 */
|
||||||
|
export interface Subject {
|
||||||
|
id?: number; // 项目编号
|
||||||
|
code?: string; // 项目编码
|
||||||
|
name?: string; // 项目名称
|
||||||
|
type?: number; // 项目类型
|
||||||
|
content?: string; // 项目内容
|
||||||
|
standard?: string; // 标准
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养项目分页 */
|
||||||
|
export function getSubjectPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesDvSubjectApi.Subject>>(
|
||||||
|
'/mes/dv/subject/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养项目精简列表 */
|
||||||
|
export function getSubjectSimpleList() {
|
||||||
|
return requestClient.get<MesDvSubjectApi.Subject[]>(
|
||||||
|
'/mes/dv/subject/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询点检保养项目详情 */
|
||||||
|
export function getSubject(id: number) {
|
||||||
|
return requestClient.get<MesDvSubjectApi.Subject>(
|
||||||
|
`/mes/dv/subject/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增点检保养项目 */
|
||||||
|
export function createSubject(data: MesDvSubjectApi.Subject) {
|
||||||
|
return requestClient.post('/mes/dv/subject/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改点检保养项目 */
|
||||||
|
export function updateSubject(data: MesDvSubjectApi.Subject) {
|
||||||
|
return requestClient.put('/mes/dv/subject/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除点检保养项目 */
|
||||||
|
export function deleteSubject(id: number) {
|
||||||
|
return requestClient.delete(`/mes/dv/subject/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出点检保养项目 */
|
||||||
|
export function exportSubject(params: any) {
|
||||||
|
return requestClient.download('/mes/dv/subject/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesHomeApi {
|
||||||
|
/** MES 首页汇总统计 */
|
||||||
|
export interface Summary {
|
||||||
|
workOrderActiveCount: number; // 进行中工单数
|
||||||
|
workOrderPrepareCount: number; // 待排产工单数
|
||||||
|
workOrderFinishedCount: number; // 已完成工单数
|
||||||
|
todayOutput: number; // 今日产量
|
||||||
|
yesterdayOutput: number; // 昨日产量
|
||||||
|
todayQualifiedQuantity: number; // 今日合格品数
|
||||||
|
todayUnqualifiedQuantity: number; // 今日不良品数
|
||||||
|
machineryTotal: number; // 设备总数
|
||||||
|
machineryProducing: number; // 生产中设备数
|
||||||
|
machineryStop: number; // 停机设备数
|
||||||
|
machineryMaintenance: number; // 维护中设备数
|
||||||
|
andonActiveCount: number; // 未处置安灯呼叫数
|
||||||
|
repairActiveCount: number; // 待处理维修工单数
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 工单状态分布 */
|
||||||
|
export interface WorkOrderStatus {
|
||||||
|
status: number; // 工单状态
|
||||||
|
statusName: string; // 工单状态名称
|
||||||
|
count: number; // 数量
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 生产趋势 */
|
||||||
|
export interface ProductionTrend {
|
||||||
|
date: string; // 日期
|
||||||
|
quantity: number; // 产量
|
||||||
|
qualifiedQuantity: number; // 合格品数
|
||||||
|
unqualifiedQuantity: number; // 不良品数
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获得首页汇总统计 */
|
||||||
|
export function getHomeSummary() {
|
||||||
|
return requestClient.get<MesHomeApi.Summary>('/mes/home-statistics/summary');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获得工单状态分布 */
|
||||||
|
export function getWorkOrderStatusDistribution() {
|
||||||
|
return requestClient.get<MesHomeApi.WorkOrderStatus[]>(
|
||||||
|
'/mes/home-statistics/work-order-status',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获得生产趋势 */
|
||||||
|
export function getProductionTrend(days?: number) {
|
||||||
|
return requestClient.get<MesHomeApi.ProductionTrend[]>(
|
||||||
|
'/mes/home-statistics/production-trend',
|
||||||
|
{ params: { days } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdAutoCodePartApi {
|
||||||
|
/** MES 编码规则分段 */
|
||||||
|
export interface AutoCodePart {
|
||||||
|
id?: number; // 分段编号
|
||||||
|
ruleId?: number; // 规则编号
|
||||||
|
sort?: number; // 排序
|
||||||
|
type?: number; // 分段类型
|
||||||
|
length?: number; // 长度
|
||||||
|
dateFormat?: string; // 日期格式
|
||||||
|
fixCharacter?: string; // 固定字符
|
||||||
|
serialStartNo?: number; // 流水号起始值
|
||||||
|
serialStep?: number; // 流水号步长
|
||||||
|
cycleFlag?: boolean; // 是否循环
|
||||||
|
cycleMethod?: number; // 循环方式
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询编码规则分段详情 */
|
||||||
|
export function getAutoCodePart(id: number) {
|
||||||
|
return requestClient.get<MesMdAutoCodePartApi.AutoCodePart>(
|
||||||
|
`/mes/md/auto-code-part/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询编码规则分段列表 */
|
||||||
|
export function getAutoCodePartListByRuleId(ruleId: number) {
|
||||||
|
return requestClient.get<MesMdAutoCodePartApi.AutoCodePart[]>(
|
||||||
|
'/mes/md/auto-code-part/list-by-rule-id',
|
||||||
|
{ params: { ruleId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增编码规则分段 */
|
||||||
|
export function createAutoCodePart(data: MesMdAutoCodePartApi.AutoCodePart) {
|
||||||
|
return requestClient.post('/mes/md/auto-code-part/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改编码规则分段 */
|
||||||
|
export function updateAutoCodePart(data: MesMdAutoCodePartApi.AutoCodePart) {
|
||||||
|
return requestClient.put('/mes/md/auto-code-part/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除编码规则分段 */
|
||||||
|
export function deleteAutoCodePart(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/auto-code-part/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
/** 生成 MES 编码 */
|
||||||
|
export function generateAutoCode(ruleCode: string, inputChar?: string) {
|
||||||
|
return requestClient.post<string>('/mes/md/auto-code-record/generate', {
|
||||||
|
inputChar,
|
||||||
|
ruleCode,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdAutoCodeRuleApi {
|
||||||
|
/** MES 编码规则 */
|
||||||
|
export interface AutoCodeRule {
|
||||||
|
id?: number; // 规则编号
|
||||||
|
code?: string; // 规则编码
|
||||||
|
name?: string; // 规则名称
|
||||||
|
description?: string; // 规则描述
|
||||||
|
maxLength?: number; // 最大长度
|
||||||
|
padded?: boolean; // 是否补齐
|
||||||
|
paddedChar?: string; // 补齐字符
|
||||||
|
paddedMethod?: number; // 补齐方式
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询编码规则分页 */
|
||||||
|
export function getAutoCodeRulePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdAutoCodeRuleApi.AutoCodeRule>>(
|
||||||
|
'/mes/md/auto-code-rule/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询编码规则详情 */
|
||||||
|
export function getAutoCodeRule(id: number) {
|
||||||
|
return requestClient.get<MesMdAutoCodeRuleApi.AutoCodeRule>(
|
||||||
|
`/mes/md/auto-code-rule/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增编码规则 */
|
||||||
|
export function createAutoCodeRule(data: MesMdAutoCodeRuleApi.AutoCodeRule) {
|
||||||
|
return requestClient.post('/mes/md/auto-code-rule/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改编码规则 */
|
||||||
|
export function updateAutoCodeRule(data: MesMdAutoCodeRuleApi.AutoCodeRule) {
|
||||||
|
return requestClient.put('/mes/md/auto-code-rule/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除编码规则 */
|
||||||
|
export function deleteAutoCodeRule(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/auto-code-rule/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出编码规则 */
|
||||||
|
export function exportAutoCodeRule(params: PageParam) {
|
||||||
|
return requestClient.download('/mes/md/auto-code-rule/export-excel', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdClientApi {
|
||||||
|
/** MES 客户 */
|
||||||
|
export interface Client {
|
||||||
|
id?: number; // 客户编号
|
||||||
|
code?: string; // 客户编码
|
||||||
|
name?: string; // 客户名称
|
||||||
|
nickname?: string; // 客户简称
|
||||||
|
englishName?: string; // 客户英文名称
|
||||||
|
description?: string; // 客户简介
|
||||||
|
logo?: string; // 客户 LOGO 地址
|
||||||
|
type?: number; // 客户类型
|
||||||
|
address?: string; // 客户地址
|
||||||
|
website?: string; // 客户官网地址
|
||||||
|
email?: string; // 客户邮箱地址
|
||||||
|
telephone?: string; // 客户电话
|
||||||
|
contact1Name?: string; // 联系人1
|
||||||
|
contact1Telephone?: string; // 联系人1电话
|
||||||
|
contact1Email?: string; // 联系人1邮箱
|
||||||
|
contact2Name?: string; // 联系人2
|
||||||
|
contact2Telephone?: string; // 联系人2电话
|
||||||
|
contact2Email?: string; // 联系人2邮箱
|
||||||
|
creditCode?: string; // 统一社会信用代码
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 客户导入结果 */
|
||||||
|
export interface ClientImportRespVO {
|
||||||
|
createCodes?: string[]; // 新增成功的客户编码
|
||||||
|
updateCodes?: string[]; // 更新成功的客户编码
|
||||||
|
failureCodes?: Record<string, string>; // 导入失败的客户编码及原因
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询客户分页 */
|
||||||
|
export function getClientPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdClientApi.Client>>(
|
||||||
|
'/mes/md-client/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询客户详情 */
|
||||||
|
export function getClient(id: number) {
|
||||||
|
return requestClient.get<MesMdClientApi.Client>(
|
||||||
|
`/mes/md-client/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增客户 */
|
||||||
|
export function createClient(data: MesMdClientApi.Client) {
|
||||||
|
return requestClient.post('/mes/md-client/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改客户 */
|
||||||
|
export function updateClient(data: MesMdClientApi.Client) {
|
||||||
|
return requestClient.put('/mes/md-client/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除客户 */
|
||||||
|
export function deleteClient(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-client/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出客户 */
|
||||||
|
export function exportClient(params: any) {
|
||||||
|
return requestClient.download('/mes/md-client/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载客户导入模板 */
|
||||||
|
export function importClientTemplate() {
|
||||||
|
return requestClient.download('/mes/md-client/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入客户 */
|
||||||
|
export function importClient(file: File, updateSupport: boolean) {
|
||||||
|
return requestClient.upload<MesMdClientApi.ClientImportRespVO>(
|
||||||
|
`/mes/md-client/import?updateSupport=${updateSupport}`,
|
||||||
|
{ file },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdItemBatchConfigApi {
|
||||||
|
/** MES 物料批次属性配置 */
|
||||||
|
export interface BatchConfig {
|
||||||
|
id?: number; // 编号
|
||||||
|
itemId?: number; // 物料编号
|
||||||
|
produceDateFlag?: boolean; // 批次属性-生产日期
|
||||||
|
expireDateFlag?: boolean; // 批次属性-有效期
|
||||||
|
receiptDateFlag?: boolean; // 批次属性-入库日期
|
||||||
|
vendorFlag?: boolean; // 批次属性-供应商
|
||||||
|
clientFlag?: boolean; // 批次属性-客户
|
||||||
|
salesOrderCodeFlag?: boolean; // 批次属性-销售订单编号
|
||||||
|
purchaseOrderCodeFlag?: boolean; // 批次属性-采购订单编号
|
||||||
|
workorderFlag?: boolean; // 批次属性-生产工单
|
||||||
|
taskFlag?: boolean; // 批次属性-生产任务
|
||||||
|
workstationFlag?: boolean; // 批次属性-工作站
|
||||||
|
toolFlag?: boolean; // 批次属性-工具
|
||||||
|
moldFlag?: boolean; // 批次属性-模具
|
||||||
|
lotNumberFlag?: boolean; // 批次属性-生产批号
|
||||||
|
qualityStatusFlag?: boolean; // 批次属性-质量状态
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据物料编号获取批次属性配置 */
|
||||||
|
export function getBatchConfigByItemId(itemId: number) {
|
||||||
|
return requestClient.get<MesMdItemBatchConfigApi.BatchConfig>(
|
||||||
|
`/mes/md/item-batch-config/get-by-item-id?itemId=${itemId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 保存批次属性配置 */
|
||||||
|
export function saveBatchConfig(data: MesMdItemBatchConfigApi.BatchConfig) {
|
||||||
|
return requestClient.post('/mes/md/item-batch-config/save', data);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdItemApi {
|
||||||
|
/** MES 物料产品 */
|
||||||
|
export interface Item {
|
||||||
|
id?: number; // 物料编号
|
||||||
|
code?: string; // 物料编码
|
||||||
|
name?: string; // 物料名称
|
||||||
|
specification?: string; // 规格型号
|
||||||
|
unitMeasureId?: number; // 计量单位编号
|
||||||
|
unitMeasureName?: string; // 计量单位名称
|
||||||
|
itemTypeId?: number; // 物料分类编号
|
||||||
|
itemTypeName?: string; // 物料分类名称
|
||||||
|
itemOrProduct?: string; // 物料/产品标识
|
||||||
|
status?: number; // 状态
|
||||||
|
safeStockFlag?: boolean; // 是否启用安全库存
|
||||||
|
minStock?: number; // 最低库存量
|
||||||
|
maxStock?: number; // 最高库存量
|
||||||
|
highValue?: boolean; // 是否高值物料
|
||||||
|
batchFlag?: boolean; // 是否启用批次管理
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 物料导入结果 */
|
||||||
|
export interface ItemImportRespVO {
|
||||||
|
createCodes?: string[]; // 新增成功的物料编码
|
||||||
|
updateCodes?: string[]; // 更新成功的物料编码
|
||||||
|
failureCodes?: Record<string, string>; // 导入失败的物料编码及原因
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品分页 */
|
||||||
|
export function getItemPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdItemApi.Item>>('/mes/md/item/page', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品详情 */
|
||||||
|
export function getItem(id: number) {
|
||||||
|
return requestClient.get<MesMdItemApi.Item>(`/mes/md/item/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增物料产品 */
|
||||||
|
export function createItem(data: MesMdItemApi.Item) {
|
||||||
|
return requestClient.post<number>('/mes/md/item/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改物料产品 */
|
||||||
|
export function updateItem(data: MesMdItemApi.Item) {
|
||||||
|
return requestClient.put('/mes/md/item/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改物料产品状态 */
|
||||||
|
export function updateItemStatus(id: number, status: number) {
|
||||||
|
return requestClient.put('/mes/md/item/update-status', undefined, {
|
||||||
|
params: { id, status },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除物料产品 */
|
||||||
|
export function deleteItem(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/item/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出物料产品 */
|
||||||
|
export function exportItem(params: any) {
|
||||||
|
return requestClient.download('/mes/md/item/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载物料导入模板 */
|
||||||
|
export function importItemTemplate() {
|
||||||
|
return requestClient.download('/mes/md/item/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入物料产品 */
|
||||||
|
export function importItem(file: File, updateSupport: boolean) {
|
||||||
|
return requestClient.upload<MesMdItemApi.ItemImportRespVO>(
|
||||||
|
`/mes/md/item/import?updateSupport=${updateSupport}`,
|
||||||
|
{ file },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdProductBomApi {
|
||||||
|
/** MES 产品 BOM */
|
||||||
|
export interface ProductBom {
|
||||||
|
id?: number; // BOM 编号
|
||||||
|
itemId?: number; // 物料产品编号
|
||||||
|
bomItemId?: number; // BOM 物料编号
|
||||||
|
quantity?: number; // 物料使用比例
|
||||||
|
status?: number; // 是否启用
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
bomItemCode?: string; // BOM 物料编码
|
||||||
|
bomItemName?: string; // BOM 物料名称
|
||||||
|
bomItemSpecification?: string; // BOM 物料规格
|
||||||
|
unitMeasureName?: string; // 计量单位名称
|
||||||
|
itemOrProduct?: string; // 物料/产品标识
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增产品 BOM */
|
||||||
|
export function createProductBom(data: MesMdProductBomApi.ProductBom) {
|
||||||
|
return requestClient.post('/mes/md/product-bom/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改产品 BOM */
|
||||||
|
export function updateProductBom(data: MesMdProductBomApi.ProductBom) {
|
||||||
|
return requestClient.put('/mes/md/product-bom/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除产品 BOM */
|
||||||
|
export function deleteProductBom(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/product-bom/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 BOM 详情 */
|
||||||
|
export function getProductBom(id: number) {
|
||||||
|
return requestClient.get<MesMdProductBomApi.ProductBom>(
|
||||||
|
`/mes/md/product-bom/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 BOM 分页 */
|
||||||
|
export function getProductBomPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdProductBomApi.ProductBom>>(
|
||||||
|
'/mes/md/product-bom/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据物料产品编号查询产品 BOM 列表 */
|
||||||
|
export function getProductBomListByItemId(itemId: number) {
|
||||||
|
return requestClient.get<MesMdProductBomApi.ProductBom[]>(
|
||||||
|
`/mes/md/product-bom/list-by-item-id?itemId=${itemId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdProductSipApi {
|
||||||
|
/** MES 产品 SIP */
|
||||||
|
export interface ProductSip {
|
||||||
|
id?: number; // SIP 编号
|
||||||
|
itemId?: number; // 物料产品编号
|
||||||
|
sort?: number; // 排列顺序
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
title?: string; // 标题
|
||||||
|
description?: string; // 详细描述
|
||||||
|
url?: string; // 图片地址
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
processCode?: string; // 工序编码
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增产品 SIP */
|
||||||
|
export function createProductSip(data: MesMdProductSipApi.ProductSip) {
|
||||||
|
return requestClient.post('/mes/md/product-sip/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改产品 SIP */
|
||||||
|
export function updateProductSip(data: MesMdProductSipApi.ProductSip) {
|
||||||
|
return requestClient.put('/mes/md/product-sip/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除产品 SIP */
|
||||||
|
export function deleteProductSip(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/product-sip/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 SIP 详情 */
|
||||||
|
export function getProductSip(id: number) {
|
||||||
|
return requestClient.get<MesMdProductSipApi.ProductSip>(
|
||||||
|
`/mes/md/product-sip/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 SIP 分页 */
|
||||||
|
export function getProductSipPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdProductSipApi.ProductSip>>(
|
||||||
|
'/mes/md/product-sip/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据物料产品编号查询产品 SIP 列表 */
|
||||||
|
export function getProductSipListByItemId(itemId: number) {
|
||||||
|
return requestClient.get<MesMdProductSipApi.ProductSip[]>(
|
||||||
|
`/mes/md/product-sip/list-by-item-id?itemId=${itemId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdProductSopApi {
|
||||||
|
/** MES 产品 SOP */
|
||||||
|
export interface ProductSop {
|
||||||
|
id?: number; // SOP 编号
|
||||||
|
itemId?: number; // 物料产品编号
|
||||||
|
sort?: number; // 排列顺序
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
title?: string; // 标题
|
||||||
|
description?: string; // 详细描述
|
||||||
|
url?: string; // 图片地址
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
processCode?: string; // 工序编码
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增产品 SOP */
|
||||||
|
export function createProductSop(data: MesMdProductSopApi.ProductSop) {
|
||||||
|
return requestClient.post('/mes/md/product-sop/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改产品 SOP */
|
||||||
|
export function updateProductSop(data: MesMdProductSopApi.ProductSop) {
|
||||||
|
return requestClient.put('/mes/md/product-sop/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除产品 SOP */
|
||||||
|
export function deleteProductSop(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/product-sop/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 SOP 详情 */
|
||||||
|
export function getProductSop(id: number) {
|
||||||
|
return requestClient.get<MesMdProductSopApi.ProductSop>(
|
||||||
|
`/mes/md/product-sop/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询产品 SOP 分页 */
|
||||||
|
export function getProductSopPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdProductSopApi.ProductSop>>(
|
||||||
|
'/mes/md/product-sop/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 根据物料产品编号查询产品 SOP 列表 */
|
||||||
|
export function getProductSopListByItemId(itemId: number) {
|
||||||
|
return requestClient.get<MesMdProductSopApi.ProductSop[]>(
|
||||||
|
`/mes/md/product-sop/list-by-item-id?itemId=${itemId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdItemTypeApi {
|
||||||
|
/** MES 物料产品分类 */
|
||||||
|
export interface ItemType {
|
||||||
|
id?: number; // 分类编号
|
||||||
|
parentId?: number; // 父分类编号
|
||||||
|
code?: string; // 分类编码
|
||||||
|
name?: string; // 分类名称
|
||||||
|
itemOrProduct?: string; // 物料/产品标识
|
||||||
|
sort?: number; // 显示排序
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
children?: ItemType[]; // 子分类
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品分类列表 */
|
||||||
|
export function getItemTypeList(params?: any) {
|
||||||
|
return requestClient.get<MesMdItemTypeApi.ItemType[]>(
|
||||||
|
'/mes/md/item-type/list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品分类精简列表 */
|
||||||
|
export function getItemTypeSimpleList() {
|
||||||
|
return requestClient.get<MesMdItemTypeApi.ItemType[]>(
|
||||||
|
'/mes/md/item-type/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询物料产品分类详情 */
|
||||||
|
export function getItemType(id: number) {
|
||||||
|
return requestClient.get<MesMdItemTypeApi.ItemType>(
|
||||||
|
`/mes/md/item-type/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增物料产品分类 */
|
||||||
|
export function createItemType(data: MesMdItemTypeApi.ItemType) {
|
||||||
|
return requestClient.post('/mes/md/item-type/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改物料产品分类 */
|
||||||
|
export function updateItemType(data: MesMdItemTypeApi.ItemType) {
|
||||||
|
return requestClient.put('/mes/md/item-type/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除物料产品分类 */
|
||||||
|
export function deleteItemType(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/item-type/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdUnitMeasureApi {
|
||||||
|
/** MES 计量单位 */
|
||||||
|
export interface UnitMeasure {
|
||||||
|
id?: number; // 单位编号
|
||||||
|
code?: string; // 单位编码
|
||||||
|
name?: string; // 单位名称
|
||||||
|
primaryFlag?: boolean; // 是否主单位
|
||||||
|
primaryId?: number; // 主单位编号
|
||||||
|
changeRate?: number; // 与主单位换算比例
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询计量单位分页 */
|
||||||
|
export function getUnitMeasurePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdUnitMeasureApi.UnitMeasure>>(
|
||||||
|
'/mes/md/unit-measure/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询计量单位精简列表 */
|
||||||
|
export function getUnitMeasureSimpleList() {
|
||||||
|
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure[]>(
|
||||||
|
'/mes/md/unit-measure/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询计量单位详情 */
|
||||||
|
export function getUnitMeasure(id: number) {
|
||||||
|
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure>(
|
||||||
|
`/mes/md/unit-measure/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增计量单位 */
|
||||||
|
export function createUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
|
||||||
|
return requestClient.post('/mes/md/unit-measure/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改计量单位 */
|
||||||
|
export function updateUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
|
||||||
|
return requestClient.put('/mes/md/unit-measure/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除计量单位 */
|
||||||
|
export function deleteUnitMeasure(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md/unit-measure/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出计量单位 */
|
||||||
|
export function exportUnitMeasure(params: PageParam) {
|
||||||
|
return requestClient.download('/mes/md/unit-measure/export-excel', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdVendorApi {
|
||||||
|
/** MES 供应商 */
|
||||||
|
export interface Vendor {
|
||||||
|
id?: number; // 供应商编号
|
||||||
|
code?: string; // 供应商编码
|
||||||
|
name?: string; // 供应商名称
|
||||||
|
nickname?: string; // 供应商简称
|
||||||
|
englishName?: string; // 供应商英文名称
|
||||||
|
description?: string; // 供应商简介
|
||||||
|
logo?: string; // 供应商 LOGO 地址
|
||||||
|
level?: string; // 供应商等级
|
||||||
|
score?: number; // 供应商评分
|
||||||
|
address?: string; // 供应商地址
|
||||||
|
website?: string; // 供应商官网地址
|
||||||
|
email?: string; // 供应商邮箱地址
|
||||||
|
telephone?: string; // 供应商电话
|
||||||
|
contact1Name?: string; // 联系人1
|
||||||
|
contact1Telephone?: string; // 联系人1电话
|
||||||
|
contact1Email?: string; // 联系人1邮箱
|
||||||
|
contact2Name?: string; // 联系人2
|
||||||
|
contact2Telephone?: string; // 联系人2电话
|
||||||
|
contact2Email?: string; // 联系人2邮箱
|
||||||
|
creditCode?: string; // 统一社会信用代码
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 供应商导入结果 */
|
||||||
|
export interface VendorImportRespVO {
|
||||||
|
createCodes?: string[]; // 新增成功的供应商编码
|
||||||
|
updateCodes?: string[]; // 更新成功的供应商编码
|
||||||
|
failureCodes?: Record<string, string>; // 导入失败的供应商编码及原因
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询供应商分页 */
|
||||||
|
export function getVendorPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdVendorApi.Vendor>>(
|
||||||
|
'/mes/md-vendor/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询供应商详情 */
|
||||||
|
export function getVendor(id: number) {
|
||||||
|
return requestClient.get<MesMdVendorApi.Vendor>(
|
||||||
|
`/mes/md-vendor/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增供应商 */
|
||||||
|
export function createVendor(data: MesMdVendorApi.Vendor) {
|
||||||
|
return requestClient.post('/mes/md-vendor/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改供应商 */
|
||||||
|
export function updateVendor(data: MesMdVendorApi.Vendor) {
|
||||||
|
return requestClient.put('/mes/md-vendor/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除供应商 */
|
||||||
|
export function deleteVendor(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-vendor/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出供应商 */
|
||||||
|
export function exportVendor(params: any) {
|
||||||
|
return requestClient.download('/mes/md-vendor/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载供应商导入模板 */
|
||||||
|
export function importVendorTemplate() {
|
||||||
|
return requestClient.download('/mes/md-vendor/get-import-template');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导入供应商 */
|
||||||
|
export function importVendor(file: File, updateSupport: boolean) {
|
||||||
|
return requestClient.upload<MesMdVendorApi.VendorImportRespVO>(
|
||||||
|
`/mes/md-vendor/import?updateSupport=${updateSupport}`,
|
||||||
|
{ file },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkstationApi {
|
||||||
|
/** MES 工作站 */
|
||||||
|
export interface Workstation {
|
||||||
|
id?: number; // 工作站编号
|
||||||
|
code?: string; // 工作站编码
|
||||||
|
name?: string; // 工作站名称
|
||||||
|
address?: string; // 工作站地点
|
||||||
|
workshopId?: number; // 所在车间编号
|
||||||
|
workshopName?: string; // 所在车间名称
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
warehouseId?: number; // 线边库编号
|
||||||
|
locationId?: number; // 库区编号
|
||||||
|
areaId?: number; // 库位编号
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站分页 */
|
||||||
|
export function getWorkstationPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdWorkstationApi.Workstation>>(
|
||||||
|
'/mes/md-workstation/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站详情 */
|
||||||
|
export function getWorkstation(id: number) {
|
||||||
|
return requestClient.get<MesMdWorkstationApi.Workstation>(
|
||||||
|
`/mes/md-workstation/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工作站 */
|
||||||
|
export function createWorkstation(data: MesMdWorkstationApi.Workstation) {
|
||||||
|
return requestClient.post<number>('/mes/md-workstation/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工作站 */
|
||||||
|
export function updateWorkstation(data: MesMdWorkstationApi.Workstation) {
|
||||||
|
return requestClient.put('/mes/md-workstation/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工作站 */
|
||||||
|
export function deleteWorkstation(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workstation/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出工作站 */
|
||||||
|
export function exportWorkstation(params: any) {
|
||||||
|
return requestClient.download('/mes/md-workstation/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkstationMachineApi {
|
||||||
|
/** MES 工作站设备资源 */
|
||||||
|
export interface WorkstationMachine {
|
||||||
|
id?: number; // 资源编号
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
machineryId?: number; // 设备编号
|
||||||
|
machineryCode?: string; // 设备编码
|
||||||
|
machineryName?: string; // 设备名称
|
||||||
|
quantity?: number; // 数量
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站设备资源列表 */
|
||||||
|
export function getWorkstationMachineList(workstationId: number) {
|
||||||
|
return requestClient.get<MesMdWorkstationMachineApi.WorkstationMachine[]>(
|
||||||
|
'/mes/md-workstation-machine/list-by-workstation',
|
||||||
|
{ params: { workstationId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工作站设备资源 */
|
||||||
|
export function createWorkstationMachine(
|
||||||
|
data: MesMdWorkstationMachineApi.WorkstationMachine,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/md-workstation-machine/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工作站设备资源 */
|
||||||
|
export function deleteWorkstationMachine(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workstation-machine/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkstationToolApi {
|
||||||
|
/** MES 工作站工装夹具资源 */
|
||||||
|
export interface WorkstationTool {
|
||||||
|
id?: number; // 资源编号
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
toolTypeId?: number; // 工具类型编号
|
||||||
|
toolTypeName?: string; // 工具类型名称
|
||||||
|
quantity?: number; // 数量
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站工装夹具资源列表 */
|
||||||
|
export function getWorkstationToolList(workstationId: number) {
|
||||||
|
return requestClient.get<MesMdWorkstationToolApi.WorkstationTool[]>(
|
||||||
|
'/mes/md-workstation-tool/list-by-workstation',
|
||||||
|
{ params: { workstationId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工作站工装夹具资源 */
|
||||||
|
export function createWorkstationTool(
|
||||||
|
data: MesMdWorkstationToolApi.WorkstationTool,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/md-workstation-tool/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工作站工装夹具资源 */
|
||||||
|
export function updateWorkstationTool(
|
||||||
|
data: MesMdWorkstationToolApi.WorkstationTool,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/md-workstation-tool/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工作站工装夹具资源 */
|
||||||
|
export function deleteWorkstationTool(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workstation-tool/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkstationWorkerApi {
|
||||||
|
/** MES 工作站人力资源 */
|
||||||
|
export interface WorkstationWorker {
|
||||||
|
id?: number; // 资源编号
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
postId?: number; // 岗位编号
|
||||||
|
postName?: string; // 岗位名称
|
||||||
|
quantity?: number; // 数量
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作站人力资源列表 */
|
||||||
|
export function getWorkstationWorkerList(workstationId: number) {
|
||||||
|
return requestClient.get<MesMdWorkstationWorkerApi.WorkstationWorker[]>(
|
||||||
|
'/mes/md-workstation-worker/list-by-workstation',
|
||||||
|
{ params: { workstationId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工作站人力资源 */
|
||||||
|
export function createWorkstationWorker(
|
||||||
|
data: MesMdWorkstationWorkerApi.WorkstationWorker,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/md-workstation-worker/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工作站人力资源 */
|
||||||
|
export function updateWorkstationWorker(
|
||||||
|
data: MesMdWorkstationWorkerApi.WorkstationWorker,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/md-workstation-worker/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工作站人力资源 */
|
||||||
|
export function deleteWorkstationWorker(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workstation-worker/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesMdWorkshopApi {
|
||||||
|
/** MES 车间 */
|
||||||
|
export interface Workshop {
|
||||||
|
id?: number; // 车间编号
|
||||||
|
code?: string; // 车间编码
|
||||||
|
name?: string; // 车间名称
|
||||||
|
area?: number; // 面积
|
||||||
|
chargeUserId?: number; // 负责人用户编号
|
||||||
|
chargeUserName?: string; // 负责人名称
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询车间分页 */
|
||||||
|
export function getWorkshopPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesMdWorkshopApi.Workshop>>(
|
||||||
|
'/mes/md-workshop/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询车间精简列表 */
|
||||||
|
export function getWorkshopSimpleList() {
|
||||||
|
return requestClient.get<MesMdWorkshopApi.Workshop[]>(
|
||||||
|
'/mes/md-workshop/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询车间详情 */
|
||||||
|
export function getWorkshop(id: number) {
|
||||||
|
return requestClient.get<MesMdWorkshopApi.Workshop>(
|
||||||
|
`/mes/md-workshop/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增车间 */
|
||||||
|
export function createWorkshop(data: MesMdWorkshopApi.Workshop) {
|
||||||
|
return requestClient.post('/mes/md-workshop/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改车间 */
|
||||||
|
export function updateWorkshop(data: MesMdWorkshopApi.Workshop) {
|
||||||
|
return requestClient.put('/mes/md-workshop/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除车间 */
|
||||||
|
export function deleteWorkshop(id: number) {
|
||||||
|
return requestClient.delete(`/mes/md-workshop/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出车间 */
|
||||||
|
export function exportWorkshop(params: any) {
|
||||||
|
return requestClient.download('/mes/md-workshop/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProAndonConfigApi {
|
||||||
|
/** MES 安灯配置 */
|
||||||
|
export interface AndonConfig {
|
||||||
|
id?: number; // 编号
|
||||||
|
reason?: string; // 呼叫原因
|
||||||
|
level?: number; // 级别
|
||||||
|
handlerRoleId?: number; // 处置角色编号
|
||||||
|
handlerRoleName?: string; // 处置角色名称
|
||||||
|
handlerUserId?: number; // 处置人编号
|
||||||
|
handlerUserNickname?: string; // 处置人昵称
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询安灯配置分页 */
|
||||||
|
export function getAndonConfigPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesProAndonConfigApi.AndonConfig>>(
|
||||||
|
'/mes/pro/andon-config/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询安灯配置列表 */
|
||||||
|
export function getAndonConfigList() {
|
||||||
|
return requestClient.get<MesProAndonConfigApi.AndonConfig[]>(
|
||||||
|
'/mes/pro/andon-config/list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询安灯配置详情 */
|
||||||
|
export function getAndonConfig(id: number) {
|
||||||
|
return requestClient.get<MesProAndonConfigApi.AndonConfig>(
|
||||||
|
`/mes/pro/andon-config/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增安灯配置 */
|
||||||
|
export function createAndonConfig(data: MesProAndonConfigApi.AndonConfig) {
|
||||||
|
return requestClient.post('/mes/pro/andon-config/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改安灯配置 */
|
||||||
|
export function updateAndonConfig(data: MesProAndonConfigApi.AndonConfig) {
|
||||||
|
return requestClient.put('/mes/pro/andon-config/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除安灯配置 */
|
||||||
|
export function deleteAndonConfig(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/andon-config/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProAndonRecordApi {
|
||||||
|
/** MES 安灯记录 */
|
||||||
|
export interface AndonRecord {
|
||||||
|
id?: number;
|
||||||
|
configId?: number; // 安灯配置编号
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
workstationCode?: string; // 工作站编码
|
||||||
|
workstationName?: string; // 工作站名称
|
||||||
|
workOrderId?: number; // 生产工单编号
|
||||||
|
workOrderCode?: string; // 工单编码
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
userId?: number; // 发起用户编号
|
||||||
|
userNickname?: string; // 发起人昵称
|
||||||
|
reason?: string; // 呼叫原因
|
||||||
|
level?: number; // 级别
|
||||||
|
status?: number; // 处置状态
|
||||||
|
handleTime?: number; // 处置时间(毫秒时间戳)
|
||||||
|
handlerUserId?: number; // 处置人编号
|
||||||
|
handlerUserNickname?: string; // 处置人昵称
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: number; // 发起时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 安灯记录分页查询参数 */
|
||||||
|
export interface PageParams extends PageParam {
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
userId?: number; // 发起用户编号
|
||||||
|
handlerUserId?: number; // 处置人编号
|
||||||
|
status?: number; // 处置状态
|
||||||
|
createTime?: string[]; // 发起时间区间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询安灯记录分页 */
|
||||||
|
export function getAndonRecordPage(params: MesProAndonRecordApi.PageParams) {
|
||||||
|
return requestClient.get<PageResult<MesProAndonRecordApi.AndonRecord>>(
|
||||||
|
'/mes/pro/andon-record/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询安灯记录详情 */
|
||||||
|
export function getAndonRecord(id: number) {
|
||||||
|
return requestClient.get<MesProAndonRecordApi.AndonRecord>(
|
||||||
|
`/mes/pro/andon-record/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增安灯记录 */
|
||||||
|
export function createAndonRecord(data: MesProAndonRecordApi.AndonRecord) {
|
||||||
|
return requestClient.post('/mes/pro/andon-record/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除安灯记录 */
|
||||||
|
export function deleteAndonRecord(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/andon-record/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 更新安灯记录(保存/已处置) */
|
||||||
|
export function updateAndonRecord(data: MesProAndonRecordApi.AndonRecord) {
|
||||||
|
return requestClient.put('/mes/pro/andon-record/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出安灯记录 Excel */
|
||||||
|
export function exportAndonRecord(
|
||||||
|
params: Partial<MesProAndonRecordApi.PageParams>,
|
||||||
|
) {
|
||||||
|
return requestClient.download('/mes/pro/andon-record/export-excel', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProCardApi {
|
||||||
|
/** MES 生产流转卡 */
|
||||||
|
export interface Card {
|
||||||
|
id?: number; // 编号
|
||||||
|
code?: string; // 流转卡编码
|
||||||
|
workOrderId?: number; // 生产工单编号
|
||||||
|
workOrderCode?: string; // 工单编码
|
||||||
|
workOrderName?: string; // 工单名称
|
||||||
|
batchCode?: string; // 批次号
|
||||||
|
itemId?: number; // 产品物料编号
|
||||||
|
itemCode?: string; // 产品编码
|
||||||
|
itemName?: string; // 产品名称
|
||||||
|
specification?: string; // 规格型号
|
||||||
|
unitMeasureName?: string; // 单位名称
|
||||||
|
transferedQuantity?: number; // 流转数量
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 生产流转卡分页查询参数 */
|
||||||
|
export interface PageParams extends PageParam {
|
||||||
|
code?: string;
|
||||||
|
workOrderId?: number;
|
||||||
|
itemId?: number;
|
||||||
|
batchCode?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产流转卡分页 */
|
||||||
|
export function getCardPage(params: MesProCardApi.PageParams) {
|
||||||
|
return requestClient.get<PageResult<MesProCardApi.Card>>(
|
||||||
|
'/mes/pro/card/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产流转卡详情 */
|
||||||
|
export function getCard(id: number) {
|
||||||
|
return requestClient.get<MesProCardApi.Card>(`/mes/pro/card/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增生产流转卡 */
|
||||||
|
export function createCard(data: MesProCardApi.Card) {
|
||||||
|
return requestClient.post<number>('/mes/pro/card/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改生产流转卡 */
|
||||||
|
export function updateCard(data: MesProCardApi.Card) {
|
||||||
|
return requestClient.put('/mes/pro/card/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除生产流转卡 */
|
||||||
|
export function deleteCard(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/card/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出生产流转卡 */
|
||||||
|
export function exportCard(params: any) {
|
||||||
|
return requestClient.download('/mes/pro/card/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交生产流转卡 */
|
||||||
|
export function submitCard(id: number) {
|
||||||
|
return requestClient.put(`/mes/pro/card/submit?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 完成生产流转卡 */
|
||||||
|
export function finishCard(id: number) {
|
||||||
|
return requestClient.put(`/mes/pro/card/finish?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消生产流转卡 */
|
||||||
|
export function cancelCard(id: number) {
|
||||||
|
return requestClient.put(`/mes/pro/card/cancel?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProCardProcessApi {
|
||||||
|
/** MES 流转卡工序记录 */
|
||||||
|
export interface CardProcess {
|
||||||
|
id?: number; // 编号
|
||||||
|
cardId?: number; // 流转卡编号
|
||||||
|
sort?: number; // 序号
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
processCode?: string; // 工序编码
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
inputTime?: number; // 进入工序时间
|
||||||
|
outputTime?: number; // 出工序时间
|
||||||
|
inputQuantity?: number; // 投入数量
|
||||||
|
outputQuantity?: number; // 产出数量
|
||||||
|
unqualifiedQuantity?: number; // 不合格品数量
|
||||||
|
workstationId?: number; // 工位编号
|
||||||
|
workstationCode?: string; // 工位编码
|
||||||
|
workstationName?: string; // 工位名称
|
||||||
|
userId?: number; // 操作人编号
|
||||||
|
nickname?: string; // 操作人名称
|
||||||
|
ipqcId?: number; // 过程检验单编号
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 流转卡工序记录分页查询参数 */
|
||||||
|
export interface PageParams extends PageParam {
|
||||||
|
cardId?: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询流转卡工序记录分页 */
|
||||||
|
export function getCardProcessPage(params: MesProCardProcessApi.PageParams) {
|
||||||
|
return requestClient.get<PageResult<MesProCardProcessApi.CardProcess>>(
|
||||||
|
'/mes/pro/card-process/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询流转卡工序记录详情 */
|
||||||
|
export function getCardProcess(id: number) {
|
||||||
|
return requestClient.get<MesProCardProcessApi.CardProcess>(
|
||||||
|
`/mes/pro/card-process/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增流转卡工序记录 */
|
||||||
|
export function createCardProcess(data: MesProCardProcessApi.CardProcess) {
|
||||||
|
return requestClient.post('/mes/pro/card-process/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改流转卡工序记录 */
|
||||||
|
export function updateCardProcess(data: MesProCardProcessApi.CardProcess) {
|
||||||
|
return requestClient.put('/mes/pro/card-process/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除流转卡工序记录 */
|
||||||
|
export function deleteCardProcess(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/card-process/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,113 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProFeedbackApi {
|
||||||
|
/** MES 生产报工 */
|
||||||
|
export interface Feedback {
|
||||||
|
id?: number;
|
||||||
|
code?: string; // 报工单编号
|
||||||
|
type?: number; // 报工类型
|
||||||
|
channel?: string; // 报工途径
|
||||||
|
feedbackTime?: number; // 报工时间
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
workstationCode?: string; // 工作站编码
|
||||||
|
workstationName?: string; // 工作站名称
|
||||||
|
routeId?: number; // 工艺路线编号
|
||||||
|
routeCode?: string; // 工艺路线编码
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
processCode?: string; // 工序编码
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
checkFlag?: boolean; // 是否需要检验
|
||||||
|
workOrderId?: number; // 生产工单编号
|
||||||
|
workOrderCode?: string; // 工单编码
|
||||||
|
workOrderName?: string; // 工单名称
|
||||||
|
taskId?: number; // 生产任务编号
|
||||||
|
taskCode?: string; // 任务编码
|
||||||
|
itemId?: number; // 产品物料编号
|
||||||
|
itemCode?: string; // 物料编码
|
||||||
|
itemName?: string; // 物料名称
|
||||||
|
itemSpecification?: string; // 规格型号
|
||||||
|
unitMeasureId?: number; // 单位编号
|
||||||
|
unitMeasureName?: string; // 单位名称
|
||||||
|
expireDate?: number; // 过期日期
|
||||||
|
scheduledQuantity?: number; // 排产数量
|
||||||
|
feedbackQuantity?: number; // 本次报工数量
|
||||||
|
qualifiedQuantity?: number; // 合格品数量
|
||||||
|
unqualifiedQuantity?: number; // 不良品数量
|
||||||
|
uncheckQuantity?: number; // 待检测数量
|
||||||
|
laborScrapQuantity?: number; // 工废数量
|
||||||
|
materialScrapQuantity?: number; // 料废数量
|
||||||
|
otherScrapQuantity?: number; // 其他废品数量
|
||||||
|
feedbackUserId?: number; // 报工用户编号
|
||||||
|
feedbackUserNickname?: string; // 报工人昵称
|
||||||
|
approveUserId?: number; // 审核用户编号
|
||||||
|
approveUserNickname?: string; // 审核人昵称
|
||||||
|
status?: number; // 状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
creator?: string; // 创建人
|
||||||
|
createTime?: number; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 生产报工分页查询参数 */
|
||||||
|
export interface PageParams extends PageParam {
|
||||||
|
code?: string;
|
||||||
|
type?: number;
|
||||||
|
workOrderId?: number;
|
||||||
|
itemId?: number;
|
||||||
|
feedbackUserId?: number;
|
||||||
|
creator?: string;
|
||||||
|
status?: number;
|
||||||
|
feedbackTime?: string[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产报工分页 */
|
||||||
|
export function getFeedbackPage(params: MesProFeedbackApi.PageParams) {
|
||||||
|
return requestClient.get<PageResult<MesProFeedbackApi.Feedback>>(
|
||||||
|
'/mes/pro/feedback/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产报工详情 */
|
||||||
|
export function getFeedback(id: number) {
|
||||||
|
return requestClient.get<MesProFeedbackApi.Feedback>(
|
||||||
|
`/mes/pro/feedback/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增生产报工 */
|
||||||
|
export function createFeedback(data: MesProFeedbackApi.Feedback) {
|
||||||
|
return requestClient.post<number>('/mes/pro/feedback/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改生产报工 */
|
||||||
|
export function updateFeedback(data: MesProFeedbackApi.Feedback) {
|
||||||
|
return requestClient.put('/mes/pro/feedback/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除生产报工 */
|
||||||
|
export function deleteFeedback(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/feedback/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出生产报工 Excel */
|
||||||
|
export function exportFeedback(params: Partial<MesProFeedbackApi.PageParams>) {
|
||||||
|
return requestClient.download('/mes/pro/feedback/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交生产报工 */
|
||||||
|
export function submitFeedback(id: number) {
|
||||||
|
return requestClient.put(`/mes/pro/feedback/submit?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 驳回生产报工 */
|
||||||
|
export function rejectFeedback(id: number) {
|
||||||
|
return requestClient.put(`/mes/pro/feedback/reject?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 审批生产报工(返回是否已审批完成) */
|
||||||
|
export function approveFeedback(id: number) {
|
||||||
|
return requestClient.put<boolean>(`/mes/pro/feedback/approve?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProProcessContentApi {
|
||||||
|
/** MES 生产工序内容(操作步骤) */
|
||||||
|
export interface ProcessContent {
|
||||||
|
id?: number;
|
||||||
|
processId?: number;
|
||||||
|
sort?: number;
|
||||||
|
content?: string;
|
||||||
|
device?: string;
|
||||||
|
material?: string;
|
||||||
|
docUrl?: string;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 按工序编号查询工序内容列表 */
|
||||||
|
export function getProcessContentListByProcessId(processId: number) {
|
||||||
|
return requestClient.get<MesProProcessContentApi.ProcessContent[]>(
|
||||||
|
`/mes/pro/process-content/list-by-process?processId=${processId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工序内容详情 */
|
||||||
|
export function getProcessContent(id: number) {
|
||||||
|
return requestClient.get<MesProProcessContentApi.ProcessContent>(
|
||||||
|
`/mes/pro/process-content/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工序内容 */
|
||||||
|
export function createProcessContent(
|
||||||
|
data: MesProProcessContentApi.ProcessContent,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/pro/process-content/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工序内容 */
|
||||||
|
export function updateProcessContent(
|
||||||
|
data: MesProProcessContentApi.ProcessContent,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/pro/process-content/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工序内容 */
|
||||||
|
export function deleteProcessContent(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/process-content/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProProcessApi {
|
||||||
|
/** MES 生产工序 */
|
||||||
|
export interface Process {
|
||||||
|
id?: number;
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
attention?: string;
|
||||||
|
status?: number;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产工序分页 */
|
||||||
|
export function getProcessPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesProProcessApi.Process>>(
|
||||||
|
'/mes/pro/process/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产工序精简列表 */
|
||||||
|
export function getProcessSimpleList() {
|
||||||
|
return requestClient.get<MesProProcessApi.Process[]>(
|
||||||
|
'/mes/pro/process/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产工序详情 */
|
||||||
|
export function getProcess(id: number) {
|
||||||
|
return requestClient.get<MesProProcessApi.Process>(
|
||||||
|
`/mes/pro/process/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增生产工序 */
|
||||||
|
export function createProcess(data: MesProProcessApi.Process) {
|
||||||
|
return requestClient.post('/mes/pro/process/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改生产工序 */
|
||||||
|
export function updateProcess(data: MesProProcessApi.Process) {
|
||||||
|
return requestClient.put('/mes/pro/process/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除生产工序 */
|
||||||
|
export function deleteProcess(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/process/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出生产工序 Excel */
|
||||||
|
export function exportProcess(params: any) {
|
||||||
|
return requestClient.download('/mes/pro/process/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProRouteApi {
|
||||||
|
/** MES 工艺路线 */
|
||||||
|
export interface Route {
|
||||||
|
id?: number;
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
description?: string;
|
||||||
|
status?: number;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工艺路线分页 */
|
||||||
|
export function getRoutePage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesProRouteApi.Route>>(
|
||||||
|
'/mes/pro/route/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工艺路线精简列表 */
|
||||||
|
export function getRouteSimpleList() {
|
||||||
|
return requestClient.get<MesProRouteApi.Route[]>(
|
||||||
|
'/mes/pro/route/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工艺路线详情 */
|
||||||
|
export function getRoute(id: number) {
|
||||||
|
return requestClient.get<MesProRouteApi.Route>(`/mes/pro/route/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工艺路线 */
|
||||||
|
export function createRoute(data: MesProRouteApi.Route) {
|
||||||
|
return requestClient.post<number>('/mes/pro/route/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工艺路线 */
|
||||||
|
export function updateRoute(data: MesProRouteApi.Route) {
|
||||||
|
return requestClient.put('/mes/pro/route/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工艺路线状态 */
|
||||||
|
export function updateRouteStatus(id: number, status: number) {
|
||||||
|
return requestClient.put(
|
||||||
|
`/mes/pro/route/update-status?id=${id}&status=${status}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工艺路线 */
|
||||||
|
export function deleteRoute(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/route/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出工艺路线 Excel */
|
||||||
|
export function exportRoute(params: any) {
|
||||||
|
return requestClient.download('/mes/pro/route/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProRouteProcessApi {
|
||||||
|
/** MES 工艺路线工序 */
|
||||||
|
export interface RouteProcess {
|
||||||
|
id?: number;
|
||||||
|
routeId?: number;
|
||||||
|
processId?: number;
|
||||||
|
processCode?: string;
|
||||||
|
processName?: string;
|
||||||
|
sort?: number;
|
||||||
|
nextProcessId?: number;
|
||||||
|
nextProcessName?: string;
|
||||||
|
linkType?: number;
|
||||||
|
prepareTime?: number;
|
||||||
|
waitTime?: number;
|
||||||
|
colorCode?: string;
|
||||||
|
keyFlag?: boolean;
|
||||||
|
checkFlag?: boolean;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 按工艺路线查询工序列表 */
|
||||||
|
export function getRouteProcessListByRoute(routeId: number) {
|
||||||
|
return requestClient.get<MesProRouteProcessApi.RouteProcess[]>(
|
||||||
|
`/mes/pro/route-process/list-by-route?routeId=${routeId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 按产品查询工序列表(自动查找关联的工艺路线) */
|
||||||
|
export function getRouteProcessListByProduct(productId: number) {
|
||||||
|
return requestClient.get<MesProRouteProcessApi.RouteProcess[]>(
|
||||||
|
`/mes/pro/route-process/list-by-product?productId=${productId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工艺路线工序详情 */
|
||||||
|
export function getRouteProcess(id: number) {
|
||||||
|
return requestClient.get<MesProRouteProcessApi.RouteProcess>(
|
||||||
|
`/mes/pro/route-process/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 按工艺路线 + 工序精确查询工序配置 */
|
||||||
|
export function getRouteProcessByRouteAndProcess(
|
||||||
|
routeId: number,
|
||||||
|
processId: number,
|
||||||
|
) {
|
||||||
|
return requestClient.get<MesProRouteProcessApi.RouteProcess>(
|
||||||
|
'/mes/pro/route-process/get-by-route-and-process',
|
||||||
|
{ params: { processId, routeId } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工艺路线工序 */
|
||||||
|
export function createRouteProcess(data: MesProRouteProcessApi.RouteProcess) {
|
||||||
|
return requestClient.post('/mes/pro/route-process/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工艺路线工序 */
|
||||||
|
export function updateRouteProcess(data: MesProRouteProcessApi.RouteProcess) {
|
||||||
|
return requestClient.put('/mes/pro/route-process/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工艺路线工序 */
|
||||||
|
export function deleteRouteProcess(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/route-process/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProRouteProductApi {
|
||||||
|
/** MES 工艺路线产品 */
|
||||||
|
export interface RouteProduct {
|
||||||
|
id?: number;
|
||||||
|
routeId?: number;
|
||||||
|
itemId?: number;
|
||||||
|
itemCode?: string;
|
||||||
|
itemName?: string;
|
||||||
|
specification?: string;
|
||||||
|
unitName?: string;
|
||||||
|
quantity?: number;
|
||||||
|
productionTime?: number;
|
||||||
|
timeUnitType?: string;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 按工艺路线查询产品列表 */
|
||||||
|
export function getRouteProductListByRoute(routeId: number) {
|
||||||
|
return requestClient.get<MesProRouteProductApi.RouteProduct[]>(
|
||||||
|
`/mes/pro/route-product/list-by-route?routeId=${routeId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工艺路线产品详情 */
|
||||||
|
export function getRouteProduct(id: number) {
|
||||||
|
return requestClient.get<MesProRouteProductApi.RouteProduct>(
|
||||||
|
`/mes/pro/route-product/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工艺路线产品 */
|
||||||
|
export function createRouteProduct(data: MesProRouteProductApi.RouteProduct) {
|
||||||
|
return requestClient.post<number>('/mes/pro/route-product/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工艺路线产品 */
|
||||||
|
export function updateRouteProduct(data: MesProRouteProductApi.RouteProduct) {
|
||||||
|
return requestClient.put('/mes/pro/route-product/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工艺路线产品 */
|
||||||
|
export function deleteRouteProduct(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/route-product/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProRouteProductBomApi {
|
||||||
|
/** MES 工艺路线产品 BOM */
|
||||||
|
export interface RouteProductBom {
|
||||||
|
id?: number;
|
||||||
|
routeId?: number;
|
||||||
|
processId?: number;
|
||||||
|
productId?: number;
|
||||||
|
itemId?: number;
|
||||||
|
itemCode?: string;
|
||||||
|
itemName?: string;
|
||||||
|
specification?: string;
|
||||||
|
unitName?: string;
|
||||||
|
quantity?: number;
|
||||||
|
remark?: string;
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工艺路线产品 BOM 列表 */
|
||||||
|
export function getRouteProductBomList(params: {
|
||||||
|
processId?: number;
|
||||||
|
productId?: number;
|
||||||
|
routeId: number;
|
||||||
|
}) {
|
||||||
|
return requestClient.get<MesProRouteProductBomApi.RouteProductBom[]>(
|
||||||
|
'/mes/pro/route-product-bom/list',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工艺路线产品 BOM 详情 */
|
||||||
|
export function getRouteProductBom(id: number) {
|
||||||
|
return requestClient.get<MesProRouteProductBomApi.RouteProductBom>(
|
||||||
|
`/mes/pro/route-product-bom/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工艺路线产品 BOM */
|
||||||
|
export function createRouteProductBom(
|
||||||
|
data: MesProRouteProductBomApi.RouteProductBom,
|
||||||
|
) {
|
||||||
|
return requestClient.post('/mes/pro/route-product-bom/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工艺路线产品 BOM */
|
||||||
|
export function updateRouteProductBom(
|
||||||
|
data: MesProRouteProductBomApi.RouteProductBom,
|
||||||
|
) {
|
||||||
|
return requestClient.put('/mes/pro/route-product-bom/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工艺路线产品 BOM */
|
||||||
|
export function deleteRouteProductBom(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/route-product-bom/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProTaskApi {
|
||||||
|
/** MES 生产任务 */
|
||||||
|
export interface Task {
|
||||||
|
id?: number;
|
||||||
|
code?: string; // 任务编码
|
||||||
|
name?: string; // 任务名称
|
||||||
|
workOrderId?: number; // 生产工单编号
|
||||||
|
workOrderCode?: string; // 工单编码
|
||||||
|
workOrderName?: string; // 工单名称
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
workstationCode?: string; // 工作站编码
|
||||||
|
workstationName?: string; // 工作站名称
|
||||||
|
routeId?: number; // 工艺路线编号
|
||||||
|
processId?: number; // 工序编号
|
||||||
|
processName?: string; // 工序名称
|
||||||
|
itemId?: number; // 产品物料编号
|
||||||
|
itemCode?: string; // 产品编码
|
||||||
|
itemName?: string; // 产品名称
|
||||||
|
itemSpecification?: string; // 规格型号
|
||||||
|
unitMeasureId?: number; // 单位编号
|
||||||
|
unitMeasureName?: string; // 单位名称
|
||||||
|
quantity?: number; // 排产数量
|
||||||
|
producedQuantity?: number; // 已生产数量
|
||||||
|
qualifyQuantity?: number; // 合格品数量
|
||||||
|
unqualifyQuantity?: number; // 不良品数量
|
||||||
|
changedQuantity?: number; // 调整数量
|
||||||
|
clientId?: number; // 客户编号
|
||||||
|
clientName?: string; // 客户名称
|
||||||
|
startTime?: number; // 开始生产时间
|
||||||
|
endTime?: number; // 结束生产时间
|
||||||
|
duration?: number; // 生产时长(工作日,1=8小时)
|
||||||
|
requestDate?: number; // 需求日期(从工单查)
|
||||||
|
finishDate?: number; // 完成日期
|
||||||
|
cancelDate?: number; // 取消日期
|
||||||
|
colorCode?: string; // 甘特图显示颜色
|
||||||
|
status?: number; // 任务状态
|
||||||
|
checkFlag?: boolean; // 是否质检(派生自工艺路线工序)
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 生产任务分页查询参数 */
|
||||||
|
export interface PageParams extends PageParam {
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
workOrderId?: number;
|
||||||
|
workstationId?: number;
|
||||||
|
routeId?: number;
|
||||||
|
processId?: number;
|
||||||
|
itemId?: number;
|
||||||
|
statuses?: number[];
|
||||||
|
status?: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产任务分页 */
|
||||||
|
export function getTaskPage(params: MesProTaskApi.PageParams) {
|
||||||
|
return requestClient.get<PageResult<MesProTaskApi.Task>>(
|
||||||
|
'/mes/pro/task/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产任务详情 */
|
||||||
|
export function getTask(id: number) {
|
||||||
|
return requestClient.get<MesProTaskApi.Task>(`/mes/pro/task/get?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增生产任务 */
|
||||||
|
export function createTask(data: MesProTaskApi.Task) {
|
||||||
|
return requestClient.post('/mes/pro/task/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改生产任务 */
|
||||||
|
export function updateTask(data: MesProTaskApi.Task) {
|
||||||
|
return requestClient.put('/mes/pro/task/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除生产任务 */
|
||||||
|
export function deleteTask(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/task/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出生产任务 */
|
||||||
|
export function exportTask(params: any) {
|
||||||
|
return requestClient.download('/mes/pro/task/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询甘特图任务列表(非分页) */
|
||||||
|
export function getGanttTaskList(params: any) {
|
||||||
|
return requestClient.get<any[]>('/mes/pro/task/gantt-list', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProTaskIssueApi {
|
||||||
|
/** MES 生产任务投料 */
|
||||||
|
export interface TaskIssue {
|
||||||
|
id?: number; // 编号
|
||||||
|
taskId?: number; // 生产任务编号
|
||||||
|
workOrderId?: number; // 生产工单编号
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
sourceDocType?: string; // 来源单据类型
|
||||||
|
sourceDocId?: number; // 来源单据编号
|
||||||
|
sourceLineId?: number; // 来源单据行编号
|
||||||
|
sourceDocCode?: string; // 来源单据编码
|
||||||
|
batchCode?: string; // 投料批次
|
||||||
|
itemId?: number; // 产品物料编号
|
||||||
|
itemName?: string; // 产品名称
|
||||||
|
itemCode?: string; // 产品编码
|
||||||
|
itemSpecification?: string; // 规格型号
|
||||||
|
unitMeasureId?: number; // 单位编号
|
||||||
|
unitMeasureName?: string; // 单位名称
|
||||||
|
issuedQuantity?: number; // 总投料数量
|
||||||
|
availableQuantity?: number; // 当前可用数量
|
||||||
|
usedQuantity?: number; // 当前使用数量
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 生产任务投料分页查询参数 */
|
||||||
|
export interface PageParams extends PageParam {
|
||||||
|
taskId?: number; // 生产任务编号
|
||||||
|
workOrderId?: number; // 生产工单编号
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
itemId?: number; // 产品物料编号
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产任务投料分页 */
|
||||||
|
export function getTaskIssuePage(params: MesProTaskIssueApi.PageParams) {
|
||||||
|
return requestClient.get<PageResult<MesProTaskIssueApi.TaskIssue>>(
|
||||||
|
'/mes/pro/task-issue/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产任务投料详情 */
|
||||||
|
export function getTaskIssue(id: number) {
|
||||||
|
return requestClient.get<MesProTaskIssueApi.TaskIssue>(
|
||||||
|
`/mes/pro/task-issue/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增生产任务投料 */
|
||||||
|
export function createTaskIssue(data: MesProTaskIssueApi.TaskIssue) {
|
||||||
|
return requestClient.post('/mes/pro/task-issue/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改生产任务投料 */
|
||||||
|
export function updateTaskIssue(data: MesProTaskIssueApi.TaskIssue) {
|
||||||
|
return requestClient.put('/mes/pro/task-issue/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除生产任务投料 */
|
||||||
|
export function deleteTaskIssue(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/task-issue/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 按生产任务查询投料列表 */
|
||||||
|
export function getTaskIssueListByTask(taskId: number) {
|
||||||
|
return requestClient.get<MesProTaskIssueApi.TaskIssue[]>(
|
||||||
|
`/mes/pro/task-issue/list-by-task?taskId=${taskId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProWorkOrderBomApi {
|
||||||
|
/** MES 生产工单 BOM */
|
||||||
|
export interface WorkOrderBom {
|
||||||
|
id?: number; // 编号
|
||||||
|
workOrderId?: number; // 生产工单编号
|
||||||
|
itemId?: number; // BOM 物料编号
|
||||||
|
itemName?: string; // 物料名称
|
||||||
|
itemCode?: string; // 物料编码
|
||||||
|
itemSpecification?: string; // 规格型号
|
||||||
|
unitMeasureId?: number; // 单位编号
|
||||||
|
unitMeasureName?: string; // 单位名称
|
||||||
|
quantity?: number; // 预计使用量
|
||||||
|
remark?: string; // 备注
|
||||||
|
itemOrProduct?: string; // 物料产品标识
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 生产工单 BOM 分页查询参数 */
|
||||||
|
export interface PageParams extends PageParam {
|
||||||
|
workOrderId?: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工单 BOM 分页 */
|
||||||
|
export function getWorkOrderBomPage(params: MesProWorkOrderBomApi.PageParams) {
|
||||||
|
return requestClient.get<PageResult<MesProWorkOrderBomApi.WorkOrderBom>>(
|
||||||
|
'/mes/pro/work-order-bom/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工单 BOM 详情 */
|
||||||
|
export function getWorkOrderBom(id: number) {
|
||||||
|
return requestClient.get<MesProWorkOrderBomApi.WorkOrderBom>(
|
||||||
|
`/mes/pro/work-order-bom/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增工单 BOM */
|
||||||
|
export function createWorkOrderBom(data: MesProWorkOrderBomApi.WorkOrderBom) {
|
||||||
|
return requestClient.post('/mes/pro/work-order-bom/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改工单 BOM */
|
||||||
|
export function updateWorkOrderBom(data: MesProWorkOrderBomApi.WorkOrderBom) {
|
||||||
|
return requestClient.put('/mes/pro/work-order-bom/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除工单 BOM */
|
||||||
|
export function deleteWorkOrderBom(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/work-order-bom/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工单物料需求列表 */
|
||||||
|
export function getWorkOrderBomItemListByWorkOrderId(workOrderId: number) {
|
||||||
|
return requestClient.get<MesProWorkOrderBomApi.WorkOrderBom[]>(
|
||||||
|
`/mes/pro/work-order-bom/item-list-by-work-order-id?workOrderId=${workOrderId}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,101 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProWorkOrderApi {
|
||||||
|
/** MES 生产工单 */
|
||||||
|
export interface WorkOrder {
|
||||||
|
id?: number; // 编号
|
||||||
|
code?: string; // 工单编码
|
||||||
|
name?: string; // 工单名称
|
||||||
|
type?: number; // 工单类型
|
||||||
|
orderSourceType?: number; // 来源类型
|
||||||
|
orderSourceCode?: string; // 来源单据编号
|
||||||
|
productId?: number; // 产品编号
|
||||||
|
productName?: string; // 产品名称
|
||||||
|
productCode?: string; // 产品编码
|
||||||
|
productSpecification?: string; // 规格型号
|
||||||
|
unitMeasureName?: string; // 单位名称
|
||||||
|
quantity?: number; // 生产数量
|
||||||
|
quantityProduced?: number; // 已生产数量
|
||||||
|
quantityChanged?: number; // 调整数量
|
||||||
|
quantityScheduled?: number; // 已排产数量
|
||||||
|
clientId?: number; // 客户编号
|
||||||
|
clientCode?: string; // 客户编码
|
||||||
|
clientName?: string; // 客户名称
|
||||||
|
vendorId?: number; // 供应商编号
|
||||||
|
vendorName?: string; // 供应商名称
|
||||||
|
vendorCode?: string; // 供应商编码
|
||||||
|
batchCode?: string; // 批次号
|
||||||
|
requestDate?: number; // 需求日期
|
||||||
|
parentId?: number; // 父工单编号
|
||||||
|
parentCode?: string; // 父工单编码
|
||||||
|
finishDate?: number; // 完成时间
|
||||||
|
cancelDate?: number; // 取消时间
|
||||||
|
status?: number; // 工单状态
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: number; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 生产工单分页查询参数 */
|
||||||
|
export interface PageParams extends PageParam {
|
||||||
|
code?: string;
|
||||||
|
name?: string;
|
||||||
|
orderSourceCode?: string;
|
||||||
|
productId?: number;
|
||||||
|
clientId?: number;
|
||||||
|
status?: number;
|
||||||
|
type?: number;
|
||||||
|
requestDate?: number[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产工单分页 */
|
||||||
|
export function getWorkOrderPage(params: MesProWorkOrderApi.PageParams) {
|
||||||
|
return requestClient.get<PageResult<MesProWorkOrderApi.WorkOrder>>(
|
||||||
|
'/mes/pro/work-order/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询生产工单详情 */
|
||||||
|
export function getWorkOrder(id: number) {
|
||||||
|
return requestClient.get<MesProWorkOrderApi.WorkOrder>(
|
||||||
|
`/mes/pro/work-order/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增生产工单 */
|
||||||
|
export function createWorkOrder(data: MesProWorkOrderApi.WorkOrder) {
|
||||||
|
return requestClient.post<number>('/mes/pro/work-order/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改生产工单 */
|
||||||
|
export function updateWorkOrder(data: MesProWorkOrderApi.WorkOrder) {
|
||||||
|
return requestClient.put('/mes/pro/work-order/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除生产工单 */
|
||||||
|
export function deleteWorkOrder(id: number) {
|
||||||
|
return requestClient.delete(`/mes/pro/work-order/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出生产工单 */
|
||||||
|
export function exportWorkOrder(params: any) {
|
||||||
|
return requestClient.download('/mes/pro/work-order/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 完成工单 */
|
||||||
|
export function finishWorkOrder(id: number) {
|
||||||
|
return requestClient.put(`/mes/pro/work-order/finish?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消工单 */
|
||||||
|
export function cancelWorkOrder(id: number) {
|
||||||
|
return requestClient.put(`/mes/pro/work-order/cancel?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 确认工单 */
|
||||||
|
export function confirmWorkOrder(id: number) {
|
||||||
|
return requestClient.put(`/mes/pro/work-order/confirm?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesProWorkRecordApi {
|
||||||
|
/** MES 工作记录流水 */
|
||||||
|
export interface WorkRecordLog {
|
||||||
|
id?: number; // 编号
|
||||||
|
userId?: number; // 用户编号
|
||||||
|
userNickname?: string; // 用户昵称
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
workstationCode?: string; // 工作站编码
|
||||||
|
workstationName?: string; // 工作站名称
|
||||||
|
type?: number; // 1=上工 2=下工
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 当前用户工作站绑定状态 */
|
||||||
|
export interface MyWorkRecord {
|
||||||
|
userId?: number; // 用户编号
|
||||||
|
userNickname?: string; // 用户昵称
|
||||||
|
workstationId?: number; // 工作站编号
|
||||||
|
workstationCode?: string; // 工作站编码
|
||||||
|
workstationName?: string; // 工作站名称
|
||||||
|
type?: number; // 1=上工 2=下工
|
||||||
|
clockInTime?: Date; // 上工时间
|
||||||
|
clockOutTime?: Date; // 下工时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作记录分页 */
|
||||||
|
export function getWorkRecordLogPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesProWorkRecordApi.WorkRecordLog>>(
|
||||||
|
'/mes/pro/workrecord/log/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询工作记录详情 */
|
||||||
|
export function getWorkRecordLog(id: number) {
|
||||||
|
return requestClient.get<MesProWorkRecordApi.WorkRecordLog>(
|
||||||
|
`/mes/pro/workrecord/log/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出工作记录 */
|
||||||
|
export function exportWorkRecordLog(params: any) {
|
||||||
|
return requestClient.download('/mes/pro/workrecord/log/export-excel', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 上工(绑定工作站) */
|
||||||
|
export function clockInWorkRecord(workstationId: number) {
|
||||||
|
return requestClient.put('/mes/pro/workrecord/clock-in', null, {
|
||||||
|
params: { workstationId },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下工(解绑工作站) */
|
||||||
|
export function clockOutWorkRecord() {
|
||||||
|
return requestClient.put('/mes/pro/workrecord/clock-out');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询当前用户绑定的工作站 */
|
||||||
|
export function getMyWorkRecord() {
|
||||||
|
return requestClient.get<MesProWorkRecordApi.MyWorkRecord>(
|
||||||
|
'/mes/pro/workrecord/get-my',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesQcDefectApi {
|
||||||
|
/** MES 缺陷类型 */
|
||||||
|
export interface Defect {
|
||||||
|
id?: number; // 编号
|
||||||
|
code?: string; // 缺陷编码
|
||||||
|
name?: string; // 缺陷描述
|
||||||
|
type?: number; // 检测项类型
|
||||||
|
level?: number; // 缺陷等级
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询缺陷类型分页 */
|
||||||
|
export function getDefectPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesQcDefectApi.Defect>>(
|
||||||
|
'/mes/qc/defect/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询缺陷类型精简列表 */
|
||||||
|
export function getDefectSimpleList() {
|
||||||
|
return requestClient.get<MesQcDefectApi.Defect[]>(
|
||||||
|
'/mes/qc/defect/simple-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询缺陷类型详情 */
|
||||||
|
export function getDefect(id: number) {
|
||||||
|
return requestClient.get<MesQcDefectApi.Defect>(
|
||||||
|
`/mes/qc/defect/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增缺陷类型 */
|
||||||
|
export function createDefect(data: MesQcDefectApi.Defect) {
|
||||||
|
return requestClient.post('/mes/qc/defect/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改缺陷类型 */
|
||||||
|
export function updateDefect(data: MesQcDefectApi.Defect) {
|
||||||
|
return requestClient.put('/mes/qc/defect/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除缺陷类型 */
|
||||||
|
export function deleteDefect(id: number) {
|
||||||
|
return requestClient.delete(`/mes/qc/defect/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出缺陷类型 */
|
||||||
|
export function exportDefect(params: any) {
|
||||||
|
return requestClient.download('/mes/qc/defect/export-excel', { params });
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesQcDefectRecordApi {
|
||||||
|
/** MES 质检缺陷记录 */
|
||||||
|
export interface DefectRecord {
|
||||||
|
id?: number; // 编号
|
||||||
|
qcType?: number; // 检验类型
|
||||||
|
qcId?: number; // 检验单 ID
|
||||||
|
lineId?: number; // 检验行 ID
|
||||||
|
name?: string; // 缺陷描述
|
||||||
|
level?: number; // 缺陷等级
|
||||||
|
quantity?: number; // 缺陷数量
|
||||||
|
remark?: string; // 备注
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询质检缺陷记录 */
|
||||||
|
export function getDefectRecord(id: number) {
|
||||||
|
return requestClient.get<MesQcDefectRecordApi.DefectRecord>(
|
||||||
|
`/mes/qc/defect-record/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询质检缺陷记录分页 */
|
||||||
|
export function getDefectRecordPage(
|
||||||
|
params: PageParam & { lineId?: number; qcId?: number; qcType?: number },
|
||||||
|
) {
|
||||||
|
return requestClient.get<PageResult<MesQcDefectRecordApi.DefectRecord>>(
|
||||||
|
'/mes/qc/defect-record/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增质检缺陷记录 */
|
||||||
|
export function createDefectRecord(data: MesQcDefectRecordApi.DefectRecord) {
|
||||||
|
return requestClient.post('/mes/qc/defect-record/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改质检缺陷记录 */
|
||||||
|
export function updateDefectRecord(data: MesQcDefectRecordApi.DefectRecord) {
|
||||||
|
return requestClient.put('/mes/qc/defect-record/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除质检缺陷记录 */
|
||||||
|
export function deleteDefectRecord(id: number) {
|
||||||
|
return requestClient.delete(`/mes/qc/defect-record/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace MesQcIndicatorApi {
|
||||||
|
/** MES 质检指标 */
|
||||||
|
export interface Indicator {
|
||||||
|
id?: number; // 编号
|
||||||
|
code?: string; // 检测项编码
|
||||||
|
name?: string; // 检测项名称
|
||||||
|
type?: number; // 检测项类型
|
||||||
|
tool?: string; // 检测工具
|
||||||
|
resultType?: number; // 结果值类型
|
||||||
|
resultSpecification?: string; // 结果值属性
|
||||||
|
remark?: string; // 备注
|
||||||
|
createTime?: Date; // 创建时间
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询质检指标分页 */
|
||||||
|
export function getIndicatorPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<MesQcIndicatorApi.Indicator>>(
|
||||||
|
'/mes/qc/indicator/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询质检指标详情 */
|
||||||
|
export function getIndicator(id: number) {
|
||||||
|
return requestClient.get<MesQcIndicatorApi.Indicator>(
|
||||||
|
`/mes/qc/indicator/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增质检指标 */
|
||||||
|
export function createIndicator(data: MesQcIndicatorApi.Indicator) {
|
||||||
|
return requestClient.post('/mes/qc/indicator/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改质检指标 */
|
||||||
|
export function updateIndicator(data: MesQcIndicatorApi.Indicator) {
|
||||||
|
return requestClient.put('/mes/qc/indicator/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除质检指标 */
|
||||||
|
export function deleteIndicator(id: number) {
|
||||||
|
return requestClient.delete(`/mes/qc/indicator/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出质检指标 */
|
||||||
|
export function exportIndicator(params: any) {
|
||||||
|
return requestClient.download('/mes/qc/indicator/export-excel', { params });
|
||||||
|
}
|
||||||