Selaa lähdekoodia

fix🐛: 修复登录白屏问题

Akiraka 2 vuotta sitten
vanhempi
commit
bdc0d32a07
52 muutettua tiedostoa jossa 1187 lisäystä ja 1614 poistoa
  1. 7 0
      README.md
  2. 0 19
      src/api/admin/sys-set.js
  3. 0 9
      src/api/admin/sys-user.js
  4. 1 1
      src/api/tools/gen.js
  5. 0 2
      src/components/Cropper/index.js
  6. 0 187
      src/components/Cropper/src/Cropper.vue
  7. 0 2
      src/components/SvgRaw/index.js
  8. 0 23
      src/components/SvgRaw/src/SvgRaw.vue
  9. 0 6
      src/hooks/globalVar.js
  10. 0 0
      src/icons/index.js
  11. 0 1
      src/icons/svg/api-ctl.svg
  12. 1 0
      src/icons/svg/api-management.svg
  13. 0 0
      src/icons/svg/api-server.svg
  14. 4 1
      src/layout/components/AppMain.vue
  15. 9 7
      src/layout/components/Avatar/index.vue
  16. 41 22
      src/layout/components/Menu/Menu.vue
  17. 10 20
      src/layout/components/Menu/SubMenu.vue
  18. 51 50
      src/layout/components/Navbar.vue
  19. 12 45
      src/layout/index.vue
  20. 3 3
      src/main.js
  21. 8 13
      src/store/userInfo.js
  22. 34 0
      src/style/dark-theme.scss
  23. 37 42
      src/style/index.scss
  24. 0 15
      src/utils/auth.js
  25. 3 3
      src/utils/request.js
  26. 2 9
      src/views/admin/dict/data.vue
  27. 57 65
      src/views/admin/dict/index.vue
  28. 61 64
      src/views/admin/sys-api/index.vue
  29. 58 66
      src/views/admin/sys-config/index.vue
  30. 0 209
      src/views/admin/sys-config/set.vue
  31. 42 44
      src/views/admin/sys-dept/index.vue
  32. 65 73
      src/views/admin/sys-login-log/index.vue
  33. 46 50
      src/views/admin/sys-menu/index.vue
  34. 71 74
      src/views/admin/sys-oper-log/index.vue
  35. 53 65
      src/views/admin/sys-post/index.vue
  36. 54 62
      src/views/admin/sys-role/index.vue
  37. 77 0
      src/views/admin/sys-set/index.vue
  38. 79 80
      src/views/admin/sys-user/index.vue
  39. 0 6
      src/views/dev-tools/build/index.vue
  40. 9 9
      src/views/dev-tools/gen/editTable.vue
  41. 0 1
      src/views/dev-tools/gen/importTable.vue
  42. 63 72
      src/views/dev-tools/gen/index.vue
  43. 9 4
      src/views/dev-tools/swagger/index.vue
  44. 22 15
      src/views/error-page/403.vue
  45. 22 15
      src/views/error-page/404.vue
  46. 22 15
      src/views/error-page/500.vue
  47. 12 8
      src/views/error-page/888.vue
  48. 28 5
      src/views/login/index.vue
  49. 1 0
      src/views/profile/api-management.svg
  50. 71 85
      src/views/profile/index.vue
  51. 39 43
      src/views/schedule/index.vue
  52. 3 4
      src/views/sys-tools/monitor/index.vue

+ 7 - 0
README.md

@@ -1,3 +1,10 @@
+# Vue 3 + Vite
+
+This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
+
+## Recommended IDE Setup
+
+- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
 # go-admin
 
   <img align="right" width="320" src="https://gitee.com/mydearzwj/image/raw/master/img/go-admin.svg">

+ 0 - 19
src/api/admin/sys-set.js

@@ -1,19 +0,0 @@
-import request from '../../utils/request';
-
-const url = '/api/v1/set-config';
-
-export function getSetConfig(params) {
-  return request({
-    url,
-    method: 'get',
-    params
-  });
-}
-
-export function updateSetConfig(data) {
-  return request({
-    url,
-    method: 'put',
-    data
-  });
-}

+ 0 - 9
src/api/admin/sys-user.js

@@ -63,13 +63,4 @@ export function getCurrentUser(uid) {
     url: `${url}/${uid}`,
     method: 'get'
   })
-}
-
-// 用户头像上传
-export function uploadAvatar(data) {
-  return request({
-    url: '/api/v1/user/avatar',
-    method: 'post',
-    data: data
-  })
 }

+ 1 - 1
src/api/tools/gen.js

