From 7a50130d1260f7fa7dce53c7f42cb9358bb92035 Mon Sep 17 00:00:00 2001
From: ym1026 <1539963735@qq.com>
Date: Tue, 9 Sep 2025 09:33:14 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9C=BA=E7=AB=99+=E6=9C=8D=E5=8A=A1=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91=EF=BC=8C=E8=A7=92?=
=?UTF-8?q?=E8=89=B2=E6=9D=83=E9=99=90=E5=AE=8C=E5=96=84=EF=BC=8C=E6=80=BB?=
=?UTF-8?q?=E8=A7=88=E5=BC=B9=E7=AA=97=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/public/config/columnList.js | 197 ++++++-
web/src/components/ComTable.vue | 28 +-
web/src/components/EditCom.vue | 99 +++-
web/src/components/Home/Map.vue | 171 +++++-
web/src/components/Home/Modal.vue | 37 +-
web/src/components/Home/Modal/EnvInfo.vue | 53 +-
.../components/Home/Modal/OperationalInfo.vue | 47 +-
web/src/components/TreeTable.vue | 528 ++++++++++++++++++
web/src/main.js | 2 +
web/src/router/index.js | 7 +-
web/src/utils/btnList.js | 4 +-
web/src/utils/column.js | 4 +-
web/src/utils/gcj02ToWgs84.js | 142 ++---
web/src/utils/loadTMap.js | 11 +
web/src/views/LoginView.vue | 14 +-
web/src/views/MainView.vue | 59 +-
web/src/views/system/permission.vue | 222 ++++++++
web/src/views/system/role.vue | 63 ++-
web/src/views/system/service.vue | 252 +++++++++
web/src/views/system/station.vue | 45 +-
20 files changed, 1741 insertions(+), 244 deletions(-)
create mode 100644 web/src/components/TreeTable.vue
create mode 100644 web/src/utils/loadTMap.js
create mode 100644 web/src/views/system/permission.vue
create mode 100644 web/src/views/system/service.vue
diff --git a/web/public/config/columnList.js b/web/public/config/columnList.js
index 1af2d2b..d2a4ec6 100644
--- a/web/public/config/columnList.js
+++ b/web/public/config/columnList.js
@@ -113,6 +113,46 @@ export const columnList = [
}
]
},
+ {
+ page: 'permission',
+ columns: [
+ {
+ title: '权限ID',
+ dataIndex: 'permission_id',
+ key: 'permission_id',
+ ellipsis: true,
+ // filterable: true,
+ fixed: 'left'
+ },
+ {
+ title: '权限名称',
+ dataIndex: 'name',
+ key: 'name'
+ // filterable: true
+ },
+ {
+ title: '权限描述',
+ dataIndex: 'describe',
+ key: 'describe',
+ ellipsis: true
+ // filterable: true
+ },
+
+ {
+ title: '是否启用',
+ dataIndex: 'is_open',
+ key: 'is_open',
+ scopedSlots: { customRender: 'is_open' }
+ }
+
+ // {
+ // title: '操作',
+ // dataIndex: 'operate',
+ // key: 'operate',
+ // scopedSlots: { customRender: 'action' }
+ // }
+ ]
+ },
{
page: 'station',
columns: [
@@ -139,16 +179,12 @@ export const columnList = [
{
title: '场站经度',
dataIndex: 'lon',
- width: 50,
key: 'lon'
- // filterable: true
},
{
title: '场站纬度',
dataIndex: 'lat',
- width: 50,
key: 'lat'
- // filterable: true
},
{
title: '储能容量',
@@ -164,10 +200,9 @@ export const columnList = [
// filterable: true
},
{
- title: '场站类别',
+ title: '储能容量',
dataIndex: 'capacity',
- key: 'capacity',
- scopedSlots: { customRender: 'capacity' }
+ key: 'capacity'
},
{
title: '场站状态',
@@ -188,6 +223,50 @@ export const columnList = [
scopedSlots: { customRender: 'policy_id' }
},
+ {
+ title: '操作',
+ dataIndex: 'operate',
+ key: 'operate',
+ scopedSlots: { customRender: 'action' }
+ }
+ ]
+ },
+ {
+ page: 'serviceApi',
+ columns: [
+ {
+ title: '接口ID',
+ dataIndex: 'api_id',
+ key: 'api_id',
+ ellipsis: true,
+ // filterable: true,
+ fixed: 'left'
+ },
+ {
+ title: '接口名称',
+ dataIndex: 'name',
+ key: 'name'
+ // filterable: true
+ },
+ {
+ title: '接口描述',
+ dataIndex: 'describe',
+ key: 'describe'
+ // filterable: true
+ },
+ {
+ title: '接口参数',
+ dataIndex: 'params',
+ key: 'params'
+ },
+
+ {
+ title: '是否启用',
+ dataIndex: 'is_open',
+ key: 'is_open',
+ scopedSlots: { customRender: 'is_open' }
+ },
+
{
title: '操作',
dataIndex: 'operate',
@@ -277,8 +356,54 @@ export const roleOptions = [
value: '',
key: 'permission',
type: 'slot',
- slotName: 'permission',
- className: 'item-l'
+ slotName: 'treetable',
+ className: 'item-l',
+ tableData: [],
+ selectTableData: [],
+ columns: [
+ {
+ title: '名称',
+ dataIndex: 'name',
+ key: 'name',
+ ellipsis: true,
+ filterable: true,
+ fixed: 'left'
+ },
+ {
+ title: '页面路径',
+ dataIndex: 'route',
+ key: 'route'
+ // filterable: true
+ },
+ {
+ title: '是否允许新增操作',
+ dataIndex: 'is_add',
+ key: 'is_add',
+ align: 'center',
+ scopedSlots: { customRender: 'is_add' }
+ },
+ {
+ title: '是否允许删除操作',
+ dataIndex: 'is_del',
+ key: 'is_del',
+ align: 'center',
+ scopedSlots: { customRender: 'is_del' }
+ },
+ {
+ title: '是否允许编辑操作',
+ dataIndex: 'is_edit',
+ key: 'is_edit',
+ align: 'center',
+ scopedSlots: { customRender: 'is_edit' }
+ },
+ {
+ title: '是否允许查看操作',
+ dataIndex: 'is_view',
+ key: 'is_view',
+ align: 'center',
+ scopedSlots: { customRender: 'isQuery' }
+ }
+ ]
},
{
// 0:禁用; 1:启用
@@ -417,6 +542,51 @@ export const stationOptions = [
ruleForm: {}
}
]
+export const serviceApiOptions = [
+ {
+ title: '基础信息',
+ icon: 'icon-xinxi',
+ list: [
+ {
+ label: '接口名称',
+ value: '',
+ key: 'name',
+ type: 'input'
+ },
+ {
+ label: '接口参数',
+ value: '',
+ key: 'params',
+ type: 'input'
+ },
+ {
+ label: '接口描述',
+ value: '',
+ key: 'describe',
+ type: 'textarea'
+ },
+
+ {
+ label: '是否启用',
+ value: '',
+ key: 'is_open',
+ type: 'switch',
+ className: 'item-l',
+ list: [
+ {
+ label: '禁用',
+ value: '0'
+ },
+ {
+ label: '启用',
+ value: '1'
+ }
+ ]
+ }
+ ],
+ ruleForm: {}
+ }
+]
export const userFormRules = {
account: [
@@ -452,3 +622,12 @@ export const stationFormRules = {
}
]
}
+export const serviceApiFormRules = {
+ name: [
+ {
+ trigger: 'blur',
+ required: true,
+ message: '请输入接口名称'
+ }
+ ]
+}
diff --git a/web/src/components/ComTable.vue b/web/src/components/ComTable.vue
index 2e68ecd..286a1f5 100644
--- a/web/src/components/ComTable.vue
+++ b/web/src/components/ComTable.vue
@@ -108,7 +108,7 @@ const props = defineProps({
default: () => {
return {
count: 1,
- pageSize: 10,
+ pageSize: 5,
page: 1
}
}
@@ -410,30 +410,8 @@ defineExpose({ ...toRefs(data), loading, mountedScroll, scroll: data.scroll })
background-color: transparent !important;
}
-:deep(
- .ant-table-wrapper
- .ant-table.ant-table-bordered
- > .ant-table-container
- > .ant-table-body
- > table
- > tbody
- > tr
- > .ant-table-cell-fix-right-first::after
- ) {
- // border-inline-end: 1px solid var(--theme-bg) !important;
-}
-:deep(
- .ant-table-wrapper
- .ant-table.ant-table-bordered
- > .ant-table-container
- > .ant-table-header
- > table
- > thead
- > tr
- > .ant-table-cell-fix-right-first::after
- ) {
- // border-inline-end: 1px solid var(--theme-bg) !important;
-}
+
+
:deep(.ant-table-wrapper .ant-table-thead th.ant-table-column-has-sorters:hover) {
background: var(--table-select) !important;
diff --git a/web/src/components/EditCom.vue b/web/src/components/EditCom.vue
index de72d0f..777ad56 100644
--- a/web/src/components/EditCom.vue
+++ b/web/src/components/EditCom.vue
@@ -27,31 +27,28 @@