...
|
...
|
@@ -73,20 +73,18 @@ export default { |
|
|
const visible = this.isVisible(component.$el, this.$scrollEl);
|
|
|
|
|
|
if (visible && (this.componentStatus[index] !== visible || isInit)) {
|
|
|
this.record(component, index + 1);
|
|
|
this.record(component, index + 1, isInit);
|
|
|
}
|
|
|
this.componentStatus[index] = visible;
|
|
|
});
|
|
|
},
|
|
|
record(component, index) {
|
|
|
record(component, index, isInit) {
|
|
|
const reportData = _.get(component, '$options.propsData.value');
|
|
|
|
|
|
// TODO 区分不通组件记录以楼层内item为单位、而不是以整个楼层为单位组织数据上报
|
|
|
let param;
|
|
|
if (reportData) {
|
|
|
switch (reportData.template_name) {
|
|
|
case 'goods':
|
|
|
break;
|
|
|
case 'twoPicture':
|
|
|
param = [];
|
|
|
_.each(reportData.data.list, item => {
|
...
|
...
|
@@ -107,7 +105,7 @@ export default { |
|
|
|
|
|
case 'tfGoodsList':
|
|
|
// 楼层内存在多个item, 交给子组件各自检测
|
|
|
let visible = component.checkReqFromParent();
|
|
|
let visible = component.checkReqFromParent(isInit);
|
|
|
if (visible.length) {
|
|
|
param = [];
|
|
|
_.each(visible, item => {
|
...
|
...
|
@@ -120,6 +118,7 @@ export default { |
|
|
});
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
case 'newSingleImage':
|
|
|
param = {
|
|
|
P_NAME: this.$route.name,
|
...
|
...
|
@@ -129,8 +128,6 @@ export default { |
|
|
ACTION_URL: reportData.data.list[0].url
|
|
|
};
|
|
|
break;
|
|
|
case 'BlkNewProductFloorResource':
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
...
|
...
|
|