Compare commits

92 Commits

Author SHA1 Message Date
xuziqiang
9316629faa fix: 登录校验调整 2024-07-05 18:19:03 +08:00
xuziqiang
c7bbc1f003 fix: 角色新增同级 2024-07-05 17:36:24 +08:00
xuziqiang
da80693704 fix: bug修改 2024-07-05 17:29:34 +08:00
xuziqiang
40d93e74aa fix: bug修改 2024-07-05 17:26:31 +08:00
xuziqiang
b2a200486f fix: hx-op路由调整 2024-07-05 14:12:53 +08:00
xuziqiang
228f420bd4 fix: 项目图标调整 2024-07-05 13:51:28 +08:00
xuziqiang
78d49ff16e fix: 设备联调 2024-07-05 12:04:17 +08:00
xuziqiang
4bbb5c5133 fix: 组件调整 2024-07-04 11:19:38 +08:00
xuziqiang
d294c3f07a feat: 设备台账联调 2024-07-03 18:08:02 +08:00
xuziqiang
fba16c75b9 feat: 设备台账联调 2024-07-03 18:07:52 +08:00
xuziqiang
e5cd75c845 feat: 设备台账联调 2024-07-03 17:58:39 +08:00
xuziqiang
be09e531b9 fix:调整路由 2024-07-03 10:50:16 +08:00
xuziqiang
45908dd5c1 fix: 部门角色编辑调整 2024-07-02 14:52:12 +08:00
xuziqiang
7fd1733872 fix: remove useless console 2024-07-01 16:37:37 +08:00
xuziqiang
2d9fc62d86 feat: 解决批量删除之后选中数据清除问题 2024-07-01 16:04:12 +08:00
xuziqiang
7eb8ba79f8 feat: 树loading样式调整 2024-07-01 15:03:45 +08:00
xuziqiang
ef782e90b6 feat: ns-tree-api补充粘性定位 2024-06-28 16:46:07 +08:00
xuziqiang
46398fda22 fix: 抽离接口异常code 2024-06-28 16:07:37 +08:00
xuziqiang
edfc11825d feat: 补充全局自定义权限指令 2024-06-28 14:49:40 +08:00
xuziqiang
9f1620c9f8 fix: 调整placeholder 2024-06-28 11:45:29 +08:00
xuziqiang
9ddeaa59eb fix: childform 警告调整 2024-06-27 17:08:58 +08:00
xuziqiang
8f25d2293c feat: 分组切换 2024-06-27 15:21:14 +08:00
xuziqiang
7c64a6b231 fix: 修改tag右键操作异常 2024-06-27 14:27:04 +08:00
xuziqiang
d6865544d8 fix: 补充超出滚动 2024-06-27 10:59:05 +08:00
xuziqiang
3d2d777644 fix: bug修复 2024-06-26 16:57:42 +08:00
xuziqiang
613e7feaf4 fix: 样式细节调整 2024-06-26 14:58:23 +08:00
xuziqiang
b55ab2353e feat: 部门样式调整 2024-06-26 10:32:45 +08:00
xuziqiang
d654588e65 feat: 用户管理样式调整 2024-06-25 14:52:13 +08:00
xuziqiang
15fce86265 feat: form 组件样式调整 2024-06-25 11:21:35 +08:00
xuziqiang
cecd3a0325 feat;sider样式补充 2024-06-24 15:24:21 +08:00
xuziqiang
0c291263cd feat: 样式调整 2024-06-21 18:15:32 +08:00
xuziqiang
d4f17c4c02 feat: 树搜索调整 2024-06-21 15:56:21 +08:00
xuziqiang
e16ad610e7 feat: table cancel sticky 2024-06-21 15:45:35 +08:00
xuziqiang
fea7abd476 feat: 样式调整 2024-06-21 15:19:28 +08:00
xuziqiang
2ebe536243 Merge branch 'main' of http://123.60.103.97:3000/xuziqiang/SaaS-lib 2024-06-19 18:23:50 +08:00
xuziqiang
ab3960fff8 fix: bug修复 2024-06-19 18:23:49 +08:00
lushihan
77a9fe882d feat:照明 2024-06-19 16:23:46 +08:00
xuziqiang
8a554f5871 fix: 权限排序异常 2024-06-19 16:22:19 +08:00
xuziqiang
5d7d8cc4de fix: bug 修复 2024-06-19 15:20:49 +08:00
xuziqiang
69776112f9 fix: bug 修复 2024-06-19 15:20:04 +08:00
xuziqiang
f744ad286e fix: 005 复制异常修复 2024-06-19 10:03:47 +08:00
xuziqiang
75a67c3039 Merge branch 'main' of http://123.60.103.97:3000/xuziqiang/SaaS-lib 2024-06-18 18:16:23 +08:00
xuziqiang
ec1ae071f8 fix: 集团补充验证,部门权限取消清楚权限信息 2024-06-18 18:16:23 +08:00
lushihan
d527a1467f feat:照明 2024-06-18 16:41:31 +08:00
xuziqiang
012c049ab0 fix: 静态资源调整 2024-06-18 14:49:01 +08:00
xuziqiang
e0fe92a8f8 feat: 补充记住密码功能 2024-06-17 18:32:35 +08:00
xuziqiang
e9ca9cfab9 fix: 修改刷新页面权限丢失 2024-06-17 17:41:30 +08:00
xuziqiang
217496d5b6 fix: 登录过滤空格 2024-06-17 17:31:01 +08:00
xuziqiang
efced81544 fix: 登录验证异常 2024-06-17 17:24:03 +08:00
xuziqiang
1f62153ad4 Merge branch 'main' of http://123.60.103.97:3000/xuziqiang/SaaS-lib 2024-06-17 16:59:50 +08:00
xuziqiang
09fa01122c feat: 登录补充验证码 2024-06-17 16:59:30 +08:00
lushihan
cd1690fb28 Merge branch 'main' of http://123.60.103.97:3000/xuziqiang/SaaS-lib 2024-06-17 16:55:48 +08:00
lushihan
559db71640 feat:照明 2024-06-17 16:53:36 +08:00
xuziqiang
91dd7a7d0c fix: header 切换缓存逻辑补充 2024-06-17 13:48:27 +08:00
xuziqiang
bc80a22180 feat: 权限逻辑处理 2024-06-14 18:27:07 +08:00
xuziqiang
da3d5840df feat: 权限逻辑处理 2024-06-14 11:49:51 +08:00
lushihan
08972bfbfb feat:照明 2024-06-13 17:22:24 +08:00
xuziqiang
819a00f733 feat: 企业细节逻辑调整 2024-06-12 18:15:49 +08:00
xuziqiang
680855f310 feat: 企业联调 2024-06-12 16:41:30 +08:00
lushihan
8e6abb5c57 feat:完善 2024-06-12 15:57:35 +08:00
xuziqiang
689a349d96 fix: 路由调整 2024-06-11 16:45:18 +08:00
xuziqiang
dd82f15e7f Merge branch 'main' of http://123.60.103.97:3000/xuziqiang/SaaS-lib 2024-06-11 16:16:35 +08:00
xuziqiang
fbf460a620 fix: 资源路径调整 2024-06-11 16:13:51 +08:00
lushihan
c4132d41cd feat:添加 2024-06-11 15:44:41 +08:00
xuziqiang
c4652e2571 Merge branch 'main' of http://123.60.103.97:3000/xuziqiang/SaaS-lib 2024-06-11 13:37:11 +08:00
xuziqiang
d58f066b39 feat: 细节调整 2024-06-11 13:37:10 +08:00
lushihan
e6ed0f0e09 照明 2024-06-11 09:01:15 +08:00
lushihan
3b6d11122e 6.11 2024-06-11 08:48:13 +08:00
lushihan
30743f1474 6.11 2024-06-11 08:47:52 +08:00
lushihan
ec6faa9494 feat:照明 2024-06-11 08:36:13 +08:00
xuziqiang
cbfa942ff6 feat: NsCascader 调整逻辑 2024-06-07 17:41:47 +08:00
xuziqiang
fc940e7241 feat: 补充新项目hx-op 2024-06-07 15:11:04 +08:00
xuziqiang
a0f5c4de08 feat: 调整部门新增逻辑 2024-06-07 14:16:45 +08:00
xuziqiang
112c701799 feat: 补充角色权限 2024-06-07 14:14:21 +08:00
xuziqiang
6a31e3199b fix: code format 2024-06-06 17:02:49 +08:00
xuziqiang
2141efd7a7 Merge branch 'main' of http://123.60.103.97:3000/xuziqiang/SaaS-lib 2024-06-06 16:56:35 +08:00
xuziqiang
946384b9ed feat: 补充用户模块权限json 2024-06-06 16:56:34 +08:00
lushihan
0bfbf391e2 feat: 灯光 2024-06-06 16:49:24 +08:00
lushihan
e7e2d52dff fix: 照明调整文件路径 2024-06-06 14:37:33 +08:00
L
14a7c158bc 照明控制面板 2024-06-06 11:57:16 +08:00
xuziqiang
9c3508fbc8 feat: 调整用户企业树 2024-06-06 11:05:43 +08:00
xuziqiang
61218104d3 feat: 部门联调 2024-06-04 19:22:11 +08:00
xuziqiang
bd89f7973d feat: open permission 2024-06-04 11:40:32 +08:00
xuziqiang
e1b0d817fe feat: 用户联调 2024-06-04 10:54:02 +08:00
xuziqiang
31479608c0 feat: 能耗映射 2024-05-31 09:54:39 +08:00
xuziqiang
65230bf066 feat: 树补充搜索 2024-05-30 14:16:42 +08:00
xuziqiang
9319c09fb7 fix: 修改table mock数据 2024-05-29 18:24:44 +08:00
xuziqiang
620fbd509a fix: formItem formItemProps 调研关联性 2024-05-29 17:24:26 +08:00
xuziqiang
4614c8699f feat: 分组管理 2024-05-29 16:29:22 +08:00
xuziqiang
f7ebb4bd60 feat: drawer 组件封装 2024-05-29 13:58:08 +08:00
xuziqiang
c9f8148dc3 Merge branch 'main' of http://123.60.103.97:3000/xuziqiang/SaaS-lib 2024-05-29 10:18:13 +08:00
xuziqiang
c4d7573cbb feat: 分组管理 2024-05-29 10:18:12 +08:00
247 changed files with 37759 additions and 6615 deletions

View File

@@ -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">

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 KiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View 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

View File

@@ -43,192 +43,160 @@
</script>
<style lang="less" scoped>
:deep(.ns-content) {
padding-top: 80px !important;
}
#app {
width: 100%;
height: 100%;
}
// :deep(.ns-content) {
// // padding-top: 80px !important;
// }
// #app {
// width: 100%;
// height: 100%;
// }
:deep(.ns-left-menu .firstMenuItem-selected .ant-menu-title-content) {
background: unset !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;
}
}
// :deep(.ant-menu-title-content) {
// background: unset !important;
// z-index: 9 !important;
// }
// :deep(.ns-left-menu) {
// .ant-menu-item-selected {
// // color: #fff !important;
// background: @primary-color;
// border-radius: 12px;
// // height: 40px;
// // line-height: 40px;
// padding: 5px @ns-gap;
// position: relative;
// a {
// color: @white !important;
// }
// }
:deep(.ant-menu-light.ant-menu-horizontal > .ant-menu-item:hover) {
background: @primary-color;
}
:deep(.ant-menu-inline .ant-menu-submenu-title) {
color: rgba(255, 255, 255, 0.9) !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);
}
}
// .ant-menu-item-active,
// .ant-submenu-item-active {
// // color: rgba(@primary-color, 0.1) !important;
// }
// }
//*************************含tab的 list列表样式 */
:deep(.tabListTable) {
.ns-table-title {
text-align: left;
height: 46px;
line-height: 46px;
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(.ant-menu-light.ant-menu-horizontal > .ant-menu-item:hover) {
// // background: @primary-color;
// }
// // :deep(.ant-menu-inline .ant-menu-submenu-title) {
// // color: rgba(255, 255, 255, 0.9) !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(.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;
}
}
// //*************************含tab的 list列表样式 */
// :deep(.tabListTable) {
// .ns-table-title {
// text-align: left;
// height: 46px;
// line-height: 46px;
// 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;
// }
// }
.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;
// //*********************详情页返回修改 */
// :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-title {
line-height: 16px;
font-size: 16px;
}
}
}
// .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;
: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;
}
}
// .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>

View File

