diff --git a/src/assets/css/layout.scss b/src/assets/css/layout.scss index 9dd5029..d77e5f6 100644 --- a/src/assets/css/layout.scss +++ b/src/assets/css/layout.scss @@ -165,7 +165,7 @@ header { } .searchBox { - padding: 15px 15px 0 15px; + padding: 15px; border-radius: 1px; position: relative; background: #fff; @@ -210,7 +210,7 @@ header { position: relative; background: #fff; border-radius: 4px; - height: calc(100vh - 124px); + height: calc(100vh - 327px); .el-table--fit { width: calc(100% - 20px) !important; position: absolute; diff --git a/src/components/aboutTable/FormMessage.vue b/src/components/aboutTable/FormMessage.vue index e59d082..9b35509 100644 --- a/src/components/aboutTable/FormMessage.vue +++ b/src/components/aboutTable/FormMessage.vue @@ -1,127 +1,82 @@ + + + + + + + + + + + + + +}; + +watch(() => listQuery.value,(newVal) => { + emits('update:modelValue', newVal) + },{ immediate: true, deep: true } +); +defineExpose({ submit }); + \ No newline at end of file diff --git a/src/components/aboutTable/PageTitle.vue b/src/components/aboutTable/PageTitle.vue index 56258a7..1bcb9b1 100644 --- a/src/components/aboutTable/PageTitle.vue +++ b/src/components/aboutTable/PageTitle.vue @@ -5,6 +5,9 @@
  • {{ it }}
  • {{ title }}
    +
    + +
    diff --git a/src/components/aboutTable/Search.vue b/src/components/aboutTable/Search.vue index b46a7d7..b1b7a26 100644 --- a/src/components/aboutTable/Search.vue +++ b/src/components/aboutTable/Search.vue @@ -576,7 +576,7 @@ watchEffect(() => { flex-wrap: wrap; .item { display: flex; - margin-right: 20px; + margin-right: 12px; margin-bottom: 15px; } .label { diff --git a/src/main.js b/src/main.js index 9d0e9b2..6382a64 100644 --- a/src/main.js +++ b/src/main.js @@ -49,13 +49,8 @@ import installFilter from "@/filters"; //事件总线 import mitt from "mitt"; -import { - resetForm -} from "@/utils/validate"; -import { - getDict, - setCascader -} from '@/utils/dict'; +import { resetForm } from "@/utils/validate"; +import { getDict, setCascader } from '@/utils/dict'; import axios from "axios"; //挂载全局方法 diff --git a/src/permission.js b/src/permission.js index 5a4e735..2cecf6e 100644 --- a/src/permission.js +++ b/src/permission.js @@ -6,7 +6,7 @@ import { removeAllItem } from "@/utils/storage"; // 白名单 -const whiteList = ['/login','/','/KeyPopulations', '/FourColorWarning','/oatuh_login','/editPassword', '/404', '/401'] +const whiteList = ['/login','/oatuh_login','/404', '/401'] /** * 路由前置守卫 * to 去哪里 diff --git a/src/router/index.js b/src/router/index.js index 0eb7b80..5610fc9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -16,7 +16,103 @@ import store from "@/store"; */ export const privateRoutes = [ - + { + path: "/systemConfig", + component: layout, + name: "systemConfigModel", + redirect: "/dict/index", + meta: { + title: "系统管理", + icon: "article" + }, + children: [ + { + path: "/user/department-ist", + name: "departmentList", + component: () => import("@/views/backOfficeSystem/systemConfig/department-list/index"), + meta: { + title: "部门管理", + icon: "article-ranking" + } + }, + + { + path: "/user/userList", + name: "userList", + component: () => import("@/views/backOfficeSystem/systemConfig/user-list/index"), + meta: { + title: "用户管理", + icon: "article-ranking" + } + }, + { + path: "/user/role", + name: "userRoleIndex", + component: () => import("@/views/backOfficeSystem/systemConfig/role-list/index"), + meta: { + title: "角色列表", + icon: "article-ranking" + } + }, + { + path: "/user/menuList", + name: "menuList", + component: () => import("@/views/backOfficeSystem/systemConfig/menu-list/index"), + meta: { + title: "菜单管理", + icon: "article-ranking" + } + }, + + { + path: "/dict/detail", + name: "dictDetail", + component: () => import("@/views/backOfficeSystem/systemConfig/dict/detail"), + meta: { + title: "字典数据" + } + }, + { + path: "/dict/index", + name: "dictIndex", + component: () => import("@/views/backOfficeSystem/systemConfig/dict/index"), + meta: { + title: "字典列表", + icon: "article-ranking" + } + }, + + { + path: "/user/deptAllocationUser/:id", + name: "deptAllocationUser", + component: () => + import("@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser"), + meta: { + title: "管理用户" + } + }, + { + path: "/user/allocationUser/:id", + name: "allocationUser", + component: () => + import("@/views/backOfficeSystem/systemConfig/role-list/allocationUser"), + meta: { + title: "分配用户" + } + }, + + { + path: "/user/systemConfig", + name: "systemConfig", + component: () => + import("@/views/backOfficeSystem/systemConfig/system-config-list/index"), + meta: { + title: "系统配置", + icon: "article-ranking" + } + }, + ] + }, ]; /** @@ -44,103 +140,7 @@ export const publicRoutes = [ component: layout, redirect: "/IdentityManage", children: [ - { - path: "/systemConfig", - // component: layout, - name: "systemConfigModel", - redirect: "/dict/index", - meta: { - title: "系统管理", - icon: "article" - }, - children: [ - { - path: "/user/department-ist", - name: "departmentList", - component: () => import("@/views/backOfficeSystem/systemConfig/department-list/index"), - meta: { - title: "部门管理", - icon: "article-ranking" - } - }, - - { - path: "/user/userList", - name: "userList", - component: () => import("@/views/backOfficeSystem/systemConfig/user-list/index"), - meta: { - title: "用户管理", - icon: "article-ranking" - } - }, - { - path: "/user/role", - name: "userRoleIndex", - component: () => import("@/views/backOfficeSystem/systemConfig/role-list/index"), - meta: { - title: "角色列表", - icon: "article-ranking" - } - }, - { - path: "/user/menuList", - name: "menuList", - component: () => import("@/views/backOfficeSystem/systemConfig/menu-list/index"), - meta: { - title: "菜单管理", - icon: "article-ranking" - } - }, - - { - path: "/dict/detail", - name: "dictDetail", - component: () => import("@/views/backOfficeSystem/systemConfig/dict/detail"), - meta: { - title: "字典数据" - } - }, - { - path: "/dict/index", - name: "dictIndex", - component: () => import("@/views/backOfficeSystem/systemConfig/dict/index"), - meta: { - title: "字典列表", - icon: "article-ranking" - } - }, - - { - path: "/user/deptAllocationUser/:id", - name: "deptAllocationUser", - component: () => - import("@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser"), - meta: { - title: "管理用户" - } - }, - { - path: "/user/allocationUser/:id", - name: "allocationUser", - component: () => - import("@/views/backOfficeSystem/systemConfig/role-list/allocationUser"), - meta: { - title: "分配用户" - } - }, - - { - path: "/user/systemConfig", - name: "systemConfig", - component: () => - import("@/views/backOfficeSystem/systemConfig/system-config-list/index"), - meta: { - title: "系统配置", - icon: "article-ranking" - } - }, - ] - }, + { path: "/FourColorWarning", name: "FourColorWarning", diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index b117367..3f3826b 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -1,8 +1,5 @@ // 专门处理权限路由的模块 -import { - publicRoutes, - privateRoutes -} from '@/router' +import { publicRoutes, privateRoutes } from '@/router' function filter(data, menus) { var newData = data.filter(x => menus ?.includes(x.name)) @@ -12,8 +9,7 @@ function filter(data, menus) { export default { namespaced: true, state: { - // 路由表:初始拥有静态路由权限 - routes: [], + routes: [],// 路由表:初始拥有静态路由权限 routeReady: 0 }, mutations: { diff --git a/src/utils/dict.js b/src/utils/dict.js index 68e8d34..4668f7f 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -1,10 +1,5 @@ -import { - ref, - toRefs -} from 'vue'; -import { - getSysDictByCode -} from '@/api/sysDict' //引入封装数字字典接口 +import { ref, toRefs } from 'vue'; +import { getSysDictByCode } from '@/api/sysDict' //引入封装数字字典接口 /** * 获取字典数据 */ diff --git a/src/views/backOfficeSystem/fourColorManage/IdentityManage/components/editAddForm.vue b/src/views/backOfficeSystem/fourColorManage/IdentityManage/components/editAddForm.vue index 9e6f761..118e805 100644 --- a/src/views/backOfficeSystem/fourColorManage/IdentityManage/components/editAddForm.vue +++ b/src/views/backOfficeSystem/fourColorManage/IdentityManage/components/editAddForm.vue @@ -8,24 +8,16 @@
    - +
    diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 24b3ee8..7af66d5 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -66,8 +66,8 @@ const store = useStore(); const kaptchaUrl = ref(""); // 数据源 const loginForm = ref({ - userName: "admin", - password: "111111", + userName: "", + password: "", kaptcha: "" }); const loginDialog = ref(false); @@ -111,24 +111,21 @@ const router = useRouter(); const handleLogin = () => { loginFromRef.value.validate((valid) => { if (!valid) return false; - setItem('token', '1255555888'); - setItem('isOatuh', 0) - router.push("/"); - // loading.value = true; - // store.dispatch("user/login", loginForm.value).then((res) => { - // loading.value = false; - // // 登录后操作 - // if (res.deptList.length === 1) { - // window.location.href = '/' - // } else { - // deptList.value = [...res.deptList]; - // loginDialog.value = true; - // authorization.value = res.jwtToken; - // ElNotification({title: "提示",message: "请选择部门",duration: 3000}); - // } - // }).catch(() => { - // loading.value = false; - // }); + loading.value = true; + store.dispatch("user/login", loginForm.value).then((res) => { + loading.value = false; + // 登录后操作 + if (res.deptList.length === 1) { + window.location.href = '/' + } else { + deptList.value = [...res.deptList]; + loginDialog.value = true; + authorization.value = res.jwtToken; + ElNotification({title: "提示",message: "请选择部门",duration: 3000}); + } + }).catch(() => { + loading.value = false; + }); }); }; const logout = () => { diff --git a/vue.config.js b/vue.config.js index 0f7438b..bc6906f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -4,7 +4,7 @@ function resolve(dir) { return path.join(__dirname, dir); } -const serverHost = "http://127.0.0.1:8006" +const serverHost = "http://192.168.4.29:8006" module.exports = { publicPath: "./", outputDir: "ylth",