style:权限
Showing
7 changed files
with
37 additions
and
41 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 | // const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData) | 23 | console.log(getMenuData); |
24 | // router.addRoutes(accessRoutes) | 24 | // const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData) |
25 | // } | 25 | // router.addRoutes(accessRoutes) |
26 | 26 | next() | |
27 | } | ||
27 | NProgress.done() | 28 | NProgress.done() |
28 | next() | 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"> |
... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
11 | <el-form-item label="下一环节办理人:"> | 11 | <el-form-item label="下一环节办理人:"> |
12 | {{this.usernames}} | 12 | {{this.usernames}} |
13 | </el-form-item> | 13 | </el-form-item> |
14 | 14 | ||
15 | </el-form> | 15 | </el-form> |
16 | </div> | 16 | </div> |
17 | </div> | 17 | </div> |
... | @@ -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,26 +34,25 @@ export default { | ... | @@ -34,26 +34,25 @@ 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 | } |
45 | }) | 45 | }) |
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(() => { |
53 | window.opener = null; | 52 | window.opener = null; |
54 | window.open("about:blank", "_self"); | 53 | window.open("about:blank", "_self"); |
55 | window.close(); | 54 | window.close(); |
56 | this.$emit('input', false) | 55 | this.$emit('input', false) |
57 | }, 1000); | 56 | }, 1000); |
58 | } | 57 | } |
59 | }) | 58 | }) |
... | @@ -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,31 +92,30 @@ export default { | ... | @@ -92,31 +92,30 @@ 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 | }) |
110 | this.pageData.total = total; | 109 | this.pageData.total = total; |
111 | this.tableData.data = records | 110 | this.tableData.data = records |
112 | } | 111 | } |
113 | }) | 112 | }) |
114 | }, | 113 | }, |
115 | handleSort (name, sort) { | 114 | handleSort (name, sort) { |
116 | console.log(name, sort); | 115 | console.log(name, sort); |
117 | }, | 116 | }, |
118 | openDialog (item) { | 117 | openDialog (item) { |
119 | const { href } = this.$router.resolve('/workFrameView?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + item.bsmBusiness + '&viewtype=3') | 118 | const { href } = this.$router.resolve('/workFrameView?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + item.bsmBusiness + '&viewtype=3') |
120 | window.open(href, '_blank'); | 119 | window.open(href, '_blank'); |
121 | } | 120 | } |
122 | } | 121 | } | ... | ... |
-
Please register or sign in to post a comment