Authored by OF1706

report bug

... ... @@ -3,6 +3,6 @@ export default {
name: 'product',
component: () => import(/* webpackChunkName: "statistics.product" */'./product'),
meta: {
pageName: '实时分析'
pageName: '商品看板'
}
};
... ...
<template>
<div class="stat-shop">
<layout-body>
<Card class="shop-card">
<p slot="title">商品看板</p>
<layout-filter class="box-filter" :inline="true" :col="1">
<filter-item label="时间">
... ... @@ -27,8 +26,6 @@
<Page :total="pageData.total" :current="pageData.current"
@on-change="pageChange" :page-size="20" show-total></Page>
</layout-list>
</Card>
</layout-body>
</div>
</template>
... ...
... ... @@ -19,6 +19,7 @@
* 仅支持导出历史数据,时间跨度不得超过30天
</div>
<Button type="primary" @click="exportFile">导出</Button>
<p style="display: inline-block;font-size: 10px;color: #c90;">* 当日数据不支持导出</p>
</Poptip>
</filter-item>
</layout-filter>
... ... @@ -49,11 +50,13 @@
</Col>
<Col span="6">
<div class="box-item bg-light-blue">
<span class="box-item-label" style="marginLeft: 20px;">{{filters.targetColumns[4].title}}</span>
<Icon type="clipboard"></Icon>
<span class="box-item-label">{{filters.targetColumns[4].title}}</span>
<span class="box-item-value">{{this.overviewData.shipmentOrderCount}}</span>
</div>
<div class="box-item bg-green">
<span class="box-item-label" style="marginLeft: 20px;">{{filters.targetColumns[5].title}}</span>
<Icon type="social-yen"></Icon>
<span class="box-item-label">{{filters.targetColumns[5].title}}</span>
<span class="box-item-value">{{this.overviewData.shipmentOrderAmount}}</span>
</div>
</Col>
... ... @@ -118,12 +121,10 @@
this.getOverviewData();
if (this.endDate !== this.today) {
_.each(this.targetList, tar => {
tar.chatOpt = {};
});
this.getOverviewTrend();
}
},
curTarget(value) {
... ... @@ -197,6 +198,17 @@
platform: '1,2'
}).then(ret => {
if (!ret.data) {
this.overviewData.uv = 1;
this.overviewData.pv = 1;
this.overviewData.orderCount = 0;
this.overviewData.orderAmount = 0;
this.overviewData.shipmentOrderCount = 0;
this.overviewData.shipmentOrderAmount = 0;
this.overviewData.uvOrderRate = 0;
return;
}
this.overviewData = ret.data;
this.overviewData.uv = _.get(ret.data, 'uv') ? ret.data.uv : '——';
... ... @@ -206,16 +218,18 @@
this.overviewData.shipmentOrderCount = _.get(ret.data, 'paymentOrderCount') ? ret.data.paymentOrderCount : '——';
this.overviewData.shipmentOrderAmount = _.get(ret.data, 'paymentOrderAmount') ? ret.data.paymentOrderAmount : '——';
this.overviewData.uvOrderRate = ((_.get(ret.data, 'uvOrderRate') && (ret.data.uvOrderRate <= 1) ?
(ret.data.uvOrderRate * 100) : ret.data.uvOrderRate)).toFixed(4) + '%';
(ret.data.uvOrderRate * 100) : ret.data.uvOrderRate)).toFixed(2) + '%';
if (this.beginDate !== this.endDate) {
let formatData = _.slice(ret, 0, ret.length - 1);
let formatData = _.slice(ret.data, 0, ret.data.length - 1);
this.overviewChartData.uv = _.get(ret, 'uv');
this.overviewChartData.pv = _.get(ret, 'pv');
this.overviewChartData.orderCount = _.get(ret, 'orderCount');
this.overviewChartData.orderAmount = _.get(ret, 'orderAmount');
this.overviewChartData.xAxis = _.map(formatData, 'hour');
this.overviewChartData.paymentOrderCount = _.get(ret, 'paymentOrderCount');
this.overviewChartData.paymentOrderAmount = _.get(ret, 'paymentOrderAmount');
this.overviewChartData.xAxis = _.map(formatData, 'date');
}
});
},
... ...