Commit fe9f1a54 by 李伟康

众筹紧急版本提交

1 parent 615556c5
...@@ -316,4 +316,16 @@ const getTencentcloudmediaList = params => { ...@@ -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 { ...@@ -879,4 +879,8 @@ ul li {
margin: 0; margin: 0;
list-style: none; list-style: none;
}
.loading-class{
font-size: 50px;
color: #5850ff !important;
} }
\ No newline at end of file \ No newline at end of file
...@@ -5,40 +5,96 @@ ...@@ -5,40 +5,96 @@
<p class="edit-title">{{ routeInfo.activityName }}</p> <p class="edit-title">{{ routeInfo.activityName }}</p>
<div class="p-20"> <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="flex m-b-10 w-100-percent">
<div class="table-title"> <div class="table-title">
已累计 已累计
<template v-if="routeInfo.type != 2">{{ decodeURI(routeInfo.name) }}</template> <template v-if="routeInfo.type != 2">{{ decodeURI(routeInfo.name) }}</template>
<span>{{ routeInfo.count || 0 }}</span> <span>{{total || routeInfo.count }}</span>
{{ routeInfo.type == 2 ? '位访客' : '次' }} {{ routeInfo.type == 2 ? '位访客' : '次' }}
</div> </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> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="browserRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable
<div slot="customerName" class="flex-align" slot-scope="scope"> 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"> <template v-if="scope.scope.customerAvatar">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block"> <el-popover
<img class="table-popover-img" :src="scope.scope.customerAvatar" /> placement="top"
<img class="img-36 pointer" slot="reference" :src="scope.scope.customerAvatar" /> 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> </el-popover>
</template> </template>
<span class="m-l-10">{{ scope.scope.customerName }}</span> <span class="m-l-10">{{ scope.scope.customerName }}</span>
</div> </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"> <template v-if="scope.scope.shareAvatar">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block"> <el-popover
<img class="table-popover-img" :src="scope.scope.shareAvatar" /> placement="top"
<img class="img-36 pointer" slot="reference" :src="scope.scope.shareAvatar" /> 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> </el-popover>
</template> </template>
<span class="m-l-10">{{ scope.scope.shareName }}</span> <span class="m-l-10">{{ scope.scope.shareName }}</span>
<span class="m-l-10">{{ scope.scope.sharePhone }}</span> <span class="m-l-10">{{ scope.scope.sharePhone }}</span>
</div> </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 :class="['table-circle', 'm-r-8', scope.scope.isBuy == 'Y' ? 'back-green' : 'back-grey']"></span>
<span> <span>
{{ {{
...@@ -53,8 +109,14 @@ ...@@ -53,8 +109,14 @@
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div
<el-button type="default" @click="handleJump">返回</el-button> class="footer"
:style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<el-button
type="default"
@click="handleJump"
>返回</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -65,7 +127,7 @@ import url from '@/assets/empty.png' ...@@ -65,7 +127,7 @@ import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant' import { exportFn } from '@/common/constant'
export default { export default {
name: 'browseList', name: 'browseList',
data() { data () {
return { return {
size: 'small', size: 'small',
url: url, url: url,
...@@ -122,49 +184,50 @@ export default { ...@@ -122,49 +184,50 @@ export default {
width: 230 width: 230
} }
] ]
} },
total: 0
} }
}, },
created() { created () {
const lastTableColumns = [ const lastTableColumns = [
{ {
label: '浏览时长', label: '浏览时长',
prop: 'browserTime' prop: 'browserTime'
}, },
{ {
label: '进入页面时间', label: '进入页面时间',
prop: 'operationDate', prop: 'operationDate',
width: '180' width: '180'
}, },
{ {
label: '离开页面时间', label: '离开页面时间',
prop: 'leaveDate', prop: 'leaveDate',
width: '180' width: '180'
}, },
{ {
label: '订单状态', label: '订单状态',
prop: 'isBuy', prop: 'isBuy',
addHtml: 'isBuy' addHtml: 'isBuy'
} }
], ],
{ query } = this.$route, { query } = this.$route,
name = { name = {
1: '浏览', 1: '浏览',
2: '访客', 2: '访客',
3: '分享' 3: '分享'
}[query.type], }[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 query.name = name
this.routeInfo = query this.routeInfo = query
this.getListApi = this.$apis.seckillActivity[ this.getListApi = apiName
{ if (query.type == 1) this.getTotal(apiName, query.id)
1: 'getBrowseListApi',
2: 'getVisitorListApi',
3: 'getSharedListApi'
}[query.type]
]
history.replaceState(null, null, `${url}&$title=${name}明细`) history.replaceState(null, null, `${url}&$title=${name}明细`)
// listName: // listName:
//1 浏览 2 访客 3 分享 //1 浏览 2 访客 3 分享
...@@ -211,19 +274,19 @@ export default { ...@@ -211,19 +274,19 @@ export default {
] ]
}, },
mounted() { mounted () {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}, },
methods: { methods: {
beforeSearchFn() { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.searchForm.activityId = this.routeInfo.id this.searchForm.activityId = this.routeInfo.id
resolve() resolve()
}) })
}, },
handleExport() { handleExport () {
var params = this.$common.utils.deepClone(this.searchForm) var params = this.$common.utils.deepClone(this.searchForm)
let { type } = this.routeInfo let { type } = this.routeInfo
params.pageNum = 1 params.pageNum = 1
...@@ -233,28 +296,36 @@ export default { ...@@ -233,28 +296,36 @@ export default {
}) })
}, },
handleJump(path, row = {}) { handleJump (path, row = {}) {
this.$router.push({ this.$router.push({
path: '/seckillActivity/crowdFundList' path: '/seckillActivity/crowdFundList'
}) })
}, },
setTableFinishFun() { setTableFinishFun () {
//接收到的数据为空 //接收到的数据为空
this.$refs.browserRef.data.length ? (this.$refs.browserRef.tableHeightValues = '') : this.$refs.browserRef.setTableHeightFun() this.$refs.browserRef.data.length ? (this.$refs.browserRef.tableHeightValues = '') : this.$refs.browserRef.setTableHeightFun()
}, },
handleSearch() { handleSearch () {
this.$refs.browserRef.refreshTable() this.$refs.browserRef.refreshTable()
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
activityId: this.routeInfo.id, activityId: this.routeInfo.id,
customerName: '', customerName: '',
mobile: '' mobile: ''
} }
this.handleSearch() 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!