Kaynağa Gözat

修改无用的代码

ith5 6 ay önce
ebeveyn
işleme
d6f88368b3

+ 1 - 1
.env

@@ -1,4 +1,4 @@
-VITE_APP_TITLE = 筷子科技
+VITE_APP_TITLE = 数据后台
 VITE_APP_PORT = 8888
 VITE_APP_OPEN_PROXY = true
 VITE_APP_BASE = /

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "saiadmin-vue",
   "admin_name": "saiadmin",
-  "version": "5.0",
+  "version": "1.0",
   "type": "module",
   "license": "MIT",
   "scripts": {

+ 3 - 3
src/api/system/dept.js

@@ -14,7 +14,7 @@ export default {
   },
 
   /**
-   * 获取部门领导列表
+   * 获取组长列表
    * @returns
    */
   getLeaderList(params = {}) {
@@ -26,7 +26,7 @@ export default {
   },
 
   /**
-   * 新增部门领导
+   * 新增组长
    * @returns
    */
   addLeader(data = {}) {
@@ -38,7 +38,7 @@ export default {
   },
 
   /**
-   * 删除部门领导
+   * 删除组长
    * @returns
    */
   delLeader(data = {}) {

+ 79 - 79
src/i18n/zh_CN/sys.js

@@ -1,92 +1,92 @@
 export default {
-  pageSetting: '页面设置',
-  chinese: '简体中文',
-  english: 'English',
-  search: '搜索',
-  store: '应用市场',
-  fullScreen: '全屏',
-  closeFullScreen: '关闭全屏',
-  changeSkin: '换肤',
-  skin: '当前皮肤',
-  layouts: '布局',
-  language: '语言',
-  dark: '黑夜模式',
-  tag: '多标签',
-  water: '水印',
-  waterContent: '水印内容',
-  menuFold: '菜单折叠',
-  menuWidth: '菜单宽度',
-  skinHelp: '设置后台皮肤',
-  layoutsHelp: '设置后台显示方式',
-  languageHelp: '设置页面语言和请求后台语言',
-  darkHelp: '设置页面显示模式',
-  tagHelp: '是否启用多标签方式',
-  waterHelp: '是否显示水印',
-  menuFoldHelp: '系统左侧菜单是否折叠起来',
-  menuWidthHelp: '设置左侧菜单的显示宽度',
-  saveToBackend: '保存到后台',
-  backendSettingTitle: '后台设置',
-  systemPrimaryColor: '系统主色调',
-  personalizedConfig: '个性化配置 ',
+  pageSetting: "页面设置",
+  chinese: "简体中文",
+  english: "English",
+  search: "搜索",
+  store: "应用市场",
+  fullScreen: "全屏",
+  closeFullScreen: "关闭全屏",
+  changeSkin: "换肤",
+  skin: "当前皮肤",
+  layouts: "布局",
+  language: "语言",
+  dark: "黑夜模式",
+  tag: "多标签",
+  water: "水印",
+  waterContent: "水印内容",
+  menuFold: "菜单折叠",
+  menuWidth: "菜单宽度",
+  skinHelp: "设置后台皮肤",
+  layoutsHelp: "设置后台显示方式",
+  languageHelp: "设置页面语言和请求后台语言",
+  darkHelp: "设置页面显示模式",
+  tagHelp: "是否启用多标签方式",
+  waterHelp: "是否显示水印",
+  menuFoldHelp: "系统左侧菜单是否折叠起来",
+  menuWidthHelp: "设置左侧菜单的显示宽度",
+  saveToBackend: "保存到后台",
+  backendSettingTitle: "后台设置",
+  systemPrimaryColor: "系统主色调",
+  personalizedConfig: "个性化配置 ",
   layout: {
-    classic: '经典',
-    columns: '分栏',
-    banner: '通栏',
-    mixed: '混合',
+    classic: "经典",
+    columns: "分栏",
+    banner: "通栏",
+    mixed: "混合",
   },
-  userCenter: '个人中心',
-  clearCache: '清除缓存',
-  logout: '退出系统',
-  logoutAlert: '退出提示',
-  logoutMessage: '确定要退出登录吗?',
+  userCenter: "个人中心",
+  clearCache: "清除缓存",
+  logout: "退出系统",
+  logoutAlert: "退出提示",
+  logoutMessage: "确定要退出登录吗?",
   operationMessage: {
-    message: '消息',
-    notification: '通知',
-    todo: '待办',
+    message: "消息",
+    notification: "通知",
+    todo: "待办",
   },
-  goHome: '回到首页',
-  notFoundPage: '啊哦,访问的页面被火星人劫走了...',
+  goHome: "回到首页",
+  notFoundPage: "啊哦,访问的页面被火星人劫走了...",
   login: {
-    slogan: '开箱即用的高质量中后台管理系统',
-    title: '登录',
-    username: '账户',
-    usernameNotice: '请输入账户',
-    password: '密码',
-    passwordNotice: '请输入密码',
-    verifyCode: '请输入验证码',
-    verifyCodeNotice: '请输入正确的验证码',
-    loginBtn: '登录',
-    otherLoginType: '其他登录方式'
+    slogan: "做个出色的管理后台",
+    title: "登录",
+    username: "账户",
+    usernameNotice: "请输入账户",
+    password: "密码",
+    passwordNotice: "请输入密码",
+    verifyCode: "请输入验证码",
+    verifyCodeNotice: "请输入正确的验证码",
+    loginBtn: "登录",
+    otherLoginType: "其他登录方式",
   },
   verifyCode: {
-    switch: '点击切换验证码',
-    error: '验证码错误',
-    notice: '请输入验证码'
+    switch: "点击切换验证码",
+    error: "验证码错误",
+    notice: "请输入验证码",
   },
-  i18n: '开启多语言',
-  i18nHelp: '是否开启多语言功能',
-  ws: '开启Ws',
-  wsHelp: '是否开启Websocket连接',
-  round: '圆角',
-  roundHelp: '是否开启圆角',
-  animation: '切换动画',
-  animationHelp: '工作区页面切换的进场和出场动画效果',
+  i18n: "开启多语言",
+  i18nHelp: "是否开启多语言功能",
+  ws: "开启Ws",
+  wsHelp: "是否开启Websocket连接",
+  round: "圆角",
+  roundHelp: "是否开启圆角",
+  animation: "切换动画",
+  animationHelp: "工作区页面切换的进场和出场动画效果",
   animate: {
-    fade: '页面渐隐渐出',
-    sliderLeft: '页面向左渐出',
-    sliderRight:'页面向右渐出',
-    sliderDown:'页面向下渐出',
-    sliderUp:'页面向上渐出',
+    fade: "页面渐隐渐出",
+    sliderLeft: "页面向左渐出",
+    sliderRight: "页面向右渐出",
+    sliderDown: "页面向下渐出",
+    sliderUp: "页面向上渐出",
   },
   tags: {
-    refresh: '刷新',
-    fullscreen: '全屏',
-    closeRightTag: '关闭右侧标签',
-    closeLeftTag: '关闭左侧标签',
-    closeTag: '关闭当前标签',
-    closeOtherTag: '关闭其他标签',
+    refresh: "刷新",
+    fullscreen: "全屏",
+    closeRightTag: "关闭右侧标签",
+    closeLeftTag: "关闭左侧标签",
+    closeTag: "关闭当前标签",
+    closeOtherTag: "关闭其他标签",
   },
-  noticeTitle: '系统提示',
-  save: '保存',
-  cancel: '取消',
-}
+  noticeTitle: "系统提示",
+  save: "保存",
+  cancel: "取消",
+};

+ 10 - 11
src/layout/components/ma-operation.vue

@@ -9,7 +9,7 @@
         </a-button>
       </a-tooltip> -->
 
-      <!-- <a-tooltip :content="$t('sys.search')">
+      <a-tooltip :content="$t('sys.search')">
         <a-button
           :shape="'circle'"
           @click="() => (appStore.searchOpen = true)"
@@ -19,7 +19,7 @@
             <icon-search />
           </template>
         </a-button>
-      </a-tooltip> -->
+      </a-tooltip>
 
       <!--      <a-tooltip content="锁屏">-->
       <!--        <a-button :shape="'circle'" class="hidden lg:inline">-->
@@ -75,15 +75,14 @@
       </a-tooltip> -->
     </a-space>
     <a-dropdown @select="handleSelect" trigger="hover">
-      <a-avatar class="bg-blue-500 text-3xl avatar" style="top: -1px">
-        <img
-          :src="
-            userStore.user && userStore.user.avatar
-              ? $tool.showFile(userStore.user.avatar)
-              : $url + 'avatar.jpg'
-          "
-        />
-      </a-avatar>
+      <div class="flex items-center cursor-pointer">
+        <a-avatar size="large" class="text-xl avatar bg-blue-500">
+          <span class="text-white text-2xl">{{
+            userStore.user.nickname.slice(0, 1)
+          }}</span>
+        </a-avatar>
+        <div class="ml-2 text-sm">欢迎,{{ userStore.user.nickname }}</div>
+      </div>
 
       <template #content>
         <a-doption value="userCenter"

+ 28 - 28
src/router/homePageRoutes.js

@@ -1,40 +1,40 @@
 const homePageRoutes = [
   {
-    name: 'dashboard',
-    path: '/dashboard',
+    name: "dashboard",
+    path: "/dashboard",
     meta: {
-      title: '仪表盘',
-      icon: 'icon-dashboard',
-      type: 'M',
-      affix: true
+      title: "仪表盘",
+      icon: "icon-dashboard",
+      type: "M",
+      affix: true,
     },
-    component: () => import('@/views/dashboard/index.vue')
+    component: () => import("@/views/dashboard/index.vue"),
   },
   {
-    name: 'userCenter',
-    path: '/usercenter',
+    name: "userCenter",
+    path: "/usercenter",
     meta: {
-      title: '个人信息',
-      icon: 'icon-user',
-      type: 'M'
+      title: "个人信息",
+      icon: "icon-user",
+      type: "M",
     },
-    component: () => import('@/views/dashboard/userCenter/index.vue')
+    component: () => import("@/views/dashboard/userCenter/index.vue"),
   },
-  {
-    name: 'appStore',
-    path: 'https://saas.saithink.top/#/appStore',
-    meta: {
-      title: '插件市场',
-      icon: 'icon-apps',
-      type: 'L'
-    }
-  }
-]
+  // {
+  //   name: 'appStore',
+  //   path: 'https://saas.saithink.top/#/appStore',
+  //   meta: {
+  //     title: '插件市场',
+  //     icon: 'icon-apps',
+  //     type: 'L'
+  //   }
+  // }
+];
 
 export const homePage = {
-  name: 'home',
-  path: '/home',
-  meta: { title: '首页', icon: 'icon-home', hidden: false, type: 'M' }
-}
+  name: "home",
+  path: "/home",
+  meta: { title: "首页", icon: "icon-home", hidden: false, type: "M" },
+};
 
-export default homePageRoutes
+export default homePageRoutes;

+ 39 - 16
src/router/webRouter.js

@@ -1,25 +1,48 @@
-import homePageRoutes from './homePageRoutes'
+// import homePageRoutes from "./homePageRoutes";
 //系统路由
 const routes = [
   {
-    name: 'layout',
-    path: '/',
-    component: () => import('@/layout/index.vue'),
-    redirect: 'dashboard',
-    children: homePageRoutes
+    name: "layout",
+    path: "/",
+    component: () => import("@/layout/index.vue"),
+    redirect: "dashboard",
+    // children: homePageRoutes,
+    children: [
+      {
+        name: "dashboard",
+        path: "/dashboard",
+        meta: {
+          title: "仪表盘",
+          icon: "icon-dashboard",
+          type: "M",
+          affix: true,
+        },
+        component: () => import("@/views/dashboard/index.vue"),
+      },
+      {
+        name: "userCenter",
+        path: "/usercenter",
+        meta: {
+          title: "个人信息",
+          icon: "icon-user",
+          type: "M",
+        },
+        component: () => import("@/views/dashboard/userCenter/index.vue"),
+      },
+    ],
   },
   {
-    name: 'login',
-    path: '/login',
-    component: () => import('@/views/login.vue'),
-    meta: { title: '登录' }
+    name: "login",
+    path: "/login",
+    component: () => import("@/views/login.vue"),
+    meta: { title: "登录" },
   },
   {
-    path: '/:pathMatch(.*)*',
+    path: "/:pathMatch(.*)*",
     hidden: true,
-    meta: { title: '访问的页面不存在' },
-    component: () => import('@/layout/404.vue')
-  }
-]
+    meta: { title: "访问的页面不存在" },
+    component: () => import("@/layout/404.vue"),
+  },
+];
 
