商家端列表页缓存

master
mabo 2021-07-31 15:49:54 +08:00
parent ad17d8b743
commit 8cec0e6ab8
30 changed files with 279 additions and 493 deletions

View File

@ -1,511 +1,313 @@
export const result = [ export const result = [{
{
name: "lili", name: "lili",
level: 0, level: 0,
type: -1, type: -1,
title: "商品", title: "商品",
path: "", path: "",
component: "", component: "",
icon: "md-home", children: [{
isMenu: true,
url: "",
description: "",
permTypes: [],
children: [
{
name: "goods-list", name: "goods-list",
level: 1, level: 1,
type: 0, type: 0,
title: "商品管理", title: "商品管理",
path: "", path: "",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "goods-operation", name: "goods-operation",
level: 2, level: 2,
type: 0, type: 0,
title: "商品发布", title: "商品发布",
path: "goods-operation", path: "goods-operation",
component: "goods-operation", component: "goods-operation",
icon: "md-person",
isMenu: true,
url: "",
children: null, children: null,
permTypes: []
}, },
{ {
name: "goods", name: "goods",
level: 2, level: 2,
type: 0, type: 0,
title: "商品列表", title: "商品列表",
path: "goods", path: "goods",
component: "goods/goods-seller/goods", component: "goods/goods-seller/goods",
icon: "md-person",
isMenu: true,
url: "",
children: null, children: null,
permTypes: []
}, },
// {
// name: "daft-goods",
//
// level: 2,
// type: 0,
// title: "草稿商品",
// path: "daft-goods",
// component: "goods/goods-seller/draftGoods",
// icon: "md-person",
// isMenu: true,
// url: "",
// children: null,
// permTypes: []
// },
{ {
path: "template-goods", path: "template-goods",
props: {type: "TEMPLATE"}, props: {
type: "TEMPLATE"
},
level: 2, level: 2,
type: 0, type: 0,
title: "商品模版", title: "商品模版",
component: "goods/goods-seller/draftGoods", component: "goods/goods-seller/draftGoods",
icon: "md-person",
isMenu: true,
url: "",
name: "template-goods", name: "template-goods",
children: null, children: null,
permTypes: []
}, },
{ {
name: "category", name: "category",
level: 2, level: 2,
type: 0, type: 0,
title: "店铺分类", title: "店铺分类",
path: "category", path: "category",
component: "goods/goods-manage/category", component: "goods/goods-manage/category",
icon: "md-person",
isMenu: true,
url: "",
children: null, children: null,
permTypes: []
}
]
} }
] ]
}]
}, },
{ {
name: "order", name: "order",
level: 0, level: 0,
type: -1, type: -1,
title: "订单", title: "订单",
path: "", path: "",
component: "", component: "",
icon: "md-home",
isMenu: true,
url: "",
description: "", description: "",
permTypes: [], children: [{
children: [
{
name: "order", name: "order",
level: 1, level: 1,
type: 0, type: 0,
title: "订单管理", title: "订单管理",
path: "/order", path: "/order",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "orderList", name: "orderList",
level: 2, level: 2,
type: 0, type: 0,
keepAlive: true,
title: "商品订单", title: "商品订单",
path: "orderList", path: "orderList",
component: "order/order/orderList", component: "order/order/orderList",
icon: "md-person",
isMenu: true,
url: "",
children: null, children: null,
permTypes: []
}, },
{ {
name: "virtualOrderList", name: "virtualOrderList",
level: 2, level: 2,
type: 0, type: 0,
keepAlive: true,
title: "虚拟订单", title: "虚拟订单",
path: "virtualOrderList", path: "virtualOrderList",
component: "order/order/virtualOrderList", component: "order/order/virtualOrderList",
icon: "md-person", children: null
isMenu: true,
url: "",
children: null,
permTypes: []
} }
] ]
}, },
{ {
name: "memberComment", name: "memberComment",
level: 1, level: 1,
type: 0, type: 0,
title: "评价管理", title: "评价管理",
path: "/order", path: "/order",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "memberComment", name: "memberComment",
level: 2, level: 2,
type: 0, type: 0,
title: "评价管理", title: "评价管理",
path: "memberComment", path: "memberComment",
component: "member/memberComment", component: "member/memberComment",
icon: "md-person",
isMenu: true,
url: "",
children: null, children: null,
permTypes: [] }]
}
]
}, },
{ {
name: "order", name: "order",
level: 1, level: 1,
type: 0, type: 0,
title: "售后管理", title: "售后管理",
path: "/order", path: "/order",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "returnGoodsOrder", name: "returnGoodsOrder",
level: 2, level: 2,
type: 0, type: 0,
keepAlive: true,
title: "退货管理", title: "退货管理",
path: "returnGoodsOrder", path: "returnGoodsOrder",
component: "order/after-order/returnGoodsOrder", component: "order/after-order/returnGoodsOrder",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
name: "returnMoneyOrder", name: "returnMoneyOrder",
level: 2, level: 2,
type: 0, type: 0,
keepAlive: true,
title: "退款管理", title: "退款管理",
path: "returnMoneyOrder", path: "returnMoneyOrder",
component: "order/after-order/returnMoneyOrder", component: "order/after-order/returnMoneyOrder",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
name: "orderComplaint", name: "orderComplaint",
level: 2, level: 2,
type: 0, type: 0,
keepAlive: true,
title: "投诉管理", title: "投诉管理",
path: "orderComplaint", path: "orderComplaint",
component: "order/after-order/orderComplaint", component: "order/after-order/orderComplaint",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
} }
] ]
} }
] ]
}, },
{ {
name: "bill", name: "bill",
level: 0, level: 0,
type: -1, type: -1,
title: "财务", title: "财务",
path: "", path: "",
component: "", component: "",
icon: "md-home", children: [{
isMenu: true,
url: "",
description: "",
permTypes: [],
children: [
{
name: "bill", name: "bill",
level: 1, level: 1,
type: 0, type: 0,
title: "财务管理", title: "财务管理",
path: "/bill", path: "/bill",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "accountStatementBill", name: "accountStatementBill",
level: 2, level: 2,
type: 0, type: 0,
keepAlive: true,
title: "财务对账", title: "财务对账",
path: "accountStatementBill", path: "accountStatementBill",
component: "shop/bill/accountStatementBill", component: "shop/bill/accountStatementBill",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
name: "storeBill", name: "storeBill",
level: 2, level: 2,
type: 0, type: 0,
keepAlive: true,
title: "店铺结算", title: "店铺结算",
path: "storeBill", path: "storeBill",
component: "shop/bill/storeBill", component: "shop/bill/storeBill",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
} }
] ]
}, },
{ {
name: "receiptManager", name: "receiptManager",
level: 1, level: 1,
type: 0, type: 0,
title: "发票管理", title: "发票管理",
path: "/bill", path: "/bill",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "receipt", name: "receipt",
level: 2, level: 2,
type: 0, type: 0,
title: "发票管理", title: "发票管理",
path: "receipt", path: "receipt",
component: "order/receiptManager/receipt", component: "order/receiptManager/receipt",
icon: "md-person", children: null
isMenu: true, }]
url: "",
children: null,
permTypes: []
}
]
} }
] ]
}, },
{ {
name: "promotion", name: "promotion",
level: 0, level: 0,
type: -1, type: -1,
title: "营销", title: "营销",
path: "", path: "",
component: "", component: "",
icon: "md-home", children: [{
isMenu: true,
url: "",
description: "",
permTypes: [],
children: [
{
name: "promotion", name: "promotion",
level: 1, level: 1,
type: 0, type: 0,
title: "平台活动", title: "平台活动",
path: "/promotion", path: "/promotion",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "pintuan", name: "pintuan",
level: 2, level: 2,
type: 0, type: 0,
keepAlive: true,
title: "拼团活动", title: "拼团活动",
path: "pintuan", path: "pintuan",
component: "promotion/pintuan/pintuan", component: "promotion/pintuan/pintuan",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
name: "seckill", name: "seckill",
level: 2, level: 2,
type: 0, type: 0,
keepAlive: true,
title: "秒杀活动", title: "秒杀活动",
path: "seckill", path: "seckill",
component: "promotion/seckill/seckill", component: "promotion/seckill/seckill",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
} }
] ]
}, },
{ {
name: "lives", name: "lives",
level: 1, level: 1,
type: 0, type: 0,
title: "直播活动", title: "直播活动",
path: "/promotion", path: "/promotion",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "live", name: "live",
level: 2, level: 2,
type: 0, type: 0,
title: "直播管理", title: "直播管理",
path: "live", path: "live",
component: "promotion/live/live", component: "promotion/live/live",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
name: "liveGoods", name: "liveGoods",
level: 2, level: 2,
type: 0, type: 0,
title: "直播商品", title: "直播商品",
path: "liveGoods", path: "liveGoods",
component: "promotion/live/liveGoods", component: "promotion/live/liveGoods",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
} }
] ]
}, },
{ {
name: "storePromotion", name: "storePromotion",
level: 1, level: 1,
type: 0, type: 0,
title: "商家活动", title: "商家活动",
path: "/storePromotion", path: "/storePromotion",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "full-cut", name: "full-cut",
level: 2, level: 2,
type: 0, type: 0,
title: "满额活动", title: "满额活动",
path: "full-cut", path: "full-cut",
component: "promotion/fullCut/fullCut", component: "promotion/fullCut/fullCut",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
name: "coupon", name: "coupon",
level: 2, level: 2,
type: 0, type: 0,
title: "优惠券", title: "优惠券",
path: "coupon", path: "coupon",
component: "promotion/coupon/coupon", component: "promotion/coupon/coupon",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
] ]
}, },
{ {
name: "distribution", name: "distribution",
level: 1, level: 1,
type: 0, type: 0,
title: "分销管理", title: "分销管理",
path: "/distribution", path: "/distribution",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "distributionGoods", name: "distributionGoods",
level: 2, level: 2,
type: 0, type: 0,
title: "分销商品", title: "分销商品",
path: "distributionGoods", path: "distributionGoods",
component: "distribution/distributionGoods", component: "distribution/distributionGoods",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
@ -515,17 +317,12 @@ export const result = [
title: "分销订单", title: "分销订单",
path: "distributionOrder", path: "distributionOrder",
component: "distribution/distributionOrder", component: "distribution/distributionOrder",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
} }
] ]
} }
] ]
}, },
{ {
name: "statistics", name: "statistics",
level: 0, level: 0,
@ -533,35 +330,20 @@ export const result = [
title: "统计", title: "统计",
path: "", path: "",
component: "", component: "",
icon: "md-home", children: [{
isMenu: true,
url: "",
description: "",
permTypes: [],
children: [
{
name: "statistics", name: "statistics",
level: 1, level: 1,
type: 0, type: 0,
title: "统计管理", title: "统计管理",
path: "/statistics", path: "/statistics",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "goodsStatistics", name: "goodsStatistics",
level: 2, level: 2,
type: 0, type: 0,
title: "商品统计", title: "商品统计",
path: "goodsStatistics", path: "goodsStatistics",
component: "statistics/goods", component: "statistics/goods",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
@ -571,10 +353,6 @@ export const result = [
title: "订单统计", title: "订单统计",
path: "orderStatistics", path: "orderStatistics",
component: "statistics/order", component: "statistics/order",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
@ -584,17 +362,11 @@ export const result = [
title: "流量统计", title: "流量统计",
path: "trafficStatistics", path: "trafficStatistics",
component: "statistics/traffic", component: "statistics/traffic",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
] ]
} }]
]
}, },
{ {
name: "settings", name: "settings",
level: 0, level: 0,
@ -602,22 +374,14 @@ export const result = [
title: "设置", title: "设置",
path: "", path: "",
component: "", component: "",
icon: "md-home",
isMenu: true,
url: "",
description: "", description: "",
children: [ children: [{
{
name: "user-manage", name: "user-manage",
level: 1, level: 1,
type: 0, type: 0,
title: "页面设置", title: "页面设置",
path: "user-manage", path: "user-manage",
component: "sys/user-manage/userManage", component: "sys/user-manage/userManage",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: [] children: []
}, },
{ {
@ -627,22 +391,13 @@ export const result = [
title: "配送设置", title: "配送设置",
path: "", path: "",
component: "Main", component: "Main",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "shipTemplate", name: "shipTemplate",
level: 2, level: 2,
type: 0, type: 0,
title: "配送模板", title: "配送模板",
path: "shipTemplate", path: "shipTemplate",
component: "shop/ship/shipTemplate", component: "shop/ship/shipTemplate",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
}, },
{ {
@ -652,10 +407,6 @@ export const result = [
title: "物流公司", title: "物流公司",
path: "logistics", path: "logistics",
component: "shop/ship/logistics", component: "shop/ship/logistics",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
} }
] ]
@ -667,88 +418,52 @@ export const result = [
title: "店铺管理", title: "店铺管理",
path: "/shop", path: "/shop",
component: "Main", component: "Main",
icon: "md-person",
isMenu: true,
url: "",
description: "", description: "",
children: [ children: [{
{
name: "shopSetting", name: "shopSetting",
level: 2, level: 2,
type: 0, type: 0,
title: "店铺设置", title: "店铺设置",
path: "shopSetting", path: "shopSetting",
component: "shop/shopSetting", component: "shop/shopSetting",
icon: "md-log-in",
isMenu: true,
url: null,
description: null,
children: null, children: null,
permTypes: []
}, },
{ {
name: "shopAddress", name: "shopAddress",
level: 2, level: 2,
type: 0, type: 0,
title: "自提管理", title: "自提管理",
path: "shopAddress", path: "shopAddress",
component: "shop/shopAddress", component: "shop/shopAddress",
icon: "md-log-in",
isMenu: true,
url: null,
description: null,
children: null, children: null,
permTypes: []
} }
] ]
} }
] ]
}, },
{ {
name: "messages", name: "messages",
level: 0, level: 0,
type: -1, type: -1,
title: "消息", title: "消息",
path: "", path: "",
component: "", component: "",
icon: "md-home", children: [{
isMenu: true,
url: "",
description: "",
children: [
{
name: "user-manage", name: "user-manage",
level: 1, level: 1,
type: 0, type: 0,
title: "系统消息", title: "系统消息",
path: "user-manage", path: "user-manage",
component: "sys/user-manage/userManage", component: "sys/user-manage/userManage",
icon: "md-person", children: [{
isMenu: true,
url: "",
permTypes: [],
children: [
{
name: "message_index", name: "message_index",
level: 2, level: 2,
type: 0, type: 0,
title: "系统消息", title: "系统消息",
path: "message", path: "message",
component: "message", component: "message",
icon: "md-person",
isMenu: true,
url: "",
permTypes: [],
children: null children: null
} }]
] }]
}
]
} }
]; ];