@@ -59,7 +59,7 @@ export function previewTable(tableId) {
 // 删除表数据
 export function delTable(tableId) {
   return request({
-    url: '/api/v1/sys/tables/info/' + tableId.ids,
+    url: '/api/v1/sys/tables/info/' + tableId,
     method: 'delete'
   })
 }

+ 0 - 2
src/components/Cropper/index.js

@@ -1,2 +0,0 @@
-import Cropper from './src/Cropper.vue';
-export default Cropper;

+ 0 - 187
src/components/Cropper/src/Cropper.vue

@@ -1,187 +0,0 @@
-<template>
-    <a-modal :visible="visible"  :width="width" :footer="false" :maskClosable="false" @cancel="handleCancel">
-        <template #title>{{ title }}</template>
-        <a-row class="image-cropper-container">
-            <img class="image-cropper-target" id="image-cropper-target" :src="originImageURL">
-        </a-row>
-        <div class="image-cropper-action">
-            <a-button-group :disabled="!cropperIsReady">
-                <a-button size="small" type="primary" title="上传" @click="upload">
-                <template #icon>
-                    <icon-upload/>
-                </template>
-                </a-button>
-                <a-button size="small" type="primary" title="放大" @click="zoomIn">
-                <template #icon>
-                    <icon-zoom-in/>
-                </template>
-                </a-button>
-                <a-button size="small" type="primary" title="缩小" @click="zoomOut">
-                <template #icon>
-                    <icon-zoom-out/>
-                </template>
-                </a-button>
-                <a-button size="small" type="primary" title="向左转" @click="rotateLeft">
-                <template #icon>
-                    <icon-rotate-left/>
-                </template>
-                </a-button>
-                <a-button size="small" type="primary" title="向右转" @click="rotateRight">
-                <template #icon>
-                    <icon-rotate-right/>
-                </template>
-                </a-button>
-                <a-popover trigger="click">
-                <a-button size="small" type="primary" title="预览" @click="preview">
-                    <template #icon>
-                    <icon-eye/>
-                    </template>
-                </a-button>
-                <template #content>
-                    <img :src="previewData" class="image-priview"/>
-                </template>
-                </a-popover>
-            </a-button-group>
-            <input type="file" ref="imageFileInput" accept="image/*" class="upload-input" @change="setImage"/>
-            <a-button-group :disabled="!cropperIsReady" class="comfirm">
-                <a-button size="small" @click="handleCancel">取消</a-button>
-                <a-button size="small" type="primary" @click="handleConfirm">确认</a-button>
-            </a-button-group>
-        </div>
-    </a-modal>
-</template>
-
-<script setup scoped>
-import { toRefs, ref, getCurrentInstance, watch } from 'vue';
-import Cropper from 'cropperjs';
-import 'cropperjs/dist/cropper.min.css';
-import { completionStatus } from '@codemirror/autocomplete';
-
-const props = defineProps({
-    visible: {
-        type: Boolean,
-        default: false
-    },
-    title: {
-        type: String,
-        default: '修改头像'
-    },
-    width: {
-        type:Number,
-        default: 600
-    },
-    originImageURL: {
-        type: String
-    },
-    //cropperjs options
-    aspectRatio: {
-        type: Number,
-        default: 1 / 1
-    },
-    dragMode: {
-        type: String,
-        default: 'move'
-    },
-    autoCropArea: {
-        type: Number,
-        default: 0.5
-    }
-});
-
-const emits = defineEmits(['cancel', 'confirm']);
-const handleCancel = (e) => {
-    emits('cancel');
-}
-const handleConfirm = () => {
-    proxy.cropper.getCroppedCanvas().toBlob(data => {
-        emits('confirm', data);
-    });
-}
-
-const { visible, aspectRatio, dragMode, autoCropArea } = toRefs(props);
-const { proxy } = getCurrentInstance();
-const cropperIsReady = ref(false);
-const imageFileInput = ref(null);
-const previewData = ref('');
-
-const zoomIn = () => {
-    proxy.cropper.zoom(0.1);
-}
-const zoomOut = () => {
-    proxy.cropper.zoom(-0.1);
-}
-const upload = () => {
-    imageFileInput.value.click();
-}
-const rotateLeft = () => {
-    proxy.cropper.rotate(-90);
-}
-
-const rotateRight = () => {
-    proxy.cropper.rotate(90);
-}
-
-const preview = () => {
-    const croppedData = proxy.cropper.getCroppedCanvas().toDataURL(); 
-    previewData.value = croppedData;
-}
-const setImage = (e) => {
-  const file = e.target.files[0];
-      if (file.type.indexOf('image/') === -1) {
-        throw Error('Please select an image file');
-        return;
-      }
-      if (typeof FileReader === 'function') {
-        const reader = new FileReader();
-        reader.onload = (event) => {
-            proxy.cropper.replace(event.target.result);
-        };
-        reader.readAsDataURL(file);
-      } else {
-        throw Error('Sorry, FileReader API not supported');
-      }
-}
-watch(visible, (value) => {
-    if(value) {
-        const cropperTarget = document.getElementById('image-cropper-target');
-        proxy.cropper = new Cropper(cropperTarget, {
-            aspectRatio: aspectRatio.value,
-            dragMode: dragMode.value,
-            autoCropArea: autoCropArea.value
-        });
-        cropperTarget.addEventListener('ready', () => {
-            cropperIsReady.value = true;
-        });
-    } else {
-        proxy.cropper && proxy.cropper.destroy();
-        proxy.cropper = null;
-    }
-});
-
-</script>
-
-<style lang="scss" scoped>
-.image-cropper-container {
-    img {
-        max-width: 100%;
-    }
-}
-.image-cropper-action {
-    padding-top: 15px;
-    height:28px;
-    .upload-input {
-        display: none;
-    }
-    svg {
-        font-size:28px;
-    }
-    .comfirm {
-        float: right;
-    }
-}
-.image-priview {
-    width:80px;
-    height:80px;
-    border-radius: 80px;
-}
-</style>

+ 0 - 2
src/components/SvgRaw/index.js

@@ -1,2 +0,0 @@
-import SvgRaw from './src/SvgRaw.vue';
-export default SvgRaw;

+ 0 - 23
src/components/SvgRaw/src/SvgRaw.vue

@@ -1,23 +0,0 @@
-<template>
-    <component :is="currentComponent"/>
-</template>
-<script setup>
-import { computed } from 'vue';
-
-const props = defineProps({
-    name: String
-});
-const svgModules = import.meta.glob('@/icons/svg/*.svg', {
-    eager: true
-});
-const currentComponent = computed(() => {
-    const fileName = `/${props.name}.svg`;
-    for (const path in svgModules) {
-        const mod = svgModules[path];
-        if(path.endsWith(fileName)) {
-            return mod;
-        }
-    }
-    throw new Error(`not found svg file: ${fileName}`);
-});
-</script>

+ 0 - 6
src/hooks/globalVar.js

@@ -1,6 +0,0 @@
-import { getCurrentInstance } from "vue";
-
-export const useGlobalProperties = () => {
-	const {appContext: { app: { config: { globalProperties }}}} = getCurrentInstance();
-	return globalProperties;
-}

+ 0 - 0
src/icons/index.js


+ 0 - 1
src/icons/svg/api-ctl.svg

@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1621564424924" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6360" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M64 223.995345h168.001164v47.997673c0 26.428509 18.878836 47.997673 41.984 47.997673h140.036654c23.095855 0 41.984-21.569164 41.984-47.997673v-47.997673h504.003491a32.004655 32.004655 0 0 0 0-64.009309H455.996509V111.988364c0-26.428509-18.878836-47.997673-41.984-47.997673H273.985164c-23.095855 0-41.984 21.569164-41.984 47.997673v47.997672H64a32.004655 32.004655 0 0 0 0 64.009309zM288.004655 128h111.997672V256H288.004655V128zM960 479.995345H791.998836v-47.997672c0-26.372655-18.878836-47.997673-41.984-47.997673H609.978182c-23.095855 0-41.984 21.634327-41.984 47.997673v47.997672H64a32.004655 32.004655 0 0 0 0 64.00931h504.003491v47.997672c0 26.363345 18.878836 47.997673 41.984 47.997673h140.036654c23.095855 0 41.984-21.634327 41.984-47.997673v-47.997672h168.001164a32.004655 32.004655 0 1 0-0.009309-64.00931zM735.995345 576H623.997673v-128h111.997672v128zM960 800.293236v-0.288581H455.996509v-47.997673c0-26.363345-18.878836-47.997673-41.984-47.997673H274.050327c-23.105164 0-41.984 21.634327-41.984 47.997673v47.997673H64v0.288581a32.004655 32.004655 0 0 0 0 64.009309c0.986764 0 1.917673-0.195491 2.885818-0.288581h165.115346v47.997672c0 26.363345 18.878836 47.997673 41.984 47.997673h140.036654c23.095855 0 41.984-21.634327 41.984-47.997673v-47.997672h501.108364c0.968145 0.093091 1.899055 0.288582 2.895127 0.288581a32.004655 32.004655 0 1 0-0.009309-64.009309zM400.002327 896H288.004655V768h111.997672v128z" fill="" p-id="6361"></path></svg>

+ 1 - 0
src/icons/svg/api-management.svg

@@ -0,0 +1 @@
+<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 15a1 1 0 001 1h2a1 1 0 001-1V8h7a1 1 0 001-1V5a1 1 0 00-1-1H6a2 2 0 00-2 2v9zm4 18a1 1 0 00-1-1H5a1 1 0 00-1 1v9a2 2 0 002 2h9a1 1 0 001-1v-2a1 1 0 00-1-1H8v-7zm35-17a1 1 0 001-1V6a2 2 0 00-2-2h-9a1 1 0 00-1 1v2a1 1 0 001 1h7v7a1 1 0 001 1h2zm1 17a1 1 0 00-1-1h-2a1 1 0 00-1 1v7h-7a1 1 0 00-1 1v2a1 1 0 001 1h9a2 2 0 002-2v-9zM32.835 11h-6.108c-6.512 0-11.882 4.804-12.636 11h-1.992c-.382 0-.52.046-.66.134a.855.855 0 00-.325.378c-.074.162-.114.324-.114.77v1.436c0 .446.04.608.114.77.075.163.185.291.324.378.14.088.279.134.66.134h2.157c1.179 5.706 6.315 10 12.472 10h6.108c.405 0 .552-.041.7-.12a.819.819 0 00.344-.337c.079-.145.121-.29.121-.688V31h.901c.382 0 .52-.046.66-.134a.855.855 0 00.325-.378c.074-.162.114-.324.114-.77v-1.436c0-.446-.04-.608-.114-.77a.855.855 0 00-.325-.378c-.14-.088-.278-.134-.66-.134H34v-7h.901c.382 0 .52-.046.66-.134a.855.855 0 00.325-.378c.074-.162.114-.324.114-.77v-1.436c0-.446-.04-.608-.114-.77a.855.855 0 00-.325-.378c-.14-.088-.278-.134-.66-.134H34v-3.855c0-.398-.042-.543-.121-.688a.819.819 0 00-.344-.338c-.148-.078-.295-.119-.7-.119zm-2.744 3.571h-3.637c-5.02 0-9.09 3.998-9.09 8.929s4.07 8.929 9.09 8.929h3.637V14.57z" fill="currentColor"/></svg>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
src/icons/svg/api-server.svg


+ 4 - 1
src/layout/components/AppMain.vue

@@ -6,4 +6,7 @@
       </transition>
     </router-view>
   </div>
-</template>
+</template>
+
+<style lang="scss">
+</style>

+ 9 - 7
src/layout/components/Avatar/index.vue

@@ -1,8 +1,8 @@
 <template>
   <a-dropdown position="bl" :style="{ top: '52px' }">
     <div class="avatar-container">
-      <a-avatar :size="32" :style="{ backgroundColor: '#fff' }">
-        <img alt="avatar" :src="userAvatarURL" />
+      <a-avatar :size="32" :style="{ backgroundColor: '#3370ff' }">
+        <img alt="avatar" :src="userInfo.avatar" />
       </a-avatar>
       <div class="user-info">
         <div class="user-info-name">{{ userInfo.name }}</div>
@@ -27,17 +27,19 @@
 </template>
 
 <script setup>
-import { getCurrentInstance, computed } from 'vue';
+import { getCurrentInstance } from 'vue';
 import { storeToRefs } from 'pinia';
+import {
+  IconSettings,
+  IconExport,
+} from '@arco-design/web-vue/es/icon';
 import { useUserStore } from '@/store/userInfo';
 import { clearLocalStorage } from '@/utils/storage';
-import { useGlobalProperties } from '@/hooks/globalVar';
 
 const store = useUserStore();
 const { userInfo } = storeToRefs(store);
+
 const { proxy } = getCurrentInstance();
-const globalProperties = useGlobalProperties();
-const userAvatarURL = computed(() => `${globalProperties.CDNDomain}/${store.userInfo.avatar}`);
 
 const handleLogout = () => {
   proxy.$modal.warning({
@@ -45,7 +47,7 @@ const handleLogout = () => {
     content: '确定注销并退出登陆系统吗?',
     hideCancel: false,
     onOk: () => {
-      store.userLogout();
+      window.sessionStorage.removeItem('token');
       clearLocalStorage();
       proxy.$router.push('/login');
     },

+ 41 - 22
src/layout/components/Menu/Menu.vue

@@ -1,12 +1,14 @@
 <template>
+  <div class="sider-logo">
+    <img :src="store.sysConfig.sys_app_logo" />
+    <span class="sider-title" v-if="!props.collapsed">{{store.sysConfig.sys_app_name}}</span>
+  </div>
   <a-menu
     class="menu"
     @menu-item-click="handleMenuClick"
-    @collapse="handleMenuCollapse"
     :default-open-keys="['/admin']"
     :default-selected-keys="defaultSelectKeys"
     :auto-open-selected="true"
-    show-collapse-button
   >
     <sub-menu :menu-list="permissionStore.menuList" />
   </a-menu>
@@ -22,6 +24,7 @@ import SubMenu from './SubMenu.vue';
 
 const store = useUserStore();
 const permissionStore = usePermissionStore();
+
 const props = defineProps({
   collapsed: {
     type: Boolean,
@@ -44,32 +47,48 @@ const keepDefaultSelect = () => {
 const handleMenuClick = (key) => {
   router.push(key);
 };
-const emit = defineEmits(['collapse']);
-const handleMenuCollapse = () => {
-  emit('collapse');
-}
+
 onBeforeMount(() => {
   keepDefaultSelect();
 });
 </script>
 
-<style lang="scss">
-.arco-menu {
-  height: calc(100vh - 60px);
-      ::-webkit-scrollbar {
-        width: 12px;
-        height: 4px;
-      }
-      ::-webkit-scrollbar-thumb {
-        border: 4px solid transparent;
-        background-clip: padding-box;
-        border-radius: 7px;
-        background-color: var(--color-text-4);
-      }
-      ::-webkit-scrollbar-thumb:hover {
-        background-color: var(--color-text-3);
-      }
+<style lang="scss" scoped>
+.sider-logo {
+  margin: 10px 0;
+  display: flex;
+  justify-content: center;
+  padding-bottom: 8px;
+  border-bottom: 1px solid var(--color-text-4);
+  & img {
+    height: 32px;
+  }
+}
+
+.sider-title {
+  margin-left: 10px;
+  display: flex;
+  align-items: center;
+  font-size: 16px;
+  color: var(--color-text-4);
 }
+
+.left-side {
+  height: 50px;
+  width: 50px;
+  font-size: 18px;
+  line-height: 50px;
+  text-align: center;
+  transition: all 0.3s ease-in-out;
+  cursor: pointer;
+
+  &:hover {
+    background-color: #e5e5e5;
+  }
+}
+</style>
+
+<style lang="scss">
 .arco-menu-indent {
   width: 30px;
 }

+ 10 - 20
src/layout/components/Menu/SubMenu.vue

@@ -1,26 +1,24 @@
 <template>
   <template v-for="menu in props.menuList" :key="menu.menuId">
-    <a-menu-item
-        v-if="menu.menuType == 'C' && !menu.children && menu.visible === '0' && isRouteParams(menu.path)"
-        :key="menu.path"
-        >
-        <template #icon v-if="menu.parentId === 0"><svg-raw :name="menu.icon"/></template>{{ menu.title }}
-    </a-menu-item>
-    <template v-else>
-      <a-sub-menu
-      v-if="menu.menuType == 'M' && menu.visible == 0"
+    <a-sub-menu
+      v-if="menu.children && menu.menuType == 'M' && menu.visible == 0"
       :key="menu.path"
     >
-      <template #icon v-if="menu.parentId === 0"><svg-raw :name="menu.icon"/></template>
+      <template #icon>
+        <component :is="menu.icon" />
+      </template>
       <template #title>{{ menu.title }}</template>
       <sub-menu :menuList="menu.children" />
     </a-sub-menu>
-    </template>
+    <a-menu-item
+      v-if="menu.menuType == 'C' && menu.visible && isRouteParams(menu.path)"
+      :key="menu.path"
+      >{{ menu.title }}</a-menu-item>
   </template>
 </template>
 
 <script setup>
-import { computed } from 'vue';
+import { computed } from 'vue'
 
 const props = defineProps({
   menuList: {
@@ -37,11 +35,3 @@ const isRouteParams = computed(() => {
   }
 })
 </script>
-
-<style lang="scss" scoped>
-  svg {
-    width: 16px;
-    height: 16px;
-    fill: var(--color-text-3);
-  }
-</style>

+ 51 - 50
src/layout/components/Navbar.vue

@@ -1,31 +1,16 @@
 <template>
   <div class="navbar">
-    <div class="left-side">
-      <a-space>
-        <img
-          alt="logo"
-          :src="store.sysConfig.sys_app_logo"
-          class="logo"
-        />
-        <a-typography-title
-          :style="{ margin: 0, fontSize: '18px' }"
-          :heading="5"
-        >
-        {{store.sysConfig.sys_app_name}}
-        </a-typography-title>
-      </a-space>
+    <div class="left-side" @click="onCollapse">
+      <icon-menu-fold v-if="!props.collapsed" />
+      <icon-menu-unfold v-else />
     </div>
     <ul class="right-side">
       <li>
-        <a-button
-          class="nav-btn"
-          type="outline"
-          :shape="'circle'"
-          @click="handleToggleTheme"
-        >
+        <a-button shape="circle" @click="handleDarkTheme">
           <template #icon>
-            <icon-moon-fill v-if="!isDark" />
-            <icon-sun-fill v-else />
+            <component
+              :is="!darkTheme ? IconSunFill : IconMoonFill"
+            ></component>
           </template>
         </a-button>
       </li>
@@ -37,41 +22,62 @@
 </template>
 
 <script setup>
-import { useUserStore } from '@/store/userInfo';
+import { ref } from 'vue';
 import Avatar from './Avatar/index.vue';
-import {useDark, useToggle } from '@vueuse/core';
+import {
+  IconMenuFold,
+  IconMenuUnfold,
+  IconSunFill,
+  IconMoonFill,
+} from '@arco-design/web-vue/es/icon';
 
-const store = useUserStore();
-const isDark = useDark({
-  selector: 'body',
-  attribute: 'arco-theme',
-  valueDark: 'dark',
-  valueLight: 'light',
-  storageKey: 'arco-theme'
+const darkTheme = ref(false);
+
+const props = defineProps({
+  collapsed: Boolean,
 });
-const toggleTheme = useToggle(isDark);
-const handleToggleTheme= () => {
-  toggleTheme();
-}
+
+const emit = defineEmits(['onCollapse']);
+
+const onCollapse = () => {
+  emit('onCollapse');
+};
+
+// 切换亮色和暗色
+const handleDarkTheme = () => {
+  const theme = document.body.getAttribute('arco-theme');
+  if (!theme) {
+    document.body.setAttribute('arco-theme', 'dark');
+    darkTheme.value = true;
+  } else {
+    document.body.removeAttribute('arco-theme');
+    darkTheme.value = false;
+  }
+};
 </script>
 
 <style lang="scss" scoped>
 .navbar {
   display: flex;
-  height: 100%;
   justify-content: space-between;
-  border-bottom: 1px solid var(--color-border);
-  background-color: var(--color-bg-2);
+  height: 50px;
+  border-bottom: 1px solid #e5e6eb;
+  box-shadow: 0 2px 5px 0 rgba(0,0,0, .1);
+
   .left-side {
-    display: flex;
-    height:60px;
-    align-items: center;
-    padding-left: 20px;
-    .logo {
-      width:40px;
-      height:40px;
+    height: 50px;
+    width: 50px;
+    font-size: 18px;
+    line-height: 50px;
+    text-align: center;
+    transition: all 0.3s ease-in-out;
+    cursor: pointer;
+
+    &:hover {
+      background-color: #e5e5e5;
     }
   }
+
   .right-side {
     list-style: none;
     display: flex;
@@ -82,11 +88,6 @@ const handleToggleTheme= () => {
       align-items: center;
       padding: 10px;
     }
-    .nav-btn {
-      border-color: rgb(var(--gray-2));
-      color: rgb(var(--gray-8));
-      font-size: 16px;
-    }
   }
 }
 </style>

+ 12 - 45
src/layout/index.vue

@@ -1,13 +1,13 @@
 <template>
   <a-layout :style="{ height: '100vh' }">
-    <a-layout-header class="layout-header">
-      <Navbar />
-    </a-layout-header>
+    <a-layout-sider theme="dark" breakpoint="lg" :width="220" collapsible :collapsed="collapsed" @collapse="onCollapse">
+      <Menu :collapsed="collapsed" />
+    </a-layout-sider>
     <a-layout>
-      <a-layout-sider breakpoint="lg" :hide-trigger="true" :width="220" collapsible :collapsed="collapsed"  class="layout-sider">
-        <Menu @collapse="onCollapse"/>
-      </a-layout-sider>
-      <a-layout-content class="layout-content" :style="layoutContentStyle">
+      <a-layout-header>
+        <Navbar :collapsed="collapsed" @on-collapse="onCollapse" />
+      </a-layout-header>
+      <a-layout-content class="layout-content">
         <AppMain />
       </a-layout-content>
     </a-layout>
@@ -15,56 +15,23 @@
 </template>
 
 <script setup>
-import { watch, reactive, ref } from 'vue';
+import { ref } from 'vue';
 import { AppMain, Navbar } from './components';
 import Menu from './components/Menu/Menu.vue';
 
 const collapsed = ref(false);
-const layoutContentStyle = reactive({
-  'padding-left': '220px'
-});
 const onCollapse = () => {
   collapsed.value = !collapsed.value;
 };
-watch(collapsed, (value) => {
-  layoutContentStyle['padding-left'] = value ? '48px' : '220px';
-});
 </script>
 
 <style lang="scss">
 @import '../style/index.scss';
 @import '../style/transition.scss';
-.layout-header {
-  position: fixed;
-  width:100%;
-  top:0;
-  left:0;
-  z-index: 100;
-  height: 60px;
-}
-.layout-sider {
-  position: fixed;
-  top:0;
-  left:0;
-  z-index: 90;
-  padding-top: 60px;
-  height:100vh;
-  &:after {
-    position: absolute;
-    top: 0;
-    right: -1px;
-    display: block;
-    width: 1px;
-    height: 100%;
-    background-color: var(--color-border);
-    content: ""
-  }
-}
+@import '../style/dark-theme.scss';
+
 .layout-content {
-  min-height: calc(100vh - 60px);
-  overflow-y: auto;
-  padding-top:60px;
-  background-color: var(--color-fill-2);
-  transition: padding-left 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
+  padding: 16px;
+  background-color: #f2f3f5;
 }
 </style>

+ 3 - 3
src/main.js

@@ -6,13 +6,15 @@ import { Message, Modal, Notification } from '@arco-design/web-vue';
 import '@arco-design/web-vue/dist/arco.css';
 import router from './router/';
 import { parseTime } from '@/utils/parseTime';
-import SvgRaw from '@/components/SvgRaw';
 
 // Directive
 import permission from '@/directive/permission/permission';
 
 // 引入 Arco 图标库
 import * as ArcoIconModules from '@arco-design/web-vue/es/icon';
+
+console.log(import.meta.env);
+
 // Initialize the Pinia instance
 const pinia = createPinia();
 const app = createApp(App);
@@ -24,13 +26,11 @@ app.config.globalProperties.message = Message;
 app.config.globalProperties.modal = Modal;
 app.config.globalProperties.notification = Notification;
 app.config.globalProperties.parseTime = parseTime;
-app.config.globalProperties.CDNDomain = '//localhost'; //头像所在的CDN域名
 
 // 挂载全局图标
 for(const name in ArcoIconModules){
   app.component(name,ArcoIconModules[name])
 }
-app.component('SvgRaw', SvgRaw);
 
 app.use(ArcoVue);
 app.use(router);

+ 8 - 13
src/store/userInfo.js

@@ -2,13 +2,11 @@ import { defineStore } from 'pinia';
 import { setLocalStorage, getLocalStorage } from '@/utils/storage';
 import { getInfo } from '@/api/admin/sys-user';
 import { getAppConfig } from '@/api/admin/login';
-import { getToken, setToken, removeToken } from '@/utils/auth';
 
 export const useUserStore = defineStore('user', {
   state: () => {
     return {
-      // token: window.sessionStorage.getItem('token') || '',
-      token: getToken(),
+      token: window.sessionStorage.getItem('token') || '',
       uid: window.sessionStorage.getItem('uid') || '',
       sysConfig: getLocalStorage('sysConfig'),
       userInfo: '',
@@ -20,16 +18,13 @@ export const useUserStore = defineStore('user', {
   actions: {
     setToken(token) {
       this.token = token;
-      setToken(token);
-      // window.sessionStorage.setItem('token', token);
-    },
-    userLogout() {
-      removeToken();
-      this.$reset();
+
+      window.sessionStorage.setItem('token', token);
     },
     async getUserInfo() {
       try {
         const res = await getInfo();
+        // window.sessionStorage.setItem('uid', res.data.userId);
         window.localStorage.setItem('uid', res.data.userId);
         this.userInfo = res.data;
       } catch (err) {
@@ -44,10 +39,10 @@ export const useUserStore = defineStore('user', {
       } catch (err) {
         console.error(err);
       }
-    },
-    updateSysConfig(configData) {
-      Object.assign(this.sysConfig, configData);
-      setLocalStorage('sysConfig', this.sysConfig);
     }
   },
+  userLogout() {
+    this.token = null;
+    this.userInfo = null;
+  }
 })

+ 34 - 0
src/style/dark-theme.scss

@@ -0,0 +1,34 @@
+// Dark Theme
+
+$dark-bg-1: #17171A;
+$color-bg-2: #232324;
+$color-bg-3: #2a2a2b;
+$color-bg-4: #313132;
+$color-bg-5: #373739;
+
+$--color-text-1: rgba(255, 255, 255, 0.9);
+$--color-text-2: rgba(255, 255, 255, 0.7);
+$--color-text-3: rgba(255, 255, 255, 0.5);
+$--color-text-4: rgba(255, 255, 255, 0.3);
+
+body[arco-theme='dark'] {
+  .navbar {
+    background-color: $dark-bg-1;
+  }
+  .arco-layout-content {
+    background-color: $color-bg-2
+  }
+  .app-container {
+    background-color: $color-bg-3;
+  }
+  .navbar {
+    border-bottom: 1px solid $--color-text-4;
+    .left-side {
+      background-color: $color-bg-2;
+      color: $--color-text-1;
+      &:hover {
+        background-color: $color-bg-5;
+      }
+    }
+  }
+}

+ 37 - 42
src/style/index.scss

@@ -1,38 +1,9 @@
-html, body {
-  width: 100%;
-  height: 100%;
-  margin: 0;
-  padding: 0;
-  font-size: 14px;
-  background-color: var(--color-bg-1);
-  -moz-osx-font-smoothing: grayscale;
-  -webkit-font-smoothing: antialiased;
-}
-* {
-  box-sizing: border-box
-}
-// 链接标签样式
-a {
-  text-decoration: none;
-  color: #165DFF;
-}
-
-a:hover {
-  color: #4080FF;
-}
-ul, li {
-  margin: 0;
-  padding:0;
-}
 // main-container 全局样式
-.app-main {
+.app-container {
   flex: 1;
-  .app-container {
-    border-radius:4px;
-    // background-color: var(--color-bg-2);
-    padding:20px;
-    min-height: calc(100vh - 100px);
-  }
+  padding: 20px 20px 12px 20px;
+  background-color: #fff;
+  border-radius: 5px;
 }
 
 // 表格操作栏样式
@@ -44,14 +15,38 @@ ul, li {
 .arco-input-number .arco-input {
   text-align: center;
 }
-// 为卡片增加radius
-.general-card {
-  border-radius: 4px;
+
+// Table Tag 样式
+// .arco-table-td .arco-table-cell .arco-tag {
+//   margin-left: -8px;
+// }
+
+
+// 滚动条整体部分
+::-webkit-scrollbar {
+  width: 4px;
+  height: 4px;
+  background-color: transparent
+}
+
+// 滚动条外层轨道
+::-webkit-scrollbar-track {
+  border-radius: 10px;
+}
+
+// 滚动条滑块
+::-webkit-scrollbar-thumb {
+  background-color: rgba(0, 0, 0, .2);
+  border-radius: 10px;
+  transition: all .3s ease-in-out;
+}
+
+// 链接标签样式
+a {
+  text-decoration: none;
+  color: #165DFF;
 }
-// 全屏iframe
-.iframe-fullscreen {
-  width: 100%;
-  height: calc(100vh - 70px);
-  border: none;
-  padding: 20px;
+
+a:hover {
+  color: #4080FF;
 }

+ 0 - 15
src/utils/auth.js

@@ -1,15 +0,0 @@
-import Cookies from 'js-cookie'
-
-const TokenKey = 'Admin-Token'
-
-export function getToken() {
-  return Cookies.get(TokenKey)
-}
-
-export function setToken(token) {
-  return Cookies.set(TokenKey, token)
-}
-
-export function removeToken() {
-  return Cookies.remove(TokenKey)
-}

+ 3 - 3
src/utils/request.js

@@ -4,8 +4,8 @@ import { useUserStore } from '../store/userInfo'
 
 // create an axios instance
 const service = axios.create({
-  baseURL: import.meta.env.VITE_APP_BASE_URL,
-  timeout: 2000,
+  baseUrl: import.meta.env.VITE_APP_BASE_URL,
+  timeout: 8000,
 });
 
 // request interceptor
@@ -39,7 +39,7 @@ service.interceptors.response.use(
       });
       // 重定向路由到登陆页面
       store.userLogout();
-      window.location.href = '/login';
+      return router.push('/login');
     }
 
     if (res.code !== 200) {

+ 2 - 9
src/views/admin/dict/data.vue

@@ -2,17 +2,10 @@
   <div class="app-container">
     <a-form :model="queryForm" layout="inline">
       <a-form-item field="dictType" label="字典名称">
-        <a-select
-          v-model="queryForm.dictType"
-          :options="dictTypeOptions"
-          :field-names="{ value: 'dictType', label: 'dictName' }"
-        ></a-select>
+        <a-select v-model="queryForm.dictType" :options="dictTypeOptions" :field-names="{ value: 'dictType', label: 'dictName' }" />
       </a-form-item>
       <a-form-item field="dictTag" label="字典标签">
-        <a-input
-          v-model="queryForm.dictTag"
-          placeholder="请输入字典标签"
-        ></a-input>
+        <a-input v-model="queryForm.dictTag" placeholder="请输入字典标签" />
       </a-form-item>
       <a-form-item field="status" label="字典状态">
         <a-select v-model="queryForm.status" placeholder="请选择字典状态">

+ 57 - 65
src/views/admin/dict/index.vue

@@ -1,74 +1,66 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="dictName" label="字典名称">
-          <a-input
-            v-model="queryForm.dictName"
-            placeholder="请输入字典名称"
-          ></a-input>
-        </a-form-item>
-        <a-form-item field="dictType" label="字典类型">
-          <a-input
-            v-model="queryForm.dictType"
-            placeholder="请输入字典类型"
-          ></a-input>
-        </a-form-item>
-        <a-form-item field="status" label="状态">
-          <a-select v-model="queryForm.status" placeholder="请选择字典状态">
-            <a-option :value="2">正常</a-option>
-            <a-option :value="1">停用</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button v-has="'admin:sysDictType:query'" type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
-            <a-button v-has="'admin:sysDictType:query'" @click="handleResetQuery"><icon-loop /> 重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="dictName" label="字典名称">
+        <a-input v-model="queryForm.dictName" placeholder="请输入字典名称" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="dictType" label="字典类型">
+        <a-input v-model="queryForm.dictType" placeholder="请输入字典类型" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="status" label="状态">
+        <a-select v-model="queryForm.status" placeholder="请选择字典状态">
+          <a-option :value="2">正常</a-option>
+          <a-option :value="1">停用</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item>
+        <a-space>
+          <a-button v-has="'admin:sysDictType:query'" type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
+          <a-button v-has="'admin:sysDictType:query'" @click="handleResetQuery"><icon-loop /> 重置</a-button>
+        </a-space>
+      </a-form-item>
+    </a-form>
 
-      <a-divider />
+    <a-divider />
 
-      <div class="action">
-        <a-space>
-          <a-button v-has="'admin:sysDictType:add'" type="primary" @click="handleAdd"><icon-plus /> 新增</a-button>
+    <div class="action">
+      <a-space>
+        <a-button v-has="'admin:sysDictType:add'" type="primary" @click="handleAdd"><icon-plus /> 新增</a-button>
         <a-button v-has="'system:sysdicttype:remove'" type="primary" status="danger" @click="() => { deleteVisible = true; }"><icon-delete /> 批量删除</a-button>
-          <a-button type="primary" status="warning" disabled><icon-download /> 导出</a-button>
-        </a-space>
-      </div>
-
-      <!-- table -->
-      <a-table
-        :columns="tableColumns"
-        :data="tableData"
-        :bordered="false"
-        :row-selection="{ type: 'checkbox', showCheckedAll: true }"
-        :pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
-        row-key="id"
-        @selection-change="(selection) => {deleteData = selection;}" 
-        @page-change="handlePageChange"
-        @page-size-change="handlePageSizeChange"
-      >
-        <template #dictType="{ record }">
-          <router-link :to="`/admin/dict/data/${record.dictType}`">{{ record.dictType }}</router-link>
-        </template>
-
-        <template #status="{ record }">
-          <a-tag v-if="record.status == 2" color="green">正常</a-tag>
-          <a-tag v-else color="red">停用</a-tag>
-        </template>
-
-        <template #createdAt="{ record }">
-          {{ parseTime(record.createdAt) }}
-        </template>
-
-        <template #action="{ record }">
-          <a-button v-has="'admin:sysDictType:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
+        <a-button type="primary" status="warning" disabled><icon-download /> 导出</a-button>
+      </a-space>
+    </div>
+
+    <!-- table -->
+    <a-table
+      :columns="tableColumns"
+      :data="tableData"
+      :row-selection="{ type: 'checkbox', showCheckedAll: true }"
+      :pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.count, current: currentPage }"
+      row-key="id"
+      @selection-change="(selection) => {deleteData = selection;}" 
+      @page-change="handlePageChange"
+      @page-size-change="handlePageSizeChange"
+    >
+      <template #dictType="{ record }">
+        <router-link :to="`/admin/dict/data/${record.dictType}`">{{ record.dictType }}</router-link>
+      </template>
+
+      <template #status="{ record }">
+        <a-tag v-if="record.status == 2" color="green">正常</a-tag>
+        <a-tag v-else color="red">停用</a-tag>
+      </template>
+
+      <template #createdAt="{ record }">
+        {{ parseTime(record.createdAt) }}
+      </template>
+
+      <template #action="{ record }">
+        <a-button v-has="'admin:sysDictType:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
         <a-button v-has="'admin:sysDictType:remove'" type="text" @click="() => { deleteVisible = true; deleteData = [record.id];  }"><icon-edit /> 删除</a-button>
-        </template>
-      </a-table>
-    </a-card>
+      </template>
+    </a-table>
+
     <!-- Modal弹框 -->
     <a-modal
       v-model:visible="modalVisible"

+ 61 - 64
src/views/admin/sys-api/index.vue

@@ -1,69 +1,66 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="title" label="标题">
-          <a-input v-model="queryForm.title" placeholder="请输入标题" />
-        </a-form-item>
-        <a-form-item field="path" label="地址">
-          <a-input v-model="queryForm.path" placeholder="请输入地址" />
-        </a-form-item>
-        <a-form-item field="action" label="类型">
-          <a-select v-model="queryForm.action" placeholder="请选择类型">
-            <a-option>GET</a-option>
-            <a-option>POST</a-option>
-            <a-option>PUT</a-option>
-            <a-option>DELETE</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item>
-          <a-space size="medium">
-            <a-button v-has="'admin:sysApi:query'" type="primary" @click="handleQuery">
-              <template #icon>
-                <icon-search />
-              </template>
-              搜索
-            </a-button>
-            <a-button @click="handlResetQuery">
-              <template #icon>
-                <icon-loop />
-              </template>
-              重置
-            </a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
-
-      <a-divider />
-
-      <!-- Table -->
-      <a-table
-        :columns="columns"
-        :data="tableData"
-        :bordered="false"
-        :pagination="{
-          'show-total': true,
-          'show-jumper': true,
-          'show-page-size': true,
-          total: pager.count,
-          current: currentPage,
-        }"
-        row-key="id"
-        @page-change="handlePageChange"
-        @page-size-change="handlePageSizeChange"
-      > 
-        <template #reqType="{ record }">
-          <a-tag v-if="record.action.toLowerCase() === 'get'" color="cyan">{{record.action}}</a-tag>
-          <a-tag v-else-if="record.action.toLowerCase() === 'post'" color="gold" >{{ record.action }}</a-tag>
-          <a-tag v-else-if="record.action.toLowerCase() === 'put'" color="green"  >{{ record.action }}</a-tag>
-          <a-tag  v-else-if="record.action.toLowerCase() === 'delete'" color="pinkpurple" >{{ record.action }}</a-tag>
-        </template>
-        <template #createdAt="{ record }"> {{ parseTime(record.createdAt) }}</template>
-        <template #action="{ record }">
-          <a-button v-has="'admin:sysApi:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改 </a-button>
-        </template>
-      </a-table>
-    </a-card>
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="title" label="标题">
+        <a-input v-model="queryForm.title" placeholder="请输入标题" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="path" label="地址">
+        <a-input v-model="queryForm.path" placeholder="请输入地址" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="action" label="类型">
+        <a-select v-model="queryForm.action" placeholder="请选择类型">
+          <a-option>GET</a-option>
+          <a-option>POST</a-option>
+          <a-option>PUT</a-option>
+          <a-option>DELETE</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item>
+        <a-space size="medium">
+          <a-button v-has="'admin:sysApi:query'" type="primary" @click="handleQuery">
+            <template #icon>
+              <icon-search />
+            </template>
+            搜索
+          </a-button>
+          <a-button @click="handlResetQuery">
+            <template #icon>
+              <icon-loop />
+            </template>
+            重置
+          </a-button>
+        </a-space>
+      </a-form-item>
+    </a-form>
+
+    <a-divider />
+
+    <!-- Table -->
+    <a-table
+      :columns="columns"
+      :data="tableData"
+      :pagination="{
+        'show-total': true,
+        'show-jumper': true,
+        'show-page-size': true,
+        total: pager.count,
+        current: currentPage,
+      }"
+      row-key="id"
+      @page-change="handlePageChange"
+      @page-size-change="handlePageSizeChange"
+    > 
+      <template #reqType="{ record }">
+        <a-tag v-if="record.action.toLowerCase() === 'get'" color="cyan">{{record.action}}</a-tag>
+        <a-tag v-else-if="record.action.toLowerCase() === 'post'" color="gold" >{{ record.action }}</a-tag>
+        <a-tag v-else-if="record.action.toLowerCase() === 'put'" color="green"  >{{ record.action }}</a-tag>
+        <a-tag  v-else-if="record.action.toLowerCase() === 'delete'" color="pinkpurple" >{{ record.action }}</a-tag>
+      </template>
+      <template #createdAt="{ record }"> {{ parseTime(record.createdAt) }}</template>
+      <template #action="{ record }">
+        <a-button v-has="'admin:sysApi:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改 </a-button>
+      </template>
+    </a-table>
 
     <!-- Drawer -->
     <a-drawer

+ 58 - 66
src/views/admin/sys-config/index.vue

@@ -1,73 +1,65 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="configName" label="参数名称">
-          <a-input
-            v-model="queryForm.configName"
-            placeholder="请输入参数名称"
-          ></a-input>
-        </a-form-item>
-        <a-form-item field="configKey" label="参数键名">
-          <a-input
-            v-model="queryForm.configKey"
-            placeholder="请输入参数键名"
-          ></a-input>
-        </a-form-item>
-        <a-form-item field="configType" label="系统内置">
-          <a-select v-model="queryForm.configType" placeholder="选择系统内置">
-            <a-option value="Y">是</a-option>
-            <a-option value="N">否</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="handleQuery()"><icon-search /> 搜索</a-button>
-            <a-button @click="handleResetQuery()"><icon-loop /> 重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
-
-      <!-- 分割线 -->
-      <a-divider />
-
-      <div class="action">
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="configName" label="参数名称">
+        <a-input
+          v-model="queryForm.configName"
+          placeholder="请输入参数名称"
+        ></a-input>
+      </a-form-item>
+      <a-form-item field="configKey" label="参数键名">
+        <a-input
+          v-model="queryForm.configKey"
+          placeholder="请输入参数键名"
+        ></a-input>
+      </a-form-item>
+      <a-form-item field="configType" label="系统内置">
+        <a-select v-model="queryForm.configType" placeholder="选择系统内置">
+          <a-option value="Y">是</a-option>
+          <a-option value="N">否</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item>
         <a-space>
-          <a-button v-has="'admin:sysConfig:add'" type="primary" @click="handleAdd"><icon-plus /> 新增</a-button>
-          <a-button v-has="'admin:sysConfig:remove'" type="primary" status="danger" disabled><icon-delete /> 删除</a-button>
-          <a-button type="primary" status="warning" disabled><icon-download /> 导出</a-button>
+          <a-button type="primary" @click="handleQuery()"><icon-search /> 搜索</a-button>
+          <a-button @click="handleResetQuery()"><icon-loop /> 重置</a-button>
         </a-space>
-      </div>
-
-      <a-table
-        :data="tableData"
-        :columns="columns"
-        :bordered="false"
-        :pagination="{
-          'show-total': true,
-          'show-jumper': true,
-          'show-page-size': true,
-          total: pager.total,
-          current: currentPage,
-        }"
-        @page-change="handlePageChange"
-        @page-size-change="handlePageSizeChange"
-      >
-        <template #configType="{ record }">
-          <a-tag v-if="record.configType === 'Y'" color="green">是</a-tag>
-          <a-tag v-else-if="record.configType === 'N'" color="red">否</a-tag>
-        </template>
-
-        <template #createdAt="{ record }">
-          {{ parseTime(record.createdAt) }}
-        </template>
-
-        <template #action="{ record }">
-          <a-button v-has="'admin:sysConfig:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
-          <a-button v-has="'admin:sysConfig:edit'" type="text" @click="() => { deleteVisible = true; deleteData = [record.id];  }"><icon-delete /> 删除</a-button>
-        </template>
-      </a-table>
-    </a-card>
+      </a-form-item>
+    </a-form>
+
+    <!-- 分割线 -->
+    <a-divider />
+
+    <div class="action">
+      <a-space>
+        <a-button v-has="'admin:sysConfig:add'" type="primary" @click="handleAdd"><icon-plus /> 新增</a-button>
+        <a-button v-has="'admin:sysConfig:remove'" type="primary" status="danger" disabled><icon-delete /> 删除</a-button>
+        <a-button type="primary" status="warning" disabled><icon-download /> 导出</a-button>
+      </a-space>
+    </div>
+
+    <a-table
+      :data="tableData"
+      :columns="columns"
+      :pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.count, current: currentPage }"
+      @page-change="handlePageChange"
+      @page-size-change="handlePageSizeChange"
+    >
+      <template #configType="{ record }">
+        <a-tag v-if="record.configType === 'Y'" color="green">是</a-tag>
+        <a-tag v-else-if="record.configType === 'N'" color="red">否</a-tag>
+      </template>
+
+      <template #createdAt="{ record }">
+        {{ parseTime(record.createdAt) }}
+      </template>
+
+      <template #action="{ record }">
+        <a-button v-has="'admin:sysConfig:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
+        <a-button v-has="'admin:sysConfig:edit'" type="text" @click="() => { deleteVisible = true; deleteData = [record.id];  }"><icon-delete /> 删除</a-button>
+      </template>
+    </a-table>
+
     <a-modal
       v-model:visible="visible"
       :title="title"

+ 0 - 209
src/views/admin/sys-config/set.vue

@@ -1,209 +0,0 @@
-<template>
-  <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-tabs default-active-key="1" type="rounded" >
-        <a-tab-pane key="1" title="系统内置">
-          <a-form :model="setConfForm" :rules="setConfFormRule" ref="queryFormRef" :style="{ width: '50%' }">
-            <a-form-item field="sys_app_name" label="系统名称">
-              <a-input v-model="setConfForm.sys_app_name" placeholder="请输入系统名称"></a-input>
-            </a-form-item>
-            <a-form-item field="sys_app_logo" label="系统Logo">
-              <a-space>
-                <div class="upload-logo-preview" v-if="setConfForm.sys_app_logo">
-                  <img :src="setConfForm.sys_app_logo"/>
-                </div>
-                <a-upload 
-                  :action="sysLogoUploadURL" 
-                  :show-file-list = "false"
-                  @success="handlelogoUploadSuccess"
-                  :headers="sysLogoUploadHeaders">
-                  <template #upload-button>
-                    <div class="upload-logo-card">
-                      <div class="upload-logo-card-text">
-                        <IconPlus />
-                      </div>
-                    </div>
-                  </template>
-                </a-upload>
-              </a-space>
-            </a-form-item>
-            <a-form-item field="sys_user_initPassword" label="初始密码">
-              <a-input-password v-model="setConfForm.sys_user_initPassword" placeholder="请输入初始密码"></a-input-password>
-            </a-form-item>
-            <a-form-item field="sys_index_skinName" label="皮肤样式">
-              <a-select v-model="setConfForm.sys_index_skinName" placeholder="请选择皮肤样式">
-                <a-option v-for="(item, index) in sysSkinName" :key="index" :label="item.label" :value="item.value"></a-option>
-              </a-select>
-            </a-form-item>
-            <a-form-item field="sys_index_sideTheme" label="侧边栏主题">
-              <a-select v-model="setConfForm.sys_index_sideTheme" placeholder="请选择侧边栏主题">
-                <a-option v-for="(item, index) in sysThemeName" :key="index" :label="item.label" :value="item.value"></a-option>
-              </a-select>
-            </a-form-item>
-            <a-form-item>
-              <a-space>
-                <a-button @click="handleSubmitQuery" type="primary">提交</a-button>
-                <a-button @click="handleResetQuery"><icon-loop />重置</a-button>
-              </a-space>
-            </a-form-item>
-          </a-form>
-        </a-tab-pane>
-        <a-tab-pane key="2" title="其它">暂无内容</a-tab-pane>
-      </a-tabs>
-    </a-card>
-  </div>
-</template>
-
-<script setup>
-import { getCurrentInstance, onMounted, reactive } from 'vue';
-import { getSetConfig, updateSetConfig } from '@/api/admin/sys-set';
-import { useUserStore } from '@/store/userInfo'
-
-const setConfForm = reactive({
-  sys_app_logo: '',
-  sys_app_name: '',
-  sys_index_sideTheme: '',
-  sys_index_skinName: '',
-  sys_user_initPassword: ''
-});
-
-const setConfFormRule = {
-  sys_app_name: [{
-    required: true,
-    message: '请输入系统名称',
-    trigger: 'blur'
-  }],
-  sys_user_initPassword: [{
-    required: true,
-    message: '请输入初始密码',
-    trigger: 'blur'
-  }],
-  sys_index_skinName: [{
-    required: true,
-    message: '请选择皮肤样式',
-    trigger: 'change'
-  }],
-  sys_index_sideTheme: [{
-    required: true,
-    message: '请选择侧栏主题',
-    trigger: 'change'
-  }]
- };
-const sysLogoUploadURL = `${import.meta.env.VITE_APP_BASE_URL}/api/v1/public/uploadFile`;
-
-const store = useUserStore();
-
-const sysLogoUploadHeaders = {
-  Authorization: `Bearer ${store.token}`
-}
-
-const sysSkinName = [{
-  label: '蓝色',
-  value: 'skin-blue'
-}];
-
-const sysThemeName = [{
-  label: '深色主题',
-  value: 'theme-dark'
-}];
-
-const { proxy } = getCurrentInstance();
-
-const createSubmitData = (data) => {
-  const list = [];
-  for(let key in data) {
-    list.push({
-      configKey: key,
-      configValue: data[key]
-    });
-  }
-  return list;
-}
-
-const handleSubmitQuery = () => {
-  proxy.$refs.queryFormRef.validate(async (err) => {
-    if (err) {
-      proxy.$message.error('表单校验失败');
-    } else {
-      try {
-        await updateSetConf();
-      } catch (error) {
-        console.error(error);
-      }
-    }
-  });
-}
-
-const updateSetConf= async () => {
-  const res = await updateSetConfig(createSubmitData(setConfForm));
-  const { code, msg } = res;
-  if(code === 200) {
-    proxy.$message.success(msg);
-    store.updateSysConfig({
-      sys_app_logo: setConfForm.sys_app_logo,
-      sys_app_name: setConfForm.sys_app_name
-    });
-  } else {
-    proxy.$message.error(msg);
-  }
-}
-const handleResetQuery = () => {
-  proxy.$refs.queryFormRef.resetFields();
-}
-const getSetConf = async () => {
-  const setConf = await getSetConfig();
-  Object.assign(setConfForm, setConf.data);
-}
-
-const handlelogoUploadSuccess = (data) => {
-  const { response : {
-    code,
-    msg
-  }} = data;
-  if(code === 200) {
-    proxy.$message.success(msg);
-    const { response : {
-    data: {
-      full_path
-    }
-  }} = data;
-    setConfForm.sys_app_logo = full_path;
-  } else {
-    proxy.$message.error(msg);
-  }
-}
-onMounted(() => {
-  getSetConf();
-});
-</script>
-
-<style lang="scss" scoped>
-.upload-logo-preview {
-  width:64px;
-  height:64px;
-  font-size: 0px;
-  border-radius:5px;
-  border:1px dashed #c0ccda;
-  box-sizing: border-box;
-  img {
-    width:60px;
-    height:60px;
-    border-radius: 5px;
-  }
-}
-
-.upload-logo-card {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  width: 64px;
-  height: 64px;
-  box-sizing: border-box;
-  border: 1px dashed #c0ccda;
-  border-radius: 5px;
-  color: #4e5969;
-  &-text {
-    font-size: 24px;
-  }
-}
-</style>

+ 42 - 44
src/views/admin/sys-dept/index.vue

@@ -1,53 +1,51 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="deptName" label="部门名称">
-          <a-input v-model="queryForm.deptName" placeholder="请输入部门名称" />
-        </a-form-item>
-        <a-form-item field="status" label="部门状态">
-          <a-select v-model="queryForm.status" placeholder="请选择部门状态">
-            <a-option :value="2">正常</a-option>
-            <a-option :value="1">停用</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button v-has="'admin:sysDept:query'" type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
-            <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="deptName" label="部门名称">
+        <a-input v-model="queryForm.deptName" placeholder="请输入部门名称" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="status" label="部门状态">
+        <a-select v-model="queryForm.status" placeholder="请选择部门状态">
+          <a-option :value="2">正常</a-option>
+          <a-option :value="1">停用</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item>
+        <a-space>
+          <a-button v-has="'admin:sysDept:query'" type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
+          <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
+        </a-space>
+      </a-form-item>
+    </a-form>
 
-      <a-divider />
+    <a-divider />
 
-      <div class="action">
-        <a-button v-has="'admin:sysDept:add'" type="primary" @click="handleAdd()"><icon-plus /> 新增</a-button>
-      </div>
+    <div class="action">
+      <a-button v-has="'admin:sysDept:add'" type="primary" @click="handleAdd()"><icon-plus /> 新增</a-button>
+    </div>
 
-      <!-- 异步数据需要defualt-expanded-keys 传入所有行Key才能默认展开 -->
-      <a-table
-        :columns="columns"
-        :data="tableData"
-        :bordered="false"
-        :pagination="false"
-        :default-expanded-keys="[1]"
-        row-key="deptId"
-      >
-        <template #status="{ record }">
-          <a-tag color="green" v-if="record.status === 2">正常</a-tag>
-          <a-tag color="red" v-else> 停用 </a-tag>
-        </template>
-        <template #createdAt="{ record }">
-          {{ parseTime(record.createdAt) }}
-        </template>
-        <template #action="{ record }">
-          <a-button v-has="'admin:sysDept:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
-          <a-button v-has="'admin:sysDept:add'" type="text" @click="handleAdd(record)"><icon-plus /> 新增</a-button>
+    <!-- 异步数据需要defualt-expanded-keys 传入所有行Key才能默认展开 -->
+    <a-table
+      :columns="columns"
+      :data="tableData"
+      :pagination="false"
+      :default-expanded-keys="[1]"
+      row-key="deptId"
+    >
+      <template #status="{ record }">
+        <a-tag color="green" v-if="record.status === 2">正常</a-tag>
+        <a-tag color="red" v-else> 停用 </a-tag>
+      </template>
+      <template #createdAt="{ record }">
+        {{ parseTime(record.createdAt) }}
+      </template>
+      <template #action="{ record }">
+        <a-button v-has="'admin:sysDept:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
+        <a-button v-has="'admin:sysDept:add'" type="text" @click="handleAdd(record)"><icon-plus /> 新增</a-button>
         <a-button v-has="'admin:sysDept:remove'" type="text" @click="() => { deleteVisible = true; deleteData = [record.deptId];  }"><icon-delete /> 删除</a-button>
-        </template>
-      </a-table>
-    </a-card>
+      </template>
+    </a-table>
+
     <!-- Modal -->
     <a-modal
       v-model:visible="modalVisible"

+ 65 - 73
src/views/admin/sys-login-log/index.vue

@@ -1,80 +1,72 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="username" label="用户名">
-          <a-input v-model="queryForm.username" placeholder="请输入用户名" />
-        </a-form-item>
-        <a-form-item field="status" label="状态">
-          <a-select
-            v-model="queryForm.status"
-            placeholder="请选择系统登录日志状态"
-          >
-            <a-option :value="2">正常</a-option>
-            <a-option :value="1">关闭</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item field="ipaddr" label="IP地址">
-          <a-input v-model="queryForm.ipaddr" placeholder="请输入IP地址" />
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="handleQuery"
-              ><icon-search /> 搜索</a-button
-            >
-            <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
-
-      <a-divider />
-
-      <div class="action">
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="username" label="用户名">
+        <a-input v-model="queryForm.username" placeholder="请输入用户名" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="status" label="状态">
+        <a-select v-model="queryForm.status" placeholder="请选择系统登录日志状态">
+          <a-option :value="2">正常</a-option>
+          <a-option :value="1">关闭</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item field="ipaddr" label="IP地址">
+        <a-input v-model="queryForm.ipaddr" placeholder="请输入IP地址" />
+      </a-form-item>
+      <a-form-item>
         <a-space>
-          <a-button
-            type="primary"
-            status="danger"
-            :disabled="selectedKeys.length === 0"
-            @click="handleBatchDelete"
-            ><icon-delete /> 批量删除</a-button
-          >
+          <a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
+          <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
         </a-space>
-      </div>
-
-      <a-table
-        :data="tableData"
-        :columns="columns"
-        :bordered="false"
-        row-key="id"
-        :row-selection="{ type: 'checkbox', showCheckedAll: true }"
-        :pagination="{
-          'show-total': true,
-          'show-jumper': true,
-          'show-page-size': true,
-          current: currentPage,
-          total: pager.total,
-        }"
-        v-model:selectedKeys="selectedKeys"
-        @page-change="handlePageChange"
-        @page-size-change="handlePageSizeChange"
-      >
-        <template #status="{ record }">
-          <a-tag v-if="record.status == 2" color="green">正常</a-tag>
-          <a-tag v-if="record.status == 1" color="red">失败</a-tag>
-        </template>
-        <template #loginTime="{ record }">
-          {{ parseTime(record.loginTime) }}
-        </template>
-        <template #action="{ record }">
-          <a-popconfirm
-            content="是否删除当前数据?"
-            @ok="removeSysLoginLogInfo([record.id])"
-          >
-            <a-button type="text" status="danger">删除</a-button>
-          </a-popconfirm>
-        </template>
-      </a-table>
-    </a-card>
+      </a-form-item>
+    </a-form>
+
+    <a-divider />
+
+    <div class="action">
+      <a-space>
+        <a-button
+          type="primary"
+          status="danger"
+          :disabled="selectedKeys.length === 0"
+          @click="handleBatchDelete"
+          ><icon-delete /> 批量删除</a-button
+        >
+      </a-space>
+    </div>
+
+    <a-table
+      :data="tableData"
+      :columns="columns"
+      row-key="id"
+      :row-selection="{ type: 'checkbox', showCheckedAll: true }"
+      :pagination="{
+        'show-total': true,
+        'show-jumper': true,
+        'show-page-size': true,
+        current: currentPage,
+        total: pager.total,
+      }"
+      v-model:selectedKeys="selectedKeys"
+      @page-change="handlePageChange"
+      @page-size-change="handlePageSizeChange"
+    >
+      <template #status="{ record }">
+        <a-tag v-if="record.status == 2" color="green">正常</a-tag>
+        <a-tag v-if="record.status == 1" color="red">失败</a-tag>
+      </template>
+      <template #loginTime="{ record }">
+        {{ parseTime(record.loginTime) }}
+      </template>
+      <template #action="{ record }">
+        <a-popconfirm
+          content="是否删除当前数据?"
+          @ok="removeSysLoginLogInfo([record.id])"
+        >
+          <a-button type="text" status="danger">删除</a-button>
+        </a-popconfirm>
+      </template>
+    </a-table>
   </div>
 </template>
 

+ 46 - 50
src/views/admin/sys-menu/index.vue

@@ -1,54 +1,53 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="menuName" label="菜单名称">
-          <a-input v-model="queryForm.menuName" placeholder="请输入菜单名称" />
-        </a-form-item>
-        <a-form-item field="visible" label="状态">
-          <a-select v-model="queryForm.visible" placeholder="请选择菜单状态">
-            <a-option value="0">显示</a-option>
-            <a-option value="1">隐藏</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button v-has="'admin:sysMenu:query'" type="primary" @click="handleQuery">搜索</a-button>
-            <a-button @click="$refs.queryFormRef.resetFields()">重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
-
-      <a-divider />
-
-      <!-- action -->
-      <div class="action">
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="menuName" label="菜单名称">
+        <a-input v-model="queryForm.menuName" placeholder="请输入菜单名称" @press-enter="handleQuery"/>
+      </a-form-item>
+      <a-form-item field="visible" label="状态">
+        <a-select v-model="queryForm.visible" placeholder="请选择菜单状态">
+          <a-option value="0">显示</a-option>
+          <a-option value="1">隐藏</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item>
         <a-space>
-          <a-button v-has="'admin:sysMenu:add'" type="primary" @click="handleAddMenu">新增菜单</a-button>
+          <a-button v-has="'admin:sysMenu:query'" type="primary" @click="handleQuery">搜索</a-button>
+          <a-button @click="$refs.queryFormRef.resetFields()">重置</a-button>
         </a-space>
-      </div>
-
-      <!-- table -->
-      <a-table :columns="columns" :data="tableData" row-key="menuId" :bordered="false">
-        <template #icon="{ record }">
-          <component :is="record.icon" :style="{ fontSize: '18px' }"></component>
-        </template>
-        <template #menutype="{ record }">
-          <span v-if="record.menuType === 'M'">目录</span>
-          <span v-else-if="record.menuType === 'C'">菜单</span>
-          <span v-else-if="record.menuType === 'F'">按钮</span>
-        </template>
-        <template #visible="{ record }">
-          <a-tag v-if="record.visible == 0" color="green">显示</a-tag>
-          <a-tag v-else color="red">隐藏</a-tag>
-        </template>
-        <template #action="{ record }">
-          <a-button v-has="'admin:sysMenu:add'" type="text" @click="handleAddMenu(record.menuId)">新增</a-button>
-          <a-button v-has="'admin:sysMenu:edit'" type="text" @click="handleUpdate(record)">修改</a-button>
+      </a-form-item>
+    </a-form>
+
+    <a-divider />
+
+    <!-- action -->
+    <div class="action">
+      <a-space>
+        <a-button v-has="'admin:sysMenu:add'" type="primary" @click="handleAddMenu">新增菜单</a-button>
+      </a-space>
+    </div>
+
+    <!-- table -->
+    <a-table :columns="columns" :data="tableData" row-key="menuId">
+      <template #icon="{ record }">
+        <component :is="record.icon" :style="{ fontSize: '18px' }"></component>
+      </template>
+      <template #menutype="{ record }">
+        <span v-if="record.menuType === 'M'">目录</span>
+        <span v-else-if="record.menuType === 'C'">菜单</span>
+        <span v-else-if="record.menuType === 'F'">按钮</span>
+      </template>
+      <template #visible="{ record }">
+        <a-tag v-if="record.visible == 0" color="green">显示</a-tag>
+        <a-tag v-else color="red">隐藏</a-tag>
+      </template>
+      <template #action="{ record }">
+        <a-button v-has="'admin:sysMenu:add'" type="text" @click="handleAddMenu(record.menuId)">新增</a-button>
+        <a-button v-has="'admin:sysMenu:edit'" type="text" @click="handleUpdate(record)">修改</a-button>
         <a-button v-has="'admin:sysMenu:remove'" type="text" @click="() => { deleteVisible = true; deleteData = [record.menuId];  }">删除</a-button>
-        </template>
-      </a-table>
-    </a-card>
+      </template>
+    </a-table>
+
     <!-- modal -->
     <a-modal
       v-model:visible="modalVisible"
@@ -77,7 +76,7 @@
             <a-form-item field="parentId" label="上级菜单">
               <a-tree-select
                 v-model="modalForm.parentId"
-                :data="selectTreeData"
+                :data="tableData"
                 :field-names="{ key: 'menuId', icon: '_' }"
                 :allow-search="true"
                 :filter-tree-node="filterTreeNode"
@@ -258,8 +257,6 @@ const columns = [
 ];
 const tableData = ref([]);
 
-const selectTreeData = ref([]);
-
 // Transfer Data
 const transferData = ref([]);
 
@@ -322,7 +319,6 @@ const handleSubmit = (done) => {
 const getSysMenuInfo = async (params = {}) => {
   const res = await getMenu(params);
   tableData.value = res.data;
-  selectTreeData.value = [{"title": "根", "menuId": 0, "parentId": 0, children: res.data}]
 };
 
 // 获取API接口信息

+ 71 - 74
src/views/admin/sys-oper-log/index.vue

@@ -1,82 +1,79 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="status" label="状态">
-          <a-select
-            v-model="queryForm.status"
-            placeholder="请选择系统操作日志状态"
-          >
-            <a-option :value="2">正常</a-option>
-            <a-option :value="1">关闭</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item field="createdAt" label="创建时间">
-          <a-range-picker
-            disabled
-            v-model="queryForm.createdAt"
-            style="width: 254px"
-          />
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="handleQuery"
-              ><icon-search /> 搜索</a-button
-            >
-            <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
-
-      <a-divider />
-
-      <div class="action">
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="status" label="状态">
+        <a-select
+          v-model="queryForm.status"
+          placeholder="请选择系统操作日志状态"
+        >
+          <a-option :value="2">正常</a-option>
+          <a-option :value="1">关闭</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item field="createdAt" label="创建时间">
+        <a-range-picker
+          disabled
+          v-model="queryForm.createdAt"
+          style="width: 254px"
+        />
+      </a-form-item>
+      <a-form-item>
         <a-space>
-          <a-button
-            type="primary"
-            status="danger"
-            @click="handleBatchDelete"
-            :disabled="selectedKeys.length === 0"
-            ><icon-delete /> 批量删除</a-button
+          <a-button type="primary" @click="handleQuery"
+            ><icon-search /> 搜索</a-button
           >
+          <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
         </a-space>
-      </div>
-
-      <a-table
-        :data="tableData"
-        :columns="columns"
-        :bordered="false"
-        :row-selection="{ type: 'checkbox', showCheckedAll: true }"
-        row-key="id"
-        :pagination="{
-          'show-total': true,
-          'show-jumper': true,
-          'show-page-size': true,
-          current: currentPage,
-          total: pager.total,
-        }"
-        v-model:selectedKeys="selectedKeys"
-        @page-change="handlePageChange"
-        @page-size-change="handlePageSizeChange"
-      >
-        <template #status="{ record }">
-          <a-tag v-if="record.status == 2" color="green">正常</a-tag>
-          <a-tag v-if="record.status == 1" color="red">关闭</a-tag>
-        </template>
-        <template #operTime="{ record }">
-          {{ parseTime(record.operTime) }}
-        </template>
-        <template #action="{ record }">
-          <a-popconfirm
-            content="是否删除当前数据?"
-            type="warning"
-            @ok="removeSysOperaLogInfo([record.id])"
-          >
-            <a-button type="text" status="danger">删除</a-button>
-          </a-popconfirm>
-        </template>
-      </a-table>
-    </a-card>
+      </a-form-item>
+    </a-form>
+
+    <a-divider />
+
+    <div class="action">
+      <a-space>
+        <a-button
+          type="primary"
+          status="danger"
+          @click="handleBatchDelete"
+          :disabled="selectedKeys.length === 0"
+          ><icon-delete /> 批量删除</a-button
+        >
+      </a-space>
+    </div>
+
+    <a-table
+      :data="tableData"
+      :columns="columns"
+      :row-selection="{ type: 'checkbox', showCheckedAll: true }"
+      row-key="id"
+      :pagination="{
+        'show-total': true,
+        'show-jumper': true,
+        'show-page-size': true,
+        current: currentPage,
+        total: pager.total,
+      }"
+      v-model:selectedKeys="selectedKeys"
+      @page-change="handlePageChange"
+      @page-size-change="handlePageSizeChange"
+    >
+      <template #status="{ record }">
+        <a-tag v-if="record.status == 2" color="green">正常</a-tag>
+        <a-tag v-if="record.status == 1" color="red">关闭</a-tag>
+      </template>
+      <template #operTime="{ record }">
+        {{ parseTime(record.operTime) }}
+      </template>
+      <template #action="{ record }">
+        <a-popconfirm
+          content="是否删除当前数据?"
+          type="warning"
+          @ok="removeSysOperaLogInfo([record.id])"
+        >
+          <a-button type="text" status="danger">删除</a-button>
+        </a-popconfirm>
+      </template>
+    </a-table>
   </div>
 </template>
 

+ 53 - 65
src/views/admin/sys-post/index.vue

@@ -1,75 +1,63 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="postCode" label="岗位编码">
-          <a-input v-model="queryForm.postCode" placeholder="请输入岗位编码" />
-        </a-form-item>
-        <a-form-item field="postName" label="岗位名称">
-          <a-input v-model="queryForm.postName" placeholder="请输入岗位名称" />
-        </a-form-item>
-        <a-form-item field="status" label="岗位状态">
-          <a-select
-            v-model="queryForm.status"
-            placeholder="请选择岗位状态"
-            :style="{ width: '181px' }"
-          >
-            <a-option :value="2">正常</a-option>
-            <a-option :value="1">停用</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button v-has="'admin:sysPost:query'" type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
-            <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="postCode" label="岗位编码">
+        <a-input v-model="queryForm.postCode" placeholder="请输入岗位编码" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="postName" label="岗位名称">
+        <a-input v-model="queryForm.postName" placeholder="请输入岗位名称" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="status" label="岗位状态">
+        <a-select v-model="queryForm.status" placeholder="请选择岗位状态" :style="{ width: '181px' }">
+          <a-option :value="2">正常</a-option>
+          <a-option :value="1">停用</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item>
+        <a-space>
+          <a-button v-has="'admin:sysPost:query'" type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
+          <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
+        </a-space>
+      </a-form-item>
+    </a-form>
 
-      <a-divider />
+    <a-divider />
 
-      <!-- action -->
-      <div class="action">
-        <a-space>
-          <a-button v-has="'admin:sysPost:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
+    <!-- action -->
+    <div class="action">
+      <a-space>
+        <a-button v-has="'admin:sysPost:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
         <a-button v-has="'admin:sysPost:remove'" type="primary" status="danger" @click="() => { deleteVisible = true; }"><icon-delete /> 批量删除 </a-button>
-          <a-button type="primary" status="warning" disabled><icon-download /> 导出 </a-button>
-        </a-space>
-      </div>
+        <a-button type="primary" status="warning" disabled><icon-download /> 导出 </a-button>
+      </a-space>
+    </div>
 
-      <!-- table -->
-      <a-table
-        :columns="columns"
-        :data="tableData"
-        :bordered="false"
-        :pagination="{
-          'show-total': true,
-          'show-jumper': true,
-          'show-page-size': true,
-          total: pager.total,
-          current: currentPage,
-        }"
-        :row-selection="{ type: 'checkbox', showCheckedAll: true }"
-        row-key="postId"
-        @selection-change="(selection) => {deleteData = selection;}" 
-        @page-change="handlePageChange"
-        @page-size-change="handlePageSizeChange"
-      >
-        <template #createdAt="{ record }">
-          {{ parseTime(record.createdAt) }}
-        </template>
-        <template #status="{ record }">
-          <a-tag v-if="record.status == 2" color="green">正常</a-tag>
-          <a-tag v-else color="red">停用</a-tag>
-        </template>
-        <template #action="{ record }">
-          <a-space>
-            <a-button v-has="'admin:sysPost:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
+    <!-- table -->
+    <a-table
+      :columns="columns"
+      :data="tableData"
+      :pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
+      :row-selection="{ type: 'checkbox', showCheckedAll: true }"
+      row-key="postId"
+      @selection-change="(selection) => {deleteData = selection;}" 
+      @page-change="handlePageChange"
+      @page-size-change="handlePageSizeChange"
+    >
+      <template #createdAt="{ record }">
+        {{ parseTime(record.createdAt) }}
+      </template>
+      <template #status="{ record }">
+        <a-tag v-if="record.status == 2" color="green">正常</a-tag>
+        <a-tag v-else color="red">停用</a-tag>
+      </template>
+      <template #action="{ record }">
+        <a-space>
+          <a-button v-has="'admin:sysPost:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
           <a-button v-has="'admin:sysPost:remove'" type="text" @click="() => { deleteVisible = true; deleteData = [record.postId];  }"><icon-delete /> 删除</a-button>
-          </a-space>
-        </template>
-      </a-table>
-    </a-card>
+        </a-space>
+      </template>
+    </a-table>
+
     <!-- Modal -->
     <a-modal
       v-model:visible="modalVisible"

+ 54 - 62
src/views/admin/sys-role/index.vue

@@ -1,71 +1,63 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="roleName" label="角色名称">
-          <a-input v-model="queryForm.roleName" placeholder="请输入角色名称" />
-        </a-form-item>
-        <a-form-item field="roleKey" label="权限字符">
-          <a-input v-model="queryForm.roleKey" placeholder="请输入权限字符" />
-        </a-form-item>
-        <a-form-item field="status" label="状态">
-          <a-select v-model="queryForm.status" placeholder="请选择角色状态">
-            <a-option :value="2">正常</a-option>
-            <a-option :value="1">停用</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
-            <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
-
-      <a-divider />
-
-      <div class="action">
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="roleName" label="角色名称">
+        <a-input v-model="queryForm.roleName" placeholder="请输入角色名称" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="roleKey" label="权限字符">
+        <a-input v-model="queryForm.roleKey" placeholder="请输入权限字符" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="status" label="状态">
+        <a-select v-model="queryForm.status" placeholder="请选择角色状态">
+          <a-option :value="2">正常</a-option>
+          <a-option :value="1">停用</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item>
         <a-space>
-          <a-button v-has="'admin:sysRole:add'" type="primary" @click="handleAdd"><icon-plus /> 新增</a-button>
-          <a-button v-has="'admin:sysRole:remove'" type="primary" status="danger" @click="() => { deleteVisible = true; }"><icon-delete /> 批量删除</a-button>
-          <a-button type="primary" status="warning" disabled><icon-download /> 导出</a-button>
+          <a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
+          <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
         </a-space>
-      </div>
-
-      <a-table
-        :columns="columns"
-        :data="tableData"
-        :bordered="false"
-        :pagination="{
-          'show-total': true,
-          'show-jumper': true,
-          'show-page-size': true,
-          total: pager.total,
-          current: currentPage,
-        }"
-        row-key="roleId"
-        :row-selection="{ type: 'checkbox', showCheckedAll: true }"
+      </a-form-item>
+    </a-form>
+
+    <a-divider />
+
+    <div class="action">
+      <a-space>
+        <a-button v-has="'admin:sysRole:add'" type="primary" @click="handleAdd"><icon-plus /> 新增</a-button>
+        <a-button v-has="'admin:sysRole:remove'" type="primary" status="danger" @click="() => { deleteVisible = true; }"><icon-delete /> 批量删除</a-button>
+        <a-button type="primary" status="warning" disabled><icon-download /> 导出</a-button>
+      </a-space>
+    </div>
+
+    <a-table
+      :columns="columns"
+      :data="tableData"
+      :pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.count, current: currentPage }"
+      row-key="roleId"
+      :row-selection="{ type: 'checkbox', showCheckedAll: true }"
       @selection-change="(selection) => {deleteData = selection;}" 
-        @select="handleSelect"
-        @page-change="handlePageChange"
-        @page-size-change="handlePageSizeChange"
-      >
-        <template #status="{ record }">
-          <a-tag v-if="record.status == 2" color="green">正常</a-tag>
-          <a-tag v-else color="red">停用</a-tag>
-        </template>
-        <template #createdAt="{ record }">
-          {{ parseTime(record.createdAt) }}
-        </template>
-        <template #action="{ record }">
-          <a-space>
-            <a-button v-has="'admin:sysRole:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
-            <a-button v-has="'admin:sysRole:update'" type="text" @click="handleDataScope(record)"><icon-check-circle />  数据权限 </a-button>
+      @select="handleSelect"
+      @page-change="handlePageChange"
+      @page-size-change="handlePageSizeChange"
+    >
+      <template #status="{ record }">
+        <a-tag v-if="record.status == 2" color="green">正常</a-tag>
+        <a-tag v-else color="red">停用</a-tag>
+      </template>
+      <template #createdAt="{ record }">
+        {{ parseTime(record.createdAt) }}
+      </template>
+      <template #action="{ record }">
+        <a-space>
+          <a-button v-has="'admin:sysRole:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
+          <a-button v-has="'admin:sysRole:update'" type="text" @click="handleDataScope(record)"><icon-check-circle />  数据权限 </a-button>
           <a-button v-has="'admin:sysRole:remove'" type="text" @click="() => { deleteVisible = true; deleteData = [record.roleId];  }"><icon-check-circle />  删除 </a-button>
-          </a-space>
-        </template>
-      </a-table>
-    </a-card>
+        </a-space>
+      </template>
+    </a-table>
+
     <!-- Role Modal -->
     <a-modal
       v-model:visible="modalVisible"

+ 77 - 0
src/views/admin/sys-set/index.vue

@@ -0,0 +1,77 @@
+<template>
+  <div class="app-container">
+    <a-tabs default-active-key="1" position="left" :style="{ textAlign: 'right' }">
+      <a-tab-pane key="1" title="系统内置">
+        <a-form :model="form" :style="{ width: '50%' }">
+          <a-form-item field="sys_app_name" label="系统名称">
+            <a-input v-model="form.sys_app_name"></a-input>
+          </a-form-item>
+          <a-form-item field="sys_app_logo" label="系统Logo">
+            <a-space>
+              <div class="upload-logo-preview">
+                <img width="150" height="150" />
+              </div>
+              <a-upload action="/">
+                <template #upload-button>
+                  <div class="upload-logo-card">
+                    <div class="upload-logo-card-text">
+                      <IconPlus />
+                    </div>
+                  </div>
+                </template>
+              </a-upload>
+            </a-space>
+          </a-form-item>
+          <a-form-item field="sys_user_initPassword" label="初始密码">
+            <a-input-password v-model="form.sys_user_initPassword"></a-input-password>
+          </a-form-item>
+          <a-form-item field="sys_index_skinName" label="皮肤样式">
+            <a-select v-model="form.sys_index_skinName">
+              <a-option>蓝色</a-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item field="sys_index_sideTheme" label="侧边栏主题">
+            <a-select v-model="form.sys_index_sideTheme">
+              <a-option>深色主题</a-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item>
+            <a-space>
+              <a-button type="primary">提交</a-button>
+              <a-button>重置</a-button>
+            </a-space>
+          </a-form-item>
+        </a-form>
+      </a-tab-pane>
+      <a-tab-pane key="2" title="其它">暂无内容</a-tab-pane>
+    </a-tabs>
+  </div>
+</template>
+
+<script setup>
+import { reactive } from 'vue';
+import { IconPlus } from '@arco-design/web-vue/es/icon'
+
+const form = reactive({});
+</script>
+
+<style lang="scss">
+.upload-logo-preview {
+  font-size: 0px;
+}
+
+.upload-logo-card {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 150px;
+  height: 150px;
+  box-sizing: border-box;
+  border: 1px dashed #c0ccda;
+  border-radius: 5px;
+  color: #4e5969;
+  &-text {
+    font-size: 24px;
+  }
+}
+</style>

+ 79 - 80
src/views/admin/sys-user/index.vue

@@ -1,88 +1,87 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <!-- Query -->
-      <a-form ref="queryFormRef" :model="queryForm" layout="inline">
-        <a-form-item field="deptName" label="部门名称">
-          <a-input v-model="queryForm.deptName" placeholder="请输入部门名称" />
-        </a-form-item>
-        <a-form-item field="username" label="用户名称">
-          <a-input v-model="queryForm.username" placeholder="请输入用户名称" />
-        </a-form-item>
-        <a-form-item field="phone" label="手机号码">
-          <a-input v-model="queryForm.phone" placeholder="请输入用户手机号" />
-        </a-form-item>
-        <a-form-item field="status" label="用户状态">
-          <a-select
-            v-model="queryForm.status"
-            placeholder="请选择用户状态"
-            :style="{ width: '205px' }"
-          >
-            <a-option value="2">正常</a-option>
-            <a-option value="1">停用</a-option>
-          </a-select>
-        </a-form-item>
-
-        <a-divider direction="vertical" :style="{ height: '30px' }" />
-        <a-form-item class="form-action">
-          <a-space size="medium">
-            <a-button v-has="'admin:sysUser:query'" type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
-            <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
-
-      <!-- divider -->
-      <a-divider />
-
-      <!-- Table -->
-      <a-row>
-        <a-col :span="4">
-          <!-- tree组件只在组件第一次渲染时展开,此处等待数据加载完成再渲染组件 -->
-          <tree-dept v-if="treeDeptData" :data="treeDeptData" @node-click="getSysUserInfo" />
-        </a-col>
-        <a-col :span="20">
-          <!-- Action -->
-          <a-space class="action">
-            <a-button v-has="'admin:sysUser:add'" type="primary" @click="handleAdd" data-test="newUser"><icon-plus /> 新增</a-button>
+    <!-- Query -->
+    <a-form ref="queryFormRef" :model="queryForm" layout="inline">
+      <a-form-item field="deptName" label="部门名称">
+        <a-input v-model="queryForm.deptName" placeholder="请输入部门名称" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="username" label="用户名称">
+        <a-input v-model="queryForm.username" placeholder="请输入用户名称" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="phone" label="手机号码">
+        <a-input v-model="queryForm.phone" placeholder="请输入用户手机号" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="status" label="用户状态">
+        <a-select
+          v-model="queryForm.status"
+          placeholder="请选择用户状态"
+          :style="{ width: '205px' }"
+        >
+          <a-option value="2">正常</a-option>
+          <a-option value="1">停用</a-option>
+        </a-select>
+      </a-form-item>
+
+      <a-divider direction="vertical" :style="{ height: '30px' }" />
+      <a-form-item class="form-action">
+        <a-space size="medium">
+          <a-button v-has="'admin:sysUser:query'" type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
+          <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
+        </a-space>
+      </a-form-item>
+    </a-form>
+
+    <!-- divider -->
+    <a-divider />
+
+    <!-- Table -->
+    <a-row>
+      <a-col :span="4">
+        <!-- tree组件只在组件第一次渲染时展开,此处等待数据加载完成再渲染组件 -->
+        <tree-dept v-if="treeDeptData" :data="treeDeptData" @node-click="getSysUserInfo" />
+      </a-col>
+      <a-col :span="20">
+        <!-- Action -->
+        <a-space class="action">
+          <a-button v-has="'admin:sysUser:add'" type="primary" @click="handleAdd" data-test="newUser"><icon-plus /> 新增</a-button>
           <a-button v-has="'admin:sysUser:remove'" type="primary" status="danger" @click="() => { deleteVisible = true; }"><icon-delete /> 批量删除</a-button>
-          </a-space>
-
-          <!-- Table -->
-          <a-table
-            :columns="columns"
-            :data="tableData"
-            :bordered="false"
-            :row-selection="{ type: 'checkbox', showCheckedAll: true }"
-            :pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
+        </a-space>
+
+        <!-- Table -->
+        <a-table
+          :columns="columns"
+          :data="tableData"
+          :bordered="false"
+          :row-selection="{ type: 'checkbox', showCheckedAll: true }"
+          :pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.count, current: currentPage }"
           row-key="userId" 
-          @selection-change="(selection) => {deleteData = selection;}"
-            @page-change="handlePageChange"
-            @page-size-change="handlePageSizeChange"
-          >
-            <template #dept="{ record }">
-              {{ record.deptName }}
-            </template>
-            <template #status="{ record }">
-              <a-switch
-                v-model="record.status"
-                checked-value="2"
-                unchecked-value="1"
-                @change="handleSwitchChange(record)"
-              />
-            </template>
-            <template #createdAt="{ record }">
-              {{ parseTime(record.createdAt) }}
-            </template>
-            <template #action="{ record }">
-              <a-button v-has="'admin:sysUser:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
+          @selection-change="(selection) => {deleteData = selection;}" 
+          @page-change="handlePageChange"
+          @page-size-change="handlePageSizeChange"
+        >
+          <template #dept="{ record }">
+            {{ record.dept.deptName }}
+          </template>
+          <template #status="{ record }">
+            <a-switch
+              v-model="record.status"
+              checked-value="2"
+              unchecked-value="1"
+              @change="handleSwitchChange(record)"
+            />
+          </template>
+          <template #createdAt="{ record }">
+            {{ parseTime(record.createdAt) }}
+          </template>
+          <template #action="{ record }">
+            <a-button v-has="'admin:sysUser:edit'" type="text" @click="handleUpdate(record)"><icon-edit /> 修改</a-button>
             <a-button v-has="'admin:sysUser:edit'" type="text" @click="() => { deleteVisible = true; deleteData = [record.userId];  }"><icon-delete /> 删除</a-button>
-              <a-button v-has="'admin:sysUser:resetPassword'" type="text" @click="handleReset(record.userId)"><icon-refresh /> 重置</a-button>
-            </template>
-          </a-table>
-        </a-col>
-      </a-row>
-    </a-card>
+            <a-button v-has="'admin:sysUser:resetPassword'" type="text" @click="handleReset(record.userId)"><icon-refresh /> 重置</a-button>
+          </template>
+        </a-table>
+      </a-col>
+    </a-row>
+
     <!-- Modal -->
     <a-modal
       v-model:visible="modalVisible"

+ 0 - 6
src/views/dev-tools/build/index.vue

@@ -1,6 +0,0 @@
-<template>
-  <iframe class="iframe-fullscreen" :src="iframeURL"></iframe>
-</template>
-<script setup>
-const iframeURL = `${import.meta.env.VITE_APP_BASE_URL}/form-generator/index.html`;
-</script>

+ 9 - 9
src/views/dev-tools/gen/editTable.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <a-form :model="dataInfo" :rules="rules" ref="modalFormRef" auto-label-width size="mini">
-      <a-card :bordered="false" class="general-card">
+      <a-card bordered>
         <!-- 卡片插槽 开始 -->
         <template #actions>
           <a-button type="primary" @click="handleSubmit" long>提交</a-button>
@@ -59,16 +59,16 @@
 
           <a-tab-pane key="2" title="字段信息">
             <a-alert type="warning" style="margin-bottom: 16px;">表字段中的id、create_by、update_by、created_at、updated_at、deleted_at的字段在此列表中已经隐藏.</a-alert>
-            <a-table  :data="tableData" :bordered="false" :virtual-list-props="{height:600}" :pagination="false" :scrollbar="true" :scroll="{minWidth: '200%'}">
+            <a-table  :data="tableData" :virtual-list-props="{height:600}" :pagination="false" :scroll="{x: '100%'}">
               <template #columns>
                 <!-- <a-table-column title="序号" data-index="tableId" :width="180" ellipsis tooltip/> -->
-                <a-table-column title="字段列名" data-index="columnName" :width="100" :ellipsis="true" :tooltip="true" fixed="left"/>
-                <a-table-column title="字段描述" :width="200" fixed="left">
+                <a-table-column title="字段列名" data-index="columnName"/>
+                <a-table-column title="字段描述" :width="120">
                   <template #cell="{ record }">
                     <a-input v-model="record.columnComment" />
                   </template>
                 </a-table-column>
-                <a-table-column title="物理类型" data-index="columnType"  align="center"  :width="120" :ellipsis="true" :tooltip="true"/>
+                <a-table-column title="物理类型" data-index="columnType"  align="center"  :width="120" />
                 <a-table-column title="go类型"  align="center"  :width="140">
                   <template #cell="{ record }">
                     <a-select v-model="record.goType" placeholder="请选择 ...">
@@ -163,7 +163,7 @@
                   <template #cell="{ record }">
                     <a-select v-model="record.dictType" allow-clear allow-search placeholder="请选择">
                       <a-option v-for="dict in dictOptions" :key="dict.dictType" :label="dict.dictName" :value="dict.dictType" >
-                        <a-descriptions :column="1" size="mini" layout="vertical" :label-style="{'width':'200px','font-size':'13px', 'padding-top':'5px'}" :value-style="{'width':'200px','font-size':'13px', 'padding-bottom':'5px'}">
+                        <a-descriptions :column="1" size="mini">
                           <a-descriptions-item :label="dict.dictName">
                           {{ dict.dictType }}
                           </a-descriptions-item>
@@ -176,8 +176,8 @@
                   <template #cell="{ record }">
                     <a-select v-model="record.fkTableName" allow-clear allow-search placeholder="请选择" @change="handleChangeConfig(record)">
                       <a-option v-for="table in tableTree" :key="table.tableName" :label="table.tableName" :value="table.tableName">
-                        <span style="margin-right: 5px; font-size: 12px;">{{ table.tableName }}</span><br/>
-                        <span style="color: #8492a6; font-size: 13px">{{ table.tableComment }}</span>
+                        <span style="float: left; margin-right: 5px; font-size: 12px;">{{ table.tableName }}</span>
+                        <span style="float: right; color: #8492a6; font-size: 13px">{{ table.tableComment }}</span>
                       </a-option>
                     </a-select>
                   </template>
@@ -394,7 +394,7 @@ const handleSubmit = () => {
 
 /** 关闭按钮 */
 const close = () => {
-  proxy.$router.push({ path: '/admin/dev-tools/gen', query: { t: Date.now() }})
+  proxy.$router.push({ path: '/dev-tools/gen', query: { t: Date.now() }})
 }
 
 onMounted(() => {

+ 0 - 1
src/views/dev-tools/gen/importTable.vue

@@ -18,7 +18,6 @@
 
     <a-table
       :data="tableData"
-      :bordered="false"
       :pagination="{
         'show-total': true,
         'show-jumper': true,

+ 63 - 72
src/views/dev-tools/gen/index.vue

@@ -1,75 +1,66 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="tableName" label="表名称">
-          <a-input v-model="queryForm.tableName" placeholder="请输入表名称" />
-        </a-form-item>
-        <a-form-item field="tableComment" label="表描述">
-          <a-input v-model="queryForm.tableComment" placeholder="请输入描述" />
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
-            <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
-            
-          </a-space>
-        </a-form-item>
-      </a-form>
-
-      <a-divider />
-
-      <!-- action -->
-      <div class="action">
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="tableName" label="表名称">
+        <a-input v-model="queryForm.tableName" placeholder="请输入表名称" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="tableComment" label="表描述">
+        <a-input v-model="queryForm.tableComment" placeholder="请输入描述" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item>
         <a-space>
-          <a-button type="primary" @click="openImportTable"><icon-plus /> 导入 </a-button>
-          <a-button type="primary" status="danger" @click="() => { deleteVisible = true; }"><icon-delete /> 批量删除</a-button>
+          <a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
+          <a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
+          
         </a-space>
-      </div>
+      </a-form-item>
+    </a-form>
+
+    <a-divider />
+
+    <!-- action -->
+    <div class="action">
+      <a-space>
+        <a-button type="primary" @click="openImportTable"><icon-plus /> 导入 </a-button>
+        <a-button type="primary" status="danger" @click="() => { deleteVisible = true; }"><icon-delete /> 批量删除</a-button>
+      </a-space>
+    </div>
+
+    <!-- table -->
+    <a-table
+      :data="tableData"
+      :row-selection="{ type: 'checkbox', showCheckedAll: true }"
+      row-key="tableId"
+      @selection-change="(selection) => {deleteData = selection;}" 
+      @page-change="handlePageChange"
+      @page-size-change="handlePageSizeChange"
+    >
+      <template #columns>
+        <a-table-column title="序号" data-index="tableId" :width="180" ellipsis tooltip/>
+        <a-table-column title="表名称" data-index="tableName" :width="180" ellipsis tooltip/>
+        <a-table-column title="表描述" data-index="tableComment" :width="180" ellipsis tooltip/>
+        <a-table-column title="模型名称" data-index="className" :width="180" ellipsis tooltip/>
+        <a-table-column title="动作" :width="370" align="center" >
+          <template #cell="{ record }">
+            <a-button-group>
+              <a-button size="small" @click="handleEditTable(record)">编辑</a-button>
+              <a-button size="small" @click="handlePreview(record)">预览</a-button>
+              <a-popconfirm content="正在使用代码生成请确认?" okText="生成" type="warning" @ok="handleToProject(record)">
+                <a-button size="small">代码生成 </a-button>
+              </a-popconfirm>
+              <a-popconfirm content="正在使用【菜单以及API生成到数据库】请确认?" okText="写入DB" type="warning" @ok="handleToDB(record)">
+                <a-button size="small">生成配置 </a-button>
+              </a-popconfirm>
+              <a-popconfirm content="正在使用代码生成配置迁移脚本请确认?" okText="迁移" type="warning" @ok="handleToApiFile(record)">
+                <a-button size="small">生成迁移脚本 </a-button>
+              </a-popconfirm>
+              <a-button size="small" @click="() => { deleteVisible = true; deleteData = [record.jobId];  }">删除</a-button>
+            </a-button-group>
+          </template>
+        </a-table-column>
+      </template>
+    </a-table>
 
-      <!-- table -->
-      <a-table
-        :data="tableData"
-        :bordered="false"
-        :pagination="{
-          'show-total': true,
-          'show-jumper': true,
-          'show-page-size': true,
-          total: pager.count,
-          current: currentPage,
-        }"
-        :row-selection="{ type: 'checkbox', showCheckedAll: true }"
-        row-key="tableId"
-        @selection-change="(selection) => {deleteData = selection;}"
-        @page-change="handlePageChange"
-        @page-size-change="handlePageSizeChange"
-      >
-        <template #columns>
-          <a-table-column title="序号" data-index="tableId" :width="180" ellipsis tooltip/>
-          <a-table-column title="表名称" data-index="tableName" :width="180" ellipsis tooltip/>
-          <a-table-column title="表描述" data-index="tableComment" :width="180" ellipsis tooltip/>
-          <a-table-column title="模型名称" data-index="className" :width="180" ellipsis tooltip/>
-          <a-table-column title="动作" :width="370" align="center" >
-            <template #cell="{ record }">
-              <a-button-group>
-                <a-button size="small" @click="handleEditTable(record)">编辑</a-button>
-                <a-button size="small" @click="handlePreview(record)">预览</a-button>
-                <a-popconfirm content="正在使用代码生成请确认?" okText="生成" type="warning" @ok="handleToProject(record)">
-                  <a-button size="small">代码生成 </a-button>
-                </a-popconfirm>
-                <a-popconfirm content="正在使用【菜单以及API生成到数据库】请确认?" okText="写入DB" type="warning" @ok="handleToDB(record)">
-                  <a-button size="small">生成配置 </a-button>
-                </a-popconfirm>
-                <a-popconfirm content="正在使用代码生成配置迁移脚本请确认?" okText="迁移" type="warning" @ok="handleToApiFile(record)">
-                  <a-button size="small">生成迁移脚本 </a-button>
-                </a-popconfirm>
-              <a-button size="small" @click="() => { deleteVisible = true; deleteData = [record.tableId];  }">删除</a-button>
-              </a-button-group>
-            </template>
-          </a-table-column>
-        </template>
-      </a-table>
-    </a-card>
     <!-- 导入对话框 -->
     <import-table v-model:visible="modalVisible" />
 
@@ -84,7 +75,7 @@
 
     <!-- Akiraka 20230223 删除与批量删除 开始 -->
     <DeleteModal 
-      :data="toRaw(deleteData)" 
+      :data="deleteData" 
       :visible="deleteVisible" 
       :apiDelete="delTable" 
       @deleteVisibleChange="() => deleteVisible = false"
@@ -94,11 +85,10 @@
 </template>
 
 <script setup>
-import { reactive, ref, toRaw, getCurrentInstance, onMounted, nextTick, watch } from 'vue';
+import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue';
 import importTable from './importTable.vue'
 import { listTable,previewTable,delTable,apiToFile,toProjectTableCheckRole,toDBTable } from '@/api/tools/gen';
 import { parseTime } from '@/utils/parseTime';
-
 import { Codemirror } from 'vue-codemirror'
 import { javascript } from '@codemirror/lang-javascript'
 import { oneDark } from '@codemirror/theme-one-dark'
@@ -110,9 +100,10 @@ const deleteVisible = ref(false)
 // Akiraka 20230210 监听删除事件
 watch(() => deleteVisible.value ,(value) => {
   if ( value == false ) {
-    getListTable(pager);
+    getSysConfigInfo(pager);
   }
 })
+
 const { proxy } = getCurrentInstance();
 
 const currentPage = ref(1);
@@ -201,7 +192,7 @@ const handleResetQuery = () => {
 // 编辑
 const handleEditTable = (row) => {
   const tableId = row.tableId || this.ids[0]
-  proxy.$router.push({ path: '/admin/dev-tools/editTable', query: { tableId: tableId }})
+  proxy.$router.push({ path: '/dev-tools/editTable', query: { tableId: tableId }})
 }
 // 预览代码参数
 // 预览代码对话框

+ 9 - 4
src/views/dev-tools/swagger/index.vue

@@ -1,6 +1,11 @@
 <template>
-  <iframe class="iframe-fullscreen" :src="iframeURL"></iframe>
+  <iframe class="iframe-swagger" src="http://124.222.72.164:8000/swagger/index.html"></iframe>
 </template>
-<script setup>
-const iframeURL = `${import.meta.env.VITE_APP_BASE_URL}/swagger/admin/index.html`;
-</script>
+
+<style lang="scss" scoped>
+.iframe-swagger {
+  width: 100%;
+  height: calc(100vh - 90px);
+  border: none
+}
+</style>

+ 22 - 15
src/views/error-page/403.vue

@@ -1,18 +1,25 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-result
-        status="403"
-        subtitle="对不起,您没有访问该资源的权限"
-      >
-        <template #extra>
-          <a-space>
-            <a-button type="primary">
-              返回
-            </a-button>
-          </a-space>
-        </template>
-      </a-result>
-    </a-card>
+    <a-result
+      status="403"
+      subtitle="对不起,您没有访问该资源的权限"
+    >
+      <template #extra>
+        <a-space>
+          <a-button type="primary">
+            返回
+          </a-button>
+        </a-space>
+      </template>
+    </a-result>
   </div>
-</template>
+</template>
+
+<style lang="scss" scoped>
+.app-container {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  height: calc(100vh - 122px);
+}
+</style>

+ 22 - 15
src/views/error-page/404.vue

@@ -1,18 +1,25 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-result
-        status="404"
-        subtitle="抱歉,页面走丢了~"
-      >
-        <template #extra>
-          <a-space>
-            <a-button type="primary">
-              返回
-            </a-button>
-          </a-space>
-        </template>
-      </a-result>
-    </a-card>
+    <a-result
+      status="404"
+      subtitle="抱歉,页面走丢了~"
+    >
+      <template #extra>
+        <a-space>
+          <a-button type="primary">
+            返回
+          </a-button>
+        </a-space>
+      </template>
+    </a-result>
   </div>
-</template>
+</template>
+
+<style lang="scss" scoped>
+.app-container {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  height: calc(100vh - 122px);
+}
+</style>

+ 22 - 15
src/views/error-page/500.vue

@@ -1,18 +1,25 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-result
-        status="500"
-        subtitle="抱歉,服务器出了点问题~"
-      >
-        <template #extra>
-          <a-space>
-            <a-button type="primary">
-              返回
-            </a-button>
-          </a-space>
-        </template>
-      </a-result>
-    </a-card>
+    <a-result
+      status="500"
+      subtitle="抱歉,服务器出了点问题~"
+    >
+      <template #extra>
+        <a-space>
+          <a-button type="primary">
+            返回
+          </a-button>
+        </a-space>
+      </template>
+    </a-result>
   </div>
-</template>
+</template>
+
+<style lang="scss" scoped>
+.app-container {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  height: calc(100vh - 122px);
+}
+</style>

+ 12 - 8
src/views/error-page/888.vue

@@ -1,15 +1,19 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-result
-        subtitle="找不到组件地址,请检查菜单: 菜单管理 > 对应菜单 > 组件管理"
-      >
-        <template #extra>
-        </template>
-      </a-result>
-    </a-card>
+    <a-result
+      subtitle="找不到组件地址,请检查菜单: 菜单管理 > 对应菜单 > 组件管理"
+    >
+      <template #extra>
+      </template>
+    </a-result>
   </div>
 </template>
 
 <style lang="scss" scoped>
+.app-container {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  height: calc(100vh - 122px);
+}
 </style>

+ 28 - 5
src/views/login/index.vue

@@ -16,6 +16,7 @@
                 <img :src="store.sysConfig.sys_app_logo" />
                 <span class="project-title">用户登录</span>
               </div>
+              <div class="account-top-desc">横看成峰侧成岭 远近高低各不同</div>
             </div>
             <!-- 登录表单 -->
             <a-form
@@ -70,6 +71,7 @@
                 </div>
               </div>
               <a-space direction="vertical" size="medium">
+                <a-checkbox>记住密码</a-checkbox>
                 <a-button
                   size="large"
                   type="primary"
@@ -169,6 +171,7 @@ onMounted(async () => {
 
 // 输入框重写
 .arco-input-wrapper {
+  border-radius: 20px;
   height: 40px;
   border: 1px solid #ddd;
   background: #fff;
@@ -190,13 +193,20 @@ onMounted(async () => {
   flex-wrap: wrap;
   justify-content: center;
   align-items: center;
-  background: var(--color-bg-2);
+  padding: 15px;
+  background: #9053c7;
+  background: linear-gradient(-135deg, #c850c0, #4158d0);
 }
 .account-wrap-login {
-  height: 100vh;
+  width: 960px;
+  height: 554px;
+  // background: #fff;
+  border-radius: 10px;
   overflow: hidden;
   display: flex;
   flex-wrap: wrap;
+  // justify-content:space-between;
+  // padding:30px 95px 33px
 }
 .account-wrap-login .login-pic {
   background-color: #0259e6 !important;
@@ -204,20 +214,20 @@ onMounted(async () => {
   align-items: center;
   flex-direction: column;
   justify-content: center;
-  width: 480px;
+  width: 50%;
 }
 .account-wrap-login .login-pic img {
   max-width: 100%;
 }
 .account-wrap-login .login-form {
-  width: calc(100vw - 480px);
+  width: 50%;
   display: flex;
   flex-direction: column;
   background: #fff;
 }
 .account-wrap-login .login-form-container {
   margin: auto;
-  width: 320px;
+  width: 100%;
 }
 .account-wrap-login .login-form-title {
   padding-bottom: 15px;
@@ -246,11 +256,24 @@ onMounted(async () => {
   width: 45px;
 }
 .account-wrap-login .account-top-logo .project-title {
+  background: linear-gradient(
+    92.06deg,
+    #33c2ff -17.9%,
+    #1e6fff 43.39%,
+    #1e6fff 99.4%
+  );
+  -webkit-background-clip: text;
+  -webkit-text-fill-color: transparent;
   font-size: 24px;
   line-height: 1.25;
   font-weight: 500;
   margin-left: 10px;
 }
+.account-wrap-login .account-top-desc {
+  font-size: 14px;
+  color: #808695;
+  margin-bottom: 20px;
+}
 @media (max-width: 640px) {
   .account-wrap-login {
     width: 100%;

+ 1 - 0
src/views/profile/api-management.svg

@@ -0,0 +1 @@
+<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 15a1 1 0 001 1h2a1 1 0 001-1V8h7a1 1 0 001-1V5a1 1 0 00-1-1H6a2 2 0 00-2 2v9zm4 18a1 1 0 00-1-1H5a1 1 0 00-1 1v9a2 2 0 002 2h9a1 1 0 001-1v-2a1 1 0 00-1-1H8v-7zm35-17a1 1 0 001-1V6a2 2 0 00-2-2h-9a1 1 0 00-1 1v2a1 1 0 001 1h7v7a1 1 0 001 1h2zm1 17a1 1 0 00-1-1h-2a1 1 0 00-1 1v7h-7a1 1 0 00-1 1v2a1 1 0 001 1h9a2 2 0 002-2v-9zM32.835 11h-6.108c-6.512 0-11.882 4.804-12.636 11h-1.992c-.382 0-.52.046-.66.134a.855.855 0 00-.325.378c-.074.162-.114.324-.114.77v1.436c0 .446.04.608.114.77.075.163.185.291.324.378.14.088.279.134.66.134h2.157c1.179 5.706 6.315 10 12.472 10h6.108c.405 0 .552-.041.7-.12a.819.819 0 00.344-.337c.079-.145.121-.29.121-.688V31h.901c.382 0 .52-.046.66-.134a.855.855 0 00.325-.378c.074-.162.114-.324.114-.77v-1.436c0-.446-.04-.608-.114-.77a.855.855 0 00-.325-.378c-.14-.088-.278-.134-.66-.134H34v-7h.901c.382 0 .52-.046.66-.134a.855.855 0 00.325-.378c.074-.162.114-.324.114-.77v-1.436c0-.446-.04-.608-.114-.77a.855.855 0 00-.325-.378c-.14-.088-.278-.134-.66-.134H34v-3.855c0-.398-.042-.543-.121-.688a.819.819 0 00-.344-.338c-.148-.078-.295-.119-.7-.119zm-2.744 3.571h-3.637c-5.02 0-9.09 3.998-9.09 8.929s4.07 8.929 9.09 8.929h3.637V14.57z" fill="currentColor"/></svg>

+ 71 - 85
src/views/profile/index.vue

@@ -1,25 +1,22 @@
 <template>
-  <a-row :gutter="16" class="dict-wrapper">
-    <a-col :span="12">
-      <a-card :bordered="false" class="general-card">
+  <a-row :gutter="8" class="dict-wrapper">
+    <a-col :span="8">
+      <a-card hoverable>
         <div style="text-align: center;">
           <a-space direction="vertical" fill>
-            <a-avatar :size="120" @click="handleModifyAvatar" class="user-avatar" title="点击修改头像">
-                <img alt="avatar" :src="userAvatarURL"/>
+            <a-avatar :size="120">
+              <template v-if="userInfoForm.user.avatar == '' ">
+                <img alt="avatar" :src="store.sysConfig.sys_user_avatar" />
+              </template>
+              <template v-else>
+                <img alt="avatar" :src="userInfoForm.user.avatar"/>
+              </template>
             </a-avatar>
-            <Cropper
-              :visible="CropperOpt.visible"
-              title="修改我的头像"
-              :width="500"
-              :originImageURL="userAvatarURL"
-              @confirm="handleModifyAvatarConfirm"
-              @cancel="handleModifyAvatarCancel"
-            ></Cropper>
             <a-typography-title :heading="6">{{userInfoForm.user.nickName}}</a-typography-title>
           </a-space>
         </div>
         <a-divider />
-        <a-card :bordered="false" class="general-card">
+        <a-card :bordered="false">
           <a-descriptions title="用户详情" :column="1">
             <a-descriptions-item label="用户昵称">{{userInfoForm.user.nickName}}</a-descriptions-item>
             <a-descriptions-item label="登录账号">{{userInfoForm.user.username}}</a-descriptions-item>
@@ -40,8 +37,8 @@
         </a-card>
       </a-card>
     </a-col>
-    <a-col :span="12">
-      <a-card :bordered="false" class="general-card">
+    <a-col :span="16">
+      <a-card hoverable>
         <a-tabs>
           <a-tab-pane key="1">
             <template #title>
@@ -79,13 +76,13 @@
             <a-card hoverable :bordered="false">
               <a-form :model="userPwdForm"  :rules="rules" ref="userPwdFormRef" label-align="left" auto-label-width>
                 <a-form-item field="oldPassword" label="旧密码">
-                  <a-input-password v-model="userPwdForm.oldPassword" placeholder="请输入旧密码" ></a-input-password>
+                  <a-input v-model="userPwdForm.oldPassword" placeholder="请输入旧密码" />
                 </a-form-item>
                 <a-form-item field="newPassword" label="新密码">
-                  <a-input-password v-model="userPwdForm.newPassword" placeholder="请输入新密码" ></a-input-password>
+                  <a-input v-model="userPwdForm.newPassword" placeholder="请输入新密码" />
                 </a-form-item>
                 <a-form-item field="confirmPassword" label="确认密码">
-                  <a-input-password v-model="userPwdForm.confirmPassword" placeholder="请输入确认密码" ></a-input-password>
+                  <a-input v-model="userPwdForm.confirmPassword" placeholder="请输入确认密码" />
                 </a-form-item>
                 <a-form-item>
                   <a-space>
@@ -99,8 +96,6 @@
       </a-card>
     </a-col>
   </a-row>
-
-
 </template>
 
 <script setup>
@@ -108,15 +103,12 @@ import { onMounted, reactive, ref, getCurrentInstance } from 'vue';
 import { useUserStore } from '@/store/userInfo';
 import { updateUser } from '@/api/admin/sys-user';
 import { getUserProfile,putUserPwd } from '@/api/profile/profile';
-import { uploadAvatar } from '@/api/admin/sys-user';
-import { useGlobalProperties } from '@/hooks/globalVar';
-import Cropper from '@/components/Cropper';
 
 // use Store
 const store = useUserStore();
 
+// 获取当前实例
 const { proxy } = getCurrentInstance();
-const globalProperties = useGlobalProperties();
 
 const userInfoForm = ref({
   user: {},
@@ -124,7 +116,6 @@ const userInfoForm = ref({
   roles: []
 });
 
-const userAvatarURL = ref('');
 const userPwdForm = reactive({});
 
 // 默认表单
@@ -132,28 +123,29 @@ const modalForm = reactive({});
 
 // Rules
 const rules = {
-  nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
+  nickName: [{ required: true, message: '请输入用户昵称' }],
   phone: [
-    { required: true, message: '手机号码不能为空', trigger: 'blur' },
-    { match: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur'}
+    { required: true, message: '请输入联系手机' },
+    // { match: /^1[3456789]\d{9}$/, message: '校验规则: 13011112222'}
   ],
   email: [
-    { required: true, message: '邮箱不能为空', trigger: 'blur' },
-    { match: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/, message: '请输入正确的邮箱地址', trigger: 'blur'}
+    { required: true, message: '请输入邮箱' },
+    // { match: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/, message: '校验规则: aka@aka.com'}
   ],
   sex: [
     { required: true, message: '请选择性别' },
+    // { match: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/, message: '校验规则: aka@aka.com'}
   ],
   oldPassword: [
-    { required: true, message: '旧密码不能为空', trigger: 'blur' },
+    { required: true, message: '输入旧密码' },
+    // { match: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/, message: '校验规则: aka@aka.com'}
   ],
   newPassword: [
-    { required: true, message: '新密码不能为空', trigger: 'blur' },
-    { minLength: 6, maxLength: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' }
+    { required: true, message: '输入新密码' },
+    // { match: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/, message: '校验规则: aka@aka.com'}
   ],
   confirmPassword: [
-    { required: true, message: '新密码确认不能为空', trigger: 'blur' },
-    { message: '两次输入的密码不一致', validator: (value, cb) => {
+    { required: true, message: '确认新密码', validator: (value, cb) => {
         return new Promise(resolve => {
           window.setTimeout(() => {
             if (userPwdForm.newPassword !== value) {
@@ -162,22 +154,28 @@ const rules = {
             resolve()
           }, 1)
         })
-      } },
-    { minLength: 6, maxLength: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' },
+      } }
+    // { match: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/, message: '校验规则: aka@aka.com'}
   ],
 };
 
+const equalToPassword = (value, callback) => {
+  if (modalForm.newPassword !== value) {
+    cb('两次输入的密码不一致')
+    console.log("aaa")
+  } else {
+    cb('密码输入正确')
+    console.log("bbb")
+  }
+}
+
 // handleSubmit 新增与修改按钮方法 20220713
 const handleSubmit = () => {
   proxy.$refs.modalFormRef.validate(async (valid) => {
     if (!valid) {
-      const { code, msg } = await updateUser(modalForm);
-      if (code === 200) {
-        proxy.$message.success(msg);
-        getCurrentUserInfo();
-      } else {
-        proxy.$message.error(`${msg}`);
-      }
+      const { success } = await updateUser(modalForm);
+      if (success) proxy.$message.success('信息修改成功');
+      getCurrentUserInfo();
     } else {
       proxy.$message.error('表单校验失败');
     }
@@ -188,13 +186,10 @@ const handleSubmit = () => {
 const handleSubmitUserPwd = () => {
   proxy.$refs.userPwdFormRef.validate(async (valid) => {
     if (!valid) {
-      const { code, msg } = await putUserPwd(userPwdForm);
-      if (code === 200) {
-        proxy.$message.success(msg);
-        getCurrentUserInfo();
-      } else {
-        proxy.$message.error(`${msg}`);
-      }
+      const { res } = await putUserPwd(userPwdForm);
+      console.loh("success",res)
+      if (success) proxy.$message.success('密码修改成功');
+      getCurrentUserInfo();
     } else {
       proxy.$message.error('表单校验失败');
     }
@@ -202,47 +197,38 @@ const handleSubmitUserPwd = () => {
 };
 
 const getCurrentUserInfo = async () => {
-  const res = await getUserProfile();
-  userInfoForm.value = res.data;
+  const res = await getUserProfile()
+  userInfoForm.value = res.data
   Object.assign(modalForm, res.data.user);
-  userAvatarURL.value = `${globalProperties.CDNDomain}${userInfoForm.value.user.avatar ? userInfoForm.value.user.avatar : store.userInfo.avatar}`;
 };
 
-const CropperOpt = reactive({
-  visible: false
-});
-const handleModifyAvatar = () => {
-  CropperOpt.visible = true;
-}
-
-const handleModifyAvatarCancel = () => {
-  CropperOpt.visible = false;
-}
-
-const handleModifyAvatarConfirm = async(blob) => {
-  const formData = new FormData();
-  formData.append('upload[]', blob);
-  const res = await uploadAvatar(formData);
-  const { code, msg, data } = res;
-  if (code === 200) {
-    proxy.$message.success(msg);
-    CropperOpt.visible = false;
-    userAvatarURL.value = `${globalProperties.CDNDomain}/${data}`;
-    store.userInfo.avatar = `${data}`;
-  } else {
-    proxy.$message.error(`${msg}`);
-  }
-}
 onMounted(() => {
   getCurrentUserInfo();
 });
 </script>
 
-<style lang="scss" scoped>
-.dict-wrapper {
-  padding:20px;
+<style lang="scss">
+.userinfo-row {
+  font-size: 14px;
+  line-height: 1.5;
+  .userinfo-item {
+    &-label {
+      width: 140px;
+      color: #4e5969;
+      text-align: right;
+    }
+    &-value {
+      width: 140px;
+      color: $primary-font-color;
+    }
+    div {
+      display: inline-block;
+    }
+  }
 }
-.user-avatar {
-  cursor: pointer;
+
+.userinfo-form {
+  width: 520px;
+  margin: 0 auto;
 }
 </style>

+ 39 - 43
src/views/schedule/index.vue

@@ -1,52 +1,48 @@
 <template>
   <div class="app-container">
-    <a-card :bordered="false" class="general-card">
-      <a-form :model="queryForm" ref="queryFormRef" layout="inline">
-        <a-form-item field="jobName" label="任务名称">
-          <a-input
-            v-model="queryForm.jobName"
-            placeholder="请输入任务名称"
-          ></a-input>
-        </a-form-item>
-        <a-form-item field="jobGroup" label="任务分组">
-          <a-select v-model="queryForm.jobGroup" placeholder="请选择任务分组">
-            <a-option value="DEFAULT">默认</a-option>
-            <a-option value="SYSTEM">系统</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item field="status" label="状态">
-          <a-select v-model="queryForm.status" placeholder="请选择任务状态">
-            <a-option :value="2">正常</a-option>
-            <a-option :value="1">关闭</a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="handleQuery">查询</a-button>
-            <a-button @click="handleResetQuery">重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
+    <a-form :model="queryForm" ref="queryFormRef" layout="inline">
+      <a-form-item field="jobName" label="任务名称">
+        <a-input v-model="queryForm.jobName" placeholder="请输入任务名称" @press-enter="handleQuery" />
+      </a-form-item>
+      <a-form-item field="jobGroup" label="任务分组">
+        <a-select v-model="queryForm.jobGroup" placeholder="请选择任务分组">
+          <a-option value="DEFAULT">默认</a-option>
+          <a-option value="SYSTEM">系统</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item field="status" label="状态">
+        <a-select v-model="queryForm.status" placeholder="请选择任务状态">
+          <a-option :value="2">正常</a-option>
+          <a-option :value="1">关闭</a-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item>
+        <a-space>
+          <a-button type="primary" @click="handleQuery">查询</a-button>
+          <a-button @click="handleResetQuery">重置</a-button>
+        </a-space>
+      </a-form-item>
+    </a-form>
 
-      <a-divider />
+    <a-divider />
 
-      <div class="table-action">
-        <a-button type="primary" @click="handleAdd">新增定时任务</a-button>
-      </div>
+    <div class="table-action">
+      <a-button type="primary" @click="handleAdd">新增定时任务</a-button>
+    </div>
 
-      <a-table :data="tableData" :bordered="false" :columns="columns" :pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.count, current: currentPage }">
-        <template #status="{ record }">
-          <a-tag v-if="record.status == 2" color="green">正常</a-tag>
-          <a-tag v-if="record.status == 1" color="red">停用</a-tag>
-        </template>
-        <template #action="{ record }">
-          <a-button type="text" @click="handleUpdate(record)">修改</a-button>
-          <a-button type="text" status="success" v-if="record.entry_id == 0" @click="handleStart(record.jobId)">启动</a-button>
-          <a-button type="text" status="danger" v-if="record.entry_id !== 0" @click="handleStop(record.jobId)">停止</a-button>
+    <a-table :data="tableData" :columns="columns"  :pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.count, current: currentPage }">
+      <template #status="{ record }">
+        <a-tag v-if="record.status == 2" color="green">正常</a-tag>
+        <a-tag v-if="record.status == 1" color="red">停用</a-tag>
+      </template>
+      <template #action="{ record }">
+        <a-button type="text" @click="handleUpdate(record)">修改</a-button>
+        <a-button type="text" status="success" v-if="record.entry_id == 0" @click="handleStart(record.jobId)">启动</a-button>
+        <a-button type="text" status="danger" v-if="record.entry_id !== 0" @click="handleStop(record.jobId)">停止</a-button>
         <a-button type="text" status="danger" @click="() => { deleteVisible = true; deleteData = [record.jobId];  }">删除</a-button>
-        </template>
-      </a-table>
-    </a-card>
+      </template>
+    </a-table>
+
     <a-modal
       v-model:visible="modalVisible"
       title-align="start"

+ 3 - 4
src/views/sys-tools/monitor/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="card-wrapper">
-    <a-row :gutter="16">
+    <a-row :gutter="12">
       <a-col :span="12">
-        <a-card title="服务器信息" :bordered="false" class="general-card">
+        <a-card title="服务器信息">
           <div class="card-item card-item-server">
             <span class="card-item-title">主机名称</span>
             <span class="card-item-desc">{{ SystemInfo?.os?.hostName}}</span>
@@ -31,7 +31,7 @@
       </a-col>
 
       <a-col :span="12">
-        <a-card :title="SystemInfo.location" :bordered="false" class="general-card">
+        <a-card :title="SystemInfo.location">
           <a-row :gutter="12">
             <a-col :span="12">
               <div class="card-item">
@@ -129,7 +129,6 @@ onMounted(() => {
 <style lang="scss" scoped>
 .card-wrapper {
   width: 100%;
-  padding: 20px;
 }
 
 .card-item {

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä