From 0c2ebc85016bf4ef1dffa96c0f17260d353777b4 Mon Sep 17 00:00:00 2001 From: molong Date: Thu, 22 Jan 2026 22:28:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E6=A8=A1=E5=9D=97=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=9F=BA=E6=9C=AC=E6=94=B9=E5=86=99=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system.js | 7 + src/assets/style/app.scss | 90 +++++- src/config/upload.js | 6 +- src/pages/auth/department/index.vue | 410 +++++++++++++++-------- src/pages/auth/department/save.vue | 243 ++++++++------ src/pages/auth/permission/index.vue | 470 ++++++++++++++++++--------- src/pages/auth/permission/save.vue | 484 +++++++++++++++++----------- src/pages/auth/role/index.vue | 464 +++++++++++++++++--------- src/pages/auth/role/permission.vue | 290 ++++++++++------- src/pages/auth/role/save.vue | 227 ++++++------- src/pages/auth/user/index.vue | 234 +++++++------- src/pages/auth/user/role.vue | 188 +++++++---- src/pages/auth/user/save.vue | 324 +++++++++++-------- 13 files changed, 2124 insertions(+), 1313 deletions(-) diff --git a/src/api/system.js b/src/api/system.js index 4e7bd73..97f7d57 100644 --- a/src/api/system.js +++ b/src/api/system.js @@ -338,4 +338,11 @@ export default { }, }, }, + upload: { + url: `system/file/upload`, + name: '文件上传', + post: async function (params = {}) { + return await request.post(this.url, params) + }, + }, } diff --git a/src/assets/style/app.scss b/src/assets/style/app.scss index d9c9148..3b453ad 100644 --- a/src/assets/style/app.scss +++ b/src/assets/style/app.scss @@ -74,9 +74,91 @@ body { display: flex; flex-direction: column; background-color: #ffffff; - .search-box { - padding: 10px; - background-color: #f5f5f5; - border-radius: 10px; + + .tool-bar { + padding: 12px 16px; + background-color: #fff; + border-bottom: 1px solid #f0f0f0; + display: flex; + justify-content: space-between; + align-items: center; + gap: 16px; + + .left-panel { + flex: 1; + display: flex; + align-items: center; + gap: 12px; + overflow-x: auto; + + :deep(.ant-form) { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 8px; + flex: 1; + } + + :deep(.ant-form-item) { + margin-bottom: 0; + } + + :deep(.ant-form-item-label) { + min-width: 70px; + } + } + + .right-panel { + display: flex; + align-items: center; + gap: 8px; + flex-shrink: 0; + } + + // 按钮组样式 + .button-group { + display: flex; + gap: 8px; + } + + // 搜索输入框样式 + :deep(.ant-input), + :deep(.ant-select-selector) { + border-radius: 4px; + } + + // 按钮样式优化 + :deep(.ant-btn) { + border-radius: 4px; + transition: all 0.3s ease; + + &:hover { + transform: translateY(-1px); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); + } + + &:active { + transform: translateY(0); + } + } + + // 主按钮特殊样式 + :deep(.ant-btn-primary) { + background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%); + border: none; + + &:hover { + background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%); + } + } + + // 危险按钮样式 + :deep(.ant-btn-dangerous) { + &:hover { + background: #ff4d4f; + border-color: #ff4d4f; + color: #fff; + } + } } } diff --git a/src/config/upload.js b/src/config/upload.js index e5f567b..5429f34 100644 --- a/src/config/upload.js +++ b/src/config/upload.js @@ -1,9 +1,9 @@ -import { upload } from "@/api/system"; +import systemApi from "@/api/system"; //上传配置 export default { - apiObj: upload, //上传请求API对象 + apiObj: systemApi.upload.post, //上传请求API对象 filename: "file", //form请求时文件的key successCode: 1, //请求完成代码 maxSize: 10, //最大文件大小 默认10MB @@ -15,6 +15,6 @@ export default { msg: res.message //分析描述字段结构 } }, - apiObjFile: upload, //附件上传请求API对象 + apiObjFile: systemApi.upload.post, //附件上传请求API对象 maxSizeFile: 10 //最大文件大小 默认10MB } diff --git a/src/pages/auth/department/index.vue b/src/pages/auth/department/index.vue index f33e786..212e5e9 100644 --- a/src/pages/auth/department/index.vue +++ b/src/pages/auth/department/index.vue @@ -1,155 +1,283 @@