样式调整
Showing
12 changed files
with
228 additions
and
275 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-07 09:15:01 | 4 | * @LastEditTime: 2023-03-10 14:59:43 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="app-wrapper jgWrapper"> | 7 | <div class="app-wrapper jgWrapper"> |
... | @@ -12,57 +12,61 @@ | ... | @@ -12,57 +12,61 @@ |
12 | </div> | 12 | </div> |
13 | </template> | 13 | </template> |
14 | <script> | 14 | <script> |
15 | import { AppMain, Navbar, Sidebar, TagsView } from './components' | 15 | import { AppMain, Navbar, Sidebar, TagsView } from './components' |
16 | import ResizeMixin from './mixin/ResizeHandler' | 16 | import ResizeMixin from './mixin/ResizeHandler' |
17 | import { mapState } from 'vuex' | 17 | import { mapState } from 'vuex' |
18 | export default { | 18 | export default { |
19 | name: 'Layout', | 19 | name: 'Layout', |
20 | components: { | 20 | components: { |
21 | AppMain, | 21 | AppMain, |
22 | Navbar, | 22 | Navbar, |
23 | Sidebar, | 23 | Sidebar, |
24 | TagsView | 24 | TagsView |
25 | }, | 25 | }, |
26 | mixins: [ResizeMixin], | 26 | created () { |
27 | computed: { | 27 | this.$store.dispatch("products/setData", "BDCJGPT"); |
28 | ...mapState({ | 28 | console.log("ZOULEJG"); |
29 | sidebar: state => state.app.sidebar, | 29 | }, |
30 | needTagsView: state => state.settings.tagsView, | 30 | mixins: [ResizeMixin], |
31 | fixedHeader: state => state.settings.fixedHeader | 31 | computed: { |
32 | }) | 32 | ...mapState({ |
33 | sidebar: state => state.app.sidebar, | ||
34 | needTagsView: state => state.settings.tagsView, | ||
35 | fixedHeader: state => state.settings.fixedHeader | ||
36 | }) | ||
37 | } | ||
33 | } | 38 | } |
34 | } | ||
35 | </script> | 39 | </script> |
36 | <style lang="scss"> | 40 | <style lang="scss"> |
37 | @import "~@/styles/jgSidebar.scss"; | 41 | @import "~@/styles/jgSidebar.scss"; |
38 | </style> | 42 | </style> |
39 | <style lang="scss" scoped> | 43 | <style lang="scss" scoped> |
40 | @import "~@/styles/mixin.scss"; | 44 | @import "~@/styles/mixin.scss"; |
41 | 45 | ||
42 | .app-wrapper { | 46 | .app-wrapper { |
43 | @include clearfix; | 47 | @include clearfix; |
44 | position: relative; | 48 | position: relative; |
45 | height: 100%; | 49 | height: 100%; |
46 | width: 100%; | 50 | width: 100%; |
47 | min-width: 1280px; | 51 | min-width: 1280px; |
48 | background: url('~@/image/bg.png') no-repeat; | 52 | background: url("~@/image/bg.png") no-repeat; |
49 | background-size: 100% 100%; | 53 | background-size: 100% 100%; |
50 | padding: 12px; | 54 | padding: 12px; |
51 | box-sizing: border-box; | 55 | box-sizing: border-box; |
52 | 56 | ||
53 | &.mobile.openSidebar { | 57 | &.mobile.openSidebar { |
54 | position: fixed; | 58 | position: fixed; |
55 | top: 0; | 59 | top: 0; |
60 | } | ||
56 | } | 61 | } |
57 | } | ||
58 | 62 | ||
59 | .appMain { | 63 | .appMain { |
60 | min-width: 1290px; | 64 | min-width: 1290px; |
61 | height: calc(100vh - 101px) !important; | 65 | height: calc(100vh - 101px) !important; |
62 | box-sizing: border-box; | 66 | box-sizing: border-box; |
63 | 67 | ||
64 | .app-main { | 68 | .app-main { |
65 | height: 100%; | 69 | height: 100%; |
70 | } | ||
66 | } | 71 | } |
67 | } | ||
68 | </style> | 72 | </style> | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-07 09:11:01 | 4 | * @LastEditTime: 2023-03-10 15:00:56 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="app-wrapper scWrapper"> | 7 | <div class="app-wrapper scWrapper"> |
... | @@ -13,62 +13,66 @@ | ... | @@ -13,62 +13,66 @@ |
13 | </div> | 13 | </div> |
14 | </template> | 14 | </template> |
15 | <script> | 15 | <script> |
16 | import { AppMain, Navbar, Sidebar, TagsView } from './components' | 16 | import { AppMain, Navbar, Sidebar, TagsView } from './components' |
17 | import ResizeMixin from './mixin/ResizeHandler' | 17 | import ResizeMixin from './mixin/ResizeHandler' |
18 | import { mapState } from 'vuex' | 18 | import { mapState } from 'vuex' |
19 | export default { | 19 | export default { |
20 | name: 'Layout', | 20 | name: 'Layout', |
21 | components: { | 21 | components: { |
22 | AppMain, | 22 | AppMain, |
23 | Navbar, | 23 | Navbar, |
24 | Sidebar, | 24 | Sidebar, |
25 | TagsView | 25 | TagsView |
26 | }, | 26 | }, |
27 | mixins: [ResizeMixin], | 27 | mixins: [ResizeMixin], |
28 | computed: { | 28 | created () { |
29 | ...mapState({ | 29 | this.$store.dispatch("products/setData", "BDCSBPT"); |
30 | sidebar: state => state.app.sidebar, | 30 | console.log("ZOULEJG"); |
31 | needTagsView: state => state.settings.tagsView, | 31 | }, |
32 | fixedHeader: state => state.settings.fixedHeader | 32 | computed: { |
33 | }) | 33 | ...mapState({ |
34 | sidebar: state => state.app.sidebar, | ||
35 | needTagsView: state => state.settings.tagsView, | ||
36 | fixedHeader: state => state.settings.fixedHeader | ||
37 | }) | ||
38 | } | ||
34 | } | 39 | } |
35 | } | ||
36 | </script> | 40 | </script> |
37 | <style lang="scss"> | 41 | <style lang="scss"> |
38 | @import "~@/styles/mixin.scss"; | 42 | @import "~@/styles/mixin.scss"; |
39 | @import '~@/styles/sbSidebar.scss'; | 43 | @import "~@/styles/sbSidebar.scss"; |
40 | 44 | ||
41 | .app-wrapper { | 45 | .app-wrapper { |
42 | @include clearfix; | 46 | @include clearfix; |
43 | position: relative; | 47 | position: relative; |
44 | height: 100%; | 48 | height: 100%; |
45 | width: 100%; | 49 | width: 100%; |
46 | // background-color: $containerbg; | 50 | // background-color: $containerbg; |
47 | padding: 0; | 51 | padding: 0; |
48 | 52 | ||
49 | &.mobile.openSidebar { | 53 | &.mobile.openSidebar { |
50 | position: fixed; | 54 | position: fixed; |
51 | top: 0; | 55 | top: 0; |
56 | } | ||
52 | } | 57 | } |
53 | } | ||
54 | 58 | ||
55 | .drawer-bg { | 59 | .drawer-bg { |
56 | background: #000; | 60 | background: #000; |
57 | opacity: 0.3; | 61 | opacity: 0.3; |
58 | width: 100%; | 62 | width: 100%; |
59 | top: 0; | 63 | top: 0; |
60 | height: 100%; | 64 | height: 100%; |
61 | position: absolute; | 65 | position: absolute; |
62 | z-index: 999; | 66 | z-index: 999; |
63 | } | 67 | } |
64 | 68 | ||
65 | .fixed-header { | 69 | .fixed-header { |
66 | width: 100%; | 70 | width: 100%; |
67 | transition: width 0.28s; | 71 | transition: width 0.28s; |
68 | } | 72 | } |
69 | 73 | ||
70 | .el-dropdown-menu--small { | 74 | .el-dropdown-menu--small { |
71 | padding: 0; | 75 | padding: 0; |
72 | width: 5px; | 76 | width: 5px; |
73 | } | 77 | } |
74 | </style> | 78 | </style> | ... | ... |
src/permission copy.js
deleted
100644 → 0
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-09 21:06:38 | ||
5 | */ | ||
6 | import router from "./router"; | ||
7 | import store from "./store"; | ||
8 | import { getMenuInfo } from "@/api/user"; | ||
9 | import NProgress from "nprogress"; // progress bar | ||
10 | import "nprogress/nprogress.css"; // progress bar style | ||
11 | import getPageTitle from "@/utils/get-page-title"; | ||
12 | import Cookies from "js-cookie"; | ||
13 | NProgress.configure({ showSpinner: false }); // NProgress Configuration | ||
14 | |||
15 | router.beforeEach(async (to, from, next) => { | ||
16 | NProgress.start(); | ||
17 | document.title = getPageTitle(to.meta.title); | ||
18 | let hasAddDict = store.state.dict.addDict; | ||
19 | let hasUser = store.state.user.hasUser; | ||
20 | let hasAddRoute = store.state.permission.addRoutes; | ||
21 | if (to.path == "/sb" || to.path == "/jg") { | ||
22 | sessionStorage.removeItem("token"); | ||
23 | sessionStorage.setItem("psth", to.path) | ||
24 | next(); | ||
25 | } else { | ||
26 | let code = sessionStorage.getItem("psth") == "/sb" ? "BDCSBPT" : "BDCJGPT" | ||
27 | //判断token是否存在 | ||
28 | const hasToken = sessionStorage.getItem("token"); | ||
29 | if (hasToken) { | ||
30 | //请求用户信息 | ||
31 | if (!hasUser) { | ||
32 | store.dispatch("user/getUserInfo"); | ||
33 | import("@/styles/public.scss"); | ||
34 | } | ||
35 | if (hasAddRoute) { | ||
36 | next(); | ||
37 | } else { | ||
38 | //请求菜单 | ||
39 | const { result: getMenuData } = (await getMenuInfo(code)) || []; | ||
40 | const accessRoutes = await store.dispatch( | ||
41 | "permission/generateRoutes", | ||
42 | getMenuData | ||
43 | ); | ||
44 | router.addRoutes([ | ||
45 | ...accessRoutes, | ||
46 | { path: "*", redirect: "/404", hidden: true }, | ||
47 | ]); | ||
48 | const routeTo = Cookies.get("routerTo"); | ||
49 | if (!hasAddDict) { | ||
50 | await store.dispatch("dict/generateDic"); | ||
51 | } | ||
52 | if (routeTo && routeTo !== "/") { | ||
53 | next({ ...to, replace: true }); | ||
54 | } else { | ||
55 | next("/home"); | ||
56 | } | ||
57 | } | ||
58 | } else { | ||
59 | next(sessionStorage.getItem("psth")); | ||
60 | } | ||
61 | } | ||
62 | |||
63 | NProgress.done(); | ||
64 | }); | ||
65 | router.afterEach((to) => { | ||
66 | // 解决刷新页面报404问题 | ||
67 | Cookies.set("routerTo", to.fullPath); | ||
68 | NProgress.done(); | ||
69 | }); |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-09 21:06:38 | 4 | * @LastEditTime: 2023-03-10 16:43:16 |
5 | */ | 5 | */ |
6 | import router from "./router"; | 6 | import router from "./router"; |
7 | import store from "./store"; | 7 | import store from "./store"; |
... | @@ -11,7 +11,6 @@ import "nprogress/nprogress.css"; // progress bar style | ... | @@ -11,7 +11,6 @@ import "nprogress/nprogress.css"; // progress bar style |
11 | import getPageTitle from "@/utils/get-page-title"; | 11 | import getPageTitle from "@/utils/get-page-title"; |
12 | import Cookies from "js-cookie"; | 12 | import Cookies from "js-cookie"; |
13 | NProgress.configure({ showSpinner: false }); // NProgress Configuration | 13 | NProgress.configure({ showSpinner: false }); // NProgress Configuration |
14 | |||
15 | router.beforeEach(async (to, from, next) => { | 14 | router.beforeEach(async (to, from, next) => { |
16 | NProgress.start(); | 15 | NProgress.start(); |
17 | document.title = getPageTitle(to.meta.title); | 16 | document.title = getPageTitle(to.meta.title); | ... | ... |
1 | import Vue from 'vue' | 1 | import Vue from 'vue' |
2 | import Router from 'vue-router' | 2 | import Router from 'vue-router' |
3 | Vue.use(Router) | 3 | Vue.use(Router) |
4 | /* Layout */ | ||
5 | import Layout from '@/layout' | 4 | import Layout from '@/layout' |
6 | // const p = 'layout1' | 5 | |
7 | // const Layout = require('@/layout') | ||
8 | /* Router Modules */ | ||
9 | // import componentsRouter from './modules/components' | ||
10 | export const constantRoutes = [ | 6 | export const constantRoutes = [ |
11 | { | 7 | { |
12 | path: '/404', | 8 | path: '/404', | ... | ... |
1 | import { constantRoutes } from '@/router' | 1 | /* |
2 | * @Author: xiaomiao 1158771342@qq.com | ||
3 | * @Date: 2023-03-09 15:24:53 | ||
4 | * @LastEditors: xiaomiao 1158771342@qq.com | ||
5 | * @LastEditTime: 2023-03-10 17:24:21 | ||
6 | * @FilePath: \上报\bdcjg-web\src\store\modules\permission.js | ||
7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
8 | */ | ||
9 | import {constantRoutes} from '@/router' | ||
10 | console.log("HAHAHHAHAHAH"); | ||
2 | import asyncRouter from '@/utils/asyncRouter.js' | 11 | import asyncRouter from '@/utils/asyncRouter.js' |
3 | const state = { | 12 | const state = { |
4 | routes: [], | 13 | routes: [], |
5 | addRoutes: false, | 14 | addRoutes: false, |
6 | } | 15 | } |
7 | 16 | ||
8 | const mutations = { | 17 | const mutations = { |
9 | SET_ROUTES: (state, routes) => { | 18 | SET_ROUTES: (state, routes) => { |
10 | state.addRoutes = true | 19 | state.addRoutes = true |
11 | state.routes = routes | 20 | state.routes = routes |
12 | }, | 21 | }, |
13 | RESET_ROUTE: (state) => { | 22 | RESET_ROUTE: (state) => { |
14 | state.addRoutes = false | 23 | state.addRoutes = false |
15 | } | 24 | } |
16 | } | 25 | } |
17 | const actions = { | 26 | const actions = { |
18 | // 添加全部菜单 | 27 | // 添加全部菜单 |
19 | generateRoutes ({ commit }, getMenuInfo) { | 28 | generateRoutes ({ commit }, getMenuInfo) { |
20 | return new Promise(resolve => { | 29 | return new Promise(resolve => { |
21 | // 将权限菜单数组转成路由树数据结构 | 30 | // 将权限菜单数组转成路由树数据结构 |
22 | let permission_tree = asyncRouter(getMenuInfo) | 31 | let permission_tree = asyncRouter(getMenuInfo) |
23 | const mergeResult = _.cloneDeep(constantRoutes).concat(permission_tree); | 32 | const mergeResult = _.cloneDeep(constantRoutes).concat(permission_tree); |
24 | commit('SET_ROUTES', mergeResult) | 33 | commit('SET_ROUTES', mergeResult) |
25 | resolve(permission_tree) | 34 | resolve(permission_tree) |
26 | }) | 35 | }) |
27 | }, | 36 | }, |
28 | // 重置路由 | 37 | // 重置路由 |
29 | resetRoutes ({ commit }) { | 38 | resetRoutes ({ commit }) { |
30 | commit('RESET_ROUTE') | 39 | commit('RESET_ROUTE') |
31 | } | 40 | } |
32 | } | 41 | } |
33 | // 树转数组 | 42 | // 树转数组 |
34 | function dfs (root, fVisit) { | 43 | function dfs (root, fVisit) { |
35 | let stack = Array.isArray(root) ? [...root] : [root]; | 44 | let stack = Array.isArray(root) ? [...root] : [root]; |
36 | while (stack.length) { | 45 | while (stack.length) { |
37 | let node = stack.pop(); | 46 | let node = stack.pop(); |
38 | fVisit && fVisit(node); | 47 | fVisit && fVisit(node); |
39 | let children = node.children; | 48 | let children = node.children; |
40 | if (children && children.length) { | 49 | if (children && children.length) { |
41 | for (let i = children.length - 1; i >= 0; i--) stack.push(children[i]); | 50 | for (let i = children.length - 1; i >= 0; i--) stack.push(children[i]); |
42 | } | ||
43 | } | 51 | } |
52 | } | ||
44 | } | 53 | } |
45 | // 数组转树 | 54 | // 数组转树 |
46 | //需要插入父节点id,pid为null或'',就是找root节点,然后root节点再去找自己的子节点 | 55 | //需要插入父节点id,pid为null或'',就是找root节点,然后root节点再去找自己的子节点 |
47 | function array2Tree (data, pid) { | 56 | function array2Tree (data, pid) { |
48 | let res = []; | 57 | let res = []; |
49 | data.forEach(item => { | 58 | data.forEach(item => { |
50 | if (item.parentId === pid) { | 59 | if (item.parentId === pid) { |
51 | let itemChildren = array2Tree(data, item.id); | 60 | let itemChildren = array2Tree(data, item.id); |
52 | if (itemChildren.length) item.children = itemChildren; | 61 | if (itemChildren.length) item.children = itemChildren; |
53 | res.push(item); | 62 | res.push(item); |
54 | } | 63 | } |
55 | }); | 64 | }); |
56 | // 菜单数据反转,保持一致 | 65 | // 菜单数据反转,保持一致 |
57 | res.reverse() | 66 | res.reverse() |
58 | _.each(res, c => { | 67 | _.each(res, c => { |
59 | if (c.children && c.children.length > 0) { | 68 | if (c.children && c.children.length > 0) { |
60 | c.children.reverse() | 69 | c.children.reverse() |
61 | } | 70 | } |
62 | }) | 71 | }) |
63 | return res; | 72 | return res; |
64 | } | 73 | } |
65 | 74 | ||
66 | export default { | 75 | export default { |
67 | namespaced: true, | 76 | namespaced: true, |
68 | state, | 77 | state, |
69 | mutations, | 78 | mutations, |
70 | actions | 79 | actions |
71 | } | 80 | } | ... | ... |
... | @@ -9,7 +9,6 @@ | ... | @@ -9,7 +9,6 @@ |
9 | <div class="d-flex"> | 9 | <div class="d-flex"> |
10 | <dv-decoration-8 class="dv-dec-8" :color="decorationColor" /> | 10 | <dv-decoration-8 class="dv-dec-8" :color="decorationColor" /> |
11 | <div class="title"> | 11 | <div class="title"> |
12 | <span class="title-text">{{ products.name }}}</span> | ||
13 | <dv-decoration-5 | 12 | <dv-decoration-5 |
14 | :dur="1" | 13 | :dur="1" |
15 | class="dv-dec-5" | 14 | class="dv-dec-5" |
... | @@ -58,9 +57,6 @@ | ... | @@ -58,9 +57,6 @@ |
58 | }, 500); | 57 | }, 500); |
59 | }, | 58 | }, |
60 | }, | 59 | }, |
61 | computed: { | ||
62 | ...mapGetters(["products"]), | ||
63 | }, | ||
64 | }; | 60 | }; |
65 | </script> | 61 | </script> |
66 | 62 | ... | ... |
... | @@ -59,8 +59,11 @@ | ... | @@ -59,8 +59,11 @@ |
59 | //根据子系统code获取子系统详细信息 | 59 | //根据子系统code获取子系统详细信息 |
60 | getAction(api.subsystem, params).then((res) => { | 60 | getAction(api.subsystem, params).then((res) => { |
61 | if (res.status === 1) { | 61 | if (res.status === 1) { |
62 | this.productName = res.content[0].name; | 62 | console.log(" res.contentJJJGGG", res.content); |
63 | // this.productName = res.content[0].name; | ||
63 | this.$store.dispatch("products/setData", res.content[0].code); | 64 | this.$store.dispatch("products/setData", res.content[0].code); |
65 | sessionStorage.setItem("products", res.content[0].code) | ||
66 | console.log("jjjggg的product"); | ||
64 | } else { | 67 | } else { |
65 | this.$message.error({ message: res.message, showClose: true }); | 68 | this.$message.error({ message: res.message, showClose: true }); |
66 | } | 69 | } | ... | ... |
... | @@ -55,7 +55,7 @@ | ... | @@ -55,7 +55,7 @@ |
55 | conditions: [ | 55 | conditions: [ |
56 | { | 56 | { |
57 | property: "code", | 57 | property: "code", |
58 | value: "BDCJGPT", | 58 | value: "BDCSBPT", |
59 | operator: "EQ", | 59 | operator: "EQ", |
60 | }, | 60 | }, |
61 | ], | 61 | ], |
... | @@ -67,7 +67,10 @@ | ... | @@ -67,7 +67,10 @@ |
67 | getAction(api.subsystem, params).then((res) => { | 67 | getAction(api.subsystem, params).then((res) => { |
68 | if (res.status === 1) { | 68 | if (res.status === 1) { |
69 | this.productName = res.content[0].name; | 69 | this.productName = res.content[0].name; |
70 | // console.log(" res.contentSSSSSBBBBB", res.content); | ||
70 | this.$store.dispatch("products/setData", res.content[0].code); | 71 | this.$store.dispatch("products/setData", res.content[0].code); |
72 | |||
73 | sessionStorage.setItem("products", res.content[0].code) | ||
71 | } else { | 74 | } else { |
72 | this.$message.error({ message: res.message, showClose: true }); | 75 | this.$message.error({ message: res.message, showClose: true }); |
73 | } | 76 | } | ... | ... |
... | @@ -106,19 +106,18 @@ | ... | @@ -106,19 +106,18 @@ |
106 | this.getTableList(); | 106 | this.getTableList(); |
107 | }, | 107 | }, |
108 | computed: { | 108 | computed: { |
109 | ...mapGetters(["products"]), | 109 | ...mapGetters(["products"]) |
110 | }, | 110 | }, |
111 | methods: { | 111 | methods: { |
112 | // 加载表格数据 | 112 | // 加载表格数据 |
113 | getTableList () { | 113 | getTableList () { |
114 | |||
115 | const queryOptionsid = { | 114 | const queryOptionsid = { |
116 | conditionGroup: { | 115 | conditionGroup: { |
117 | queryRelation: "AND", | 116 | queryRelation: "AND", |
118 | conditions: [ | 117 | conditions: [ |
119 | { | 118 | { |
120 | property: "code", | 119 | property: "code", |
121 | value: this.products, | 120 | value: sessionStorage.getItem("products"), |
122 | operator: "EQ", | 121 | operator: "EQ", |
123 | }, | 122 | }, |
124 | ], | 123 | ], | ... | ... |
... | @@ -32,6 +32,7 @@ | ... | @@ -32,6 +32,7 @@ |
32 | import { getRolesById, getAuthorityListAction } from "@/api/authorityManage"; | 32 | import { getRolesById, getAuthorityListAction } from "@/api/authorityManage"; |
33 | import { getUserRoles } from "@/api/personnelManage"; | 33 | import { getUserRoles } from "@/api/personnelManage"; |
34 | import data from "./data"; | 34 | import data from "./data"; |
35 | import { getMenuInfo } from "@/api/user"; | ||
35 | import { api, getAction, deleteAction } from "@/api/manageApi"; | 36 | import { api, getAction, deleteAction } from "@/api/manageApi"; |
36 | import tableMixin from "@/mixins/tableMixin.js"; | 37 | import tableMixin from "@/mixins/tableMixin.js"; |
37 | import EditDialog from "./edit-dialog.vue"; | 38 | import EditDialog from "./edit-dialog.vue"; |
... | @@ -213,13 +214,13 @@ | ... | @@ -213,13 +214,13 @@ |
213 | data: [], | 214 | data: [], |
214 | } | 215 | } |
215 | }, | 216 | }, |
216 | computed: { | ||
217 | ...mapGetters(["products"]), | ||
218 | }, | ||
219 | created () { | 217 | created () { |
220 | this.getTableData(); | 218 | this.getTableData(); |
221 | this.getTableList() | 219 | this.getTableList() |
222 | }, | 220 | }, |
221 | computed: { | ||
222 | ...mapGetters(["products"]) | ||
223 | }, | ||
223 | mounted () { }, | 224 | mounted () { }, |
224 | methods: { | 225 | methods: { |
225 | // 获取角色列表 | 226 | // 获取角色列表 |
... | @@ -235,8 +236,9 @@ | ... | @@ -235,8 +236,9 @@ |
235 | Publicrole = res.content; | 236 | Publicrole = res.content; |
236 | 237 | ||
237 | this.listdata = Builtinrole.concat(Publicrole); | 238 | this.listdata = Builtinrole.concat(Publicrole); |
238 | 239 | console.log("this.listdata1", Builtinrole.concat(Publicrole)); | |
239 | this.listdata = judgeSort(this.listdata); | 240 | this.listdata = judgeSort(this.listdata); |
241 | console.log("this.listdata2", this.listdata); | ||
240 | }) | 242 | }) |
241 | .catch((e) => console.error(e)); | 243 | .catch((e) => console.error(e)); |
242 | }) | 244 | }) |
... | @@ -245,6 +247,15 @@ | ... | @@ -245,6 +247,15 @@ |
245 | 247 | ||
246 | // 获取菜单列表 | 248 | // 获取菜单列表 |
247 | getTableList () { | 249 | getTableList () { |
250 | console.log("角色走了"); | ||
251 | getMenuInfo(sessionStorage.getItem("products")).then((res) => { | ||
252 | if (res.code === 200) { | ||
253 | console.log("列表", this.products, judgeSort(res.result)); | ||
254 | this.menutablelistData = judgeSort(res.result) | ||
255 | } else { | ||
256 | this.$message.error({ message: res.message, showClose: true }) | ||
257 | } | ||
258 | }) | ||
248 | const queryOptionsid = { | 259 | const queryOptionsid = { |
249 | conditionGroup: { | 260 | conditionGroup: { |
250 | queryRelation: "AND", | 261 | queryRelation: "AND", |
... | @@ -266,41 +277,42 @@ | ... | @@ -266,41 +277,42 @@ |
266 | this.productId = res.content[0].id; | 277 | this.productId = res.content[0].id; |
267 | this.getAuthorityList(res.content[0].id, res.content[0].code) | 278 | this.getAuthorityList(res.content[0].id, res.content[0].code) |
268 | this.selectedSubsystemCode = res.content[0].code | 279 | this.selectedSubsystemCode = res.content[0].code |
269 | let queryOptions = { | 280 | // let queryOptions = { |
270 | conditionGroup: { | 281 | // conditionGroup: { |
271 | conditions: [ | 282 | // conditions: [ |
272 | { | 283 | // { |
273 | property: "productId", | 284 | // property: "productId", |
274 | value: this.productId, | 285 | // value: this.productId, |
275 | operator: "EQ", | 286 | // operator: "EQ", |
276 | }, | 287 | // }, |
277 | ], | 288 | // ], |
278 | queryRelation: "AND", | 289 | // queryRelation: "AND", |
279 | }, | 290 | // }, |
280 | orderBys: [{ property: "sort", direction: "desc" }], | 291 | // orderBys: [{ property: "sort", direction: "desc" }], |
281 | }; | 292 | // }; |
282 | if (!this.tableUrl) { | 293 | // if (!this.tableUrl) { |
283 | console.log("请设置tableUrl属性为接口地址!"); | 294 | // console.log("请设置tableUrl属性为接口地址!"); |
284 | return; | 295 | // return; |
285 | } | 296 | // } |
286 | if (this.queryOptions !== "") { | 297 | // if (this.queryOptions !== "") { |
287 | this.queryParam.queryOptions = JSON.stringify(queryOptions); | 298 | // this.queryParam.queryOptions = JSON.stringify(queryOptions); |
288 | } | 299 | // } |
289 | // 查询系统菜单 | 300 | // 查询系统菜单 |
290 | getAction(this.tableUrl, this.queryParam) | 301 | // getAction(this.tableUrl, this.queryParam) |
291 | .then((res) => { | 302 | // .then((res) => { |
292 | if (res.status === 1) { | 303 | // if (res.status === 1) { |
293 | this.loading = false; | 304 | // this.loading = false; |
294 | this.menutablelistData = res.content; | 305 | // // this.menutablelistData = res.content; |
295 | } else { | 306 | // console.log("res.content菜单", res.content); |
296 | this.$message.error({ message: res.message, showClose: true }); | 307 | // } else { |
297 | this.loading = false; | 308 | // this.$message.error({ message: res.message, showClose: true }); |
298 | } | 309 | // this.loading = false; |
299 | }) | 310 | // } |
300 | .catch((error) => { | 311 | // }) |
301 | console.log("er", error); | 312 | // .catch((error) => { |
302 | this.loading = false; | 313 | // console.log("er", error); |
303 | }); | 314 | // this.loading = false; |
315 | // }); | ||
304 | }) | 316 | }) |
305 | .catch((error) => { | 317 | .catch((error) => { |
306 | console.log("er", error); | 318 | console.log("er", error); |
... | @@ -380,7 +392,7 @@ | ... | @@ -380,7 +392,7 @@ |
380 | this.$refs.addEditDialog.menuType = this.menuType; | 392 | this.$refs.addEditDialog.menuType = this.menuType; |
381 | this.$refs.addEditDialog.roleId = value.id; | 393 | this.$refs.addEditDialog.roleId = value.id; |
382 | this.roleSort = value.sort ? value.sort : 0; | 394 | this.roleSort = value.sort ? value.sort : 0; |
383 | this.$refs.addEditDialog.dialogForm.roleType = this.products; | 395 | this.$refs.addEditDialog.dialogForm.roleType = sessionStorage.getItem("products"); |
384 | if (value.id) { | 396 | if (value.id) { |
385 | this.$refs.addEditDialog.dialogForm.roleName = value.name; | 397 | this.$refs.addEditDialog.dialogForm.roleName = value.name; |
386 | 398 | ... | ... |
... | @@ -103,16 +103,12 @@ | ... | @@ -103,16 +103,12 @@ |
103 | // 角色id | 103 | // 角色id |
104 | roleId: "", | 104 | roleId: "", |
105 | menuList: [], // 菜单列表 | 105 | menuList: [], // 菜单列表 |
106 | queryParam: {}, | ||
107 | menukey: 0, | 106 | menukey: 0, |
108 | activeName: "first", | 107 | activeName: "first", |
109 | lastuserList: [], // 人员表格数据 | 108 | lastuserList: [], // 人员表格数据 |
110 | lastMenuList: [], // 重构完成的菜单表格数据 | 109 | lastMenuList: [], // 重构完成的菜单表格数据 |
111 | usermultipleSelection: [], | 110 | usermultipleSelection: [], |
112 | // 选中菜单列表 | 111 | // 选中菜单列表 |
113 | menumultipleSelection: [], | ||
114 | tableUrl: api.menus, // 菜单接口地址 | ||
115 | meumurlid: api.subsystem,// 项目id接口地址 | ||
116 | checkArr: [], // 重构操作符列表 | 112 | checkArr: [], // 重构操作符列表 |
117 | authorityList: [], // 授权回显数组 | 113 | authorityList: [], // 授权回显数组 |
118 | checklistbor: [], | 114 | checklistbor: [], |
... | @@ -172,6 +168,7 @@ | ... | @@ -172,6 +168,7 @@ |
172 | // 获取授权主体的菜单权限 | 168 | // 获取授权主体的菜单权限 |
173 | // getMenuAuthorityList | 169 | // getMenuAuthorityList |
174 | menulist (operationList, id, Code, menutablelistData, operationCodes) { | 170 | menulist (operationList, id, Code, menutablelistData, operationCodes) { |
171 | console.log("Code", Code); | ||
175 | this.selectedSubsystemCode = Code | 172 | this.selectedSubsystemCode = Code |
176 | this.menuList = menutablelistData; | 173 | this.menuList = menutablelistData; |
177 | getRoleAuthorityList( | 174 | getRoleAuthorityList( | ... | ... |
-
Please register or sign in to post a comment