|
@@ -66,6 +66,41 @@ export default class StatisticsRealtime extends Component {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ siteRealTimeData: {
|
|
|
+ icon: require('@/assets/real_icon_1.png'),
|
|
|
+ title: `${sldComLanguage('平台汇总')}`,
|
|
|
+ list: [
|
|
|
+ // {
|
|
|
+ // name: `${sldComLanguage('销售总额(元)')}`,
|
|
|
+ // value: '',
|
|
|
+ // isHelpIcon: false,
|
|
|
+ // tip: `${sldComLanguage('截止至当前时间,全平台累计销售额')}`,
|
|
|
+ // mapKey: 'orderPayAmountTotal',
|
|
|
+ // isMoney: true,
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ name: `${sldComLanguage('会员总数')}`,
|
|
|
+ value: '',
|
|
|
+ isHelpIcon: true,
|
|
|
+ tip: `${sldComLanguage('截止至当前时间,全平台注册会员数')}`,
|
|
|
+ mapKey: 'webSiteMemberNum',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: `${sldComLanguage('店铺总数')}`,
|
|
|
+ value: '',
|
|
|
+ isHelpIcon: true,
|
|
|
+ tip: `${sldComLanguage('截止至当前时间,全平台商家总数,包括自营商家和入驻商家')}`,
|
|
|
+ mapKey: 'webSiteStoreNum',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: `${sldComLanguage('在售商品数')}`,
|
|
|
+ value: '',
|
|
|
+ isHelpIcon: true,
|
|
|
+ tip: `${sldComLanguage('截止至当前时间,状态为在售的商品数量')}`,
|
|
|
+ mapKey: 'webSiteSaleGoodsNum',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
realTimeData2: {
|
|
|
icon: require('@/assets/real_icon_2.png'),
|
|
|
title: `${sldComLanguage('今日实时')}`,
|
|
@@ -249,8 +284,8 @@ export default class StatisticsRealtime extends Component {
|
|
|
detailData = res.data;
|
|
|
|
|
|
//渲染头部实时分析的数据
|
|
|
- const { realTimeData1, realTimeData2 } = this.state;
|
|
|
- const tempArray = [...realTimeData1.list, ...realTimeData2.list];
|
|
|
+ const { realTimeData1, realTimeData2, siteRealTimeData } = this.state;
|
|
|
+ const tempArray = [...realTimeData1.list, ...realTimeData2.list, ...siteRealTimeData.list];
|
|
|
const tempActionData = { ...res.data.platformSummary, ...res.data.platformTodaySummary,orderPayAmountTotal:res.data.platformSummary.orderPayAmount };
|
|
|
tempArray.forEach((item, index) => {
|
|
|
tempArray[index]['value'] = tempActionData[item.mapKey];
|
|
@@ -260,6 +295,7 @@ export default class StatisticsRealtime extends Component {
|
|
|
detailData,
|
|
|
realTimeData2,
|
|
|
realTimeData1,
|
|
|
+ siteRealTimeData,
|
|
|
refreshTime,
|
|
|
});
|
|
|
|
|
@@ -289,7 +325,8 @@ export default class StatisticsRealtime extends Component {
|
|
|
}
|
|
|
|
|
|
platformSummary = (type) => {
|
|
|
- const { currentSiteName, realTimeData2, realTimeData1, initLoading, refreshTime, screenW, loadedFlag, detailData } = this.state;
|
|
|
+ const { currentSiteName, realTimeData2, siteRealTimeData, realTimeData1, initLoading, refreshTime, screenW, loadedFlag, detailData } = this.state;
|
|
|
+ const renderRealTimeData = type ? siteRealTimeData : realTimeData1
|
|
|
const leftW = this.props.global != undefined && this.props.global.collapsed != undefined && this.props.global.collapsed ? 90 : 150;
|
|
|
let itemW = (screenW * 1 - leftW - 20 - 100 - 30 - 80) / 5;
|
|
|
return (
|
|
@@ -297,12 +334,12 @@ export default class StatisticsRealtime extends Component {
|
|
|
{this.realtimeAnalysis()}
|
|
|
<div className={`${stat.num_stat_item} ${global.flex_row_start_center} ${global.no_border}`}>
|
|
|
<div className={`${stat.left_slide} ${global.flex_column_center_center}`}>
|
|
|
- <img src={realTimeData1.icon} className={`${stat.slide_icon}`}></img>
|
|
|
- <span className={`${stat.slide_title}`}>{realTimeData1.title}</span>
|
|
|
+ <img src={renderRealTimeData.icon} className={`${stat.slide_icon}`}></img>
|
|
|
+ <span className={`${stat.slide_title}`}>{renderRealTimeData.title}</span>
|
|
|
</div>
|
|
|
<div className={`${stat.right_main}`}>
|
|
|
<ul className={`${global.flex_row_start_center}`}>
|
|
|
- {realTimeData1.list.map((item, index) => (
|
|
|
+ {renderRealTimeData.list.map((item, index) => (
|
|
|
<li key={index} className={`${global.flex_column_center_start}`} style={{ width: itemW }}>
|
|
|
<div className={`${stat.up_desc}`}>
|
|
|
<span>{item.name}</span>
|
|
@@ -349,47 +386,10 @@ export default class StatisticsRealtime extends Component {
|
|
|
>
|
|
|
<Spin spinning={initLoading}>
|
|
|
<div className={`${stat.module_item}`}>
|
|
|
- {currentSiteName && this.platformSummary()}
|
|
|
- {currentSiteName && <div className={ styles.current_site }>{ currentSiteName }</div> }
|
|
|
+ {this.platformSummary()}
|
|
|
+ {<div className={ styles.current_site }>{ currentSiteName }</div> }
|
|
|
<div className={`${stat.real_num_panel} ${styles.current_site_stat}`}>
|
|
|
- {this.realtimeAnalysis()}
|
|
|
- <div className={`${stat.num_stat_item} ${global.flex_row_start_center} ${styles.no_border}`}>
|
|
|
- <div className={`${stat.left_slide} ${global.flex_column_center_center}`}>
|
|
|
- <img src={realTimeData1.icon} className={`${stat.slide_icon}`}></img>
|
|
|
- <span className={`${stat.slide_title}`}>{realTimeData1.title}</span>
|
|
|
- </div>
|
|
|
- <div className={`${stat.right_main}`}>
|
|
|
- <ul className={`${global.flex_row_start_center}`}>
|
|
|
- {realTimeData1.list.map((item, index) => (
|
|
|
- <li key={index} className={`${global.flex_column_center_start}`} style={{ width: itemW }}>
|
|
|
- <div className={`${stat.up_desc}`}>
|
|
|
- <span>{item.name}</span>
|
|
|
-
|
|
|
- {item.isHelpIcon ? <Tooltip placement="right" title={item.tip}>
|
|
|
- <img src={require('@/assets/home_basic/help_icon.png')}></img>
|
|
|
- </Tooltip> : ''}
|
|
|
- </div>
|
|
|
- <div className={`${stat.down_num}`} title={item.value}>
|
|
|
- <span>
|
|
|
- {loadedFlag && (
|
|
|
- item.value > 10000
|
|
|
- ? formatNum(item.value, item.isMoney ? 2 : 0)
|
|
|
- : <TweenOne animation={{
|
|
|
- Children: {
|
|
|
- value: item.value, floatLength: item.isMoney ? 2 : 0,
|
|
|
- formatMoney: true,
|
|
|
- },
|
|
|
- duration: 1000,
|
|
|
- }}/>
|
|
|
- )}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- ))}
|
|
|
-
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ {this.platformSummary('site')}
|
|
|
<div>
|
|
|
<div className={`${stat.num_stat_item} ${global.flex_row_start_start} ${styles.no_border}`}>
|
|
|
<div
|