-export default routes
+export default routes;

+ 2 - 2
src/views/dashboard/components/components/st-welcome.vue

@@ -2,7 +2,7 @@
   <div class="flex justify-between">
     <div class="ma-content-block rounded-sm flex justify-between w-full p-3">
       <div class="pl-0 flex inline-block">
-        <a-avatar :size="75" class="hidden lg:inline-block">
+        <!-- <a-avatar :size="75" class="hidden lg:inline-block">
           <img
             :src="
               userStore.user && userStore.user.avatar
@@ -10,7 +10,7 @@
                 : $url + 'avatar.jpg'
             "
           />
-        </a-avatar>
+        </a-avatar> -->
         <div class="pl-3 mt-2">
           <div class="content-block-title">
             {{ userStore.user.nickname || userStore.user.username }},欢迎回来!

+ 7 - 7
src/views/dashboard/components/statistics.vue

@@ -4,15 +4,15 @@
   <st-login-chart />
 
   <div class="block lg:flex">
-    <st-announced />
-    <st-saiadmin />
+    <!-- <st-announced /> -->
+    <!-- <st-saiadmin /> -->
   </div>
 </template>
 
 <script setup>
-import StCount from './components/st-count.vue'
-import StWelcome from './components/st-welcome.vue'
-import StLoginChart from './components/st-loginChart.vue'
-import StSaiadmin from './components/st-saiadmin.vue'
-import StAnnounced from './components/st-announced.vue'
+import StCount from "./components/st-count.vue";
+import StWelcome from "./components/st-welcome.vue";
+import StLoginChart from "./components/st-loginChart.vue";
+import StSaiadmin from "./components/st-saiadmin.vue";
+import StAnnounced from "./components/st-announced.vue";
 </script>