@@ -0,0 +1,11 @@
import { BASE_URL } from './index';
export enum device {
queryDeviceTree = `${BASE_URL}/deviceInfo/queryDeviceTree`, // 左侧树
queryDevicePage = `${BASE_URL}/deviceInfo/queryDevicePage`, // 列表
dropArea = `${BASE_URL}/deviceInfo/dropArea`, // 查询下拉区域
}
export enum group {
queryDeviceGroupTree = `${BASE_URL}/deviceGroup/queryDeviceGroupTree`, // 左侧树
creatOrUpdate = `${BASE_URL}/deviceGroup/creatOrUpdate`, // 左侧树节点新增编辑
}

View File

@@ -4,3 +4,6 @@
export const apiModule = {
parking: ['User', 'CurrentUser', 'Organizational'],
};
export const BASE_URL = '/carbon-smart';
export const dict = `${BASE_URL}/client/dict/listByKey`;

View File

@@ -1,4 +1,37 @@
export const origanizemanage = {
userList: '/carbon-smart/api/user/queryUserByPage',
addUser: '/carbon-smart/api/user/save',
};
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`,
}

View File

@@ -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;
}

View File

@@ -0,0 +1,88 @@
<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="formVertical" />
</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;
};
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 } = props;
const requestConfig: HttpRequestConfig = { method: 'POST' };
const { params } = route;
httpRequest({ api, params: data, pathParams: params, requestConfig })
.then(() => {
NsMessage.success('操作成功', 1, () => {
toggle();
});
})
.finally(() => {
setLoading(false);
});
})
.catch(() => {});
};
const buttonProps = ref({
disabled: validateResult,
loading: false,
});
defineExpose({
toggle,
});
</script>
<style lang="less"></style>

View File

@@ -1,18 +1,24 @@
/** @format */
import { dateUtil } from '/nerv-lib/util/date-util';
import mockResource from './resource.json';
import { http } from '/nerv-lib/saas';
import { ref } from 'vue';
const value = ref('1');
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 selectDefaultValue = ref(ORGID);
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',
projectName: '济阳站_AI智能BAS系统',
enablePermissions: false,
// themeColor: '#eee',
siderPosition: 'left',
@@ -20,6 +26,7 @@ export const appConfig = {
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`,
},
// userCustomRouterGuard: (to, from, next, whiteNameList, authorizationStore, appConfig) => {
// console.log({ to, from, next, whiteNameList, authorizationStore, appConfig }, 'routeConfig');
@@ -28,53 +35,64 @@ export const appConfig = {
// customUpdatePwd: () => import('/@/view/updatePassword/updatePassword.vue'),
// userInfoApi: () => {
// return {
// code: 200,
// success: true,
// data: {
// accountCode: '1305107806187376793',
// accountName: 'adm*n',
// accountType: 'admin',
// accountStatus: 1,
// accountRealName: 'admin',
// organizationCode: 'dingcloud',
// authConfigList: [],
// organizeResCode: [],
// leadDepartmentUuidList: [],
// },
// };
// },
headerSlotConfig: {
component: 'NsSelect',
component: 'NsSelectApi',
componentProps: {
style: { width: '200px' },
style: { width: '200px', color: '#2778FF', marginRight: '10px' },
api: '/carbon-smart/user/login/logInInfo',
size: 'large',
defaultValue: selectDefaultValue,
// autoSelectFirst: true,
placeholder: '请选择',
value,
onChange: (cur) => {
value.value = cur;
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);
// value.value = cur;
},
options: [
{ label: '济阳', value: '1' },
{ label: '临沂', value: '2' },
],
resultField: 'data.linkList',
labelField: 'orgName',
valueField: 'orgId',
immediate: true,
dropdownReload: true,
},
},
timeout: 60 * 1000,
userLoginApi: '/carbon-smart/user/login',
userResourceApi: () => {
return { data: mockResource.menus };
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('userInfo')!);
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 http.post('/carbon-smart/user/login/logInInfo').then((res) => {
const info = res.data;
const trD = transform(info, {
accountCode: 'userId',
accountName: 'realName',
accountRealName: 'realName',
accountName: 'accountNo',
accountRealName: 'accountNo',
orgId: 'orgId',
orgName: 'orgName',
projectId: 'projectId',
linkList: 'linkList',
permissionVos: 'permissionVos',
});
sessionStorage.setItem('ORGID', info.orgId);
selectDefaultValue.value = info.orgId;
return { data: { ...trD } };
});
},
@@ -92,16 +110,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,
},
};

File diff suppressed because it is too large Load Diff

View 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);
}

View 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;

View File

@@ -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()],
]);

View 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

View 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

View 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

View 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

View File

@@ -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

View 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

View 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

View 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

View File

@@ -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

View File

@@ -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

View 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

View 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

View File

@@ -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,

View File

@@ -0,0 +1,29 @@
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: true,
// backApi: [],
},
},
],
},
],
};
export default equipmentControl;

View File

@@ -2,28 +2,67 @@ const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
const equipment = {
path: '/equipmentManage',
name: 'EquipmentManage',
meta: { title: '设备管理', icon: 'dicizhishou', index: 1 },
redirect: { name: 'homeIndex' },
meta: { title: '设备管理', icon: 'shebeiguanli', index: 1 },
redirect: { name: 'Ledger' },
children: [
{
path: 'ledger',
name: 'Ledger',
meta: { title: '设备台账', hideChildren: true, icon: 'dicizhishou' },
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: true,
backApi: [],
// 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: true,
// backApi: [],
},
},
],
},
// {
// 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: true,
// // backApi: [],
// },
// },
// ],
// },
],
};
export default equipment;

View File

@@ -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: true,
// // backApi: [],
// },
// },
// ],
},
],
};

View File

@@ -2,53 +2,36 @@ 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',
},
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' },
],
// backApi: [],
},
},
],
@@ -56,23 +39,18 @@ 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',
},
],
// backApi: [],
},
},
],

View File

@@ -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;
}

View File

@@ -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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

View File