View File

@ -1,7 +1,4 @@
import axios from 'axios';
import { getMenuList } from '@/api/index';
import lazyLoading from './lazyLoading.js'; import lazyLoading from './lazyLoading.js';
import router from '@/router/index';
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import { result } from './routerJson.js'; import { result } from './routerJson.js';
@ -233,7 +230,6 @@ util.openNewPage = function (vm, name, argu, query) {
if (query) { if (query) {
tag.query = query; tag.query = query;
} }
console.log(tag);
vm.$store.commit('increateTag', tag); vm.$store.commit('increateTag', tag);
} }
} }
@ -399,7 +395,6 @@ util.initMenuData = function (vm, data) {
let nav = { let nav = {
name: e.name, name: e.name,
title: e.title, title: e.title,
icon: e.icon
} }
navList.push(nav); navList.push(nav);
}) })
@ -450,20 +445,17 @@ util.initRouterNode = function (routers, data) { // data为所有子菜单数
for (var item of data) { for (var item of data) {
let menu = Object.assign({}, item); let menu = Object.assign({}, item);
// menu.component = import(`@/views/${menu.component}.vue`);
menu.component = lazyLoading(menu.component); menu.component = lazyLoading(menu.component);
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
menu.children = []; menu.children = [];
util.initRouterNode(menu.children, item.children); util.initRouterNode(menu.children, item.children);
} }
let meta = {}; let meta = {};
// 给页面添加权限、标题、第三方网页链接 // 给页面添加标题
meta.permTypes = menu.permTypes ? menu.permTypes : null;
meta.title = menu.title ? menu.title + " - lilishop商家后台" : null; meta.title = menu.title ? menu.title + " - lilishop商家后台" : null;
meta.url = menu.url ? menu.url : null; meta.firstRouterName = menu.firstRouterName
meta.firstRouterName = item.firstRouterName meta.keepAlive = menu.keepAlive ? true : false
menu.meta = meta; menu.meta = meta;
routers.push(menu); routers.push(menu);

View File

@ -11,14 +11,6 @@
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;
} }
.page {
margin-top: 2vh;
}
.drop-down {
margin-left: 5px;
}
} }
.tree-list { .tree-list {

View File

@ -39,9 +39,12 @@
</div> </div>
<div class="single-page-con"> <div class="single-page-con">
<div class="single-page"> <div class="single-page">
<keep-alive :include="cachePage"> <!-- <keep-alive :include="cachePage"> -->
<router-view></router-view> <!-- </keep-alive> -->
<keep-alive>
<router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive> </keep-alive>
<router-view v-if="!$route.meta.keepAlive"></router-view>
</div> </div>
</div> </div>
<!-- 全局加载动画 --> <!-- 全局加载动画 -->
@ -65,7 +68,7 @@ export default {
data() { data() {
return { return {
sliceNum: 5, // nav sliceNum: 5, // nav
userInfo: "", // userInfo: {}, //
navType: 1, // nav navType: 1, // nav
}; };
}, },

View File

@ -35,7 +35,7 @@
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
</Card> </Card>

View File

@ -12,7 +12,7 @@
</Form> </Form>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table"></Table> <Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small"
show-total show-elevator show-sizer></Page> show-total show-elevator show-sizer></Page>
</Row> </Row>

View File

@ -60,7 +60,7 @@
class="mt_10" class="mt_10"
sortable="custom" sortable="custom"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
:total="total" :total="total"
@ -106,7 +106,7 @@ export default {
{ {
title: "商品原图", title: "商品原图",
key: "original", key: "original",
width: 150, width: 120,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("img", { return h("img", {

View File

@ -64,7 +64,7 @@
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
show-total show-elevator show-sizer></Page> show-total show-elevator show-sizer></Page>
</Row> </Row>
@ -664,7 +664,7 @@ export default {
mounted() { mounted() {
this.init(); this.init();
}, },
activated() { mounted() {
this.init(); this.init();
}, },
}; };

View File

@ -50,7 +50,6 @@ export default {
// //
$route: { $route: {
handler: function (val, oldVal) { handler: function (val, oldVal) {
console.log(val);
if (val.meta.firstRouterName && val.meta.firstRouterName !== this.currNav) { if (val.meta.firstRouterName && val.meta.firstRouterName !== this.currNav) {
this.selectNav(val.meta.firstRouterName) this.selectNav(val.meta.firstRouterName)
} }

View File

@ -49,7 +49,7 @@
ref="table" ref="table"
class="mt_10" class="mt_10"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
:total="total" :total="total"
@ -369,7 +369,7 @@ export default {
}); });
}, },
}, },
activated() { mounted() {
this.init(); this.init();
}, },
}; };

View File

@ -54,7 +54,7 @@
</Poptip> </Poptip>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
:total="total" :total="total"
@ -243,9 +243,14 @@
}); });
}, },
}, },
activated() { mounted() {
this.init(); this.init();
}, },
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -371,13 +371,20 @@ export default {
}); });
}, },
}, },
activated () { mounted () {
this.id = this.$route.query.id; this.id = this.$route.query.id;
this.getDetail(); this.getDetail();
this.accessToken = { this.accessToken = {
accessToken: this.getStore("accessToken"), accessToken: this.getStore("accessToken"),
}; };
}, },
// keepAlivetrue
beforeRouteLeave(to, from, next){
if(to.name === 'orderComplaint') {
to.meta.keepAlive = true
}
next()
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -77,7 +77,7 @@
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
:total="total" :total="total"
@ -279,9 +279,14 @@
}, },
}, },
activated () { mounted () {
this.init(); this.init();
}, },
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -79,7 +79,7 @@
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
:total="total" :total="total"
@ -260,7 +260,6 @@
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.data = res.result.records; this.data = res.result.records;
console.log(this.data)
this.total = res.result.total; this.total = res.result.total;
} }
}); });
@ -277,9 +276,14 @@
}, },
}, },
activated() { mounted() {
this.init(); this.init();
}, },
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -522,6 +522,13 @@ export default {
this.sn = this.$route.query.sn; this.sn = this.$route.query.sn;
this.getDetail(); this.getDetail();
}, },
// keepAlivetrue
beforeRouteLeave(to, from, next){
if(to.name === 'returnGoodsOrder' || to.name === 'returnMoneyOrder') {
to.meta.keepAlive = true
}
next()
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -817,6 +817,13 @@ export default {
this.sn = this.$route.query.sn; this.sn = this.$route.query.sn;
this.getDataDetail(); this.getDataDetail();
}, },
// keepAlivetrue
beforeRouteLeave(to, from, next){
if(to.name === 'orderList' || to.name === 'virtualOrderList') {
to.meta.keepAlive = true
}
next()
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -43,7 +43,7 @@
</download-excel> </download-excel>
</div> </div>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table> <Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
show-total show-elevator show-sizer></Page> show-total show-elevator show-sizer></Page>
</Row> </Row>
@ -298,9 +298,14 @@ export default {
}); });
}, },
}, },
activated() { mounted() {
this.init(); this.init();
}, },
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -41,7 +41,7 @@
</div> </div>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> <Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
show-total show-elevator show-sizer></Page> show-total show-elevator show-sizer></Page>
</Row> </Row>
@ -261,9 +261,14 @@ export default {
}); });
}, },
}, },
activated() { mounted() {
this.init(); this.init();
}, },
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -28,7 +28,7 @@
<a @click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a> <a @click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
show-total show-elevator show-sizer></Page> show-total show-elevator show-sizer></Page>
</Row> </Row>
@ -264,7 +264,7 @@ export default {
}); });
}, },
}, },
activated() { mounted() {
this.init(); this.init();
}, },
}; };

