Commit 0da0019b by 李伟康

提交代码

1 parent 32d14854
...@@ -45,10 +45,34 @@ const getBrowseListApi = params => { ...@@ -45,10 +45,34 @@ const getBrowseListApi = params => {
sign: true sign: true
}) })
} }
//众筹活动访客明细
const getVisitorListApi = params => {
params.method = 'scrm.api.shopmall.customer.visitor.records'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 众筹活动分享明细
const getSharedListApi = params => {
params.method = 'scrm.api.shopmall.customer.shared.records'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 分页浏览-导出 // 分页浏览-导出
const exportBrowseApi = params => { const exportBrowseApi = (params, TYPE = 1) => {
params.method = 'scrm.api.shopmall.customer.browse.records.export' //TYPE 1 浏览 2 访客 3 分享
params.method = {
1: 'scrm.api.shopmall.customer.browse.records.export',
2: 'scrm.api.shopmall.customer.visitor.records.export',
3: 'scrm.api.shopmall.customer.shared.records.export'
}[TYPE]
return http({ return http({
url: 'rop-scrm-shopmall/router', url: 'rop-scrm-shopmall/router',
method: 'POST', method: 'POST',
...@@ -178,4 +202,4 @@ const getDataBoardApi = params => { ...@@ -178,4 +202,4 @@ const getDataBoardApi = params => {
sign: true sign: true
}) })
} }
export default { getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi } export default { getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi }
...@@ -85,6 +85,16 @@ ...@@ -85,6 +85,16 @@
</el-popover> </el-popover>
<span class="m-l-10">{{ scope.scope.shareName }}</span> <span class="m-l-10">{{ scope.scope.shareName }}</span>
</div> </div>
<div
slot="isBuy"
slot-scope="scope"
>
<span :class="['table-circle', 'm-r-8', scope.scope.isBuy == 'Y' ?'back-green': 'back-grey']"></span>
<span>{{{
'Y':'已付款',
'N':'未付款'
}[scope.scope.isBuy] || '--'}}</span>
</div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
...@@ -121,7 +131,7 @@ export default { ...@@ -121,7 +131,7 @@ export default {
customerName: '', customerName: '',
mobile: '' mobile: ''
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: {pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'},
// 搜索 // 搜索
searchFormData: [ searchFormData: [
{ {
...@@ -138,15 +148,15 @@ export default { ...@@ -138,15 +148,15 @@ export default {
}, },
{ {
label: '分享人', label: '分享人',
name: 'a', name: 'shareName',
type: 'input', type: 'input',
maxlength: 50 maxlength: 50
} }
], ],
// 表格 // 表格
getListApi: this.$apis.seckillActivity.getBrowseListApi, getListApi: null,
tableParams: { tableParams: {
listName: 'list', listName:'list',
tableColumns: [ tableColumns: [
{ {
label: '微信名称', label: '微信名称',
...@@ -171,21 +181,22 @@ export default { ...@@ -171,21 +181,22 @@ export default {
const lastTableColumns = [ const lastTableColumns = [
{ {
label: '浏览时长', label: '浏览时长',
prop: 'browseCount', prop: 'browserTime',
}, },
{ {
label: '进入页面时间', label: '进入页面时间',
prop: 'lastBrowseDate', prop: 'operationDate',
width: '180' width: '180'
}, },
{ {
label: '离开页面时间', label: '离开页面时间',
prop: 'lastBrowseDate', prop: 'leaveDate',
width: '180' width: '180'
}, },
{ {
label: '订单状态', label: '订单状态',
prop: 'lastBrowseDate', prop: 'isBuy',
addHtml: 'isBuy'
} }
], { ], {
query query
...@@ -194,14 +205,23 @@ export default { ...@@ -194,14 +205,23 @@ export default {
1: '浏览', 1: '浏览',
2: '访客', 2: '访客',
3: '分享', 3: '分享',
}[query.type] }[query.type],
[url] = window.location.href.split('%24title')
query.name = name query.name = name
this.routeInfo = query this.routeInfo = query
history.replaceState(null, null, `${window.location.href}&$title=${name}明细`) this.getListApi = this.$apis.seckillActivity[{
1: 'getBrowseListApi',
2: 'getVisitorListApi',
3: 'getSharedListApi'
}[query.type]]
history.replaceState(null, null, `${url}&$title=${name}明细`)
// listName:
//1 浏览 2 访客 3 分享
if (query.type != 2) { if (query.type != 2) {
this.searchFormData.push({ this.searchFormData.push({
label: '订单状态', label: '订单状态',
name: 'orderStatus', name: 'isBuy',
type: 'select', type: 'select',
width: '215px', width: '215px',
optionList: [ optionList: [
...@@ -210,23 +230,20 @@ export default { ...@@ -210,23 +230,20 @@ export default {
confName: '全部' confName: '全部'
}, },
{ {
confId: '2', confId: 'Y',
confName: '已付款' confName: '已付款'
}, },
{ {
confId: '3', confId: 'N',
confName: '未付款' confName: '未付款'
} }
], ],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'statusList'
}) })
if (query.type == 3) this.tableParams.tableColumns.push({ if (query.type == 3) this.tableParams.tableColumns.push({
label: '分享时间', label: '分享时间',
prop: 'lastBrowseDate', prop: 'sharedTime',
width: '180'
}) })
this.tableParams.tableColumns = [...this.tableParams.tableColumns, ...lastTableColumns] this.tableParams.tableColumns = [...this.tableParams.tableColumns, ...lastTableColumns]
} else this.tableParams.tableColumns = [...this.tableParams.tableColumns, { } else this.tableParams.tableColumns = [...this.tableParams.tableColumns, {
...@@ -235,7 +252,6 @@ export default { ...@@ -235,7 +252,6 @@ export default {
}, { }, {
label: '最后浏览时间', label: '最后浏览时间',
prop: 'lastBrowseDate', prop: 'lastBrowseDate',
width: '180'
}] }]
}, },
...@@ -254,9 +270,10 @@ export default { ...@@ -254,9 +270,10 @@ export default {
}, },
handleExport () { handleExport () {
var params = this.$common.utils.deepClone(this.searchForm) var params = this.$common.utils.deepClone(this.searchForm)
let { type } = this.routeInfo
params.pageNum = 1 params.pageNum = 1
params.pageSize = 999999 params.pageSize = 999999
this.$apis.seckillActivity.exportBrowseApi(params).then(res => { this.$apis.seckillActivity.exportBrowseApi(params, type).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
......
...@@ -76,7 +76,31 @@ ...@@ -76,7 +76,31 @@
:pageConf="pageConf" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
:hasNum="false"
> >
<div
slot="shareName"
class="flex-align"
slot-scope="scope"
>
<el-popover
placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block"
>
<img
class="table-popover-img"
:src="scope.scope.shareAvatar"
/>
<img
class="img-36 pointer"
slot="reference"
:src="scope.scope.shareAvatar"
/>
</el-popover>
<span class="m-l-10">{{ scope.scope.shareName }}</span>
</div>
</GLTable> </GLTable>
</div> </div>
</div> </div>
...@@ -147,13 +171,13 @@ export default { ...@@ -147,13 +171,13 @@ export default {
}, },
{ {
label: '员工', label: '员工',
prop: 'activityName', prop: 'shareName',
addHtml: 'shareName',
width: 220 width: 220
}, },
{ {
label: '转发次数', label: '转发次数',
prop: 'forwardCount', prop: 'shareCount',
addHtml: 'forwardCount'
}, },
{ {
label: '访客总数', label: '访客总数',
...@@ -170,7 +194,7 @@ export default { ...@@ -170,7 +194,7 @@ export default {
}, },
{ {
label: '转化率', label: '转化率',
prop: 'orderCount' prop: 'conversionRate'
} }
] ]
}, },
...@@ -278,10 +302,10 @@ export default { ...@@ -278,10 +302,10 @@ export default {
background-image: url(../../assets/dataBoard/icon-half-default.png); background-image: url(../../assets/dataBoard/icon-half-default.png);
background-size: 16px 16px; background-size: 16px 16px;
} }
.up{ .up {
background-image: url(../../assets/dataBoard/icon-half-up.png); background-image: url(../../assets/dataBoard/icon-half-up.png);
} }
.down{ .down {
background-image: url(../../assets/dataBoard/icon-half-down.png); background-image: url(../../assets/dataBoard/icon-half-down.png);
} }
.num { .num {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!