diff --git a/src/api/system-boot/csDictData.ts b/src/api/system-boot/csDictData.ts new file mode 100644 index 0000000..eb58792 --- /dev/null +++ b/src/api/system-boot/csDictData.ts @@ -0,0 +1,55 @@ +import request from '@/utils/request' +// 新增字典数据 +export const addCsDictData = (data: any) => { + return request({ + url: '/system-boot/csDictData/add', + method: 'post', + data: data + }) +} + +// 查询字典数据 +export const queryCsDictDataPage = (data: any) => { + return request({ + url: '/system-boot/csDictData/list', + method: 'post', + data: Object.assign( + { + orderBy: '', + pageNum: 0, + pageSize: 0, + searchBeginTime: '', + searchEndTime: '', + searchState: 0, + searchValue: '', + dataType: '', + sortBy: '' + }, + data + ) + }) +} + +//删除字典数据 +export const delCsDictData = (id: string) => { + let form = new FormData() + form.append('id', id) + return request({ + url: '/system-boot/csDictData/delete', + method: 'post', + data: form, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + }) +} + +// 修改字典数据 +export const updateCsDictData = (data: any) => { + return request({ + url: '/system-boot/csDictData/update', + method: 'post', + data: data + }) +} + diff --git a/src/layouts/admin/index.vue b/src/layouts/admin/index.vue index 680c6de..1e52423 100644 --- a/src/layouts/admin/index.vue +++ b/src/layouts/admin/index.vue @@ -138,6 +138,7 @@ const init = async () => { ] const handlerMenu = (data: any) => { data.forEach((item: any) => { + item.routePath = item.routePath[0] == '/' ? item.routePath.substring(1, item.routePath.length) : item.routePath item.path = item.routePath item.name = item.title item.keepalive = item.routePath diff --git a/src/styles/app.scss b/src/styles/app.scss index 73f34a1..8327f36 100644 --- a/src/styles/app.scss +++ b/src/styles/app.scss @@ -1,177 +1,209 @@ /* 基本样式 */ * { - margin: 0; - padding: 0; - box-sizing: border-box; - outline: none !important; + margin: 0; + padding: 0; + box-sizing: border-box; + outline: none !important; } html, body, #app { - margin: 0; - padding: 0; - width: 100%; - height: 100%; - font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif; - font-weight: 400; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: transparent; - background-color: var(--ba-bg-color); - font-size: 14px; - overflow: hidden; - position: relative; + margin: 0; + padding: 0; + width: 100%; + height: 100%; + font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif; + font-weight: 400; + -webkit-font-smoothing: antialiased; + -webkit-tap-highlight-color: transparent; + background-color: var(--ba-bg-color); + font-size: 14px; + overflow: hidden; + position: relative; } ::-webkit-scrollbar { - width: 8px; - height: 10px; + width: 8px; + height: 10px; } + ::-webkit-scrollbar-thumb { - border-radius: 5px; - height: 3px; - background-color: var(--el-color-primary) !important; - border-radius: 30px !important; + border-radius: 5px; + height: 3px; + background-color: var(--el-color-primary) !important; + border-radius: 30px !important; } // 阿里 iconfont Symbol引用css .iconfont-icon { - width: 1em; - height: 1em; - vertical-align: -0.15em; - fill: currentColor; - overflow: hidden; + width: 1em; + height: 1em; + vertical-align: -0.15em; + fill: currentColor; + overflow: hidden; } .w100 { - width: 100% !important; + width: 100% !important; } + .h100 { - height: 100% !important; + height: 100% !important; } + .ba-center { - display: flex; - align-items: center; - justify-content: center; + display: flex; + align-items: center; + justify-content: center; } .default-main { - background: #fff; - margin: var(--ba-main-space) var(--ba-main-space) 0px var(--ba-main-space); + background: #fff; + margin: var(--ba-main-space) var(--ba-main-space) 0px var(--ba-main-space); } + .zoom-handle { - position: absolute; - width: 20px; - height: 20px; - bottom: -10px; - right: -10px; - cursor: se-resize; + position: absolute; + width: 20px; + height: 20px; + bottom: -10px; + right: -10px; + cursor: se-resize; } + .block-help { - display: block; - width: 100%; - color: #909399; - font-size: 13px; - line-height: 16px; - padding-top: 5px; + display: block; + width: 100%; + color: #909399; + font-size: 13px; + line-height: 16px; + padding-top: 5px; } /* 表格顶部菜单-s */ .table-header { - .table-header-operate .icon { - font-size: 14px !important; - color: var(--el-color-white) !important; - } - .el-button.is-disabled .icon { - color: var(--el-button-disabled-text-color) !important; - } + .table-header-operate .icon { + font-size: 14px !important; + color: var(--el-color-white) !important; + } + + .el-button.is-disabled .icon { + color: var(--el-button-disabled-text-color) !important; + } } + /* 表格顶部菜单-e */ /* 鼠标置入浮动效果-s */ .suspension { - transition: all 0.3s ease; + transition: all 0.3s ease; } + .suspension:hover { - -webkit-transform: translateY(-4px) scale(1.02); - -moz-transform: translateY(-4px) scale(1.02); - -ms-transform: translateY(-4px) scale(1.02); - -o-transform: translateY(-4px) scale(1.02); - transform: translateY(-4px) scale(1.02); - -webkit-box-shadow: 0 14px 24px rgba(0, 0, 0, 0.2); - box-shadow: 0 14px 24px rgba(0, 0, 0, 0.2); - z-index: 999; - border-radius: 6px; + -webkit-transform: translateY(-4px) scale(1.02); + -moz-transform: translateY(-4px) scale(1.02); + -ms-transform: translateY(-4px) scale(1.02); + -o-transform: translateY(-4px) scale(1.02); + transform: translateY(-4px) scale(1.02); + -webkit-box-shadow: 0 14px 24px rgba(0, 0, 0, 0.2); + box-shadow: 0 14px 24px rgba(0, 0, 0, 0.2); + z-index: 999; + border-radius: 6px; } + /* 鼠标置入浮动效果-e */ /* 表格-s */ .ba-table-box { - border-radius: var(--el-border-radius-round); + border-radius: var(--el-border-radius-round); } + .ba-table-alert { - background-color: var(--el-fill-color-darker) !important; - border: 1px solid var(--ba-boder-color); - border-bottom: 0; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; + background-color: var(--el-fill-color-darker) !important; + border: 1px solid var(--ba-boder-color); + border-bottom: 0; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } + /* 表格-e */ /* 新增/编辑表单-s */ .cn-operate-dialog { - overflow: hidden; - border-radius: var(--el-border-radius-base); + overflow: hidden; + border-radius: var(--el-border-radius-base); } + .cn-operate-dialog .el-dialog__header { - padding-bottom: 16px; - border-bottom: 1px solid var(--ba-bg-color); + padding-bottom: 16px; + border-bottom: 1px solid var(--ba-bg-color); } + .cn-operate-dialog .el-dialog__body { - height: 60vh; - padding-top: 20px; - padding-bottom: 52px; + height: 60vh; + padding-top: 20px; + padding-bottom: 52px; } + .cn-operate-dialog .el-dialog__body .el-scrollbar { - padding-right: 60px; + padding-right: 60px; } + .cn-operate-dialog .el-dialog__footer { - padding: 10px var(--el-dialog-padding-primary); - box-shadow: var(--el-box-shadow); - position: absolute; - width: 100%; - bottom: 0; + padding: 10px var(--el-dialog-padding-primary); + box-shadow: var(--el-box-shadow); + position: absolute; + width: 100%; + bottom: 0; } + .cn-operate-dialog .el-form--inline { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); + display: grid; + grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); + grid-gap: 10px; + width: calc(100% - 1px); + + .el-form-item { + margin-right: 0; + margin-bottom: 0; + } } + +.cn-operate-dialog .el-form--inline .el-select { + width: 100%; +} + .ba-operate-form { - padding-top: 20px; + padding-top: 20px; } + /* 新增/编辑表单-e */ /* 全局遮罩-s */ .ba-layout-shade { - position: fixed; - top: 0; - left: 0; - height: 100vh; - width: 100vw; - background-color: rgba(0, 0, 0, 0.5); - z-index: 9999990; + position: fixed; + top: 0; + left: 0; + height: 100vh; + width: 100vw; + background-color: rgba(0, 0, 0, 0.5); + z-index: 9999990; } + /* 全局遮罩-e */ /* 图片上传预览-s */ .img-preview-dialog .el-dialog__body { - display: flex; - align-items: center; - justify-content: center; - img { - max-width: 100%; - } + display: flex; + align-items: center; + justify-content: center; + + img { + max-width: 100%; + } } + /* 图片上传预览-e */ /* 页面切换动画-s */ @@ -179,79 +211,93 @@ body, .slide-right-leave-active, .slide-left-enter-active, .slide-left-leave-active { - will-change: transform; - transition: all 0.3s ease; + will-change: transform; + transition: all 0.3s ease; } + // slide-right .slide-right-enter-from { - opacity: 0; - transform: translateX(-20px); + opacity: 0; + transform: translateX(-20px); } + .slide-right-leave-to { - opacity: 0; - transform: translateX(20px); + opacity: 0; + transform: translateX(20px); } + // slide-left .slide-left-enter-from { - @extend .slide-right-leave-to; + @extend .slide-right-leave-to; } + .slide-left-leave-to { - @extend .slide-right-enter-from; + @extend .slide-right-enter-from; } + /* 页面切换动画-e */ /* 布局相关-s */ .frontend-footer-brother { - min-height: calc(100vh - 120px); + min-height: calc(100vh - 120px); } + .user-views { - padding-left: 15px; - .user-views-card { - margin-bottom: 15px; - } + padding-left: 15px; + + .user-views-card { + margin-bottom: 15px; + } } + .ba-aside-drawer { - .el-drawer__body { - padding: 0; - } + .el-drawer__body { + padding: 0; + } } + /* 布局相关-e */ /* 暗黑模式公共样式-s */ .ba-icon-dark { - color: var(--el-text-color-primary) !important; + color: var(--el-text-color-primary) !important; } + /* 暗黑模式公共样式-e */ /* NProgress-s */ #nprogress { - .bar, - .spinner { - z-index: 999999; - } + .bar, + .spinner { + z-index: 999999; + } } + /* NProgress-e */ /* 自适应-s */ @media screen and (max-width: 768px) { - .xs-hidden { - display: none; - } + .xs-hidden { + display: none; + } } + @media screen and (max-width: 1024px) { - .cn-operate-dialog { - width: 96%; - } + .cn-operate-dialog { + width: 96%; + } } + @media screen and (max-width: 991px) { - .user-views { - padding: 0; - } + .user-views { + padding: 0; + } } + /* 自适应-e */ .custom-table-header { - display: flex; - padding: 13px 15px; - align-items: center; + display: flex; + padding: 13px 15px; + align-items: center; } diff --git a/src/views/auth/userList/popupEdit.vue b/src/views/auth/userList/popupEdit.vue index 41f4650..ca40329 100644 --- a/src/views/auth/userList/popupEdit.vue +++ b/src/views/auth/userList/popupEdit.vue @@ -114,7 +114,6 @@ import { roleList } from '@/api/user-boot/role' import { add, edit } from '@/api/user-boot/user' import { useAdminInfo } from '@/stores/adminInfo' import Area from '@/components/form/area/index.vue' -import { de } from 'element-plus/es/locale' import { Arrayable } from 'element-plus/es/utils' const adminInfo = useAdminInfo() diff --git a/src/views/govern/manage/basic/dictionary.vue b/src/views/govern/manage/basic/dictionary.vue new file mode 100644 index 0000000..6f32fba --- /dev/null +++ b/src/views/govern/manage/basic/dictionary.vue @@ -0,0 +1,139 @@ + + diff --git a/src/views/govern/manage/basic/popupDictionary.vue b/src/views/govern/manage/basic/popupDictionary.vue new file mode 100644 index 0000000..aa401cb --- /dev/null +++ b/src/views/govern/manage/basic/popupDictionary.vue @@ -0,0 +1,253 @@ + + diff --git a/src/views/govern/manage/basic/template.vue b/src/views/govern/manage/basic/template.vue new file mode 100644 index 0000000..40f5f07 --- /dev/null +++ b/src/views/govern/manage/basic/template.vue @@ -0,0 +1,41 @@ + + diff --git a/src/views/govern/manage/basic/version.vue b/src/views/govern/manage/basic/version.vue new file mode 100644 index 0000000..ca43a86 --- /dev/null +++ b/src/views/govern/manage/basic/version.vue @@ -0,0 +1,41 @@ + + diff --git a/vite.config.ts b/vite.config.ts index f0ecba3..1aae639 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,8 +10,8 @@ export default defineConfig({ server: { proxy: { '/api': { - target: 'http://192.168.1.81:10215', //数据中心 - // target: 'http://192.168.1.22:10215', //治理 + // target: 'http://192.168.1.81:10215', //数据中心 + target: 'http://192.168.1.22:10215', //治理 changeOrigin: true, rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为'' }