+ 54 - 32
src/views/dashboard/userCenter/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="block">
-    <div class="user-header rounded-sm text-center">
+    <!-- <div class="user-header rounded-sm text-center">
       <div class="pt-3 mx-auto avatar-box">
         <sa-upload-image v-model="userInfo.avatar" rounded />
       </div>
@@ -9,7 +9,7 @@
           {{ (userStore.user && userStore.user.nickname) || (userStore.user && userStore.user.username) }}
         </a-tag>
       </div>
-    </div>
+    </div> -->
 
     <a-layout-content class="block lg:flex lg:justify-between">
       <div class="ma-content-block w-full lg:w-6/12 mt-3 p-4">
@@ -25,19 +25,30 @@
       <div class="ma-content-block w-full lg:w-6/12 mt-3 p-4 ml-0 lg:ml-3">
         <a-tabs type="rounded">
           <a-tab-pane key="login-log" title="登录日志">
-            <a-timeline class="pl-5 mt-3" v-if="loginLogList && loginLogList.length">
-              <a-timeline-item :label="`地理位置;${item.ip_location},操作系统:${item.os}`" v-for="(item, idx) in loginLogList" :key="idx">
+            <a-timeline
+              class="pl-5 mt-3"
+              v-if="loginLogList && loginLogList.length"
+            >
+              <a-timeline-item
+                :label="`地理位置;${item.ip_location},操作系统:${item.os}`"
+                v-for="(item, idx) in loginLogList"
+                :key="idx"
+              >
                 您于 {{ item.login_time }} 登录系统,{{ item.message }}
               </a-timeline-item>
             </a-timeline>
             <a-empty v-else />
           </a-tab-pane>
           <a-tab-pane key="operation-log" title="操作日志">
