Commit 1bf6865d by 无尘

fix: 测试 刷新

parent c10af185
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-11-09 10:05:27
* @LastEditors: 无尘
* @LastEditTime: 2020-11-09 10:26:18
* @LastEditTime: 2020-12-02 09:06:36
-->
<!-- -->
<template>
......@@ -245,7 +245,7 @@ export default {
const { tab, applicationId } = this.$route.query;
this.activeName = tab !== 'undefined' && tab ? tab : '0';
this.applicationId = applicationId;
const { staffId, wxEnterpriseId } = JSON.parse(localStorage.getItem('haoBanUser'));
const { staffId, wxEnterpriseId } = localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')) : { staffName: '', staffId: '', wxEnterpriseId: '' };
this.haoban = { staffId, wxEnterpriseId };
},
// 生命周期 - 挂载完成(访问DOM元素)
......@@ -416,6 +416,8 @@ export default {
},
watch: {
brandId(val) {
const { staffId, wxEnterpriseId } = localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')) : { staffName: '', staffId: '', wxEnterpriseId: '' };
this.haoban = { staffId, wxEnterpriseId };
val && this.getData();
}
},
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-11-09 09:36:51
* @LastEditors: 无尘
* @LastEditTime: 2020-11-09 10:31:17
* @LastEditTime: 2020-12-02 09:07:12
-->
<template>
......@@ -76,7 +76,7 @@ export default {
const { tab, applicationId } = this.$route.query;
this.applicationId = applicationId;
this.activeName = tab || '1';
const { staffId, wxEnterpriseId } = JSON.parse(localStorage.getItem('haoBanUser'));
const { staffId, wxEnterpriseId } = localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')) : { staffName: '', staffId: '', wxEnterpriseId: '' };
this.haoban = { staffId, wxEnterpriseId };
},
// 生命周期 - 挂载完成(访问DOM元素)
......@@ -125,6 +125,8 @@ export default {
watch: {
brandId(val) {
const that = this;
const { staffId, wxEnterpriseId } = localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')) : { staffName: '', staffId: '', wxEnterpriseId: '' };
that.haoban = { staffId, wxEnterpriseId };
if (val) {
that.getData();
}
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-11-09 10:39:37
* @LastEditors: 无尘
* @LastEditTime: 2020-12-01 10:41:10
* @LastEditTime: 2020-12-02 09:08:34
-->
<template>
<div class="common-app-right">
......@@ -243,7 +243,7 @@ export default {
const { tab, applicationId, performanceYm } = this.$route.query;
this.activeName = tab || '0';
this.applicationId = applicationId;
const { staffId, wxEnterpriseId } = JSON.parse(localStorage.getItem('haoBanUser'));
const { staffId, wxEnterpriseId } = localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')) : { staffName: '', staffId: '', wxEnterpriseId: '' };
this.haoban = { staffId, wxEnterpriseId, performanceType: tab, performanceYm };
// 修改面包屑
......@@ -360,6 +360,11 @@ export default {
},
watch: {
brandId(val) {
const { tab, applicationId, performanceYm } = this.$route.query;
this.activeName = tab || '0';
this.applicationId = applicationId;
const { staffId, wxEnterpriseId } = localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')) : { staffName: '', staffId: '', wxEnterpriseId: '' };
this.haoban = { staffId, wxEnterpriseId, performanceType: tab, performanceYm };
val && this.getData();
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment