Commit 0da0019b by 李伟康

提交代码

1 parent 32d14854
......@@ -45,10 +45,34 @@ const getBrowseListApi = params => {
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 => {
params.method = 'scrm.api.shopmall.customer.browse.records.export'
const exportBrowseApi = (params, TYPE = 1) => {
//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({
url: 'rop-scrm-shopmall/router',
method: 'POST',
......@@ -178,4 +202,4 @@ const getDataBoardApi = params => {
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 @@
</el-popover>
<span class="m-l-10">{{ scope.scope.shareName }}</span>
</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>
<!-- 表格区域 end -->
</div>
......@@ -121,7 +131,7 @@ export default {
customerName: '',
mobile: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageConf: {pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'},
// 搜索
searchFormData: [
{
......@@ -138,15 +148,15 @@ export default {
},
{
label: '分享人',
name: 'a',
name: 'shareName',
type: 'input',
maxlength: 50
}
],
// 表格
getListApi: this.$apis.seckillActivity.getBrowseListApi,
getListApi: null,
tableParams: {
listName: 'list',
listName:'list',
tableColumns: [
{
label: '微信名称',
......@@ -171,21 +181,22 @@ export default {
const lastTableColumns = [
{
label: '浏览时长',
prop: 'browseCount',
prop: 'browserTime',
},
{
label: '进入页面时间',
prop: 'lastBrowseDate',
prop: 'operationDate',
width: '180'
},
{
label: '离开页面时间',
prop: 'lastBrowseDate',
prop: 'leaveDate',
width: '180'
},
{
label: '订单状态',
prop: 'lastBrowseDate',
prop: 'isBuy',
addHtml: 'isBuy'
}
], {
query
......@@ -194,14 +205,23 @@ export default {
1: '浏览',
2: '访客',
3: '分享',
}[query.type]
}[query.type],
[url] = window.location.href.split('%24title')
query.name = name
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) {
this.searchFormData.push({
label: '订单状态',
name: 'orderStatus',
name: 'isBuy',
type: 'select',
width: '215px',
optionList: [
......@@ -210,23 +230,20 @@ export default {
confName: '全部'
},
{
confId: '2',
confId: 'Y',
confName: '已付款'
},
{
confId: '3',
confId: 'N',
confName: '未付款'
}
],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'statusList'
})
if (query.type == 3) this.tableParams.tableColumns.push({
label: '分享时间',
prop: 'lastBrowseDate',
width: '180'
prop: 'sharedTime',
})
this.tableParams.tableColumns = [...this.tableParams.tableColumns, ...lastTableColumns]
} else this.tableParams.tableColumns = [...this.tableParams.tableColumns, {
......@@ -235,7 +252,6 @@ export default {
}, {
label: '最后浏览时间',
prop: 'lastBrowseDate',
width: '180'
}]
},
......@@ -254,9 +270,10 @@ export default {
},
handleExport () {
var params = this.$common.utils.deepClone(this.searchForm)
let { type } = this.routeInfo
params.pageNum = 1
params.pageSize = 999999
this.$apis.seckillActivity.exportBrowseApi(params).then(res => {
this.$apis.seckillActivity.exportBrowseApi(params, type).then(res => {
exportFn(res)
})
},
......
......@@ -76,7 +76,31 @@
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@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>
</div>
</div>
......@@ -147,13 +171,13 @@ export default {
},
{
label: '员工',
prop: 'activityName',
prop: 'shareName',
addHtml: 'shareName',
width: 220
},
{
label: '转发次数',
prop: 'forwardCount',
addHtml: 'forwardCount'
prop: 'shareCount',
},
{
label: '访客总数',
......@@ -170,7 +194,7 @@ export default {
},
{
label: '转化率',
prop: 'orderCount'
prop: 'conversionRate'
}
]
},
......@@ -278,10 +302,10 @@ export default {
background-image: url(../../assets/dataBoard/icon-half-default.png);
background-size: 16px 16px;
}
.up{
.up {
background-image: url(../../assets/dataBoard/icon-half-up.png);
}
.down{
.down {
background-image: url(../../assets/dataBoard/icon-half-down.png);
}
.num {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!