-            <a-timeline class="pl-5 mt-3" v-if="operationLogList && operationLogList.length">
+            <a-timeline
+              class="pl-5 mt-3"
+              v-if="operationLogList && operationLogList.length"
+            >
               <a-timeline-item
                 :label="`地理位置;${item.ip_location},方式:${item.method},路由:${item.router}`"
                 v-for="(item, idx) in operationLogList"
-                :key="idx">
+                :key="idx"
+              >
                 您于 {{ item.create_time }} 执行了 {{ item.service_name }}
               </a-timeline-item>
             </a-timeline>
@@ -50,54 +61,65 @@
 </template>
 
 <script setup>
-import { ref, reactive, onMounted, watch } from 'vue'
-import { useUserStore } from '@/store'
-import { Message } from '@arco-design/web-vue'
-import user from '@/api/system/user'
-import commonApi from '@/api/common'
+import { ref, reactive, onMounted, watch } from "vue";
+import { useUserStore } from "@/store";
+import { Message } from "@arco-design/web-vue";
+import user from "@/api/system/user";
+import commonApi from "@/api/common";
 
-import ModifyPassword from './components/modifyPassword.vue'
-import UserInfomation from './components/userInfomation.vue'
+import ModifyPassword from "./components/modifyPassword.vue";
+import UserInfomation from "./components/userInfomation.vue";
 
-const userStore = useUserStore()
+const userStore = useUserStore();
 const userInfo = reactive({
   ...userStore.user,
-})
+});
 
-const loginLogList = ref([])
-const operationLogList = ref([])
+const loginLogList = ref([]);
+const operationLogList = ref([]);
 
 const requestParams = reactive({
   limit: 5,
-})
+});
 
 onMounted(() => {
-  commonApi.getLoginLogList(Object.assign(requestParams, { orderBy: 'login_time', orderType: 'desc' })).then((res) => {
-    loginLogList.value = res.data.data
-  })
+  commonApi
+    .getLoginLogList(
+      Object.assign(requestParams, { orderBy: "login_time", orderType: "desc" })
+    )
+    .then((res) => {
+      loginLogList.value = res.data.data;
+    });
 
-  commonApi.getOperationLogList(Object.assign(requestParams, { orderBy: 'create_time', orderType: 'desc' })).then((res) => {
-    operationLogList.value = res.data.data
-  })
-})
+  commonApi
+    .getOperationLogList(
+      Object.assign(requestParams, {
+        orderBy: "create_time",
+        orderType: "desc",
+      })
+    )
+    .then((res) => {
+      operationLogList.value = res.data.data;
+    });
+});
 
-userInfo.avatar = userStore?.user?.avatar ?? undefined
+userInfo.avatar = userStore?.user?.avatar ?? undefined;
 
 watch(
   () => userInfo.avatar,
   async (newAvatar) => {
     if (newAvatar) {
-      const response = await user.updateInfo({ avatar: newAvatar })
+      const response = await user.updateInfo({ avatar: newAvatar });
       if (response.code === 200) {
-        Message.success('头像修改成功')
-        userStore.user.avatar = newAvatar
+        Message.success("头像修改成功");
+        userStore.user.avatar = newAvatar;
       }
     }
   }
-)
+);
 </script>
 <script>
-export default { name: 'userCenter' }
+export default { name: "userCenter" };
 </script>
 
 <style scoped>
@@ -107,7 +129,7 @@ export default { name: 'userCenter' }
 .user-header {
   width: 100%;
   height: 200px;
-  background: url('@/assets/userBanner.jpg') no-repeat;
+  background: url("@/assets/userBanner.jpg") no-repeat;
   background-size: cover;
 }
 </style>