View File

@ -29,10 +29,9 @@
<template slot-scope="{ row }" slot="action"> <template slot-scope="{ row }" slot="action">
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="info" size="small" :style="{'marginRight': row.promotionStatus !== 'CLOSE'?'5px':'0'}" @click="edit(row)"></Button> <Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="info" size="small" :style="{'marginRight': row.promotionStatus !== 'CLOSE'?'5px':'0'}" @click="edit(row)"></Button>
<Button v-if="row.promotionStatus !== 'CLOSE'" type="error" size="small" @click="remove(row)"></Button> <Button v-if="row.promotionStatus !== 'CLOSE'" type="error" size="small" @click="remove(row)"></Button>
<!-- <Button v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'" type="success" size="small" @click="open(row)"></Button> -->
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
@ -337,7 +336,7 @@ export default {
}); });
}, },
}, },
activated() { mounted() {
this.init(); this.init();
}, },
}; };

View File

@ -296,8 +296,13 @@ export default {
}); });
}, },
}, },
activated () { mounted () {
this.init(); this.init();
},
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
} }
}; };
</script> </script>

View File

@ -25,7 +25,7 @@
</Tabs> </Tabs>
<Table :columns="liveColumns" :data="liveData"></Table> <Table :columns="liveColumns" :data="liveData"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePageNumber" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePageNumber" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>

