diff --git a/src/assets/js/utils/getApp.js b/src/assets/js/utils/getApp.js index ba7da0d40..f65be6f70 100644 --- a/src/assets/js/utils/getApp.js +++ b/src/assets/js/utils/getApp.js @@ -1,19 +1,17 @@ import config from '@/config' export default { refreshImg() { - if (window.WebViewJavascriptBridge) { - EWebBridge.webCallAppInJs('webview_right_button', { - btns: [ - { - img: config.mainUrl + '/images/refresh.png', - route: { - flag: '', - extra: {} - } + EWebBridge.webCallAppInJs('webview_right_button', { + btns: [ + { + img: config.mainUrl + '/images/refresh.png', + route: { + flag: '', + extra: {} } - ] - }) - } + } + ] + }) }, closeBtn(that) { if (window.WebViewJavascriptBridge) { diff --git a/src/router/ebiz/institutionalPerform.js b/src/router/ebiz/institutionalPerform.js index 0f70e6bc9..d6f75f023 100644 --- a/src/router/ebiz/institutionalPerform.js +++ b/src/router/ebiz/institutionalPerform.js @@ -92,12 +92,19 @@ export default [ }, { //活动人力 - path: '/institutionalPerform/institutionalManpower', + path: '/institutionalPerform/institutionalManpower/:manageLv/:manageCode', name: 'InstitutionalManpower', component: InstitutionalManpower, meta: { title: '机构业绩', index: 1 } + // children: [ + // { + // path: '/:manageCode', + // component: InstitutionalManpower, + // name: 'InstitutionalManpower1' + // } + // ] } ] diff --git a/src/router/index.js b/src/router/index.js index a662dabd4..515c14766 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -7,6 +7,11 @@ import Ebiz from './ebiz' Vue.use(Router) +//解决路由重复的报错 +const originalPush = Router.prototype.push +Router.prototype.push = function push(location) { + return originalPush.call(this, location).catch(err => err) +} const constantRouterMap = [...App, ...Example, ...Ebiz] //后续可以删减模块 export default new Router({ diff --git a/src/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins.js b/src/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins.js index 42ab3c125..9d403d020 100644 --- a/src/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins.js +++ b/src/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/mixins.js @@ -13,9 +13,10 @@ const myMixin = { created() { var that = this console.log(this) - + setTimeout(() => { getApp.closeBtn(that) window.appCallBack = that.appCallBack + }, 400) } } export default myMixin diff --git a/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue b/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue index a7dd3a21d..8d97a9212 100644 --- a/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue +++ b/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue @@ -138,12 +138,16 @@ export default { toDetail(manageCode) { - this.manageLv = '0' + (Number(this.manageLv) + 1) - this.manageCode = manageCode - this.getlComPremDetil() - - document.querySelector('.layer').scrollTo(0, 0);//重置滚动条 - + let manageLv = '0' + (Number(this.manageLv) + 1) + // this.manageCode = manageCode + console.log(`/institutionalPerform/institutionalManpower/${manageLv}/${manageCode}`) + + this.$router.push(`/institutionalPerform/institutionalManpower/${manageLv}/${manageCode}`) ; + this.manageLv=this.$route.params.manageLv; + this.manageCode=this.$route.params.manageCode + console.log('this.manageLv',this.manageLv) + this.getlComPremDetil() + }, getCurrentDate() { @@ -225,6 +229,9 @@ export default { // setInterval(this.getCurrentDate, 1000 * 60) this.dateVal = util.getMonthLastDay() + this.manageLv=this.$route.params.manageLv; + this.manageCode=this.$route.params.manageCode + this.getlComPremDetil() } }