浏览代码

v1.4.6版本

lincl 2 年之前
父节点
当前提交
cb1848c5e6
共有 2 个文件被更改,包括 26 次插入1 次删除
  1. 25 0
      mini-pro-web/src/router/index.js
  2. 1 1
      mini-pro-web/src/views/order/list.vue

+ 25 - 0
mini-pro-web/src/router/index.js

@ -100,6 +100,31 @@ const whiteList = [
const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    scrollBehavior (to, from, savedPosition) {
        if(to.meta.savedPosition ) { //&& isKeepAlive(to)
            let count = 0
            let timmer = setInterval(() => {
                if(count > 2) {
                    window.scrollTo(0 , to.meta.savedPosition)
                    window.clearInterval(timmer)
                    timmer = null
                    return 
                }
                count++ 
                window.scrollTo(0 , to.meta.savedPosition)
            }, 300)
        } else {
            // window.scrollTo(0 , 0)
        }
        if (savedPosition) {
            return savedPosition
        } else {
            // if (isKeepAlive(from)) {
                from.meta.savedPosition = (document.documentElement|| document.body).scrollTop
            // }
            return { x: 0, y: to.meta.savedPosition || 0 }
        }
    },
    routes: routes.concat( personal, order, replenishment, device, machine )
})

+ 1 - 1
mini-pro-web/src/views/order/list.vue

@ -76,7 +76,7 @@
                        <div class="box-flex-1 fs-14">订单编号:{{item.prescribeNum}}</div>
                        <div v-if="item.sellState==1" class="c-17b3ec">{{item.sellStateName}}</div>
                        <div v-else class="" >{{item.sellStateName}}</div>
                        <div>-<span class="c-17b3ec" v-if="item.reviewerState==1">审核通过</span><span class="c-ff5e6c" v-else-if="item.reviewerState==-1">审核不通过</span><span class="c-ff5e6c" v-else-if="item.reviewerState==-2">取消审方</span><span v-else>未审方</span></div>
                        <!-- <div>-<span class="c-17b3ec" v-if="item.reviewerState==1">审核通过</span><span class="c-ff5e6c" v-else-if="item.reviewerState==-1">审核不通过</span><span class="c-ff5e6c" v-else-if="item.reviewerState==-2">取消审方</span><span v-else>未审方</span></div> -->
                    </div>
                    <div class="lh20 ptb10">
                        <div>来源机构:{{item.community}}</div>