+ 123 - 53
src/views/login.vue

@@ -1,86 +1,120 @@
 <script setup>
-import { reactive, ref } from 'vue'
-import loginApi from '@/api/login'
-import { useUserStore } from '@/store'
-import { useRouter, useRoute } from 'vue-router'
-import packageJson from '../../package.json'
-import { useAppStore } from '@/store'
+import { reactive, ref } from "vue";
+import loginApi from "@/api/login";
+import { useUserStore } from "@/store";
+import { useRouter, useRoute } from "vue-router";
+import packageJson from "../../package.json";
+import { useAppStore } from "@/store";
 
-const appStore = useAppStore()
-const router = useRouter()
-const route = useRoute()
-const captcha = ref(null)
+const appStore = useAppStore();
+const router = useRouter();
+const route = useRoute();
+const captcha = ref(null);
 
-const loading = ref(false)
+const loading = ref(false);
 
-let isDevelop = import.meta.env.VITE_APP_ENV === 'development'
+let isDevelop = import.meta.env.VITE_APP_ENV === "development";
 
-var odata = isDevelop ? { username: 'admin', password: '123456', code: '' } : { username: '', password: '', code: '' }
+var odata = isDevelop
+  ? { username: "admin", password: "123456", code: "" }
+  : { username: "", password: "", code: "" };
 
-const form = reactive(odata)
+const form = reactive(odata);
 
 const refreshCaptcha = () => {
-  form.code = ''
-  form.uuid = ''
+  form.code = "";
+  form.uuid = "";
   loginApi.getCaptch().then((res) => {
     if (res.code === 200) {
-      captcha.value = res.data.image
-      form.uuid = res.data.uuid
+      captcha.value = res.data.image;
+      form.uuid = res.data.uuid;
     }
-  })
-}
+  });
+};
 
-refreshCaptcha()
+refreshCaptcha();
 
-const userStore = useUserStore()
+const userStore = useUserStore();
 
-const redirect = route.query.redirect ? route.query.redirect : '/'
+const redirect = route.query.redirect ? route.query.redirect : "/";
 
 const handleSubmit = async ({ values, errors }) => {
   if (loading.value) {
-    return
+    return;
   }
-  loading.value = true
+  loading.value = true;
   if (!errors) {
-    const result = await userStore.login(form)
+    const result = await userStore.login(form);
     if (!result) {
-      loading.value = false
-      refreshCaptcha()
-      return
+      loading.value = false;
+      refreshCaptcha();
+      return;
     }
-    router.push(redirect)
+    router.push(redirect);
   }
-  loading.value = false
-}
+  loading.value = false;
+};
 </script>
 <template>
-  <div class="login-container" :style="{ background: appStore.mode === 'dark' ? '#2e2e30e3' : '' }">
+  <div
+    class="login-container"
+    :style="{ background: appStore.mode === 'dark' ? '#2e2e30e3' : '' }"
+  >
     <h3 class="login-logo">
       <img src="/logo.png" alt="logo" />
       <span>{{ $title }}</span>
     </h3>
 
-    <div class="login-width md:w-10/12 w-11/12 mx-auto flex justify-between h-full items-center">
-      <div class="w-6/12 mx-auto left-panel rounded-l pl-5 pr-5 hidden md:block">
+    <div
+      class="login-width md:w-10/12 w-11/12 mx-auto flex justify-between h-full items-center"
+    >
+      <div
+        class="w-6/12 mx-auto left-panel rounded-l pl-5 pr-5 hidden md:block"
+      >
         <div class="logo">
           <span>{{ $title }} v{{ packageJson.version }}</span>
         </div>
         <div class="slogan flex justify-end">
-          <span>---- {{ $t('sys.login.slogan') }}</span>
+          <!-- <span>---- {{ $t('sys.login.slogan') }}</span> -->
         </div>
       </div>
 
       <div class="md:w-6/12 w-11/12 md:rounded-r mx-auto pl-5 pr-5 pb-10">
-        <h2 class="mt-10 text-3xl pb-0 mb-10 login-title">{{ $t('sys.login.title') }}</h2>
+        <h2 class="mt-10 text-3xl pb-0 mb-10 login-title">
+          {{ $t("sys.login.title") }}
+        </h2>
         <a-form :model="form" @submit="handleSubmit">
-          <a-form-item field="username" :hide-label="true" :rules="[{ required: true, message: $t('sys.login.usernameNotice') }]">
-            <a-input v-model="form.username" class="w-full" size="large" :placeholder="$t('sys.login.username')" allow-clear>
+          <a-form-item
+            field="username"
+            :hide-label="true"
+            :rules="[
+              { required: true, message: $t('sys.login.usernameNotice') },
+            ]"
+          >
+            <a-input
+              v-model="form.username"
+              class="w-full"
+              size="large"
+              :placeholder="$t('sys.login.username')"
+              allow-clear
+            >
               <template #prefix><icon-user /></template>
             </a-input>
           </a-form-item>
 
