{{ username }}
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 5c339ca..e369960 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -35,8 +35,14 @@ import errorHandler from "@/utils/errorHandler";
import registerGlobComp from '@/components'
+
const app = createApp(App);
+// 自定义警告处理程序,忽略所有警告
+if (import.meta.env.VUE_APP_SILENCE_WARNINGS === true) {
+ app.config.warnHandler = () => {};
+}
+
app.config.errorHandler = errorHandler;
// register the element Icons component
diff --git a/frontend/src/types/env.d.ts b/frontend/src/types/env.d.ts
index be1365c..4442bae 100644
--- a/frontend/src/types/env.d.ts
+++ b/frontend/src/types/env.d.ts
@@ -16,6 +16,7 @@ declare type Recordable
= Record;
declare interface ViteEnv {
VITE_USER_NODE_ENV: 'development' | 'production' | 'test';
VITE_GLOB_APP_TITLE: string;
+ VUE_APP_SILENCE_WARNINGS: boolean;
VITE_PORT: number;
VITE_OPEN: boolean;
VITE_REPORT: boolean;
diff --git a/frontend/src/views/demo/proTable/index.vue b/frontend/src/views/demo/proTable/index.vue
index 70c1f19..1f2a02e 100644
--- a/frontend/src/views/demo/proTable/index.vue
+++ b/frontend/src/views/demo/proTable/index.vue
@@ -1,9 +1,9 @@
@@ -17,7 +17,7 @@
- 查看
编辑
@@ -89,8 +89,9 @@ const columns = reactive[]>([
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
{
prop: 'username',
- label: '用户姓名',
- search: { el: 'input', tooltip: '我是搜索提示' },
+ label: '姓名',
+ width: 120,
+ search: { el: 'input'},
},
{
prop: 'gender',
@@ -107,39 +108,39 @@ const columns = reactive[]>([
// 自定义 search 显示内容
render: ({ searchParam }) => {
return (
-
-
- -
-
-
+
+
+ -
+
+
)
},
},
},
{ prop: 'idCard', label: '身份证号', search: { el: 'input' } },
{ prop: 'email', label: '邮箱' },
- { prop: 'address', label: '居住地址' },
+ { prop: 'address', label: '居住地址', width: 120 },
{
prop: 'status',
- label: '用户状态',
+ label: '状态',
enum: dictStore.getDictData('status'),
search: { el: 'tree-select', props: { filterable: true } },
fieldNames: { label: 'userLabel', value: 'userStatus' },
render: scope => {
return (
- <>
- {BUTTONS.value.status ? (
- changeStatus(scope.row)}
- />
- ) : (
- {scope.row.status ? '启用' : '禁用'}
- )}
- >
+ <>
+ {BUTTONS.value.status ? (
+ changeStatus(scope.row)}
+ />
+ ) : (
+ {scope.row.status ? '启用' : '禁用'}
+ )}
+ >
)
},
},
@@ -150,7 +151,7 @@ const columns = reactive[]>([
search: {
el: 'date-picker',
span: 1,
- props: { type: 'daterange', valueFormat: 'YYYY-MM-DD'},
+ props: { type: 'daterange', valueFormat: 'YYYY-MM-DD' },
defaultValue: ['2024-11-12', '2024-12-12'],
},
},
@@ -188,7 +189,7 @@ const changeStatus = async (row: User.ResUserList) => {
// 导出用户列表
const downloadFile = async () => {
ElMessageBox.confirm('确认导出用户数据?', '温馨提示', { type: 'warning' }).then(() =>
- useDownload(exportUserInfo, '用户列表', proTable.value?.searchParam),
+ useDownload(exportUserInfo, '用户列表', proTable.value?.searchParam),
)
}
From fc72bead6b69b686f0ec69ef18148897ee1d91c2 Mon Sep 17 00:00:00 2001
From: hongawen <83944980@qq.com>
Date: Wed, 16 Oct 2024 15:52:50 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E5=BE=AE=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/authority/role/index.vue | 42 ++++++++++-----------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/frontend/src/views/authority/role/index.vue b/frontend/src/views/authority/role/index.vue
index 6d44c07..fd40482 100644
--- a/frontend/src/views/authority/role/index.vue
+++ b/frontend/src/views/authority/role/index.vue
@@ -20,7 +20,7 @@
删除
-
+
@@ -55,7 +55,7 @@
-
+
\ No newline at end of file
From d032b79499dcf64b74fa3e66d34249e270fbfb98 Mon Sep 17 00:00:00 2001
From: sjl <1716605279@qq.com>
Date: Thu, 17 Oct 2024 15:09:27 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.vscode/settings.json | 8 +
frontend/src/api/resource/interface/index.ts | 24 ++
frontend/src/api/resource/resourceData.ts | 249 ++++++++++++++++++
frontend/src/api/system/dictData.ts | 22 ++
frontend/src/api/user/interface/index.ts | 3 +-
frontend/src/api/user/user.ts | 6 +
.../src/components/ResourceDialog/index.vue | 82 ++++++
frontend/src/utils/dict.ts | 6 +
.../src/views/authority/resource/index.vue | 216 +++++++++++++++
frontend/src/views/demo/proTable/index.vue | 25 +-
10 files changed, 618 insertions(+), 23 deletions(-)
create mode 100644 .vscode/settings.json
create mode 100644 frontend/src/api/resource/interface/index.ts
create mode 100644 frontend/src/api/resource/resourceData.ts
create mode 100644 frontend/src/components/ResourceDialog/index.vue
create mode 100644 frontend/src/views/authority/resource/index.vue
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..1a29f14
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,8 @@
+{
+ "cSpell.words": [
+ "daterange",
+ "resourcedata",
+ "resourcename",
+ "rmark"
+ ]
+}
\ No newline at end of file
diff --git a/frontend/src/api/resource/interface/index.ts b/frontend/src/api/resource/interface/index.ts
new file mode 100644
index 0000000..2adcf93
--- /dev/null
+++ b/frontend/src/api/resource/interface/index.ts
@@ -0,0 +1,24 @@
+import type { DefineComponent } from "vue";
+import type { DatetimeFormatProps } from "vue-i18n";
+
+// 菜单管理模块
+export namespace Resource {
+ // 菜单列表
+ export interface ResResourceList {
+ id: string;//资源表Id
+ name: string;//名称
+ path:string;//路径
+ sort:number;//排序
+ type:string;//资源类型
+ remark:string;//资源描述
+ route_Name:string;//路由名称
+ create_Time:string;//创建时间
+ update_Time:string;//更新时间
+ children?: ResResourceList[];
+ }
+
+ export interface ResType {
+ userLabel: string;
+ userValue: number;
+ }
+}
\ No newline at end of file
diff --git a/frontend/src/api/resource/resourceData.ts b/frontend/src/api/resource/resourceData.ts
new file mode 100644
index 0000000..c8dfaca
--- /dev/null
+++ b/frontend/src/api/resource/resourceData.ts
@@ -0,0 +1,249 @@
+import { HomeFilled, Operation } from "@element-plus/icons-vue"
+import type { Resource } from "./interface"
+
+const resourcedata = ref([
+ {
+ 'id': '1',
+ 'name': '检测计划',
+ 'path':'/plan/planList/index',
+ 'sort':1,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '2',
+ 'name': '台账管理',
+ 'path':'/plan/planList/index',
+ 'sort':2,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ children:[{
+ 'id': '21',
+ 'name': '检测脚本',
+
+ 'path':'/plan/planList/index',
+ 'sort':21,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '22',
+ 'name': '被检设备',
+
+ 'path':'/plan/planList/index',
+ 'sort':22,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '23',
+ 'name': '误差体系',
+
+ 'path':'/plan/planList/index',
+ 'sort':23,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },{
+ 'id': '24',
+ 'name': '检测源',
+
+ 'path':'/plan/planList/index',
+ 'sort':24,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ }
+
+ ]
+ },
+ {
+ 'id': '3',
+ 'name': '权限管理',
+
+ 'path':'/plan/planList/index',
+ 'sort':3,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ children:[{
+ 'id': '31',
+ 'name': '用户管理',
+
+ 'path':'/plan/planList/index',
+ 'sort':31,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '32',
+ 'name': '角色管理',
+
+ 'path':'/plan/planList/index',
+ 'sort':32,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '33',
+ 'name': '菜单管理',
+
+ 'path':'/plan/planList/index',
+ 'sort':33,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ }
+ ]
+ },
+ {
+ 'id': '4',
+ 'name': '系统配置',
+
+ 'path':'/plan/planList/index',
+ 'sort':4,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ children:[{
+ 'id': '41',
+ 'name': '通用配置',
+
+ 'path':'/plan/planList/index',
+ 'sort':41,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '42',
+ 'name': '数据字典',
+
+ 'path':'/plan/planList/index',
+ 'sort':42,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '43',
+ 'name': '报告模版',
+
+ 'path':'/plan/planList/index',
+ 'sort':43,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },{
+ 'id': '44',
+ 'name': '版本注册',
+
+ 'path':'/plan/planList/index',
+ 'sort':44,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ }
+
+]
+ },
+ {
+ 'id': '5',
+ 'name': '日志管理',
+
+ 'path':'/plan/planList/index',
+ 'sort':5,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '6',
+ 'name': '统计分析',
+
+ 'path':'/plan/planList/index',
+ 'sort':6,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '7',
+ 'name': '示例',
+
+ 'path':'/plan/planList/index',
+ 'sort':7,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ children:[{
+ 'id': '71',
+ 'name': '普通表格',
+
+ 'path':'/plan/planList/index',
+ 'sort':71,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ },
+ {
+ 'id': '72',
+ 'name': '表格树',
+
+ 'path':'/plan/planList/index',
+ 'sort':72,
+ 'type':'菜单',
+ 'remark':'检测计划描述',
+ 'route_Name':'route',
+ 'create_Time': '2024-10-16 12:13:14',
+ 'update_Time':'2024-10-16 12:13:14',
+ }
+ ]
+ },
+])
+
+export default resourcedata
\ No newline at end of file
diff --git a/frontend/src/api/system/dictData.ts b/frontend/src/api/system/dictData.ts
index 5cdc655..fa2ca1d 100644
--- a/frontend/src/api/system/dictData.ts
+++ b/frontend/src/api/system/dictData.ts
@@ -43,6 +43,28 @@ const dictData: Dict[] = [
},
],
},
+ {
+ id: "3",
+ code: 'type',
+ label: '资源类型',
+ children: [
+ {
+ id: "1",
+ label: '菜单',
+ code: 1,
+ },
+ {
+ id: "2",
+ label: '按钮',
+ code: 2,
+ },
+ {
+ id: "3",
+ label: '公共资源',
+ code: 3,
+ },
+ ],
+ },
]
export default dictData
\ No newline at end of file
diff --git a/frontend/src/api/user/interface/index.ts b/frontend/src/api/user/interface/index.ts
index 80f863d..149b886 100644
--- a/frontend/src/api/user/interface/index.ts
+++ b/frontend/src/api/user/interface/index.ts
@@ -65,4 +65,5 @@ export namespace User {
name: string;
children?: ResDepartment[];
}
-}
\ No newline at end of file
+}
+
diff --git a/frontend/src/api/user/user.ts b/frontend/src/api/user/user.ts
index 504aa81..1a845e7 100644
--- a/frontend/src/api/user/user.ts
+++ b/frontend/src/api/user/user.ts
@@ -2,6 +2,7 @@ import { ResPage } from '@/api/interface'
import { User } from './interface'
import { ADMIN as rePrefix } from '@/api/config/serviceName'
import http from '@/api'
+import type { Resource } from '../resource/interface'
/**
* @name 用户管理模块
@@ -56,6 +57,11 @@ export const getUserStatus = () => {
return http.get(`${rePrefix}/user/status`)
}
+// 获取用户状态字典
+export const getResourceType = () => {
+ return http.get(`${rePrefix}/user/status`)
+}
+
// 获取用户性别字典
export const getUserGender = () => {
return http.get(`${rePrefix}/user/gender`)
diff --git a/frontend/src/components/ResourceDialog/index.vue b/frontend/src/components/ResourceDialog/index.vue
new file mode 100644
index 0000000..0cdeb38
--- /dev/null
+++ b/frontend/src/components/ResourceDialog/index.vue
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/utils/dict.ts b/frontend/src/utils/dict.ts
index 7eb30a5..6b86683 100644
--- a/frontend/src/utils/dict.ts
+++ b/frontend/src/utils/dict.ts
@@ -15,3 +15,9 @@ export const userStatus = [
{ label: "启用", value: 1, tagType: "success" },
{ label: "禁用", value: 0, tagType: "danger" }
];
+
+export const resourceType = [
+ { label: "菜单", value: 1 },
+ { label: "按钮", value: 2 },
+ { label: "公共资源", value: 3 }
+];
diff --git a/frontend/src/views/authority/resource/index.vue b/frontend/src/views/authority/resource/index.vue
new file mode 100644
index 0000000..2f77cf8
--- /dev/null
+++ b/frontend/src/views/authority/resource/index.vue
@@ -0,0 +1,216 @@
+
+
+
+
+
+ 新增菜单
+
+ 批量删除菜单
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/demo/proTable/index.vue b/frontend/src/views/demo/proTable/index.vue
index 70c1f19..98aa56f 100644
--- a/frontend/src/views/demo/proTable/index.vue
+++ b/frontend/src/views/demo/proTable/index.vue
@@ -24,12 +24,11 @@
重置密码
删除
-
-
+
\ No newline at end of file
From 3857528d121efdab0b31f295d8bd25524f63781f Mon Sep 17 00:00:00 2001
From: GGJ <357021191@qq.com>
Date: Mon, 21 Oct 2024 13:37:27 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0el-dialog=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/styles/element.scss | 100 +++++++++++++++++++++++++-----
frontend/src/utils/elementBind.ts | 18 ++++++
2 files changed, 104 insertions(+), 14 deletions(-)
create mode 100644 frontend/src/utils/elementBind.ts
diff --git a/frontend/src/styles/element.scss b/frontend/src/styles/element.scss
index ef03c73..cdfeab1 100644
--- a/frontend/src/styles/element.scss
+++ b/frontend/src/styles/element.scss
@@ -11,6 +11,7 @@
/* 当前页面最大化 css */
.main-maximize {
+
.aside-split,
.el-aside,
.el-header,
@@ -23,12 +24,10 @@
/* mask image */
.mask-image {
padding-right: 50px;
- mask-image: linear-gradient(
- 90deg,
- #000000 0%,
- #000000 calc(100% - 50px),
- transparent
- );
+ mask-image: linear-gradient(90deg,
+ #000000 0%,
+ #000000 calc(100% - 50px),
+ transparent);
}
/* custom card */
@@ -51,6 +50,7 @@
border-radius: 0;
box-shadow: none;
}
+
.table-search {
padding: 18px 0 0 !important;
margin-bottom: 0 !important;
@@ -63,18 +63,22 @@
flex-direction: column;
align-items: center;
height: 100%;
+
.text {
margin: 20px 0 30px;
font-size: 23px;
font-weight: bold;
color: var(--el-text-color-regular);
}
+
.el-descriptions {
width: 100%;
padding: 40px 0 0;
+
.el-descriptions__title {
font-size: 18px;
}
+
.el-descriptions__label {
width: 200px;
}
@@ -84,6 +88,7 @@
/* main-box (树形表格 treeFilter 页面会使用,左右布局 flex) */
.main-box {
display: flex;
+
.table-box {
// 这里减去的 230px 是 treeFilter 组件宽度
width: calc(100% - 230px);
@@ -103,8 +108,9 @@
.table-search {
padding: 18px 18px 0;
margin-bottom: 10px;
+
.el-form {
- .el-form-item__content > * {
+ .el-form-item__content>* {
width: 100%;
}
@@ -113,6 +119,7 @@
padding: 0 10px;
}
}
+
.operation {
display: flex;
align-items: center;
@@ -126,9 +133,11 @@
.header-button-lf {
float: left;
}
+
.header-button-ri {
float: right;
}
+
.el-button {
margin-bottom: 15px;
}
@@ -144,6 +153,7 @@
table {
width: 100%;
}
+
.el-table__header th,
.el-table-fixed-column--left th,
.el-table-fixed-column--right th {
@@ -161,8 +171,10 @@
// height: 45px;
height: 40px;
font-size: 14px;
+
.move {
cursor: move;
+
.el-icon {
cursor: move;
}
@@ -170,7 +182,7 @@
}
// 设置 el-table 中 header 文字不换行,并省略
- .el-table__header .el-table__cell > .cell {
+ .el-table__header .el-table__cell>.cell {
// white-space: nowrap;
white-space: wrap;
}
@@ -181,6 +193,7 @@
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
+
.table-empty {
line-height: 30px;
}
@@ -208,16 +221,19 @@
height: 40px !important;
font-size: 14px !important;
}
+
.el-table__row {
height: 40px !important;
font-size: 13px !important;
}
}
+
.el-table--large {
.el-table__header th {
height: 50px !important;
font-size: 16px !important;
}
+
.el-table__row {
height: 50px !important;
font-size: 15px !important;
@@ -230,12 +246,14 @@
padding: 16px 20px;
margin-bottom: 0;
border-bottom: 1px solid var(--el-border-color-lighter);
+
span {
font-size: 17px;
line-height: 17px;
color: var(--el-text-color-primary) !important;
}
}
+
.el-drawer__footer {
border-top: 1px solid var(--el-border-color-lighter);
}
@@ -244,15 +262,19 @@
.el-select {
width: 100%;
}
+
.el-select-dropdown__item:hover {
background: red !important;
}
+
// drawer-form 中存在两列 form-item 样式
.drawer-multiColumn-form {
display: flex;
flex-wrap: wrap;
+
.el-form-item {
width: 47%;
+
&:nth-child(2n-1) {
margin-right: 5%;
}
@@ -276,18 +298,21 @@
.el-dialog {
padding: 0px !important;
border: 2px solid #3665a0;
+
.el-dialog__header {
background: var(--el-color-primary);
- padding: 15px;
+ padding: 10px;
margin-right: 0px;
// font-family:;
.el-dialog__headerbtn {
top: 5px;
+
.el-icon {
color: var(--el-color-white);
}
}
+
.el-dialog__headerbtn:hover {
.el-icon {
color: #409eff;
@@ -302,9 +327,11 @@
margin-left: 10px !important;
}
}
+
.el-dialog__body {
- height: 200px;
- max-height: 60vh;
+ // height: 200px;
+ // max-height: 60vh;
+ min-height: 200px;
overflow-y: auto;
padding: 10px 15px;
@@ -312,6 +339,7 @@
.el-form {
.el-form-item {
margin-bottom: 20px;
+
.el-select,
.el-input,
.el-date-picker {
@@ -321,37 +349,56 @@
}
}
}
+
.el-dialog__footer {
- padding: 15px;
+ padding: 8px 10px;
box-shadow: var(--el-box-shadow);
border-top: 1px solid #cccccc;
width: 100%;
bottom: 0;
- }
+
+
+ .el-button {
+ font-size: 12px ;
+
+ padding: 5px 11px;
+ height: 24px;
+
+ }
+ .el-button + .el-button {
+ margin-left: 10px;
+ }
+ }
}
+
//全局el-form-item间距
.el-form-item {
margin-right: 10px !important;
margin-bottom: 20px !important;
}
+
.el-tree-node__content:hover {
// background-color: var(--el-color-primary) !important;
// color: #fff;
}
-.el-tree-node is-expanded is-current is-focusable is-checked{
+
+.el-tree-node is-expanded is-current is-focusable is-checked {
background-color: var(--el-color-primary) !important;
color: #fff;
}
+
.el-table__body-wrapper,
.el-scrollbar {
/* scroll bar */
z-index: 2001;
+
&::-webkit-scrollbar {
width: 8px !important;
height: 200px !important;
// background-color: var(--el-color-primary);
z-index: 3001;
}
+
/* 滚动条实际可拖动部分的颜色 */
::-webkit-scrollbar-thumb {
width: 8px;
@@ -367,6 +414,7 @@
/* ---el-table滚动条公共样式--- */
.el-scrollbar {
+
// 横向滚动条
.el-scrollbar__bar.is-horizontal .el-scrollbar__thumb {
opacity: 1; // 默认滚动条自带透明度
@@ -375,6 +423,7 @@
background-color: var(--el-color-primary); // 滑块背景色
box-shadow: 0 0 6px rgba(0, 0, 0, 0.15); // 滑块阴影
}
+
// 纵向滚动条
.el-scrollbar__bar.is-vertical .el-scrollbar__thumb {
opacity: 1;
@@ -384,3 +433,26 @@
box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}
}
+
+.el-dialog {
+
+
+
+}
+.dialog-small{
+ .el-dialog__body{
+
+
+ max-height: 250px;
+ }
+}
+.dialog-middle{
+ .el-dialog__body{
+ max-height: 400px;
+ }
+}
+.dialog-big{
+ .el-dialog__body{
+ max-height: 620px;
+ }
+}
\ No newline at end of file
diff --git a/frontend/src/utils/elementBind.ts b/frontend/src/utils/elementBind.ts
new file mode 100644
index 0000000..d4acf8e
--- /dev/null
+++ b/frontend/src/utils/elementBind.ts
@@ -0,0 +1,18 @@
+export const dialogSmall = {
+ width:'520px',
+ closeOnClickModal:false,
+ draggable:true,
+ class:'dialog-small'
+}
+export const dialogMiddle = {
+ width:'800px',
+ closeOnClickModal:false,
+ draggable:true,
+ class:'dialog-middle'
+}
+export const dialogBig = {
+ width:'1200px',
+ closeOnClickModal:false,
+ draggable:true,
+ class:'dialog-big'
+}
\ No newline at end of file
From 951754f887630d912390a6a97302d243af04af30 Mon Sep 17 00:00:00 2001
From: hongawen <83944980@qq.com>
Date: Mon, 21 Oct 2024 14:43:37 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E5=BE=AE=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/main.ts | 69 ++++++++--------
frontend/src/styles/element.scss | 30 ++++---
frontend/src/utils/elementBind.ts | 2 +-
.../src/views/demo/proTable/doubleColumn.vue | 80 +++++++++++++++++++
frontend/src/views/demo/proTable/index.vue | 12 ++-
.../src/views/demo/proTable/singleColumn.vue | 80 +++++++++++++++++++
6 files changed, 227 insertions(+), 46 deletions(-)
create mode 100644 frontend/src/views/demo/proTable/doubleColumn.vue
create mode 100644 frontend/src/views/demo/proTable/singleColumn.vue
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index e369960..7095235 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -1,69 +1,70 @@
-import { createApp } from "vue";
-import App from "./App.vue";
+import { createApp } from 'vue'
+import App from './App.vue'
// reset style sheet
-import "@/styles/reset.scss";
+import '@/styles/reset.scss'
// CSS common style sheet
-import "@/styles/common.scss";
+import '@/styles/common.scss'
// iconfont css
-import "@/assets/iconfont/iconfont.scss";
+import '@/assets/iconfont/iconfont.scss'
// font css
-import "@/assets/fonts/font.scss";
+import '@/assets/fonts/font.scss'
// element css
-import "element-plus/dist/index.css";
+import 'element-plus/dist/index.css'
// element dark css
-import "element-plus/theme-chalk/dark/css-vars.css";
+import 'element-plus/theme-chalk/dark/css-vars.css'
// custom element dark css
-import "@/styles/element-dark.scss";
+import '@/styles/element-dark.scss'
// custom element css
-import "@/styles/element.scss";
+import '@/styles/element.scss'
// svg icons
-import "virtual:svg-icons-register";
+import 'virtual:svg-icons-register'
// element plus
-import ElementPlus from "element-plus";
+import ElementPlus from 'element-plus'
// element icons
-import * as Icons from "@element-plus/icons-vue";
+import * as Icons from '@element-plus/icons-vue'
// custom directives
-import directives from "@/directives/index";
+import directives from '@/directives/index'
// vue Router
-import router from "@/routers";
+import router from '@/routers'
// vue i18n
-import I18n from "@/languages/index";
+import I18n from '@/languages/index'
// pinia store
-import pinia from "@/stores";
+import pinia from '@/stores'
// errorHandler
-import errorHandler from "@/utils/errorHandler";
+import errorHandler from '@/utils/errorHandler'
import registerGlobComp from '@/components'
-const app = createApp(App);
+const app = createApp(App)
// 自定义警告处理程序,忽略所有警告
-if (import.meta.env.VUE_APP_SILENCE_WARNINGS === true) {
- app.config.warnHandler = () => {};
+app.config.warnHandler = () => {
}
+// if (import.meta.env.VUE_APP_SILENCE_WARNINGS === true) {
+// }
-app.config.errorHandler = errorHandler;
+app.config.errorHandler = errorHandler
// register the element Icons component
Object.keys(Icons).forEach(key => {
- app.component(key, Icons[key as keyof typeof Icons]);
-});
+ app.component(key, Icons[key as keyof typeof Icons])
+})
const setupAll = async () => {
- app
- .use(ElementPlus)
- .use(directives)
- .use(router) // 使用路由
- .use(I18n)
- .use(pinia)
- .use(registerGlobComp) // 使用全局自定义组件
+ app
+ .use(ElementPlus)
+ .use(directives)
+ .use(router) // 使用路由
+ .use(I18n)
+ .use(pinia)
+ .use(registerGlobComp) // 使用全局自定义组件
- //待路由初始化完毕后,挂载app
- await router.isReady()
+ //待路由初始化完毕后,挂载app
+ await router.isReady()
}
//挂载app
setupAll().then(() => {
- app.mount('#app')
+ app.mount('#app')
})
diff --git a/frontend/src/styles/element.scss b/frontend/src/styles/element.scss
index cdfeab1..3537753 100644
--- a/frontend/src/styles/element.scss
+++ b/frontend/src/styles/element.scss
@@ -297,7 +297,7 @@
//全局dialog修改
.el-dialog {
padding: 0px !important;
- border: 2px solid #3665a0;
+ border: 0 solid #3665a0;
.el-dialog__header {
background: var(--el-color-primary);
@@ -434,16 +434,9 @@
}
}
-.el-dialog {
-
-
-
-}
.dialog-small{
.el-dialog__body{
-
-
- max-height: 250px;
+ max-height: 280px;
}
}
.dialog-middle{
@@ -455,4 +448,23 @@
.el-dialog__body{
max-height: 620px;
}
+}
+
+.form-two {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ .el-form-item {
+ display: flex;
+ width: 48%;
+ .el-form-item__content {
+ flex: 1;
+ .el-select,
+ .el-cascader,
+ .el-input__inner,
+ .el-date-editor {
+ width: 100%;
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/frontend/src/utils/elementBind.ts b/frontend/src/utils/elementBind.ts
index d4acf8e..cd7036e 100644
--- a/frontend/src/utils/elementBind.ts
+++ b/frontend/src/utils/elementBind.ts
@@ -1,5 +1,5 @@
export const dialogSmall = {
- width:'520px',
+ width:'400px',
closeOnClickModal:false,
draggable:true,
class:'dialog-small'
diff --git a/frontend/src/views/demo/proTable/doubleColumn.vue b/frontend/src/views/demo/proTable/doubleColumn.vue
new file mode 100644
index 0000000..e9ec209
--- /dev/null
+++ b/frontend/src/views/demo/proTable/doubleColumn.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/demo/proTable/index.vue b/frontend/src/views/demo/proTable/index.vue
index 00ba1e4..5040a51 100644
--- a/frontend/src/views/demo/proTable/index.vue
+++ b/frontend/src/views/demo/proTable/index.vue
@@ -26,6 +26,8 @@
+