页面权限
This commit is contained in:
@@ -56,19 +56,22 @@ router.beforeEach((to, from, next) => {
|
||||
isRelogin.show = true
|
||||
// 获取字典数据 add by 芋艿
|
||||
store.dispatch('dict/loadDictDatas')
|
||||
// 获取部门权限
|
||||
store.dispatch('GetLevel')
|
||||
// 判断当前用户是否已拉取完 user_info 信息
|
||||
store.dispatch('GetInfo').then(userInfo => {
|
||||
isRelogin.show = false
|
||||
// 触发 GenerateRoutes 事件时,将 menus 菜单树传递进去
|
||||
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
|
||||
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
|
||||
// 根据 roles 权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||
const defaultPath = findDefaultPathFromMenus(userInfo.menus) || '/'
|
||||
store.commit('permission/SET_DEFAULT_PATH', defaultPath)
|
||||
if (to.path === '/' || to.matched.length === 0) {
|
||||
// 仅当目标为根路径 '/' 时跳默认页;否则保持当前路径(含刷新场景),避免刷新被误判为“未匹配”而跳到默认页
|
||||
if (to.path === '/') {
|
||||
next({ path: defaultPath, replace: true })
|
||||
} else {
|
||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成,当前页刷新时保留 to 的路径
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
|
||||
@@ -64,13 +64,13 @@ export const constantRoutes = [
|
||||
component: (resolve) => require(["@/views/error/401"], resolve),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: "/",
|
||||
// component: () => import('@/views/choicePart'),
|
||||
component: () => import("@/views/home"),
|
||||
hidden: true,
|
||||
meta: { requireToken: true },
|
||||
},
|
||||
// {
|
||||
// path: "/",
|
||||
// // component: () => import('@/views/choicePart'),
|
||||
// component: () => import("@/views/home"),
|
||||
// hidden: true,
|
||||
// meta: { requireToken: true },
|
||||
// },
|
||||
// {
|
||||
// path: "/operatingRevenue",
|
||||
// // component: () => import('@/views/choicePart'),
|
||||
|
||||
@@ -19,6 +19,8 @@ const getters = {
|
||||
sidebarRouters:state => state.permission.sidebarRouters,
|
||||
defaultPath: state => state.permission.defaultPath,
|
||||
// 数据字典
|
||||
dict_datas: state => state.dict.dictDatas
|
||||
dict_datas: state => state.dict.dictDatas,
|
||||
// 部门层级
|
||||
levelList: state => state.user.levelList
|
||||
}
|
||||
export default getters
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {login, logout, getInfo, socialLogin, smsLogin} from '@/api/login'
|
||||
import {setToken, removeToken} from '@/utils/auth'
|
||||
import {getLevelStruc} from '@/api/cockpit'
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
@@ -7,7 +8,8 @@ const user = {
|
||||
name: '',
|
||||
avatar: '',
|
||||
roles: [],
|
||||
permissions: []
|
||||
permissions: [],
|
||||
levelList:[]
|
||||
},
|
||||
|
||||
mutations: {
|
||||
@@ -28,6 +30,9 @@ const user = {
|
||||
},
|
||||
SET_PERMISSIONS: (state, permissions) => {
|
||||
state.permissions = permissions
|
||||
},
|
||||
SET_LEVEL_LIST: (state, levelList) => {
|
||||
state.levelList = levelList
|
||||
}
|
||||
},
|
||||
|
||||
@@ -122,7 +127,21 @@ const user = {
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 获取层级
|
||||
GetLevel({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getLevelStruc().then(res => {
|
||||
// 如果未加载到数据,则直接返回
|
||||
if (!res || !res.data) {
|
||||
return;
|
||||
}
|
||||
commit('SET_LEVEL_LIST', res.data)
|
||||
resolve()
|
||||
})
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
},
|
||||
// 退出系统
|
||||
LogOut({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="changeBase">
|
||||
<div class="base-item" @click="handleClick(index)" v-for="(item, index) in buttonList" :key="item"
|
||||
:style="{ zIndex: activeButton === index ? 10 : 1 }">
|
||||
<img :src="activeButton === index ? imgMap.bgBase[item] : imgMap.base[item]" :alt="`${item}基地`" :title="item">
|
||||
<div class="base-item" @click="handleClick(item.id)" v-for="(item) in buttonLevelList" :key="item.id"
|
||||
:style="{ zIndex: activeButton === item.id ? 10 : 1 }">
|
||||
<img :src="activeButton === item.id ? item.bgImg : item.img" :alt="`${item.name}基地`" :title="item.name">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -33,80 +33,69 @@ export default {
|
||||
props: {
|
||||
factory: {
|
||||
type: [String, Number],
|
||||
default: 5, // 新映射中“宜兴”对应序号7
|
||||
validator: (val) => [5, 2, 7, 3, 8, 9, 10].includes(val) // 校验序号范围(匹配新的baseNameToIndexMap)
|
||||
default: undefined,
|
||||
validator: (val) => [5, 2, 7, 3, 8, 9, 10, 6].includes(val) // 校验序号范围(匹配新的baseNameToIndexMap)
|
||||
}
|
||||
},
|
||||
// 计算属性(响应式,levelList变化时会自动更新)
|
||||
computed: {
|
||||
buttonLevelList() {
|
||||
// 核心:通过$store.getters获取定义的getter
|
||||
let arr = []
|
||||
this.$store.getters.levelList.forEach(item => {
|
||||
this.buttonList.forEach(item2 => {
|
||||
if (item2.id === item.id) {
|
||||
arr.push(item2)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.activeButton = arr[0].id
|
||||
return arr
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeButton: 5, // 初始化默认选中索引2(对应buttonList中的“宜兴”)
|
||||
buttonList: ['合肥', '桐城', '宜兴', '自贡', '漳州', '洛阳', '秦皇岛', '宿迁'], // 匹配截图顺序
|
||||
imgMap: {
|
||||
base: {
|
||||
合肥: baseHefei,
|
||||
桐城: baseTongcheng,
|
||||
宜兴: baseYixing,
|
||||
自贡: baseZigong,
|
||||
漳州: baseZhangzhou,
|
||||
洛阳: baseLuoyang,
|
||||
秦皇岛: baseQinhuangdao,
|
||||
宿迁: baseSuqian
|
||||
},
|
||||
bgBase: {
|
||||
合肥: bgBaseHefei,
|
||||
桐城: bgBaseTongcheng,
|
||||
宜兴: bgBaseYixing,
|
||||
自贡: bgBaseZigong,
|
||||
漳州: bgBaseZhangzhou,
|
||||
洛阳: bgBaseLuoyang,
|
||||
秦皇岛: bgBaseQinhuangdao,
|
||||
宿迁: bgBaseSuqian
|
||||
}
|
||||
},
|
||||
baseNameToIndexMap: { // 新的名称→序号映射
|
||||
宜兴: 7,
|
||||
漳州: 8,
|
||||
自贡: 3,
|
||||
桐城: 2,
|
||||
洛阳: 9,
|
||||
合肥: 5,
|
||||
秦皇岛: 10, // 补充
|
||||
宿迁: 6 // 补充
|
||||
}
|
||||
activeButton: undefined,
|
||||
buttonList:[
|
||||
{id: 5, name: '合肥', img: baseHefei, bgImg: bgBaseHefei},
|
||||
{id: 2, name: '桐城', img: baseTongcheng, bgImg: bgBaseTongcheng},
|
||||
{id: 7, name: '宜兴', img: baseYixing, bgImg: bgBaseYixing},
|
||||
{id: 3, name: '自贡', img: baseZigong, bgImg: bgBaseZigong},
|
||||
{id: 8, name: '漳州', img: baseZhangzhou, bgImg: bgBaseZhangzhou},
|
||||
{id: 9, name: '洛阳', img: baseLuoyang, bgImg: bgBaseLuoyang},
|
||||
{id: 10, name: '秦皇岛', img: baseQinhuangdao, bgImg: bgBaseQinhuangdao},
|
||||
{id: 6, name: '宿迁', img: baseSuqian, bgImg: bgBaseSuqian}
|
||||
],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听父组件传递的factory变化,同步本地选中索引
|
||||
factory: {
|
||||
handler(newVal) {
|
||||
// 根据新的baseNameToIndexMap,找到对应的基地名称
|
||||
const targetName = Object.keys(this.baseNameToIndexMap).find(name => this.baseNameToIndexMap[name] === newVal);
|
||||
// 根据名称找到buttonList中的索引
|
||||
const targetIndex = this.buttonList.indexOf(targetName);
|
||||
// 合法索引则更新,否则默认选中宜兴
|
||||
this.activeButton = targetIndex > -1 ? targetIndex : 2;
|
||||
console.log('当前选中基地:', this.buttonList[this.activeButton], '序号:', newVal);
|
||||
console.log('watch factory=======================:', newVal);
|
||||
if (newVal) {
|
||||
this.activeButton = newVal;
|
||||
}
|
||||
// // 根据新的baseNameToIndexMap,找到对应的基地名称
|
||||
// const targetName = Object.keys(this.baseNameToIndexMap).find(name => this.baseNameToIndexMap[name] === newVal);
|
||||
// // 根据名称找到buttonList中的索引
|
||||
// const targetIndex = this.buttonList.indexOf(targetName);
|
||||
// // 合法索引则更新,否则默认选中宜兴
|
||||
// this.activeButton = targetIndex > -1 ? targetIndex : 2;
|
||||
// console.log('当前选中基地:', this.buttonList[this.activeButton], '序号:', newVal);
|
||||
},
|
||||
immediate: true // 初始化立即执行
|
||||
},
|
||||
// 监听本地选中索引变化,向父组件发送事件
|
||||
activeButton(newVal) {
|
||||
const selectedName = this.buttonList[newVal];
|
||||
const selectedIndex = this.baseNameToIndexMap[selectedName] || 5; // 默认返回宜兴的序号7
|
||||
this.$emit('baseChange', selectedIndex);
|
||||
// immediate: true // 初始化立即执行
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(index) {
|
||||
this.activeButton = index;
|
||||
},
|
||||
getIndexByName(name) {
|
||||
return this.baseNameToIndexMap[name] || 5;
|
||||
handleClick(id) {
|
||||
this.activeButton = id;
|
||||
this.$emit('baseChange', id);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 初始化时触发事件,传递默认选中的宜兴序号(7)
|
||||
this.$emit('baseChange', 5);
|
||||
// this.$emit('baseChange', 5);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -114,6 +114,7 @@ export default {
|
||||
monthAnalysis: [],
|
||||
ytdAnalysis: [],
|
||||
trend: [],
|
||||
factory:null
|
||||
};
|
||||
},
|
||||
|
||||
@@ -185,7 +186,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -89,7 +89,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
this.$router.push({
|
||||
path: 'expenseAnalysisBase',
|
||||
query: { // 使用query传递参数(推荐),也可使用params
|
||||
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -174,7 +174,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -91,7 +91,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
path: 'fullCostAnalysisBase',
|
||||
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
dateData:{},
|
||||
levelId:undefined,
|
||||
index: '毛利率',
|
||||
factory: 1,
|
||||
factory: null,
|
||||
monthData: {},
|
||||
ytdData: {},
|
||||
monthAnalysis: [],
|
||||
@@ -188,7 +188,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -102,7 +102,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
path: 'grossMarginBase',
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
index: '加工成品率',
|
||||
monthData: undefined,
|
||||
@@ -184,7 +184,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -90,7 +90,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
relatedMon: {},
|
||||
@@ -178,7 +178,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -90,7 +90,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
path: 'netPriceAnalysisBase',
|
||||
|
||||
@@ -91,8 +91,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
path: 'operatingRevenueBase',
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -174,7 +174,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -91,6 +91,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
beilv: 1,
|
||||
month:'',
|
||||
value: 100,
|
||||
factory:0,
|
||||
factory:null,
|
||||
dateData:{},
|
||||
index: '营业收入',
|
||||
monthData: undefined,
|
||||
@@ -157,7 +157,7 @@ export default {
|
||||
transformOrigin: "left top",
|
||||
// overflow: hidden;
|
||||
};
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
clientWidth(val) {
|
||||
@@ -188,7 +188,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
console.log('this.$route.query.dateData', this.$route.query.dateData);
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -173,7 +173,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -92,7 +92,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -183,7 +183,13 @@ export default {
|
||||
})();
|
||||
};
|
||||
console.log(this.$route.query.name, 'name');
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -183,7 +183,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -182,7 +182,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -183,7 +183,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -166,7 +166,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
beilv: 1,
|
||||
month:'',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -184,7 +184,13 @@ export default {
|
||||
})();
|
||||
};
|
||||
console.log('this.$route.query.factory', this.$route.query.factory);
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
beilv: 1,
|
||||
month:'',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -168,6 +168,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -182,6 +182,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
timer: null,
|
||||
beilv: 1,
|
||||
month: '',
|
||||
factory: 5,
|
||||
factory: null,
|
||||
value: 100,
|
||||
dateData: {},
|
||||
trendName: '加工燃料成本',
|
||||
@@ -184,7 +184,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
beilv: 1,
|
||||
month:'',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
trendName: '加工制造费用成本',
|
||||
monData: {},
|
||||
@@ -176,7 +176,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -168,7 +168,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -185,7 +185,13 @@ export default {
|
||||
};
|
||||
console.log('this.$route.query.factory', this.$route.query.factory);
|
||||
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
beilv: 1,
|
||||
month:'',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
trendName: '加工燃料成本',
|
||||
monData: {},
|
||||
@@ -176,7 +176,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -168,7 +168,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -179,7 +179,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -182,7 +182,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -182,7 +182,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
beilv: 1,
|
||||
month:'',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -160,7 +160,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -182,7 +182,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -90,7 +90,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
|
||||
@@ -98,7 +98,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
path: this.baseUrl,
|
||||
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
index: '原片成品率',
|
||||
monthData: undefined,
|
||||
@@ -187,7 +187,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -87,7 +87,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -178,7 +178,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -178,7 +178,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
totalData: {},
|
||||
@@ -173,7 +173,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -90,7 +90,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
|
||||
@@ -175,7 +175,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -87,7 +87,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
beilv: 1,
|
||||
month: '',
|
||||
value: 100,
|
||||
factory: 5,
|
||||
factory: null,
|
||||
dateData: {},
|
||||
monData: {},
|
||||
relatedMon: {},
|
||||
@@ -182,7 +182,13 @@ export default {
|
||||
this.beilv = _this.clientWidth / 1920;
|
||||
})();
|
||||
};
|
||||
this.factory = this.$route.query.factory ? Number(this.$route.query.factory) : 5
|
||||
if(this.$route.query.factory){
|
||||
this.factory =Number(this.$route.query.factory)
|
||||
}else if(this.$store.getters.levelList.length > 0 && this.$store.getters.levelList[0].id !== 1) {
|
||||
this.factory = this.$store.getters.levelList[0].id
|
||||
}else{
|
||||
this.factory = this.$store.getters.levelList[1].id
|
||||
}
|
||||
this.dateData = this.$route.query.dateData ? this.$route.query.dateData : undefined
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -89,7 +89,9 @@ export default {
|
||||
const baseIndex = this.baseNameToIndexMap[itemName] || 0;
|
||||
|
||||
console.log(`你点击了【${itemName}】(序号:${baseIndex})`);
|
||||
|
||||
if (itemName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 路由跳转时携带序号(或名称+序号)
|
||||
this.$router.push({
|
||||
|
||||
@@ -297,7 +297,6 @@ export default {
|
||||
)
|
||||
.then(() => {
|
||||
console.log(this.redirect, this.$route.query.redirect, 'this.redirect');
|
||||
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
Reference in New Issue
Block a user