Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
9724faa4
authored
2022-10-18 09:13:03 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:权限
1 parent
8cd577ea
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
41 deletions
src/api/user.js
src/permission.js
src/store/modules/permission.js
src/utils/request.js
src/views/workflow/components/zc.vue
src/views/ywbl/ywsq/components/bdcql.vue
src/views/zhcx/jdcx/jdcx.vue
src/api/user.js
View file @
9724faa
...
...
@@ -2,7 +2,7 @@ import request from '@/utils/request'
export
function
getMenuInfo
()
{
return
request
({
url
:
'/
getWebMenuRole
'
,
url
:
'/
user/getUserMenus
'
,
method
:
'get'
,
})
}
\ No newline at end of file
...
...
src/permission.js
View file @
9724faa
...
...
@@ -16,16 +16,17 @@ router.beforeEach(async (to, from, next) => {
if
(
!
hasAddDict
)
{
store
.
dispatch
(
'dict/generateDic'
)
}
// if (hasAddRoute) {
// next()
// } else {
// const { result: getMenuData } = await getMenuInfo()
// const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData)
// router.addRoutes(accessRoutes)
// }
if
(
hasAddRoute
)
{
next
()
}
else
{
const
{
result
:
getMenuData
}
=
await
getMenuInfo
()
console
.
log
(
getMenuData
);
// const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData)
// router.addRoutes(accessRoutes)
next
()
}
NProgress
.
done
()
next
()
})
router
.
afterEach
(
to
=>
{
// 解决刷新页面报404问题
...
...
src/store/modules/permission.js
View file @
9724faa
...
...
@@ -25,8 +25,7 @@ const actions = {
_
.
each
(
arr1
,
i
=>
{
i
.
parentId
=
i
.
parentId
?
i
.
parentId
:
null
})
//lodash intersectionBy方法取交集,并以参数1的数据返回
let
permission_arr
=
_
.
intersectionBy
(
arr1
,
getMenuInfo
,
'id'
)
let
permission_arr
=
_
.
intersectionBy
(
arr1
,
getMenuInfo
,
'name'
)
// 将权限菜单数组转成路由树数据结构
let
permission_tree
=
array2Tree
(
permission_arr
,
null
)
commit
(
'SET_ROUTES'
,
permission_tree
)
...
...
src/utils/request.js
View file @
9724faa
...
...
@@ -11,9 +11,9 @@ const service = axios.create({
withCredentials
:
true
,
//是否允许跨域
headers
:
{
'Content-Type'
:
'application/json; charset=utf-8'
,
'Authorization'
:
'bearer AT-16-oqkOHiUSsDdFA-eAZ49k2rJQDTzQpClO'
//
'Authorization': 'bearer AT-16-oqkOHiUSsDdFA-eAZ49k2rJQDTzQpClO'
//token列表
//admin:bearer AT-16-oqkOHiUSsDdFA-eAZ49k2rJQDTzQpClO
'Authorization'
:
'bearer AT-12-eRKHta5I8ZWftIU86sSyJ8rUkPhMvMJU'
//renc:bearer AT-30-KHB4LXc8-CZXwBEyaFJa9lRmMTc5sHVI
//tianh:bearer AT-33-3zFTGkhQ4eUv4nXvzAmbgN5RPZppzEY6
//zhangh:bearer AT-7-Tx8dlZH0LNRc33UjD1CX1xwa-1D7kQmQ
...
...
src/views/workflow/components/zc.vue
View file @
9724faa
<
template
>
<dialogBox
title=
"转出"
@
submitForm=
"submitForm"
saveButton=
"确认转出"
width=
"45%"
height=
'30%'
@
closeDialog=
"closeDialog"
v-model=
"value"
>
<dialogBox
title=
"转出"
@
submitForm=
"submitForm"
saveButton=
"确认转出"
width=
"45%"
height=
'30%'
@
closeDialog=
"closeDialog"
v-model=
"value"
>
<div
class=
"from-clues"
>
<!-- 表单部分 -->
<div
class=
"from-clues-header"
>
...
...
@@ -11,7 +11,7 @@
<el-form-item
label=
"下一环节办理人:"
>
{{
this
.
usernames
}}
</el-form-item>
</el-form>
</div>
</div>
...
...
@@ -19,13 +19,13 @@
</
template
>
<
script
>
import
{
completeTask
,
getNextLinkInfo
}
from
"@/api/fqsq.js"
import
{
completeTask
,
getNextLinkInfo
}
from
"@/api/fqsq.js"
export
default
{
components
:
{
},
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
queryForm
:
{
type
:
Object
,
default
:
false
}
queryForm
:
{
type
:
Object
,
default
:
false
}
},
data
()
{
return
{
...
...
@@ -34,26 +34,25 @@ export default {
}
},
methods
:
{
tablelistFn
(){
tablelistFn
()
{
getNextLinkInfo
(
this
.
queryForm
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
tableData
=
res
.
result
if
(
res
.
result
.
usernames
)
{
this
.
usernames
=
String
(
res
.
result
.
usernames
)
}
this
.
tableData
=
res
.
result
if
(
res
.
result
.
usernames
)
{
this
.
usernames
=
String
(
res
.
result
.
usernames
)
}
}
})
},
submitForm
()
{
completeTask
(
this
.
queryForm
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'转件成功'
)
setTimeout
(()
=>
{
window
.
opener
=
null
;
window
.
open
(
"about:blank"
,
"_self"
);
window
.
close
();
this
.
$emit
(
'input'
,
false
)
window
.
open
(
"about:blank"
,
"_self"
);
window
.
close
();
this
.
$emit
(
'input'
,
false
)
},
1000
);
}
})
...
...
@@ -66,5 +65,4 @@ export default {
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
</
style
>
...
...
src/views/ywbl/ywsq/components/bdcql.vue
View file @
9724faa
...
...
@@ -89,7 +89,6 @@ export default {
this
.
queryForm
.
sqywbm
=
this
.
djywbm
;
selectQlxx
({
...
this
.
queryForm
,
...
this
.
pageData
})
.
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
===
200
)
{
let
{
total
,
records
}
=
res
.
result
;
this
.
tableData
.
total
=
total
;
...
...
src/views/zhcx/jdcx/jdcx.vue
View file @
9724faa
...
...
@@ -92,31 +92,30 @@ export default {
fetchData
()
{
getJdcxBysearch
({
...
this
.
queryForm
,
...
this
.
pageData
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
console
.
log
(
res
)
let
{
total
,
records
}
=
res
.
result
let
str
=
''
records
.
forEach
(
item
=>
{
if
(
item
.
userNameList
.
length
!=
0
)
{
str
=
String
(
item
.
userNameList
)
item
.
blStatus
=
item
.
zbhj
+
'('
+
str
.
replace
(
/,/g
,
"+"
)
+
')'
records
.
forEach
(
item
=>
{
if
(
item
.
userNameList
.
length
!=
0
)
{
str
=
String
(
item
.
userNameList
)
item
.
blStatus
=
item
.
zbhj
+
'('
+
str
.
replace
(
/,/g
,
"+"
)
+
')'
}
if
(
item
.
qlrmc
.
length
!=
0
)
{
item
.
qlrmcStr
=
String
(
item
.
qlrmc
)
if
(
item
.
qlrmc
.
length
!=
0
)
{
item
.
qlrmcStr
=
String
(
item
.
qlrmc
)
}
if
(
item
.
ywrmc
.
length
!=
0
)
{
item
.
ywrmcStr
=
String
(
item
.
ywrmc
)
if
(
item
.
ywrmc
.
length
!=
0
)
{
item
.
ywrmcStr
=
String
(
item
.
ywrmc
)
}
})
this
.
pageData
.
total
=
total
;
this
.
tableData
.
data
=
records
}
})
},
},
handleSort
(
name
,
sort
)
{
console
.
log
(
name
,
sort
);
},
openDialog
(
item
)
{
const
{
href
}
=
this
.
$router
.
resolve
(
'/workFrameView?bsmSlsq='
+
item
.
bsmSlsq
+
'&bestepid='
+
item
.
bestepid
+
'&bsmBusiness='
+
item
.
bsmBusiness
+
'&viewtype=3'
)
const
{
href
}
=
this
.
$router
.
resolve
(
'/workFrameView?bsmSlsq='
+
item
.
bsmSlsq
+
'&bestepid='
+
item
.
bestepid
+
'&bsmBusiness='
+
item
.
bsmBusiness
+
'&viewtype=3'
)
window
.
open
(
href
,
'_blank'
);
}
}
...
...
Please
register
or
sign in
to post a comment