Commit b426b856 by 李伟康

提交代码

1 parent a12341f0
<template>
<div>
数据看板
<div class="marketing data-board">
<div class="data-board-box">
<p class="edit-title">数据看板</p>
<div class="p-20">
<GLCombiForm
ref="dataRef"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
></GLCombiForm>
<div class="data-view">
<template v-for="(item,index) in dataList">
<div
:key="index"
class="item"
>
<div class="name">
{{item.name}}
<el-popover
class="tips"
placement="top"
width="260"
trigger="hover"
:content="item.tips"
>
<img
slot="reference"
class="tips-icon"
src="@/components/glsx-combi-form/images/icon-tip.png"
/>
</el-popover>
</div>
<div class="value">10086</div>
<template v-if="item.half">
<div class="half">
日环比:
<img
src="@/assets/dataBoard/icon-half-up.png"
class="icon"
/>
<span class="num">14%</span>
</div>
</template>
</div>
</template>
</div>
</div>
</div>
<div class="data-board-box">
<p class="edit-title">员工排行榜</p>
<div class="p-20">
<GLCombiForm
ref="rankRef"
:rowNumber="1"
:formObj="searchRankForm"
:formData="searchFormRankData"
@handleOk="handleSearchRank"
></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button
:size="size"
class="default-blue-btn"
type="default"
@click="handleExport"
>导出</el-button>
</div>
<GLTable
ref="dataTableRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
</GLTable>
</div>
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import { exportFn } from '@/common/constant'
import url from '@/assets/empty.png'
const dataList = [
{ name: '新增浏览量', key: '', tips: '统计时间内,新增页面被浏览的次数(一人多次访问计为多次)', half: true },
{ name: '新增访客数', key: '', tips: '统计时间内访问页面的人数(一人多次访问计为一次)', half: true },
{ name: '新增订单数', key: '', tips: '统计时间内,新增订单数(只记录已付款的订单)', half: true },
{ name: '累计浏览量', key: '', tips: '页面被浏览的总次数(一人多次访问计为多次)' },
{ name: '累计访客数', key: '', tips: '访问页面的总人数(一人多次访问计为一次)' },
{ name: '累计订单数', key: '', tips: '累计订单总数(只记录已付款的订单)' }
], optionList = [
{ confId: '1', confName: '转发次数' },
{ confId: '2', confName: '访客总数' },
{ confId: '3', confName: '浏览总数' },
{ confId: '4', confName: '成交单量' },
{ confId: '5', confName: '转化率' }
]
export default {
name: 'ScrmMicroMarketingDataBoard',
data() {
data () {
return {
url,
dataList,
searchForm: {
day: dayjs().format('YYYY-MM-DD')
},
searchFormData: [
{
label: '统计日期',
name: 'day',
type: 'datePicker',
dateType: 'date',
pickerOptions: 'beforeRangePickerOptions'
}
],
searchRankForm: {
type: '1'
},
searchFormRankData: [
{
label: '统计维度',
name: 'type',
type: 'select',
width: '215px',
optionList,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'statusList'
}
],
getListApi: this.$apis.seckillActivity.getCrowdfundListApi,
tableSearchForm: {},
tableParams: {
listName: 'list',
tableColumns: [
// {
// label: '排名',
// formatter: cellValue => {
// console.log(cellValue,arguments)
// return ''
// }
// },
{
label: '员工',
prop: 'activityName',
width: 220
},
{
label: '转发次数',
prop: 'activityImg',
addHtml: 'activityImg'
},
{
label: '访客总数',
prop: 'viewAmount',
addHtml: 'linkText',
width: 140
},
{
label: '浏览总数',
prop: 'fansAmount',
addHtml: 'linkText'
},
{
label: '成交单量',
prop: 'shareAmount',
addHtml: 'linkText'
},
{
label: '转化率',
prop: 'saleAmount'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
}
},
mounted() {
mounted () {
let [dataResetBtn] = this.$refs.dataRef.$el.getElementsByClassName('el-button--default'),
[rankResetBtn] = this.$refs.rankRef.$el.getElementsByClassName('el-button--default')
if (dataResetBtn) dataResetBtn.style.display = 'none'
if (rankResetBtn) rankResetBtn.style.display = 'none'
},
methods: {
getParams () {
let params = JSON.parse(JSON.stringify(this.searchRankForm))
return params
},
handleSearch () {
},
handleSearchRank () {
this.$refs.dataTableRef.refreshTable()
},
handleExport () {
let params = this.getParams()
this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => {
exportFn(res)
})
},
beforeSearchFn () {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
setTableFinishFun () {
//接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
}
},
};
</script>
<style lang="scss" scoped>
.data-board {
&-box {
background: #ffffff;
&:last-of-type {
margin-top: 16px;
}
.data-view {
max-width: 854px;
display: flex;
flex-wrap: wrap;
gap: 16px;
padding-bottom: 12px;
.item {
width: 274px;
height: 128px;
background: #f9fafc;
border-radius: 4px;
box-sizing: border-box;
padding: 10px;
.name {
font-size: 14px;
color: #333333;
display: flex;
align-items: center;
height: 21px;
.tips {
margin-left: 4px;
}
}
.value {
padding: 20px 0;
font-size: 26px;
color: #333333;
line-height: 26px;
font-weight: bold;
}
.half {
font-size: 14px;
color: #666666;
line-height: 21px;
display: flex;
align-items: center;
.icon {
width: 16px;
height: 16px;
}
.num {
margin-left: 4px;
}
}
}
}
}
}
</style>
......@@ -1368,7 +1368,8 @@ export default {
{
label: '选择直播',
name: 'liveName',
type: 'input',
type: 'select',
tips: '暂无直播,请到运营平台直播间管理创建新的直播',
maxlength: 30
},
{
......@@ -1408,7 +1409,8 @@ export default {
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.loading = true
this.$apis.common
.uploadImgApi({ file: base64, fileType: 'image' })
// .uploadFundingVideoApi({ file: base64 })
.uploadVideoApi({ file: base64 })
.then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!