浏览代码

Merge branch 'deploy_0804' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into deploy_0804

lilei 3 年之前
父节点
当前提交
ef3243ec48

+ 1 - 1
src/components/MultiTab/MultiTab.vue

@@ -48,7 +48,7 @@ export default {
       const index = this.tabsList.indexOf(targetKey)
       if (index >= 0) {
         const row = this.pages[index]
-        if (row && row.fullPath && row.fullPath.indexOf('/list') == -1) { // 非列表页
+        if (row && row.fullPath && row.fullPath.indexOf('/list') == -1) { // 非列表页,根据当前路由路径判断是子页还是列表页
           this.$store.state.app.isNewSubTab = true
         } else {
           this.$store.state.app.isNewSubTab = false

+ 2 - 2
src/config/router.config.js

@@ -50,8 +50,8 @@ export const asyncRouterMap = [
       },
       // 新品列表
       {
-        path: '/newProduct/:onlineFalg',
-        name: 'newProduct',
+        path: '/newProduct/list/:onlineFalg',
+        name: 'newProductList',
         component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/list'),
         meta: {
           title: '新品信息',

+ 1 - 0
src/layouts/PageView.vue

@@ -133,6 +133,7 @@ export default {
       height: 100%;
       >div{
         height: 100%;
+        overflow: auto;
       }
     }
     .link {

+ 1 - 1
src/views/Home.vue

@@ -70,7 +70,7 @@ export default {
     // 查看更多产品
     seeMore () {
       this.openNewProduct = false
-      this.$router.push({ name: 'newProduct', params: { onlineFalg: this.onlineFalg } })
+      this.$router.push({ name: 'newProductList', params: { onlineFalg: this.onlineFalg } })
     },
     // 关闭弹框
     cancelProductTips () {

+ 10 - 3
src/views/productManagement/newProduct/detail.vue

@@ -3,7 +3,7 @@
     <a-page-header :ghost="false" :backIcon="false" class="newProductDetail-back">
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="newProductDetail-back-btn" href="javascript:;" @click="$router.go(-1)">
+        <a id="newProductDetail-back-btn" href="javascript:;" @click="goBack">
           <a-icon type="left" />
           返回
         </a>
@@ -57,7 +57,8 @@ export default {
   data () {
     return {
       itemId: null,
-      detailsData: null //  详情数据
+      detailsData: null, //  详情数据
+      prevPageInfo: null
     }
   },
   methods: {
@@ -71,6 +72,10 @@ export default {
           this.detailsData = null
         }
       })
+    },
+    // 返回
+    goBack () {
+      this.$router.push({ path: this.prevPageInfo && this.prevPageInfo.path, query: { closeLastOldTab: true } })
     }
   },
   mounted () {
@@ -87,7 +92,9 @@ export default {
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {})
+    next(vm => {
+      vm.prevPageInfo = from
+    })
   }
 }
 </script>

+ 3 - 3
src/views/salesManagement/salesQuery/detail.vue

@@ -93,7 +93,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 1290 }"
-		:defaultLoadData="false"
+        :defaultLoadData="false"
         bordered>
         <!-- 产品编码 -->
         <template slot="productCode" slot-scope="text, record">
@@ -215,8 +215,8 @@ export default {
   methods: {
     //  返回
     handleBack () {
-      // this.$router.push({ path: '/salesManagement/salesQuery/list', query: { closeLastOldTab: true } })
-      this.$router.go(-1)
+      this.$router.push({ path: '/salesManagement/salesQuery/list', query: { closeLastOldTab: true } }) // 为解决,销售列表=>销售详情=>其他页=>销售详情 时,点击返回列表,此时返回的是其他页的问题
+      // this.$router.go(-1)
     },
     // 编辑
     handleEdit () {