Commit a24470f2 by chenwq

众筹模式-浏览明细

1 parent cc83b24b
...@@ -24,6 +24,17 @@ const getCrowdfundListApi = params => { ...@@ -24,6 +24,17 @@ const getCrowdfundListApi = params => {
}) })
} }
//分页浏览明细
const getBrowseListApi = params => {
params.method = 'scrm.api.shopmall.customer.browse.records'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
//创建/编辑活动 //创建/编辑活动
const addOrUpdateActivityApi = params => { const addOrUpdateActivityApi = params => {
params.method = `${defaultPath}add.or.update` params.method = `${defaultPath}add.or.update`
...@@ -94,4 +105,4 @@ const getSharedApi = params => { ...@@ -94,4 +105,4 @@ const getSharedApi = params => {
}) })
} }
export default { getActivityPageApi, getCrowdfundListApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi } export default { getActivityPageApi, getCrowdfundListApi, getBrowseListApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi }
...@@ -235,6 +235,11 @@ html { ...@@ -235,6 +235,11 @@ html {
width: 100%; width: 100%;
} }
.marketing .img-36 {
width: 36px;
height: 36px;
}
.marketing .img-60 { .marketing .img-60 {
width: 60px; width: 60px;
height: 60px; height: 60px;
...@@ -299,10 +304,18 @@ html { ...@@ -299,10 +304,18 @@ html {
margin-right: 20px; margin-right: 20px;
} }
.marketing .m-l-10 {
margin-left: 10px;
}
.marketing .m-l-20 { .marketing .m-l-20 {
margin-left: 20px; margin-left: 20px;
} }
.marketing .p-20 {
padding: 20px;
}
.marketing.p-t-10, .marketing.p-t-10,
.marketing .p-t-10 { .marketing .p-t-10 {
padding-top: 10px; padding-top: 10px;
...@@ -565,10 +578,10 @@ html { ...@@ -565,10 +578,10 @@ html {
.marketing .line-20 { .marketing .line-20 {
line-height: 20px; line-height: 20px;
} }
.marketin .weight-5 { .marketing .weight-5 {
font-weight: 500; font-weight: 500;
} }
.marketin .weight-4 { .marketing .weight-4 {
font-weight: 400; font-weight: 400;
} }
.el-tooltip__popper.is-light { .el-tooltip__popper.is-light {
...@@ -589,12 +602,12 @@ html { ...@@ -589,12 +602,12 @@ html {
z-index: 4000 !important; z-index: 4000 !important;
} }
.loadingClass{ .loadingClass {
.el-icon-loading{ .el-icon-loading {
font-size: 22px; font-size: 22px;
} }
.el-icon-loading, .el-icon-loading,
.el-loading-text{ .el-loading-text {
color: #5850ff!important; color: #5850ff !important;
} }
}
\ No newline at end of file \ No newline at end of file
}
...@@ -346,9 +346,9 @@ const staticRoutes = Object.freeze([ ...@@ -346,9 +346,9 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'crowdFundDetail', name: 'browseList',
path: '/seckillActivity/crowdFundDetail', path: '/seckillActivity/browseList',
component: resolve => require([`@/views/seckillActivity/crowdFundDetail.vue`], resolve), component: resolve => require([`@/views/seckillActivity/browseList.vue`], resolve),
meta: {} meta: {}
} }
]) ])
......
<!-- 浏览明细 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container">
<p class="edit-title">{{ routeInfo.activityName }}</p>
<div class="p-20">
<GLCombiForm ref="showSearch" class="p-t-20" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="browserRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="customerName" 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.customerAvatar" />
<img class="img-36 pointer" slot="reference" :src="scope.scope.customerAvatar" />
</el-popover>
<span class="m-l-10">{{ scope.scope.customerName }}</span>
</div>
<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>
<!-- 表格区域 end -->
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleJump">返回</el-button>
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'browseList',
data() {
return {
size: 'small',
url: url,
footerLeft: '0',
footerWidth: '0',
routeInfo: {
id: '',
activityName: ''
},
searchForm: {
zoneName: ''
},
// 搜索
searchFormData: [
{
label: '微信昵称',
name: 'zoneName',
type: 'input',
maxlength: 50
},
{
label: '手机号',
name: 'zoneName',
type: 'input',
maxlength: 11
}
],
// 表格
getListApi: this.$apis.seckillActivity.getBrowseListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '微信名称',
prop: 'customerName',
addHtml: 'customerName'
},
{
label: '手机号',
prop: 'mobile'
},
{
label: '来源',
prop: 'shareName',
addHtml: 'shareName'
},
{
label: '浏览次数',
prop: 'browseCount'
},
{
label: '浏览时间',
prop: 'createdDate',
// width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
}
}
},
created() {
this.routeInfo = this.$route.query
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.activityId = this.routeInfo.id
resolve()
})
},
handleJump(path, row = {}) {
this.$router.push({
path: '/seckillActivity/crowdFundList'
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.browserRef.data.length ? (this.$refs.browserRef.tableHeightValues = '') : this.$refs.browserRef.setTableHeightFun()
},
handleSearch() {
this.$refs.browserRef.refreshTable()
},
handleReset() {
this.searchForm = {
zoneName: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
<!-- 专区管理 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container">
<p class="edit-title">活动名称</p>
<GLCombiForm ref="showSearch" class="p-t-20" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<!-- <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> -->
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'crowdFundDetail',
data() {
return {
size: 'small',
url: url,
searchForm: {
zoneName: '',
createDate: []
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '专区名称',
name: 'zoneName',
type: 'input',
maxlength: 20
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格按钮
// tableButtonList: [
// {
// type: 'GLButton',
// name: '编辑',
// attrs: {
// type: 'text',
// fn: '编辑'
// },
// listeners: {
// click: row => this.handleEdit(2, row)
// }
// },
// {
// type: 'el-button',
// name: '删除',
// attrs: {
// type: 'text'
// },
// listeners: {
// click: this.handleDelete
// }
// }
// ],
// 表格
getListApi: this.$apis.zoneList.getZoneListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '专区名称',
prop: 'zoneName'
},
{
label: '创建日期',
prop: 'createdDate',
// width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
mounted() { },
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.zoneType = '2' //专区类型(1发现频道,2商城专区)
if (this.searchForm.createDate.length) {
params.startTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
}
})
}
}
})
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
var params = {
addOrEdit: addOrEdit,
$title: encodeURI(addOrEdit == 1 ? '新建专区' : '编辑专区')
}
addOrEdit != 1 && (params.id = row.id)
this.$router.push({
path: '/zoneList/editZone',
query: params
})
},
handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该专区?', 'zoneList', 'deleteZoneApi', { id: row.id })
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.zoneRef.data.length ? (this.$refs.zoneRef.tableHeightValues = '') : this.$refs.zoneRef.setTableHeightFun()
},
handleSearch() {
this.$refs.zoneRef.refreshTable()
},
handleReset() {
this.searchForm = {
zoneName: '',
createDate: []
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
...@@ -364,9 +364,10 @@ export default { ...@@ -364,9 +364,10 @@ export default {
// 明细 // 明细
handleDetail(row) { handleDetail(row) {
this.$router.push({ this.$router.push({
path: '/seckillActivity/crowdFundDetail', path: '/seckillActivity/browseList',
query: { query: {
id: row.id id: row.id,
activityName: row.activityName
} }
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!