Commit fe9f1a54 by 李伟康

众筹紧急版本提交

1 parent 615556c5
......@@ -316,4 +316,16 @@ const getTencentcloudmediaList = params => {
})
}
export default { getCrowdGoldParams, getPayListApi, getPayMerchatListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics, getCrowdfundingParams, getTencentcloudmediaList }
/**
excel批量导入众筹活动 */
const importCrowdFundingActivity = params => {
params.method = 'scrm.api.shopmall.activity.batch.import'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default { getCrowdGoldParams, getPayListApi, getPayMerchatListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics, getCrowdfundingParams, getTencentcloudmediaList, importCrowdFundingActivity }
......@@ -879,4 +879,8 @@ ul li {
margin: 0;
list-style: none;
}
.loading-class{
font-size: 50px;
color: #5850ff !important;
}
\ No newline at end of file
......@@ -5,40 +5,96 @@
<p class="edit-title">{{ routeInfo.activityName }}</p>
<div class="p-20">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<div class="table-title">
已累计
<template v-if="routeInfo.type != 2">{{ decodeURI(routeInfo.name) }}</template>
<span>{{ routeInfo.count || 0 }}</span>
<span>{{total || routeInfo.count }}</span>
{{ routeInfo.type == 2 ? '位访客' : '次' }}
</div>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button>
<el-button
:size="size"
class="default-blue-btn"
type="default"
@click="handleExport"
>导出</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="browserRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="customerName" class="flex-align" slot-scope="scope">
<GLTable
ref="browserRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div
slot="customerName"
class="flex-align"
slot-scope="scope"
>
<template v-if="scope.scope.customerAvatar">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.customerAvatar" />
<img class="img-36 pointer" slot="reference" :src="scope.scope.customerAvatar" />
<el-popover
placement="top"
width="160"
trigger="hover"
popper-class="table-popover-block"
>
<img
class="table-popover-img"
:src="scope.scope.customerAvatar"
/>
<img
class="img-36 pointer"
slot="reference"
:src="scope.scope.customerAvatar"
/>
</el-popover>
</template>
<span class="m-l-10">{{ scope.scope.customerName }}</span>
</div>
<div slot="shareName" class="flex-align" slot-scope="scope">
<div
slot="shareName"
class="flex-align"
slot-scope="scope"
>
<template v-if="scope.scope.shareAvatar">
<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
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>
</template>
<span class="m-l-10">{{ scope.scope.shareName }}</span>
<span class="m-l-10">{{ scope.scope.sharePhone }}</span>
</div>
<div slot="isBuy" slot-scope="scope">
<div
slot="isBuy"
slot-scope="scope"
>
<span :class="['table-circle', 'm-r-8', scope.scope.isBuy == 'Y' ? 'back-green' : 'back-grey']"></span>
<span>
{{
......@@ -53,8 +109,14 @@
<!-- 表格区域 end -->
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleJump">返回</el-button>
<div
class="footer"
:style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<el-button
type="default"
@click="handleJump"
>返回</el-button>
</div>
</div>
</template>
......@@ -65,7 +127,7 @@ import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant'
export default {
name: 'browseList',
data() {
data () {
return {
size: 'small',
url: url,
......@@ -122,49 +184,50 @@ export default {
width: 230
}
]
}
},
total: 0
}
},
created() {
created () {
const lastTableColumns = [
{
label: '浏览时长',
prop: 'browserTime'
},
{
label: '进入页面时间',
prop: 'operationDate',
width: '180'
},
{
label: '离开页面时间',
prop: 'leaveDate',
width: '180'
},
{
label: '订单状态',
prop: 'isBuy',
addHtml: 'isBuy'
}
],
{
label: '浏览时长',
prop: 'browserTime'
},
{
label: '进入页面时间',
prop: 'operationDate',
width: '180'
},
{
label: '离开页面时间',
prop: 'leaveDate',
width: '180'
},
{
label: '订单状态',
prop: 'isBuy',
addHtml: 'isBuy'
}
],
{ query } = this.$route,
name = {
1: '浏览',
2: '访客',
3: '分享'
}[query.type],
[url] = window.location.href.split('%24title')
[url] = window.location.href.split('%24title'),
apiName = this.$apis.seckillActivity[
{
1: 'getBrowseListApi',
2: 'getVisitorListApi',
3: 'getSharedListApi'
}[query.type]]
query.name = name
this.routeInfo = query
this.getListApi = this.$apis.seckillActivity[
{
1: 'getBrowseListApi',
2: 'getVisitorListApi',
3: 'getSharedListApi'
}[query.type]
]
this.getListApi = apiName
if (query.type == 1) this.getTotal(apiName, query.id)
history.replaceState(null, null, `${url}&$title=${name}明细`)
// listName:
//1 浏览 2 访客 3 分享
......@@ -211,19 +274,19 @@ export default {
]
},
mounted() {
mounted () {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
},
methods: {
beforeSearchFn() {
beforeSearchFn () {
return new Promise(resolve => {
this.searchForm.activityId = this.routeInfo.id
resolve()
})
},
handleExport() {
handleExport () {
var params = this.$common.utils.deepClone(this.searchForm)
let { type } = this.routeInfo
params.pageNum = 1
......@@ -233,28 +296,36 @@ export default {
})
},
handleJump(path, row = {}) {
handleJump (path, row = {}) {
this.$router.push({
path: '/seckillActivity/crowdFundList'
})
},
setTableFinishFun() {
setTableFinishFun () {
//接收到的数据为空
this.$refs.browserRef.data.length ? (this.$refs.browserRef.tableHeightValues = '') : this.$refs.browserRef.setTableHeightFun()
},
handleSearch() {
handleSearch () {
this.$refs.browserRef.refreshTable()
},
handleReset() {
handleReset () {
this.searchForm = {
activityId: this.routeInfo.id,
customerName: '',
mobile: ''
}
this.handleSearch()
},
async getTotal (apiName, activityId) {
const { total } = await apiName({
pageSize: 10,
pageNum: 1,
activityId
})
this.total = total
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!