-          <a-form-item field="password" :hide-label="true" :rules="[{ required: true, message: $t('sys.login.passwordNotice') }]">
-            <a-input-password v-model="form.password" :placeholder="$t('sys.login.password')" size="large" allow-clear>
+          <a-form-item
+            field="password"
+            :hide-label="true"
+            :rules="[
+              { required: true, message: $t('sys.login.passwordNotice') },
+            ]"
+          >
+            <a-input-password
+              v-model="form.password"
+              :placeholder="$t('sys.login.password')"
+              size="large"
+              allow-clear
+            >
               <template #prefix><icon-lock /></template>
             </a-input-password>
           </a-form-item>
@@ -94,28 +128,48 @@ const handleSubmit = async ({ values, errors }) => {
                 match: /^[a-zA-Z0-9]{4}$/,
                 message: $t('sys.login.verifyCodeNotice'),
               },
-            ]">
-            <a-input v-model="form.code" :placeholder="$t('sys.login.verifyCode')" size="large" allow-clear>
+            ]"
+          >
+            <a-input
+              v-model="form.code"
+              :placeholder="$t('sys.login.verifyCode')"
+              size="large"
+              allow-clear
+            >
               <template #prefix><icon-safe /></template>
               <template #append>
-                <img :src="captcha" style="height: 120px; height: 36px; cursor: pointer" @click="refreshCaptcha" />
+                <img
+                  :src="captcha"
+                  style="height: 120px; height: 36px; cursor: pointer"
+                  @click="refreshCaptcha"
+                />
               </template>
             </a-input>
           </a-form-item>
 
           <a-form-item :hide-label="true" class="mt-5">
-            <a-button html-type="submit" type="primary" long size="large" :loading="loading">
-              {{ $t('sys.login.loginBtn') }}
+            <a-button
+              html-type="submit"
+              type="primary"
+              long
+              size="large"
+              :loading="loading"
+            >
+              {{ $t("sys.login.loginBtn") }}
             </a-button>
           </a-form-item>
 
-          <a-divider orientation="center">{{ $t('sys.login.otherLoginType') }}</a-divider>
+          <!-- <a-divider orientation="center">{{
+            $t("sys.login.otherLoginType")
+          }}</a-divider>
           <div class="flex w-3/4 pt-2 mx-auto items-stretch justify-around">
             <a-avatar class="other-login wechat"><icon-wechat /></a-avatar>
-            <a-avatar class="other-login alipay"><icon-alipay-circle /></a-avatar>
+            <a-avatar class="other-login alipay"
+              ><icon-alipay-circle
+            /></a-avatar>
             <a-avatar class="other-login qq"><icon-qq /></a-avatar>
             <a-avatar class="other-login weibo"><icon-weibo /></a-avatar>
-          </div>
+          </div> -->
         </a-form>
       </div>
     </div>
@@ -236,7 +290,11 @@ const handleSubmit = async ({ values, errors }) => {
   width: 100px;
   height: 100px;
   border-radius: 50%;
-  background: linear-gradient(to right, rgba(var(--primary-6), 0.07), rgba(var(--primary-6), 0.04));
+  background: linear-gradient(
+    to right,
+    rgba(var(--primary-6), 0.07),
+    rgba(var(--primary-6), 0.04)
+  );
   animation: move-ce64e0ea 2.5s linear infinite;
 }
 
@@ -246,7 +304,11 @@ const handleSubmit = async ({ values, errors }) => {
   width: 150px;
   height: 150px;
   border-radius: 50%;
-  background: linear-gradient(to right, rgba(var(--primary-6), 0.08), rgba(var(--primary-6), 0.04));
+  background: linear-gradient(
+    to right,
+    rgba(var(--primary-6), 0.08),
+    rgba(var(--primary-6), 0.04)
+  );
   animation: move-ce64e0ea 3s linear infinite;
 }
 
@@ -256,7 +318,11 @@ const handleSubmit = async ({ values, errors }) => {
   width: 145px;
   height: 145px;
   border-radius: 50%;
-  background: linear-gradient(to right, rgba(var(--primary-6), 0.1), rgba(var(--primary-6), 0.04));
+  background: linear-gradient(
+    to right,
+    rgba(var(--primary-6), 0.1),
+    rgba(var(--primary-6), 0.04)
+  );
   animation: move-ce64e0ea 2.5s linear infinite;
 }
 
@@ -266,7 +332,11 @@ const handleSubmit = async ({ values, errors }) => {
   width: 160px;
   height: 160px;
   border-radius: 50%;
-  background: linear-gradient(to right, rgba(var(--primary-6), 0.02), rgba(var(--primary-6), 0.04));
+  background: linear-gradient(
+    to right,
+    rgba(var(--primary-6), 0.02),
+    rgba(var(--primary-6), 0.04)
+  );
   animation: move-ce64e0ea 3.5s linear infinite;
 }
 

