Commit d9da072d by 前端

fixed

1 parent 93fc92d3
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:56
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-12-16 18:18:09
* @LastEditTime: 2022-12-19 15:54:12
* @FilePath: \scrm-micro-link\src\api\modules\activity.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -109,7 +109,7 @@ const updateApi = params => {
})
}
const getShared = params => {
params.method = `scrm.api.shopmall.goods.get.shared`
params.method = `scrm.api.shopmall.bulge.activity.get.shared`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-12-18 11:40:47
* @LastEditTime: 2022-12-20 10:18:30
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
......@@ -18,6 +18,12 @@ Vue.config.productionTip = false
Vue.prototype.$apis = apis
Vue.prototype.size = 'small'
Vue.prototype.defaultLabelWidth = '154px'
try {
const loginpath = JSON.parse(sessionStorage.getItem('SCRM_BASE_SESSION'))?.loginpath
if (loginpath == '/oss') Vue.prototype.loginpath = true
} catch (e) {
throw e
}
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-12-19 10:19:53
* @LastEditTime: 2022-12-20 10:43:27
* @FilePath: \scrm-micro-link\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......
......@@ -5,9 +5,11 @@
<div class="flex-space-between 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>
{{ routeInfo.type == 2 ? '位访客' : '次' }}
<template v-if="browseObj.browseType != 2">
浏览
</template>
<span>{{ browseCount || 0 }}</span>
{{ browseObj.browseType == 2 ? '位访客' : '次' }}
</div>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button>
</div>
......@@ -112,88 +114,90 @@ export default {
}
}
},
props: {
browseObj: {
type: Object,
default: () => {}
},
browseCount: {
type: Number,
default: 0
},
statDate: String
},
created() {
const { type } = this.browseObj
console.log(type)
const lastTableColumns = [
{
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')
query.name = name
this.routeInfo = query
{
label: '浏览时长',
prop: 'browserTime'
},
{
label: '进入页面时间',
prop: 'operationDate',
width: '180'
},
{
label: '离开页面时间',
prop: 'leaveDate',
width: '180'
},
{
label: '订单状态',
prop: 'isBuy',
addHtml: 'isBuy'
}
]
this.getListApi = this.$apis.seckillActivity[
{
1: 'getBrowseListApi',
2: 'getVisitorListApi',
3: 'getSharedListApi'
}[query.type]
}[type]
]
history.replaceState(null, null, `${url}&$title=${name}明细`)
// listName:
//1 浏览 2 访客 3 分享
// if (query.type != 2) {
// this.searchFormData.push({
// label: '订单状态',
// name: 'isBuy',
// type: 'select',
// width: '215px',
// optionList: [
// {
// confId: '',
// confName: '全部'
// },
// {
// confId: 'Y',
// confName: '已付款'
// },
// {
// confId: 'N',
// confName: '未付款'
// }
// ],
// optionId: 'confId',
// optionLabel: 'confName'
// })
// if (query.type == 3)
// this.tableParams.tableColumns.push({
// label: '分享时间',
// prop: 'sharedTime'
// })
// this.tableParams.tableColumns = [...this.tableParams.tableColumns, ...lastTableColumns]
// } else
// this.tableParams.tableColumns = [
// ...this.tableParams.tableColumns,
// {
// label: '浏览次数',
// prop: 'browseCount'
// },
// {
// label: '最后浏览时间',
// prop: 'lastBrowseDate'
// }
// ]
this.$nextTick(() => {
this.handleSearch()
})
// // listName:
// //1 浏览 2 访客 3 分享
if (type != 2) {
this.searchFormData.push({
label: '订单状态',
name: 'isBuy',
type: 'select',
width: '215px',
optionList: [
{
confId: '',
confName: '全部'
},
{
confId: 'Y',
confName: '已付款'
},
{
confId: 'N',
confName: '未付款'
}
],
optionId: 'confId',
optionLabel: 'confName'
})
this.tableParams.tableColumns = [...this.tableParams.tableColumns, ...lastTableColumns]
} else
this.tableParams.tableColumns = [
...this.tableParams.tableColumns,
{
label: '浏览次数',
prop: 'browseCount'
},
{
label: '最后浏览时间',
prop: 'lastBrowseDate'
}
]
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
......@@ -202,13 +206,15 @@ export default {
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.activityId = this.routeInfo.id
console.log(this.$parent)
this.searchForm.activityId = this.$route.query.activityId
if (this.browseObj.timeType) this.searchForm.recordDateStr = this.statDate
resolve()
})
},
handleExport() {
var params = this.$common.utils.deepClone(this.searchForm)
let { type } = this.routeInfo
let { type } = this.browseObj
params.pageNum = 1
params.pageSize = 999999
this.$apis.seckillActivity.exportBrowseApi(params, type).then(res => {
......@@ -229,7 +235,7 @@ export default {
},
handleReset() {
this.searchForm = {
activityId: this.routeInfo.id,
activityId: this.$route.query.activityId,
customerName: '',
mobile: ''
}
......
......@@ -15,7 +15,7 @@
</div>
<div class="value">
{{ dataBoard[item.key] || 0 }}
<span :class="{ disabled: !(dataBoard[item.key] || 0) }" @click="getDetail">详情</span>
<span :class="{ disabled: !(dataBoard[item.key] || 0) }" @click="getDetail(item, dataBoard[item.key])">详情</span>
</div>
<template v-if="item.half">
<div class="half">
......@@ -52,7 +52,7 @@
</div>
</div>
<GLDialog width="1158px" bigTitle="详情" :hasFooter="false" :visible.sync="dialogVisible" mode="big">
<browse-list ref="recordForm" v-if="dialogVisible"></browse-list>
<browse-list ref="recordForm" v-if="dialogVisible" :browseObj="browseObj" :browseCount="browseCount" :statDate="searchForm.statDate"></browse-list>
</GLDialog>
</div>
</template>
......@@ -62,12 +62,12 @@ import { downLoadFile, orderManageStatusList } from '@/common/constant'
import url from '@/assets/empty.png'
import browseList from './components/browseList.vue'
const dataList = [
{ name: '新增浏览量', key: 'browseCount', tips: '统计时间内,新增页面被浏览的次数(一人多次访问计为多次)', half: 'browseRingRatio' },
{ name: '新增访客数', key: 'fansCount', tips: '统计时间内访问页面的人数(一人多次访问计为一次)', half: 'fansRingRatio' },
{ name: '新增订单数', key: 'orderCount', tips: '统计时间内,新增订单数(只记录已付款的订单)', half: 'orderRingRatio' },
{ name: '累计浏览量', key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' },
{ name: '累计访客数', key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' },
{ name: '累计订单数', key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' }
{ name: '新增浏览量', type: 1, timeType: 1, key: 'browseCount', tips: '统计时间内,新增页面被浏览的次数(一人多次访问计为多次)', half: 'browseRingRatio' },
{ name: '新增访客数', type: 2, timeType: 1, key: 'fansCount', tips: '统计时间内访问页面的人数(一人多次访问计为一次)', half: 'fansRingRatio' },
{ name: '新增订单数', type: 1, timeType: 1, key: 'orderCount', tips: '统计时间内,新增订单数(只记录已付款的订单)', half: 'orderRingRatio' },
{ name: '累计浏览量', type: 1, key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' },
{ name: '累计访客数', type: 2, key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' },
{ name: '累计订单数', type: 2, key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' }
],
optionList = [
{ confId: '1', confName: '转发次数' },
......@@ -83,6 +83,8 @@ export default {
return {
dialogVisible: false,
url,
browseObj: {},
browseCount: 0,
dataList,
totalCount: 0,
searchForm: {
......@@ -101,6 +103,7 @@ export default {
type: 'datePicker',
dateType: 'date',
pickerOptions: 'beforeRangePickerOptions'
// isClear: true
}
],
searchRankForm: {
......@@ -138,7 +141,7 @@ export default {
label: '员工',
prop: 'shareName',
addHtml: 'shareName',
width: 220
width: 320
},
{
label: '转发次数',
......@@ -190,7 +193,27 @@ export default {
if (rankResetBtn) rankResetBtn.style.display = 'none'
},
methods: {
getDetail() {
getDetail(obj, count) {
if (!count) return
if (obj.key.toLowerCase().includes('order')) {
const timeParams =
obj.type == 1
? {
createdStartDateStr: this.searchForm.statDate,
createdEndDateStr: this.searchForm.statDate
}
: {}
this.$router.push({
path: '/activityOrder/index',
query: {
activityId: this.activityId,
...timeParams
}
})
return
}
this.browseObj = obj
this.browseCount = count
this.dialogVisible = true
},
getDataBoardApi() {
......
......@@ -1085,8 +1085,23 @@ export default {
// this.setMinHeight('.crowd-config')
this.routeInfo = this.$route.query
this.routeInfo.addOrEdit != 'add' && this.getInfo()
var id = this.routeInfo.id
var detailDisableList = ['editFormData']
const id = this.routeInfo.id
const detailDisableList = ['editFormData']
const disableObj = {
detail: ['editFormData', 'configEditFormData', 'serviceEditFormData', 'commoditysEditFormData', 'experiencesEditFormData', 'liveEditFormData'],
edit: ['editFormData']
}
if (this.routeInfo.addOrEdit == 'detail') {
this.isDisabled = true
disableObj.detail.forEach(attr => {
this.changeFormAttr(
attr,
'isDisabled',
this[attr].map(item => item.label),
true
)
})
}
if (id) {
if (this.routeInfo.addOrEdit == 'edit' && this.routeInfo.activityStatus == 2) {
// this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].forbidEdit()
......@@ -1659,7 +1674,7 @@ export default {
}
// 复制
if (this.routeInfo.addOrEdit == 'copy') {
let resetArr = [{ name: 'id' }, { name: 'activityTime', type: 'array' }, { name: 'liveBroadcastRoomId' }, { name: 'groupQrCode' }, { name: 'floatingMaskDiagram' }, { name: 'liveBroadcastRoomCover' }, { name: 'liveBroadcastRoomEndCover' }, { name: 'selectedProInfo', type: 'Object' }, { name: 'crowdFundingPrice' }]
let resetArr = [{ name: 'id' }, { name: 'liveBroadcastRoomId' }, { name: 'groupQrCode' }, { name: 'floatingMaskDiagram' }, { name: 'liveBroadcastRoomCover' }, { name: 'liveBroadcastRoomEndCover' }, { name: 'selectedProInfo', type: 'Object' }, { name: 'crowdFundingPrice' }]
this.copyReset(resetArr)
}
// this.getPayList()
......
......@@ -7,7 +7,7 @@
<!-- 表格区域 开始 -->
<div class="live-table-header">
<h2>活动列表</h2>
<el-button :size="size" type="primary" @click="handleEdit('add')">创建活动链接</el-button>
<el-button :size="size" type="primary" @click="handleEdit('add')" v-if="loginpath">创建活动链接</el-button>
</div>
<GLTable ref="classifyRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="giftInfo" slot-scope="scope">
......@@ -183,7 +183,7 @@ export default {
type: 'text'
},
condition: row => {
return row.activityStatus == '1'
return row.activityStatus == '1' && this.loginpath
},
listeners: {
click: this.start
......@@ -196,7 +196,7 @@ export default {
type: 'text'
},
condition: row => {
return row.activityStatus == '2'
return row.activityStatus == '2' && this.loginpath
},
listeners: {
click: this.end
......@@ -208,6 +208,9 @@ export default {
attrs: {
type: 'text'
},
condition: row => {
return this.loginpath
},
listeners: {
click: row => {
this.handleEdit('edit', row)
......@@ -216,13 +219,28 @@ export default {
},
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
condition: row => {
return !this.loginpath
},
listeners: {
click: row => {
this.handleEdit('detail', row)
}
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return row.activityStatus == '3'
return row.activityStatus == '3' && this.loginpath
},
listeners: {
click: this.del
......@@ -247,6 +265,9 @@ export default {
attrs: {
type: 'text'
},
condition: row => {
return this.loginpath
},
listeners: {
click: row => {
this.handleEdit('copy', row)
......@@ -269,6 +290,13 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
created() {
if (!this.loginpath) {
const filterName = ['merchantName', 'subscribe', 'businessType']
this.searchFormData = this.searchFormData.filter(item => !filterName.includes(item.name))
this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => !filterName.includes(item.prop))
}
},
mounted() {
this.searchFormData.forEach(item => {
if (item.type == 'select') {
......@@ -347,11 +375,12 @@ export default {
var txtObj = {
add: '新建',
edit: '编辑',
copy: '复制'
copy: '复制',
detail: '查看'
}[addOrEdit]
var params = {
addOrEdit: addOrEdit,
$title: encodeURI(txtObj + '众筹活动')
$title: encodeURI(txtObj + '活动')
}
if (addOrEdit != 'add') {
params.id = row.id
......
......@@ -82,7 +82,7 @@
</div>
</div>
<div slot="orderType" slot-scope="scope">
<el-switch :value="scope.scope.orderType == 1 ? true : false" class="switchStyle" @change="changeOrderType(scope.scope)" active-text="是" inactive-text="否"></el-switch>
<el-switch :disabled="!loginpath" :value="scope.scope.orderType == 1 ? true : false" class="switchStyle" @change="changeOrderType(scope.scope)" active-text="是" inactive-text="否"></el-switch>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
......@@ -613,6 +613,11 @@ export default {
},
beforeSearchFn() {
return new Promise(resolve => {
const { activityId, createdStartDateStr, createdEndDateStr } = this.$route.query
if (activityId) {
this.searchForm.createDate = createdStartDateStr ? [new Date(createdStartDateStr), new Date(createdEndDateStr)] : []
this.searchForm.activityId = activityId
}
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
......
......@@ -160,12 +160,12 @@ export default {
{
label: '核销门店',
prop: 'verificationMerchantName',
width: 300
width: 400
},
{
label: '核销日期',
prop: 'verificationTime',
width: 300
width: 400
}
]
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!