diff --git a/src/permission.js b/src/permission.js index b559eb9..affa410 100644 --- a/src/permission.js +++ b/src/permission.js @@ -18,7 +18,7 @@ router.beforeEach(async(to, from, next) => { // determine whether the user has logged in const hasToken = getToken(); // 如果是大屏展示,直接跳转至页面 - if(to.path=='/datal' || to.path=='/dataL'){ + if(to.path.toLowerCase()=='/datal' || to.path.toLowerCase()=='/datap'){ next(); return; } diff --git a/src/views/DataP/index.vue b/src/views/DataP/index.vue index 4d45cb8..fd38d59 100644 --- a/src/views/DataP/index.vue +++ b/src/views/DataP/index.vue @@ -135,10 +135,12 @@ export default { }, // 获取列表数据 getData() { - const _this = this + const _this = this; + _this.time=moment().format('YYYY-MM-DD'); + console.log('time', _this.time); getWorkorder({ workLineId:this.titleData[this.getQueryVariable('type')]?this.titleData[this.getQueryVariable('type')].workLineId:'', - date:moment().format('YYYY-MM-DD') + date:_this.time }).then(({ code, data