+ 3 - 3
src/views/system/dept/index.vue

@@ -61,7 +61,7 @@
     <!-- 编辑表单 -->
     <edit-form ref="editRef" @success="refresh" />
 
-    <!-- 领导列表 -->
+    <!-- 组长列表 -->
     <leader-list ref="leaderRef" @success="refresh" />
 
     <!-- 游戏权限设置 -->
@@ -83,7 +83,7 @@ const editRef = ref();
 const leaderRef = ref();
 const gameListRef = ref();
 
-// 打开领导列表设置
+// 打开组长列表设置
 const openLeaderModal = (record) => {
   leaderRef.value.open(record);
 };
@@ -136,7 +136,7 @@ const options = reactive({
 // SaTable 列配置
 const columns = reactive([
   { title: "部门名称", dataIndex: "name", width: 180 },
-  { title: "领导列表", dataIndex: "leader" },
+  { title: "组长列表", dataIndex: "leader" },
   { title: "排序", dataIndex: "sort", width: 100 },
   {
     title: "状态",

+ 81 - 46
src/views/system/dept/leader.vue

@@ -1,77 +1,106 @@
 <template>
-  <a-modal v-model:visible="visible" fullscreen :footer="false" @close="handleClose">
-    <template #title>部门领导列表</template>
-    <a-alert>部门的领导人可以跨部门设置</a-alert>
-    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
+  <a-modal
+    v-model:visible="visible"
+    fullscreen
+    :footer="false"
+    @close="handleClose"
+  >
+    <template #title>组长列表</template>
+    <a-alert>部门的组长人可以跨部门设置</a-alert>
+    <sa-table
+      ref="crudRef"
+      :options="options"
+      :columns="columns"
+      :searchForm="searchForm"
+    >
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item field="username" label="用户名">
-            <a-input v-model="searchForm.username" placeholder="请输入用户名" allow-clear />
+            <a-input
+              v-model="searchForm.username"
+              placeholder="请输入用户名"
+              allow-clear
+            />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item field="nickname" label="用户昵称">
-            <a-input v-model="searchForm.nickname" placeholder="请输入用户昵称" allow-clear />
+            <a-input
+              v-model="searchForm.nickname"
+              placeholder="请输入用户昵称"
+              allow-clear
+            />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item field="status" label="状态">
-            <sa-select v-model="searchForm.status" dict="data_status" placeholder="请选择状态" allow-clear />
+            <sa-select
+              v-model="searchForm.status"
+              dict="data_status"
+              placeholder="请选择状态"
+              allow-clear
+            />
           </a-form-item>
         </a-col>
       </template>
       <!-- 操作前置扩展 -->
       <template #tableBeforeButtons>
-        <sa-user text="新增领导" :onlyId="false" :isEcho="false" v-model="users" @success="selectedSuccess" />
+        <sa-user
+          text="新增组长"
+          :onlyId="false"
+          :isEcho="false"
+          v-model="users"
+          @success="selectedSuccess"
+        />
       </template>
     </sa-table>
   </a-modal>
 </template>
 
 <script setup>
-import { ref, reactive } from 'vue'
-import api from '@/api/system/dept'
-import { Message } from '@arco-design/web-vue'
+import { ref, reactive } from "vue";
+import api from "@/api/system/dept";
+import { Message } from "@arco-design/web-vue";
 
-const emit = defineEmits(['success'])
+const emit = defineEmits(["success"]);
 
-const visible = ref(false)
-const crudRef = ref()
-const deptId = ref()
-const users = ref([])
+const visible = ref(false);
+const crudRef = ref();
+const deptId = ref();
+const users = ref([]);
 
 // 搜索表单
 const searchForm = ref({
-  username: '',
-  nickname: '',
+  username: "",
+  nickname: "",
   dept_id: null,
-  status: '',
-})
+  status: "",
+});
 
 // 打开弹框
 const open = (row) => {
-  deptId.value = row.id
-  visible.value = true
-  searchForm.value.dept_id = deptId.value
-  crudRef.value?.refresh()
-}
+  deptId.value = row.id;
+  visible.value = true;
+  searchForm.value.dept_id = deptId.value;
+  crudRef.value?.refresh();
+};
 
 // 成功添加
 const selectedSuccess = async () => {
   const data = users.value.map((item) => {
-    return { user_id: item.id, username: item.username }
-  })
-  const response = await api.addLeader({ id: deptId.value, users: data })
+    return { user_id: item.id, username: item.username };
+  });
+  const response = await api.addLeader({ id: deptId.value, users: data });
   if (response.code === 200) {
-    users.value = []
-    crudRef.value?.refresh()
+    users.value = [];
+    crudRef.value?.refresh();
   }
-}
+};
 
 const handleClose = async () => {
-  emit('success', true)
-}
+  emit("success", true);
+};
 
 // SaTable 基础配置
 const options = reactive({
@@ -80,26 +109,32 @@ const options = reactive({
   singleLine: true,
   delete: {
     show: true,
-    auth: ['/core/dept/destroy'],
+    auth: ["/core/dept/destroy"],
     func: async (params) => {
-      params.id = deptId.value
-      const resp = await api.delLeader(params)
+      params.id = deptId.value;
+      const resp = await api.delLeader(params);
       if (resp.code === 200) {
-        Message.success(`删除成功!`)
-        crudRef.value?.refresh()
+        Message.success(`删除成功!`);
+        crudRef.value?.refresh();
       }
     },
   },
-})
+});
 
 // SaTable 列配置
 const columns = reactive([
-  { title: '用户名', dataIndex: 'username' },
-  { title: '用户昵称', dataIndex: 'nickname' },
-  { title: '手机', dataIndex: 'phone' },
-  { title: '邮箱', dataIndex: 'email' },
-  { title: '状态', dataIndex: 'status', width: 100, type: 'dict', dict: 'data_status' },
-])
+  { title: "用户名", dataIndex: "username" },
+  { title: "用户昵称", dataIndex: "nickname" },
+  { title: "手机", dataIndex: "phone" },
+  { title: "邮箱", dataIndex: "email" },
+  {
+    title: "状态",
+    dataIndex: "status",
+    width: 100,
+    type: "dict",
+    dict: "data_status",
+  },
+]);
 
