style:权限
Showing
7 changed files
with
23 additions
and
27 deletions
... | @@ -2,7 +2,7 @@ import request from '@/utils/request' | ... | @@ -2,7 +2,7 @@ import request from '@/utils/request' |
2 | 2 | ||
3 | export function getMenuInfo () { | 3 | export function getMenuInfo () { |
4 | return request({ | 4 | return request({ |
5 | url: '/getWebMenuRole', | 5 | url: '/user/getUserMenus', |
6 | method: 'get', | 6 | method: 'get', |
7 | }) | 7 | }) |
8 | } | 8 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -16,16 +16,17 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -16,16 +16,17 @@ router.beforeEach(async (to, from, next) => { |
16 | if (!hasAddDict) { | 16 | if (!hasAddDict) { |
17 | store.dispatch('dict/generateDic') | 17 | store.dispatch('dict/generateDic') |
18 | } | 18 | } |
19 | // if (hasAddRoute) { | 19 | if (hasAddRoute) { |
20 | // next() | 20 | next() |
21 | // } else { | 21 | } else { |
22 | // const { result: getMenuData } = await getMenuInfo() | 22 | const { result: getMenuData } = await getMenuInfo() |
23 | console.log(getMenuData); | ||
23 | // const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData) | 24 | // const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData) |
24 | // router.addRoutes(accessRoutes) | 25 | // router.addRoutes(accessRoutes) |
25 | // } | ||
26 | |||
27 | NProgress.done() | ||
28 | next() | 26 | next() |
27 | } | ||
28 | NProgress.done() | ||
29 | |||
29 | }) | 30 | }) |
30 | router.afterEach(to => { | 31 | router.afterEach(to => { |
31 | // 解决刷新页面报404问题 | 32 | // 解决刷新页面报404问题 | ... | ... |
... | @@ -25,8 +25,7 @@ const actions = { | ... | @@ -25,8 +25,7 @@ const actions = { |
25 | _.each(arr1, i => { | 25 | _.each(arr1, i => { |
26 | i.parentId = i.parentId ? i.parentId : null | 26 | i.parentId = i.parentId ? i.parentId : null |
27 | }) | 27 | }) |
28 | //lodash intersectionBy方法取交集,并以参数1的数据返回 | 28 | let permission_arr = _.intersectionBy(arr1, getMenuInfo, 'name') |
29 | let permission_arr = _.intersectionBy(arr1, getMenuInfo, 'id') | ||
30 | // 将权限菜单数组转成路由树数据结构 | 29 | // 将权限菜单数组转成路由树数据结构 |
31 | let permission_tree = array2Tree(permission_arr, null) | 30 | let permission_tree = array2Tree(permission_arr, null) |
32 | commit('SET_ROUTES', permission_tree) | 31 | commit('SET_ROUTES', permission_tree) | ... | ... |
... | @@ -11,9 +11,9 @@ const service = axios.create({ | ... | @@ -11,9 +11,9 @@ const service = axios.create({ |
11 | withCredentials: true, //是否允许跨域 | 11 | withCredentials: true, //是否允许跨域 |
12 | headers: { | 12 | headers: { |
13 | 'Content-Type': 'application/json; charset=utf-8', | 13 | 'Content-Type': 'application/json; charset=utf-8', |
14 | 'Authorization': 'bearer AT-16-oqkOHiUSsDdFA-eAZ49k2rJQDTzQpClO' | 14 | // 'Authorization': 'bearer AT-16-oqkOHiUSsDdFA-eAZ49k2rJQDTzQpClO' |
15 | //token列表 | 15 | //token列表 |
16 | //admin:bearer AT-16-oqkOHiUSsDdFA-eAZ49k2rJQDTzQpClO | 16 | 'Authorization': 'bearer AT-12-eRKHta5I8ZWftIU86sSyJ8rUkPhMvMJU' |
17 | //renc:bearer AT-30-KHB4LXc8-CZXwBEyaFJa9lRmMTc5sHVI | 17 | //renc:bearer AT-30-KHB4LXc8-CZXwBEyaFJa9lRmMTc5sHVI |
18 | //tianh:bearer AT-33-3zFTGkhQ4eUv4nXvzAmbgN5RPZppzEY6 | 18 | //tianh:bearer AT-33-3zFTGkhQ4eUv4nXvzAmbgN5RPZppzEY6 |
19 | //zhangh:bearer AT-7-Tx8dlZH0LNRc33UjD1CX1xwa-1D7kQmQ | 19 | //zhangh:bearer AT-7-Tx8dlZH0LNRc33UjD1CX1xwa-1D7kQmQ | ... | ... |
1 | <template> | 1 | <template> |
2 | <dialogBox title="转出" @submitForm="submitForm" saveButton="确认转出" width="45%" | 2 | <dialogBox title="转出" @submitForm="submitForm" saveButton="确认转出" width="45%" height='30%' @closeDialog="closeDialog" |
3 | height='30%' @closeDialog="closeDialog" v-model="value"> | 3 | v-model="value"> |
4 | <div class="from-clues"> | 4 | <div class="from-clues"> |
5 | <!-- 表单部分 --> | 5 | <!-- 表单部分 --> |
6 | <div class="from-clues-header"> | 6 | <div class="from-clues-header"> |
... | @@ -19,13 +19,13 @@ | ... | @@ -19,13 +19,13 @@ |
19 | </template> | 19 | </template> |
20 | 20 | ||
21 | <script> | 21 | <script> |
22 | import { completeTask ,getNextLinkInfo} from "@/api/fqsq.js" | 22 | import { completeTask, getNextLinkInfo } from "@/api/fqsq.js" |
23 | export default { | 23 | export default { |
24 | components: { | 24 | components: { |
25 | }, | 25 | }, |
26 | props: { | 26 | props: { |
27 | value: { type: Boolean, default: false }, | 27 | value: { type: Boolean, default: false }, |
28 | queryForm:{type:Object,default:false} | 28 | queryForm: { type: Object, default: false } |
29 | }, | 29 | }, |
30 | data () { | 30 | data () { |
31 | return { | 31 | return { |
... | @@ -34,11 +34,11 @@ export default { | ... | @@ -34,11 +34,11 @@ export default { |
34 | } | 34 | } |
35 | }, | 35 | }, |
36 | methods: { | 36 | methods: { |
37 | tablelistFn(){ | 37 | tablelistFn () { |
38 | getNextLinkInfo(this.queryForm).then(res => { | 38 | getNextLinkInfo(this.queryForm).then(res => { |
39 | if (res.code === 200) { | 39 | if (res.code === 200) { |
40 | this.tableData = res.result | 40 | this.tableData = res.result |
41 | if(res.result.usernames){ | 41 | if (res.result.usernames) { |
42 | this.usernames = String(res.result.usernames) | 42 | this.usernames = String(res.result.usernames) |
43 | } | 43 | } |
44 | } | 44 | } |
... | @@ -46,7 +46,6 @@ export default { | ... | @@ -46,7 +46,6 @@ export default { |
46 | }, | 46 | }, |
47 | submitForm () { | 47 | submitForm () { |
48 | completeTask(this.queryForm).then(res => { | 48 | completeTask(this.queryForm).then(res => { |
49 | console.log(res) | ||
50 | if (res.code === 200) { | 49 | if (res.code === 200) { |
51 | this.$message.success('转件成功') | 50 | this.$message.success('转件成功') |
52 | setTimeout(() => { | 51 | setTimeout(() => { |
... | @@ -66,5 +65,4 @@ export default { | ... | @@ -66,5 +65,4 @@ export default { |
66 | </script> | 65 | </script> |
67 | <style scoped lang="scss"> | 66 | <style scoped lang="scss"> |
68 | @import "~@/styles/mixin.scss"; | 67 | @import "~@/styles/mixin.scss"; |
69 | |||
70 | </style> | 68 | </style> | ... | ... |
... | @@ -89,7 +89,6 @@ export default { | ... | @@ -89,7 +89,6 @@ export default { |
89 | this.queryForm.sqywbm = this.djywbm; | 89 | this.queryForm.sqywbm = this.djywbm; |
90 | selectQlxx({ ...this.queryForm, ...this.pageData }) | 90 | selectQlxx({ ...this.queryForm, ...this.pageData }) |
91 | .then((res) => { | 91 | .then((res) => { |
92 | console.log(res); | ||
93 | if (res.code === 200) { | 92 | if (res.code === 200) { |
94 | let { total, records } = res.result; | 93 | let { total, records } = res.result; |
95 | this.tableData.total = total; | 94 | this.tableData.total = total; | ... | ... |
... | @@ -92,18 +92,17 @@ export default { | ... | @@ -92,18 +92,17 @@ export default { |
92 | fetchData () { | 92 | fetchData () { |
93 | getJdcxBysearch({ ...this.queryForm, ...this.pageData }).then(res => { | 93 | getJdcxBysearch({ ...this.queryForm, ...this.pageData }).then(res => { |
94 | if (res.code === 200) { | 94 | if (res.code === 200) { |
95 | console.log(res) | ||
96 | let { total, records } = res.result | 95 | let { total, records } = res.result |
97 | let str = '' | 96 | let str = '' |
98 | records.forEach(item=>{ | 97 | records.forEach(item => { |
99 | if(item.userNameList.length!=0){ | 98 | if (item.userNameList.length != 0) { |
100 | str = String(item.userNameList) | 99 | str = String(item.userNameList) |
101 | item.blStatus = item.zbhj + '('+ str.replace(/,/g,"+") + ')' | 100 | item.blStatus = item.zbhj + '(' + str.replace(/,/g, "+") + ')' |
102 | } | 101 | } |
103 | if(item.qlrmc.length!=0){ | 102 | if (item.qlrmc.length != 0) { |
104 | item.qlrmcStr = String(item.qlrmc) | 103 | item.qlrmcStr = String(item.qlrmc) |
105 | } | 104 | } |
106 | if(item.ywrmc.length!=0){ | 105 | if (item.ywrmc.length != 0) { |
107 | item.ywrmcStr = String(item.ywrmc) | 106 | item.ywrmcStr = String(item.ywrmc) |
108 | } | 107 | } |
109 | }) | 108 | }) | ... | ... |
-
Please register or sign in to post a comment