@@ -0,0 +1,952 @@
// <style lang="less" scoped>
// :deep(.ant-transfer-list-content-item:not(.ant-transfer-list-content-item-disabled):hover){
// background-color: rgba(20,41,76,1);
// color:rgb(29, 83, 172)
// }
// :global(.ant-transfer-list-header-selected) {
// color: rgba(255, 83, 0)
// }
// :global(.ant-transfer-list-header > *:not(:last-child)) {
// color: rgba(255, 83, 0)
// }
// .tagtext {
// margin-left: 8px;
// }
// .light-tag {
// position: fixed;
// bottom: 135px;
// left: 450px;
// width: 396px;
// height: 200px;
// opacity: 0.8;
// border-radius: 8px;
// background: rgba(0, 0, 0, 1);
// }
// .light-tag-tit {
// display: flex;
// margin-top: 18px;
// margin-left: 18px;
// }
// .light-tag-box {
// padding: 15px 15px;
// }
// .light-tag-box>img {
// width: 120px;
// height: 51px;
// margin-bottom: 10px;
// }
// .light-tag-box>span {
// color: #fff;
// }
// .titleimg,
// .titletext {
// display: inline-block;
// align-items: center;
// justify-content: center;
// }
// .control-btn,
// .light-btn {
// display: inline-block;
// margin-top: 10px;
// }
// .controlarea-btn,
// .temp-btn {
// display: inline-block;
// margin-top: 16px;
// }
// :global(.ant-drawer-content) {
// background-color: rgba(0, 0, 0, 1);
// opacity: 0.8;
// }
// :global(.ant-modal-content) {
// background-color: rgba(0, 0, 0, 1);
// opacity: 0.8;
// }
// :deep(.ant-transfer-list) {
// width: 230px;
// height: 450px;
// }
// :deep(.ant-transfer-list-header) {
// background-color: rgba(0, 0, 0, 1);
// color: rgba(255, 255, 255, 1);
// }
// .bulbLogo1 {
// margin-top: 40%;
// margin-left: 12%;
// }
// .bulbLogo2 {
// margin-top: 35%;
// margin-left: 20%;
// }
// .bulbLogo3 {
// margin-top: 23%;
// margin-left: 10%;
// }
// .bulbLogo4 {
// margin-top: 10%;
// margin-left: 15%;
// }
// .bulbLogo5 {
// margin-top: 8%;
// margin-left: 13%;
// }
// .bulbLogo6 {
// margin-top: 8%;
// margin-left: 15%;
// }
// .bulbLogo7 {
// margin-top: 0%;
// margin-left: 12%;
// }
// .bulbLogo9 {
// margin-top: 35%;
// margin-left: 20%;
// }
// .bulbLogo10 {
// margin-top: 35%;
// margin-left: 20%;
// }
// .bulbLogo11 {
// margin-top: 35%;
// margin-left: 20%;
// }
// .bulbLogo12 {
// margin-top: 35%;
// margin-left: 20%;
// }
// .custom-table {
// border-collapse: collapse;
// width: 416px;
// height: 60px;
// color: rgba(255, 255, 255, 1);
// }
// .custom-table th,
// .custom-table td {
// border: 1px solid rgba(163, 192, 243, 1);
// text-align: left;
// padding: 8px;
// text-align: center;
// }
// .table1 {
// margin-top: 20px;
// width: 100%;
// cellspacing: 0;
// cellpadding: 0;
// border: 1px solid rgba(255, 255, 255);
// border-radius: 5px;
// background: rgba(255, 255, 255, 0.1);
// }
// .lightarea,
// .circuitarea,
// .controlarea,
// .controlscenearea,
// .lightparametersarea {
// width: 100%;
// margin-top: 20px;
// display: flex;
// align-items: center;
// }
// .lightareatab,
// .circuittab,
// .controltab,
// .controlscenetab,
// .lightparameterstab {
// width: 5px;
// height: 23px;
// opacity: 1;
// background: rgba(26, 174, 251, 1);
// margin-right: 4px;
// }
// .lightareatext,
// .circuittext,
// .controltext,
// .controlscenetext,
// .lightparameterstext {
// font-size: 14px;
// color: rgba(255, 255, 255, 1);
// line-height: 19px;
// width: 110px;
// height: 23px;
// opacity: 1;
// background: linear-gradient(270deg,
// rgba(86, 221, 253, 0) 0%,
// rgba(25, 176, 255, 1) 100%);
// }
// .lightareatab,
// .lightareatext {
// display: inline-block;
// justify-content: center;
// }
// .plan.enabled {
// border: none;
// font-size: 14px;
// font-weight: 400;
// border-radius: 5px;
// color: rgba(255, 255, 255, 1);
// vertical-align: top;
// margin-left: 235px;
// width: 88px;
// height: 32px;
// background: linear-gradient(180deg, rgba(103, 222, 0, 1) 0%, rgba(0, 181, 6, 1) 100%);
// color: white;
// }
// .plan.disabled {
// border: none;
// font-size: 14px;
// font-weight: 400;
// border-radius: 5px;
// color: rgba(255, 255, 255, 1);
// vertical-align: top;
// margin-left: 235px;
// width: 88px;
// height: 32px;
// background-color: red;
// }
// .plan:disabled {
// cursor: not-allowed;
// }
// .openplan.enabled2 {
// border: none;
// font-size: 14px;
// font-weight: 400;
// border-radius: 5px;
// color: rgba(255, 255, 255, 1);
// vertical-align: top;
// width: 88px;
// height: 32px;
// background: linear-gradient(180deg, rgba(103, 222, 0, 1) 0%, rgba(0, 181, 6, 1) 100%);
// color: white;
// }
// .openplan.disabled2 {
// border: none;
// font-size: 14px;
// font-weight: 400;
// border-radius: 5px;
// color: rgba(255, 255, 255, 1);
// vertical-align: top;
// width: 88px;
// height: 32px;
// background-color: red;
// }
// .openplan:disabled {
// cursor: not-allowed;
// }
// .btn2 {
// display: flex;
// align-items: center;
// margin-left: 80px;
// }
// .openzm {
// color: rgba(34, 183, 255, 1);
// margin-left: 20px;
// font-size: 14px;
// }
// .custom-checkbox {
// width: 13px;
// height: 13px;
// }
// .both {
// width: 59.79px;
// height: 32px;
// opacity: 1;
// background: linear-gradient(180deg,
// rgba(255, 187, 0, 1) 0%,
// rgba(255, 112, 3, 1) 91.21%,
// rgba(255, 129, 3, 1) 100%);
// margin-left: 8px;
// font-size: 12px;
// color: rgba(255, 255, 255, 1);
// border: none;
// border-radius: 5px;
// }
// .btn2 {
// button {
// margin: 0 5px;
// }
// }
// .allbtn {
// border: 0;
// width: 40px;
// color: rgba(255, 255, 255, 1);
// background-color: transparent;
// }
// .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;
// }
// p {
// color: rgba(255, 255, 255, 1);
// }
// .area,
// .btnarea,
// .controlmodebtnarea,
// .controlscenebtnarea {
// margin-left: -17px;
// button {
// width: 21%;
// padding: 0 2%;
// }
// }
// .btn {
// width: 92px;
// height: 40px;
// border-radius: 4px;
// opacity: 1;
// margin-top: 10px;
// margin-left: 17px;
// font-size: 14px;
// font-weight: 400;
// opacity: 1;
// border: 1px solid rgba(207, 212, 219, 1);
// line-height: 20.27px;
// color: rgba(255, 255, 255, 1);
// text-align: center;
// vertical-align: top;
// background-color: rgba(255, 255, 255, 0.1);
// }
// .selected {
// background: linear-gradient(180deg,
// rgba(201, 245, 255, 1) 0%,
// rgba(138, 215, 255, 1) 100%);
// color: rgba(0, 61, 90, 1);
// border: 1px solid rgba(255, 255, 255, 1);
// }
// .btn:hover {
// background-color: rgba(207, 212, 219, 1);
// }
// .btn:active {
// background-color: rgba(102, 102, 102, 1);
// color: white;
// }
// .circuitarea,
// .controlscenearea,
// .lightparametersarea {
// left: 51px;
// width: 100%;
// margin-top: 20px;
// }
// .circuittab,
// .circuittext {
// display: inline-block;
// }
// .batch {
// width: 60px;
// height: 32px;
// opacity: 1;
// border: 1px solid rgba(67, 136, 251, 1);
// color: rgba(67, 136, 251, 1);
// border-radius: 5px;
// background-color: rgba(255, 255, 255, 1);
// margin-left: 11px;
// }
// .controlarea {
// left: 51px;
// width: 100%;
// margin-top: 20px;
// }
// .controltab,
// .controltext {
// display: inline-block;
// }
// :deep(.cell) {
// text-align: center;
// }
// :deep(#pane-first) {
// height: 100%;
// }
// .controlscenetab,
// .controlscenetext {
// display: inline-block;
// }
// .lightparameterstab,
// .lightparameterstext {
// display: inline-block;
// }
// .lightparameterstextarea>p {
// height: 100%;
// display: flex;
// border: 1px solid rgba(236, 239, 245, 1);
// justify-content: center;
// align-items: center;
// }
// .bottom {
// width: 100%;
// height: 64px;
// display: flex;
// justify-content: flex-end;
// align-items: center;
// position: fixed;
// bottom: 0;
// right: 0;
// margin-bottom: 10px;
// }
// .execute {
// margin-right: 20px;
// width: 74px;
// height: 40px;
// opacity: 1;
// border-radius: 4px;
// background: rgba(67, 136, 251, 1);
// font-size: 14px;
// font-weight: 400;
// color: rgba(255, 255, 255, 1);
// border: 0;
// margin-left: 10px;
// }
// .flushed {
// width: 74px;
// height: 40px;
// opacity: 1;
// border-radius: 4px;
// font-size: 14px;
// font-weight: 400;
// color: rgba(102, 102, 102, 1);
// background: rgba(255, 255, 255, 1);
// border: 1px solid rgba(193, 197, 204, 1);
// }
// .tabreboot,
// .tabdelete {
// border: none;
// background-color: rgba(0,0,0,0);
// font-size: 14px;
// font-weight: 400;
// letter-spacing: 0;
// line-height: 20px;
// color: rgba(67, 136, 251, 1);
// }
// .tabreboot {
// margin-right: 8px;
// }
// .add {
// width: 74px;
// height: 40px;
// opacity: 1;
// border-radius: 4px;
// background: rgba(67, 136, 251, 1);
// border: rgba(67, 136, 251, 1);
// font-size: 14px;
// font-weight: 400;
// color: rgba(255, 255, 255, 1);
// }
// .divadd {
// width: 100%;
// height: 64px;
// display: flex;
// justify-content: flex-end;
// align-items: center;
// position: fixed;
// bottom: 0;
// right: 0;
// margin-bottom: 10px;
// margin-right: 20px;
// }
// .atable {
// margin-top: 20px;
// }
// :deep(.ant-table-pagination) {
// visibility: hidden;
// }
// .drawer-content {
// margin-left: 20px;
// }
// .arrow-indicator {
// position: absolute;
// top: 50%;
// left: 0;
// transform: translateY(-50%);
// z-index: 1;
// }
// .drawer-title1 {
// position: fixed;
// width: 33px;
// height: 33px;
// top: 0;
// bottom: 0;
// right: 20px;
// margin: auto;
// z-index: 99999;
// }
// .drawer-title2 {
// position: fixed;
// width: 33px;
// height: 33px;
// top: 0;
// bottom: 0;
// right: 495px;
// margin: auto;
// z-index: 99999;
// }
// .arrowbtn {
// display: flex;
// justify-content: center;
// align-items: center;
// width: 28px;
// height: 28px;
// background: rgba(0, 0, 0, 1);
// opacity: 0.5;
// border: none;
// }
// :deep(.ant-tabs-tab-btn) {
// color: white;
// }
// :deep(.ant-table) {
// background-color: transparent;
// }
// :deep(.ant-table-bordered) {
// background-color: transparent;
// }
// :deep(.ant-table-thead) {
// background-color: transparent;
// }
// :deep(.ant-table-cell) {
// background-color: transparent;
// color: #fff;
// }
// .lighting-img-box {
// width: 100%;
// max-height: calc(100% - 79px);
// }
// .lighting-img-box>img {
// width: 100%;
// height: calc(100vh - 96px);
// object-fit: cover;
// }
// .F1 {
// width: 120px;
// height: 50.72px;
// border-radius: 4px;
// background: rgba(39, 120, 255, 1);
// border: 1px solid rgba(51, 199, 255, 1);
// box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3);
// font-size: 24px;
// font-weight: 400;
// color: rgba(255, 255, 255, 1);
// }
// .F2,
// .platform {
// width: 120px;
// height: 50.72px;
// border-radius: 4px;
// background: rgba(7, 72, 116, 1);
// box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3);
// font-size: 24px;
// font-weight: 400;
// color: rgba(146, 187, 255, 1);
// border: 1px solid rgba(39, 120, 255, 1);
// margin-top: 20px;
// }
// .btn-box {
// position: fixed;
// top: 100px;
// left: 250px;
// }
// .lighting-img-box>.bulbBox>.wh100 {
// width: 38px;
// height: calc(38px + 19px);
// }
// .lighting-img-box>.bulbBox>.bulbLogo1 {
// position: absolute;
// top: 10%;
// left: 10%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo2 {
// position: absolute;
// top: 9%;
// left: 15%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo3 {
// position: absolute;
// top: 34%;
// left: 25%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo4 {
// position: absolute;
// top: 45%;
// left: 30%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo5 {
// position: absolute;
// top: 45%;
// left: 30%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo6 {
// position: absolute;
// top: 55%;
// left: 30%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo7 {
// position: absolute;
// top: 60%;
// left: 40%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo8 {
// position: absolute;
// top: 55%;
// left: 70%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo9 {
// position: absolute;
// top: 10%;
// left: 60%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo10 {
// position: absolute;
// top: 10%;
// left: 40%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo11 {
// position: absolute;
// top: 15%;
// left: 50%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo12 {
// position: absolute;
// top: 15%;
// left: 60%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo13 {
// position: absolute;
// top: 55%;
// left: 70%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo14 {
// position: absolute;
// top: 45%;
// left: 60%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo15 {
// position: absolute;
// top: 45%;
// left: 80%;
// display: flex;
// align-items: center;
// }
// .lighting-img-box>.bulbBox>.bulbLogo16 {
// position: absolute;
// top: 45%;
// left: 90%;
// display: flex;
// align-items: center;
// }
// .editable-cell {
// position: relative;
// .editable-cell-input-wrapper,
// .editable-cell-text-wrapper {
// padding-right: 24px;
// }
// .editable-cell-text-wrapper {
// padding: 5px 24px 5px 5px;
// }
// .editable-cell-icon,
// .editable-cell-icon-check {
// position: absolute;
// right: 0;
// width: 20px;
// cursor: pointer;
// }
// .editable-cell-icon {
// margin-top: 4px;
// display: none;
// }
// .editable-cell-icon-check {
// line-height: 28px;
// }
// .editable-cell-icon:hover,
// .editable-cell-icon-check:hover {
// color: #108ee9;
// }
// .editable-add-btn {
// margin-bottom: 8px;
// }
// }
// .editable-cell:hover .editable-cell-icon {
// display: inline-block;
// }
// .div-operation {
// width: 3px;
// height: 13px;
// opacity: 1;
// border-radius: 1px;
// background: rgba(67, 136, 251, 1);
// }
// .text-operation {
// color: rgba(255, 255, 255, 1);
// font-size: 16px;
// font-weight: 700;
// margin-left: 5px;
// }
// .div-operation,
// .text-operation {
// display: inline-block;
// }
// .jbox {
// background-color: #000;
// opacity: 1;
// z-index: 99999;
// }
// .journal {
// padding: 3% 5%;
// background-size: 450px 177px;
// width: 482px;
// height: 177px;
// background-color: rgba(0, 0, 0);
// border-radius: 12px;
// border: 2px solid transparent;
// border-image: linear-gradient(to bottom, #0077FF, #00F6FF, #000000) 1;
// }
// .imgText {
// display: flex;
// align-items: center;
// justify-content: space-between;
// .ztzm {
// display: flex;
// align-items: center;
// }
// .cxbtn {
// color: rgba(255, 255, 255, 1);
// border: none;
// border-radius: 6px;
// width: 59.79px;
// height: 32px;
// opacity: 1;
// background: linear-gradient(180deg,
// rgba(255, 187, 0, 1) 0%,
// rgba(255, 112, 3, 1) 91.21%,
// rgba(255, 129, 3, 1) 100%);
// }
// }
// :deep(.ant-modal-content) {
// width: 555px;
// height: 792px;
// }
// :deep(.ant-modal-body) {
// width: 555px;
// max-height: 792px !important;
// box-sizing: border-box;
// }
// .text-change {
// text-align: center;
// color: rgba(255, 255, 255, 1);
// font-size: 20px;
// }
// .excuno {
// width: 150px;
// height: 40px;
// margin-top: 30px;
// }
// .excuok {
// width: 150px;
// height: 40px;
// margin-top: 30px;
// }
// .excubtn {
// display: flex;
// justify-content: space-between;
// }
// .addok {
// width: 74px;
// height: 40px;
// opacity: 1;
// border-radius: 4px;
// background: rgba(67, 136, 251, 1);
// border: rgba(67, 136, 251, 1);
// font-size: 14px;
// font-weight: 400;
// color: rgba(255, 255, 255, 1);
// margin-top: 440px;
// margin-left: 350px;
// }
// .zmhlbtn {
// position: relative;
// }
// .anticon-stop {
// position: absolute;
// right: 3px;
// bottom: 3px;
// }
// .istrindex {
// background: rgba(67, 136, 251, 1);
// }
// :deep(.ant-modal-mask.ant-modal-content) {
// height: 100vh;
// position: fixed;
// right: 496px;
// top: 0%;
// }
// :global(.ant-modal-content) {
// position: fixed;
// bottom: 20px;
// right: 500px;
// }
// </style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,232 @@
import { dateUtil } from '/nerv-lib/util/date-util';
import data from './mock.json';
import { cloneDeep } from 'lodash-es';
import { ref } from 'vue';
const columns = [
{
title: '能源种类',
dataIndex: '能源种类',
},
{
title: '计量单位',
dataIndex: '计量单位',
},
{
title: '速算系数',
dataIndex: '速算系数',
},
{
title: '全年',
dataIndex: '全年',
},
{
title: '1月',
dataIndex: '1月',
},
{
title: '2月',
dataIndex: '2月',
},
{
title: '3月',
dataIndex: '3月',
},
{
title: '4月',
dataIndex: '4月',
},
{
title: '5月',
dataIndex: '5月',
},
{
title: '6月',
dataIndex: '6月',
},
{
title: '7月',
dataIndex: '7月',
},
{
title: '8月',
dataIndex: '8月',
},
{
title: '9月',
dataIndex: '9月',
},
{
title: '10月',
dataIndex: '10月',
},
{
title: '11月',
dataIndex: '11月',
},
{
title: '12月',
dataIndex: '12月',
},
];
const formConfig = {
schemas: [
{
field: 'time',
label: '年份',
component: 'NsDatePicker',
componentProps: {
picker: 'year',
valueFormat: 'YYYY-MM-DD',
},
},
],
params: {},
};
const mockData = ref(cloneDeep(data.dataSource));
const doWnload = (url) => {
const a = document.createElement('a');
document.body.appendChild(a);
a.href = encodeURI(url);
//设置下载的文件名
// a.download = fileName.value;
//触发a标签的点击事件进行下载
a.click();
};
export const tableConfig1 = (el, fileDownRef) => {
return {
title: '能耗',
value: mockData.value,
rowSelection: null,
columns,
formConfig,
headerActions: [
{
label: '新增',
name: 'groupEdit',
type: 'primary',
handle: (a, b) => {
el.value.toggle();
},
},
{
label: '导入',
name: 'groupImport',
type: 'primary',
extra: {
// api: props.postImportApi, // 导入接口名
title: '设备信息', // 弹窗title
templateName: 'whiteListUser', // 所使用的文件名称
indexName: '设备id', // 匹配类型字段
message: [
{ label: '1、若必填项未填写则不能进行导入操作' },
{ label: `2、当重复时则更新数据。` },
{ label: '3、数据将从模版的第五行进行导入。' },
{ label: '4、文件导入勿超过5MB。' },
],
},
},
{
label: '导出',
name: 'groupExports',
type: 'primary',
handle: () => {
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
{
label: '模板下载',
name: 'groupTemDownload',
type: 'primary',
handle: () => {
// http.get('/asset/file/whiteListUser.xlsx');
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
{
label: '上传凭证',
name: 'groupImport',
type: 'primary',
extra: {
// api: props.postImportApi, // 导入接口名
title: '设备信息', // 弹窗title
templateName: 'whiteListUser', // 所使用的文件名称
indexName: '设备id', // 匹配类型字段
message: [
{ label: '1、若必填项未填写则不能进行导入操作' },
{ label: `2、当重复时则更新数据。` },
{ label: '3、数据将从模版的第五行进行导入。' },
{ label: '4、文件导入勿超过5MB。' },
],
},
},
{
label: '凭证下载',
name: 'groupTemDownload',
type: 'primary',
handle: () => {
fileDownRef.value.toggle();
},
},
],
columnActions: {
title: '操作',
actions: [
{
label: '编辑',
name: 'edit',
handle: () => {
mockData.value.splice(0, 1);
},
},
{
label: '删除',
name: 'FeedBackDetail',
dynamicParams: ['uuid', 'appealType'],
confirm: true,
handle: () => {
mockData.value.splice(0, 1);
},
},
],
},
};
};
export const tableConfig2 = {
title: '碳排',
value: data.dataSource,
rowSelection: null,
columns,
formConfig,
headerActions: [
{
label: '导出',
name: 'groupTemDownload',
type: 'primary',
handle: () => {
// http.get('/asset/file/whiteListUser.xlsx');
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
],
};
export const tableConfig3 = {
title: '标煤',
value: data.dataSource,
rowSelection: null,
columns,
formConfig,
headerActions: [
{
label: '导出',
name: 'groupTemDownload',
type: 'primary',
handle: () => {
// http.get('/asset/file/whiteListUser.xlsx');
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
],
};

View File

@@ -0,0 +1,116 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
title="新增"
:ok="btnClick"
:cancel="() => (visible = false)"
placement="right">
<ns-view-list-table v-bind="tableConfig" />
</ns-drawer>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { NsMessage } from '/nerv-lib/component';
const visible = ref(false);
const model = ref({});
const toggle = () => {
visible.value = !visible.value;
};
const doWnload = (url) => {
const a = document.createElement('a');
document.body.appendChild(a);
a.href = encodeURI(url);
//设置下载的文件名
// a.download = fileName.value;
//触发a标签的点击事件进行下载
a.click();
};
const mockDataSource = ref([
{
type: '电力',
fileName: '电力_2024.pdf',
},
{
type: '水',
fileName: '电力_2024.pdf',
},
{
type: '天然气',
fileName: '电力_2024.pdf',
},
{
type: '汽油',
fileName: '电力_2024.pdf',
},
{
type: '煤油',
fileName: '电力_2024.pdf',
},
]);
const tableConfig = {
value: mockDataSource.value,
sticky: false,
rowKey: 'type',
columns: [
{
title: '序号',
dataIndex: 'index',
customRender: ({ index }) => index + 1,
},
{
title: '能源类型',
dataIndex: 'type',
},
{
title: '文件名',
dataIndex: 'fileName',
},
],
headerActions: [
{
label: '批量下载',
name: 'groupTemDownload',
type: 'primary',
handle: () => {
// http.get('/asset/file/whiteListUser.xlsx');
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
],
columnActions: {
title: '操作',
actions: [
{
label: '下载',
name: 'groupTemDownload',
handle: () => {
// http.get('/asset/file/whiteListUser.xlsx');
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
],
},
};
const btnClick = () => {
visible.value = false;
NsMessage.success('操作成功');
};
defineExpose({
toggle,
});
</script>
<style scoped lang="less">
:deep(.ns-table-header) {
min-width: 200px;
}
:deep(.ns-table-container),
:deep(.ns-table-main) {
border-top: 0px !important;
}
</style>

View File

@@ -0,0 +1,28 @@
<template>
<div>
<a-tabs>
<a-tab-pane v-for="(item, index) in tabList" :key="index" v-bind="item">
<ns-view-list-table v-bind="item.config" />
</a-tab-pane>
</a-tabs>
<opForm ref="opFormRef" />
<fileDown ref="fileDownRef" />
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { tableConfig1, tableConfig2, tableConfig3 } from './config';
import opForm from './op.vue';
import fileDown from './fileDown.vue';
const opFormRef = ref();
const fileDownRef = ref();
const tabList = [
{ tab: '能耗', config: tableConfig1(opFormRef, fileDownRef) },
{ tab: '碳排', config: tableConfig2 },
{ tab: '标煤', config: tableConfig3 },
];
defineOptions({
name: 'EnergyMappingIndex', // 与页面路由name一致缓存才可生效
});
</script>
<style lang="less" scoped></style>

View File

@@ -0,0 +1,10 @@
{
"dataSource":[
{"序号": "1", "能源种类": "电力", "计量单位": "tce", "速算系数": "0.5tce/kWh", "全年": "19900", "1月": "10000", "2月": "9900", "3月": "", "4月": "", "5月": "", "6月": "", "7月": "", "8月": "", "9月": "", "10月": "", "11月": "", "12月": ""},
{"序号": "2", "能源种类": "水", "计量单位": "tce", "速算系数": "0.5tce/t", "全年": "16500", "1月": "8000", "2月": "8500", "3月": "", "4月": "", "5月": "", "6月": "", "7月": "", "8月": "", "9月": "", "10月": "", "11月": "", "12月": ""},
{"序号": "3", "能源种类": "天然气", "计量单位": "tce", "速算系数": "0.5tce/𝑚3/m3", "全年": "590", "1月": "300", "2月": "290", "3月": "", "4月": "", "5月": "", "6月": "", "7月": "", "8月": "", "9月": "", "10月": "", "11月": "", "12月": ""},
{"序号": "4", "能源种类": "汽油", "计量单位": "tce", "速算系数": "0.5tce/𝑚3/m3", "全年": "330", "1月": "150", "2月": "180", "3月": "", "4月": "", "5月": "", "6月": "", "7月": "", "8月": "", "9月": "", "10月": "", "11月": "", "12月": ""},
{"序号": "5", "能源种类": "煤油", "计量单位": "tce", "速算系数": "0.5tce/t", "全年": "43", "1月": "20", "2月": "23", "3月": "", "4月": "", "5月": "", "6月": "", "7月": "", "8月": "", "9月": "", "10月": "", "11月": "", "12月": ""}
]
}

View File

@@ -0,0 +1,135 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
title="新增"
:ok="btnClick"
:cancel="() => (visible = false)"
placement="right">
<a-tabs>
<a-tab-pane class="pane" key="1" tab="能源种类">
<ns-form :schemas="schemas" :model="model" formLayout="vertical" />
</a-tab-pane>
<a-tab-pane class="pane" key="2" tab="能耗统计">
<ns-basic-table v-bind="tableConfig" formLayout="vertical" />
</a-tab-pane>
</a-tabs>
</ns-drawer>
</template>
<script lang="ts" setup>
import { createVNode, ref, toRef, toRefs } from 'vue';
import { NsMessage } from '/nerv-lib/component';
import { Switch } from 'ant-design-vue';
const visible = ref(false);
const model = ref({});
const toggle = () => {
visible.value = !visible.value;
};
const mockDataSource = ref([]);
for (let index = 0; index < 12; index++) {
mockDataSource.value.push({ type: '手动', op: true });
}
const schemas = [
{
label: '能源种类',
field: 'formula1',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
},
rules: [{ required: true }],
},
{
label: '计量单位',
field: 'formula2',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
},
rules: [{ required: true }],
},
{
label: '计算碳排',
field: 'formula3',
component: 'NsRadioGroup',
defaultValue: 1,
componentProps: {
radioType: 'radio',
options: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
],
},
rules: [{ required: true }],
},
{
label: '计算标煤',
field: 'formula4',
component: 'NsRadioGroup',
defaultValue: 1,
componentProps: {
radioType: 'radio',
options: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
],
},
rules: [{ required: true }],
},
{
label: '采集节点',
field: 'formula5',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
},
},
];
const tableConfig = {
dataSource: mockDataSource.value,
pagination: false,
rowKey: (record) => record.groupName,
columns: [
{
title: '月份',
dataIndex: 'month',
customRender: ({ index }) => index + 1 + '月',
width: 80,
align: 'center',
},
{
title: '汇总方式',
dataIndex: 'type',
align: 'center',
},
{
title: '操作',
dataIndex: 'op',
align: 'center',
customRender: (data) =>
createVNode(Switch, {
checked: Boolean(data.record.op),
onChange: (val) => {
setTimeout(() => {
data.record.op = val;
}, 10);
},
}),
},
],
};
const btnClick = () => {
visible.value = false;
NsMessage.success('操作成功');
};
defineExpose({
toggle,
});
</script>
<style scoped lang="less">
.pane {
margin-top: 16px;
}
</style>

View File

@@ -0,0 +1,431 @@
import { dateUtil } from '/nerv-lib/util/date-util';
import data from './mock.json';
import { http } from '/nerv-lib/util';
import { ref } from 'vue';
import { group } from '/@/api/deviceManage';
import { dict } from '/@/api';
const tableKeyMap = [
{
title: '来源企业',
dataIndex: 'id',
},
{
title: '设备id',
dataIndex: 'deviceCode',
},
{
title: '设备编号',
dataIndex: 'deviceName',
textNumber: 8,
textEllipsis: true,
},
{
title: '分组名称',
dataIndex: 'position',
},
{
title: '设备品牌/型号',
dataIndex: 'position',
},
{
title: '设备状态',
dataIndex: 'position',
},
];
const tableCalKeyMap = [
{
title: '来源企业',
dataIndex: 'id',
},
{
title: '节点编号',
dataIndex: 'deviceName',
textNumber: 8,
textEllipsis: true,
},
{
title: '节点路径',
dataIndex: 'position',
},
];
const doWnload = (url) => {
const a = document.createElement('a');
document.body.appendChild(a);
a.href = encodeURI(url);
//设置下载的文件名
// a.download = fileName.value;
//触发a标签的点击事件进行下载
a.click();
};
const mockData = ref(data.listData);
export const formSchema = [
{
field: 'isCreate',
component: 'NsInput',
show: false,
},
{
field: 'orgId',
component: 'NsInput',
show: false,
},
{
field: 'isCreatSon',
component: 'NsInput',
show: false,
},
{
label: '节点名称',
field: 'pointName',
component: 'NsInput',
componentProps: {
placeholder: '请输入节点名称(必填)',
},
rules: [
{
required: true,
message: '请输入节点名称',
},
],
},
{
label: '节点类型',
field: 'pointType',
component: 'NsSelectApi',
componentProps: {
placeholder: '请选择节点类型(必填)',
api: dict,
params: { dicKey: 'COUNT_POINT' },
immediate: true,
resultField: 'data.COUNT_POINT',
labelField: 'cnValue',
valueField: 'cnValue',
},
rules: [
{
required: true,
message: '请输入节点类型',
},
],
},
];
export const treeConfig = (orgId) => {
return {
defaultExpandAll: true,
header: {
icon: 'orgLink',
title: '能耗分组',
},
params: { orgId },
api: group.queryDeviceGroupTree,
// api: () => {
// return new Promise((resolve) => {
// setTimeout(() => {
// resolve({ data: [{ title: '全部', key: 'all', children: data.data }] });
// }, 100);
// });
// },
transform: (data) => {
return [{ title: '全部', key: 'all', selectable: false, children: data }];
},
formConfig: {
schemas: [
{
field: 'energyType',
label: '',
component: 'NsSelectApi',
autoSubmit: true,
componentProps: {
api: dict,
params: { dicKey: 'ENERGY_TYPE' },
immediate: true,
resultField: 'data.ENERGY_TYPE',
labelField: 'cnValue',
valueField: 'cnValue',
placeholder: '请选择能耗种类',
},
},
{
field: 'pointName',
label: '',
component: 'NsInput',
autoSubmit: true,
componentProps: {
placeholder: '请输入节点名称',
},
},
],
},
};
};
export const tableConfig = (el, elGroup, elFormula) => {
return {
title: '点位信息',
// api: '/carbon_emission/device/getDeviceList',
value: mockData.value,
headerActions: [
{
label: '编辑',
name: 'groupEdit',
type: 'primary',
handle: (a, b) => {
el.value.toggle();
},
},
{
label: '批量删除',
name: 'groupTemDownload',
type: 'primary',
dynamicDisabled: (data: any) => {
return data.list.length === 0;
},
handle: () => {
mockData.value.splice(0, 2);
},
},
{
label: '批量导出',
name: 'groupExports',
type: 'primary',
dynamicDisabled: (data: any) => {
return data.list.length === 0;
},
extra: {
xlsxMap: tableKeyMap,
xlsxName: '分组信息YYYY-MM-DD',
},
},
{
label: '批量导入',
name: 'groupImport',
type: 'primary',
extra: {
// api: props.postImportApi, // 导入接口名
title: '设备信息', // 弹窗title
templateName: 'whiteListUser', // 所使用的文件名称
indexName: '设备id', // 匹配类型字段
message: [
{ label: '1、若必填项未填写则不能进行导入操作' },
{ label: `2、当重复时则更新数据。` },
{ label: '3、数据将从模版的第五行进行导入。' },
{ label: '4、文件导入勿超过5MB。' },
],
},
},
{
label: '模板下载',
name: 'groupTemDownload',
type: 'primary',
handle: () => {
// http.get('/asset/file/whiteListUser.xlsx');
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
{
label: '批量分组',
name: 'groupTemDownload',
type: 'primary',
handle: () => {
elGroup.value.toggle();
},
},
{
label: '公式编辑',
name: 'groupTemDownload',
type: 'primary',
handle: () => {
elFormula.value.toggle();
},
},
],
columns: tableKeyMap,
columnActions: {
title: '操作',
actions: [
{
label: '删除',
name: 'FeedBackDetail',
dynamicParams: ['uuid', 'appealType'],
confirm: true,
handle: () => {
mockData.value.splice(0, 1);
},
},
],
},
formConfig: {
schemas: [
{
field: 'name',
label: '设备名称',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
},
},
{
field: 'provider',
label: '设备厂商',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
},
},
{
field: 'payWay',
label: '设备区域',
component: 'NsSelect',
componentProps: {
placeholder: '请选择',
options: [
{
label: '全部',
value: '',
},
],
},
},
{
field: 'createTime',
label: '生产日期',
component: 'NsRangePicker',
fieldMap: ['queryStartDate', 'queryEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'createTime1',
label: '采购日期',
component: 'NsRangePicker',
fieldMap: ['queryStartDate', 'queryEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
},
},
{
field: 'createTime2',
label: '启用日期',
component: 'NsRangePicker',
fieldMap: ['queryStartDate', 'queryEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
},
},
],
},
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};
};
export const tableConfigCal = (el, elGroup, elFormula) => {
return {
title: '点位信息',
// api: '/carbon_emission/device/getDeviceList',
value: mockData.value,
headerActions: [
{
label: '编辑',
name: 'groupEdit',
type: 'primary',
handle: (a, b) => {
el.value.toggle();
},
},
{
label: '批量删除',
name: 'groupTemDownload',
type: 'primary',
dynamicDisabled: (data: any) => {
return data.list.length === 0;
},
handle: () => {
mockData.value.splice(0, 2);
},
},
{
label: '批量导出',
name: 'groupExports',
type: 'primary',
dynamicDisabled: (data: any) => {
return data.list.length === 0;
},
extra: {
xlsxMap: tableKeyMap,
xlsxName: '分组信息YYYY-MM-DD',
},
},
{
label: '批量导入',
name: 'groupImport',
type: 'primary',
extra: {
// api: props.postImportApi, // 导入接口名
title: '设备信息', // 弹窗title
templateName: 'whiteListUser', // 所使用的文件名称
indexName: '设备id', // 匹配类型字段
message: [
{ label: '1、若必填项未填写则不能进行导入操作' },
{ label: `2、当重复时则更新数据。` },
{ label: '3、数据将从模版的第五行进行导入。' },
{ label: '4、文件导入勿超过5MB。' },
],
},
},
{
label: '模板下载',
name: 'groupTemDownload',
type: 'primary',
handle: () => {
// http.get('/asset/file/whiteListUser.xlsx');
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
],
columns: tableCalKeyMap,
columnActions: {
title: '操作',
actions: [
{
label: '删除',
name: 'FeedBackDetail',
dynamicParams: ['uuid', 'appealType'],
confirm: true,
handle: () => {
mockData.value.splice(0, 1);
},
},
],
},
formConfig: {
schemas: [
{
field: 'name',
label: '设备名称',
component: 'NsInput',
componentProps: {
placeholder: '请选择公司',
},
},
{
field: 'provider',
component: 'NsInput',
componentProps: {
placeholder: '请输入节点编号',
},
},
],
},
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};
};

View File

@@ -0,0 +1,96 @@
<template>
<ns-drawer
v-model:visible="visible"
size="large"
class="custom-class"
title="编辑"
:ok="btnClick"
:cancel="() => (visible = false)"
placement="right">
<div class="drawerContainer">
<ns-tree-api v-bind="treeConfig" @select="treeSelect" />
<a-transfer
v-model:target-keys="targetKeys"
:data-source="mockData"
style="height: 100%; width: 66%"
:listStyle="listStyle"
show-search
:filter-option="filterOption"
:render="(item) => item.title" />
</div>
</ns-drawer>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { NsMessage } from '/nerv-lib/component';
import { treeConfig } from './config';
const visible = ref(false);
const mockData = ref([]);
const listStyle = {
height: '100%',
width: '100%',
};
const targetKeys = ref<string[]>([]);
const toggle = () => {
visible.value = !visible.value;
};
onMounted(() => {
getMock('上海公司');
});
const filterOption = (inputValue: string, option: MockData) => {
return option.description.indexOf(inputValue) > -1;
};
const btnClick = () => {
visible.value = false;
NsMessage.success('编辑成功');
};
function treeSelect(
selectedKeys: never[],
e: {
selected: boolean;
selectedNodes: { props: { dataRef: any } }[];
node: any;
event: any;
},
) {
console.log(selectedKeys, e);
const {
dataRef: { title },
} = e.node;
getMock(title);
}
const getMock = (company) => {
const keys = [];
const mData = [];
for (let i = 0; i < 60; i++) {
const data = {
key: i.toString(),
title: `A00${i + 1}总用电量(${company})`,
description: `description of content${i + 1}`,
chosen: Math.random() * 2 > 1,
};
if (data.chosen) {
keys.push(data.key);
}
mData.push(data);
}
mockData.value = mData;
targetKeys.value = keys;
};
defineExpose({
toggle,
});
</script>
<style scoped lang="less">
.drawerContainer {
height: 100%;
display: flex;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,120 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
title="公式编辑"
:ok="btnClick"
:cancel="() => (visible = false)"
placement="right">
<ns-form :schemas="schemas" :model="model" formLayout="vertical" />
</ns-drawer>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { NsMessage } from '/nerv-lib/component';
const visible = ref(false);
const model = ref({});
const toggle = () => {
visible.value = !visible.value;
};
const mockDataSource = ref([
{
groupName: '1号厂区',
},
{
groupName: '2号厂区',
},
{
groupName: '3号厂区',
},
]);
const schemas = [
{
field: 'basicInfo',
label: '',
displayFormItem: false,
class: 'ns-form-item-full',
component: 'NsChildForm',
componentProps: {
title: '公式编辑',
schemas: [
{
label: '',
field: 'formula',
component: 'NsTextarea',
defaultValue: '(A+B)*2',
formItemProps: {
wrapperCol: { span: 24 },
},
componentProps: {
placeholder: '请输入',
autoSize: {
minRows: 6,
maxRows: 6,
},
},
},
],
},
},
{
field: 'list',
label: '',
displayFormItem: false,
class: 'ns-form-item-full',
component: 'NsChildForm',
componentProps: {
title: '分组列表',
schemas: [
{
label: '',
field: 'NsBasicTable',
component: 'NsBasicTable',
formItemProps: {
wrapperCol: { span: 24 },
},
componentProps: {
disabled: true,
placeholder: '请输入',
dataSource: mockDataSource.value,
pagination: false,
rowKey: (record) => record.groupName,
columns: [
{
title: '序号',
dataIndex: 'name',
customRender: ({ index }) => index + 1,
width: 80,
align: 'center',
},
{
title: '分组名称',
dataIndex: 'groupName',
align: 'center',
},
],
},
},
],
},
},
];
const btnClick = () => {
visible.value = false;
NsMessage.success('操作成功');
};
defineExpose({
toggle,
});
</script>
<style scoped lang="less">
.drawerContainer {
height: 100%;
display: flex;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,147 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
title="分组编辑"
:ok="btnClick"
:cancel="() => (visible = false)"
placement="right">
<ns-form :schemas="schemas" :model="model" formLayout="vertical" />
</ns-drawer>
</template>
<script lang="ts" setup>
import { createVNode, onMounted, ref, unref } from 'vue';
import { NsMessage } from '/nerv-lib/component';
import { DeleteOutlined } from '@ant-design/icons-vue';
const visible = ref(false);
const model = ref({});
const toggle = () => {
visible.value = !visible.value;
};
const deleteRow = (index) => {
console.log(index);
mockDataSource.value.splice(index, 1);
};
const addRow = () => {
console.log(model);
if (model.value?.groupName) mockDataSource.value.push(unref(model) as any);
};
const mockDataSource = ref([
{
groupName: '1号厂区',
},
{
groupName: '2号厂区',
},
{
groupName: '3号厂区',
},
]);
const schemas = [
{
field: 'basicInfo',
label: '',
displayFormItem: false,
class: 'ns-form-item-full',
component: 'NsChildForm',
componentProps: {
title: '分组信息',
schemas: [
{
label: '分组编号',
field: 'groupCode',
component: 'NsInput',
defaultValue: 'WDIFHSUNGNDOR',
componentProps: {
disabled: true,
placeholder: '请输入',
},
},
{
label: '分组名称',
field: 'groupName',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
addonAfter: createVNode(
'div',
{ style: { cursor: 'pointer' }, onclick: addRow },
'新增',
),
},
rules: [{ required: true }],
},
],
},
},
{
field: 'list',
label: '',
displayFormItem: false,
class: 'ns-form-item-full',
component: 'NsChildForm',
componentProps: {
title: '分组列表',
schemas: [
{
label: '',
field: 'NsBasicTable',
component: 'NsBasicTable',
formItemProps: {
wrapperCol: { span: 24 },
},
componentProps: {
disabled: true,
placeholder: '请输入',
dataSource: mockDataSource.value,
rowSelection: { type: 'radio' },
pagination: false,
rowKey: (record) => record.groupName,
columns: [
{
title: '序号',
dataIndex: 'name',
customRender: ({ index }) => index + 1,
width: 80,
align: 'center',
},
{
title: '分组名称',
dataIndex: 'groupName',
align: 'center',
},
{
title: '删除',
dataIndex: 'delete',
width: 80,
align: 'center',
customRender: ({ index }) =>
createVNode(DeleteOutlined, {
style: { color: 'red', cursor: 'pointer' },
onClick: () => deleteRow(index),
}),
},
],
},
},
],
},
},
];
const btnClick = () => {
visible.value = false;
NsMessage.success('操作成功');
};
defineExpose({
toggle,
});
</script>
<style scoped lang="less">
.drawerContainer {
height: 100%;
display: flex;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,159 @@
<template>
<editDrawer ref="editDrawerRef" />
<editGroup ref="editGroupRef" />
<editFormula ref="editFormulaRef" />
<!-- <ns-modal ref="modalRef" title="新增" v-model:visible="visible">
<ns-form ref="formRef" :schemas="formSchema" :model="formData" formLayout="formVertical" />
</ns-modal> -->
<NsModalFrom ref="modalFormRef" v-bind="nsModalFormConfig" />
<div class="groupContainer">
<div class="tree">
<ns-tree-api v-bind="tConfig" @select="handleSelect">
<template #title="data">
<div class="treeRow">
<span>{{ data.title }}</span>
<a-dropdown>
<ns-icon name="actionMore" size="14" class="actionMore" />
<template #overlay>
<a-menu>
<a-menu-item
v-for="(item, index) in actionList"
:key="index"
@click="item.func(data)">
<span>{{ item.title }}</span>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</div>
</template>
</ns-tree-api>
</div>
<ns-view-list-table v-show="defaultType" class="table" v-bind="config" />
<ns-view-list-table v-show="!defaultType" class="table" v-bind="configCal" />
</div>
</template>
<script lang="ts" setup>
import { createVNode, nextTick, onMounted, ref } from 'vue';
import { tableConfig, treeConfig, tableConfigCal, formSchema } from './config';
import { useParams } from '/nerv-lib/use';
import editDrawer from './edit.vue';
import editGroup from './editGroup.vue';
import editFormula from './editFormula.vue';
import { NsMessage, NsModal } from '/nerv-lib/component';
import NsModalFrom from '/@/components/ns-modal-form.vue';
import { group } from '/@/api/deviceManage';
type opType = 'up' | 'down';
const { getParams } = useParams();
const modalFormRef = ref();
const editDrawerRef = ref();
const editGroupRef = ref();
const editFormulaRef = ref();
const defaultType = ref(true);
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
const config = tableConfig(editDrawerRef, editGroupRef, editFormulaRef);
const configCal = tableConfigCal(editDrawerRef, editGroupRef, editFormulaRef);
const tConfig = treeConfig(result);
const nsModalFormConfig = ref({
api: group.creatOrUpdate,
data: {},
title: '新增',
schemas: formSchema,
extraModalConfig: {
bodyStyle: { paddingBottom: 0 },
},
});
nextTick(() => {
console.log(modalFormRef.value, 'modal');
});
const addNodeSon = (data) => {
console.log(data);
nsModalFormConfig.value.title = '新增';
nsModalFormConfig.value.data = {
pointName: '新增',
isCreate: true,
isCreatSon: false,
orgId: result,
};
modalFormRef.value?.toggle();
};
const editNode = (data) => {
console.log(data);
nsModalFormConfig.value.title = '编辑';
nsModalFormConfig.value.data = { pointName: 123 };
modalFormRef.value?.toggle();
data.value = { pointName: 'qwe' };
};
const moveNode = (data, type: opType) => {
console.log(data);
};
const deleteNode = (a) => {
NsModal.confirm({
content: '确定删除吗?',
onOk: () => {
console.log(a);
},
});
};
const filterAction = (data) => {};
const actionList = [
{ title: '新增子节点', key: 'addNodeSon', func: (data) => addNodeSon(data) },
{ title: '编辑', key: 'editNode', func: (data) => editNode(data) },
{ title: '上移', key: 'moveUp', func: (data) => moveNode(data, 'up') },
{ title: '下移', key: 'moveDown', func: (data) => moveNode(data, 'down') },
{ title: '删除', key: 'deleteNode', func: (data) => deleteNode(data) },
];
const handleSelect = () => {
defaultType.value = !defaultType.value;
};
</script>
<style lang="less" scoped>
.groupContainer {
height: 100%;
overflow-y: auto;
background-color: @ns-content-bg;
display: flex;
// gap: @ns-gap;
.tree,
.table {
background-color: @white;
border-radius: @ns-border-radius;
overflow-y: auto;
}
.tree {
margin-right: @ns-gap;
:deep(.ant-spin-nested-loading) {
width: 300px;
background-color: @white;
}
}
.table {
flex: 1;
min-width: 0;
}
}
.actionMore {
display: none;
}
:deep(.ant-tree-node-content-wrapper) {
&:hover {
.actionMore {
display: block;
}
}
}
.treeRow {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>

View File

@@ -0,0 +1,121 @@
{
"data":[
{
"title": "1号楼",
"key": "A001",
"children": [
{
"title": "1号楼空调用电",
"key": "A002"
},
{
"title": "1号楼照明用电",
"key": "A003"
}
]
},
{
"title": "2号楼(A005)",
"key": "A004",
"children": [
{
"title": "2号楼空调用电(A007)",
"key": "A006"
}
]
},
{
"title": "3号楼",
"key": "A008",
"children": [
{
"title": "3号楼空调用电",
"key": "A009"
},
{
"title": "3号楼照明用电",
"key": "A010"
}
]
}
],
"insertData":[
{
"title": "北京公司",
"key": "A001"
},
{
"title": "广州公司",
"key": "A002"
},
{
"title": "南京公司",
"key": "A004"
},
{
"title": "上海公司",
"key": "A008",
"children": [
{
"title": "上海长宁",
"key": "A009"
},
{
"title": "上海徐汇",
"key": "A010"
},
{
"title": "上海浦东",
"key": "A011"
}
]
}
],
"listData":[
{
"id": "d4",
"isDel": "0",
"officesId": "84",
"deviceCode": "37430200143",
"deviceName": "地听测试电表",
"category": "1",
"type": "1001",
"energyCount": "1",
"serialNumber": "69",
"pidCode": null,
"brand": "",
"types": "",
"manufacturer": "elit non in",
"contacts": "ad reprehenderit",
"phonenumber": "34",
"position": "in esse commodo",
"activeState": "1",
"measurementDirection": "1",
"deviceMagnification": 62,
"deviceAccuracy": "89",
"frequency": "anim consequat irure",
"standardFrequency": "ut elit",
"deviceHead": "pariatur ex velit",
"constructor": "84566",
"voltageType": "cillum aliquip reprehenderit",
"pt": 61,
"ct": 64,
"communicationProtocol": "cupidatat nisi ea ad",
"ip": "",
"port": "",
"com": "",
"slaveAddress": "",
"dlt": "",
"conversionIdentifier": "48",
"multiplicationAdjustment": "1",
"accessMethod": "1",
"replacementFrequency": "0",
"dataDetail": "sit",
"insertTime": null,
"children": null,
"devicePointList": null,
"insertUser": null
}
]
}

View File

@@ -1,161 +1,237 @@
import { dateUtil } from '/nerv-lib/util/date-util';
import { data } from './mock.json';
import { origanizemanage } from '/@/api/origanizemanage';
import { device } from '/@/api/deviceManage';
import { ref } from 'vue';
import { http } from '/nerv-lib/util';
export const tableConfig = {
title: '设备台账',
// api: '/carbon_emission/device/getDeviceList',
api: origanizemanage.list,
treeConfig: {
defaultExpandAll: true,
api: () => {
return Promise.resolve(data);
},
},
params: {
page: 0,
pageSize: 10,
},
rowSelection: null,
columns: [
{
title: '设备名称',
dataIndex: 'id',
},
{
title: '设备型号',
dataIndex: 'deviceCode',
},
{
title: 'SN码',
dataIndex: 'deviceName',
textNumber: 8,
textEllipsis: true,
},
{
title: '设备一级区域',
dataIndex: 'position',
},
{
title: '设备二级区域',
dataIndex: 'position',
},
{
title: '设备详细位置',
dataIndex: 'position',
},
{
title: '设备规格',
dataIndex: 'position',
},
{
title: '设备厂商纳税人识别号',
dataIndex: 'position',
},
{
title: '厂商联系人',
dataIndex: 'position',
},
{
title: '设备描述',
dataIndex: 'position',
},
{
title: 'IP地址',
dataIndex: 'position',
},
{
title: '生产日期',
dataIndex: 'position',
},
{
title: '采购日期',
dataIndex: 'position',
},
{
title: '启用日期',
dataIndex: 'position',
},
{
title: '设备成本(元)',
dataIndex: 'position',
},
{
title: '使用期限',
dataIndex: 'position',
},
{
title: '额定功率',
dataIndex: 'position',
},
{
title: '特殊参数',
dataIndex: 'position',
},
],
formConfig: {
schemas: [
{
field: 'name',
label: '设备名称',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
},
export const tableConfig = (orgId) => {
return ref({
title: '设备信息',
api: device.queryDevicePage,
params: { orgId },
treeConfig: {
header: {
icon: 'deviceType',
title: '设备类别',
},
{
field: 'provider',
label: '设备厂商',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
},
},
{
field: 'payWay',
label: '设备区域',
component: 'NsSelect',
componentProps: {
placeholder: '请选择',
options: [
{
label: '全部',
value: '',
params: { orgId },
dynamicParams: 'code',
defaultExpandAll: true,
api: device.queryDeviceTree,
fieldNames: { title: 'deviceType', key: 'code' },
formConfig: {
schemas: [
{
field: 'deviceType',
label: '设备名称',
component: 'NsInput',
autoSubmit: true,
componentProps: {
placeholder: '请输入设备类型',
},
],
},
},
],
},
},
rowSelection: null,
columns: [
{
title: '设备名称',
dataIndex: 'deviceName',
},
{
field: 'createTime',
label: '生产日期',
component: 'NsRangePicker',
fieldMap: ['queryStartDate', 'queryEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
},
title: '设备型号',
dataIndex: 'deviceModel',
},
{
field: 'createTime1',
label: '采购日期',
component: 'NsRangePicker',
fieldMap: ['queryStartDate', 'queryEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
},
title: 'SN码',
dataIndex: 'snCode',
textNumber: 5,
textEllipsis: true,
},
{
field: 'createTime2',
label: '启用日期',
component: 'NsRangePicker',
fieldMap: ['queryStartDate', 'queryEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
},
title: '设备一级区域',
dataIndex: 'device1Area',
textNumber: 5,
textEllipsis: true,
},
{
title: '设备二级区域',
dataIndex: 'device2Area',
textNumber: 5,
textEllipsis: true,
},
{
title: '设备详细位置',
dataIndex: 'deviceAddress',
textNumber: 5,
textEllipsis: true,
},
{
title: '设备规格',
dataIndex: 'deviceTp',
textNumber: 4,
},
{
title: '设备厂商纳税人识别号',
dataIndex: 'deviceRatepay',
textNumber: 8,
textEllipsis: true,
},
{
title: '设备厂商',
textNumber: 4,
dataIndex: 'manufacturer',
},
{
title: '厂商联系人',
dataIndex: 'contactPerson',
},
{
title: '设备描述',
dataIndex: 'deviceDesc',
textNumber: 5,
textEllipsis: true,
},
{
title: 'IP地址',
dataIndex: 'ipAddress',
},
{
title: '生产日期',
dataIndex: 'manufactureDate',
},
{
title: '采购日期',
dataIndex: 'purchaseDate',
},
{
title: '启用日期',
dataIndex: 'startDate',
},
{
title: '设备成本(元)',
dataIndex: 'equipmentCost',
textNumber: 6,
},
{
title: '使用期限',
dataIndex: 'usagePeriod',
textNumber: 4,
customRender: ({ value }) => `${value}`,
},
{
title: '额定功率',
dataIndex: 'ratedPower',
textNumber: 4,
// customRender: ({ value }) => `${value}年`,
},
{
title: '特殊参数',
textNumber: 4,
dataIndex: 'specialParameters',
},
],
params: {},
},
// pagination: { pageSizeOptions: false },
rowKey: 'uuid',
formConfig: {
schemas: [
{
field: 'deviceName',
label: '设备名称',
component: 'NsInput',
componentProps: {
placeholder: '请输入设备名称',
},
},
{
field: 'areas',
label: '设备区域',
component: 'NsCascader',
format: (record) => {
console.log(record);
return record?.reduce(
(pre, cur) => {
const len = cur?.length - 1;
pre[len].push(cur[len]);
return pre;
},
[[], []],
);
},
fieldMap: ['area1', 'area2'],
componentProps: {
placeholder: '请选择设备区域',
multiple: true,
loadData: (selectedOptions, options) => {
const targetOption = selectedOptions[selectedOptions.length - 1];
if (!selectedOptions.length) {
http.post(device.dropArea, { orgId }).then((res) => {
options.value = res.data?.map((item) => {
return { label: item, value: item, children: [], isLeaf: false };
});
});
}
const value = targetOption?.value;
if (targetOption) {
targetOption.loading = true;
http.post(device.dropArea, { device1Area: value, orgId }).then((res) => {
targetOption.loading = false;
targetOption.children = res.data?.map((item) => {
return { label: item, value: item, children: [], isLeaf: true };
});
});
}
},
},
},
{
field: 'manufacturer',
label: '设备厂商',
component: 'NsInput',
componentProps: {
placeholder: '请输入设备厂商',
options: [
{
label: '全部',
value: '',
},
],
},
},
{
field: 'createTime',
label: '生产日期',
component: 'NsRangePicker',
fieldMap: ['manufactureBeginDate', 'manufactureEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
placeholder: ['设备生产开始日期', '设备生产结束日期'],
},
},
{
field: 'createTime1',
label: '采购日期',
component: 'NsRangePicker',
fieldMap: ['purchaseBeginDate', 'purchaseEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
placeholder: ['设备采购开始日期', '设备采购结束日期'],
},
},
{
field: 'createTime2',
label: '启用日期',
component: 'NsRangePicker',
fieldMap: ['startBeginDate', 'startEndDate'],
componentProps: {
valueFormat: 'YYYY-MM-DD',
placeholder: ['设备启用开始日期', '设备启用结束日期'],
},
},
],
params: {},
},
// pagination: { pageSizeOptions: false },
rowKey: 'uuid',
});
};

View File

@@ -1,7 +1,16 @@
<template>
<ns-view-list-table v-bind="tableConfig" />
<ns-view-list-table v-bind="config" />
</template>
<script lang="ts" setup>
import { tableConfig } from './config';
import { computed, nextTick, ref } from 'vue';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const config = tableConfig(orgId.value);
defineOptions({
name: 'LedgerIndex', // 与页面路由name一致缓存才可生效
});
</script>
<style lang="less" scoped></style>

View File

@@ -235,6 +235,272 @@
}
]
}
],
"dataSource":[
{
"id": "d4",
"isDel": "0",
"officesId": "84",
"deviceCode": "37430200143",
"deviceName": "地听测试电表",
"category": "1",
"type": "1001",
"energyCount": "1",
"serialNumber": "69",
"pidCode": null,
"brand": "",
"types": "",
"manufacturer": "elit non in",
"contacts": "ad reprehenderit",
"phonenumber": "34",
"position": "in esse commodo",
"activeState": "1",
"measurementDirection": "1",
"deviceMagnification": 62,
"deviceAccuracy": "89",
"frequency": "anim consequat irure",
"standardFrequency": "ut elit",
"deviceHead": "pariatur ex velit",
"constructor": "84566",
"voltageType": "cillum aliquip reprehenderit",
"pt": 61,
"ct": 64,
"communicationProtocol": "cupidatat nisi ea ad",
"ip": "",
"port": "",
"com": "",
"slaveAddress": "",
"dlt": "",
"conversionIdentifier": "48",
"multiplicationAdjustment": "1",
"accessMethod": "1",
"replacementFrequency": "0",
"dataDetail": "sit",
"insertTime": null,
"children": null,
"devicePointList": null,
"insertUser": null
},
{
"id": "d1",
"isDel": "0",
"officesId": "84",
"deviceCode": "37430200144",
"deviceName": "地听测试2",
"category": "1",
"type": "1001",
"energyCount": "1",
"serialNumber": "69",
"pidCode": null,
"brand": "",
"types": "",
"manufacturer": "elit non in",
"contacts": "ad reprehenderit",
"phonenumber": "34",
"position": "in esse commodo",
"activeState": "1",
"measurementDirection": "1",
"deviceMagnification": 62,
"deviceAccuracy": "89",
"frequency": "anim consequat irure",
"standardFrequency": "ut elit",
"deviceHead": "pariatur ex velit",
"constructor": "84566",
"voltageType": "cillum aliquip reprehenderit",
"pt": 61,
"ct": 64,
"communicationProtocol": "802",
"ip": "10.5.36.0",
"port": "6000",
"com": "",
"slaveAddress": "123测试",
"dlt": "",
"conversionIdentifier": "48",
"multiplicationAdjustment": "1",
"accessMethod": "1",
"replacementFrequency": "0",
"dataDetail": "sit",
"insertTime": "2024-02-28 11:26:58",
"children": null,
"devicePointList": null,
"insertUser": null
},
{
"id": "d2",
"isDel": "0",
"officesId": "84",
"deviceCode": "1235623",
"deviceName": "测试设备2",
"category": "1",
"type": "1001",
"energyCount": "是",
"serialNumber": "69",
"pidCode": null,
"brand": "",
"types": "",
"manufacturer": "elit non in",
"contacts": "ad reprehenderit",
"phonenumber": "34",
"position": "in esse commodo",
"activeState": "1",
"measurementDirection": "1",
"deviceMagnification": 62,
"deviceAccuracy": "89",
"frequency": "anim consequat irure",
"standardFrequency": "ut elit",
"deviceHead": "pariatur ex velit",
"constructor": null,
"voltageType": "cillum aliquip reprehenderit",
"pt": 61,
"ct": 64,
"communicationProtocol": "cupidatat nisi ea ad",
"ip": "",
"port": "",
"com": "",
"slaveAddress": "",
"dlt": "",
"conversionIdentifier": "48",
"multiplicationAdjustment": "1",
"accessMethod": "1",
"replacementFrequency": "0",
"dataDetail": "sit",
"insertTime": "2024-02-28 11:31:57",
"children": null,
"devicePointList": null,
"insertUser": null
},
{
"id": "d7",
"isDel": "0",
"officesId": "",
"deviceCode": "0213",
"deviceName": "测试",
"category": "1",
"type": "1001",
"energyCount": "1",
"serialNumber": "",
"pidCode": null,
"brand": "6da085e5-956d-4000-bd3c-ebb01a9c99a1",
"types": "d7a8aede-b821-4ff2-953d-601a20e5a948",
"manufacturer": "",
"contacts": "",
"phonenumber": null,
"position": "",
"activeState": "",
"measurementDirection": "",
"deviceMagnification": null,
"deviceAccuracy": null,
"frequency": "",
"standardFrequency": "",
"deviceHead": "",
"constructor": "",
"voltageType": "",
"pt": null,
"ct": null,
"communicationProtocol": "",
"ip": "",
"port": "",
"com": "",
"slaveAddress": "",
"dlt": "",
"conversionIdentifier": "1",
"multiplicationAdjustment": "1",
"accessMethod": "",
"replacementFrequency": "0",
"dataDetail": "",
"insertTime": "2024-03-14 20:01:53",
"children": null,
"devicePointList": null,
"insertUser": ""
},
{
"id": "d3",
"isDel": "0",
"officesId": "84",
"deviceCode": "81",
"deviceName": "设备名称1111",
"category": "1",
"type": "1001",
"energyCount": "1",
"serialNumber": "69",
"pidCode": null,
"brand": "6da085e5-956d-4000-bd3c-ebb01a9c99a1",
"types": "d7a8aede-b821-4ff2-953d-601a20e5a948",
"manufacturer": "elit non in",
"contacts": "ad reprehenderit",
"phonenumber": "34",
"position": "in esse commodo",
"activeState": "1",
"measurementDirection": "1",
"deviceMagnification": 62,
"deviceAccuracy": "89",
"frequency": "anim consequat irure",
"standardFrequency": "ut elit",
"deviceHead": "pariatur ex velit",
"constructor": "84566",
"voltageType": "cillum aliquip reprehenderit",
"pt": 61,
"ct": 64,
"communicationProtocol": "cupidatat nisi ea ad",
"ip": "",
"port": "",
"com": "",
"slaveAddress": "",
"dlt": "",
"conversionIdentifier": "48",
"multiplicationAdjustment": "1",
"accessMethod": "1",
"replacementFrequency": "0",
"dataDetail": "sit",
"insertTime": "2024-03-15 17:34:24",
"children": null,
"devicePointList": null,
"insertUser": null
},
{
"id": "d43fdfff_02_0001",
"isDel": "0",
"officesId": "843fdffff213d2d3",
"deviceCode": "00037430200143",
"deviceName": "应感者酸严",
"category": "1",
"type": "1001",
"energyCount": "esse consequat",
"serialNumber": "69",
"pidCode": null,
"brand": "",
"types": "",
"manufacturer": "elit non in",
"contacts": "ad reprehenderit",
"phonenumber": "34",
"position": "in esse commodo",
"activeState": "1",
"measurementDirection": "1",
"deviceMagnification": 62,
"deviceAccuracy": "89",
"frequency": "anim consequat irure",
"standardFrequency": "ut elit",
"deviceHead": "pariatur ex velit",
"constructor": "84566",
"voltageType": "cillum aliquip reprehenderit",
"pt": 61,
"ct": 64,
"communicationProtocol": "cupidatat nisi ea ad",
"ip": "",
"port": "",
"com": "",
"slaveAddress": "",
"dlt": "",
"conversionIdentifier": "48",
"multiplicationAdjustment": "1",
"accessMethod": "1",
"replacementFrequency": "0",
"dataDetail": "sit",
"insertTime": "2024-04-29 11:12:43",
"children": null,
"devicePointList": null,
"insertUser": null
}
]
}

View File

@@ -2,82 +2,80 @@ import { ref } from 'vue';
export const formConfig = (disabled: Boolean) => {
return ref([
{ label: '企业名称', field: 'orgName', show: false },
{
field: 'field111',
component: 'NsChildForm',
label: '部门名称',
field: 'deptName',
component: 'NsInput',
componentProps: {
schemas: [
{
label: '部门名称',
field: 'name',
component: 'NsInput',
componentProps: {
disabled: disabled,
placeholder: '请输入部门名称',
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入部门名称',
},
],
},
{
label: '上级部门',
field: 'department',
component: 'NsSelect',
componentProps: {
disabled: true,
options: [
{
label: '部门1',
value: 1,
},
{
label: '部门2',
value: 2,
},
],
},
},
{
label: '部门编码',
field: 'code',
component: 'NsInput',
componentProps: {
disabled: disabled,
placeholder: '请输入部门编码',
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入部门编码',
},
],
},
{
label: '排序',
field: 'order',
component: 'NsInput',
componentProps: {
disabled: disabled,
placeholder: '请输入排序',
maxLength: 2,
},
},
{
field: 'remark',
label: '备注',
component: 'NsTextarea',
componentProps: {
disabled: disabled,
placeholder: '请输入',
maxLength: 300,
},
},
],
disabled: disabled,
placeholder: '请输入部门名称',
maxLength: 20,
onKeydown: (e) => e.keyCode === 32 && e.preventDefault(),
},
rules: [
{
required: true,
message: '请输入部门名称',
},
],
},
// {
// label: '上级部门',
// field: 'department',
// component: 'NsSelect',
// componentProps: {
// disabled: true,
// options: [
// {
// label: '部门1',
// value: 1,
// },
// {
// label: '部门2',
// value: 2,
// },
// ],
// },
// },
{
label: '部门编码',
field: 'deptCode',
component: 'NsInput',
componentProps: {
disabled: disabled,
placeholder: '请输入部门编码',
onKeydown: (e) => e.keyCode === 32 && e.preventDefault(),
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入部门编码',
},
],
},
{
label: '排序',
field: 'sort',
component: 'NsInputNumber',
componentProps: {
disabled: disabled,
placeholder: '请输入排序',
maxLength: 2,
min: 0,
max: 99,
precision: 0,
},
},
{
field: 'remark',
label: '备注',
component: 'NsTextarea',
componentProps: {
disabled: disabled,
placeholder: '请输入',
maxLength: 300,
},
},
]);
@@ -85,82 +83,79 @@ export const formConfig = (disabled: Boolean) => {
export const formConfig2 = (disabled2: Boolean) => {
return ref([
{ label: '部门名称', field: 'deptName', show: false },
{
field: 'field111',
component: 'NsChildForm',
label: '角色名称',
field: 'zhName',
component: 'NsInput',
componentProps: {
schemas: [
{
label: '角色名称',
field: 'departname',
component: 'NsInput',
componentProps: {
disabled: disabled2,
placeholder: '请输入角色名称',
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入角色名称',
},
],
},
{
label: '上级领导',
field: 'department',
component: 'NsSelect',
componentProps: {
disabled: true,
},
},
{
label: '节点编码',
field: 'code',
component: 'NsInput',
componentProps: {
disabled: disabled2,
placeholder: '请输入节点编码',
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入节点编码',
},
],
},
{
label: '是否部门领导',
field: 'isleader',
component: 'NsRadioGroup',
componentProps: {
disabled: disabled2,
radioType: 'radio',
options: [
{ label: '是', value: 1 },
{ label: '否', value: 2 },
],
rules: [
{
required: true,
message: '请选择是否部门领导',
},
],
},
},
{
field: 'remark',
label: '备注',
component: 'NsTextarea',
componentProps: {
disabled: disabled2,
placeholder: '请输入',
maxLength: 300,
},
},
disabled: disabled2,
placeholder: '请输入角色名称',
onKeydown: (e) => e.keyCode === 32 && e.preventDefault(),
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入角色名称',
},
],
},
// {
// label: '上级领导',
// field: 'department',
// component: 'NsSelect',
// componentProps: {
// disabled: true,
// },
// },
{
label: '节点编码',
field: 'roleCode',
component: 'NsInput',
componentProps: {
disabled: disabled2,
placeholder: '请输入节点编码',
onKeydown: (e) => e.keyCode === 32 && e.preventDefault(),
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入节点编码',
},
],
},
{
label: '是否部门领导',
field: 'isLeader',
component: 'NsRadioGroup',
defaultValue: 1,
componentProps: {
disabled: disabled2,
radioType: 'radio',
options: [
{ label: '是', value: 0 },
{ label: '否', value: 1 },
],
},
rules: [
{
required: true,
message: '请选择是否部门领导',
},
],
},
{
field: 'remark',
label: '备注',
component: 'NsTextarea',
componentProps: {
disabled: disabled2,
placeholder: '请输入',
maxLength: 300,
},
},
]);
};

View File

@@ -1,96 +1,115 @@
import { mockData } from './mock';
import { cloneDeep } from 'lodash-es';
import { Modal } from 'ant-design-vue';
import { createVNode, ref } from 'vue';
import { NsMessage } from '/nerv-lib/component';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
export const formConfig = [
{
field: 'field111',
component: 'NsChildForm',
componentProps: {
title: '用户信息',
schemas: [
{
label: '账号',
field: 'accountNo',
component: 'NsInput',
componentProps: {
placeholder: '请输入账号',
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入账号',
import { ref } from 'vue';
import { http } from '/nerv-lib/util';
import { origanizemanage } from '/@/api/origanizemanage';
export const formConfig = (disabled) => {
return ref([
{
field: 'field111',
component: 'NsChildForm',
componentProps: {
title: '用户信息',
schemas: [
{
label: '账号',
field: 'accountNo',
component: 'NsInput',
componentProps: {
placeholder: '请输入账号',
maxLength: 20,
disabled,
},
],
},
{
label: '姓名',
field: 'realName',
component: 'NsInput',
componentProps: {
placeholder: '请输入姓名',
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入姓名',
},
],
},
{
label: '性别',
field: 'sex',
component: 'NsRadioGroup',
componentProps: {
radioType: 'radio',
options: [
{ label: '男', value: 1 },
{ label: '女', value: 2 },
rules: [
{
required: true,
message: '请输入账号',
},
],
},
},
{
label: '手机号',
field: 'telephone',
component: 'NsInput',
componentProps: {
placeholder: '请输入手机号',
maxLength: 11,
},
rules: [
{
required: true,
message: '请输入正确手机号格式',
pattern: /^[1][3-9][0-9]{9}$/,
{
label: '姓名',
field: 'realName',
component: 'NsInput',
componentProps: {
placeholder: '请输入姓名',
maxLength: 20,
},
],
},
{
label: '邮箱',
field: 'email',
component: 'NsInput',
componentProps: {
placeholder: '请输入邮箱',
maxLength: 30,
rules: [
{
required: true,
message: '请输入姓名',
},
],
},
},
{
label: '组织关系',
field: 'relation',
component: 'NsInput',
componentProps: {
disabled: true,
maxLength: 30,
{
label: '性别',
field: 'sex',
component: 'NsRadioGroup',
defaultValue: '男',
componentProps: {
radioType: 'radio',
options: [
{ label: '男', value: '男' },
{ label: '女', value: '女' },
],
},
},
},
],
{
label: '手机号',
field: 'telephone',
component: 'NsInput',
componentProps: {
placeholder: '请输入手机号',
maxLength: 11,
},
rules: [
{
required: true,
message: '请输入正确手机号格式',
pattern: /^[1][3-9][0-9]{9}$/,
},
],
},
{
label: '邮箱',
field: 'email',
component: 'NsInput',
componentProps: {
placeholder: '请输入邮箱',
maxLength: 30,
},
rules: [
{
pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
message: '请输入正确的邮箱格式',
trigger: 'blur',
},
],
},
{
label: '组织关系',
field: 'orgName',
component: 'NsInput',
defaultValue: JSON.parse(sessionStorage.getItem('userInfo')).orgName,
componentProps: {
disabled: true,
maxLength: 30,
},
},
],
},
},
},
];
]);
};
const options = ref([]);
const getUserPerList = (transform, params = {}) => {
return http.post(origanizemanage.queryUserPerList, { ...params }).then((res) => {
return res.data?.map((item) => {
item = { ...item, ...transform(item) };
return item;
});
});
};
export const formConfig2 = (casData: any) => {
return ref([
{
@@ -98,28 +117,63 @@ export const formConfig2 = (casData: any) => {
component: 'NsCascader',
componentProps: {
placeholder: '请选择',
displayRender: ({ labels }: any) => {
casData.value = labels;
displayRender: ({ labels, selectedOptions }: any) => {
console.log(labels, selectedOptions);
casData.value = selectedOptions.map(({ label, value }) => {
return { label, value };
});
return labels.join('/');
},
options: [
{
value: '1',
label: '铁路局',
children: [
{
value: '2',
label: '产品部',
children: [
{
value: '3',
label: '产品总监',
},
],
},
],
},
],
loadData: (selectedOptions, options) => {
console.log(selectedOptions, options, 'selectedOptions, options');
const targetOption = selectedOptions[selectedOptions.length - 1];
let transForm, params;
// load options lazily
if (!selectedOptions.length) {
transForm = (data) => {
data['label'] = data.orgName;
data['value'] = data.orgId;
data['isLeaf'] = false;
data['level'] = 1;
return data;
};
getUserPerList(transForm).then((res) => {
options.value = [...res];
});
}
const id = targetOption?.value;
const level = targetOption?.level;
if (targetOption) {
targetOption.loading = true;
}
if (level === 1) {
transForm = (data) => {
data['label'] = data.deptName;
data['value'] = data.deptId;
data['isLeaf'] = false;
data['level'] = 2;
return data;
};
params = { orgId: id };
} else if (level === 2) {
transForm = (data) => {
data['label'] = data.roleName;
data['value'] = data.roleId;
data['level'] = 3;
return data;
};
params = { deptId: id };
}
if (targetOption) {
getUserPerList(transForm, { ...params }).then((res) => {
targetOption.loading = false;
targetOption.children = [...res];
});
}
},
},
},
]);

View File

@@ -1,4 +1,6 @@
import { ref } from 'vue';
import { origanizemanage } from '/@/api/origanizemanage';
import { http } from '/nerv-lib/saas';
export const mockData = ref([
{

View File

@@ -12,7 +12,7 @@ const proxy = {
changeOrigin: true,
},
'/carbon-smart': {
target: 'http://192.168.100.115:8224/',
target: 'http://123.60.103.97:8224',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/carbon-smart/, ''),
},

10
hx-op/.env Normal file
View File

@@ -0,0 +1,10 @@
# port
VITE_PORT = 3302
#mode
VITE_GLOB_APP_RUN_TYPE = saas
# spa-title
VITE_GLOB_APP_TITLE = hx-ai-intelligent Depositor
# spa shortname
VITE_GLOB_APP_SHORT_NAME = hx-ai-intelligent-depositor

22
hx-op/.env.development Normal file
View File

@@ -0,0 +1,22 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /hx-op/
# Cross-domain proxy, you can configure multiple
# Please note that no line breaks http://100.73.70.51
#VITE_PROXY = {"/community":{ "target":"http://100.73.70.51","changeOrigin": true,"prependPath":false},"/parking":{ "target":"http://100.73.70.246:8080","changeOrigin": true,"iprependPath":false}}
# VITE_PROXY=[["/api","http://100.73.70.51"],["/parking","http://100.73.70.246:8080"]]
# Delete console
VITE_DROP_CONSOLE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
# File upload address optional
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=

35
hx-op/.env.production Normal file
View File

@@ -0,0 +1,35 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /hx-op/
# Delete console
VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Whether to delete origin files when using compress, default false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
# Whether to enable image compression
VITE_USE_IMAGEMIN= true
# use pwa
VITE_USE_PWA = false
# Is it compatible with older browsers
VITE_LEGACY = false

1
hx-op/.version Normal file
View File

@@ -0,0 +1 @@
0.0.1

74
hx-op/build.sh Normal file
View File

@@ -0,0 +1,74 @@
#!/bin/bash
SOURCE="$0"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
if [ -z $WORKSPACE ];then
echo "WORKSPACE not exists"
else
set DIR=$WORKSPACE
fi
echo "current dir"
echo "$DIR"
cd "$DIR"
projectname=$(basename `pwd`)
npm run parking-build
if [ -d "$DIR/dist" ];then
cd "$DIR/dist"
# copy module.json
cp ../module.json ./
# package
VERSION=$(cat ../.version)
lastdir=../release/
if [ -d ${lastdir} ];then
echo "删除旧release文件夹"
rm -rf ${lastdir}
else
echo "文件夹不存在!"
fi
mkdir -p ${lastdir}
dir=../release/nerv/$projectname/$VERSION
mkdir -p ${dir}
tar -zcvf "${dir}/$projectname-$VERSION.tgz" ./*
templatedir=../release/resources/templates/nerv/$projectname/$VERSION/$projectname
mkdir -p ${templatedir}
cp -r ../resources/templates/* ${templatedir}
cd ../
releasefile=nerv-$projectname-$VERSION.tgz
if [ -f ${releasefile} ];then
echo "删除旧包!"
rm -rf ${releasefile}
fi
tar -zcvf ${releasefile} ./release/* release.yaml
mkdir -p ./release/nervui
cp -r ./release/nerv/* ./release/nervui
if [ -f ${releasefile} ];then
echo "编译成功!"
mv ${releasefile} ./release
else
echo "编译失败!!!"
exit 1
fi
else
echo "编译失败!!!"
exit 1
fi

19
hx-op/index.html Normal file
View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<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">
window._AMapSecurityConfig = {
securityJsCode: '09e43004c09d39c0e61f8fd65d5e6a5a',
};
</script> -->
<title>op端</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="./src/main.ts"></script>
</body>
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

File diff suppressed because one or more lines are too long

BIN
hx-op/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View 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

12
hx-op/release.yaml Normal file
View File

@@ -0,0 +1,12 @@
# 上传release目录信息到nerv-file仓库
release:
- {src: release, dest: /upload/pkg, include: [".*(.tgz)$"]}
- {src: release/resources/templates, dest: /upload/templates}
register:
name: nervui-smart-parking
version: 2.1.19
components:
- type: nervui-smart-parking
resources:
- {type: template, relativePath: /nervui-smart-parking/deploy.json}

View File

@@ -0,0 +1,35 @@
echo "=====================================================create====================================================="
#!/usr/bin/env bash
function create() {
if [ -d "$nervui_app_home" ];then
echo "$nervui_app_home exists!"
else
echo "start mkdir $nervui_app_home"
mkdir -p "$nervui_app_home"
fi
pkg_file_name=${pkg_url##*/}
pkg_file_path="$nervui_app_home$pkg_file_name"
echo "start download $pkg_url"
curl -L -o $pkg_file_path $pkg_url
echo "start install $pkg_file_path"
tar -xf $pkg_file_path -C $nervui_app_home
}
if [ "$pkg_url" == "" ]; then
echo {\"error\":\"pkg_url is empty\"}
exit 1
elif [ "$nervui_app_home" == "" ]; then
echo {\"error\":\"nervui_app_home is empty\"}
exit 1
else
create
fi

View File

@@ -0,0 +1 @@
echo "=====================================================delete====================================================="

View File

@@ -0,0 +1 @@
echo "=====================================================setup====================================================="

View File

@@ -0,0 +1 @@
echo "=====================================================start====================================================="

View File

@@ -0,0 +1 @@
echo "=====================================================stop====================================================="

View File

@@ -0,0 +1,30 @@
{
"name": "/nervui/nervui-smart-parking-op",
"operations": [
{
"name": "Create",
"type": "shell",
"implementor": "create.sh"
},
{
"name": "Delete",
"type": "shell",
"implementor": "delete.sh"
},
{
"name": "Setup",
"type": "shell",
"implementor": "setup.sh"
},
{
"name": "Start",
"type": "shell",
"implementor": "start.sh"
},
{
"name": "Stop",
"type": "shell",
"implementor": "stop.sh"
}
]
}

Some files were not shown because too many files have changed in this diff Show More