diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 00584e15..2799e8b2 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -35,7 +35,7 @@ const permission = { }, actions: { // 生成路由 - GenerateRoutes({ commit }) { + GenerateRoutes({ commit,dispatch }) { return new Promise(resolve => { // 向后端请求路由数据 getRouters().then(res => { @@ -45,7 +45,14 @@ const permission = { const rewriteRoutes = filterAsyncRouter(rdata, false, true) const indexUrl=getFirstUrl(res.data) const asyncRoutes = filterDynamicRoutes(dynamicRoutes); - rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) + if(asyncRoutes.length>0){ + rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) + }else{ + // 无路由,则退出登录 + dispatch('FedLogOut', { }, { root: true }) + rewriteRoutes.push({ path: '*', redirect: '/401', hidden: true }) + } + router.addRoutes(asyncRoutes); commit('SET_ROUTES', rewriteRoutes) @@ -77,10 +84,11 @@ function getFirstUrl(data){ indexUrl=data[0].path } }else{ - indexUrl="/default" + indexUrl="/" } } + console.log(indexUrl) return indexUrl; } @@ -128,6 +136,7 @@ function filterChildren(childrenMap, lastRouter = false) { return } } + if (lastRouter) { el.path = lastRouter.path + '/' + el.path } diff --git a/src/views/emis/emisQuoteExpression/quoteExpressionPanel.vue b/src/views/emis/emisQuoteExpression/quoteExpressionPanel.vue index df4a5ab2..3bb0ca58 100644 --- a/src/views/emis/emisQuoteExpression/quoteExpressionPanel.vue +++ b/src/views/emis/emisQuoteExpression/quoteExpressionPanel.vue @@ -244,10 +244,10 @@ export default { quoteSequence: null, useSiteCode: null, useSite: null, - startWeight: '0.1', - endWeight: '1', - initialWeight: '0.5', - additionalWeight: '1', + startWeight: '0', + endWeight: '20', + initialWeight: '0', + additionalWeight: '0', conditionExpression: null, calculateExpression: '1+(w-1)*2', status: null, @@ -339,7 +339,7 @@ export default { if (this.form.id == null) { let newItem = Object.assign({}, this.form); newItem.id=-1; - console.log("000=>"+JSON.stringify(newItem)); + // console.log("000=>"+JSON.stringify(newItem)); this.emisQuoteExpressionList.push(newItem); } this.onChage(); diff --git a/src/views/emis/emisQuotePrice/emisQuotePriceForm.vue b/src/views/emis/emisQuotePrice/emisQuotePriceForm.vue index 9a1e8c0c..93c1be4b 100644 --- a/src/views/emis/emisQuotePrice/emisQuotePriceForm.vue +++ b/src/views/emis/emisQuotePrice/emisQuotePriceForm.vue @@ -384,8 +384,8 @@ export default { // 初始化寄件区域 initSendAreaList() { this.loading = true; - this.queryParams = {}; - listEmisQuoteSendArea(this.queryParams).then(response => { + let queryParams = {}; + listEmisQuoteSendArea(queryParams).then(response => { this.emisQuoteSendAreaList = response.rows; // if(this.form.sendAreaId != null){ // this.emisQuoteSendAreaList.forEach(item=>{ @@ -400,8 +400,8 @@ export default { }, initDispAreaList(){ this.loading = true; - this.queryParams = {}; - listEmisQuoteDispArea(this.queryParams).then(response => { + let queryParams = {}; + listEmisQuoteDispArea(queryParams).then(response => { this.emisQuoteDispAreaList = response.rows; // if(this.form.dispAreaId != null){ // this.emisQuoteDispAreaList.forEach(item=>{ @@ -533,7 +533,7 @@ export default { this.$refs["form"].validate(valid => { // this.form.feeType='1001'; if (valid) { - if (this.form.quoteId != null && !this.isCopy) { + if (this.form.quoteId != null) { updateEmisQuotePrice(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.$emit("on-changed"); diff --git a/src/views/emis/emisQuotePrice/index.vue b/src/views/emis/emisQuotePrice/index.vue index 649253d6..07bd039e 100644 --- a/src/views/emis/emisQuotePrice/index.vue +++ b/src/views/emis/emisQuotePrice/index.vue @@ -157,7 +157,7 @@ --> - +