Compare commits
298 Commits
1a7a01894d
...
deploy-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6202151242 | ||
|
|
ad9a43a7c6 | ||
|
|
82b0f4cf96 | ||
|
|
bbed0e3ff3 | ||
|
|
1790db4595 | ||
|
|
8b40268bd1 | ||
|
|
7aa949bdcf | ||
|
|
61dcbfeacd | ||
|
|
6478070bd8 | ||
|
|
a1b3ee2c8c | ||
|
|
dd7c417f81 | ||
|
|
a9e6998430 | ||
|
|
261ad9017d | ||
|
|
b8b6a46e7e | ||
|
|
ab29f9152d | ||
|
|
2d96bbda3b | ||
|
|
7869b083c3 | ||
|
|
9637a6f13b | ||
|
|
ecf6cd38dd | ||
|
|
84191fe301 | ||
|
|
7dadb22181 | ||
|
|
b396c37426 | ||
|
|
ee99ba7340 | ||
|
|
c628c10f25 | ||
|
|
79c56bb979 | ||
|
|
9ca6cb83f0 | ||
|
|
a2bfe148d3 | ||
|
|
9134cf4ac3 | ||
|
|
7b77c3cc88 | ||
|
|
5e2f9cc966 | ||
|
|
4dcb8f74ca | ||
|
|
223ceed5eb | ||
|
|
5c5acf6942 | ||
|
|
975d5fe4f0 | ||
|
|
159698ffbe | ||
|
|
1b0118bb82 | ||
|
|
7c679f7fa5 | ||
|
|
ccec1ee763 | ||
|
|
c390535202 | ||
|
|
f4d01d65d0 | ||
|
|
16e3213f21 | ||
|
|
842c1e94e0 | ||
|
|
55f98f9e56 | ||
|
|
fc4b038e2e | ||
|
|
5993621c21 | ||
|
|
714e640c2e | ||
|
|
96b91ad6de | ||
|
|
b82b97ebb1 | ||
|
|
69727fa613 | ||
|
|
0fba8917f2 | ||
|
|
088590beea | ||
|
|
4c2989239d | ||
|
|
1c8419569e | ||
|
|
822519dbb6 | ||
|
|
2d1d3a41a8 | ||
|
|
2bc56cc1d4 | ||
|
|
f82ffa185d | ||
|
|
57d97eb3e2 | ||
|
|
c9e283c3c8 | ||
|
|
57b55b5f82 | ||
|
|
ca0ebf33f7 | ||
|
|
ec94e2b5b4 | ||
|
|
c085f51cd1 | ||
|
|
1e4a3d61da | ||
|
|
9bd82ebbee | ||
|
|
ecdcd900d3 | ||
|
|
2f1a54a114 | ||
|
|
f636f426b0 | ||
|
|
1c709d3ccf | ||
|
|
df0f1f62ad | ||
|
|
6be90a8d0c | ||
| 0585818abf | |||
|
|
75a9b87513 | ||
|
|
0fa9abf014 | ||
|
|
2576503808 | ||
|
|
7274efd5c2 | ||
|
|
429909a712 | ||
|
|
a6f77afe70 | ||
|
|
4955c235cc | ||
|
|
86db377d29 | ||
|
|
db70343b18 | ||
|
|
7f839b7a31 | ||
|
|
13d6db895f | ||
|
|
4e17163c67 | ||
|
|
c1aa2483ed | ||
|
|
652a94a466 | ||
|
|
97667fc496 | ||
|
|
9dfc3173ac | ||
|
|
7745f55803 | ||
|
|
f915dab012 | ||
|
|
9031837695 | ||
|
|
bd4fec4c7e | ||
|
|
f10045b64d | ||
|
|
85cd183493 | ||
|
|
a83f8d868a | ||
|
|
bf4a3fd581 | ||
|
|
2a6de583e1 | ||
|
|
ddf0514182 | ||
|
|
1be888feba | ||
|
|
5c902d174d | ||
|
|
c2e69b4d36 | ||
|
|
7690f72636 | ||
|
|
211b013084 | ||
|
|
62f357c5d5 | ||
| a94531bd57 | |||
|
|
b06c9ddc84 | ||
|
|
40021ba5d0 | ||
|
|
1401d3611f | ||
|
|
d29c724920 | ||
|
|
5eba9a35a0 | ||
|
|
6278e3ff17 | ||
|
|
0b619fe937 | ||
|
|
48569345aa | ||
|
|
dc0f2a164b | ||
|
|
1aa294b998 | ||
|
|
ef20fa58de | ||
|
|
dac2e095e1 | ||
|
|
c68dc4deb7 | ||
|
|
0e9743f598 | ||
|
|
2fe6bb6d81 | ||
|
|
58300c60e2 | ||
|
|
3bf19ba70d | ||
|
|
de0ce4ec2d | ||
|
|
8091bc10cc | ||
|
|
e90efdb08d | ||
|
|
86e0b30e81 | ||
|
|
0214356cbb | ||
|
|
098b4f29fd | ||
|
|
3598e3d887 | ||
|
|
4869fd4d16 | ||
|
|
b41caf9320 | ||
|
|
8603732377 | ||
|
|
32d1a633b1 | ||
|
|
5deff41679 | ||
|
|
0681836c02 | ||
|
|
4526da936e | ||
|
|
c31b5468c7 | ||
|
|
e0206a228b | ||
| 7802223799 | |||
|
|
47614e12ed | ||
|
|
d8cc8293bc | ||
|
|
141f2a3e6f | ||
|
|
4fcdae08de | ||
|
|
93d5959334 | ||
|
|
042fc8f16f | ||
|
|
0282d2d1aa | ||
|
|
97c3945848 | ||
|
|
37b877b220 | ||
|
|
4dea1ff14d | ||
|
|
de7a0ab88a | ||
|
|
533f0cc633 | ||
|
|
0cac402bd1 | ||
|
|
e648da4b6e | ||
|
|
6137aaa4b6 | ||
|
|
4d49ef4e42 | ||
|
|
131913e52d | ||
|
|
5ed7449392 | ||
|
|
a698c69b7c | ||
|
|
5fde3175f1 | ||
|
|
149f44a8dd | ||
|
|
060ac6d486 | ||
|
|
7b624f6549 | ||
|
|
717b2aad72 | ||
|
|
f98a8be0b9 | ||
|
|
de2202e360 | ||
|
|
6b93422b08 | ||
|
|
30286253e7 | ||
|
|
a0d928feaa | ||
|
|
50ca1daca4 | ||
|
|
fb1980d73a | ||
|
|
ab17c4a1f9 | ||
|
|
aab4c9a600 | ||
|
|
0855659d74 | ||
|
|
3abdde797b | ||
|
|
d004a06ec1 | ||
|
|
76248c0f70 | ||
|
|
6e294e13eb | ||
|
|
7a9bea2f8e | ||
|
|
77052ae284 | ||
|
|
33eb153885 | ||
|
|
a3a5b63ea5 | ||
|
|
7a20eb8603 | ||
|
|
dc29be2718 | ||
|
|
f28b224c91 | ||
|
|
bfd6282a99 | ||
|
|
64cfd47d50 | ||
|
|
796d2fcf63 | ||
|
|
287dc9262b | ||
|
|
f39fb299c4 | ||
|
|
9ad9446cae | ||
|
|
1d4b76492d | ||
|
|
a16b26370f | ||
|
|
9316629faa | ||
|
|
c7bbc1f003 | ||
|
|
da80693704 | ||
|
|
40d93e74aa | ||
|
|
b2a200486f | ||
|
|
228f420bd4 | ||
|
|
78d49ff16e | ||
|
|
4bbb5c5133 | ||
|
|
d294c3f07a | ||
|
|
fba16c75b9 | ||
|
|
e5cd75c845 | ||
|
|
be09e531b9 | ||
|
|
45908dd5c1 | ||
|
|
7fd1733872 | ||
|
|
2d9fc62d86 | ||
|
|
7eb8ba79f8 | ||
|
|
ef782e90b6 | ||
|
|
46398fda22 | ||
|
|
edfc11825d | ||
|
|
9f1620c9f8 | ||
|
|
9ddeaa59eb | ||
|
|
8f25d2293c | ||
|
|
7c64a6b231 | ||
|
|
d6865544d8 | ||
|
|
3d2d777644 | ||
|
|
613e7feaf4 | ||
|
|
b55ab2353e | ||
|
|
d654588e65 | ||
|
|
15fce86265 | ||
|
|
cecd3a0325 | ||
|
|
0c291263cd | ||
|
|
d4f17c4c02 | ||
|
|
e16ad610e7 | ||
|
|
fea7abd476 | ||
|
|
2ebe536243 | ||
|
|
ab3960fff8 | ||
|
|
77a9fe882d | ||
|
|
8a554f5871 | ||
|
|
5d7d8cc4de | ||
|
|
69776112f9 | ||
|
|
f744ad286e | ||
|
|
75a67c3039 | ||
|
|
ec1ae071f8 | ||
|
|
d527a1467f | ||
|
|
012c049ab0 | ||
|
|
e0fe92a8f8 | ||
|
|
e9ca9cfab9 | ||
|
|
217496d5b6 | ||
|
|
efced81544 | ||
|
|
1f62153ad4 | ||
|
|
09fa01122c | ||
|
|
cd1690fb28 | ||
|
|
559db71640 | ||
|
|
91dd7a7d0c | ||
|
|
bc80a22180 | ||
|
|
da3d5840df | ||
|
|
08972bfbfb | ||
|
|
819a00f733 | ||
|
|
680855f310 | ||
|
|
8e6abb5c57 | ||
|
|
689a349d96 | ||
|
|
dd82f15e7f | ||
|
|
fbf460a620 | ||
|
|
c4132d41cd | ||
|
|
c4652e2571 | ||
|
|
d58f066b39 | ||
|
|
e6ed0f0e09 | ||
|
|
3b6d11122e | ||
|
|
30743f1474 | ||
|
|
ec6faa9494 | ||
|
|
cbfa942ff6 | ||
|
|
fc940e7241 | ||
|
|
a0f5c4de08 | ||
|
|
112c701799 | ||
|
|
6a31e3199b | ||
|
|
2141efd7a7 | ||
|
|
946384b9ed | ||
|
|
0bfbf391e2 | ||
|
|
e7e2d52dff | ||
|
|
14a7c158bc | ||
|
|
9c3508fbc8 | ||
|
|
61218104d3 | ||
|
|
bd89f7973d | ||
|
|
e1b0d817fe | ||
|
|
31479608c0 | ||
|
|
65230bf066 | ||
|
|
9319c09fb7 | ||
|
|
620fbd509a | ||
|
|
4614c8699f | ||
|
|
f7ebb4bd60 | ||
|
|
c9f8148dc3 | ||
|
|
c4d7573cbb | ||
|
|
778ada00fc | ||
|
|
e28ca898ee | ||
|
|
a67f48c770 | ||
|
|
0db3da2362 | ||
|
|
de08945d49 | ||
|
|
ddb046d2d3 | ||
|
|
d2b0a2ca06 | ||
|
|
c7f104091f | ||
|
|
2c6dc56e0b | ||
|
|
1e72487b35 | ||
|
|
8b2dc8a230 | ||
|
|
ab7217f0f0 | ||
|
|
11a7c77f69 | ||
|
|
576f313b2f |
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<link rel="icon" href="/projectIcon.svg" />
|
||||
<meta name="referrer" content="never" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<!-- <script type="text/javascript">
|
||||
|
||||
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/21961.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/21962.png
Normal file
|
After Width: | Height: | Size: 810 B |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22394.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22394@2x.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22396.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22396@2x.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22400.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22400@2x.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22406.png
Normal file
|
After Width: | Height: | Size: 237 B |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22419.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22419@2x.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22496.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22546.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22549.png
Normal file
|
After Width: | Height: | Size: 795 B |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22553.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/22554.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/bgsquare.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
hx-ai-intelligent/public/asset/image/headerIcon.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 688 KiB After Width: | Height: | Size: 1.9 MiB |
BIN
hx-ai-intelligent/public/asset/image/login/lg-card-bg.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
10
hx-ai-intelligent/public/projectIcon.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
|
||||
<g id="组_23402" data-name="组 23402" transform="translate(-959.12 -738.12)">
|
||||
<rect id="矩形_16530" data-name="矩形 16530" width="36" height="36" transform="translate(959.12 738.12)" fill="none"/>
|
||||
<g id="组_23400" data-name="组 23400" transform="translate(960.956 739.956)">
|
||||
<path id="路径_30576" data-name="路径 30576" d="M207.674,163.872v-9.284a2.553,2.553,0,0,0-1.179-2.063l-8.056-4.634a2.417,2.417,0,0,0-2.358,0l-8.023,4.65a2.38,2.38,0,0,0-1.179,2.063v9.333A2.553,2.553,0,0,0,188.059,166l8.056,4.585a2.417,2.417,0,0,0,2.358,0l8.056-4.634A2.331,2.331,0,0,0,207.674,163.872Z" transform="translate(-181.117 -142.881)" fill="#4388fb" opacity="0.2"/>
|
||||
<path id="路径_30577" data-name="路径 30577" d="M265.893,314.283h-2.718l-.884-2.653h-4.224l-.884,2.653h-2.718l4.224-11.625h2.9Zm-4.093-4.617-1.326-4.044a9.365,9.365,0,0,1-.2-1.015h-.065a5.831,5.831,0,0,1-.2,1.015l-1.326,4.044Zm8.072-7.073v11.625h-2.456V302.592Z" transform="translate(-246.539 -292.932)" fill="#4388fb"/>
|
||||
<path id="路径_30578" data-name="路径 30578" d="M36.685,20.095a.9.9,0,0,0-.884.884v2.472a1.535,1.535,0,0,1-.77,1.294L23.7,31.262a1.422,1.422,0,0,1-1.523,0l-11.33-6.517a1.456,1.456,0,0,1-.77-1.294V20.177a2.409,2.409,0,0,0-1-4.6,2.425,2.425,0,0,0-2.423,2.407,2.391,2.391,0,0,0,1.637,2.276v3.176a3.268,3.268,0,0,0,1.637,2.816l11.33,6.582a3.244,3.244,0,0,0,1.637.409,3.471,3.471,0,0,0,1.637-.475l11.281-6.517a3.268,3.268,0,0,0,1.637-2.816V20.963A.76.76,0,0,0,36.685,20.095Zm.884-6.942V10.287a3.268,3.268,0,0,0-1.637-2.816L24.585.954a3.284,3.284,0,0,0-3.291,0L9.947,7.471A3.268,3.268,0,0,0,8.31,10.287v2.227a.884.884,0,1,0,1.768,0V10.287a1.535,1.535,0,0,1,.77-1.294l11.33-6.517a1.422,1.422,0,0,1,1.523,0L34.982,9.059a1.456,1.456,0,0,1,.77,1.294v2.734a2.4,2.4,0,1,0,1.817.065Z" transform="translate(-6.656 -0.512)" fill="#4388fb"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -21,12 +21,12 @@
|
||||
// watch(
|
||||
// () => router.currentRoute.value,
|
||||
// (e) => {
|
||||
// // if (Cookies.get('nervsid') === undefined && e.fullPath !== '/login') {
|
||||
// // if (Cookies.get(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`) === undefined && e.fullPath !== '/login') {
|
||||
// // message.warn('登陆信息已过期,请重新登录!', 1);
|
||||
// // router.push('/login');
|
||||
// // }
|
||||
// // } else {
|
||||
// // if (Cookies.get('nervsid') !== undefined && e === '/login') {
|
||||
// // if (Cookies.get(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`) !== undefined && e === '/login') {
|
||||
// // let url = window.sessionStorage.getItem('url');
|
||||
// // url === null ? window.sessionStorage.setItem('url', '/doorway/visitor/audit') : '';
|
||||
// // router.push(url === null ? '/doorway' : url);
|
||||
@@ -43,192 +43,149 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ns-content) {
|
||||
padding-top: 80px !important;
|
||||
:deep(.ns-content-main) {
|
||||
.ant-tabs-content {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// 树组件
|
||||
:deep(.ant-tree-node-content-wrapper) {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
|
||||
:deep(.ns-left-menu .firstMenuItem-selected .ant-menu-title-content) {
|
||||
background: unset !important;
|
||||
:deep(.ant-tree-node-selected) {
|
||||
color: @primary-color !important;
|
||||
}
|
||||
:deep(.ns-left-menu .ant-menu-item-selected .ant-menu-title-content) {
|
||||
color: #fff !important;
|
||||
background: @primary-color;
|
||||
border-radius: 2px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
a {
|
||||
color: #ffffff !important;
|
||||
|
||||
// ns-view-list-table 搜索区域
|
||||
:deep(.ns-table-search) {
|
||||
.ns-flexv2-form {
|
||||
.ns-operate {
|
||||
text-align: left;
|
||||
margin-left: 0;
|
||||
.ant-btn {
|
||||
margin: 0;
|
||||
margin-right: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ns-form-body {
|
||||
max-width: 1000px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-menu-light.ant-menu-horizontal > .ant-menu-item:hover) {
|
||||
background: @primary-color;
|
||||
// 区域阴影
|
||||
// .ns-list-table {
|
||||
|
||||
:deep(.ant-tabs) {
|
||||
// // overflow: visible;
|
||||
// box-shadow: @ns-content-box-shadow;
|
||||
// border-radius: @ns-border-radius;
|
||||
.ns-table-search {
|
||||
border-top-left-radius: 0px !important;
|
||||
border-top-right-radius: 0px !important;
|
||||
}
|
||||
.ns-table-main {
|
||||
border-bottom-left-radius: 0px !important;
|
||||
border-bottom-right-radius: 0px !important;
|
||||
}
|
||||
// .ant-tabs-tabpane-active > div {
|
||||
// height: 100%;
|
||||
// }
|
||||
}
|
||||
:deep(.ant-menu-inline .ant-menu-submenu-title) {
|
||||
color: rgba(255, 255, 255, 0.9) !important;
|
||||
// .ant-tabs .ns-table-main {
|
||||
// border-bottom-left-radius: 0px !important;
|
||||
// border-bottom-right-radius: 0px !important;
|
||||
// }
|
||||
// }
|
||||
|
||||
// 菜单icon(仅仅处理特殊需求:未选中时icon与文字不同色)
|
||||
:deep(.anticon) {
|
||||
color: #8d96a3 !important;
|
||||
}
|
||||
:deep(.ns-left-menu .ant-layout-sider-children .ant-menu-sub.ant-menu-inline) {
|
||||
position: relative;
|
||||
&::before {
|
||||
display: flex;
|
||||
width: 2px;
|
||||
height: calc(100% - 40px);
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
content: '';
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
|
||||
:deep(.ant-menu-item-selected .ant-menu-item-only-child),
|
||||
:deep(.ant-menu-submenu-selected .ant-menu-item-only-child),
|
||||
:deep(.firstMenuItem-selected) {
|
||||
.router-link-active > .anticon {
|
||||
color: @white !important;
|
||||
}
|
||||
}
|
||||
|
||||
//*************************含tab的 list列表样式 */
|
||||
:deep(.tabListTable) {
|
||||
.ns-table-title {
|
||||
text-align: left;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
:deep(.ant-menu-item-active) {
|
||||
.anticon {
|
||||
color: @primary-color !important;
|
||||
}
|
||||
}
|
||||
:deep(.ant-menu-submenu-active),
|
||||
:deep(.ant-menu-submenu-open),
|
||||
:deep(.ant-menu-item-selected) {
|
||||
.ant-menu-submenu-title {
|
||||
.anticon {
|
||||
color: @primary-color !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@min-padding: 5px;
|
||||
:deep(.ns-left-menu-space):not(.ns-left-menu-space-collapsed) {
|
||||
.firstMenuItem-selected {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
|
||||
background-color: transparent;
|
||||
&::before {
|
||||
background-color: @primary-color;
|
||||
opacity: 1;
|
||||
height: calc(100% - @min-padding*2);
|
||||
top: @min-padding;
|
||||
border-radius: @ns-border-radius;
|
||||
}
|
||||
}
|
||||
.ant-menu-item-active:not(.ant-menu-item-selected) {
|
||||
background-color: transparent !important;
|
||||
position: relative;
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
background-color: rgb(@primary-color, 0.1);
|
||||
height: calc(100% - @min-padding*2);
|
||||
top: @min-padding;
|
||||
left: 0;
|
||||
border-radius: @ns-border-radius;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// .ant-menu-inline .ant-menu-item-selected::after {
|
||||
// content: '';
|
||||
// position: absolute;
|
||||
// top: 50%;
|
||||
// right: -20px;
|
||||
// transform: translateY(-50%);
|
||||
// width: 3px !important;
|
||||
// border-radius: 2px;
|
||||
// background-color: red;
|
||||
// height: 30px;
|
||||
// z-index: 2;
|
||||
// border: none;
|
||||
// }
|
||||
|
||||
.ant-menu-title-content {
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.nsHeader_action) {
|
||||
.action {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
user-select: text;
|
||||
padding-left: 16px;
|
||||
background: #fff;
|
||||
width: calc(100% + 32px);
|
||||
margin-left: -16px;
|
||||
}
|
||||
.tabs-list {
|
||||
overflow: visible !important;
|
||||
}
|
||||
.ant-tabs-nav {
|
||||
width: calc(100% + 32px);
|
||||
margin-left: -16px !important;
|
||||
background: #fff;
|
||||
}
|
||||
.ant-tabs-nav-wrap {
|
||||
padding: 0 16px;
|
||||
}
|
||||
}
|
||||
|
||||
//*********************详情页返回修改 */
|
||||
:deep(.nsDetailView) {
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
.ns-detail-content {
|
||||
padding: 0px 24px;
|
||||
border-top: 16px solid #e5ebf0;
|
||||
}
|
||||
.ant-descriptions-item-label {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
font-family: PingFang SC;
|
||||
font-size: 14px;
|
||||
}
|
||||
.ant-descriptions-item-content {
|
||||
color: rgba(0, 0, 0, 0.95);
|
||||
font-family: PingFang SC;
|
||||
font-size: 14px;
|
||||
}
|
||||
.ant-descriptions-title {
|
||||
&::after {
|
||||
content: '';
|
||||
width: 75px;
|
||||
height: 7px;
|
||||
display: block;
|
||||
background: linear-gradient(90deg, #537fff 0%, #fff 82.67%);
|
||||
margin-left: 2px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-descriptions-row > th,
|
||||
.ant-descriptions-row > td {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.ns-page-header {
|
||||
margin-bottom: 0 !important;
|
||||
padding-top: 7px !important;
|
||||
padding-bottom: 7px !important;
|
||||
width: calc(100% + 32px);
|
||||
margin-left: -16px;
|
||||
.title {
|
||||
cursor: pointer;
|
||||
font-size: 18px !important;
|
||||
}
|
||||
}
|
||||
.ant-descriptions-header {
|
||||
margin: 16px 0 16px 0 !important;
|
||||
|
||||
.ant-descriptions-title {
|
||||
line-height: 16px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ns-detail .ant-descriptions-header .descriptions-title) {
|
||||
&:after {
|
||||
content: '';
|
||||
width: 75px;
|
||||
height: 7px;
|
||||
display: block;
|
||||
background: linear-gradient(90deg, @primary-color 0%, #fff 82.67%);
|
||||
margin-left: 2px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
}
|
||||
:deep(.ant-descriptions-header .descriptions-title) {
|
||||
&:after {
|
||||
content: '';
|
||||
width: 75px;
|
||||
height: 7px;
|
||||
display: block;
|
||||
background: linear-gradient(90deg, @primary-color 0%, #fff 82.67%);
|
||||
margin-left: 2px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
// 列表弹框样式修改
|
||||
.listTableModal .ant-modal-title {
|
||||
font-weight: 600;
|
||||
}
|
||||
.listTableModal .ant-modal-body {
|
||||
padding: 16px !important;
|
||||
.ant-tabs-nav-wrap {
|
||||
padding: 0px;
|
||||
}
|
||||
.ns-list-table {
|
||||
border-left: 16px solid #e5ebf0;
|
||||
border-right: 16px solid #e5ebf0;
|
||||
border-bottom: 16px solid #e5ebf0;
|
||||
}
|
||||
}
|
||||
:deep(.ant-menu-submenu-title) {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
//************************修改顶部菜单弹框样式
|
||||
.ant-menu-submenu-placement-bottomLeft {
|
||||
.ant-menu-submenu {
|
||||
background: rgb(3 24 53) !important;
|
||||
}
|
||||
|
||||
.ant-menu-sub {
|
||||
background: rgb(3 24 53) !important;
|
||||
}
|
||||
.ant-menu-title-content {
|
||||
color: #fff !important;
|
||||
.ns-icon {
|
||||
margin-right: 7px;
|
||||
transform: translateY(2px);
|
||||
}
|
||||
}
|
||||
.ant-menu-submenu-arrow {
|
||||
color: #fff !important;
|
||||
letter-spacing: 0px;
|
||||
line-height: 24px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
31
hx-ai-intelligent/src/api/IlluminationInfo.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
// 照明系统及相关接口
|
||||
export enum lightingManage {
|
||||
|
||||
// 主页 ========================================================
|
||||
|
||||
// 获得分区与线路
|
||||
getArea = '/carbon-smart/IlluminationInfo/region',
|
||||
// 修改线路的可用/禁用状态
|
||||
setDisable = '/carbon-smart/IlluminationInfo/revisePanel',
|
||||
|
||||
// 控制面板tab页 ================================================
|
||||
|
||||
// 获取当前修改的内容对比数据
|
||||
getChangeList = '/carbon-smart/IlluminationInfo/getLightSceneChangeInfo',
|
||||
// 提交当前修改
|
||||
submitChangeList = '/carbon-smart/IlluminationInfo/changeLightScene',
|
||||
|
||||
// 计划列表tab页 ================================================
|
||||
|
||||
// 获得计划列表tab页的表格数据
|
||||
getPlanTable = '/carbon-smart/IlluminationPlan/selectPanelPlan',
|
||||
// 获得计划列表tab页的穿梭框左侧数据
|
||||
getLeftPlan = '/carbon-smart/IlluminationPlan/getPlan',
|
||||
// 提交穿梭框被选择的数据
|
||||
submitLeftPlan = '/carbon-smart/IlluminationPlan/joinPlan',
|
||||
// 删除表格中的计划
|
||||
deletePlan = '/carbon-smart/IlluminationPlan/deletePlan',
|
||||
// 重启表格计划
|
||||
restartPlan = '/carbon-smart/IlluminationPlan/enable',
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export enum deviceAlarms {
|
||||
getTableList = '/carbon-smart/api/AlarmEquipment/selectAlarmEquipment', //设备告警分页
|
||||
addOrUpNewData = '/carbon-smart/api/AlarmEquipment/creatOrUpdate', //设备告警添加 修改
|
||||
del = '/carbon-smart/api/AlarmEquipment/delete', //设备告警删除
|
||||
configGetTableList = '/carbon-smart/api/AlarmEquipmentRule/selectAlarmEquipmentRule', //配置设备告警分页
|
||||
configAddOrUpNewData = '/carbon-smart/api/AlarmEquipmentRule/creatOrUpdate', //配置设备告警添加 修改
|
||||
configFindById = '/carbon-smart/api/AlarmEquipmentRule/findById', //配置设备告警 查询详情
|
||||
configDel = '/carbon-smart/api/AlarmEquipmentRule/delete', //配置设备告警删除
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export enum energyAlarms {
|
||||
getTableList = '/carbon-smart/api/AlarmEnergyConsumption/selectAlarmEnergyConsumption', //能耗告警分页
|
||||
addOrUpNewData = '/carbon-smart/api/AlarmEnergyConsumption/creatOrUpdate', //能耗告警添加 修改
|
||||
del = '/carbon-smart/api/AlarmEnergyConsumption/delete', //能耗删除
|
||||
configGetTableList = '/carbon-smart/api/AlarmEnergyConsumptionRule/selectAlarmEnergyConsumptionRule', //配置设备告警分页
|
||||
configAddOrUpNewData = '/carbon-smart/api/AlarmEnergyConsumptionRule/creatOrUpdate', //配置设备告警添加 修改
|
||||
configFindById = '/carbon-smart/api/AlarmEnergyConsumptionRule/findById', //配置设备告警 查询详情
|
||||
configDel = '/carbon-smart/api/AlarmEnergyConsumptionRule/delete', //配置设备告警删除
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export enum notificationManagementApi {
|
||||
getTableList = '/carbon-smart/api/AlarmContactInformation/selectAlarmContactInformation', //通知管理分页
|
||||
upData = '/carbon-smart/api/AlarmContactInformation/update', //通知管理 修改
|
||||
findById = '/carbon-smart/api/AlarmContactInformation/findById', //通知管理 查询详情
|
||||
}
|
||||
6
hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export enum energyAlarmApi {
|
||||
getTableList = '/carbon-smart/api/AlarmEnergyConsumptionLog/selectAlarmEnergyConsumptionLog', //能碳告警 列表
|
||||
getCodeList = '/carbon-smart/api/AlarmEnergyConsumptionLog/selectErrorCodeList ', //能碳告警 列表
|
||||
getSelectAlarmEnergyConsumptionLogStatusProcess = '/carbon-smart/api/AlarmEnergyConsumptionLogStatusProcess/selectAlarmEnergyConsumptionLogStatusProcess', //能碳告警 状态 没有创建工单log接口
|
||||
noCreatOrUpdateLog = '/carbon-smart/api/AlarmEnergyConsumptionLogStatusProcess/creatOrUpdate', //能碳告警 状态 没有创建工单 添加 修改状态log
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export enum equipmentAlarmApi {
|
||||
getTableList = '/carbon-smart/api/AlarmEquipmentLog/selectAlarmEquipmentLog', //设备告警 列表
|
||||
getCodeList = '/carbon-smart/api/AlarmEquipmentLog/selectErrorCodeList', //设备告警 列表
|
||||
getSelectAlarmEquipmentLogStatusProcess = '/carbon-smart/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess', //设备告警 状态 没有创建工单log接口
|
||||
noCreatOrUpdateLog = '/carbon-smart/api/AlarmEquipmentLogStatusProcess/creatOrUpdate', //设备告警 状态 没有创建工单 添加 修改状态log
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export enum gatewayAlarmApi {
|
||||
getTableList = '/carbon-smart/api/AlarmGatewayLog/selectAlarmGatewayLog', //网关告警 列表
|
||||
}
|
||||
60
hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
// 碳排因子库接口
|
||||
export enum carbonEmissionFactorLibrary {
|
||||
getTableList = '/carbon-smart/api/carbon/emission/factor/queryCarbonFactorPage',
|
||||
creatOrUpdate = '/carbon-smart/api/carbon/emission/factor/creatOrUpdate',
|
||||
del = '/carbon-smart/api/carbon/emission/factor/del',
|
||||
getEmissionProcess = '/carbon-smart/api/carbon/emission/factor/getEmissionProcess',
|
||||
findById = '/carbon-smart/api/carbon/emission/factor/findById',
|
||||
getCarbonFactorTree = '/carbon-smart/api/carbon/emission/type/getCarbonFactorTree',
|
||||
creat = '/carbon-smart/api/carbon/emission/type/creatOrUpdate',
|
||||
delTreeNode = '/carbon-smart/api/carbon/emission/type/del',
|
||||
// 单位管理
|
||||
dictionaryUnitManagement = '/carbon-smart/client/dict/dictionaryUnitManagement',
|
||||
findOutermost = '/carbon-smart/client/dict/findOutermost',
|
||||
createDictionary = '/carbon-smart/client/dict/createDictionary',
|
||||
updateDictionary = '/carbon-smart/client/dict/updateDictionary',
|
||||
delDictionary = '/carbon-smart/client/dict/delDictionary',
|
||||
}
|
||||
// 碳排管理-碳排统计接口
|
||||
export enum energyConsumption {
|
||||
getDicList = '/carbon-smart/client/dict/list',
|
||||
pageList = '/carbon-smart/api/carbon/stats/pageList',
|
||||
findById = '/carbon-smart/api/carbon/stats/findById',
|
||||
creat = '/carbon-smart/api/carbon/stats/creat',
|
||||
update = '/carbon-smart/api/carbon/stats/update',
|
||||
del = '/carbon-smart/api/carbon/stats/del',
|
||||
}
|
||||
// 碳排管理-碳排速算接口
|
||||
export enum quickCalculation {
|
||||
carbonQuickTree = '/carbon-smart/api/carbon/energy/correlation/carbonQuickTree',
|
||||
queryCarbonEmissionPage = '/carbon-smart/api/carbon/energy/correlation/queryCarbonEmissionPage',
|
||||
creat = '/carbon-smart/api/carbon/energy/correlation/creat',
|
||||
update = '/carbon-smart/api/carbon/energy/correlation/update',
|
||||
del = '/carbon-smart/api/carbon/energy/correlation/del',
|
||||
}
|
||||
// 碳排管理-碳排统计接口
|
||||
export enum carbonEmission {
|
||||
carbonEmissionStatistics = '/carbon-smart/api/carbon/energy/correlation/carbonEmissionStatistics',
|
||||
}
|
||||
// 碳盘查接口
|
||||
export enum carbonInventoryCheck {
|
||||
carbonInventoryList = '/carbon-smart/api/carbon/report/carbonInventoryList',
|
||||
createOrUpdate = '/carbon-smart/api/carbon/report/createOrUpdate',
|
||||
findById = '/carbon-smart/api/carbon/report/findById',
|
||||
delete = '/carbon-smart/api/carbon/report/delete',
|
||||
// 填报页面接口
|
||||
// 最左侧碳盘查报告树
|
||||
getCategoryTree = '/carbon-smart/api/carbon/inventory/contact/getCategoryTree',
|
||||
updateCategoryTree = '/carbon-smart/api/carbon/inventory/contact/update',
|
||||
// 排放源中左侧树
|
||||
getInventoryTree = '/carbon-smart/api/carbon/inventory/getInventoryTree',
|
||||
create = '/carbon-smart/api/carbon/inventory/create',
|
||||
update = '/carbon-smart/api/carbon/inventory/update',
|
||||
del = '/carbon-smart/api/carbon/inventory/del',
|
||||
// 获取排放源表格数据
|
||||
findUnitById = '/carbon-smartapi/carbon/inventory/findById',
|
||||
getDetailsList = '/carbon-smart/api/carbon/inventory/details/getDetailsList',
|
||||
updateTable = '/carbon-smart/api/carbon/inventory/details/update',
|
||||
// 排放统计接口
|
||||
emissionStatistic = '/carbon-smart/api/carbon/inventory/emissionStatistic',
|
||||
}
|
||||
32
hx-ai-intelligent/src/api/deviceManage.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { BASE_URL } from './index';
|
||||
export enum device {
|
||||
queryDeviceTree = `${BASE_URL}/deviceInfo/queryDeviceTree`, // 左侧树
|
||||
queryDevicePage = `${BASE_URL}/deviceInfo/queryDevicePage`, // 列表
|
||||
dropArea = `${BASE_URL}/deviceInfo/dropArea`, // 查询下拉区域
|
||||
queryDevicePoint = `${BASE_URL}/deviceInfo/queryDevicePoint`, // 获取设备点位
|
||||
}
|
||||
|
||||
export enum group {
|
||||
queryDeviceGroupTree = `${BASE_URL}/deviceGroup/queryDeviceGroupTree`, // 左侧树
|
||||
creatOrUpdate = `${BASE_URL}/deviceGroup/creatOrUpdate`, // 左侧树节点新增编辑
|
||||
del = `${BASE_URL}/deviceGroup/del`,
|
||||
move = `${BASE_URL}/deviceGroup/move`,
|
||||
queryEditGroup = `${BASE_URL}/deviceGroup/queryEditGroup`, // 分组树
|
||||
queryGroupPage = `${BASE_URL}/deviceGroup/queryGroupPage`, // 分组列表
|
||||
saveGroupList = `${BASE_URL}/deviceGroup/saveGroupList`, // 分组保存
|
||||
delGroupList = `${BASE_URL}/deviceGroup/delGroupList`, // 分组删除
|
||||
queryGroupInfoPage = `${BASE_URL}/deviceGroup/queryGroupInfoPage`, // 计算列表
|
||||
queryEditCompute = `${BASE_URL}/deviceGroup/queryEditCompute`, // 计算树
|
||||
saveComputeList = `${BASE_URL}/deviceGroup/saveComputeList`, // 计算保存
|
||||
delComputeList = `${BASE_URL}/deviceGroup/delComputeList`, // 计算删除
|
||||
queryComputeGroup = `${BASE_URL}/deviceGroup/queryComputeGroup`, // 计算分组列表
|
||||
saveComputeGroup = `${BASE_URL}/deviceGroup/saveComputeGroup`, // 计算分组新增
|
||||
saveComputeGroupInfo = `${BASE_URL}/deviceGroup/saveComputeGroupInfo`, // 批量分组
|
||||
delComputeGroup = `${BASE_URL}/deviceGroup/delComputeGroup`, // 分组删除
|
||||
computeGroupNum = `${BASE_URL}/deviceGroup/computeGroupNum`, // 分组删除
|
||||
formula = `${BASE_URL}/deviceGroup/formula`, // 编辑公式
|
||||
queryFormula = `${BASE_URL}/deviceGroup/queryFormula`, // 公式查询
|
||||
dropGroupFilter = `${BASE_URL}/deviceGroup/dropGroupFilter`, // 分组列表查询
|
||||
dropGroupInfoFilter = `${BASE_URL}/deviceGroup/dropGroupInfoFilter`, // 计算列表查询
|
||||
queryDeviceToEnergy = `${BASE_URL}/deviceGroup/queryDeviceToEnergy`, // 能耗监测用查询设备(能耗监测设备树)
|
||||
}
|
||||
6
hx-ai-intelligent/src/api/dict.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export enum dict {
|
||||
dictionaryUnitManagement = '/carbon-smart/client/dict/dictionaryUnitManagement',
|
||||
updateDictionary = '/carbon-smart/client/dict/updateDictionary',
|
||||
createDictionary = '/carbon-smart/client/dict/createDictionary',
|
||||
delDictionary = '/carbon-smart/client/dict/delDictionary',
|
||||
}
|
||||
@@ -1,6 +1,62 @@
|
||||
import { get } from 'lodash-es';
|
||||
import { http } from '/nerv-lib/util/http';
|
||||
|
||||
/***
|
||||
*配置接口 格式 module:Array<resource>
|
||||
*/
|
||||
export const apiModule = {
|
||||
parking: ['User', 'CurrentUser', 'Organizational'],
|
||||
};
|
||||
|
||||
export const BASE_URL = '/carbon-smart';
|
||||
|
||||
interface dictHttpConfig {
|
||||
api?: string;
|
||||
keyField?: string;
|
||||
params: object;
|
||||
transform?: Function;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典数据(首次获取,后续读缓存)
|
||||
*/
|
||||
|
||||
export const dict = async ({
|
||||
api = `${BASE_URL}/client/dict/listByKey`,
|
||||
params = {},
|
||||
keyField = 'dicKey',
|
||||
transform = (res: any) => res,
|
||||
}: dictHttpConfig) => {
|
||||
const dictMap = JSON.parse(sessionStorage.getItem('dictMap') || '{}') as Object;
|
||||
const key = get(params, keyField) as keyof typeof dictMap;
|
||||
|
||||
if (!dictMap.hasOwnProperty(key)) {
|
||||
const res = await http.post(api, params);
|
||||
const options = get(transform(res), `data.${key}`);
|
||||
dictMap[key] = options;
|
||||
sessionStorage.setItem('dictMap', JSON.stringify(dictMap));
|
||||
}
|
||||
return Promise.resolve({ data: { data: get(dictMap, key) } });
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取所有枚举(无需传参)
|
||||
*/
|
||||
export const getAllEnum = async ({
|
||||
api = `${BASE_URL}/operation/enum/getAllEnum`,
|
||||
params = {},
|
||||
}: dictHttpConfig) => {
|
||||
const res = await http.post(api, params);
|
||||
return Promise.resolve(res);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取单个枚举(需传参,参数 enumType)
|
||||
*/
|
||||
export const getEnum = async ({
|
||||
api = `${BASE_URL}/operation/enum/getEnum`,
|
||||
params = {},
|
||||
}: dictHttpConfig) => {
|
||||
const res = await http.get(api, params);
|
||||
return Promise.resolve(res);
|
||||
};
|
||||
|
||||
14
hx-ai-intelligent/src/api/monitor.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
// 设备监测
|
||||
export enum deviceMonitor {
|
||||
getDeviceGraph = '/carbon-smart/api/monitor/getDeviceGraph',
|
||||
getDevicePointToMonitor = '/carbon-smart//api/monitor/getDevicePointToMonitor',
|
||||
}
|
||||
|
||||
// 能耗监测
|
||||
export enum energyMonitor {
|
||||
getDeviceOrNodeEnergyGraph = '/carbon-smart/api/monitor/getDeviceOrNodeEnergyGraph',
|
||||
getDeviceOrNodeEnergyAnalyse = '/carbon-smart/api/monitor/getDeviceOrNodeEnergyAnalyse',
|
||||
}
|
||||
|
||||
// 环境监测
|
||||
export enum environmentMonitor {}
|
||||
37
hx-ai-intelligent/src/api/origanizemanage.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { BASE_URL } from './index';
|
||||
|
||||
export enum permission {
|
||||
add = `${BASE_URL}/admin/permission/save`,
|
||||
queryOrgPermission = `${BASE_URL}/api/dept/queryOrgPermission`,
|
||||
queryRolePermission = `${BASE_URL}/api/dept/queryRolePermission`,
|
||||
queryFilterDeptPermission = `${BASE_URL}/api/dept/queryFilterDeptPermission`,
|
||||
queryDeptPermission = `${BASE_URL}/api/dept/queryDeptPermission`,
|
||||
queryDeptPermissionFilter = `${BASE_URL}/api/dept/queryDeptPermissionFilter`,
|
||||
queryRolePermissionFilter = `${BASE_URL}/api/dept/queryRolePermissionFilter`,
|
||||
}
|
||||
|
||||
export enum origanizemanage {
|
||||
userList = '/carbon-smart/api/user/queryUserByPage',
|
||||
addUser = '/carbon-smart/api/user/save',
|
||||
editUser = '/carbon-smart/api/user/edit',
|
||||
frozen = '/carbon-smart/api/user/frozen',
|
||||
resetPwd = '/carbon-smart/api/user/resetPwd',
|
||||
del = '/carbon-smart/api/user/del',
|
||||
batchDel = '/carbon-smart/api/user/batchDel',
|
||||
queryOrgTree = '/carbon-smart/api/user/queryOrgTree',
|
||||
queryDeptTree = '/carbon-smart/api/user/queryDeptTree',
|
||||
queryUserPerList = '/carbon-smart/api/user/queryUserPerList',
|
||||
}
|
||||
|
||||
export enum department {
|
||||
queryDeptTree = `${BASE_URL}/api/dept/queryDeptTree`,
|
||||
deptSave = `${BASE_URL}/api/dept/save`,
|
||||
deptEdit = `${BASE_URL}/api/dept/edit`,
|
||||
deptDel = `${BASE_URL}/api/dept/del`,
|
||||
addPermission = `${BASE_URL}/api/dept/addPermission`,
|
||||
addRolePermission = `${BASE_URL}/api/dept/addRolePermission`,
|
||||
delRole = `${BASE_URL}/api/dept/delRole`,
|
||||
addRole = `${BASE_URL}/api/dept/addRole`,
|
||||
editRole = `${BASE_URL}/api/dept/editRole`,
|
||||
queryRoleTree = `${BASE_URL}/api/dept/queryRoleTree`,
|
||||
}
|
||||
@@ -8,13 +8,10 @@ enum Api {
|
||||
USER_INFO = 'api/web/objs/CurrentUser', //获取用户信息
|
||||
USER_RESOURCE = '/api/community/objs/User/Resource', //获取用户资源
|
||||
}
|
||||
export const userLogin = (data: RoomListModel) => http.post(Api.USER_LOGIN, data);
|
||||
export const userLogin = (data) => http.post(Api.USER_LOGIN, data);
|
||||
export const userInfo = () => http.get(Api.USER_INFO);
|
||||
export const userResource = () => http.get(Api.USER_RESOURCE);
|
||||
/**
|
||||
* @description 用户登录
|
||||
* @property `[fatherRegionUuid]` 父级区域唯一标识
|
||||
*/
|
||||
interface RoomListModel {
|
||||
data: string;
|
||||
}
|
||||
|
||||
90
hx-ai-intelligent/src/components/ns-modal-form.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<ns-modal
|
||||
ref="modalRef"
|
||||
v-bind="extraModalConfig"
|
||||
destroyOnClose
|
||||
v-model:visible="visible"
|
||||
:title="title"
|
||||
:okButtonProps="buttonProps"
|
||||
@ok="handleOk">
|
||||
<ns-form ref="formRef" :schemas="schemas" :model="formData" formLayout="vertical" />
|
||||
</ns-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, toRefs, watch } from 'vue';
|
||||
import { HttpRequestConfig, NsMessage, useApi } from '/nerv-lib/saas';
|
||||
import { useRoute } from 'vue-router';
|
||||
type Props = {
|
||||
title?: string;
|
||||
schemas: Array<any>;
|
||||
api: string | object | Function;
|
||||
data?: object;
|
||||
extraModalConfig?: object;
|
||||
success?: Function;
|
||||
};
|
||||
const route = useRoute();
|
||||
const { httpRequest } = useApi();
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
title: '新增',
|
||||
});
|
||||
const { schemas } = toRefs(props);
|
||||
const formData = ref();
|
||||
watch(
|
||||
() => props?.data,
|
||||
(val) => {
|
||||
formData.value = val;
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true,
|
||||
},
|
||||
);
|
||||
const modalRef = ref();
|
||||
const formRef = ref();
|
||||
const visible = ref(false);
|
||||
const validateResult = computed(() => {
|
||||
return !formRef.value?.validateResult;
|
||||
});
|
||||
const toggle = () => {
|
||||
visible.value = !visible.value;
|
||||
};
|
||||
|
||||
const setLoading = (loading = true) => {
|
||||
buttonProps.value.loading = loading;
|
||||
};
|
||||
|
||||
const handleOk = () => {
|
||||
setLoading(true);
|
||||
formRef.value
|
||||
.triggerSubmit()
|
||||
.then((data: any) => {
|
||||
const { api, success } = props;
|
||||
const requestConfig: HttpRequestConfig = { method: 'POST' };
|
||||
const { params } = route;
|
||||
|
||||
httpRequest({ api, params: data, pathParams: params, requestConfig })
|
||||
.then((res) => {
|
||||
NsMessage.success('操作成功', 1, () => {
|
||||
toggle();
|
||||
success && success(res);
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
const buttonProps = ref({
|
||||
disabled: validateResult,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
toggle,
|
||||
});
|
||||
</script>
|
||||
<style lang="less"></style>
|
||||
85
hx-ai-intelligent/src/components/ns-steps.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<a-steps direction="vertical" :current="size">
|
||||
<template v-for="(item, index) in dataSource" :key="index">
|
||||
<a-step>
|
||||
<template #icon>
|
||||
<ns-icon size="20" :name="item.src" />
|
||||
</template>
|
||||
<template #description>
|
||||
<div class="card">
|
||||
<div class="card-title">
|
||||
<a-tag class="card-title-tag" :color="item.color">{{ item.stateName }}</a-tag>
|
||||
<div class="name">{{ item.realName }}</div>
|
||||
<div class="time">{{ item.createTime }}</div>
|
||||
</div>
|
||||
<div style="width: 100%; color: #3a3a3a; height: 25px; overflow: auto">
|
||||
{{ item.remarks }}</div
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</a-step>
|
||||
</template>
|
||||
</a-steps>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { toRefs } from 'vue';
|
||||
|
||||
type Props = {
|
||||
dataSource: any;
|
||||
size: any;
|
||||
};
|
||||
const props = withDefaults(defineProps<Props>(), {});
|
||||
const { dataSource } = toRefs(props);
|
||||
const { size } = toRefs(props);
|
||||
|
||||
defineExpose({});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.ant-steps-vertical {
|
||||
margin-left: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.card {
|
||||
width: 400px;
|
||||
min-height: 0px;
|
||||
background-color: #f8fafc;
|
||||
margin-left: 20px;
|
||||
border-radius: 4px; /* 设置圆角半径 */
|
||||
padding: 12px;
|
||||
.card-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
position: relative;
|
||||
.card-title-tag {
|
||||
width: 60px;
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.name {
|
||||
position: absolute;
|
||||
left: 35%;
|
||||
top: -2px;
|
||||
transform: translateX(-50%);
|
||||
color: #3a3a3a;
|
||||
}
|
||||
.time {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: -2px;
|
||||
color: #ff7602;
|
||||
}
|
||||
:deep(.ant-steps-item-tail) {
|
||||
position: absolute !important;
|
||||
top: -10px !important;
|
||||
left: 16px !important;
|
||||
width: 1px !important;
|
||||
height: 150% !important;
|
||||
}
|
||||
:deep(.ant-steps-item) {
|
||||
margin-top: 20px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,55 +1,116 @@
|
||||
/** @format */
|
||||
import { dateUtil } from '/nerv-lib/util/date-util';
|
||||
import mockResource from './resource.json';
|
||||
import { http } from '/nerv-lib/saas';
|
||||
import { permission } from '/@/api/origanizemanage';
|
||||
import { appConfigStore } from '/nerv-lib/saas/store/modules/app-config';
|
||||
import { authorizationService } from '/nerv-base/store/modules/authorization-service';
|
||||
import { get } from 'lodash-es';
|
||||
import { computed, ref, toRef } from 'vue';
|
||||
|
||||
const ORGID = sessionStorage.getItem('ORGID') ? Number(sessionStorage.getItem('ORGID')) : '';
|
||||
const isAdmin = sessionStorage.getItem('ISADMIN')
|
||||
? Boolean(sessionStorage.getItem('ISADMIN'))
|
||||
: false;
|
||||
const selectDefaultValue = ref(ORGID);
|
||||
const selectDefaultDisabled = ref(isAdmin);
|
||||
const transform = (data, map) => {
|
||||
return Object.keys(map).reduce((pre, cur) => {
|
||||
pre[cur] = data[map[cur]];
|
||||
return pre;
|
||||
}, {});
|
||||
};
|
||||
|
||||
export const appConfig = {
|
||||
projectType: 'web',
|
||||
baseApi: '/api',
|
||||
enablePermissions: false,
|
||||
projectName: '济阳站_AI智能BAS系统',
|
||||
enablePermissions: true,
|
||||
// themeColor: '#eee',
|
||||
siderPosition: 'left',
|
||||
baseHeader: '/parkingManage',
|
||||
baseRouter: '/parkingManage/parkingLotManage',
|
||||
themeConfig: {
|
||||
bgImageUrl: `${import.meta.env.VITE_PUBLIC_PATH}/asset/image/login/background.png`,
|
||||
logoLessUrl: `${import.meta.env.VITE_PUBLIC_PATH}/asset/image/headerIcon.png`,
|
||||
logoUrl: `${import.meta.env.VITE_PUBLIC_PATH}/asset/image/headerIcon.png`,
|
||||
},
|
||||
// userCustomRouterGuard: (to, from, next, whiteNameList, authorizationStore, appConfig) => {
|
||||
// console.log({ to, from, next, whiteNameList, authorizationStore, appConfig }, 'routeConfig');
|
||||
// next();
|
||||
// },
|
||||
|
||||
// customUpdatePwd: () => import('/@/view/updatePassword/updatePassword.vue'),
|
||||
timeout: 60 * 1000,
|
||||
userLoginApi: () => {
|
||||
return {
|
||||
code: 200,
|
||||
success: true,
|
||||
data: { userToken: 123123123 },
|
||||
};
|
||||
|
||||
headerSlotConfig: {
|
||||
component: 'NsSelectApi',
|
||||
componentProps: {
|
||||
style: { width: '200px', color: '#2778FF', marginRight: '10px' },
|
||||
api: '/carbon-smart/user/login/logInInfo',
|
||||
size: 'large',
|
||||
defaultValue: selectDefaultValue,
|
||||
disabled: selectDefaultDisabled,
|
||||
// autoSelectFirst: true,
|
||||
placeholder: '请选择',
|
||||
onSelect: async (cur, record) => {
|
||||
console.log(cur, record);
|
||||
const configStore = appConfigStore();
|
||||
const useAuthorization = authorizationService();
|
||||
sessionStorage.setItem('ORGID', record.orgId);
|
||||
const res = await configStore.userResource({ data: record });
|
||||
useAuthorization.updateUserResource(res.data);
|
||||
window.location.reload();
|
||||
// value.value = cur;
|
||||
},
|
||||
resultField: 'data.linkList',
|
||||
labelField: 'orgName',
|
||||
valueField: 'orgId',
|
||||
immediate: true,
|
||||
dropdownReload: true,
|
||||
},
|
||||
},
|
||||
userResourceApi: () => {
|
||||
return { data: mockResource.menus };
|
||||
timeout: 60 * 1000,
|
||||
userLoginApi: (params) => {
|
||||
return http.post('/carbon-smart/user/login', { ...params });
|
||||
},
|
||||
userResourceApi: (params) => {
|
||||
const { orgId } = get(params, 'data') || { orgId: '' };
|
||||
const finalId = orgId || ORGID;
|
||||
// 解决初始化登录select无初始值的问题
|
||||
selectDefaultValue.value = finalId;
|
||||
|
||||
const userInfo = JSON.parse(sessionStorage.getItem(import.meta.env.VITE_PUBLIC_PATH)!);
|
||||
const ownOrgInfo = userInfo.linkList?.filter(({ orgId: id }) => id === finalId)[0];
|
||||
|
||||
return http.post('/carbon-smart/user/login/logInPermission', ownOrgInfo).then((res) => {
|
||||
return res;
|
||||
});
|
||||
},
|
||||
userInfoApi: () => {
|
||||
return {
|
||||
code: 200,
|
||||
success: true,
|
||||
data: {
|
||||
accountCode: '1305107806187376793',
|
||||
accountName: 'adm*n',
|
||||
accountType: 'admin',
|
||||
accountStatus: 1,
|
||||
accountRealName: 'admin',
|
||||
organizationCode: 'dingcloud',
|
||||
authConfigList: [],
|
||||
organizeResCode: [],
|
||||
leadDepartmentUuidList: [],
|
||||
},
|
||||
};
|
||||
return http.post('/carbon-smart/user/login/logInInfo').then((res) => {
|
||||
const info = res.data;
|
||||
const trD = transform(info, {
|
||||
accountCode: 'userId',
|
||||
accountName: 'accountNo',
|
||||
accountRealName: 'accountNo',
|
||||
orgId: 'orgId',
|
||||
orgName: 'orgName',
|
||||
projectId: 'projectId',
|
||||
linkList: 'linkList',
|
||||
permissionVos: 'permissionVos',
|
||||
adminFlag: 'adminFlag',
|
||||
});
|
||||
sessionStorage.setItem('ORGID', info.orgId);
|
||||
sessionStorage.setItem('ISADMIN', trD?.adminFlag === '1');
|
||||
selectDefaultDisabled.value = info?.adminFlag === '1';
|
||||
selectDefaultValue.value = info.orgId;
|
||||
return { data: { ...trD } };
|
||||
});
|
||||
},
|
||||
|
||||
useHistoryTag: false,
|
||||
// 修改密码配置
|
||||
updatePassWordInfo: {
|
||||
title: '修改密码',
|
||||
subtitle: 'huaxing平台',
|
||||
api: '/api/web/objs/User/changePassword',
|
||||
api: '/carbon-smart/api/user/update/password',
|
||||
},
|
||||
// headerBellInfo: {
|
||||
// isShow: true,
|
||||
@@ -57,16 +118,6 @@ export const appConfig = {
|
||||
// toRouterName: 'NoticeManageIndex',
|
||||
// },
|
||||
resourceInfo: {
|
||||
application: {
|
||||
version: '1.1.74',
|
||||
label: '停车业务平台',
|
||||
dataScope: {
|
||||
scopeMode: 0,
|
||||
scopeType: '',
|
||||
dataTips: '',
|
||||
},
|
||||
},
|
||||
api: '/qa/Operation/Resources/Pc/init',
|
||||
token: `${dateUtil().format('YYYYMMDD')}1a329ffasasozozxqq66cfab7`,
|
||||
api: permission.add,
|
||||
},
|
||||
};
|
||||
|
||||
9
hx-ai-intelligent/src/directives/index.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Configure and register global directives
|
||||
*/
|
||||
import type { App } from 'vue';
|
||||
import { setupPermissionDirective } from './permission';
|
||||
|
||||
export function setupGlobDirectives(app: App) {
|
||||
setupPermissionDirective(app);
|
||||
}
|
||||
46
hx-ai-intelligent/src/directives/permission.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Global authority directive
|
||||
* Used for fine-grained control of component permissions
|
||||
* @Example v-auth="name"
|
||||
*/
|
||||
import type { App, Directive, DirectiveBinding } from 'vue';
|
||||
import { authorizationService } from '/nerv-lib/saas/store/modules/authorization-service';
|
||||
|
||||
function isAuth(el: Element, binding: any) {
|
||||
const { checkPermission, checkAllPermission, checkPermissionRouter } = authorizationService();
|
||||
const { value, modifiers } = binding;
|
||||
|
||||
if (!value) return;
|
||||
//操作按钮
|
||||
if (modifiers.op) {
|
||||
if (!checkPermission(value)) {
|
||||
el.parentNode?.removeChild(el);
|
||||
}
|
||||
}
|
||||
// 全部
|
||||
if (modifiers.all) {
|
||||
if (!checkAllPermission(value)) {
|
||||
el.parentNode?.removeChild(el);
|
||||
}
|
||||
}
|
||||
// 路由
|
||||
if (modifiers.route) {
|
||||
if (!checkPermissionRouter(value)) {
|
||||
el.parentNode?.removeChild(el);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const mounted = (el: Element, binding: DirectiveBinding<string | string[]>) => {
|
||||
isAuth(el, binding);
|
||||
};
|
||||
|
||||
const authDirective: Directive = {
|
||||
mounted,
|
||||
};
|
||||
|
||||
export function setupPermissionDirective(app: App) {
|
||||
app.directive('auth', authDirective);
|
||||
}
|
||||
|
||||
export default authDirective;
|
||||
@@ -1,3 +1,5 @@
|
||||
import { routerConfig } from '/nerv-lib/saas/config/router.config';
|
||||
|
||||
export enum ResultEnum {
|
||||
SUCCESS = 0,
|
||||
ERROR = 1,
|
||||
@@ -20,3 +22,11 @@ export enum ContentTypeEnum {
|
||||
// form-data upload
|
||||
FORM_DATA = 'multipart/form-data;charset=UTF-8',
|
||||
}
|
||||
|
||||
export const errCodeMap = new Map<number, any>([
|
||||
[13, ''],
|
||||
[1, ''],
|
||||
[11, ''],
|
||||
[3005, ''],
|
||||
[10086, () => routerConfig.logout()],
|
||||
]);
|
||||
|
||||
8
hx-ai-intelligent/src/icon/actionMore.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2.5601806640625" height="11.380615234375" viewBox="0 0 2.5601806640625 11.380615234375" fill="none">
|
||||
<path d="M1.26462 2.52904C1.72366 2.54024 2.15274 2.30174 2.38556 1.90594C2.61838 1.51015 2.61838 1.01924 2.38556 0.623459C2.15274 0.227661 1.72366 -0.0108337 1.26462 0.00037384C0.578369 0.0171204 0.0307617 0.578232 0.0307617 1.26469C0.0307617 1.95116 0.578369 2.51227 1.26462 2.52904Z" fill="#5A5A68" >
|
||||
</path>
|
||||
<path d="M0 5.69049C0 6.38898 0.566193 6.9552 1.26471 6.9552C1.96317 6.9552 2.52936 6.38898 2.52936 5.69049C2.52936 4.99204 1.96317 4.42578 1.26471 4.42578C0.566193 4.42578 0 4.99204 0 5.69049Z" fill="#5A5A68" >
|
||||
</path>
|
||||
<path d="M1.26471 11.3805C1.9632 11.3805 2.52942 10.8143 2.52942 10.1158C2.52942 9.4173 1.9632 8.85107 1.26471 8.85107C0.566223 8.85107 0 9.4173 0 10.1158C0 10.8143 0.566223 11.3805 1.26471 11.3805Z" fill="#5A5A68" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 961 B |
6
hx-ai-intelligent/src/icon/baocun.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="20px" height="20px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -320 -9 )">
|
||||
<path d="M 5.72142857421875 4.29571427734375 L 5.72142857421875 0.0171428515625 L 10 0.0171428515625 L 10 4.29571427734375 L 5.72142857421875 4.29571427734375 Z M 14.564285722656251 0.3028571484375 L 19.84 5.57857142578125 C 19.9828571484375 5.57857142578125 19.9828571484375 5.864285703125001 20 6.0071428515625005 L 20 19.27 C 19.9828571484375 19.69857142578125 19.697142871093753 19.98428572265625 19.27 20 L 0.73 20 C 0.30142857421874997 19.98428572265625 0.015714277343749916 19.6985714453125 0 19.27 L 0 0.73 C 0.015714277343749916 0.30142857421874997 0.30142855468749996 0.015714277343749916 0.73 0.015714277343749916 L 4.29571427734375 0.015714277343749916 L 4.29571427734375 5.72142857421875 L 11.42571427734375 5.72142857421875 L 11.42571427734375 0.0171428515625 L 13.992857148437501 0.0171428515625 C 14.135714296875001 0.0171428515625 14.421428574218751 0.16 14.564285722656251 0.3028571484375 Z M 4.29571427734375 15.70428572265625 L 15.70428572265625 15.704285722656248 L 15.70428572265625 10 L 4.29571427734375 10 L 4.29571427734375 15.70428572265625 Z " fill-rule="nonzero" fill="#ff7602" stroke="none" transform="matrix(1 0 0 1 320 9 )" />
|
||||
</g>
|
||||
</svg>
|
||||
6
hx-ai-intelligent/src/icon/bianji.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="20px" height="20px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -320 -9 )">
|
||||
<path d="M 17.482232142857143 6.05310267857143 L 7.481830357142856 16.053526785714283 L 3.946339285714287 12.518035714285713 L 13.946741071428567 2.5176116071428565 L 17.482232142857143 6.05310267857143 Z M 2.8571428571428568 17.142857142857142 L 2.8571428571428568 13.607142857142856 L 6.392857142857144 17.142857142857142 L 2.8571428571428568 17.142857142857142 Z M 18.013392857142858 0.4017857142857143 L 19.598214285714285 1.9866071428571428 C 20.133928571428573 2.5223214285714284 20.133928571428573 3.3995535714285703 19.598214285714285 3.937500000000002 L 18.55357142857143 4.982142857142853 L 15.017857142857142 1.4464285714285705 L 16.062499999999996 0.4017857142857143 C 16.598214285714285 -0.13392857142857142 17.47544642857143 -0.13392857142857142 18.013392857142858 0.4017857142857143 Z M 0 15.714285714285714 L 1.4285714285714284 15.714285714285714 L 1.4285714285714284 18.571428571424978 L 1.4285714285714284 20 L 0 20 L 0 15.714285714285714 Z M 18.571428571428573 20 L 1.4285714285714284 20 L 1.4285714285714284 18.571428571428573 L 18.571428571428573 18.571428571428573 L 18.571428571428573 20 Z M 20 15.714285714285714 L 20 20 L 18.571428571428573 20 L 18.571428571428573 15.714285714285714 L 20 15.714285714285714 Z " fill-rule="nonzero" fill="#ff7602" stroke="none" transform="matrix(1 0 0 1 320 9 )" />
|
||||
</g>
|
||||
</svg>
|
||||
1
hx-ai-intelligent/src/icon/biaoge.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720144479404" class="icon" viewBox="0 0 1142 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2572" xmlns:xlink="http://www.w3.org/1999/xlink" width="17.84375" height="16"><path d="M1102.769231 39.384615v945.23077H39.384615V39.384615h1063.384616m0-39.384615H39.384615a39.384615 39.384615 0 0 0-39.384615 39.384615v945.23077a39.384615 39.384615 0 0 0 39.384615 39.384615h1063.384616a39.384615 39.384615 0 0 0 39.384615-39.384615V39.384615a39.384615 39.384615 0 0 0-39.384615-39.384615z" fill="#4D4D4D" p-id="2573"></path><path d="M39.384615 393.846154h1063.384616v39.384615H39.384615zM39.384615 590.769231h1063.384616v39.384615H39.384615zM39.384615 787.692308h1063.384616v39.384615H39.384615zM39.384615 196.923077h1063.384616v39.384615H39.384615z" fill="#B3B3B3" p-id="2574"></path><path d="M315.076923 196.923077v787.692308H275.692308V196.923077zM590.769231 196.923077v787.692308h-39.384616V196.923077zM866.461538 196.923077v787.692308h-39.384615V196.923077z" fill="#B3B3B3" p-id="2575"></path><path d="M39.384615 39.384615h1063.384616v157.538462H39.384615z" fill="#05AFC8" p-id="2576"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
1
hx-ai-intelligent/src/icon/bingtu.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720145764410" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4680" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M495.611479 159.364238C285.562631 159.364238 115.284768 329.642102 115.284768 539.690949S285.562631 920.01766 495.611479 920.01766 875.93819 749.739797 875.93819 539.690949H518.216336c-12.484662 0-22.604857-10.120194-22.604857-22.604856V159.364238z" fill="#839BFB" p-id="4681"></path><path d="M562.860927 495.046358h368.459161c0-215.978102-175.085916-391.064018-391.064017-391.064018v368.459161c0 12.484662 10.120194 22.604857 22.604856 22.604857z" fill="#839BFB" fill-opacity=".6" p-id="4682"></path></svg>
|
||||
|
After Width: | Height: | Size: 838 B |
4
hx-ai-intelligent/src/icon/common.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14.3564453125" height="15.0081787109375" viewBox="0 0 14.3564453125 15.0081787109375" fill="none">
|
||||
<path d="M14.1739 3.70025C14.1361 3.65398 14.0991 3.60771 14.0571 3.56927C13.9468 3.46744 13.8241 3.37991 13.6919 3.30873C11.7357 2.26657 9.78168 1.22155 7.82619 0.17939C7.65994 0.0891889 7.4793 0.0284937 7.2923 1.16683e-07L7.11007 0C6.6559 0.0904063 6.26508 0.352371 5.86004 0.565929C4.08665 1.49755 2.31626 2.43531 0.54908 3.37911C0.273361 3.52656 0.0597992 3.76005 0.0099678 4.11741C0.00854492 4.13022 0.00356293 4.14161 0 4.153L0 4.30463C0.0284805 4.46764 0.0761719 4.62212 0.177967 4.75167C0.213558 4.79581 0.247017 4.84208 0.287598 4.87839C0.395794 4.97306 0.505424 5.06418 0.63142 5.13181C2.60185 6.1818 4.56944 7.23606 6.54201 8.2825C6.70858 8.3722 6.88014 8.45904 7.07235 8.47755C7.2674 8.49749 7.45034 8.46118 7.62261 8.37006L13.6037 5.19445C13.6706 5.15815 13.7403 5.12754 13.803 5.08554C13.9902 4.96381 14.1653 4.82357 14.2636 4.60432C14.3063 4.51107 14.3248 4.405 14.3561 4.30463L14.3561 4.153C14.3248 3.98785 14.2764 3.82982 14.1732 3.70026L14.1739 3.70025ZM13.5004 6.55054C13.2896 6.50635 13.0699 6.53759 12.8797 6.63881C12.501 6.8424 12.1251 7.05525 11.7429 7.25386C10.2444 8.03264 8.74237 8.80714 7.24318 9.5845C7.20047 9.60585 7.16488 9.60941 7.12074 9.58663L1.61023 6.69862C1.3144 6.53849 0.971592 6.48783 0.642097 6.55553C0.300404 6.62601 0.0633507 6.9314 0.0156593 7.31936C0.0128059 7.34072 0.00497818 7.36207 0.000705719 7.38343L0.000705719 7.5799C0.0291786 7.73936 0.0768776 7.89027 0.173687 8.01983C0.266228 8.14156 0.373005 8.24264 0.501858 8.31098C2.51998 9.39372 4.53954 10.4779 6.5605 11.5549C6.72209 11.6404 6.89009 11.7258 7.07874 11.7422C7.2681 11.7592 7.44748 11.7251 7.61619 11.6375C9.69198 10.5626 11.7678 9.48912 13.8407 8.40922C14.1183 8.264 14.2771 8.00702 14.3397 7.68312C14.3461 7.65963 14.3504 7.63472 14.3561 7.61051L14.3561 7.42828C14.3369 7.36207 14.3248 7.2916 14.2998 7.22896C14.1532 6.83814 13.877 6.62387 13.5004 6.55126L13.5004 6.55054ZM13.5019 9.80944C13.2908 9.7652 13.0708 9.79644 12.8804 9.89771C12.496 10.1042 12.1159 10.3177 11.73 10.5199C10.238 11.2944 8.74591 12.0646 7.25386 12.8391C7.20773 12.8661 7.15042 12.8653 7.10508 12.837C5.27916 11.8774 3.45181 10.9207 1.62446 9.96106C1.35194 9.82084 1.04443 9.7632 0.739628 9.7952C0.383698 9.82367 0.108913 10.1049 0.0313225 10.495C0.0206451 10.5441 0.0099678 10.5918 0.000720978 10.6402L0.000720978 10.8366C0.0291862 10.9933 0.0754585 11.1427 0.168713 11.2709C0.26268 11.3983 0.373734 11.5008 0.507553 11.572C2.52355 12.654 4.54025 13.7361 6.55837 14.811C6.73064 14.9035 6.91217 14.9889 7.10935 15.0082L7.24888 15.0082C7.41069 14.9797 7.56661 14.9243 7.71016 14.8444C7.89952 14.7412 8.09955 14.6586 8.29104 14.559C10.1333 13.6008 11.9749 12.6412 13.8151 11.6823C14.107 11.53 14.2757 11.273 14.3412 10.9335L14.3561 10.868L14.3561 10.6857C14.3369 10.6195 14.3248 10.5491 14.2999 10.4864C14.1554 10.0949 13.8777 9.88134 13.5019 9.81015L13.5019 9.80944Z" fill="#4388FB" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
4
hx-ai-intelligent/src/icon/deptLink.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="11.989990234375" height="11.1085205078125" viewBox="0 0 11.989990234375 11.1085205078125" fill="none">
|
||||
<path d="M11.4607 7.93429L10.704 7.93429L10.704 6.36826C10.704 5.93552 10.3055 5.58339 9.81754 5.58339L6.4082 5.58339L6.4082 3.96776L7.62086 3.96776C7.91499 3.96776 8.15565 3.74458 8.15565 3.47179L8.15565 0.495972C8.15565 0.223183 7.91499 0 7.62086 0L4.41207 0C4.11794 0 3.87727 0.223183 3.87727 0.495972L3.87727 3.47179C3.87727 3.74458 4.11794 3.96776 4.41207 3.96776L5.57927 3.96776L5.57927 5.58339L2.18999 5.58339C1.70065 5.58339 1.30357 5.93552 1.30357 6.36826L1.30357 7.93429L0.534798 7.93429C0.240654 7.93429 0 8.15747 0 8.43025L0 10.6125C0 10.8853 0.240654 11.1085 0.534798 11.1085L2.8879 11.1085C3.18204 11.1085 3.4227 10.8853 3.4227 10.6125L3.4227 8.43025C3.4227 8.15747 3.18204 7.93429 2.8879 7.93429L2.13116 7.93429L2.13116 6.37321C2.13651 6.36578 2.15657 6.35213 2.18865 6.35213L5.57793 6.35213L5.57793 7.93429L4.8252 7.93429C4.53107 7.93429 4.29041 8.15747 4.29041 8.43025L4.29041 10.6125C4.29041 10.8853 4.53107 11.1085 4.8252 11.1085L7.17831 11.1085C7.47245 11.1085 7.7131 10.8853 7.7131 10.6125L7.7131 8.43025C7.7131 8.15747 7.47245 7.93429 7.17831 7.93429L6.40553 7.93429L6.40553 6.35213L9.81352 6.35213C9.84561 6.35213 9.86566 6.36578 9.87102 6.37321L9.87102 7.93429L9.10224 7.93429C8.80811 7.93429 8.56744 8.15747 8.56744 8.43026L8.56744 10.6125C8.56744 10.8853 8.80811 11.1085 9.10224 11.1085L11.4553 11.1085C11.7495 11.1085 11.9901 10.8853 11.9901 10.6125L11.9901 8.43026C11.9955 8.15747 11.7548 7.93429 11.4607 7.93429Z" fill="#4388FB" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
4
hx-ai-intelligent/src/icon/deviceType.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="11.0960693359375" height="11.361328125" viewBox="0 0 11.0960693359375 11.361328125" fill="none">
|
||||
<path d="M5.97288 0.0889032L10.8515 3.28616C11.0042 3.38656 11.0961 3.55643 11.0961 3.73899L11.0961 10.8194C11.096 11.1182 10.8536 11.3604 10.5548 11.3604L0.541595 11.3604C0.242524 11.3606 1.90735e-06 11.1182 0 10.8191L0 3.74666C0 3.56014 0.0961657 3.38656 0.254683 3.28776L5.38954 0.0820341C5.56864 -0.0296883 5.79635 -0.02711 5.97288 0.0886391L5.97288 0.0889032ZM7.84865 7.26703L6.76599 7.26703C6.31761 7.26703 5.95412 7.63051 5.95412 8.07889L5.95412 9.18401C5.95412 9.63239 6.31761 9.99588 6.76599 9.99588L7.84838 9.99588C8.29677 9.99588 8.66025 9.63239 8.66025 9.18401L8.66025 8.07916C8.66025 7.63078 8.29677 7.2673 7.84838 7.2673L7.84865 7.26703ZM7.84865 3.71945L6.76599 3.71945C6.31761 3.71945 5.95412 4.08293 5.95412 4.53131L5.95412 5.63643C5.95412 6.08481 6.31761 6.4483 6.76599 6.4483L7.84838 6.4483C8.29677 6.4483 8.66025 6.08481 8.66025 5.63643L8.66025 4.53131C8.66025 4.08293 8.29677 3.71945 7.84838 3.71945L7.84865 3.71945Z" fill="#4388FB" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
10
hx-ai-intelligent/src/icon/fenzujiedian.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="8.98974609375" height="8.14453125" viewBox="0 0 8.98974609375 8.14453125" fill="none">
|
||||
<path d="M7.93101 4.53462L6.23624 4.53462L5.52032 3.46466L6.49265 1.79796L5.44381 0L3.32621 0L2.27236 1.79796L3.29704 3.54617L2.62652 4.54987L1.05875 4.54987L0 6.34726L1.05875 8.1452L3.17144 8.1452L4.06128 6.62695L4.93729 6.62695L5.81886 8.13029L7.93102 8.13029L8.98978 6.33258L7.93101 4.53462ZM3.19734 4.59392L3.8643 3.59569L5.00553 3.59569L5.73168 4.68208L4.88461 6.1274L4.09644 6.1274L3.19734 4.59392Z" fill="url(#linear_fill_60_2513)" >
|
||||
</path>
|
||||
<defs>
|
||||
<linearGradient id="linear_fill_60_2513" x1="4.494873046875" y1="0" x2="4.494873046875" y2="8.14453125" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#4DACE6" />
|
||||
<stop offset="1" stop-color="#2A93D5" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 888 B |
1
hx-ai-intelligent/src/icon/gaojingguanli.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1721184652893" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10631" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M0 916.48h1024v71.68H0v-71.68z m71.68-76.8H947.2v71.68H71.68v-71.68zM512 35.84c-199.68 0-363.52 163.84-363.52 363.52v404.48H332.8V440.32h71.68v363.52h476.16V404.48C875.52 199.68 711.68 35.84 512 35.84z" p-id="10632"></path></svg>
|
||||
|
After Width: | Height: | Size: 563 B |
6
hx-ai-intelligent/src/icon/gaojingtonglan.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -485 -23 )">
|
||||
<path d="M 47 42.32727272727272 C 47.78181818181818 45.381818181818176 45.381818181818176 47.78181818181818 42.54545454545455 47 L 5.454545454545454 47 C 2.6181818181818186 47.78181818181818 0.21818181818181742 45.381818181818176 1 42.32727272727272 L 1 29 L 47 29 L 47 42.32727272727272 Z M 29.89090909090909 41 L 29.89090909090909 36 L 6.1090909090909085 36 L 6.1090909090909085 41 L 29.89090909090909 41 Z M 41.89090909090909 41.89090909090909 L 41.89090909090909 36 L 36 36 L 36 41.89090909090909 L 41.89090909090909 41.89090909090909 Z M 1 26 L 1 5.454545454545454 C 0.21818181818181742 2.399999999999999 2.6181818181818186 0 5.454545454545454 0 L 42.54545454545455 0 C 45.38181818181818 0 47.78181818181818 2.399999999999999 47 5.454545454545454 L 47 26 L 1 26 Z M 5.454545454545454 19.418181818181814 L 9.818181818181818 21.818181818181817 L 14.181818181818183 14.399999999999999 L 24.218181818181822 21.16363636363636 L 29.67272727272728 12.654545454545453 L 40.36363636363637 18.76363636363636 L 42.763636363636365 14.399999999999995 L 27.92727272727273 5.018181818181814 L 22.90909090909091 13.745454545454539 L 12 7.85454545454545 L 5.454545454545454 19.418181818181814 Z " fill-rule="nonzero" fill="#d9001b" stroke="none" transform="matrix(1 0 0 1 485 23 )" />
|
||||
</g>
|
||||
</svg>
|
||||
1
hx-ai-intelligent/src/icon/huanjingjiance.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720061440927" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11363" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M659.925333 128a74.666667 74.666667 0 0 1 71.338667 52.618667L754.56 256H821.333333c64.8 0 117.333333 52.533333 117.333334 117.333333v426.666667c0 64.8-52.533333 117.333333-117.333334 117.333333H202.666667c-64.8 0-117.333333-52.533333-117.333334-117.333333V373.333333c0-64.8 52.533333-117.333333 117.333334-117.333333h66.773333l23.296-75.381333A74.666667 74.666667 0 0 1 364.074667 128h295.850666zM512 405.333333c-88.362667 0-160 71.637333-160 160 0 88.362667 71.637333 160 160 160 88.362667 0 160-71.637333 160-160 0-88.362667-71.637333-160-160-160z m0 256a96 96 0 1 0 0-192 96 96 0 0 0 0 192z" p-id="11364"></path></svg>
|
||||
|
After Width: | Height: | Size: 954 B |
1
hx-ai-intelligent/src/icon/jiankongzhongxin.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720061108318" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10061" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M512 12L94.71 138v314.92C94.71 657.7 263.86 880.16 512 1012c248.14-131.84 417.29-354.3 417.29-559.08V138z m209.91 510H562v159.91H462V522H302.09V422H462V262.09h100V422h159.91z" p-id="10062"></path></svg>
|
||||
|
After Width: | Height: | Size: 535 B |
10
hx-ai-intelligent/src/icon/jisuanjiedian.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="9.1005859375" height="9.099609375" viewBox="0 0 9.1005859375 9.099609375" fill="none">
|
||||
<path d="M7.01762 4.69157L2.30136 4.69157C2.04227 4.66303 1.84615 4.44409 1.84615 4.18343C1.84615 3.92276 2.04227 3.70384 2.30136 3.67525L7.01762 3.67525C7.27673 3.70384 7.47285 3.92276 7.47285 4.18343C7.47285 4.44409 7.27673 4.66303 7.01762 4.69157ZM7.01762 6.69587L2.30136 6.69587C2.04227 6.6673 1.84615 6.44837 1.84615 6.18771C1.84615 5.92704 2.04227 5.70809 2.30136 5.67952L7.01762 5.67952C7.27673 5.70809 7.47285 5.92704 7.47285 6.18771C7.47285 6.44837 7.27673 6.6673 7.01762 6.69587ZM9.09498 8.33346L9.09498 1.98149C9.09498 1.21918 8.46167 1.27564 8.46167 1.27564L4.88941 1.27564C4.77006 1.27634 4.65399 1.23653 4.56021 1.16271C4.56021 1.16271 4.40816 0.880585 4.12926 0.428757C3.87605 -0.0795288 3.54708 0.00531769 3.54708 0.00531769L0.785301 0.00531769C0 0.00531769 0 0.824379 0 0.824379L0 8.27722C0 9.2087 0.633301 9.09628 0.633301 9.09628L8.53744 9.09628C9.19643 9.09547 9.09498 8.33345 9.09498 8.33345L9.09498 8.33346Z" fill="url(#linear_fill_60_2485)" >
|
||||
</path>
|
||||
<defs>
|
||||
<linearGradient id="linear_fill_60_2485" x1="4.55029296875" y1="0" x2="4.55029296875" y2="9.099609375" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#4DACE6" />
|
||||
<stop offset="1" stop-color="#2A93D5" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
4
hx-ai-intelligent/src/icon/orgLink.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.0859375" height="10.474609375" viewBox="0 0 12.0859375 10.474609375" fill="none">
|
||||
<path d="M11.6831 9.66875L11.2802 9.66875L11.2802 4.02865C11.2802 3.14235 10.5551 2.41719 9.66875 2.41719L7.25156 2.41719L7.25156 9.26588C7.25156 9.49149 7.0743 9.66875 6.8487 9.66875C6.62309 9.66875 6.44583 9.49149 6.44583 9.26588L6.44583 1.61147C6.44583 0.725159 5.72068 0 4.83437 0L2.41719 0C1.53089 0 0.805729 0.725159 0.805729 1.61147L0.805729 9.66875L0.402865 9.66875C0.17726 9.66875 0 9.84601 0 10.0716C0 10.2972 0.17726 10.4745 0.402865 10.4745L11.6831 10.4745C11.9087 10.4745 12.0859 10.2972 12.0859 10.0716C12.0859 9.84601 11.9087 9.66875 11.6831 9.66875ZM4.43151 8.0573L2.82005 8.0573C2.59445 8.0573 2.41719 7.88004 2.41719 7.65443C2.41719 7.42883 2.59445 7.25156 2.82005 7.25156L4.43151 7.25156C4.65711 7.25156 4.83437 7.42883 4.83437 7.65443C4.83437 7.88004 4.65711 8.0573 4.43151 8.0573ZM4.43151 5.64011L2.82005 5.64011C2.59445 5.64011 2.41719 5.46284 2.41719 5.23724C2.41719 5.01164 2.59445 4.83438 2.82005 4.83438L4.43151 4.83438C4.65711 4.83438 4.83437 5.01164 4.83437 5.23724C4.83437 5.46284 4.65711 5.64011 4.43151 5.64011ZM4.43151 3.22292L2.82005 3.22292C2.59445 3.22292 2.41719 3.04565 2.41719 2.82005C2.41719 2.59445 2.59445 2.41719 2.82005 2.41719L4.43151 2.41719C4.65711 2.41719 4.83437 2.59445 4.83437 2.82005C4.83437 3.04565 4.65711 3.22292 4.43151 3.22292ZM10.0716 8.0573L8.46016 8.0573C8.23455 8.0573 8.05729 7.88004 8.05729 7.65443C8.05729 7.42883 8.23455 7.25156 8.46016 7.25156L10.0716 7.25156C10.2972 7.25156 10.4745 7.42883 10.4745 7.65443C10.4745 7.88004 10.2972 8.0573 10.0716 8.0573ZM10.0716 5.64011L8.46016 5.64011C8.23455 5.64011 8.05729 5.46284 8.05729 5.23724C8.05729 5.01164 8.23455 4.83438 8.46016 4.83438L10.0716 4.83438C10.2972 4.83438 10.4745 5.01164 10.4745 5.23724C10.4745 5.46284 10.2972 5.64011 10.0716 5.64011Z" fill="#4388FB" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -1,5 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="12" fill-opacity="0.1"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.9352 9.87544L16.531 9.87547C16.531 8.58454 16.0608 7.36797 15.2071 6.44985C14.7866 5.99763 14.2954 5.64185 13.7472 5.39246C13.1745 5.13204 12.5662 5 11.9388 5C11.3114 5 10.7031 5.13204 10.1305 5.39243C9.58225 5.64182 9.09102 5.9976 8.67051 6.44983C7.81678 7.36797 7.34659 8.58452 7.34659 9.87544H8.94234C8.94234 8.06373 10.2865 6.58981 11.9388 6.58981C13.591 6.58981 14.9352 8.06373 14.9352 9.87544ZM7.46099 9.95703H16.539V9.95705C17.5421 9.95705 18 10.7674 18 11.7659V17.1925C18 18.191 17.5421 19.0014 16.539 19.0014H7.461C6.45786 19.0014 6 18.1919 6 17.1925V11.7659C6 10.7674 6.45787 9.95703 7.46099 9.95703ZM12.908 15.1319V16.2878C12.908 16.7871 12.5012 17.1922 12.0001 17.1922C11.4992 17.1922 11.0924 16.787 11.0924 16.2878V15.1328C10.5522 14.819 10.1846 14.242 10.1846 13.5745C10.1846 12.5751 10.997 11.7656 12.0001 11.7656C13.0034 11.7656 13.8157 12.5751 13.8157 13.5745C13.8159 14.242 13.4481 14.819 12.908 15.1319Z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16.1484375" height="19.0057373046875" viewBox="0 0 16.1484375 19.0057373046875" fill="none">
|
||||
<path d="M13.6104 6.18792L13.3798 6.18792L13.3798 5.08296C13.3798 2.28066 10.9989 0 8.07392 0C5.14905 0 2.76692 2.28066 2.76692 5.08296L2.76692 6.18792L2.53533 6.18792C1.13511 6.19047 0 7.27711 0 8.61894L0 16.5746C0 17.9138 1.13743 19.0057 2.53533 19.0057L13.6104 19.0057C15.0071 19.0057 16.1479 17.9138 16.1479 16.5746L16.1479 8.61894C16.1479 7.27995 15.0071 6.18792 13.6104 6.18792ZM4.15229 5.08296C4.15229 3.00999 5.90854 1.32588 8.07392 1.32588C10.2371 1.32588 11.9946 3.00999 11.9946 5.08296L11.9946 6.18792L4.15229 6.18792L4.15229 5.08296ZM14.7628 16.5746C14.7628 16.8678 14.6419 17.149 14.4251 17.3558C14.2097 17.563 13.9157 17.6796 13.6104 17.6796L2.53533 17.6796C2.22998 17.6796 1.93599 17.563 1.72053 17.3558C1.50274 17.149 1.38294 16.8678 1.38294 16.5746L1.38294 8.61894C1.38294 8.00865 1.89912 7.51386 2.53533 7.51386L13.6104 7.51386C13.9157 7.51386 14.2097 7.63041 14.4251 7.83736C14.6419 8.04483 14.7628 8.32595 14.7628 8.61894L14.7628 16.5746ZM7.3809 10.8286C7.3809 10.4627 7.68973 10.1659 8.07347 10.1659C8.45617 10.1659 8.76488 10.4627 8.76488 10.8286L8.76488 14.3649C8.76488 14.7309 8.45617 15.0276 8.07347 15.0276C7.68973 15.0276 7.3809 14.7309 7.3809 14.3649L7.3809 10.8286Z" fill-rule="evenodd" fill="#7C7C7C" >
|
||||
</path>
|
||||
</svg>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
4
hx-ai-intelligent/src/icon/shebeiguanli.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="15.4384765625" height="14.517333984375" viewBox="0 0 15.4384765625 14.517333984375" fill="currentColor">
|
||||
<path d="M6.32606 8.89293L1.26484 8.89293C0.569183 8.89293 0 8.31818 0 7.61136L0 1.28157C0 0.574753 0.569183 0 1.26484 0L6.32606 0C7.02172 0 7.5909 0.574753 7.5909 1.28157L7.5909 7.61136C7.5909 8.31631 7.02358 8.89293 6.32606 8.89293ZM14.4415 2.05164L11.2533 2.05164C10.7046 2.05164 10.2564 1.59779 10.2564 1.04163L10.2564 1.01001C10.2564 0.453857 10.7046 0 11.2533 0L14.4415 0C14.9902 0 15.4385 0.453857 15.4385 1.01001L15.4385 1.04163C15.4366 1.59779 14.9865 2.05164 14.4415 2.05164ZM14.4415 5.44624L11.2533 5.44624C10.7046 5.44624 10.2564 4.99239 10.2564 4.43623L10.2564 4.40462C10.2564 3.84846 10.7046 3.39459 11.2533 3.39459L14.4415 3.39459C14.9902 3.39459 15.4385 3.84846 15.4385 4.40462L15.4385 4.43623C15.4366 4.99239 14.9865 5.44624 14.4415 5.44624ZM14.4415 8.84457L11.2533 8.84457C10.7046 8.84457 10.2564 8.39072 10.2564 7.83456L10.2564 7.80295C10.2564 7.24678 10.7046 6.79292 11.2533 6.79292L14.4415 6.79292C14.9902 6.79292 15.4385 7.24678 15.4385 7.80295L15.4385 7.83456C15.4366 8.39072 14.9865 8.84457 14.4415 8.84457ZM14.1718 14.5174L1.26484 14.5174C0.569183 14.5174 0 13.9426 0 13.2358L0 11.4018C0 10.6949 0.569183 10.1202 1.26484 10.1202L14.1718 10.1202C14.8674 10.1202 15.4366 10.6949 15.4366 11.4018L15.4366 13.2358C15.4366 13.9426 14.8674 14.5174 14.1718 14.5174Z" fill="currentColor" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
4
hx-ai-intelligent/src/icon/shebeiqunkong.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="13.654296875" height="14.517303466796875" viewBox="0 0 13.654296875 14.517303466796875" fill="none">
|
||||
<path d="M7.7187 0.222214L12.8503 2.95256C13.345 3.21599 13.6542 3.73064 13.6546 4.29111L13.6546 10.2367C13.6546 10.8 13.3449 11.3159 12.8474 11.5781L7.71483 14.2969C7.15997 14.5908 6.49557 14.5908 5.94072 14.2969L0.80719 11.5791C0.31076 11.3161 0.000213623 10.8004 0 10.2386L0 4.29208C0 3.73071 0.309738 3.21582 0.803329 2.95158L5.93687 0.222214C6.49385 -0.0740738 7.1617 -0.0740738 7.7187 0.222214ZM9.69315 4.92796L6.83699 6.57527L6.81763 6.57527L3.96243 4.92796C3.63583 4.73979 3.21854 4.85202 3.03038 5.17863C2.84222 5.50523 2.95445 5.92252 3.28105 6.11067L6.14592 7.76573L6.14592 10.6712C6.14592 11.0169 6.40453 11.308 6.74785 11.3487L6.82828 11.3536C7.20512 11.3536 7.5106 11.0481 7.5106 10.6712L7.5106 7.76378L10.3755 6.11067C10.7021 5.92197 10.8139 5.50426 10.6252 5.17766C10.4365 4.85106 10.0188 4.73926 9.69217 4.92795L9.69315 4.92796Z" fill="currentColor" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
4
hx-ai-intelligent/src/icon/shouye.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="17.279296875" height="14.6025390625" viewBox="0 0 17.279296875 14.6025390625" fill="currentColor">
|
||||
<path d="M10.007 14.5797L10.007 10.2525L7.28672 10.2525L7.28672 14.5913C7.20171 14.5957 7.13389 14.6022 7.06605 14.6022C5.78165 14.6022 4.49657 14.6029 3.21208 14.6022C2.77071 14.6022 2.47391 14.3191 2.47196 13.8503C2.46304 12.07 2.46575 10.2881 2.47392 8.50777C2.47392 8.41387 2.54524 8.29381 2.6172 8.22973C3.77963 7.20271 4.94816 6.18224 6.11472 5.16097C6.89124 4.48119 7.66712 3.80132 8.44361 3.12223C8.50395 3.0698 8.56569 3.01889 8.64169 2.95401C9.10501 3.35876 9.56628 3.76126 10.0269 4.16451C11.5463 5.49436 13.0638 6.82713 14.5874 8.15192C14.7512 8.2938 14.8211 8.4379 14.8197 8.66717C14.8101 10.3574 14.8128 12.0481 14.8163 13.7375C14.8169 14.0447 14.745 14.3119 14.4893 14.4815C14.3968 14.5432 14.2796 14.5965 14.1734 14.5972C12.8102 14.6044 11.4469 14.6007 10.0845 14.6C10.0646 14.6001 10.0439 14.5906 10.007 14.5797L10.007 14.5797ZM12.0542 2.59968C12.0542 1.88561 12.0536 1.22617 12.0542 0.567406C12.0549 0.146721 12.1494 0.046257 12.5449 0.0455475C13.159 0.0455475 13.7732 0.0448761 14.3873 0.046257C14.7039 0.0470581 14.8135 0.165627 14.8142 0.521568C14.8157 1.93143 14.819 3.34212 14.8101 4.752C14.8087 4.96963 14.8663 5.10934 15.0273 5.24763C15.7004 5.82269 16.3604 6.41369 17.0239 7.00109C17.3494 7.28937 17.3576 7.42977 17.0835 7.77266C16.9177 7.98081 16.7553 8.19265 16.588 8.40011C16.3824 8.65698 16.2124 8.67303 15.9664 8.45463C13.6107 6.36707 11.2551 4.27808 8.89869 2.18983C8.81712 2.11777 8.73353 2.04712 8.6382 1.96411C8.10844 2.43295 7.58274 2.89661 7.05841 3.36166C5.14625 5.05622 3.23403 6.7514 1.32181 8.44586C1.06275 8.67586 0.901754 8.66209 0.683794 8.39129C0.503304 8.16627 0.324193 7.94017 0.146461 7.71297C-0.0605403 7.44801 -0.0522817 7.27692 0.19785 7.05352C1.26495 6.10507 2.33488 5.16026 3.40405 4.21403C4.82891 2.9526 6.25519 1.6927 7.67941 0.4291C8.32567 -0.143761 8.95488 -0.143761 9.60259 0.433456C10.3681 1.11544 11.1358 1.79462 11.9027 2.47441C11.9391 2.50652 11.9775 2.5363 12.0542 2.59968L12.0542 2.59968Z" fill="currentColor" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
6
hx-ai-intelligent/src/icon/state-1.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -305 -366 )">
|
||||
<path d="M 8.03885714285714 0.641142857142857 L 8.03885714285714 0.64 C 12.1181901007502 0.64 15.4251428571429 3.94695275639267 15.4251428571429 8.02628571428571 C 15.4251430928625 8.02704758957974 15.4251432107223 8.02780946489393 15.4251432107223 8.02857134022442 C 15.4251432107223 12.1085354806887 12.117678779758 15.415999911653 8.03771463929375 15.415999911653 C 3.95775049882947 15.415999911653 0.650286067865178 12.1085354806887 0.650286067865178 8.02857134022442 C 0.650286067865178 3.94860719976014 3.95775049882947 0.64114276879585 8.03771463929375 0.64114276879585 C 8.03809547381657 0.64114276879585 8.03847630833888 0.641142798244853 8.03885714285714 0.641142857142857 Z M 8 6.85714285714286 C 7.36881742876481 6.85714285714286 6.85714285714286 7.36881742876481 6.85714285714286 8 C 6.85714285714286 8.63118257123519 7.36881742876481 9.14285714285714 8 9.14285714285714 C 8.63118257123519 9.14285714285714 9.14285714285714 8.63118257123519 9.14285714285714 8 C 9.14285714285714 7.36881742876481 8.63118257123519 6.85714285714286 8 6.85714285714286 Z M 11.4285714285714 6.85714285714286 C 10.7973888573362 6.85714285714286 10.2857142857143 7.36881742876481 10.2857142857143 8 C 10.2857142857143 8.63118257123519 10.7973888573362 9.14285714285714 11.4285714285714 9.14285714285714 C 12.0597539998066 9.14285714285714 12.5714285714286 8.63118257123519 12.5714285714286 8 C 12.5714285714286 7.36881742876481 12.0597539998066 6.85714285714286 11.4285714285714 6.85714285714286 Z M 4.57142857142857 6.85714285714286 C 3.94024600019338 6.85714285714286 3.42857142857143 7.36881742876481 3.42857142857143 8 C 3.42857142857143 8.63118257123519 3.94024600019338 9.14285714285714 4.57142857142857 9.14285714285714 C 5.20261114266376 9.14285714285714 5.71428571428571 8.63118257123519 5.71428571428571 8 C 5.71428571428571 7.36881742876481 5.20261114266376 6.85714285714286 4.57142857142857 6.85714285714286 Z " fill-rule="nonzero" fill="#ff7602" stroke="none" transform="matrix(1 0 0 1 305 366 )" />
|
||||
</g>
|
||||
</svg>
|
||||
6
hx-ai-intelligent/src/icon/state-2.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -305 -340 )">
|
||||
<path d="M 15.52 8 C 15.52 3.848 12.152 0.48 8 0.48 C 3.848 0.48 0.48 3.848 0.48 8 C 0.48 12.152 3.848 15.52 8 15.52 C 12.152 15.52 15.52 12.152 15.52 8 Z M 11.608 9.256 C 11.84 9.368 11.936 9.648 11.832 9.88 C 11.72 10.112 11.44 10.216 11.208 10.104 L 7.8 8.48 C 7.632 8.392 7.52 8.216 7.512 8.024 L 7.512 2.648 C 7.512 2.392 7.72 2.176 7.984 2.176 C 8.24 2.176 8.456 2.384 8.456 2.648 L 8.456 7.752 L 11.608 9.256 Z " fill-rule="nonzero" fill="#009de1" stroke="none" transform="matrix(1 0 0 1 305 340 )" />
|
||||
</g>
|
||||
</svg>
|
||||
6
hx-ai-intelligent/src/icon/state-3.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="15px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -305 -264 )">
|
||||
<path d="M 12.8044865917969 12.8044945019531 C 15.7317833056641 9.87949759277344 15.7317833056641 5.12019596191406 12.8044865917969 2.19521370117188 C 11.3984961283515 0.787326048146557 9.48966705506673 -0.00260805552580251 7.4999560546875 3.046875E-05 C 5.50996955094545 -0.00406567496305449 3.60061659376305 0.786091774555939 2.19546946289063 2.19521370117188 C -0.731548930664062 5.12021061035156 -0.731548930664062 9.87951224121094 2.19546946289063 12.8044945019531 C 3.60067093003941 14.2135352022771 5.50998850312976 15.0036780086136 7.4999560546875 14.999677734375 C 9.49029165514025 15.0054765279533 11.4002873723065 14.2150596299848 12.8044865917969 12.8044945019531 Z M 11.9376369140625 5.54019552246094 L 6.89940004394531 10.9003754150391 C 6.87578802320076 10.9269018017654 6.84623229984903 10.9474623058395 6.81315013183594 10.9603753564453 C 6.78748609863281 10.9776751464844 6.77046462890625 10.9949895849609 6.73585041503906 11.003060859375 C 6.67362025830789 11.0304200226738 6.60651003916783 11.0449431326059 6.53853616699219 11.0457610107422 C 6.47426031328986 11.0436752198275 6.41062363711127 11.0323076485925 6.34960082519531 11.0120110400391 L 6.28960088378906 10.9773821777344 C 6.25364523541476 10.9604965742554 6.21927871922921 10.9404159360992 6.18691545410156 10.9173822363281 L 3.30259719726562 8.07866452148437 C 3.20194835437246 7.98256406662991 3.14591207112094 7.8488594603371 3.14796845214844 7.70971472167969 C 3.14796845214844 7.57240041503906 3.20046839355469 7.43510075683594 3.29421830566406 7.34076490722656 C 3.50055541080613 7.14332002945278 3.8257661663423 7.14332002945278 4.03210327148437 7.34076490722656 L 6.52210063476562 9.79326232910156 L 11.1824668212891 4.83721775390625 C 11.3839239859071 4.63706235688665 11.705600292055 4.62599539544477 11.9203371386719 4.81183204101562 C 12.0250169736047 4.90583460723342 12.0845359910269 5.04009087589488 12.0839014160156 5.18078184082031 C 12.0834323759743 5.31515796660418 12.0310295272497 5.44414958696638 11.9376515625 5.54078145996094 Z " fill-rule="nonzero" fill="#04d719" stroke="none" transform="matrix(1 0 0 1 305 264 )" />
|
||||
</g>
|
||||
</svg>
|
||||
6
hx-ai-intelligent/src/icon/state-4.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="15px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -305 -315 )">
|
||||
<path d="M 15 7.5 C 15 3.358125 11.641875 0 7.5 0 C 3.358125 0 0 3.358125 0 7.5 C 0 11.641875 3.358125 15 7.5 15 C 11.641875 15 15 11.641875 15 7.5 Z M 6.96437500488281 8.4375 L 6.96437500488281 3.8840625 C 6.96454594411788 3.81021458429416 7.02427767945776 3.75034328445354 7.09812499511719 3.75 L 7.90187500488281 3.75 C 7.97572232054224 3.75034328445354 8.03545405588212 3.81021458429416 8.03562499511719 3.8840625 L 8.03562499511719 8.4375 C 8.03545405588212 8.51134791570584 7.97572232054224 8.57121921554647 7.90187500488281 8.5715625 L 7.09812499511719 8.5715625 C 7.02427767945776 8.57121921554647 6.96454594411788 8.51134791570584 6.96437500488281 8.4375 Z M 7.5 11.25 C 7.05616214821327 11.2499137187178 6.69640622993007 10.8900878577318 6.69640622993007 10.4462499975586 C 6.69640622993007 10.0023511201461 7.05625737014613 9.64249997993007 7.50015624755859 9.64249997993007 C 7.94415034690392 9.64258627639936 8.30390626518712 10.0024121373854 8.30390626518712 10.4462499975586 C 8.30390626518712 10.8901488749711 7.94405512497106 11.2500000151871 7.50015624755859 11.2500000151871 Z " fill-rule="nonzero" fill="#d8001b" stroke="none" transform="matrix(1 0 0 1 305 315 )" />
|
||||
</g>
|
||||
</svg>
|
||||
6
hx-ai-intelligent/src/icon/state-5.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="15px" height="15px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 -305 -289 )">
|
||||
<path d="M 14.8828125 7.5 C 14.8828125 3.42891475341797 11.571085246582 0.1171875 7.5 0.1171875 C 3.42942502441406 0.1171875 0.1171875 3.42891475341797 0.1171875 7.5 C 0.1171875 11.571085246582 3.42891475341797 14.8828125 7.5 14.8828125 C 11.5705749755859 14.8828125 14.8828125 11.571085246582 14.8828125 7.5 Z M 8.24725339416504 7.50209775695801 L 10.5116636334229 9.77390681030273 C 10.717328404541 9.98062045166015 10.7167897888184 10.3139079473877 10.5106147631836 10.5195727185059 C 10.4077965582275 10.6218806689453 10.2733136187744 10.6735590710449 10.1383204248047 10.6735590710449 C 10.0027886151123 10.6735590710449 9.86779542114258 10.6218806524658 9.76494885498047 10.5185238317871 L 7.49736364379883 8.24407840576172 L 5.22240794677735 10.4947965600586 C 5.11958974182129 10.5960556237793 4.98561707336426 10.6471954266357 4.85167274963379 10.6471954266357 C 4.71563066894531 10.6471954266357 4.58009887573242 10.5949784088135 4.47674203857422 10.490572701416 C 4.27212613769531 10.2833204443359 4.27371362365723 9.9500329486084 4.4809658972168 9.74490679321289 L 6.75328522155762 7.49736362731933 L 4.4893852532959 5.22609317321777 C 4.28372048217773 5.01988978637695 4.28425909790039 4.68609203613281 4.49043412353516 4.48042726501465 C 4.69663751037598 4.27422387817383 5.02989664489746 4.27530110961914 5.23610003173828 4.4814761352539 L 7.50314662719727 6.75538294555664 L 9.77810232421875 4.50469313598633 C 9.98481596557617 4.29956698059082 10.319152331543 4.30166472106934 10.5237682324219 4.5089169946289 C 10.7288943878174 4.71616925170898 10.7267966473389 5.04996700195312 10.5195443737793 5.25458290283203 L 8.24725339416504 7.50209775695801 Z " fill-rule="nonzero" fill="#a6a6a6" stroke="none" transform="matrix(1 0 0 1 305 289 )" />
|
||||
</g>
|
||||
</svg>
|
||||
4
hx-ai-intelligent/src/icon/tanpaiguanli.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14.5244140625" height="14.5294189453125" viewBox="0 0 14.5244140625 14.5294189453125" fill="none">
|
||||
<path d="M6.61912 12.2301C6.6032 12.5346 6.44482 12.8138 6.19166 12.9837L3.73703 14.4259C3.46877 14.5639 3.15036 14.5639 2.8821 14.4259L0.427467 12.9837C0.174295 12.8138 0.0159187 12.5346 0 12.2301L0 9.34584C0.0162582 9.04147 0.174555 8.76241 0.427467 8.59227L2.88209 7.15012C3.15031 7.01189 3.46881 7.01189 3.73703 7.15012L6.19165 8.59337C6.44482 8.76326 6.6032 9.04247 6.61912 9.34694L6.61912 12.2301ZM14.5239 12.2301C14.508 12.5346 14.3497 12.8138 14.0965 12.9837L11.6419 14.4259C11.3736 14.5639 11.0552 14.5639 10.7869 14.4259L8.33231 12.9837C8.079 12.814 7.92058 12.5347 7.90484 12.2301L7.90484 9.34584C7.92075 9.04137 8.07913 8.76217 8.33231 8.59227L10.7869 7.14902C11.0551 7.01079 11.3736 7.01079 11.6419 7.14902L14.0965 8.59117C14.3495 8.76118 14.5079 9.04031 14.524 9.34475L14.5239 12.2301ZM10.5842 5.18465C10.5683 5.48912 10.4099 5.76833 10.1567 5.93822L7.70211 7.38147C7.43394 7.51988 7.11535 7.51988 6.84718 7.38147L4.39256 5.93822C4.13938 5.76833 3.981 5.48912 3.96508 5.18465L3.96508 2.30036C3.98117 1.99594 4.13951 1.7168 4.39256 1.54678L6.84718 0.103527C7.11544 -0.0345116 7.43386 -0.0345116 7.70212 0.103527L10.1567 1.54568C10.41 1.71546 10.5685 1.99473 10.5842 2.29926L10.5842 5.18465Z" fill="currentColor" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -1,6 +0,0 @@
|
||||
<svg width="20" height="9" viewBox="0 0 20 9" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="Group 6356610" opacity="0.65">
|
||||
<path id="Vector" d="M6.89084 5.13637L9.85448 8.1L8.95448 9L4.45446 4.49997L8.95448 -8.86233e-07L9.85448 0.899993L6.89091 3.86357L19.0918 3.86351L19.0918 5.13631L6.89084 5.13637Z" fill="white" fill-opacity="0.3"/>
|
||||
<path id="Vector_2" d="M1.27246 0.0904379L1.27246 9L-0.000335336 9L-0.000334557 0.0904378L1.27246 0.0904379Z" fill="white" fill-opacity="0.65"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 503 B |
@@ -1,5 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="12" fill-opacity="0.1"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3936 10.8691C12.0322 11.4221 10.4652 11.1164 9.42323 10.0946C8.56315 9.25057 8.18933 8.04123 8.42675 6.87091C8.66417 5.70058 9.48151 4.72368 10.6055 4.26681C11.4814 3.91106 12.518 3.91106 13.3939 4.26681C14.7552 4.81996 15.6428 6.12287 15.6427 7.56804C15.6427 9.01321 14.755 10.3161 13.3936 10.8691ZM9.08048 11.9575H14.9191H14.9193C16.6182 11.9575 18 13.3128 18 14.9788C18 16.6448 16.618 18 14.9193 18H9.08048C7.38197 18 6 16.6448 6 14.9788C6 13.3128 7.38176 11.9575 9.08048 11.9575Z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19" height="20.010009765625" viewBox="0 0 19 20.010009765625" fill="none">
|
||||
<path d="M13.3 5.95C13.3 3.71639 11.4895 1.91 9.26 1.91C7.02904 1.91 5.22 3.71639 5.22 5.95C5.22 8.18291 7.02904 10 9.26 10C11.4907 10 13.3 8.18291 13.3 5.95ZM18.96 18.78C18.9879 18.8668 19 18.954 19 19.05C19 19.5756 18.5742 20.01 18.05 20.01C17.7989 20.01 17.5571 19.9088 17.38 19.73C17.2004 19.5511 17.1 19.3033 17.1 19.05L17.08 19.05C16.8338 15.063 13.5383 11.9 9.5 11.9C5.46167 11.9 2.16878 15.063 1.92 19.05L1.9 19.05C1.9 19.5756 1.47526 20.01 0.95 20.01C0.700244 20.01 0.457124 19.9086 0.28 19.73C0.100434 19.5514 0 19.3035 0 19.05C0 18.9599 0.015708 18.8735 0.04 18.79C0.315269 15.1717 2.59568 12.1213 5.78 10.76C4.2988 9.67791 3.33 7.92778 3.33 5.95C3.33 2.6628 5.99205 0 9.27 0C12.5488 0 15.2 2.6628 15.2 5.95C15.2 7.78701 14.3536 9.5196 12.91 10.64C16.2461 11.9305 18.67 15.0545 18.96 18.78Z" fill="#7C7C7C" >
|
||||
</path>
|
||||
</svg>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 686 B After Width: | Height: | Size: 1002 B |
6
hx-ai-intelligent/src/icon/verifyIcon.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M10.4557 18.6706C10.4092 18.6706 10.3627 18.6654 10.3173 18.6549C10.2426 18.6377 8.46434 18.2175 6.67349 16.914C5.61102 16.1408 4.76262 15.2154 4.15213 14.1639C3.38754 12.847 3 11.3377 3 9.67612L3 4.20406C3 3.94798 3.15846 3.71857 3.39803 3.62791L10.2384 1.03976C10.3789 0.986755 10.534 0.986755 10.6745 1.03976L17.5149 3.62788C17.7545 3.7184 17.9132 3.94788 17.9131 4.20406L17.9131 9.67612C17.9131 11.3377 17.5256 12.8474 16.761 14.1639C16.1505 15.2145 15.3021 16.1408 14.2397 16.914C12.4474 18.2165 10.6691 18.6367 10.5942 18.6549C10.5488 18.6654 10.5023 18.6706 10.4557 18.6706ZM4.23244 4.6292L4.23244 9.67612C4.23244 12.2738 5.28627 14.3656 7.36478 15.8929C8.68451 16.8625 10.0281 17.2957 10.4557 17.4171C10.8834 17.2957 12.2273 16.8625 13.547 15.8929C15.6248 14.3656 16.6793 12.2743 16.6793 9.67612L16.6793 4.6292L10.4557 2.27499L4.23244 4.6292Z" fill="#7C7C7C" >
|
||||
</path>
|
||||
<path d="M9.49429 12.2693L9.48495 12.2693C9.3183 12.2668 9.15976 12.1969 9.04556 12.0755L7.07401 9.98022C6.84058 9.73248 6.8522 9.34241 7.09992 9.10895C7.34769 8.87552 7.73776 8.88712 7.97119 9.13489L9.5076 10.7691L13.1869 7.08978C13.4275 6.849 13.8177 6.849 14.0584 7.08969C14.2992 7.33041 14.2992 7.72064 14.0584 7.96133L9.9299 12.0886C9.81445 12.2043 9.65771 12.2693 9.49429 12.2693Z" fill="#7C7C7C" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
1
hx-ai-intelligent/src/icon/xiazai.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720430904326" class="icon" viewBox="0 0 1354 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3403" xmlns:xlink="http://www.w3.org/1999/xlink" width="21.15625" height="16"><path d="M1034.83248 645.406063l-191.508238 191.508238a53.622507 53.622507 0 0 1-75.964301 0l-191.508238-191.508238a53.622507 53.622507 0 0 1 0-75.964301 53.622507 53.622507 0 0 1 75.965301 0l102.775054 102.775054V303.884205a53.622507 53.622507 0 1 1 107.245014 0v368.332611l95.753119-102.775054a53.622507 53.622507 0 0 1 75.965301 0 53.622507 53.622507 0 0 1 1.276988 75.964301z m262.364587-175.548385a365.141641 365.141641 0 0 0-97.030108-98.94609 378.546518 378.546518 0 0 0-29.364729-123.202867 397.697341 397.697341 0 0 0-89.369178-127.671825 404.719277 404.719277 0 0 0-133.418773-91.28516A408.549242 408.549242 0 0 0 792.894706 0.026a400.251318 400.251318 0 0 0-225.977921 67.665377 410.464224 410.464224 0 0 0-97.669102 91.285161 261.088598 261.088598 0 0 0-63.836412-7.65993 247.044727 247.044727 0 0 0-176.18738 70.857348 245.129745 245.129745 0 0 0-72.134336 202.360139 324.925011 324.925011 0 0 0-84.263225 72.77333A308.965158 308.965158 0 0 0 0.053 702.22054a310.242146 310.242146 0 0 0 97.029107 228.531898 331.307952 331.307952 0 0 0 105.969025 69.58136 330.030964 330.030964 0 0 0 127.670826 23.619782h656.233963A360.034688 360.034688 0 0 0 1242.298572 919.261544a360.034688 360.034688 0 0 0 81.071254-116.181932 354.288741 354.288741 0 0 0 27.449748-138.523725 344.713829 344.713829 0 0 0-54.260501-194.699209z" fill="#5656FB" p-id="3404"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
1
hx-ai-intelligent/src/icon/zidian.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1721271548889" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4319" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M966.632727 253.602909c-18.850909 0-34.117818 15.266909-34.117818 34.094546v537.94909H602.926545A123.136 123.136 0 0 0 512 866.048a123.182545 123.182545 0 0 0-90.926545-40.401455H91.485091V287.697455a34.117818 34.117818 0 0 0-68.189091 0v549.632c0 32.209455 25.460364 58.414545 56.785455 58.414545h340.992c24.273455 0 45.009455 15.709091 53.154909 37.748364 4.677818 12.660364 17.175273 20.689455 30.673454 20.689454h14.196364c13.498182 0 25.995636-8.029091 30.673454-20.689454 8.145455-22.039273 28.881455-37.748364 53.154909-37.748364h340.968728c31.348364 0 56.832-26.205091 56.832-58.414545V287.697455c0-18.827636-15.266909-34.094545-34.094546-34.094546zM221.230545 139.938909h199.84291c31.325091 0 56.832 21.573818 56.832 48.104727v493.614546a130.443636 130.443636 0 0 0-56.832-12.8H221.230545V139.938909zM475.694545 775.168l2.21091 24.413091h68.18909l2.187637-24.413091c6.609455-21.317818 29.090909-36.212364 54.644363-36.212364h268.055273v-216.133818a34.117818 34.117818 0 0 0-68.189091 0v146.036364h-199.866182c-20.386909 0-39.726545 4.538182-56.832 12.8V188.043636c0-26.530909 25.483636-48.104727 56.832-48.104727h199.84291v244.875636a34.094545 34.094545 0 0 0 68.212363 0V116.363636a46.545455 46.545455 0 0 0-46.545454-46.545454h-221.509819c-35.84 0-68.119273 14.405818-90.926545 37.329454A128 128 0 0 0 421.073455 69.818182H199.563636a46.545455 46.545455 0 0 0-46.545454 46.545454v622.592h268.055273c25.553455 0 48.034909 14.894545 54.62109 36.212364z" p-id="4320"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
4
hx-ai-intelligent/src/icon/zuzhiguanli.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16.21484375" height="13.50872802734375" viewBox="0 0 16.21484375 13.50872802734375" fill="none">
|
||||
<path d="M8.10415 0C9.84551 0.0632347 11.2034 1.39415 11.1426 2.97804C11.1467 3.44998 11.0312 3.91644 10.805 4.34118L13.2695 6.18327C13.5772 5.96724 13.9542 5.84864 14.343 5.84555C15.4184 5.88545 16.2552 6.70962 16.2133 7.68764C16.2353 8.15778 16.0502 8.61648 15.6992 8.9622C15.3482 9.30793 14.8601 9.51217 14.343 9.52972C13.8259 9.51217 13.3379 9.30793 12.9868 8.9622C12.6358 8.61648 12.4508 8.15778 12.4727 7.68764C12.4714 7.46591 12.5125 7.24566 12.5942 7.03676L10.1298 5.19468C9.72493 5.55505 9.21346 5.80042 8.65782 5.90082L8.65782 8.75605C9.81002 9.04805 10.5971 10.0142 10.5686 11.1016C10.618 12.3849 9.51517 13.462 8.10415 13.5087C6.69582 13.4587 5.59701 12.3826 5.64643 11.1017C5.61473 10.0153 6.39954 9.04848 7.55049 8.75606L7.55049 5.90083C6.99538 5.79909 6.48431 5.55392 6.07856 5.1947L3.62083 7.03678C3.70258 7.24568 3.74371 7.46592 3.74236 7.68765C3.76428 8.15779 3.57925 8.61649 3.22823 8.96222C2.87721 9.30794 2.38914 9.51219 1.87206 9.52974C1.35497 9.51219 0.866907 9.30794 0.515883 8.96222C0.164859 8.61649 -0.020171 8.15779 0.00174713 7.68765C-0.0401125 6.70964 0.796688 5.88547 1.87206 5.84557C2.26084 5.84866 2.63785 5.96725 2.94563 6.18328L5.40335 4.3412C5.1771 3.91646 5.06158 3.44999 5.06575 2.97805C5.0049 1.39416 6.36279 0.0632407 8.10415 0L8.10415 0Z" fill="currentColor" >
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -5,8 +5,15 @@ import { apiModule } from '/@/api';
|
||||
import { appConfig } from '/@/config';
|
||||
import './theme/global.less';
|
||||
import { LeftOutlined } from '@ant-design/icons-vue';
|
||||
import { setupGlobDirectives } from '/@/directives';
|
||||
|
||||
const app = createApp(App);
|
||||
app.component('LeftOutlined', LeftOutlined);
|
||||
|
||||
// Register global directive
|
||||
// 注册全局指令
|
||||
setupGlobDirectives(app);
|
||||
|
||||
saasInit({
|
||||
app,
|
||||
apiModule,
|
||||
|
||||
129
hx-ai-intelligent/src/router/alarmManagement.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
|
||||
const alarmManagement = {
|
||||
path: '/alarmManagement',
|
||||
name: 'AlarmManagement',
|
||||
meta: { title: '告警管理', icon: 'gaojingguanli', index: 4 },
|
||||
redirect: { name: 'alarmManagement' },
|
||||
children: [
|
||||
{
|
||||
path: 'alarmOverview',
|
||||
name: 'AlarmOverview',
|
||||
meta: { title: '告警总览', hideChildren: true, icon: 'gaojingguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'alarmOverviewIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'alarmOverviewIndex',
|
||||
component: () => import('/@/view/alarmManagement/alarmOverview/index.vue'),
|
||||
meta: {
|
||||
title: '告警总览',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'equipmentAlarm',
|
||||
name: 'EquipmentAlarm',
|
||||
meta: { title: '设备告警', hideChildren: true, icon: 'gaojingguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'EquipmentAlarmIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'EquipmentAlarmIndex',
|
||||
component: () => import('/@/view/alarmManagement/equipmentAlarm/index.vue'),
|
||||
meta: {
|
||||
title: '设备告警',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'gatewayAlarm',
|
||||
name: 'GatewayAlarm',
|
||||
meta: { title: '网关告警', hideChildren: true, icon: 'gaojingguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'GatewayAlarmIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'GatewayAlarmIndex',
|
||||
component: () => import('/@/view/alarmManagement/gatewayAlarm/index.vue'),
|
||||
meta: {
|
||||
title: '网关告警',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'EnergyAlarm',
|
||||
name: 'EnergyAlarm',
|
||||
meta: { title: '能碳告警', hideChildren: true, icon: 'gaojingguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'EnergyAlarmIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'EnergyAlarmIndex',
|
||||
component: () => import('/@/view/alarmManagement/energyAlarm/index.vue'),
|
||||
meta: {
|
||||
title: '能碳告警',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'alarmSettings',
|
||||
name: 'AlarmSettings',
|
||||
meta: { title: '告警设置', hideChildren: true, icon: 'gaojingguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'alarmSettingsIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'alarmSettingsIndex',
|
||||
component: () => import('/@/view/alarmManagement/alarmSettings/index.vue'),
|
||||
meta: {
|
||||
title: '告警设置',
|
||||
keepAlive: false,
|
||||
operates: [
|
||||
{ title: '设备告警新增', code: 'equipmentAlarmAdd' },
|
||||
{ title: '设备告警导入', code: 'equipmentAlarmImport' },
|
||||
{ title: '设备告警导出', code: 'equipmentAlarmExports' },
|
||||
{ title: '设备告警删除', code: 'equipmentAlarmDel' },
|
||||
{ title: '设备告警编辑', code: 'equipmentAlarmEdit' },
|
||||
{ title: '能源告警新增', code: 'energyAlarmAdd' },
|
||||
{ title: '能源告警导入', code: 'energyAlarmImport' },
|
||||
{ title: '能源告警导出', code: 'energyAlarmExports' },
|
||||
{ title: '能源告警删除', code: 'energyAlarmDel' },
|
||||
{ title: '能源告警编辑', code: 'energyAlarmEdit' },
|
||||
{ title: '设备告警规则新增', code: 'configureEquipmentAlarmAdd' },
|
||||
{ title: '设备告警规则导入', code: 'configureEquipmentAlarmImport' },
|
||||
{ title: '设备告警规则导出', code: 'configureEquipmentAlarmExports' },
|
||||
{ title: '设备告警规则批量删除', code: 'configureEquipmentAlarmDels' },
|
||||
{ title: '设备告警规则编辑', code: 'configureEquipmentAlarmEdit' },
|
||||
{ title: '设备告警规则删除', code: 'configureEquipmentAlarmDel' },
|
||||
{ title: '能源告警规则新增', code: 'configureEnergyAlarmAdd' },
|
||||
{ title: '能源告警规则导入', code: 'configureEnergyAlarmImport' },
|
||||
{ title: '能源告警规则导出', code: 'configureEnergyAlarmExports' },
|
||||
{ title: '能源告警规则批量删除', code: 'configureEnergyAlarmDels' },
|
||||
{ title: '能源告警规则编辑', code: 'configureEnergyAlarmEdit' },
|
||||
{ title: '能源告警规则删除', code: 'configureEnergyAlarmDel' },
|
||||
],
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
export default alarmManagement;
|
||||
90
hx-ai-intelligent/src/router/carbonEmissionManage.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
|
||||
const equipment = {
|
||||
path: '/carbonEmissionManage',
|
||||
name: 'CarbonEmissionManage',
|
||||
meta: { title: '碳排管理', icon: 'tanpaiguanli', index: 1 },
|
||||
redirect: { name: 'CarbonEmissionStatistics' },
|
||||
children: [
|
||||
{
|
||||
path: 'carbonEmissionStatistics',
|
||||
name: 'CarbonEmissionStatistics',
|
||||
meta: { title: '碳排统计', hideChildren: true, icon: 'tanpaiguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'CarbonEmissionStatisticsIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'CarbonEmissionStatisticsIndex',
|
||||
// component: () => import('/nerv-lib/saas/view/menuManage/index.vue'),
|
||||
component: () => import('/@/view/carbonEmissionManage/carbonEmissionStatistics/index.vue'),
|
||||
meta: {
|
||||
title: '碳排统计',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'carbonEmissionFactorLibrary',
|
||||
name: 'CarbonEmissionFactorLibrary',
|
||||
meta: { title: '碳排因子库', hideChildren: true, icon: 'tanpaiguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'CarbonEmissionFactorLibraryIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'CarbonEmissionFactorLibraryIndex',
|
||||
// component: () => import('/nerv-lib/saas/view/menuManage/index.vue'),
|
||||
component: () => import('/@/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue'),
|
||||
meta: {
|
||||
title: '碳排因子库',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'carbonInventoryCheck',
|
||||
name: 'CarbonInventoryCheck',
|
||||
meta: { title: '碳盘查', hideChildren: true, icon: 'tanpaiguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'CarbonInventoryCheckIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'CarbonInventoryCheckIndex',
|
||||
// component: () => import('/nerv-lib/saas/view/menuManage/index.vue'),
|
||||
component: () => import('/@/view/carbonEmissionManage/carbonInventoryCheck/index.vue'),
|
||||
meta: {
|
||||
title: '碳盘查',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'carbonInventoryCheck',
|
||||
name: 'CarbonInventoryCheck',
|
||||
meta: { title: '碳资产', hideChildren: true, icon: 'tanpaiguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'CarbonInventoryCheckIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'CarbonInventoryCheckIndex',
|
||||
// component: () => import('/nerv-lib/saas/view/menuManage/index.vue'),
|
||||
component: () => import('/@/view/carbonEmissionManage/carbonInventoryCheck/index.vue'),
|
||||
meta: {
|
||||
title: '碳资产',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
export default equipment;
|
||||
15
hx-ai-intelligent/src/router/dict.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
const dict = {
|
||||
path: '/dict',
|
||||
name: 'dict',
|
||||
meta: { title: '字典', icon: 'zidian', index: 7, hideChildren: true },
|
||||
redirect: { name: 'dictIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'dictIndex',
|
||||
meta: { title: '字典', hideChildren: true, icon: 'zidian' },
|
||||
component: () => import('/@/view/dict/index.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
export default dict;
|
||||
48
hx-ai-intelligent/src/router/equipmentControl.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
|
||||
const equipmentControl = {
|
||||
path: '/equipmentControl',
|
||||
name: 'EquipmentControl',
|
||||
meta: { title: '设备群控', icon: 'shebeiqunkong', index: 4 },
|
||||
redirect: { name: 'LightManage' },
|
||||
children: [
|
||||
{
|
||||
path: 'lightManage',
|
||||
name: 'LightManage',
|
||||
meta: { title: '智能照明', hideChildren: true, icon: 'shebeiqunkong' },
|
||||
component: Base,
|
||||
redirect: { name: 'lightManageIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'lightManageIndex',
|
||||
component: () => import('/@/view/equipmentControl/lightingManage/indexs.vue'),
|
||||
meta: {
|
||||
title: '智能照明',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'liftSystem',
|
||||
name: 'liftSystem',
|
||||
meta: { title: '电梯系统', hideChildren: true, icon: 'shebeiqunkong' },
|
||||
component: Base,
|
||||
redirect: { name: 'liftSystem' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'liftSystem',
|
||||
component: () => import('/@/view/equipmentControl/liftSystem/index.vue'),
|
||||
meta: {
|
||||
title: '电梯系统',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
export default equipmentControl;
|
||||
79
hx-ai-intelligent/src/router/equipmentManage.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
|
||||
const equipment = {
|
||||
path: '/equipmentManage',
|
||||
name: 'EquipmentManage',
|
||||
meta: { title: '设备管理', icon: 'shebeiguanli', index: 1 },
|
||||
redirect: { name: 'Ledger' },
|
||||
children: [
|
||||
{
|
||||
path: 'ledger',
|
||||
name: 'Ledger',
|
||||
meta: { title: '设备台账', hideChildren: true, icon: 'shebeiguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'LedgerIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'LedgerIndex',
|
||||
// component: () => import('/nerv-lib/saas/view/menuManage/index.vue'),
|
||||
component: () => import('/@/view/equipmentManage/ledger/index.vue'),
|
||||
meta: {
|
||||
title: '设备台账',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'group',
|
||||
name: 'Group',
|
||||
meta: { title: '分组管理', hideChildren: true, icon: 'shebeiguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'GroupIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'GroupIndex',
|
||||
component: () => import('/@/view/equipmentManage/group/index.vue'),
|
||||
meta: {
|
||||
title: '分组管理',
|
||||
keepAlive: false,
|
||||
operates: [
|
||||
{ title: '新增分组', code: 'GroupAdd' },
|
||||
{ title: '删除分组', code: 'GroupDelete' },
|
||||
{ title: '编辑分组', code: 'GroupEdit' },
|
||||
{ title: '删除点位', code: 'GroupPointDelete' },
|
||||
{ title: '编辑点位', code: 'GroupPointEdit' },
|
||||
{ title: '导入点位', code: 'GroupPointImport' },
|
||||
{ title: '导出点位', code: 'GroupPointExports' },
|
||||
{ title: '模版下载', code: 'GroupTempDownload' },
|
||||
{ title: '批量分组', code: 'GroupBatchGroup' },
|
||||
{ title: '公式编辑', code: 'GroupFormulaEdit' },
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// path: 'energyMapping',
|
||||
// name: 'EnergyMapping',
|
||||
// meta: { title: '能耗映射', hideChildren: true, icon: 'shebeiguanli' },
|
||||
// component: Base,
|
||||
// redirect: { name: 'EnergyMappingIndex' },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'index',
|
||||
// name: 'EnergyMappingIndex',
|
||||
// component: () => import('/@/view/equipmentManage/energyMapping/index.vue'),
|
||||
// meta: {
|
||||
// title: '能耗映射',
|
||||
// keepAlive: false,
|
||||
// // backApi: [],
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
};
|
||||
export default equipment;
|
||||
@@ -2,32 +2,26 @@ const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
|
||||
const home = {
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
meta: { title: '首页', icon: 'dicizhishou', index: 0, hideChildren: true },
|
||||
meta: { title: '首页', icon: 'shouye', index: 0, hideChildren: true },
|
||||
redirect: { name: 'homeIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'homeModule',
|
||||
name: 'HomeModule',
|
||||
meta: { title: '首页', hideChildren: true, icon: 'dicizhishou' },
|
||||
component: Base,
|
||||
redirect: { name: 'homeIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'homeIndex',
|
||||
component: () => import('/@/view/developing.vue'),
|
||||
meta: {
|
||||
title: '首页',
|
||||
keepAlive: true,
|
||||
backApi: [
|
||||
{
|
||||
method: 'GET',
|
||||
url: '/api/objs/FeedbackWeb/feedBackList',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
path: 'index',
|
||||
name: 'homeIndex',
|
||||
meta: { title: '首页', hideChildren: true, icon: 'shouye' },
|
||||
component: () => import('/@/view/developing.vue'),
|
||||
// redirect: { name: 'homeIndex' },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'index',
|
||||
// name: 'homeIndex',
|
||||
// meta: {
|
||||
// title: '首页',
|
||||
// keepAlive: false,
|
||||
// // backApi: [],
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
86
hx-ai-intelligent/src/router/monitor.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
|
||||
const equipment = {
|
||||
path: '/monitor',
|
||||
name: 'Monitor',
|
||||
meta: { title: '监控中心', icon: 'jiankongzhongxin', index: 1 },
|
||||
redirect: { name: 'EnvironmentMonitor' },
|
||||
children: [
|
||||
{
|
||||
path: 'environmentMonitor',
|
||||
name: 'EnvironmentMonitor',
|
||||
meta: { title: '环境监测', hideChildren: true, icon: 'huanjingjiance' },
|
||||
component: Base,
|
||||
redirect: { name: 'EnvironmentMonitorIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'EnvironmentMonitorIndex',
|
||||
component: () => import('/@/view/monitor/environmentMonitor/index.vue'),
|
||||
meta: {
|
||||
title: '环境监测',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'deviceMonitor',
|
||||
name: 'DeviceMonitor',
|
||||
meta: { title: '设备监测', hideChildren: true, icon: 'huanjingjiance' },
|
||||
component: Base,
|
||||
redirect: { name: 'DeviceMonitorIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'DeviceMonitorIndex',
|
||||
component: () => import('/@/view/monitor/deviceMonitor/index.vue'),
|
||||
meta: {
|
||||
title: '设备监测',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'energyMonitor',
|
||||
name: 'EnergyMonitor',
|
||||
meta: { title: '能耗监测', hideChildren: true, icon: 'huanjingjiance' },
|
||||
component: Base,
|
||||
redirect: { name: 'EnergyMonitorIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'EnergyMonitorIndex',
|
||||
component: () => import('/@/view/monitor/energyMonitor/index.vue'),
|
||||
meta: {
|
||||
title: '能耗监测',
|
||||
keepAlive: false,
|
||||
// backApi: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// path: 'group',
|
||||
// name: 'Group',
|
||||
// meta: { title: '分组管理', hideChildren: true, icon: 'shebeiguanli' },
|
||||
// component: Base,
|
||||
// redirect: { name: 'GroupIndex' },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'index',
|
||||
// name: 'GroupIndex',
|
||||
// component: () => import('/@/view/monitor/group/index.vue'),
|
||||
// meta: {
|
||||
// title: '分组管理',
|
||||
// keepAlive: false,
|
||||
// // backApi: [],
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
};
|
||||
export default equipment;
|
||||
@@ -2,52 +2,34 @@ const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
|
||||
const organizationManage = {
|
||||
path: '/organizationManage',
|
||||
name: 'organizationManage',
|
||||
meta: { title: '组织管理', icon: 'dicizhishou', index: 99 },
|
||||
redirect: { name: 'EnterpriseManage' },
|
||||
meta: { title: '组织管理', icon: 'zuzhiguanli', index: 99 },
|
||||
redirect: { name: 'UserManage' },
|
||||
children: [
|
||||
{
|
||||
path: 'enterpriseManage',
|
||||
name: 'EnterpriseManage',
|
||||
meta: { title: '企业管理', hideChildren: true, icon: 'dicizhishou' },
|
||||
component: Base,
|
||||
redirect: { name: 'enterpriseManageIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'enterpriseManageIndex',
|
||||
component: () => import('/@/view/organizationManage/enterpriseManage/index.vue'),
|
||||
meta: {
|
||||
title: '企业管理',
|
||||
keepAlive: true,
|
||||
backApi: [
|
||||
{
|
||||
method: 'GET',
|
||||
url: '/api/objs/FeedbackWeb/feedBackList',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'userManage',
|
||||
name: 'UserManage',
|
||||
meta: { title: '用户管理', hideChildren: true, icon: 'dicizhishou' },
|
||||
meta: { title: '用户管理', hideChildren: true, icon: 'zuzhiguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'userManageIndex' },
|
||||
redirect: { name: 'UserManageIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'userManageIndex',
|
||||
name: 'UserManageIndex',
|
||||
component: () => import('/@/view/organizationManage/usermanage/index.vue'),
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
keepAlive: true,
|
||||
backApi: [
|
||||
{
|
||||
method: 'GET',
|
||||
url: '/api/objs/FeedbackWeb/feedBackList',
|
||||
},
|
||||
keepAlive: false,
|
||||
operates: [
|
||||
{ title: '新增', code: 'userAdd' },
|
||||
{ title: '导入', code: 'userImport' },
|
||||
{ title: '模板下载', code: 'userTemDownload' },
|
||||
{ title: '导出', code: 'userExports' },
|
||||
{ title: '批量删除', code: 'userBatchDel' },
|
||||
{ title: '编辑', code: 'userEdit' },
|
||||
{ title: '冻结', code: 'userFrozen' },
|
||||
{ title: '解冻', code: 'userUnFrozen' },
|
||||
{ title: '重置密码', code: 'userCodeReset' },
|
||||
{ title: '删除', code: 'userDelete' },
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -56,22 +38,26 @@ const organizationManage = {
|
||||
{
|
||||
path: 'authorityManage',
|
||||
name: 'AuthorityManage',
|
||||
meta: { title: '部门/权限', hideChildren: true, icon: 'dicizhishou' },
|
||||
meta: { title: '部门/权限', hideChildren: true, icon: 'zuzhiguanli' },
|
||||
component: Base,
|
||||
redirect: { name: 'authorityManageIndex' },
|
||||
redirect: { name: 'AuthorityManageIndex' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'authorityManageIndex',
|
||||
name: 'AuthorityManageIndex',
|
||||
component: () => import('/@/view/organizationManage/departmentManage/index.vue'),
|
||||
meta: {
|
||||
title: '部门/权限',
|
||||
keepAlive: true,
|
||||
backApi: [
|
||||
{
|
||||
method: 'GET',
|
||||
url: '/api/objs/FeedbackWeb/feedBackList',
|
||||
},
|
||||
keepAlive: false,
|
||||
operates: [
|
||||
{ title: '新增部门', code: 'authorityDeptAdd' },
|
||||
{ title: '新增子部门', code: 'authorityDeptSonAdd' },
|
||||
{ title: '删除部门', code: 'authorityDeptDelete' },
|
||||
{ title: '编辑部门', code: 'authorityDeptEdit' },
|
||||
{ title: '新增角色', code: 'authorityRoleAdd' },
|
||||
{ title: '新增子角色', code: 'authorityRoleSonAdd' },
|
||||
{ title: '删除角色', code: 'authorityRoleDelete' },
|
||||
{ title: '编辑角色', code: 'authorityRoleEdit' },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
// .ant-menu-dark.ant-menu-horizontal>.ant-menu-item:hover {
|
||||
// background-color: #43BB79 !important;
|
||||
// }
|
||||
|
||||
|
||||
.ant-menu-inline .ant-menu-item,
|
||||
.ant-menu-inline .ant-menu-submenu-title {
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.ns-basic-table .ant-btn:hover {
|
||||
@@ -46,17 +47,17 @@
|
||||
}
|
||||
|
||||
// header菜单字体样式
|
||||
.ant-menu-dark.ant-menu-horizontal>.ant-menu-item,
|
||||
.ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu {
|
||||
color: #fff;
|
||||
}
|
||||
// .ant-menu-dark.ant-menu-horizontal>.ant-menu-item,
|
||||
// .ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu {
|
||||
// color: #fff;
|
||||
// }
|
||||
|
||||
.ant-menu-dark .ant-menu-item,
|
||||
.ant-menu-dark .ant-menu-item-group-title,
|
||||
.ant-menu-dark .ant-menu-item>a,
|
||||
.ant-menu-dark .ant-menu-item>span>a {
|
||||
color: #fff;
|
||||
}
|
||||
// .ant-menu-dark .ant-menu-item,
|
||||
// .ant-menu-dark .ant-menu-item-group-title,
|
||||
// .ant-menu-dark .ant-menu-item>a,
|
||||
// .ant-menu-dark .ant-menu-item>span>a {
|
||||
// color: #fff;
|
||||
// }
|
||||
|
||||
@font-face {
|
||||
/*给字体命名*/
|
||||
@@ -111,13 +112,13 @@
|
||||
|
||||
.ant-menu-title-content {
|
||||
svg {
|
||||
color: #A1ABC2;
|
||||
// color: #A1ABC2;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-menu-item-selected {
|
||||
svg {
|
||||
color: #D0DBF5;
|
||||
// color: #D0DBF5;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,3 +182,7 @@
|
||||
background-color: #AEAEAE;
|
||||
}
|
||||
}
|
||||
|
||||
#app {
|
||||
min-width: 1200px;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @import "./global-antd.less";
|
||||
@primary-color: #ff7602; // 全局主色
|
||||
@layout-header-hover: #924908; //hover
|
||||
@layout-header-background: #111519; // 头部背景色
|
||||
// @primary-color: #ff7602; // 全局主色
|
||||
// @layout-header-hover: #924908; //hover
|
||||
// @layout-header-background: #111519; // 头部背景色
|
||||
// @layout-header-background:url(/asset/image/header_background.png) no-repeat;
|
||||
// @ant-layout-sider-collapsed-background:url(/asset/image/sider_collapsed_background.png) no-repeat;
|
||||
|
||||
|
||||
@@ -0,0 +1,524 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="box-top">
|
||||
<div v-for="index in 3" :key="index" class="box-top-item">
|
||||
<div class="item-box">
|
||||
<div class="item-box-left">
|
||||
<div class="item-box-left-title">设备告警 (今日处理 / 总数) </div>
|
||||
<div class="iem-box-left-number">
|
||||
10 / 13
|
||||
<span
|
||||
style="
|
||||
color: #04d919;
|
||||
font-size: 14px;
|
||||
margin-left: 5px;
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
"
|
||||
>+10%</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-box-right">
|
||||
<img width="48px" height="48px" src="../../../../src/icon/gaojingtonglan.svg" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 4; width: 100%; display: flex; gap: 5px">
|
||||
<div
|
||||
style="flex: 1; height: 100%; background-color: white; border-radius: 4px; padding: 12px">
|
||||
<div ref="echartPieOne" style="width: 100%; height: 100%"></div>
|
||||
</div>
|
||||
<div style="flex: 1; height: 100%; background-color: white; border-radius: 4px">
|
||||
<div ref="echartPieTow" style="width: 100%; height: 100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 告警矩形 echarts -->
|
||||
<div style="flex: 4; width: 100%; background-color: white; border-radius: 4px; padding: 12px">
|
||||
<div ref="graphChart" style="width: 100%; height: 100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue'; // 从 Vue 中导入 ref、onMounted 和 watchEffect
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
defineOptions({
|
||||
name: 'alarmOverviewIndex', // 与页面路由name一致缓存才可生效
|
||||
});
|
||||
|
||||
let chartInstance: echarts.ECharts | null = null;
|
||||
let chartInstanceOne: echarts.ECharts | null = null;
|
||||
let chartInstanceTow: echarts.ECharts | null = null;
|
||||
const graphChart = ref(null);
|
||||
const echartPieOne = ref(null);
|
||||
const echartPieTow = ref(null);
|
||||
const getGraphChart = () => {
|
||||
let dayData = [];
|
||||
// 能源告警
|
||||
let energyAlarm = [];
|
||||
// 网关告警
|
||||
let wgAlarm = [];
|
||||
// 设备告警
|
||||
let equipmentAlarm = [];
|
||||
let total = [];
|
||||
|
||||
// Extend data for 30 days
|
||||
for (let i = 1; i < 30; i++) {
|
||||
dayData.push(`3/${i}`);
|
||||
energyAlarm.push(Math.floor(Math.random() * 11)); // Assuming the same value for simplicity
|
||||
wgAlarm.push(Math.floor(Math.random() * 11)); // Assuming the same value for simplicity
|
||||
equipmentAlarm.push(Math.floor(Math.random() * 11)); // Assuming the same value for simplicity
|
||||
total.push(0); // Assuming the same value for simplicity
|
||||
}
|
||||
if (chartInstance) {
|
||||
chartInstance.dispose();
|
||||
}
|
||||
chartInstance = echarts.init(graphChart.value);
|
||||
const option = {
|
||||
title: {
|
||||
text: '告警趋势/ 近30天',
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
fontWeight: 'normal',
|
||||
color: '#aaaaaa',
|
||||
},
|
||||
left: '1%',
|
||||
top: '2%',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
},
|
||||
formatter: function (params) {
|
||||
let res =
|
||||
params[0].axisValue +
|
||||
'<br/>' +
|
||||
params[0].marker +
|
||||
' ' +
|
||||
params[0].seriesName +
|
||||
' : ' +
|
||||
params[0].data +
|
||||
'<br/>' +
|
||||
params[1].marker +
|
||||
' ' +
|
||||
params[1].seriesName +
|
||||
' : ' +
|
||||
params[1].data +
|
||||
'<br/>' +
|
||||
params[2].marker +
|
||||
' ' +
|
||||
params[2].seriesName +
|
||||
' : ' +
|
||||
params[2].data +
|
||||
'<br/>';
|
||||
return res;
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
left: '2%', // 设置图表距离左边的距离
|
||||
right: '2%', // 设置图表距离右边的距离
|
||||
borderWidth: 0,
|
||||
y2: 60, // 距离底边
|
||||
},
|
||||
legend: [
|
||||
{
|
||||
top: 5,
|
||||
left: 'center', // 将图例居中显示
|
||||
textStyle: {
|
||||
color: 'rgb(89, 89, 89)',
|
||||
fontSize: '14',
|
||||
fontWeight: 'normal',
|
||||
}, // 注意这里的颜色值要用引号括起来
|
||||
data: ['设备告警', '网关告警', '能源告警'],
|
||||
itemGap: 30, // 这里可以调整图例项之间的间距,单位为像素
|
||||
},
|
||||
],
|
||||
// toolbox: {
|
||||
// show: true,
|
||||
// feature: {
|
||||
// restore: {},
|
||||
// saveAsImage: {},
|
||||
// },
|
||||
// },
|
||||
calculable: true,
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
splitArea: {
|
||||
show: false,
|
||||
},
|
||||
data: dayData,
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
shwo: false,
|
||||
splitLine: {
|
||||
show: true,
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
splitArea: {
|
||||
show: false,
|
||||
},
|
||||
axisLabel: {
|
||||
show: false, // 不显示刻度值
|
||||
},
|
||||
},
|
||||
],
|
||||
dataZoom: [
|
||||
{
|
||||
height: 12,
|
||||
start: 0,
|
||||
end: 100,
|
||||
handleSize: '300%', // 设置滑块的大小
|
||||
bottom: 15,
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '能源告警',
|
||||
type: 'bar',
|
||||
stack: '能源告警',
|
||||
barMaxWidth: 40,
|
||||
barGap: '10%',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: 0,
|
||||
color: 'rgb(246, 189, 22)',
|
||||
},
|
||||
},
|
||||
data: energyAlarm,
|
||||
},
|
||||
{
|
||||
name: '网关告警',
|
||||
type: 'bar',
|
||||
stack: '能源告警',
|
||||
barMaxWidth: 40,
|
||||
barGap: '10%',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: 0,
|
||||
color: 'rgb(91, 143, 249)',
|
||||
},
|
||||
},
|
||||
data: wgAlarm,
|
||||
},
|
||||
{
|
||||
name: '设备告警',
|
||||
type: 'bar',
|
||||
stack: '能源告警',
|
||||
barMaxWidth: 40,
|
||||
barGap: '10%',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: 0,
|
||||
color: 'rgb(48, 191, 120)',
|
||||
},
|
||||
},
|
||||
data: equipmentAlarm,
|
||||
},
|
||||
{
|
||||
name: '总数',
|
||||
type: 'bar',
|
||||
stack: '能源告警',
|
||||
barMaxWidth: 40,
|
||||
barHight: 0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: 0,
|
||||
color: 'rgba(0,0,0,0)',
|
||||
},
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
color: '#000000',
|
||||
position: 'top',
|
||||
top: '10',
|
||||
formatter: function (value) {
|
||||
return (
|
||||
Number(energyAlarm[value.dataIndex]) +
|
||||
Number(wgAlarm[value.dataIndex]) +
|
||||
Number(equipmentAlarm[value.dataIndex])
|
||||
);
|
||||
},
|
||||
},
|
||||
data: total,
|
||||
},
|
||||
],
|
||||
};
|
||||
chartInstance = echarts.init(graphChart.value);
|
||||
chartInstance.setOption(option);
|
||||
};
|
||||
const getEchartPieOne = () => {
|
||||
if (chartInstanceOne) {
|
||||
chartInstanceOne.dispose();
|
||||
}
|
||||
chartInstanceOne = echarts.init(echartPieOne.value);
|
||||
var m2R2Data = [
|
||||
{ value: 335, name: '紧急', itemStyle: { color: '#F56E53' } },
|
||||
{ value: 310, name: '重要', itemStyle: { color: '#F7C122' } },
|
||||
{ value: 234, name: '一般', itemStyle: { color: '#3BC27F' } },
|
||||
];
|
||||
const option = {
|
||||
title: [
|
||||
{
|
||||
text: '优先级 / 近30天',
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
fontWeight: 'normal',
|
||||
color: '#aaaaaa',
|
||||
},
|
||||
left: '2%',
|
||||
top: '2%',
|
||||
},
|
||||
{
|
||||
text: '优先级',
|
||||
subtext: 12312 + '个',
|
||||
textStyle: {
|
||||
fontSize: 24,
|
||||
color: 'black',
|
||||
},
|
||||
subtextStyle: {
|
||||
fontSize: 24,
|
||||
fontWeight: '700',
|
||||
color: 'black',
|
||||
},
|
||||
textAlign: 'center',
|
||||
x: '44.3%',
|
||||
y: '43%',
|
||||
},
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: function (parms) {
|
||||
var str = parms.marker + ' :' + parms.data.value;
|
||||
return str;
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
// 设置图例靠右,上下居中,垂直排列
|
||||
right: 50,
|
||||
top: 'center',
|
||||
orient: 'vertical',
|
||||
// 图例图标设置为圆形
|
||||
icon: 'circle',
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
itemGap: 16,
|
||||
textStyle: {
|
||||
fontSize: 14,
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '优先级',
|
||||
type: 'pie',
|
||||
center: ['45%', '50%'],
|
||||
radius: ['50%', '70%'],
|
||||
clockwise: false, //饼图的扇区是否是顺时针排布
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: true,
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'outside',
|
||||
textStyle: {
|
||||
fontSize: 14,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
formatter: function (parms) {
|
||||
return '[ ' + parms.data.name + ' ] : ' + parms.data.value;
|
||||
},
|
||||
},
|
||||
},
|
||||
labelLine: {
|
||||
show: true, // 控制标签线是否显示
|
||||
length: 10, // 标签线长度
|
||||
length2: 0, // 标签线引出部分长度
|
||||
// 其他样式属性,如 lineStyle 等
|
||||
},
|
||||
data: m2R2Data,
|
||||
},
|
||||
],
|
||||
};
|
||||
chartInstanceOne = echarts.init(echartPieOne.value);
|
||||
chartInstanceOne.setOption(option);
|
||||
};
|
||||
const getEchartPieTow = () => {
|
||||
if (chartInstanceTow) {
|
||||
chartInstanceTow.dispose();
|
||||
}
|
||||
chartInstanceTow = echarts.init(echartPieTow.value);
|
||||
var m2R2Data = [
|
||||
{ value: 335, name: '紧急', itemStyle: { color: '#F56E53' } },
|
||||
{ value: 310, name: '重要', itemStyle: { color: '#F7C122' } },
|
||||
{ value: 234, name: '一般', itemStyle: { color: '#3BC27F' } },
|
||||
];
|
||||
const option = {
|
||||
title: [
|
||||
{
|
||||
text: '优先级 / 近30天',
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
fontWeight: 'normal',
|
||||
color: '#aaaaaa',
|
||||
},
|
||||
left: '2%',
|
||||
top: '2%',
|
||||
},
|
||||
{
|
||||
text: '优先级',
|
||||
subtext: 12312 + '个',
|
||||
textStyle: {
|
||||
fontSize: 24,
|
||||
color: 'black',
|
||||
},
|
||||
subtextStyle: {
|
||||
fontSize: 24,
|
||||
fontWeight: '700',
|
||||
color: 'black',
|
||||
},
|
||||
textAlign: 'center',
|
||||
x: '44.3%',
|
||||
y: '43%',
|
||||
},
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: function (parms) {
|
||||
var str = parms.marker + ' :' + parms.data.value;
|
||||
return str;
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
// 设置图例靠右,上下居中,垂直排列
|
||||
right: 50,
|
||||
top: 'center',
|
||||
orient: 'vertical',
|
||||
// 图例图标设置为圆形
|
||||
icon: 'circle',
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
itemGap: 16,
|
||||
textStyle: {
|
||||
fontSize: 14,
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '优先级',
|
||||
type: 'pie',
|
||||
center: ['45%', '50%'],
|
||||
radius: ['50%', '70%'],
|
||||
clockwise: false, //饼图的扇区是否是顺时针排布
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: true,
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'outside',
|
||||
textStyle: {
|
||||
fontSize: 14,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
formatter: function (parms) {
|
||||
return '[ ' + parms.data.name + ' ] : ' + parms.data.value;
|
||||
},
|
||||
},
|
||||
},
|
||||
labelLine: {
|
||||
show: true, // 控制标签线是否显示
|
||||
length: 10, // 标签线长度
|
||||
length2: 0, // 标签线引出部分长度
|
||||
// 其他样式属性,如 lineStyle 等
|
||||
},
|
||||
data: m2R2Data,
|
||||
},
|
||||
],
|
||||
};
|
||||
chartInstanceTow = echarts.init(echartPieTow.value);
|
||||
chartInstanceTow.setOption(option);
|
||||
};
|
||||
onMounted(() => {
|
||||
//渲染第三个图表
|
||||
getGraphChart();
|
||||
//优先级
|
||||
getEchartPieOne();
|
||||
getEchartPieTow();
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// border: 1px solid red;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
background-color: #f0f1f4;
|
||||
box-sizing: border-box;
|
||||
.box-top {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 5px;
|
||||
.box-top-item {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
gap: 5px;
|
||||
background-color: white;
|
||||
border-radius: 4px;
|
||||
padding: 20px;
|
||||
.item-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.item-box-left {
|
||||
flex: 9;
|
||||
height: 100%;
|
||||
padding: 0px !important;
|
||||
.item-box-left-title {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 14px;
|
||||
color: #aaaaaa;
|
||||
font-kerning: normal;
|
||||
font-family: '微软雅黑', sans-serif;
|
||||
}
|
||||
.iem-box-left-number {
|
||||
color: #000000;
|
||||
font-weight: 700;
|
||||
font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;
|
||||
font-style: normal;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
.item-box-right {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,341 @@
|
||||
<!-- 配置设备告警 -->
|
||||
<template>
|
||||
<ns-view-list-table v-if="show" ref="mainRef" class="table" v-bind="tableConfig">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'enableRules'">
|
||||
<a-switch
|
||||
:checked="record.enableRules === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': record.enableRules === 1 ? true : false,
|
||||
'grey-background': record.enableRules === 1 ? false : true,
|
||||
}"
|
||||
@click="clickSwitch({ enableRules: record.enableRules, record: record })" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'comparisonType'">
|
||||
{{ getcomparisonType(record) }}
|
||||
</template>
|
||||
</template>
|
||||
</ns-view-list-table>
|
||||
<!-- 新增or编辑界面 -->
|
||||
<editConfigureEnergyAlarm ref="editConfigureEnergyAlarms" @editObject="editObject" />
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { ref, createVNode } from 'vue';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { NsMessage, NsModal } from '/nerv-lib/component';
|
||||
import editConfigureEnergyAlarm from './editConfigureEnergyAlarm.vue';
|
||||
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { dict } from '/@/api';
|
||||
|
||||
export default {
|
||||
components: { editConfigureEnergyAlarm },
|
||||
|
||||
setup() {
|
||||
//能源告警配置
|
||||
const configureEnergyAlarmsData = ref({});
|
||||
const show = ref(false);
|
||||
const tableConfig = ref({});
|
||||
const mainRef = ref({});
|
||||
const editConfigureEnergyAlarms = ref({});
|
||||
//组织树
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
//获取对比类型
|
||||
const getcomparisonType = (data: any) => {
|
||||
let datas = data.comparisonType.split(',');
|
||||
if (datas[0] === '1') {
|
||||
switch (datas[1]) {
|
||||
case '1':
|
||||
return '数值>输入数值';
|
||||
case '2':
|
||||
return '数值>同比';
|
||||
case '3':
|
||||
return '数值>环比';
|
||||
case '4':
|
||||
return '数值>对比基准';
|
||||
}
|
||||
} else {
|
||||
switch (datas[1]) {
|
||||
case '1':
|
||||
return '比例>输入比例';
|
||||
case '2':
|
||||
return '比例>同比';
|
||||
case '3':
|
||||
return '比例>环比';
|
||||
case '4':
|
||||
return '比例>对比基准';
|
||||
}
|
||||
}
|
||||
};
|
||||
const clickSwitch = (data: any) => {
|
||||
NsModal.confirm({
|
||||
title: '启用状态',
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content: '确定' + (data.record.enableRules === 1 ? '关闭' : '启用') + '规则吗?',
|
||||
onOk: () => {
|
||||
http
|
||||
.post(energyAlarms.configAddOrUpNewData, {
|
||||
id: data.record.id,
|
||||
enableRules: data.record.enableRules === 1 ? 0 : 1,
|
||||
})
|
||||
.then(() => {
|
||||
NsMessage.success(data.record.enableRules === 1 ? '规则已关闭' : '规则已启用');
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
const doWnload = (url: any) => {
|
||||
const a = document.createElement('a');
|
||||
document.body.appendChild(a);
|
||||
a.href = encodeURI(url);
|
||||
//设置下载的文件名
|
||||
// a.download = fileName.value;
|
||||
//触发a标签的点击事件,进行下载
|
||||
a.click();
|
||||
};
|
||||
const setconfigureDeviceAlarmsData = (value: any) => {
|
||||
configureEnergyAlarmsData.value = value;
|
||||
show.value = true;
|
||||
tableConfig.value = {
|
||||
title: '告警规则',
|
||||
api: energyAlarms.configGetTableList,
|
||||
headerActions: [
|
||||
{
|
||||
label: '新增',
|
||||
name: 'configureEnergyAlarmAdd',
|
||||
type: 'primary',
|
||||
handle: () => {
|
||||
editConfigureEnergyAlarms.value.toggle(null, configureEnergyAlarmsData.value);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '导入',
|
||||
name: 'configureEnergyAlarmImport',
|
||||
type: 'primary',
|
||||
extra: {
|
||||
// api: props.postImportApi, // 导入接口名
|
||||
title: '设备信息', // 弹窗title
|
||||
templateName: 'whiteListUser', // 所使用的文件名称
|
||||
indexName: '设备id', // 匹配类型字段
|
||||
message: [
|
||||
{ label: '1、若必填项未填写,则不能进行导入操作' },
|
||||
{ label: `2、当重复时,则更新数据。` },
|
||||
{ label: '3、数据将从模版的第五行进行导入。' },
|
||||
{ label: '4、文件导入勿超过5MB。' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '导出',
|
||||
name: 'configureEnergyAlarmExports',
|
||||
type: 'primary',
|
||||
handle: () => {
|
||||
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '批量删除',
|
||||
type: 'primary',
|
||||
name: 'configureEnergyAlarmDels',
|
||||
confirm: true,
|
||||
dynamicDisabled: (data: any) => {
|
||||
return data.list.length === 0;
|
||||
},
|
||||
handle: (data: any) => {
|
||||
let ids = [];
|
||||
data.list.forEach((item) => {
|
||||
ids.push(item.id);
|
||||
});
|
||||
data.list = [];
|
||||
http.post(energyAlarms.configDel, { ids: ids.toString() }).then(() => {
|
||||
NsMessage.success('告警规则删除成功');
|
||||
//清空选中
|
||||
mainRef.value.nsTableRef.clearCheck();
|
||||
//刷新表单
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'address',
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '规则id',
|
||||
dataIndex: 'ruleId',
|
||||
},
|
||||
{
|
||||
title: '设备信息/节点信息',
|
||||
dataIndex: 'deviceInfo',
|
||||
},
|
||||
{
|
||||
title: '对比类型',
|
||||
dataIndex: 'comparisonType',
|
||||
},
|
||||
{
|
||||
title: '告警点位',
|
||||
dataIndex: 'devicePointName',
|
||||
},
|
||||
{
|
||||
title: '判断条件',
|
||||
dataIndex: 'conditionalJudgment',
|
||||
},
|
||||
{
|
||||
title: '异常描述',
|
||||
dataIndex: 'abnormalDescription',
|
||||
textEllipsis: true,
|
||||
},
|
||||
{
|
||||
title: '启用状态',
|
||||
dataIndex: 'enableRules',
|
||||
},
|
||||
],
|
||||
// rowSelection: null, 选择按钮
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
name: 'configureEnergyAlarmEdit',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
editConfigureEnergyAlarms.value.toggle(data, configureEnergyAlarmsData.value);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
name: 'configureEnergyAlarmDel',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
confirm: true,
|
||||
handle: (data: any) => {
|
||||
http.post(energyAlarms.configDel, { ids: data.id }).then(() => {
|
||||
NsMessage.success('告警规则删除成功');
|
||||
//刷新表单
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
formConfig: {
|
||||
title: value.errorCode,
|
||||
schemas: [
|
||||
{
|
||||
field: 'deviceName',
|
||||
label: '设备信息/节点信息',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入设备信息/节点信息关键字',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'dataSourcesType',
|
||||
label: '告警点位',
|
||||
component: 'nsSelectApi',
|
||||
// dynamicParams: {
|
||||
// id: 'deviceName', //帮定上级联动数据
|
||||
// },
|
||||
componentProps: {
|
||||
api: () => dict({ params: { dicKey: 'ENERGY_TYPE' } }),
|
||||
immediate: true,
|
||||
allowClear: true,
|
||||
labelField: 'cnValue',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择告警点位',
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.cnValue.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
// autoSelectFirst: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'enableRules',
|
||||
label: '启用状态',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请选择启用状态',
|
||||
options: [
|
||||
{
|
||||
label: '启用',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '关闭',
|
||||
value: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'abnormalDescription',
|
||||
label: '异常描述',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入异常描述关键字',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
params: { energyConsumptionAlarmId: value.id, orgId: orgId.value },
|
||||
// pagination: { pageSizeOptions: false },
|
||||
rowKey: 'id',
|
||||
};
|
||||
};
|
||||
// 编辑或添加成功 刷新列表
|
||||
const editObject = () => {
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
};
|
||||
return {
|
||||
configureEnergyAlarmsData,
|
||||
show,
|
||||
clickSwitch,
|
||||
doWnload,
|
||||
mainRef,
|
||||
editObject,
|
||||
getcomparisonType,
|
||||
orgId,
|
||||
tableConfig,
|
||||
editConfigureEnergyAlarms,
|
||||
setconfigureDeviceAlarmsData,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.blue-background.ant-switch-checked {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/energyAlarm
|
||||
@@ -0,0 +1,513 @@
|
||||
<template>
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="520"
|
||||
:title="infoObject?.id ? '编辑告警规则' : '新增告警规则'"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
:ok="btnClick"
|
||||
:cancel="handleClose"
|
||||
@close="handleClose"
|
||||
placement="right">
|
||||
<div style="padding: 18px; width: 100%; overflow: hidden">
|
||||
<a-form ref="formRef" :model="infoObject" :rules="rules">
|
||||
<a-form-item ref="site" label="站点" name="site">
|
||||
<a-tree-select
|
||||
v-model:value="infoObject.site"
|
||||
show-search
|
||||
style="width: 100%"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="请选择站点"
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="siteDataTree"
|
||||
:field-names="{
|
||||
children: 'linkList',
|
||||
label: 'orgName',
|
||||
value: 'orgId',
|
||||
}"
|
||||
:disabled="true"
|
||||
tree-node-filter-prop="orgName" />
|
||||
</a-form-item>
|
||||
<a-form-item label="数据来源" name="dataSources">
|
||||
<a-cascader
|
||||
v-model:value="infoObject.dataSources"
|
||||
:options="deviceTypeTreeData"
|
||||
:field-names="{
|
||||
children: 'children',
|
||||
label: 'cnValue',
|
||||
value: 'id',
|
||||
}"
|
||||
:show-search="{ filterDeviceType }"
|
||||
@change="selectDeviceType"
|
||||
placeholder="请选择数据来源" />
|
||||
</a-form-item>
|
||||
<a-form-item label="设备/节点" name="deviceNode">
|
||||
<a-tree-select
|
||||
v-model:value="infoObject.deviceNode"
|
||||
style="width: 100%"
|
||||
placeholder="请选择设备节点"
|
||||
:disabled="!infoObject.dataSources"
|
||||
:tree-line="true && { showLeafIcon: false }"
|
||||
:tree-data="jdTreeData"
|
||||
:field-names="{
|
||||
children: 'children',
|
||||
label:
|
||||
infoObject.dataSources && infoObject.dataSources[1] === 1
|
||||
? 'deviceName'
|
||||
: 'pointName',
|
||||
value:
|
||||
infoObject.dataSources && infoObject.dataSources[1] === 1 ? 'deviceInfoCode' : 'id',
|
||||
}" />
|
||||
</a-form-item>
|
||||
<a-form-item label="启用规则">
|
||||
<a-switch
|
||||
:checked="infoObject.enableRules === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': infoObject.enableRules === 1 ? true : false,
|
||||
'grey-background': infoObject.enableRules === 1 ? false : true,
|
||||
}"
|
||||
@click="clickSwitch" />
|
||||
</a-form-item>
|
||||
<a-form-item label="异常描述" name="abnormalDescription">
|
||||
<a-textarea
|
||||
v-model:value="infoObject.abnormalDescription"
|
||||
style="height: 32px"
|
||||
placeholder="请输入异常描述"
|
||||
:autoSize="{ minRows: 1, maxRows: 1 }"
|
||||
show-count
|
||||
:maxlength="30" />
|
||||
</a-form-item>
|
||||
<a-form-item label="规则类型" name="ruleType">
|
||||
<a-radio-group v-model:value="infoObject.ruleType">
|
||||
<a-radio value="1">且 (and) </a-radio>
|
||||
<a-radio value="2">或 (or) </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="对比类型" name="comparisonType">
|
||||
<a-cascader
|
||||
v-model:value="infoObject.comparisonType"
|
||||
:options="comparisonTypeData"
|
||||
:showSearch="false"
|
||||
placeholder="请选择对比类型" />
|
||||
</a-form-item>
|
||||
<template v-for="index in infoObject.alarmList?.length" :key="index">
|
||||
<div style="width: 100%; display: flex; margin-left: 42px; padding: 12px">
|
||||
<span style="line-height: 32px">{{ `逻辑${index}:` }}</span>
|
||||
<a-select
|
||||
v-model:value="infoObject.alarmList[index - 1].logic"
|
||||
style="width: 70px; margin-left: 12px"
|
||||
:options="logicEnum" />
|
||||
<span style="line-height: 32px; margin-left: 32px">{{ `数值${index}:` }}</span>
|
||||
<a-input
|
||||
style="width: 65px; margin-left: 6px"
|
||||
type="number"
|
||||
v-model:value="infoObject.alarmList[index - 1].num" />
|
||||
<div
|
||||
style="width: 70px; align-items: center; cursor: pointer"
|
||||
@click="deleteAlarmList(index - 1)">
|
||||
<img
|
||||
style="width: 14px; margin: 0 12px"
|
||||
src="https://files.axshare.com/gsc/4T0UQR/5a/e6/81/5ae6813d499c422383c7a15dd956523f/images/设备规则/u72.svg?pageId=cbce6e61-bc6a-4283-802d-993fce6151c0" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
infoObject.alarmList[index - 1]?.num === null ||
|
||||
infoObject.alarmList[index - 1]?.logic === null
|
||||
"
|
||||
style="width: 100%; color: #ff4d4f; text-align: center; margin-bottom: 5px">
|
||||
请选择正确的逻辑{{ index }} 或 输入正确的数值{{ index }}
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
v-if="infoObject.alarmList?.length < 2"
|
||||
style="width: 100%; color: #ff4d4f; text-align: center; margin-bottom: 5px">
|
||||
逻辑至少2条
|
||||
</div>
|
||||
<div style="width: 100%; margin-top: 12px; display: flex; justify-content: flex-end">
|
||||
<a-button type="primary" @click="addAlarmList"> 新增</a-button>
|
||||
</div>
|
||||
</a-form>
|
||||
</div>
|
||||
</ns-drawer>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { NsMessage } from '/nerv-lib/component';
|
||||
import { ref } from 'vue';
|
||||
import type { SelectProps } from 'ant-design-vue';
|
||||
import type { ShowSearchType } from 'ant-design-vue/es/cascader';
|
||||
import { device, group } from '/@/api/deviceManage';
|
||||
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { dict, getEnum } from '/@/api';
|
||||
|
||||
const visible = ref(false);
|
||||
//父级数据
|
||||
const energyAlarm = ref({});
|
||||
//组织数
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
//表单数据
|
||||
const infoObject = ref({
|
||||
id: null,
|
||||
site: null,
|
||||
deviceNode: null,
|
||||
ruleType: null,
|
||||
abnormalDescription: null,
|
||||
dataSources: null,
|
||||
enableRules: 0,
|
||||
alarmList: [{ id: null, logic: null, num: null, isDelete: 0 }],
|
||||
});
|
||||
const emit = defineEmits(['editObject']);
|
||||
//删除的逻辑列表
|
||||
const delAlarmList = ref([]);
|
||||
//对比类型
|
||||
const comparisonTypeData = ref([
|
||||
{
|
||||
value: '1',
|
||||
label: '数值',
|
||||
children: [
|
||||
{
|
||||
value: '1',
|
||||
label: '输入数值',
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '同比',
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '环比',
|
||||
},
|
||||
{
|
||||
value: '4',
|
||||
label: '对比基准',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '比例',
|
||||
children: [
|
||||
{
|
||||
value: '1',
|
||||
label: '输入比例',
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '同比',
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '环比',
|
||||
},
|
||||
{
|
||||
value: '4',
|
||||
label: '对比基准',
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
const formRef = ref();
|
||||
//站点数
|
||||
const siteDataTree = ref([]);
|
||||
//数据来源
|
||||
let deviceTypeTreeData = ref([]);
|
||||
//节点数据
|
||||
const jdTreeData = ref([]);
|
||||
//选择设备时 获取的数据
|
||||
// 选择 数据来源 查询 设备节点
|
||||
const selectDeviceType = async (value: any, selectedOptions: any) => {
|
||||
if (!infoObject.value.id) {
|
||||
infoObject.value.deviceNode = null;
|
||||
}
|
||||
if (value[value.length - 1] === 1) {
|
||||
//选择设备
|
||||
await http
|
||||
.post(device.queryDevicePage, {
|
||||
pageNum: 1,
|
||||
pageSize: 999,
|
||||
energyType: selectedOptions[0].dicKey,
|
||||
orgId: orgId.value,
|
||||
})
|
||||
.then((res) => {
|
||||
jdTreeData.value = res.data.records;
|
||||
});
|
||||
} else {
|
||||
//选择节点时 获取数据
|
||||
await http
|
||||
.post(group.queryDeviceGroupTree, {
|
||||
pageNum: 1,
|
||||
pageSize: 999,
|
||||
energyType: selectedOptions[0].dicKey,
|
||||
orgId: orgId.value,
|
||||
})
|
||||
.then((res) => {
|
||||
jdTreeData.value = res.data;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//搜索设备类型
|
||||
const filterDeviceType: ShowSearchType['filter'] = (inputValue: any, path: any) => {
|
||||
return path.some(
|
||||
(option: any) => option.cnValue.toLowerCase().indexOf(inputValue.toLowerCase()) > -1,
|
||||
);
|
||||
};
|
||||
//逻辑
|
||||
const logicEnum = ref<SelectProps['options']>([]);
|
||||
//开关
|
||||
const clickSwitch = () => {
|
||||
if (infoObject.value.enableRules === 1) {
|
||||
infoObject.value.enableRules = 0;
|
||||
} else {
|
||||
infoObject.value.enableRules = 1;
|
||||
}
|
||||
};
|
||||
//父调子 页面显示方法
|
||||
const toggle = async (value: any, info: any) => {
|
||||
let enumData = await getEnum({ params: { enumType: 'LogicEnum' } });
|
||||
logicEnum.value = enumData.data;
|
||||
// 数据来源
|
||||
let energyType = await dict({ params: { dicKey: 'ENERGY_TYPE' } });
|
||||
if (energyType.data.data) {
|
||||
energyType.data.data.forEach((item: any) => {
|
||||
item.children = [
|
||||
{
|
||||
id: 1,
|
||||
cnValue: '设备',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
cnValue: '节点',
|
||||
},
|
||||
];
|
||||
});
|
||||
deviceTypeTreeData.value = energyType.data.data;
|
||||
} else {
|
||||
deviceTypeTreeData.value = [];
|
||||
}
|
||||
|
||||
//能源告警
|
||||
energyAlarm.value = info;
|
||||
// 获取站点数据
|
||||
http.post('/carbon-smart/user/login/logInInfo', {}).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
siteDataTree.value = res.data.linkList;
|
||||
}
|
||||
});
|
||||
//判断 是新增 还是修改
|
||||
if (value) {
|
||||
await http.post(energyAlarms.configFindById, { id: value.id }).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
infoObject.value = res.data;
|
||||
// 拼凑成 修改回显形式
|
||||
infoObject.value.dataSources = [
|
||||
infoObject.value.dataSourcesType,
|
||||
infoObject.value.dataSourcesWay,
|
||||
];
|
||||
//设备节点
|
||||
if (infoObject.value.dataSourcesWay === 2) {
|
||||
infoObject.value.deviceNode = Number(infoObject.value.deviceNode);
|
||||
}
|
||||
delete infoObject.value.dataSourcesType;
|
||||
delete infoObject.value.dataSourcesWay;
|
||||
infoObject.value.comparisonType = infoObject.value.comparisonType.split(',');
|
||||
infoObject.value.ruleType = infoObject.value.ruleType + '';
|
||||
//枚举 需要重新赋值
|
||||
if (
|
||||
infoObject.value.hxAlarmRuleLogicList &&
|
||||
infoObject.value.hxAlarmRuleLogicList.length > 0
|
||||
) {
|
||||
infoObject.value.hxAlarmRuleLogicList.forEach((item: any) => {
|
||||
item.logic = item.logic.value;
|
||||
});
|
||||
}
|
||||
infoObject.value.alarmList = infoObject.value.hxAlarmRuleLogicList || [];
|
||||
delete infoObject.value.hxAlarmRuleLogicList;
|
||||
//获取设备/节点
|
||||
|
||||
if (deviceTypeTreeData && deviceTypeTreeData.value.length > 0) {
|
||||
deviceTypeTreeData.value.forEach((item: any) => {
|
||||
if (item.id === infoObject.value.dataSources[0]) {
|
||||
selectDeviceType(infoObject.value.dataSources, [{ ...item }]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
infoObject.value = {
|
||||
id: null,
|
||||
site: null,
|
||||
deviceNode: null,
|
||||
ruleType: null,
|
||||
abnormalDescription: null,
|
||||
dataSources: null,
|
||||
enableRules: 0,
|
||||
alarmList: [{ id: null, logic: null, num: null, isDelete: 0 }],
|
||||
};
|
||||
infoObject.value.site = orgId.value;
|
||||
}
|
||||
visible.value = !visible.value;
|
||||
};
|
||||
//表单 判断规格
|
||||
const rules = {
|
||||
site: [{ required: true, message: '请选择站点', trigger: 'change' }],
|
||||
dataSources: [{ required: true, message: '请选择设备类型', trigger: 'change' }],
|
||||
deviceNode: [{ required: true, message: '请选择设备名称', trigger: 'change' }],
|
||||
sbAdress: [{ required: true, message: '请选择设备点位', trigger: 'change' }],
|
||||
comparisonType: [{ required: true, message: '请选择对比类型', trigger: 'change' }],
|
||||
ruleType: [{ required: true, message: '请选择规则类型', trigger: 'change' }],
|
||||
abnormalDescription: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入异常描述',
|
||||
trigger: 'blur',
|
||||
validator: (rules: any, abnormalDescription: any, cbfn: any) => {
|
||||
if (abnormalDescription && abnormalDescription.trim() !== '') {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('告警标题不能为空');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
// 确认按钮
|
||||
const btnClick = () => {
|
||||
infoObject.value.alarmList.forEach((item) => {
|
||||
if (item.logic === null || item.num === null) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (infoObject.value.alarmList.length < 2) {
|
||||
NsMessage.error('请选择逻辑和数值');
|
||||
return;
|
||||
}
|
||||
//数据是否验证通过
|
||||
formRef.value.validate().then(() => {
|
||||
//处理数据
|
||||
let data = { ...infoObject.value };
|
||||
if (!data.orgId) {
|
||||
data.orgId = orgId.value;
|
||||
}
|
||||
//关联能耗告警id
|
||||
data.energyConsumptionAlarmId = energyAlarm.value.id;
|
||||
data.errorCode = energyAlarm.value.errorCode;
|
||||
data.dataSourcesType = data.dataSources[0];
|
||||
data.dataSourcesWay = data.dataSources[1];
|
||||
delete data.dataSources;
|
||||
data.hxAlarmRuleLogicList = [...infoObject.value.alarmList, ...delAlarmList.value];
|
||||
data.comparisonType = data.comparisonType.toString();
|
||||
data.hxAlarmRuleLogicList.forEach((item) => {
|
||||
const num = Number(item.num);
|
||||
if (!isNaN(num)) {
|
||||
item.num = Number(num.toFixed(2));
|
||||
} else {
|
||||
item.num = 0; // 可以设置为0或其他默认值
|
||||
}
|
||||
});
|
||||
data.ruleType = Number(data.ruleType);
|
||||
delete data.alarmList;
|
||||
http
|
||||
.post(energyAlarms.configAddOrUpNewData, data)
|
||||
.then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
// 操作成功时的处理
|
||||
if (data.id) {
|
||||
NsMessage.success('告警规则编辑成功');
|
||||
} else {
|
||||
NsMessage.success('告警规则新增成功');
|
||||
}
|
||||
emit('editObject', null);
|
||||
handleClose();
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
// 错误处理
|
||||
console.error('请求失败:', error);
|
||||
});
|
||||
});
|
||||
};
|
||||
//取消按钮
|
||||
const handleClose = () => {
|
||||
// 清楚校验错误信息
|
||||
formRef.value.resetFields();
|
||||
//对象清空
|
||||
infoObject.value = {
|
||||
id: null,
|
||||
site: null,
|
||||
ruleType: null,
|
||||
deviceNode: null,
|
||||
abnormalDescription: null,
|
||||
dataSources: null,
|
||||
enableRules: 0,
|
||||
alarmList: [{ id: null, logic: null, num: null, isDelete: 0 }],
|
||||
};
|
||||
visible.value = false;
|
||||
delAlarmList.value = [];
|
||||
};
|
||||
// 新增逻辑列表
|
||||
const addAlarmList = () => {
|
||||
if (infoObject.value.alarmList) {
|
||||
infoObject.value.alarmList.push({ id: null, logic: null, num: null, isDelete: 0 });
|
||||
} else {
|
||||
infoObject.value.alarmList = [{ id: null, logic: null, num: null, isDelete: 0 }];
|
||||
}
|
||||
};
|
||||
// 删除 逻辑列表、
|
||||
const deleteAlarmList = (index: number) => {
|
||||
if (index < infoObject.value.alarmList.length && index >= 0) {
|
||||
const alarmItemToDelete = infoObject.value.alarmList[index];
|
||||
if (alarmItemToDelete?.id) {
|
||||
// 添加到 delAlarmList 中,并标记为已删除
|
||||
delAlarmList.value.push({ ...alarmItemToDelete, isDelete: 1 });
|
||||
}
|
||||
// 从 infoObject 中删除该元素
|
||||
infoObject.value.alarmList.splice(index, 1);
|
||||
}
|
||||
};
|
||||
defineExpose({
|
||||
toggle,
|
||||
handleClose,
|
||||
formRef,
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.drawerContainer {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.blue-background.ant-switch-checked {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
}
|
||||
:deep(.ant-form-item-label) {
|
||||
z-index: 20;
|
||||
text-align: right;
|
||||
width: 23%;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/energyAlarm
|
||||
@@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="520"
|
||||
:title="' '"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
:ok="btnClick"
|
||||
:cancel="handleClose"
|
||||
placement="right"
|
||||
@close="handleClose">
|
||||
<a-form ref="formRef" :model="infoObject" :rules="rules">
|
||||
<a-form-item name="alarmTitle" label="告警标题">
|
||||
<ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" />
|
||||
</a-form-item>
|
||||
<a-form-item label="告警频率" name="alarmFrequency">
|
||||
<a-select
|
||||
v-model:value="infoObject.alarmFrequency"
|
||||
placeholder="请选择告警频率"
|
||||
style="width: 100%"
|
||||
allowClear
|
||||
:options="AlarmFrequencyEnum"
|
||||
@change="handleChangeAlarmFrequency" />
|
||||
</a-form-item>
|
||||
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
|
||||
<ns-input-number v-model:value="infoObject.repetitions" placeholder="请输入重复次数" />
|
||||
</a-form-item>
|
||||
<a-form-item v-if="infoObject.alarmFrequency === 2" name="intervalDuration" label="间隔时长">
|
||||
<ns-input-number
|
||||
style="width: 100%"
|
||||
v-model:value="infoObject.intervalDuration"
|
||||
placeholder="请输入间隔时长">
|
||||
<template #addonAfter>
|
||||
<a-select
|
||||
v-model:value="infoObject.intervalDurationUnit"
|
||||
placeholder="请选择间隔时长单位"
|
||||
style="width: 80px"
|
||||
allowClear
|
||||
:options="intervalDurationUnitData" />
|
||||
</template>
|
||||
</ns-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="优先级" name="priority">
|
||||
<a-select
|
||||
v-model:value="infoObject.priority"
|
||||
placeholder="请选择优先级"
|
||||
style="width: 100%"
|
||||
allowClear
|
||||
:options="PriorityEnum" />
|
||||
</a-form-item>
|
||||
<a-form-item label="监测频率" name="monitorFrequency">
|
||||
<a-select
|
||||
v-model:value="infoObject.monitorFrequency"
|
||||
placeholder="请选择监测频率"
|
||||
style="width: 100%"
|
||||
allowClear
|
||||
:options="MonitorFrequencyEnumm" />
|
||||
</a-form-item>
|
||||
<a-form-item label="启用规则">
|
||||
<a-switch
|
||||
:checked="infoObject?.enableRules === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': infoObject?.enableRules === 1 ? true : false,
|
||||
'grey-background': infoObject?.enableRules === 1 ? false : true,
|
||||
}"
|
||||
style="margin-left: 6px"
|
||||
@change="changeSwitch" />
|
||||
</a-form-item>
|
||||
<a-form-item label="是否创建工单" name="createWorkOrder">
|
||||
<a-radio-group v-model:value="infoObject.createWorkOrder">
|
||||
<a-radio value="1">是 </a-radio>
|
||||
<a-radio value="0">否 </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</ns-drawer>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { NsMessage } from '/nerv-lib/component';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
|
||||
import { getAllEnum } from '/@/api';
|
||||
|
||||
const visible = ref(false);
|
||||
// 间隔单位 默认值
|
||||
const handleChangeAlarmFrequency = () => {
|
||||
if (infoObject.value.alarmFrequency === 2 && !infoObject.value.intervalDurationUnit) {
|
||||
infoObject.value.intervalDurationUnit = 1;
|
||||
}
|
||||
};
|
||||
//组织id
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
|
||||
//表单数据
|
||||
const infoObject = ref({
|
||||
alarmTitle: null,
|
||||
alarmFrequency: null,
|
||||
priority: null,
|
||||
monitorFrequency: null,
|
||||
createWorkOrder: null,
|
||||
orgId: null,
|
||||
enableRules: 0,
|
||||
});
|
||||
const formRef = ref();
|
||||
const emit = defineEmits(['editObject']);
|
||||
//告警频率 优先级 监测频率
|
||||
const AlarmFrequencyEnum = ref([]);
|
||||
const PriorityEnum = ref([]);
|
||||
const intervalDurationUnitData = ref([]);
|
||||
const MonitorFrequencyEnumm = ref([]);
|
||||
const rules = {
|
||||
alarmTitle: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入告警标题',
|
||||
trigger: 'change',
|
||||
validator: (rules: any, alarmTitle: any, cbfn: any) => {
|
||||
if (alarmTitle && alarmTitle.trim() !== '') {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('告警标题不能为空');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
alarmFrequency: [{ required: true, message: '请选择告警频率', trigger: 'change' }],
|
||||
intervalDuration: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入正确的间隔时长',
|
||||
trigger: 'change',
|
||||
validator: (rules: any, intervalDuration: any, cbfn: any) => {
|
||||
if (intervalDuration && intervalDuration > 0) {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('请输入正确的间隔时长');
|
||||
}
|
||||
if (!infoObject.value.intervalDurationUnit) {
|
||||
cbfn('请选择间隔时长单位');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
repetitions: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入正确的重复次数',
|
||||
trigger: 'change',
|
||||
validator: (rules: any, repetitions: any, cbfn: any) => {
|
||||
if (repetitions && repetitions > 0) {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('请输入正确的重复次数');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
createWorkOrder: [{ required: true, message: '请选择是否创建工单', trigger: 'change' }],
|
||||
monitorFrequency: [{ required: true, message: '请选择监测频率', trigger: 'change' }],
|
||||
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
|
||||
monitorTimeUnit: [{ required: true, message: '请选择监测时长单位', trigger: 'change' }],
|
||||
};
|
||||
const getMenu = async () => {
|
||||
let enumData = await getAllEnum({
|
||||
params: [
|
||||
'PriorityEnum',
|
||||
'MonitorFrequencyEnumm',
|
||||
'AlarmFrequencyEnum',
|
||||
'IntervalDurationUnitEnum',
|
||||
],
|
||||
});
|
||||
PriorityEnum.value = enumData.data.PriorityEnum;
|
||||
MonitorFrequencyEnumm.value = enumData.data.MonitorFrequencyEnumm;
|
||||
AlarmFrequencyEnum.value = enumData.data.AlarmFrequencyEnum;
|
||||
intervalDurationUnitData.value = enumData.data.IntervalDurationUnitEnum;
|
||||
};
|
||||
const toggle = (value: any) => {
|
||||
//获取枚举 回显
|
||||
getMenu();
|
||||
//判断 是新增 还是修改
|
||||
if (value) {
|
||||
infoObject.value = value;
|
||||
} else {
|
||||
infoObject.value = {
|
||||
orgId: null,
|
||||
alarmTitle: null,
|
||||
alarmFrequency: null,
|
||||
priority: null,
|
||||
monitorFrequency: null,
|
||||
createWorkOrder: null,
|
||||
enableRules: 0,
|
||||
};
|
||||
}
|
||||
visible.value = !visible.value;
|
||||
};
|
||||
//开关
|
||||
const changeSwitch = () => {
|
||||
switch (infoObject.value.enableRules) {
|
||||
case 1:
|
||||
infoObject.value.enableRules = 0;
|
||||
break;
|
||||
case 0:
|
||||
infoObject.value.enableRules = 1;
|
||||
break;
|
||||
}
|
||||
};
|
||||
const btnClick = () => {
|
||||
//表单校验
|
||||
formRef.value.validate().then(() => {
|
||||
let data = { ...infoObject.value };
|
||||
if (!data.orgId) {
|
||||
data.orgId = orgId.value;
|
||||
}
|
||||
data.createWorkOrder = Number(data.createWorkOrder);
|
||||
if (data.alarmFrequency !== 2) {
|
||||
data.repetitions = null;
|
||||
data.intervalDuration = null;
|
||||
data.intervalDurationUnit = null;
|
||||
}
|
||||
//调用接口
|
||||
http.post(energyAlarms.addOrUpNewData, data).then(() => {
|
||||
emit('editObject', null);
|
||||
if (infoObject.value.id) {
|
||||
NsMessage.success('告警编辑成功');
|
||||
} else {
|
||||
NsMessage.success('告警创建成功');
|
||||
}
|
||||
handleClose();
|
||||
});
|
||||
});
|
||||
};
|
||||
const handleClose = () => {
|
||||
// 清楚校验错误信息
|
||||
formRef.value.resetFields();
|
||||
infoObject.value = {
|
||||
alarmTitle: null,
|
||||
alarmFrequency: null,
|
||||
priority: null,
|
||||
monitorFrequency: null,
|
||||
createWorkOrder: null,
|
||||
enableRules: 0,
|
||||
};
|
||||
visible.value = false;
|
||||
};
|
||||
defineExpose({
|
||||
toggle,
|
||||
handleClose,
|
||||
formRef,
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.drawerContainer {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.blue-background.ant-switch-checked {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
}
|
||||
:deep(.ant-form-item-label) {
|
||||
z-index: 20;
|
||||
text-align: right;
|
||||
width: 23%;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/energyAlarm
|
||||
@@ -0,0 +1,327 @@
|
||||
<!-- 配置设备告警 -->
|
||||
<template>
|
||||
<ns-view-list-table v-if="show" ref="mainRef" class="table" v-bind="tableConfig">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'enableRules'">
|
||||
<a-switch
|
||||
:checked="record.enableRules === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': record.enableRules === 1 ? true : false,
|
||||
'grey-background': record.enableRules === 1 ? false : true,
|
||||
}"
|
||||
@click="clickSwitch({ enableRules: record.enableRules, record: record })" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'valueType'">
|
||||
{{ record.valueType.label }}
|
||||
</template>
|
||||
</template>
|
||||
</ns-view-list-table>
|
||||
<!-- 新增or编辑界面 -->
|
||||
<editConfigureDeviceAlarm ref="editConfigureDeviceAlarms" @editObject="editObject" />
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { ref, createVNode } from 'vue';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { NsMessage, NsModal } from '/nerv-lib/component';
|
||||
import editConfigureDeviceAlarm from '../equipmentAlarm/editConfigureDeviceAlarm.vue';
|
||||
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { device } from '/@/api/deviceManage';
|
||||
|
||||
export default {
|
||||
components: { editConfigureDeviceAlarm },
|
||||
|
||||
setup() {
|
||||
//设备告警数据
|
||||
const configureDeviceAlarmsData = ref({});
|
||||
const show = ref(false);
|
||||
const tableConfig = ref({});
|
||||
const mainRef = ref({});
|
||||
const editConfigureDeviceAlarms = ref({});
|
||||
//组织数
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
// 改变状态
|
||||
const clickSwitch = (data: any) => {
|
||||
NsModal.confirm({
|
||||
title: '启用状态',
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content: '确定' + (data.record.enableRules === 1 ? '关闭' : '启用') + '规则吗?',
|
||||
onOk: () => {
|
||||
http
|
||||
.post(deviceAlarms.configAddOrUpNewData, {
|
||||
id: data.record.id,
|
||||
enableRules: data.record.enableRules === 1 ? 0 : 1,
|
||||
})
|
||||
.then(() => {
|
||||
NsMessage.success(data.record.enableRules === 1 ? '规则已关闭' : '规则已启用');
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
// 编辑或添加成功 刷新列表
|
||||
const editObject = () => {
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
};
|
||||
const doWnload = (url: any) => {
|
||||
const a = document.createElement('a');
|
||||
document.body.appendChild(a);
|
||||
a.href = encodeURI(url);
|
||||
//设置下载的文件名
|
||||
// a.download = fileName.value;
|
||||
//触发a标签的点击事件,进行下载
|
||||
a.click();
|
||||
};
|
||||
const setconfigureDeviceAlarmsData = (value: any) => {
|
||||
configureDeviceAlarmsData.value = value;
|
||||
show.value = true;
|
||||
tableConfig.value = {
|
||||
title: '告警规则',
|
||||
api: deviceAlarms.configGetTableList,
|
||||
headerActions: [
|
||||
{
|
||||
label: '新增',
|
||||
name: 'configureEquipmentAlarmAdd',
|
||||
type: 'primary',
|
||||
handle: () => {
|
||||
editConfigureDeviceAlarms.value.toggle(null, configureDeviceAlarmsData.value);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '导入',
|
||||
name: 'configureEquipmentAlarmImport',
|
||||
type: 'primary',
|
||||
extra: {
|
||||
// api: props.postImportApi, // 导入接口名
|
||||
title: '设备信息', // 弹窗title
|
||||
templateName: 'whiteListUser', // 所使用的文件名称
|
||||
indexName: '设备id', // 匹配类型字段
|
||||
message: [
|
||||
{ label: '1、若必填项未填写,则不能进行导入操作' },
|
||||
{ label: `2、当重复时,则更新数据。` },
|
||||
{ label: '3、数据将从模版的第五行进行导入。' },
|
||||
{ label: '4、文件导入勿超过5MB。' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '导出',
|
||||
name: 'configureEquipmentAlarmExports',
|
||||
type: 'primary',
|
||||
handle: () => {
|
||||
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '批量删除',
|
||||
name: 'configureEquipmentAlarmDels',
|
||||
type: 'primary',
|
||||
confirm: true,
|
||||
dynamicDisabled: (data: any) => {
|
||||
return data.list.length === 0;
|
||||
},
|
||||
handle: (data: any) => {
|
||||
let ids = [];
|
||||
data.list.forEach((item) => {
|
||||
ids.push(item.id);
|
||||
});
|
||||
data.list = [];
|
||||
http.post(deviceAlarms.configDel, { ids: ids.toString() }).then(() => {
|
||||
NsMessage.success('告警规则删除成功');
|
||||
//清空选中
|
||||
mainRef.value.nsTableRef.clearCheck();
|
||||
//刷新表单
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'address',
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '规则id',
|
||||
dataIndex: 'ruleId',
|
||||
},
|
||||
{
|
||||
title: '设备信息',
|
||||
dataIndex: 'deviceInfo',
|
||||
},
|
||||
{
|
||||
title: '告警点位',
|
||||
dataIndex: 'devicePointName',
|
||||
},
|
||||
{
|
||||
title: '判断条件',
|
||||
dataIndex: 'conditionalJudgment',
|
||||
},
|
||||
{
|
||||
title: '取值类型',
|
||||
dataIndex: 'valueType',
|
||||
},
|
||||
{
|
||||
title: '异常描述',
|
||||
dataIndex: 'abnormalDescription',
|
||||
},
|
||||
{
|
||||
title: '启用状态',
|
||||
dataIndex: 'enableRules',
|
||||
},
|
||||
],
|
||||
// rowSelection: null, 选择按钮
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
name: 'configureEquipmentAlarmEdit',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
editConfigureDeviceAlarms.value.toggle(data, configureDeviceAlarmsData);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
name: 'configureEquipmentAlarmDel',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
confirm: true,
|
||||
handle: (data: any) => {
|
||||
http.post(deviceAlarms.configDel, { ids: data.id }).then(() => {
|
||||
NsMessage.success('告警规则删除成功');
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
formConfig: {
|
||||
title: value.errorCode,
|
||||
schemas: [
|
||||
{
|
||||
field: 'deviceInfoCode',
|
||||
label: '设备名称',
|
||||
component: 'nsSelectApi',
|
||||
componentProps: {
|
||||
api: device.queryDevicePage,
|
||||
allowClear: true,
|
||||
params: {
|
||||
orgId: orgId.value,
|
||||
pageNum: 1,
|
||||
pageSize: 99,
|
||||
},
|
||||
placeholder: '请选择设备名称',
|
||||
resultField: 'data.records',
|
||||
labelField: 'deviceName',
|
||||
valueField: 'deviceInfoCode',
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
autoAddLink: true, //默认添加联动
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'devicePoint',
|
||||
label: '设备点位',
|
||||
component: 'nsSelectApi',
|
||||
dynamicParams: {
|
||||
deviceCode: 'deviceInfoCode', //帮定上级联动数据
|
||||
},
|
||||
componentProps: {
|
||||
api: device.queryDevicePoint,
|
||||
allowClear: true,
|
||||
resultField: 'data',
|
||||
placeholder: '请选择设备点位',
|
||||
labelField: 'code',
|
||||
valueField: 'id',
|
||||
dependency: 'deviceInfoCode',
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.code.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'enableRules',
|
||||
label: '启用状态',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
placeholder: '请选择启用状态',
|
||||
allowClear: true,
|
||||
options: [
|
||||
{
|
||||
label: '启用',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '关闭',
|
||||
value: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'abnormalDescription',
|
||||
label: '异常描述',
|
||||
component: 'NsInput',
|
||||
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入异常描述关键字',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
params: { equipmentAlarmId: value.id, orgId: orgId.value },
|
||||
// pagination: { pageSizeOptions: false },
|
||||
rowKey: 'id',
|
||||
};
|
||||
};
|
||||
return {
|
||||
configureDeviceAlarmsData,
|
||||
show,
|
||||
clickSwitch,
|
||||
doWnload,
|
||||
tableConfig,
|
||||
orgId,
|
||||
mainRef,
|
||||
editObject,
|
||||
editConfigureDeviceAlarms,
|
||||
setconfigureDeviceAlarmsData,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.blue-background.ant-switch-checked {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/deviceAlarms
|
||||
@@ -0,0 +1,538 @@
|
||||
<template>
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="520"
|
||||
:title="infoObject?.id ? '编辑告警规则' : '新增告警规则'"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
:ok="btnClick"
|
||||
:cancel="handleClose"
|
||||
placement="right"
|
||||
@close="handleClose">
|
||||
<div style="padding: 18px; width: 100%; overflow: hidden">
|
||||
<a-form ref="formRef" :model="infoObject" :rules="rules">
|
||||
<a-form-item ref="site" label="站点" name="site">
|
||||
<a-tree-select
|
||||
v-model:value="infoObject.site"
|
||||
show-search
|
||||
style="width: 100%"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="请选择站点"
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:field-names="{
|
||||
children: 'linkList',
|
||||
label: 'orgName',
|
||||
value: 'orgId',
|
||||
}"
|
||||
:tree-data="siteDataTree"
|
||||
:disabled="true"
|
||||
tree-node-filter-prop="orgName" />
|
||||
</a-form-item>
|
||||
<a-form-item label="设备类型" name="deviceType">
|
||||
<a-cascader
|
||||
v-model:value="infoObject.deviceType"
|
||||
:options="deviceTypeTreeData"
|
||||
:field-names="{
|
||||
children: 'children',
|
||||
label: 'deviceType',
|
||||
value: 'id',
|
||||
}"
|
||||
:show-search="{ filterDeviceType }"
|
||||
@change="selectDeviceType"
|
||||
placeholder="请选择设备类型" />
|
||||
</a-form-item>
|
||||
<a-form-item label="设备名称" name="deviceInfoCode">
|
||||
<a-select
|
||||
v-model:value="infoObject.deviceInfoCode"
|
||||
:disabled="!(infoObject && infoObject.deviceType && infoObject.deviceType.length > 0)"
|
||||
style="width: 100%"
|
||||
:autoClearSearchValue="true"
|
||||
allow-clear
|
||||
@change="selectDevice"
|
||||
placeholder="请选择设备名称">
|
||||
<template v-for="(item, index) in deviceNameTreeData" :key="index">
|
||||
<a-select-option :value="item.deviceInfoCode">
|
||||
{{ item.deviceName }}
|
||||
</a-select-option>
|
||||
</template>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="设备点位" name="devicePoint">
|
||||
<a-select
|
||||
v-model:value="infoObject.devicePoint"
|
||||
show-search
|
||||
:autoClearSearchValue="true"
|
||||
allow-clear
|
||||
placeholder="请选择设备点位"
|
||||
style="width: 100%"
|
||||
:disabled="!infoObject?.deviceInfoCode"
|
||||
:options="devicePointData"
|
||||
:filter-option="filterDevicePoint" />
|
||||
</a-form-item>
|
||||
<a-form-item label="启用规则">
|
||||
<a-switch
|
||||
:checked="infoObject.enableRules === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': infoObject.enableRules === 1 ? true : false,
|
||||
'grey-background': infoObject.enableRules === 1 ? false : true,
|
||||
}"
|
||||
@click="clickSwitch" />
|
||||
</a-form-item>
|
||||
<a-form-item label="取值类型" name="valueType">
|
||||
<a-select
|
||||
v-model:value="infoObject.valueType"
|
||||
placeholder="请选择取值类型"
|
||||
allow-clear
|
||||
style="width: 100%"
|
||||
:options="valueTypeEnum" />
|
||||
</a-form-item>
|
||||
<a-form-item label="异常描述" name="abnormalDescription">
|
||||
<a-textarea
|
||||
v-model:value="infoObject.abnormalDescription"
|
||||
style="height: 32px"
|
||||
placeholder="请输入异常描述"
|
||||
:autoSize="{ minRows: 1, maxRows: 1 }"
|
||||
show-count
|
||||
:maxlength="30" />
|
||||
</a-form-item>
|
||||
<a-form-item label="规则类型" name="ruleType">
|
||||
<a-radio-group v-model:value="infoObject.ruleType">
|
||||
<a-radio value="1">且 (and) </a-radio>
|
||||
<a-radio value="2">或 (or) </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<template v-for="index in infoObject.alarmList?.length" :key="index">
|
||||
<div
|
||||
style="
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin-left: 42px;
|
||||
padding: 12px;
|
||||
border-color: #ff4d4f !important;
|
||||
">
|
||||
<span style="line-height: 32px">{{ `逻辑${index}:` }}</span>
|
||||
<a-select
|
||||
v-model:value="infoObject.alarmList[index - 1].logic"
|
||||
style="width: 70px; margin-left: 12px"
|
||||
:options="logicEnum" />
|
||||
<span style="line-height: 32px; margin-left: 32px">{{ `数值${index}:` }}</span>
|
||||
<a-input
|
||||
style="width: 65px; margin-left: 6px"
|
||||
type="number"
|
||||
status="error"
|
||||
v-model:value="infoObject.alarmList[index - 1].num" />
|
||||
<div
|
||||
style="width: 70px; align-items: center; cursor: pointer"
|
||||
@click="deleteAlarmList(index - 1)">
|
||||
<img
|
||||
style="width: 14px; margin: 0 12px"
|
||||
src="https://files.axshare.com/gsc/4T0UQR/5a/e6/81/5ae6813d499c422383c7a15dd956523f/images/设备规则/u72.svg?pageId=cbce6e61-bc6a-4283-802d-993fce6151c0" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
infoObject.alarmList[index - 1]?.num === null ||
|
||||
infoObject.alarmList[index - 1]?.logic === null
|
||||
"
|
||||
style="width: 100%; color: #ff4d4f; text-align: center; margin-bottom: 5px">
|
||||
请选择正确的逻辑{{ index }} 或 输入正确的数值{{ index }}
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
v-if="infoObject?.alarmList?.length < 2"
|
||||
style="width: 100%; color: #ff4d4f; text-align: center; margin-bottom: 5px">
|
||||
逻辑至少2条
|
||||
</div>
|
||||
<div style="width: 100%; margin-top: 12px; display: flex; justify-content: flex-end">
|
||||
<a-button type="primary" @click="addAlarmList"> 新增</a-button>
|
||||
</div>
|
||||
</a-form>
|
||||
</div>
|
||||
</ns-drawer>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { NsMessage } from '/nerv-lib/component';
|
||||
import { ref } from 'vue';
|
||||
import type { SelectProps } from 'ant-design-vue';
|
||||
import type { ShowSearchType } from 'ant-design-vue/es/cascader';
|
||||
import { device } from '/@/api/deviceManage';
|
||||
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { getAllEnum } from '/@/api';
|
||||
|
||||
const visible = ref(false);
|
||||
// 父级数据
|
||||
const equipmentAlarm = ref({});
|
||||
//表单数据
|
||||
const infoObject = ref({
|
||||
site: null,
|
||||
ruleType: null,
|
||||
abnormalDescription: null,
|
||||
deviceType: [],
|
||||
devicePoint: null,
|
||||
valueType: null,
|
||||
deviceInfoCode: null,
|
||||
enableRules: 0,
|
||||
alarmList: [{ logic: null, num: null, isDelete: 0 }],
|
||||
});
|
||||
//删除的逻辑列表
|
||||
const delAlarmList = ref([]);
|
||||
const formRef = ref();
|
||||
//组织数
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
//站点数
|
||||
const siteDataTree = ref([]);
|
||||
|
||||
//设备类型树
|
||||
let deviceTypeTreeData = ref([]);
|
||||
//设备树
|
||||
let deviceNameTreeData = ref([]);
|
||||
//选择设备类型方法
|
||||
const selectDeviceType = (value: any, selectedOptions: any) => {
|
||||
infoObject.value.deviceInfoCode = null;
|
||||
if (selectedOptions && selectedOptions.length > 0) {
|
||||
//获取该类型设备
|
||||
getDevicePage({
|
||||
orgId: orgId.value,
|
||||
deviceCode: selectedOptions[selectedOptions.length - 1].code,
|
||||
pageNum: 1,
|
||||
pageSize: 999,
|
||||
});
|
||||
}
|
||||
};
|
||||
//选择设备方法
|
||||
const selectDevice = () => {
|
||||
getDevicePoint({ deviceCode: infoObject.value.deviceInfoCode });
|
||||
};
|
||||
//获取设备列表
|
||||
const getDevicePage = (value: any) => {
|
||||
http.post(device.queryDevicePage, value).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
deviceNameTreeData.value = res.data.records;
|
||||
}
|
||||
});
|
||||
};
|
||||
//获取设备点位
|
||||
const getDevicePoint = (value: any) => {
|
||||
devicePointData.value = [];
|
||||
http.post(device.queryDevicePoint, value).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
res.data.forEach((item: any) => {
|
||||
//显示格式
|
||||
devicePointData.value.push({
|
||||
value: item.id,
|
||||
label: item.code + ' ( ' + item.unit + ' ) ',
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
//设备点位
|
||||
const devicePointData = ref([]);
|
||||
//设备点位搜索
|
||||
const filterDevicePoint = (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
//搜索设备类型
|
||||
const filterDeviceType: ShowSearchType['filter'] = (inputValue: any, path: any) => {
|
||||
return path.some(
|
||||
(option: any) => option.deviceType.toLowerCase().indexOf(inputValue.toLowerCase()) > -1,
|
||||
);
|
||||
};
|
||||
//取值类型
|
||||
const valueTypeEnum = ref<SelectProps['options']>();
|
||||
//逻辑
|
||||
const logicEnum = ref<SelectProps['options']>([]);
|
||||
|
||||
//开关
|
||||
const clickSwitch = () => {
|
||||
if (infoObject.value.enableRules === 1) {
|
||||
infoObject.value.enableRules = 0;
|
||||
} else {
|
||||
infoObject.value.enableRules = 1;
|
||||
}
|
||||
};
|
||||
const emit = defineEmits(['editObject']);
|
||||
|
||||
// 定义一个递归函数来查找每一级的id 设备类型回显 层级方法
|
||||
function findParentIds(tree: any[], targetId: number, result: number[]): boolean {
|
||||
for (let item of tree) {
|
||||
if (item.children && item.children.length > 0) {
|
||||
if (item.children.some((child: any) => child.id === targetId)) {
|
||||
result.unshift(item.id); // 将当前节点的id添加到结果数组的最前面
|
||||
return true; // 表示找到了目标节点的父节点
|
||||
}
|
||||
// 递归查找当前节点的子节点
|
||||
if (findParentIds(item.children, targetId, result)) {
|
||||
result.unshift(item.id); // 递归返回后,将当前节点的id添加到结果数组的最前面
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false; // 没有找到目标节点
|
||||
}
|
||||
// 递归 获取当前 选择的设备类型 对象 用来获取设备列表
|
||||
const findNodeById = (nodes: any, id: any) => {
|
||||
for (let node of nodes) {
|
||||
if (node.id === id) {
|
||||
//获取设备树
|
||||
getDevicePage({ orgId: orgId.value, code: node.code, pageNum: 1, pageSize: 99 });
|
||||
return;
|
||||
} else if (node.children.length > 0) {
|
||||
const found = findNodeById(node.children, id);
|
||||
if (found) {
|
||||
//获取设备树
|
||||
getDevicePage({ orgId: orgId.value, code: found.code, pageNum: 1, pageSize: 99 });
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null; // 没有找到目标节点,返回 null
|
||||
};
|
||||
const getMenu = async () => {
|
||||
let enumData = await getAllEnum({ params: ['LogicEnum', 'ValueTypeEnum'] });
|
||||
logicEnum.value = enumData.data.LogicEnum;
|
||||
valueTypeEnum.value = enumData.data.ValueTypeEnum;
|
||||
};
|
||||
//父调子 页面显示方法
|
||||
const toggle = async (value: any, info: any) => {
|
||||
equipmentAlarm.value = info;
|
||||
//获取枚举 回显
|
||||
getMenu();
|
||||
//获取设备类型
|
||||
await http
|
||||
.post(device.queryDeviceTree, { orgId: orgId.value, pageNum: 1, pageSize: 10 })
|
||||
.then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
deviceTypeTreeData.value = res.data;
|
||||
}
|
||||
});
|
||||
// 获取站点数据
|
||||
http.post('/carbon-smart/user/login/logInInfo', {}).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
siteDataTree.value = res.data.linkList;
|
||||
}
|
||||
});
|
||||
//判断 是新增 还是修改
|
||||
if (value) {
|
||||
//获取详情接口
|
||||
await http.post(deviceAlarms.configFindById, { id: value.id }).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
infoObject.value = res.data;
|
||||
// 获取 选择的设备类型对象
|
||||
let selectDevice = ref([Number(infoObject.value.deviceType)]);
|
||||
findNodeById(deviceTypeTreeData.value, Number(infoObject.value.deviceType));
|
||||
//获取设备点位
|
||||
getDevicePoint({ deviceCode: infoObject.value.deviceInfoCode });
|
||||
// 回显 选择设备类型
|
||||
findParentIds(
|
||||
deviceTypeTreeData.value,
|
||||
Number(infoObject.value.deviceType),
|
||||
selectDevice.value,
|
||||
);
|
||||
//枚举 需要重新赋值
|
||||
if (
|
||||
infoObject.value.hxAlarmRuleLogicList &&
|
||||
infoObject.value.hxAlarmRuleLogicList.length > 0
|
||||
) {
|
||||
infoObject.value.hxAlarmRuleLogicList.forEach((item: any) => {
|
||||
item.logic = item.logic.value;
|
||||
});
|
||||
}
|
||||
infoObject.value.valueType = infoObject.value.valueType.value;
|
||||
infoObject.value.alarmList = infoObject.value.hxAlarmRuleLogicList || [];
|
||||
delete infoObject.value.hxAlarmRuleLogicList;
|
||||
// 回显 格式化
|
||||
infoObject.value.deviceType = selectDevice;
|
||||
|
||||
//数据类型转换
|
||||
infoObject.value.ruleType = infoObject.value.ruleType + '';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//获取设备树
|
||||
infoObject.value = {
|
||||
site: null,
|
||||
ruleType: null,
|
||||
abnormalDescription: null,
|
||||
deviceType: [],
|
||||
devicePoint: null,
|
||||
valueType: null,
|
||||
deviceInfoCode: null,
|
||||
enableRules: 0,
|
||||
alarmList: [{ logic: null, num: null, isDelete: 0 }],
|
||||
};
|
||||
infoObject.value.site = orgId.value;
|
||||
}
|
||||
|
||||
visible.value = !visible.value;
|
||||
};
|
||||
//表单 判断规格
|
||||
const rules = {
|
||||
site: [{ required: true, message: '请选择站点', trigger: 'change' }],
|
||||
deviceType: [{ required: true, message: '请选择设备类型', trigger: 'change' }],
|
||||
enableRules: [{ required: true, message: '请选择启用规则', trigger: 'change' }],
|
||||
deviceInfoCode: [{ required: true, message: '请选择设备名称', trigger: 'change' }],
|
||||
devicePoint: [{ required: true, message: '请选择设备点位', trigger: 'change' }],
|
||||
valueType: [{ required: true, message: '请选择取值类型', trigger: 'change' }],
|
||||
ruleType: [{ required: true, message: '请选择规则类型', trigger: 'change' }],
|
||||
abnormalDescription: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入异常描述',
|
||||
trigger: 'blur',
|
||||
validator: (rules: any, abnormalDescription: any, cbfn: any) => {
|
||||
if (abnormalDescription && abnormalDescription.trim() !== '') {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('告警标题不能为空');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
alarm: [{ required: true, message: '请选择逻辑', trigger: 'blur' }],
|
||||
number: [{ required: true, message: '请输入数值', trigger: 'blur' }],
|
||||
};
|
||||
// 确认按钮
|
||||
const btnClick = () => {
|
||||
infoObject.value.devicePoint = 1;
|
||||
infoObject.value.alarmList.forEach((item) => {
|
||||
if (item.logic === null || item.num === null) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (infoObject.value.alarmList.length < 2) {
|
||||
NsMessage.error('请选择逻辑和数值');
|
||||
return;
|
||||
}
|
||||
//数据是否验证通过
|
||||
formRef.value.validate().then(() => {
|
||||
let data = { ...infoObject.value };
|
||||
if (!data.orgId) {
|
||||
data.orgId = orgId.value;
|
||||
}
|
||||
// 配置关联id
|
||||
data.equipmentAlarmId = equipmentAlarm.value.id;
|
||||
// 逻辑列表
|
||||
data.hxAlarmRuleLogicList = [...infoObject.value.alarmList, ...delAlarmList.value];
|
||||
data.hxAlarmRuleLogicList.forEach((item) => {
|
||||
const num = Number(item.num);
|
||||
if (!isNaN(num)) {
|
||||
item.num = Number(num.toFixed(2));
|
||||
} else {
|
||||
item.num = 0; // 可以设置为0或其他默认值
|
||||
}
|
||||
});
|
||||
// 设备类型 只取最后一级的id
|
||||
data.deviceType = infoObject.value.deviceType[infoObject.value.deviceType.length - 1];
|
||||
data.ruleType = Number(data.ruleType);
|
||||
data.errorCode = equipmentAlarm.value.errorCode;
|
||||
delete data.alarmList;
|
||||
// 发起 HTTP POST 请求
|
||||
http
|
||||
.post(deviceAlarms.configAddOrUpNewData, data)
|
||||
.then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
// 操作成功时的处理
|
||||
if (data.id) {
|
||||
NsMessage.success('告警规则编辑成功');
|
||||
} else {
|
||||
NsMessage.success('告警规则新增成功');
|
||||
}
|
||||
emit('editObject', null);
|
||||
handleClose();
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
// 错误处理
|
||||
console.error('请求失败:', error);
|
||||
});
|
||||
});
|
||||
};
|
||||
//取消按钮
|
||||
const handleClose = () => {
|
||||
// 清楚校验错误信息
|
||||
formRef.value.resetFields();
|
||||
siteDataTree.value = [];
|
||||
//对象清空
|
||||
infoObject.value = {
|
||||
site: null,
|
||||
ruleType: null,
|
||||
abnormalDescription: null,
|
||||
deviceType: [],
|
||||
devicePoint: null,
|
||||
valueType: null,
|
||||
deviceInfoCode: null,
|
||||
enableRules: 0,
|
||||
alarmList: [{ logic: null, num: null, isDelete: 0 }],
|
||||
};
|
||||
visible.value = false;
|
||||
//清空删除列表
|
||||
delAlarmList.value = [];
|
||||
};
|
||||
// 新增逻辑列表
|
||||
const addAlarmList = () => {
|
||||
if (infoObject.value.alarmList) {
|
||||
infoObject.value.alarmList.push({ logic: null, num: null, isDelete: 0 });
|
||||
} else {
|
||||
infoObject.value.alarmList = [{ logic: null, num: null, isDelete: 0 }];
|
||||
}
|
||||
};
|
||||
// 删除 逻辑列表、
|
||||
const deleteAlarmList = (index: number) => {
|
||||
// 确保 index 在有效范围内
|
||||
if (index < infoObject.value.alarmList.length && index >= 0) {
|
||||
const alarmItemToDelete = infoObject.value.alarmList[index];
|
||||
// 判断删除的 是否在数据库中
|
||||
if (alarmItemToDelete?.id) {
|
||||
// 添加到 delAlarmList 中,并标记为已删除
|
||||
delAlarmList.value.push({ ...alarmItemToDelete, isDelete: 1 });
|
||||
}
|
||||
// 从 infoObject 中删除该元素
|
||||
infoObject.value.alarmList.splice(index, 1);
|
||||
}
|
||||
};
|
||||
defineExpose({
|
||||
toggle,
|
||||
handleClose,
|
||||
formRef,
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.drawerContainer {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.blue-background.ant-switch-checked {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
}
|
||||
:deep(.ant-form-item-label) {
|
||||
z-index: 20;
|
||||
text-align: right;
|
||||
width: 23%;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/deviceAlarms
|
||||
@@ -0,0 +1,348 @@
|
||||
<template>
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="520"
|
||||
:title="infoObject?.id ? '编辑告警' : '新增告警'"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
:ok="btnClick"
|
||||
:cancel="handleClose"
|
||||
placement="right"
|
||||
@close="handleClose">
|
||||
<a-form ref="formRef" :model="infoObject" :rules="rules">
|
||||
<a-form-item name="alarmTitle" label="告警标题">
|
||||
<ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" />
|
||||
</a-form-item>
|
||||
<a-form-item name="monitorTime" label="监测时长">
|
||||
<ns-input-number
|
||||
allowClear
|
||||
v-model:value="infoObject.monitorTime"
|
||||
placeholder="请输入监测时长" />
|
||||
</a-form-item>
|
||||
<a-form-item label="监测时长单位" name="monitorTimeUnit">
|
||||
<a-select
|
||||
v-model:value="infoObject.monitorTimeUnit"
|
||||
placeholder="请选择监测时长单位"
|
||||
style="width: 100%"
|
||||
allowClear
|
||||
:options="MonitorTimeUnitEnum" />
|
||||
</a-form-item>
|
||||
<a-form-item label="告警频率" name="alarmFrequency">
|
||||
<a-select
|
||||
v-model:value="infoObject.alarmFrequency"
|
||||
placeholder="请选择告警频率"
|
||||
style="width: 100%"
|
||||
allowClear
|
||||
:options="AlarmFrequencyEnum"
|
||||
@change="handleChangeAlarmFrequency" />
|
||||
</a-form-item>
|
||||
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
|
||||
<ns-input-number v-model:value="infoObject.repetitions" placeholder="请输入重复次数" />
|
||||
</a-form-item>
|
||||
<a-form-item v-if="infoObject.alarmFrequency === 2" name="intervalDuration" label="间隔时长">
|
||||
<ns-input-number
|
||||
style="width: 100%"
|
||||
v-model:value="infoObject.intervalDuration"
|
||||
placeholder="请输入间隔时长">
|
||||
<template #addonAfter>
|
||||
<a-select
|
||||
v-model:value="infoObject.intervalDurationUnit"
|
||||
placeholder="请选择间隔时长单位"
|
||||
style="width: 80px"
|
||||
allowClear
|
||||
:options="IntervalDurationUnitEnum" />
|
||||
</template>
|
||||
</ns-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="优先级" name="priority">
|
||||
<a-select
|
||||
v-model:value="infoObject.priority"
|
||||
placeholder="请选择优先级"
|
||||
style="width: 100%"
|
||||
allowClear
|
||||
:options="PriorityEnum" />
|
||||
</a-form-item>
|
||||
<a-form-item label="启用规则">
|
||||
<a-switch
|
||||
:checked="infoObject?.enableRules === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': infoObject?.enableRules === 1 ? true : false,
|
||||
'grey-background': infoObject?.enableRules === 1 ? false : true,
|
||||
}"
|
||||
style="margin-left: 6px"
|
||||
@change="changeSwitch" />
|
||||
</a-form-item>
|
||||
<a-form-item label="是否创建工单" name="createWorkOrder">
|
||||
<a-radio-group v-model:value="infoObject.createWorkOrder">
|
||||
<a-radio value="1">是 </a-radio>
|
||||
<a-radio value="0">否 </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</ns-drawer>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { NsMessage } from '/nerv-lib/component';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
|
||||
import { getAllEnum } from '/@/api';
|
||||
|
||||
const visible = ref(false);
|
||||
//组织id
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
//表单数据
|
||||
const infoObject = ref({
|
||||
id: null,
|
||||
alarmTitle: null,
|
||||
alarmFrequency: null,
|
||||
monitorTime: null,
|
||||
monitorTimeUnit: null,
|
||||
priority: null,
|
||||
createWorkOrder: null,
|
||||
intervalDurationUnit: null,
|
||||
repetitions: null,
|
||||
intervalDuration: null,
|
||||
enableRules: 0,
|
||||
});
|
||||
const formRef = ref();
|
||||
const emit = defineEmits(['editObject']);
|
||||
const AlarmFrequencyEnum = ref([]);
|
||||
const MonitorTimeUnitEnum = ref([]);
|
||||
const IntervalDurationUnitEnum = ref([]);
|
||||
const PriorityEnum = ref([]);
|
||||
const getMenu = async () => {
|
||||
let enumData = await getAllEnum({
|
||||
params: [
|
||||
'PriorityEnum',
|
||||
'MonitorTimeUnitEnum',
|
||||
'AlarmFrequencyEnum',
|
||||
'IntervalDurationUnitEnum',
|
||||
],
|
||||
});
|
||||
PriorityEnum.value = enumData.data.PriorityEnum;
|
||||
MonitorTimeUnitEnum.value = enumData.data.MonitorTimeUnitEnum;
|
||||
AlarmFrequencyEnum.value = enumData.data.AlarmFrequencyEnum;
|
||||
IntervalDurationUnitEnum.value = enumData.data.IntervalDurationUnitEnum;
|
||||
};
|
||||
const toggle = (value: any) => {
|
||||
//获取枚举 回显
|
||||
getMenu();
|
||||
//判断 是新增 还是修改
|
||||
if (value) {
|
||||
infoObject.value = value;
|
||||
} else {
|
||||
infoObject.value = {
|
||||
id: null,
|
||||
alarmTitle: null,
|
||||
alarmFrequency: null,
|
||||
monitorTime: null,
|
||||
monitorTimeUnit: null,
|
||||
priority: null,
|
||||
createWorkOrder: null,
|
||||
intervalDurationUnit: null,
|
||||
repetitions: null,
|
||||
intervalDuration: null,
|
||||
enableRules: 0,
|
||||
};
|
||||
}
|
||||
visible.value = !visible.value;
|
||||
};
|
||||
// 间隔单位 默认值
|
||||
const handleChangeAlarmFrequency = () => {
|
||||
if (infoObject.value.alarmFrequency === 2 && !infoObject.value.intervalDurationUnit) {
|
||||
infoObject.value.intervalDurationUnit = 1;
|
||||
}
|
||||
};
|
||||
//表单 判断规格
|
||||
const rules = {
|
||||
alarmTitle: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入告警标题',
|
||||
trigger: 'change',
|
||||
validator: (rules: any, alarmTitle: any, cbfn: any) => {
|
||||
if (alarmTitle && alarmTitle.trim() !== '') {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('告警标题不能为空');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
alarmFrequency: [{ required: true, message: '请选择告警频率', trigger: 'change' }],
|
||||
monitorTime: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'change',
|
||||
validator: (rules: any, monitorTime: any, cbfn: any) => {
|
||||
if (Number.isInteger(monitorTime) && monitorTime > 0) {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('请输入正确的监测时长');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
intervalDuration: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'change',
|
||||
validator: (rules: any, intervalDuration: any, cbfn: any) => {
|
||||
if (
|
||||
Number.isInteger(intervalDuration) &&
|
||||
intervalDuration > 0 &&
|
||||
infoObject.value.intervalDurationUnit
|
||||
) {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('请输入正确的间隔时长');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
repetitions: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'change',
|
||||
validator: (rules: any, repetitions: any, cbfn: any) => {
|
||||
if (Number.isInteger(repetitions) && repetitions > 0) {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('请输入正确的重复次数');
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
createWorkOrder: [{ required: true, message: '请选择是否创建工单', trigger: 'change' }],
|
||||
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
|
||||
monitorTimeUnit: [{ required: true, message: '请选择监测时长单位', trigger: 'change' }],
|
||||
};
|
||||
//开关
|
||||
const changeSwitch = () => {
|
||||
switch (infoObject.value.enableRules) {
|
||||
case 1:
|
||||
infoObject.value.enableRules = 0;
|
||||
break;
|
||||
case 0:
|
||||
infoObject.value.enableRules = 1;
|
||||
break;
|
||||
}
|
||||
};
|
||||
const btnClick = () => {
|
||||
//表单校验
|
||||
formRef.value.validate().then(() => {
|
||||
// 告警频率重复时 都换成分钟 比较 监测时长 和 间隔时长 重复次数 * 间隔 <= 监测
|
||||
if (infoObject.value.alarmFrequency === 2) {
|
||||
// 监测时长
|
||||
let monitorTime = 0;
|
||||
switch (infoObject.value.monitorTimeUnit) {
|
||||
case 1:
|
||||
monitorTime = Number(infoObject.value.monitorTime) * 1;
|
||||
break;
|
||||
case 2:
|
||||
monitorTime = Number(infoObject.value.monitorTime) * 60;
|
||||
break;
|
||||
case 3:
|
||||
monitorTime = Number(infoObject.value.monitorTime) * 60 * 24;
|
||||
break;
|
||||
}
|
||||
// 间隔时长
|
||||
let intervalTime = 0;
|
||||
switch (infoObject.value.intervalDurationUnit) {
|
||||
case 1:
|
||||
intervalTime =
|
||||
Number(infoObject.value.intervalDuration) * 1 * Number(infoObject.value.repetitions);
|
||||
break;
|
||||
case 2:
|
||||
intervalTime =
|
||||
Number(infoObject.value.intervalDuration) * 60 * Number(infoObject.value.repetitions);
|
||||
break;
|
||||
case 3:
|
||||
intervalTime =
|
||||
Number(infoObject.value.intervalDuration) *
|
||||
60 *
|
||||
24 *
|
||||
Number(infoObject.value.repetitions);
|
||||
break;
|
||||
}
|
||||
if (intervalTime > monitorTime) {
|
||||
NsMessage.error(
|
||||
'间隔时长超过了告警监测周期的最大值。请设置1分钟到' +
|
||||
infoObject.value.monitorTime +
|
||||
['分', '小时', '天'][infoObject.value.monitorTimeUnit - 1] +
|
||||
'之间的间隔时长',
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
//调用接口
|
||||
let data = { ...infoObject.value };
|
||||
data.createWorkOrder = Number(data.createWorkOrder);
|
||||
if (data.alarmFrequency !== 2) {
|
||||
data.repetitions = null;
|
||||
data.intervalDuration = null;
|
||||
data.intervalDurationUnit = null;
|
||||
}
|
||||
if (!data.orgId) {
|
||||
data.orgId = orgId.value;
|
||||
}
|
||||
http.post(deviceAlarms.addOrUpNewData, data).then(() => {
|
||||
if (infoObject.value.id) {
|
||||
NsMessage.success('告警编辑成功');
|
||||
} else {
|
||||
NsMessage.success('告警创建成功');
|
||||
}
|
||||
visible.value = false;
|
||||
emit('editObject', null);
|
||||
});
|
||||
});
|
||||
};
|
||||
const handleClose = () => {
|
||||
// 清楚校验错误信息
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
defineExpose({
|
||||
toggle,
|
||||
handleClose,
|
||||
formRef,
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.drawerContainer {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.blue-background.ant-switch-checked {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
}
|
||||
:deep(.ant-form-item-label) {
|
||||
z-index: 20;
|
||||
text-align: right;
|
||||
width: 23%;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/deviceAlarms
|
||||
@@ -0,0 +1,344 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<a-tabs default-active-key="1">
|
||||
<a-tab-pane key="1" tab="通知管理">
|
||||
<ns-view-list-table v-bind="notificationConfig" ref="mainRef">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'enableNotifications'">
|
||||
<a-switch
|
||||
:checked="record.enableNotifications === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': record.enableNotifications === 1 ? true : false,
|
||||
'grey-background': record.enableNotifications === 1 ? false : true,
|
||||
}"
|
||||
@change="
|
||||
clickSwitch({ type: 1, enableRules: record.enableRules, record: record })
|
||||
" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'prioritys'">
|
||||
{{ record.priority ? record.priority.label : '' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'notificationMethod'">
|
||||
{{ getNotificationMethod(record.notificationMethod) }}
|
||||
</template>
|
||||
</template>
|
||||
</ns-view-list-table>
|
||||
<!-- 联系方式 -->
|
||||
<notificationManagement ref="notificationManagements" @updNotification="updNotification" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="设备告警" force-render>
|
||||
<ns-view-list-table
|
||||
v-show="equipmentAlarm"
|
||||
ref="mainRefEquipmentAlarm"
|
||||
class="table"
|
||||
v-bind="equipmentAlarmConfig">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'enableRules'">
|
||||
<a-switch
|
||||
:checked="record.enableRules === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': record.enableRules === 1 ? true : false,
|
||||
'grey-background': record.enableRules === 1 ? false : true,
|
||||
}"
|
||||
@change="
|
||||
clickSwitch({ type: 2, enableRules: record.enableRules, record: record })
|
||||
" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'monitor'">
|
||||
{{
|
||||
record.monitorTime && record.monitorTimeUnit
|
||||
? record.monitorTime + '' + record.monitorTimeUnit.label
|
||||
: ''
|
||||
}}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'prioritys'">
|
||||
{{ record.priority ? record.priority.label : '' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'alarmFrequency'">
|
||||
{{ record.alarmFrequency ? record.alarmFrequency.label : '' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'repetitions'">
|
||||
{{
|
||||
record.repetitions && record.alarmFrequency.value === 2 ? record.repetitions : '-'
|
||||
}}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'interval'">
|
||||
{{
|
||||
record.intervalDuration && record.alarmFrequency.value === 2
|
||||
? record.intervalDuration + '' + record.intervalDurationUnit.label
|
||||
: '-'
|
||||
}}
|
||||
</template>
|
||||
</template>
|
||||
</ns-view-list-table>
|
||||
<a-button
|
||||
v-if="!equipmentAlarm"
|
||||
type="primary"
|
||||
style="position: absolute; right: 130px; z-index: 3; top: 80px; height: 30px"
|
||||
@click="backequipmentAlarm"
|
||||
>返回</a-button
|
||||
>
|
||||
<!-- 新增 或 编辑 设备告警 -->
|
||||
<editeEquipmentAlarm ref="editEquipmentAlarm" @editObject="editObject" />
|
||||
<!-- 配置设备告警-->
|
||||
<configureDeviceAlarms v-show="!equipmentAlarm" ref="configureDeviceAlarms" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="能源告警">
|
||||
<ns-view-list-table
|
||||
v-bind="energyAlarmConfig"
|
||||
v-show="energyAlarm"
|
||||
ref="mainEnergyAlarmConfig"
|
||||
class="table">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'enableRules'">
|
||||
<a-switch
|
||||
:checked="record.enableRules === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': record.enableRules === 1 ? true : false,
|
||||
'grey-background': record.enableRules === 1 ? false : true,
|
||||
}"
|
||||
@click="
|
||||
clickSwitch({ type: 3, enableRules: record.enableRules, record: record })
|
||||
" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'monitorFrequency'">
|
||||
{{ record.monitorFrequency.label }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'alarmFrequency'">
|
||||
{{ record.alarmFrequency ? record.alarmFrequency.label : '' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'priority'">
|
||||
{{ record.priority ? record.priority.label : '' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'repetitions'">
|
||||
{{
|
||||
record.repetitions && record.alarmFrequency.value === 2 ? record.repetitions : '-'
|
||||
}}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'interval'">
|
||||
{{
|
||||
record.intervalDuration && record.alarmFrequency.value === 2
|
||||
? record.intervalDuration + '' + record.intervalDurationUnit.label
|
||||
: '-'
|
||||
}}
|
||||
</template>
|
||||
</template>
|
||||
</ns-view-list-table>
|
||||
<a-button
|
||||
v-if="!energyAlarm"
|
||||
type="primary"
|
||||
style="position: absolute; right: 130px; z-index: 3; top: 80px; height: 30px"
|
||||
@click="backenergyAlarm"
|
||||
>返回</a-button
|
||||
>
|
||||
<!-- 新增 或 编辑 能源告警 -->
|
||||
<editeEnergyAlarm ref="editeEnergyAlarm" @editObject="editeEnergyAlarmInfo" />
|
||||
<!-- 配置能源告警-->
|
||||
<configureEnergyAlarms v-show="!energyAlarm" ref="configureEnergyAlarms" />
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { notificationtableConfig } from './ts/notificationManagementConfig';
|
||||
import { equipmentAlarmTableConfig } from './ts/equipmentAlarmConfig';
|
||||
import { energyAlarmConfigs } from './ts/energyAlarmConfig';
|
||||
import { ref, createVNode } from 'vue';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { NsMessage, NsModal } from '/nerv-lib/component';
|
||||
import editeEquipmentAlarm from './equipmentAlarm/editeEquipmentAlarm.vue';
|
||||
import editeEnergyAlarm from './energyAlarm/editeEnergyAlarm.vue';
|
||||
import notificationManagement from './notificationManagement/index.vue';
|
||||
import configureEnergyAlarms from './energyAlarm/configureEnergyAlarms.vue';
|
||||
import configureDeviceAlarms from './equipmentAlarm/configureDeviceAlarms.vue';
|
||||
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
|
||||
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements';
|
||||
|
||||
export default {
|
||||
name: 'AlarmSettingsIndex',
|
||||
components: {
|
||||
editeEquipmentAlarm,
|
||||
configureDeviceAlarms,
|
||||
configureEnergyAlarms,
|
||||
notificationManagement,
|
||||
editeEnergyAlarm,
|
||||
},
|
||||
setup() {
|
||||
const mainRef = ref();
|
||||
const mainRefEquipmentAlarm = ref();
|
||||
const mainEnergyAlarmConfig = ref();
|
||||
const editEquipmentAlarm = ref();
|
||||
const notificationManagements = ref();
|
||||
const editeEnergyAlarm = ref();
|
||||
const configureDeviceAlarms = ref();
|
||||
const configureEnergyAlarms = ref();
|
||||
const equipmentAlarm = ref(true);
|
||||
const energyAlarm = ref(true);
|
||||
const notificationConfig = notificationtableConfig(notificationManagements);
|
||||
//获取 通知方式
|
||||
const getNotificationMethod = (data: any) => {
|
||||
if (!data) return '';
|
||||
const methods = [];
|
||||
const notifications = data.split(',');
|
||||
|
||||
notifications.forEach((notification) => {
|
||||
if (notification === '1') {
|
||||
methods.push('站内信息');
|
||||
} else if (notification === '2') {
|
||||
methods.push('邮件');
|
||||
}
|
||||
});
|
||||
|
||||
return methods.join('/');
|
||||
};
|
||||
//能源告警配置
|
||||
const energyAlarmConfig = energyAlarmConfigs(
|
||||
editeEnergyAlarm,
|
||||
mainEnergyAlarmConfig,
|
||||
energyAlarm,
|
||||
configureEnergyAlarms,
|
||||
);
|
||||
//设备告警配置
|
||||
const equipmentAlarmConfig = equipmentAlarmTableConfig(
|
||||
editEquipmentAlarm,
|
||||
mainRefEquipmentAlarm,
|
||||
equipmentAlarm,
|
||||
configureDeviceAlarms,
|
||||
);
|
||||
//返回设备告警
|
||||
const backequipmentAlarm = () => {
|
||||
equipmentAlarm.value = !equipmentAlarm.value;
|
||||
configureDeviceAlarms.value.show = false;
|
||||
};
|
||||
const backenergyAlarm = () => {
|
||||
energyAlarm.value = !energyAlarm.value;
|
||||
configureEnergyAlarms.value.show = false;
|
||||
};
|
||||
//通知 修改成功
|
||||
const updNotification = () => {
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
};
|
||||
const clickSwitch = (data: any) => {
|
||||
NsModal.confirm({
|
||||
title: '启用状态',
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content:
|
||||
'确定' +
|
||||
(data.record.enableRules === 1 ? '关闭' : '启用') +
|
||||
(data.type === 1 ? '通知' : '告警') +
|
||||
'吗?',
|
||||
onOk: () => {
|
||||
if (data.type === 1) {
|
||||
//通知方式
|
||||
http
|
||||
.post(notificationManagementApi.upData, {
|
||||
id: data.record.id,
|
||||
enableNotifications: data.record.enableNotifications === 1 ? 0 : 1,
|
||||
})
|
||||
.then(() => {
|
||||
NsMessage.success(
|
||||
data.record.enableNotifications === 1 ? '通知已关闭' : '通知已启用',
|
||||
);
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
});
|
||||
}
|
||||
//设备告警
|
||||
if (data.type === 2) {
|
||||
http
|
||||
.post(deviceAlarms.addOrUpNewData, {
|
||||
id: data.record.id,
|
||||
enableRules: data.record.enableRules === 1 ? 0 : 1,
|
||||
})
|
||||
.then(() => {
|
||||
NsMessage.success(data.record.enableRules === 1 ? '告警已关闭' : '告警已启用');
|
||||
mainRefEquipmentAlarm.value?.nsTableRef.reload();
|
||||
});
|
||||
}
|
||||
//能源告警
|
||||
if (data.type === 3) {
|
||||
http
|
||||
.post(energyAlarms.addOrUpNewData, {
|
||||
id: data.record.id,
|
||||
enableRules: data.record.enableRules === 1 ? 0 : 1,
|
||||
})
|
||||
.then(() => {
|
||||
NsMessage.success(data.record.enableRules === 1 ? '告警已关闭' : '告警已启用');
|
||||
mainEnergyAlarmConfig.value?.nsTableRef.reload();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
// 设备告警 编辑或添加成功 刷新列表
|
||||
const editObject = () => {
|
||||
mainRefEquipmentAlarm.value?.nsTableRef.reload();
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
};
|
||||
// 能源告警 编辑或添加成功 刷新列表
|
||||
const editeEnergyAlarmInfo = () => {
|
||||
mainEnergyAlarmConfig.value?.nsTableRef.reload();
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
};
|
||||
return {
|
||||
notificationConfig,
|
||||
energyAlarmConfig,
|
||||
equipmentAlarmConfig,
|
||||
editObject,
|
||||
editeEnergyAlarm,
|
||||
updNotification,
|
||||
getNotificationMethod,
|
||||
clickSwitch,
|
||||
editEquipmentAlarm,
|
||||
notificationManagements,
|
||||
editeEnergyAlarmInfo,
|
||||
configureDeviceAlarms,
|
||||
configureEnergyAlarms,
|
||||
equipmentAlarm,
|
||||
energyAlarm,
|
||||
backequipmentAlarm,
|
||||
backenergyAlarm,
|
||||
mainRef,
|
||||
mainRefEquipmentAlarm,
|
||||
mainEnergyAlarmConfig,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.full-height {
|
||||
height: 100%; /* 设置高度为父容器高度 */
|
||||
}
|
||||
.blue-background.ant-switch-checked {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
}
|
||||
</style>
|
||||
../../../api/alarmManagement/alarmSettings/deviceAlarms../../../api/alarmManagement/alarmSettings/energyAlarm../../../api/alarmManagement/alarmSettings/notificationManagements
|
||||
@@ -0,0 +1,310 @@
|
||||
<template>
|
||||
<ns-drawer
|
||||
v-model:visible="visible"
|
||||
width="600"
|
||||
:title="'设置通知联系人'"
|
||||
:ok="btnClick"
|
||||
:cancel="handleClose"
|
||||
placement="right"
|
||||
:footer-style="{ textAlign: 'right' }"
|
||||
@close="handleClose">
|
||||
<div style="width: 100%; overflow: hidden; overflow-y: hidden; height: 100%">
|
||||
<a-form ref="formRef" :model="infoObject" :rules="rules" style="width: 80%">
|
||||
<a-form-item ref="notificationMethod" label="通知方式" name="notificationMethod">
|
||||
<a-select
|
||||
ref="select"
|
||||
v-model:value="infoObject.notificationMethod"
|
||||
style="width: 100%"
|
||||
mode="multiple"
|
||||
:options="devicePointData"
|
||||
show-search
|
||||
:allowClear="true"
|
||||
placeholder="请选择通知方式"
|
||||
:filter-option="filterDevicePoint" />
|
||||
</a-form-item>
|
||||
<a-form-item label="启用规则">
|
||||
<a-switch
|
||||
:checked="infoObject.enableNotifications === 1 ? true : false"
|
||||
:class="{
|
||||
'blue-background': infoObject.enableNotifications === 1 ? true : false,
|
||||
'grey-background': infoObject.enableNotifications === 1 ? false : true,
|
||||
}"
|
||||
@click="clickSwitch" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div style="width: 100%; height: 765px; overflow-y: auto">
|
||||
<div style="margin-bottom: 8px">
|
||||
<div style="width: 100%; display: flex; position: relative" class="ns-title-extra-box">
|
||||
<span style="margin-left: 12px; color: #333333">联系人名单</span>
|
||||
</div>
|
||||
<img
|
||||
style="width: 100%; margin-top: -10px"
|
||||
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" />
|
||||
</div>
|
||||
<div style="margin-bottom: 16px">
|
||||
<a-button type="primary" @click="chengUser">选择联系人 </a-button>
|
||||
</div>
|
||||
<a-table
|
||||
:dataSource="dataSource"
|
||||
:columns="columns"
|
||||
:scroll="{ x: 800, y: 700 }"
|
||||
:pagination="pagination">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'address'">
|
||||
{{ record?.deptRoleInfoList || record.userRoleInfos?.[0].deptRoleInfoList }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operation'">
|
||||
<a style="color: #2778ff" @click="remove(record)">移除</a>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
<linkPeople
|
||||
v-show="visibleModel"
|
||||
ref="linkPeoples"
|
||||
@handleCancel="handleCancel"
|
||||
@handleOk="handleOk" />
|
||||
</ns-drawer>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { NsMessage } from '/nerv-lib/component';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import linkPeople from './linkPeople/index.vue';
|
||||
import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements';
|
||||
|
||||
//table 数据
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
width: 80,
|
||||
fixed: 'left',
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'realName',
|
||||
width: 80,
|
||||
fixed: 'left',
|
||||
key: 'deviceName',
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
dataIndex: 'sex',
|
||||
width: 80,
|
||||
key: 'sex',
|
||||
},
|
||||
{
|
||||
title: '组织关系',
|
||||
dataIndex: 'orgName',
|
||||
key: 'site',
|
||||
},
|
||||
{
|
||||
title: '部门',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
width: 200,
|
||||
textEllipsis: true,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 80,
|
||||
dataIndex: 'operation',
|
||||
fixed: 'right',
|
||||
},
|
||||
];
|
||||
const visibleModel = ref(false);
|
||||
const dataSource = ref([]);
|
||||
const visible = ref(false);
|
||||
const linkPeoples = ref(null);
|
||||
const handleChangePage = (current: number, pageSize: number) => {
|
||||
pagination.value.current = current;
|
||||
pagination.value.pageSize = pageSize;
|
||||
};
|
||||
const pagination = ref({
|
||||
total: 0,
|
||||
size: 'small',
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
showQuickJumper: true,
|
||||
showLessItems: true,
|
||||
// showSizeChanger: true, //分页改变大小
|
||||
showTotal: (total: number, range: any) =>
|
||||
total && range ? `显示第${range[0]}到${range[1]}条记录,共 ${total} 条记录` : '',
|
||||
onChange: handleChangePage,
|
||||
});
|
||||
//点击联系人
|
||||
const chengUser = () => {
|
||||
visibleModel.value = true;
|
||||
let ids = [];
|
||||
dataSource.value.forEach((item) => {
|
||||
ids.push(item.userId);
|
||||
});
|
||||
// 传到子页面
|
||||
linkPeoples.value.getData({ id: ids, data: dataSource.value });
|
||||
};
|
||||
//取消弹窗
|
||||
const handleCancel = () => {
|
||||
visibleModel.value = false;
|
||||
};
|
||||
//确定选择人
|
||||
const handleOk = (data: any) => {
|
||||
visibleModel.value = false;
|
||||
dataSource.value = data.data;
|
||||
};
|
||||
//表单数据
|
||||
const infoObject = ref({
|
||||
enableNotifications: 0,
|
||||
});
|
||||
//设备点位搜索
|
||||
const filterDevicePoint = (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
//开关
|
||||
const clickSwitch = () => {
|
||||
if (infoObject.value.enableNotifications === 1) {
|
||||
infoObject.value.enableNotifications = 0;
|
||||
} else {
|
||||
infoObject.value.enableNotifications = 1;
|
||||
}
|
||||
};
|
||||
// 通知信息
|
||||
const devicePointData = ref([
|
||||
{ label: '站内信息', value: '1' },
|
||||
{ label: '邮件', value: '2' },
|
||||
]);
|
||||
|
||||
const rules = {
|
||||
notificationMethod: [{ required: true, message: '请选择通知方式', trigger: 'change' }],
|
||||
user: [{ required: true, message: '请选择通知人', trigger: 'change' }],
|
||||
};
|
||||
const formRef = ref();
|
||||
const emit = defineEmits(['updNotification']);
|
||||
const toggle = async (value: any) => {
|
||||
//判断 是新增 还是修改
|
||||
if (value) {
|
||||
// // 获取接口
|
||||
await http
|
||||
.post(notificationManagementApi.findById, {
|
||||
id: value.id,
|
||||
})
|
||||
.then((res) => {
|
||||
infoObject.value = res.data;
|
||||
//处理通知方式
|
||||
if (infoObject.value.notificationMethod) {
|
||||
infoObject.value.notificationMethod = infoObject.value.notificationMethod.split(',');
|
||||
} else {
|
||||
infoObject.value.notificationMethod = [];
|
||||
}
|
||||
//处理通知人
|
||||
dataSource.value = res.data.hxAlarmNotifyUserList;
|
||||
});
|
||||
} else {
|
||||
dataSource.value = [];
|
||||
infoObject.value = {
|
||||
enableNotifications: 0,
|
||||
notificationMethod: [],
|
||||
};
|
||||
dataSource.value = [];
|
||||
}
|
||||
visible.value = !visible.value;
|
||||
};
|
||||
//移除数据
|
||||
const remove = (data: any) => {
|
||||
dataSource.value.forEach((item, index) => {
|
||||
if (item.userId === data.userId) {
|
||||
dataSource.value.splice(index, 1);
|
||||
}
|
||||
});
|
||||
dataSource.value = [...dataSource.value];
|
||||
};
|
||||
const btnClick = () => {
|
||||
if (dataSource.value.length === 0) {
|
||||
NsMessage.warn('请选择联系人');
|
||||
return;
|
||||
}
|
||||
//表单校验
|
||||
formRef.value.validate().then(() => {
|
||||
//发送请求数据
|
||||
let obj = {
|
||||
id: null,
|
||||
notificationMethod: null,
|
||||
hxAlarmNotifyUserList: [],
|
||||
enableNotifications: 0,
|
||||
};
|
||||
obj.notificationMethod = infoObject.value.notificationMethod.toString();
|
||||
obj.id = infoObject.value.id;
|
||||
obj.enableNotifications = infoObject.value.enableNotifications;
|
||||
//处理 选择人数据
|
||||
dataSource.value.forEach((item) => {
|
||||
obj.hxAlarmNotifyUserList.push({
|
||||
userId: item.userId,
|
||||
contactInformationId: infoObject.value.id,
|
||||
});
|
||||
});
|
||||
//调用接口
|
||||
http.post(notificationManagementApi.upData, obj).then((res) => {
|
||||
if (res.msg === 'success') {
|
||||
NsMessage.success('操作成功');
|
||||
visible.value = false;
|
||||
dataSource.value = [];
|
||||
emit('updNotification', null);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
const handleClose = () => {
|
||||
// 清楚校验错误信息
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
visibleModel.value = false;
|
||||
dataSource.value = [];
|
||||
};
|
||||
defineExpose({
|
||||
toggle,
|
||||
handleClose,
|
||||
handleCancel,
|
||||
handleChangePage,
|
||||
formRef,
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.drawerContainer {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.blue-background.ant-switch-checked {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch {
|
||||
background-color: grey !important;
|
||||
}
|
||||
|
||||
.blue-background.ant-switch-checked .ant-switch-handle {
|
||||
background-color: linear-gradient(
|
||||
180deg,
|
||||
rgba(1, 206, 255, 1) 0%,
|
||||
rgba(0, 150, 229, 1) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.grey-background.ant-switch .ant-switch-handle {
|
||||
background-color: grey !important;
|
||||
}
|
||||
:deep(.ant-form-item-label) {
|
||||
z-index: 20;
|
||||
text-align: left;
|
||||
width: 20%;
|
||||
}
|
||||
</style>
|
||||
../../../../api/alarmManagement/alarmSettings/notificationManagements
|
||||
@@ -0,0 +1,364 @@
|
||||
<template>
|
||||
<ns-modal
|
||||
v-model:visible="show"
|
||||
width="1100px"
|
||||
style="overflow-y: hidden"
|
||||
title="添加联系人"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
<div class="box">
|
||||
<div class="box-left">
|
||||
<div style="width: 100%; display: flex; position: relative" class="ns-title-extra-box">
|
||||
<span style="margin-left: 12px; color: #333333">联系人名单</span>
|
||||
</div>
|
||||
<img
|
||||
style="width: 100%; height: 2px"
|
||||
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" />
|
||||
<a-input-search
|
||||
v-model:value="searchValue"
|
||||
style="margin-bottom: 8px"
|
||||
placeholder="请输入关键字" />
|
||||
<img
|
||||
style="width: 100%; height: 2px"
|
||||
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" />
|
||||
<div style="width: 100%; height: 370px; overflow-y: auto">
|
||||
<a-tree
|
||||
v-model:selectedKeys="selectedKeys"
|
||||
v-model:expandedKeys="expandedKeys"
|
||||
:tree-data="deptTreeData"
|
||||
@select="onSelect"
|
||||
/></div>
|
||||
</div>
|
||||
<div class="box-right">
|
||||
<div style="width: 100%; display: flex; position: relative" class="ns-title-extra-box">
|
||||
<span style="margin-left: 12px; color: #333333">人员列表 </span>
|
||||
<a-input-search
|
||||
v-model:value="realName"
|
||||
style="margin-bottom: 8px; width: 280px; position: absolute; right: 20px"
|
||||
placeholder="请输入"
|
||||
allowClear="true"
|
||||
@search="onSearch" />
|
||||
</div>
|
||||
<img
|
||||
style="width: 100%; height: 2px"
|
||||
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" />
|
||||
<div style="width: 100%; height: 450px; overflow-y: auto; padding: 12px 0">
|
||||
<a-table
|
||||
:row-selection="{
|
||||
selectedRowKeys: selectedRowKey,
|
||||
preserveSelectedRowKeys: true,
|
||||
onChange: onSelectChange,
|
||||
}"
|
||||
:columns="columns"
|
||||
:loading="loading"
|
||||
:data-source="dataSource"
|
||||
:rowKey="(record: any) => record.userId"
|
||||
:pagination="pagination"
|
||||
:bordered="true"
|
||||
:size="'middle'">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'address'">
|
||||
{{ record.userRoleInfos?.[0].deptRoleInfoList }}
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ns-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { defineComponent } from 'vue';
|
||||
import type { TreeProps } from 'ant-design-vue';
|
||||
import { origanizemanage } from '/@/api/origanizemanage';
|
||||
import { department } from '/@/api/origanizemanage';
|
||||
import { http } from '/nerv-lib/util';
|
||||
|
||||
//搜索存储 拼凑树的搜索类型
|
||||
const dataList: TreeProps['treeData'] = [];
|
||||
const generateList = (data: TreeProps['treeData']) => {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const node = data[i];
|
||||
const key = node.key;
|
||||
dataList.push({ key, title: node.title });
|
||||
if (node.children) {
|
||||
generateList(node.children);
|
||||
}
|
||||
}
|
||||
};
|
||||
const getParentKey = (
|
||||
key: string | number,
|
||||
tree: TreeProps['treeData'],
|
||||
): string | number | undefined => {
|
||||
let parentKey;
|
||||
for (let i = 0; i < tree.length; i++) {
|
||||
const node = tree[i];
|
||||
if (node.children) {
|
||||
if (node.children.some((item) => item.key === key)) {
|
||||
parentKey = node.key;
|
||||
} else if (getParentKey(key, node.children)) {
|
||||
parentKey = getParentKey(key, node.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parentKey;
|
||||
};
|
||||
export default defineComponent({
|
||||
setup(props, { emit }) {
|
||||
//组织数
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
const dataSource = ref([]);
|
||||
const loading = ref(false);
|
||||
const selectedRowKey = ref([]);
|
||||
const selectedRow = ref([]);
|
||||
const realName = ref(null);
|
||||
// 树方法
|
||||
const expandedKeys = ref<(string | number)[]>([]);
|
||||
const selectedKeys = ref([]);
|
||||
const searchValue = ref<string>('');
|
||||
const deviceName = ref<string>('');
|
||||
const autoExpandParent = ref<boolean>(true);
|
||||
const deptTreeData = ref([]);
|
||||
//选择 组织
|
||||
const selectOrgId = ref('');
|
||||
//默认当前缓存的组织
|
||||
selectOrgId.value = result;
|
||||
//选择部门
|
||||
const selectDeptId = ref('');
|
||||
const show = ref(false);
|
||||
//人员搜索
|
||||
const onSearch = () => {
|
||||
pagination.value.current = 1;
|
||||
getList();
|
||||
};
|
||||
//点击树 搜索人员
|
||||
const onSelect = (selectedKeys: any, info: any) => {
|
||||
selectedKeys.value = selectedKeys;
|
||||
//判断选择的部门 还是 组织
|
||||
if (info.node.dataRef.deptInfo) {
|
||||
selectDeptId.value = info.node.dataRef.deptInfo.deptId;
|
||||
selectOrgId.value = info.node.dataRef.deptInfo.orgId;
|
||||
}
|
||||
if (info.node.dataRef.orgInfo) {
|
||||
selectOrgId.value = info.node.dataRef.orgInfo.orgId;
|
||||
selectDeptId.value = '';
|
||||
}
|
||||
pagination.value.current = 1;
|
||||
getList();
|
||||
};
|
||||
// 递归处理部门树数据
|
||||
const processDepartmentTree = (tree) => {
|
||||
tree.forEach((item) => {
|
||||
item.deptInfo = item.deptInfo;
|
||||
item.key = item.deptInfo.deptId;
|
||||
item.title = item.deptInfo.deptName;
|
||||
item.children = processDepartmentTree(item.children); // 递归处理子节点
|
||||
});
|
||||
return tree;
|
||||
};
|
||||
|
||||
// 获取部门树
|
||||
const getDepartList = (params) => {
|
||||
return http.post(department.queryDeptTree, params).then((res) => {
|
||||
const result = res.data.map((item) => ({
|
||||
key: item.orgInfo.orgId,
|
||||
orgInfo: item.orgInfo,
|
||||
title: item.orgInfo.orgName,
|
||||
children: processDepartmentTree(item.deptTrees),
|
||||
}));
|
||||
|
||||
return result;
|
||||
});
|
||||
};
|
||||
//获取树
|
||||
const getTreeData = () => {
|
||||
getDepartList({ orgId: orgId.value }).then((res) => {
|
||||
deptTreeData.value = res;
|
||||
selectedKeys.value = [orgId.value];
|
||||
generateList(deptTreeData.value);
|
||||
});
|
||||
};
|
||||
//获取列表
|
||||
const getList = () => {
|
||||
loading.value = true;
|
||||
http
|
||||
.post(origanizemanage.userList, {
|
||||
pageNum: pagination.value.current,
|
||||
pageSize: pagination.value.pageSize,
|
||||
orgId: selectOrgId.value,
|
||||
deptId: selectDeptId.value,
|
||||
realName: realName.value,
|
||||
userStatus: 0, // 写死 没有被冻结的用户
|
||||
})
|
||||
.then((res) => {
|
||||
dataSource.value = res.data.records;
|
||||
pagination.value.total = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
// 改变页码
|
||||
const handleChangePage = (current: number, pageSize: number) => {
|
||||
pagination.value.current = current;
|
||||
pagination.value.pageSize = pageSize;
|
||||
getList();
|
||||
};
|
||||
const pagination = ref({
|
||||
total: 0,
|
||||
size: 'small',
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
showQuickJumper: true,
|
||||
showLessItems: true,
|
||||
// showSizeChanger: true,
|
||||
showTotal: (total: number, range: any) =>
|
||||
total && range ? `显示第${range[0]}到${range[1]}条记录,共 ${total} 条记录` : '',
|
||||
onChange: handleChangePage,
|
||||
});
|
||||
const onSelectChange = (selectedRowKeys: any, selectedRows: any) => {
|
||||
selectedRowKey.value = selectedRowKeys;
|
||||
// 使用 forEach 循环遍历 selectedRows 数组
|
||||
let newSelectRows = [];
|
||||
selectedRows.forEach((item, index) => {
|
||||
if (item) {
|
||||
newSelectRows.push(item);
|
||||
}
|
||||
});
|
||||
// 添加新选中的行的 userId 到 selectedRow.value
|
||||
selectedRow.value = [
|
||||
...selectedRow.value,
|
||||
...newSelectRows.filter(
|
||||
(newRow: any) =>
|
||||
!selectedRow.value.some((existingRow) => existingRow.userId === newRow.userId),
|
||||
),
|
||||
];
|
||||
// 移除取消选中的行的 userId
|
||||
selectedRow.value = selectedRow.value.filter((existingRow: any) =>
|
||||
selectedRowKeys.includes(existingRow.userId),
|
||||
);
|
||||
};
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'realName',
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
dataIndex: 'sex',
|
||||
},
|
||||
{
|
||||
title: '组织关系',
|
||||
dataIndex: 'orgName',
|
||||
},
|
||||
{
|
||||
title: '部门 ',
|
||||
dataIndex: 'address',
|
||||
},
|
||||
];
|
||||
const reback = () => {
|
||||
show.value = false;
|
||||
pagination.value.current = 1;
|
||||
realName.value = null;
|
||||
searchValue.value = '';
|
||||
selectDeptId.value = '';
|
||||
selectOrgId.value = orgId.value;
|
||||
selectedRow.value = [];
|
||||
selectedRowKey.value = [];
|
||||
};
|
||||
const handleOk = () => {
|
||||
// 处理确定按钮的逻辑
|
||||
emit('handleOk', { id: selectedRowKey.value, data: selectedRow.value });
|
||||
//恢复数据
|
||||
reback();
|
||||
};
|
||||
const getData = (data: any) => {
|
||||
selectedRow.value = data.data;
|
||||
selectedRowKey.value = data.id;
|
||||
show.value = true;
|
||||
//获取列表
|
||||
getList();
|
||||
//获取树
|
||||
getTreeData();
|
||||
};
|
||||
const handleCancel = () => {
|
||||
// 处理取消按钮的逻辑
|
||||
emit('handleCancel', null);
|
||||
reback();
|
||||
};
|
||||
// 监听树的搜索
|
||||
watch(searchValue, (value) => {
|
||||
const expanded = dataList
|
||||
.map((item: TreeProps['treeData'][number]) => {
|
||||
if (item.title.indexOf(value) > -1) {
|
||||
return getParentKey(item.key, deptTreeData.value);
|
||||
}
|
||||
return null;
|
||||
})
|
||||
.filter((item, i, self) => item && self.indexOf(item) === i);
|
||||
expandedKeys.value = expanded;
|
||||
searchValue.value = value;
|
||||
autoExpandParent.value = true;
|
||||
});
|
||||
return {
|
||||
columns,
|
||||
realName,
|
||||
orgId,
|
||||
processDepartmentTree,
|
||||
onSearch,
|
||||
getList,
|
||||
loading,
|
||||
dataSource,
|
||||
onSelect,
|
||||
deptTreeData,
|
||||
selectedRow,
|
||||
selectedRowKey,
|
||||
autoExpandParent,
|
||||
expandedKeys,
|
||||
selectedKeys,
|
||||
onSelectChange,
|
||||
pagination,
|
||||
handleOk,
|
||||
reback,
|
||||
show,
|
||||
getData,
|
||||
getTreeData,
|
||||
getDepartList,
|
||||
searchValue,
|
||||
deviceName,
|
||||
handleCancel,
|
||||
selectDeptId,
|
||||
selectOrgId,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
display: flex;
|
||||
.box-left {
|
||||
width: 300px;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 0, 12px;
|
||||
gap: 5px;
|
||||
}
|
||||
.box-right {
|
||||
width: calc(100% - 200px);
|
||||
height: 100%;
|
||||
padding: 0 12px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,225 @@
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { NsMessage } from '/nerv-lib/component';
|
||||
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
|
||||
import { ref } from 'vue';
|
||||
import { getEnum } from '/@/api';
|
||||
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
const tableKeyMap = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'address',
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'priority',
|
||||
},
|
||||
{
|
||||
title: '告警标题',
|
||||
dataIndex: 'alarmTitle',
|
||||
},
|
||||
{
|
||||
title: '错误码',
|
||||
dataIndex: 'errorCode',
|
||||
},
|
||||
{
|
||||
title: '告警频率',
|
||||
dataIndex: 'alarmFrequency',
|
||||
},
|
||||
{
|
||||
title: '重复次数',
|
||||
dataIndex: 'repetitions',
|
||||
},
|
||||
{
|
||||
title: '频率间隔',
|
||||
dataIndex: 'interval',
|
||||
},
|
||||
{
|
||||
title: '监测时长',
|
||||
dataIndex: 'monitorFrequency',
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
dataIndex: 'enableRules',
|
||||
},
|
||||
];
|
||||
const doWnload = (url: any) => {
|
||||
const a = document.createElement('a');
|
||||
document.body.appendChild(a);
|
||||
a.href = encodeURI(url);
|
||||
//设置下载的文件名
|
||||
// a.download = fileName.value;
|
||||
//触发a标签的点击事件,进行下载
|
||||
a.click();
|
||||
};
|
||||
|
||||
export const energyAlarmConfigs = (
|
||||
editeEnergyAlarm: any,
|
||||
mainEnergyAlarmConfig: any,
|
||||
energyAlarm: any,
|
||||
configureDeviceAlarms: any,
|
||||
) => {
|
||||
return {
|
||||
title: '告警规则',
|
||||
api: energyAlarms.getTableList,
|
||||
headerActions: [
|
||||
{
|
||||
label: '新增',
|
||||
name: 'energyAlarmAdd',
|
||||
type: 'primary',
|
||||
handle: () => {
|
||||
editeEnergyAlarm.value.toggle();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '导入',
|
||||
name: 'energyAlarmImport',
|
||||
type: 'primary',
|
||||
extra: {
|
||||
title: '设备信息', // 弹窗title
|
||||
templateName: 'whiteListUser', // 所使用的文件名称
|
||||
indexName: '设备id', // 匹配类型字段
|
||||
message: [
|
||||
{ label: '1、若必填项未填写,则不能进行导入操作' },
|
||||
{ label: `2、当重复时,则更新数据。` },
|
||||
{ label: '3、数据将从模版的第五行进行导入。' },
|
||||
{ label: '4、文件导入勿超过5MB。' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '导出',
|
||||
name: 'energyAlarmExports',
|
||||
type: 'primary',
|
||||
handle: () => {
|
||||
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
|
||||
},
|
||||
},
|
||||
],
|
||||
columns: tableKeyMap,
|
||||
// rowSelection: null, 选择按钮
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
name: 'energyAlarmEdit',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
const obj = { ...data };
|
||||
obj.priority = data.priority.value;
|
||||
if (obj.alarmFrequency) {
|
||||
obj.alarmFrequency = data.alarmFrequency.value;
|
||||
}
|
||||
if (obj.intervalDurationUnit) {
|
||||
obj.intervalDurationUnit = data.intervalDurationUnit.value;
|
||||
}
|
||||
if (obj.monitorFrequency) {
|
||||
obj.monitorFrequency = data.monitorFrequency.value;
|
||||
}
|
||||
obj.createWorkOrder = obj.createWorkOrder + '';
|
||||
if (obj.alarmFrequency !== 2) {
|
||||
obj.repetitions = null;
|
||||
obj.intervalDuration = null;
|
||||
obj.intervalDurationUnit = null;
|
||||
}
|
||||
editeEnergyAlarm.value.toggle(obj);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '配置',
|
||||
name: 'alarmSettingsIndex',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
energyAlarm.value = !energyAlarm.value;
|
||||
configureDeviceAlarms.value.setconfigureDeviceAlarmsData(data);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
name: 'energyAlarmDel',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
confirm: true,
|
||||
handle: (data: any) => {
|
||||
http.post(energyAlarms.del, { id: data.id }).then(() => {
|
||||
NsMessage.success('操作成功');
|
||||
mainEnergyAlarmConfig.value?.nsTableRef.reload();
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
formConfig: {
|
||||
schemas: [
|
||||
{
|
||||
field: 'priority',
|
||||
label: '告警优先级',
|
||||
component: 'nsSelectApi',
|
||||
// dynamicParams: {
|
||||
// id: 'deviceName', //帮定上级联动数据
|
||||
// },
|
||||
componentProps: {
|
||||
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
|
||||
immediate: true,
|
||||
allowClear: true,
|
||||
resultField: 'data',
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
placeholder: '请选择告警优先级',
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
// autoSelectFirst: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'alarmTitle',
|
||||
label: '告警标题',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入告警标题关键字',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'errorCode',
|
||||
label: '错误码',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入告警错误码',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'enableRules',
|
||||
label: '启用状态',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请选择启用状态',
|
||||
options: [
|
||||
{
|
||||
label: '启用',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '关闭',
|
||||
value: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
params: { orgId: orgId.value },
|
||||
// pagination: { pageSizeOptions: false },
|
||||
rowKey: 'id',
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,224 @@
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { NsMessage } from '/nerv-lib/component';
|
||||
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
|
||||
import { ref } from 'vue';
|
||||
import { getEnum } from '/@/api';
|
||||
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
const tableKeyMap = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'address',
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'prioritys',
|
||||
},
|
||||
{
|
||||
title: '告警标题',
|
||||
dataIndex: 'alarmTitle',
|
||||
},
|
||||
{
|
||||
title: '错误码',
|
||||
dataIndex: 'errorCode',
|
||||
},
|
||||
{
|
||||
title: '告警频率',
|
||||
dataIndex: 'alarmFrequency',
|
||||
},
|
||||
{
|
||||
title: '重复次数',
|
||||
dataIndex: 'repetitions',
|
||||
},
|
||||
{
|
||||
title: '频率间隔',
|
||||
dataIndex: 'interval',
|
||||
},
|
||||
{
|
||||
title: '监测时长',
|
||||
dataIndex: 'monitor',
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
dataIndex: 'enableRules',
|
||||
},
|
||||
];
|
||||
const doWnload = (url: any) => {
|
||||
const a = document.createElement('a');
|
||||
document.body.appendChild(a);
|
||||
a.href = encodeURI(url);
|
||||
//设置下载的文件名
|
||||
// a.download = fileName.value;
|
||||
//触发a标签的点击事件,进行下载
|
||||
a.click();
|
||||
};
|
||||
|
||||
export const equipmentAlarmTableConfig = (
|
||||
editEquipmentAlarm: any,
|
||||
mainRefEquipmentAlarm: any,
|
||||
equipmentAlarm: any,
|
||||
configureDeviceAlarms: any,
|
||||
) => {
|
||||
return {
|
||||
title: '告警规则',
|
||||
api: deviceAlarms.getTableList,
|
||||
headerActions: [
|
||||
{
|
||||
label: '新增',
|
||||
name: 'equipmentAlarmAdd',
|
||||
type: 'primary',
|
||||
handle: () => {
|
||||
editEquipmentAlarm.value.toggle();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '导入',
|
||||
name: 'equipmentAlarmImport',
|
||||
type: 'primary',
|
||||
extra: {
|
||||
// api: props.postImportApi, // 导入接口名
|
||||
title: '设备信息', // 弹窗title
|
||||
templateName: 'whiteListUser', // 所使用的文件名称
|
||||
indexName: '设备id', // 匹配类型字段
|
||||
message: [
|
||||
{ label: '1、若必填项未填写,则不能进行导入操作' },
|
||||
{ label: `2、当重复时,则更新数据。` },
|
||||
{ label: '3、数据将从模版的第五行进行导入。' },
|
||||
{ label: '4、文件导入勿超过5MB。' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '导出',
|
||||
name: 'equipmentAlarmExports',
|
||||
type: 'primary',
|
||||
handle: () => {
|
||||
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
|
||||
},
|
||||
},
|
||||
],
|
||||
columns: tableKeyMap,
|
||||
// rowSelection: null, 选择按钮
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
name: 'equipmentAlarmEdit',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
const obj = { ...data };
|
||||
obj.priority = data.priority.value;
|
||||
if (obj.alarmFrequency) {
|
||||
obj.alarmFrequency = data.alarmFrequency.value;
|
||||
}
|
||||
if (obj.intervalDurationUnit) {
|
||||
obj.intervalDurationUnit = data.intervalDurationUnit.value;
|
||||
}
|
||||
obj.createWorkOrder = obj.createWorkOrder + '';
|
||||
if (obj.alarmFrequency !== 2) {
|
||||
obj.repetitions = null;
|
||||
obj.intervalDuration = null;
|
||||
obj.intervalDurationUnit = null;
|
||||
}
|
||||
obj.monitorTimeUnit = data.monitorTimeUnit.value;
|
||||
editEquipmentAlarm.value.toggle(obj);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '配置',
|
||||
name: 'alarmSettingsIndex',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
equipmentAlarm.value = !equipmentAlarm.value;
|
||||
configureDeviceAlarms.value.setconfigureDeviceAlarmsData(data);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
name: 'equipmentAlarmDel',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
confirm: true,
|
||||
handle: (data: any) => {
|
||||
http.post(deviceAlarms.del, { id: data.id }).then(() => {
|
||||
NsMessage.success('告警删除成功');
|
||||
mainRefEquipmentAlarm.value?.nsTableRef.reload();
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
formConfig: {
|
||||
schemas: [
|
||||
{
|
||||
field: 'priority',
|
||||
label: '告警优先级',
|
||||
component: 'nsSelectApi',
|
||||
// dynamicParams: {
|
||||
// id: 'deviceName', //帮定上级联动数据
|
||||
// },
|
||||
componentProps: {
|
||||
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
|
||||
immediate: true,
|
||||
allowClear: true,
|
||||
resultField: 'data',
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
placeholder: '请选择告警优先级',
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
// autoSelectFirst: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'alarmTitle',
|
||||
label: '告警标题',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入告警标题关键字',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'errorCode',
|
||||
label: '错误码',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入错误码关键字',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'enableRules',
|
||||
label: '启用状态',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
placeholder: '请选择启用状态',
|
||||
allowClear: true,
|
||||
options: [
|
||||
{
|
||||
label: '启用',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '关闭',
|
||||
value: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
params: { orgId: orgId.value },
|
||||
// pagination: { pageSizeOptions: false },
|
||||
rowKey: 'id',
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,157 @@
|
||||
import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements';
|
||||
import { ref } from 'vue';
|
||||
import { getEnum } from '/@/api';
|
||||
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
const tableKeyMap = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'address',
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'prioritys',
|
||||
},
|
||||
{
|
||||
title: '告警类型',
|
||||
dataIndex: 'alarmTypeName',
|
||||
},
|
||||
{
|
||||
title: '告警标题',
|
||||
dataIndex: 'alarmTitle',
|
||||
},
|
||||
{
|
||||
title: '错误码',
|
||||
dataIndex: 'errorCode',
|
||||
},
|
||||
{
|
||||
title: '通知名单',
|
||||
dataIndex: 'notificationList',
|
||||
width: 150,
|
||||
textEllipsis: true,
|
||||
},
|
||||
{
|
||||
title: '通知方式',
|
||||
dataIndex: 'notificationMethod',
|
||||
},
|
||||
{
|
||||
title: '启用通知',
|
||||
dataIndex: 'enableNotifications',
|
||||
},
|
||||
];
|
||||
export const notificationtableConfig = (notificationManagements: any) => {
|
||||
return {
|
||||
title: '告警规则',
|
||||
api: notificationManagementApi.getTableList,
|
||||
headerActions: [],
|
||||
columns: tableKeyMap,
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
actions: [
|
||||
{
|
||||
label: '联系方式',
|
||||
name: 'FeedBackDetail',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
notificationManagements.value.toggle(data);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
formConfig: {
|
||||
schemas: [
|
||||
{
|
||||
field: 'alarmType',
|
||||
label: '告警类型',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
placeholder: '请选告警类型',
|
||||
allowClear: true,
|
||||
options: [
|
||||
{
|
||||
label: '设备告警',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '网关告警',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '能耗告警',
|
||||
value: 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'priority',
|
||||
label: '告警优先级',
|
||||
component: 'nsSelectApi',
|
||||
// dynamicParams: {
|
||||
// id: 'deviceName', //帮定上级联动数据
|
||||
// },
|
||||
componentProps: {
|
||||
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
|
||||
immediate: true,
|
||||
allowClear: true,
|
||||
resultField: 'data',
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
placeholder: '请选择告警优先级',
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
// autoSelectFirst: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'alarmTitle',
|
||||
label: '告警标题',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入告警标题关键字',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'errorCode',
|
||||
label: '错误码',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请输入告警错误码',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'enableNotifications',
|
||||
label: '启用状态',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请选择启用状态',
|
||||
options: [
|
||||
{
|
||||
label: '启用',
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
label: '关闭',
|
||||
value: '0',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
params: { orgId: orgId.value },
|
||||
// pagination: { pageSizeOptions: false },
|
||||
rowKey: 'id',
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<ns-view-list-table v-bind="config" ref="mainRef">
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'alarmTitle'">
|
||||
<div style="color: #2778ff">{{ record.alarmTitle }}</div>
|
||||
{{ record.abnormalDescription }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'priority'">
|
||||
{{ record.priority ? record.priority.label : '' }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'alarmLogState'">
|
||||
{{ record.alarmLogState ? record.alarmLogState.label : '' }}
|
||||
</template>
|
||||
</template>
|
||||
</ns-view-list-table>
|
||||
<!-- 详情页面 -->
|
||||
<Look ref="look" />
|
||||
<!-- 状态页面 -->
|
||||
<Status ref="status" @logAdd="logAdd" />
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { notificationtableConfig } from './ts/config';
|
||||
import Look from './look.vue';
|
||||
import Status from './status.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
export default {
|
||||
name: 'EquipmentAlarmIndex',
|
||||
components: { Look, Status },
|
||||
|
||||
setup() {
|
||||
const look = ref(null);
|
||||
const status = ref(null);
|
||||
const mainRef = ref(null);
|
||||
const config = notificationtableConfig(look, status);
|
||||
const logAdd = () => {
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
};
|
||||
return {
|
||||
config,
|
||||
look,
|
||||
status,
|
||||
mainRef,
|
||||
logAdd,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||