-defineExpose({ open })
+defineExpose({ open });
 </script>

+ 1 - 78
src/views/tool/crontab/edit.vue

@@ -26,83 +26,7 @@
           placeholder="请选择任务类型"
         />
       </a-form-item>
-      <a-form-item label="定时规则" field="task_style">
-        <a-space>
-          <a-select v-model="formData.task_style" :style="{ width: '100px' }">
-            <a-option :value="1">每天</a-option>
-            <a-option :value="2">每小时</a-option>
-            <a-option :value="3">N小时</a-option>
-            <a-option :value="4">N分钟</a-option>
-            <a-option :value="5">N秒</a-option>
-            <a-option :value="6">每周</a-option>
-            <a-option :value="7">每月</a-option>
-            <a-option :value="8">每年</a-option>
-          </a-select>
-          <template v-if="formData.task_style == 8">
-            <a-input-number
-              v-model="formData.month"
-              :precision="0"
-              :min="1"
-              :max="12"
-              :style="{ width: '80px' }"
-            />
-            <span>月</span>
-          </template>
-          <template v-if="formData.task_style > 6">
-            <a-input-number
-              v-model="formData.day"
-              :precision="0"
-              :min="1"
-              :max="31"
-              :style="{ width: '80px' }"
-            />
-            <span>日</span>
-          </template>
-          <a-select
-            v-if="formData.task_style == 6"
-            v-model="formData.week"
-            :style="{ width: '80px' }"
-          >
-            <a-option :value="1">周一</a-option>
-            <a-option :value="2">周二</a-option>
-            <a-option :value="3">周三</a-option>
-            <a-option :value="4">周四</a-option>
-            <a-option :value="5">周五</a-option>
-            <a-option :value="6">周六</a-option>
-            <a-option :value="0">周日</a-option>
-          </a-select>
-          <template v-if="[1, 3, 6, 7, 8].includes(formData.task_style)">
-            <a-input-number
-              v-model="formData.hour"
-              :precision="0"
-              :min="0"
-              :max="23"
-              :style="{ width: '80px' }"
-            />
-            <span>时</span>
-          </template>
-          <template v-if="formData.task_style != 5">
-            <a-input-number
-              v-model="formData.minute"
-              :precision="0"
-              :min="0"
-              :max="59"
-              :style="{ width: '80px' }"
-            />
-            <span>分</span>
-          </template>
-          <template v-if="formData.task_style == 5">
-            <a-input-number
-              v-model="formData.second"
-              :precision="0"
-              :min="0"
-              :max="59"
-              :style="{ width: '80px' }"
-            />
-            <span>秒</span>
-          </template>
-        </a-space>
-      </a-form-item>
+
       <a-form-item label="调用目标" field="target">
         <a-textarea v-model="formData.target" placeholder="请输入调用目标" />
       </a-form-item>
@@ -171,7 +95,6 @@ const formData = reactive({ ...initialFormData });
 const rules = {
   name: [{ required: true, message: "任务名称不能为空" }],
   type: [{ required: true, message: "任务类型不能为空" }],
-  task_style: [{ required: true, message: "定时规则不能为空" }],
   target: [{ required: true, message: "调用目标不能为空" }],
 };
 

+ 0 - 10
src/views/tool/crontab/index.vue

@@ -24,16 +24,6 @@
             />
           </a-form-item>
         </a-col>
-        <a-col :sm="8" :xs="24">
-          <a-form-item field="status" label="状态">
-            <sa-select
-              v-model="searchForm.status"
-              dict="data_status"
-              allow-clear
-              placeholder="请选择状态"
-            />
-          </a-form-item>
-        </a-col>
       </template>
 
       <!-- Table 自定义渲染 -->