1.修复看板问题

master
董哲奇 3 months ago
parent 4815753a24
commit 4a76f38f4c

@ -8,7 +8,10 @@ import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/menu','/login', '/auth-redirect','/kban','/sliao','/pwpg','/pwfk','/llpg','/llfk','/hxpg','/hxfk','/qgpg','/qgfk','/ljian','baogong'] // no redirect whitelist
const whiteList = ['/menu','/login', '/auth-redirect','/kban','/sliao','/pwpg','/pwfk','/llpg','/llfk','/hxpg','/hxfk','/qgpg','/qgfk','/ljian','/baogong'] // no redirect whitelist
// const whiteList = ['/menu','/login', '/auth-redirect','/kban','/ljian','/baogong']
const checkBmList=['/sliao','/pwpg','/pwfk','/llpg','/llfk','/hxpg','/hxfk','/qgpg','/qgfk']
export function flatRoutes(routes) {
let ret = [];
routes.forEach(it => {
@ -44,6 +47,13 @@ router.beforeEach(async(to, from, next) => {
} else {
// determine whether the user has obtained his permission roles through getInfo
// if (checkBmList.includes(to.path)) {
// if (to.query.zyq!==store.getters.bmbm){
// next({ path: '/' })
// return
// }
// }
const hasRoles = store.getters.roles && store.getters.roles.length > 0
if (hasRoles) {
next()

@ -0,0 +1,50 @@
<template>
<div>
<el-button v-for="(item,index) in links" @click="openPage(item.link)">
{{ item.name }}
</el-button>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: "DashboardZyjhLink",
data(){
return{
links:[],
一区:[
{name:'上料报工',link:'/#/sliao?zyq=一区&zyType=0&deviceId=122222222222'},
{name:'抛丸',link:'/#/pwpg?zyq=一区&zyType=0&deviceId=122222222222'},
],
二区:[
{name:'划线',link:'/#/hxpg?zyq=二区&zyType=0&deviceId=122222222222'},
{name:'切割',link:'/#/qgpg?zyq=二区&zyType=0&deviceId=122222222222'},
],
三区:[
{name:'划线',link:'/#/hxpg?zyq=三区&zyType=0&deviceId=122222222222'},
{name:'切割',link:'/#/qgpg?zyq=三区&zyType=0&deviceId=122222222222'},
],
四区:[
{name:'划线',link:'/#/hxpg?zyq=四区&zyType=0&deviceId=122222222222'},
{name:'切割',link:'/#/qgpg?zyq=四区&zyType=0&deviceId=122222222222'},
],
}
},
computed: {
...mapGetters(['name', 'bmbm'])
},
mounted(){
console.log(window.location)
console.log(this.name,this.bmbm)
this.links=this.$data[this.bmbm];
console.log(this.links)
},
methods:{
openPage(link){
window.location.href = window.location.origin+link;
}
}
}
</script>

@ -1,5 +1,6 @@
<template>
<div class="dashboard-editor-container" style="background-color: #f6fbff;">
<DashboardZyjhLink />
<!-- 直观图组件 -->
<!-- <Czfdzgtcx />-->
<!-- <Uni />-->
@ -28,10 +29,11 @@ import Czfdzgtcx from "@/views/dashboard/components/fd/czfdzgtcx.vue";
import Template from "@/views/dashboard/components/Template.vue";
import Content from "@/views/dashboard/components/Content.vue";
import Uni from "@/views/dashboard/components/Uni.vue";
import DashboardZyjhLink from "@/views/dashboard/components/Zyjh/index.vue";
export default {
name: 'Dashboard',
components: {Uni, Content, Template, Czfdzgtcx, PanThumb },
components: {DashboardZyjhLink, Uni, Content, Template, Czfdzgtcx, PanThumb },
data() {
return {

Loading…
Cancel
Save