9724faa4 by 任超

style:权限

1 parent 8cd577ea
......@@ -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
......
......@@ -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()
if (hasAddRoute) {
next()
} else {
const { result: getMenuData } = await getMenuInfo()
console.log(getMenuData);
// const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData)
// router.addRoutes(accessRoutes)
// }
NProgress.done()
next()
}
NProgress.done()
})
router.afterEach(to => {
// 解决刷新页面报404问题
......
......@@ -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)
......
......@@ -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
......
<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">
......@@ -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,11 +34,11 @@ export default {
}
},
methods: {
tablelistFn(){
tablelistFn () {
getNextLinkInfo(this.queryForm).then(res => {
if (res.code === 200) {
this.tableData = res.result
if(res.result.usernames){
if (res.result.usernames) {
this.usernames = String(res.result.usernames)
}
}
......@@ -46,7 +46,6 @@ export default {
},
submitForm () {
completeTask(this.queryForm).then(res => {
console.log(res)
if (res.code === 200) {
this.$message.success('转件成功')
setTimeout(() => {
......@@ -66,5 +65,4 @@ export default {
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
</style>
......
......@@ -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;
......
......@@ -92,18 +92,17 @@ 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){
records.forEach(item => {
if (item.userNameList.length != 0) {
str = String(item.userNameList)
item.blStatus = item.zbhj + '('+ str.replace(/,/g,"+") + ')'
item.blStatus = item.zbhj + '(' + str.replace(/,/g, "+") + ')'
}
if(item.qlrmc.length!=0){
if (item.qlrmc.length != 0) {
item.qlrmcStr = String(item.qlrmc)
}
if(item.ywrmc.length!=0){
if (item.ywrmc.length != 0) {
item.ywrmcStr = String(item.ywrmc)
}
})
......