View File

@ -98,7 +98,7 @@
</div> </div>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber + 1"
:total="total" :total="total"
@ -329,9 +329,14 @@ export default {
}); });
}, },
}, },
activated() { mounted() {
this.init(); this.init();
}, },
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -285,6 +285,13 @@ export default {
mounted () { mounted () {
this.init(); this.init();
}, },
// keepAlivetrue
beforeRouteLeave(to, from, next){
if(to.name === 'pintuan') {
to.meta.keepAlive = true
}
next()
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -56,7 +56,7 @@
> >
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber + 1" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" <Page :current="searchForm.pageNumber + 1" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
@ -206,8 +206,13 @@ export default {
return hourArr; return hourArr;
}, },
}, },
activated() { mounted() {
this.init(); this.init();
},
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
} }
}; };
</script> </script>
@ -223,11 +228,5 @@ export default {
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;
} }
.page {
margin-top: 2vh;
}
.drop-down {
margin-left: 5px;
}
} }
</style> </style>

View File

@ -395,6 +395,13 @@ export default {
mounted() { mounted() {
this.init(); this.init();
}, },
// keepAlivetrue
beforeRouteLeave(to, from, next){
if(to.name === 'seckill') {
to.meta.keepAlive = true
}
next()
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -42,7 +42,7 @@
:data="data" :data="data"
ref="table" ref="table"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
:total="total" :total="total"
@ -213,9 +213,14 @@
}, },
}, },
activated() { mounted() {
this.init(); this.init();
}, },
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -40,7 +40,7 @@
:data="orderData" :data="orderData"
ref="table" ref="table"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="orderParam.pageNumber" :current="orderParam.pageNumber"
:total="orderTotal" :total="orderTotal"
@ -61,7 +61,7 @@
:data="refundData" :data="refundData"
ref="table" ref="table"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="refundParam.pageNumber" :current="refundParam.pageNumber"
:total="refundTotal" :total="refundTotal"
@ -82,7 +82,7 @@
:data="distributionData" :data="distributionData"
ref="table" ref="table"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="distributionParam.pageNumber" :current="distributionParam.pageNumber"
:total="distributionTotal" :total="distributionTotal"
@ -604,6 +604,13 @@ export default {
mounted() { mounted() {
this.init(); this.init();
}, },
// keepAlivetrue
beforeRouteLeave(to, from, next){
if(to.name === 'accountStatementBill' || to.name === 'storeBill') {
to.meta.keepAlive = true
}
next()
}
}; };
</script> </script>

View File

@ -48,7 +48,7 @@
ref="table" ref="table"
class="mt_10" class="mt_10"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="mt_10">
<Page <Page
:current="searchForm.pageNumber" :current="searchForm.pageNumber"
:total="total" :total="total"
@ -179,6 +179,7 @@
}, },
// //
changePageSize(v) { changePageSize(v) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
@ -218,9 +219,14 @@
}, },
}, },
activated () { mounted () {
this.init(); this.init();
}, },
// KeepAlivefalse
beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false
next()
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -152,7 +152,7 @@
<div> <div>
<Table stripe :columns="columns" :data="data"></Table> <Table stripe :columns="columns" :data="data"></Table>
</div> </div>
<Page @on-change="(index)=>{refundParams.pageNumber = index}" @on-page-size-change="(size)=>{refundParams.pageSize= size}" class="page" show-total show-elevator :total="total" /> <Page @on-change="(index)=>{refundParams.pageNumber = index}" @on-page-size-change="(size)=>{refundParams.pageSize= size}" class="mt_10" show-total show-elevator :total="total" />
</div> </div>
</Card> </Card>