Commit 787d728c by yangming

bug

1 parent 35ff2c93
......@@ -12,7 +12,7 @@
"core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6",
"glsx-components": "^1.1.1",
"glsx-components": "^1.2.2",
"glsx-table": "^1.0.9",
"vue-draggable-resizable": "^2.3.0"
},
......
......@@ -7,9 +7,9 @@
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const getListApi = params => {
params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage'
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -19,7 +19,7 @@ const getListApi = params => {
})
}
const getFollower = params => {
params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage'
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -29,7 +29,7 @@ const getFollower = params => {
})
}
const querylabeltree = params => {
params.method = 'datahub.api.label.querylabeltree'
params.method = 'scrm.api.datahub.label.querylabeltree'
params.sessionId = session
return http({
url: '/rop-scrm-datahub/router',
......@@ -39,7 +39,7 @@ const querylabeltree = params => {
})
}
const deleteChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.deleteChannelCodeBill'
params.method = 'entmicro.api.code.deleteChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -49,7 +49,7 @@ const deleteChannelCodeBill = params => {
})
}
const getSubCodeChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.getSubCodeChannelCodeBill'
params.method = 'entmicro.api.code.getSubCodeChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -59,7 +59,7 @@ const getSubCodeChannelCodeBill = params => {
})
}
const saveChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.saveChannelCodeBill'
params.method = 'entmicro.api.code.saveChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -69,7 +69,7 @@ const saveChannelCodeBill = params => {
})
}
const updateChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.updateChannelCodeBill'
params.method = 'entmicro.api.code.updateChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -79,7 +79,7 @@ const updateChannelCodeBill = params => {
})
}
const listChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.listChannelCodeBill'
params.method = 'entmicro.api.code.listChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -90,7 +90,7 @@ const listChannelCodeBill = params => {
}
const deleteChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.deleteChannelCode'
params.method = 'entmicro.api.code.deleteChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -100,7 +100,7 @@ const deleteChannelCode = params => {
})
}
const detailChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.detailChannelCode'
params.method = 'entmicro.api.code.detailChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -110,7 +110,7 @@ const detailChannelCode = params => {
})
}
const listChannelCodeByPage = params => {
params.method = 'cn.com.glsx.entmicro.code.listChannelCodeByPage'
params.method = 'entmicro.api.code.listChannelCodeByPage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -120,7 +120,7 @@ const listChannelCodeByPage = params => {
})
}
const saveChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.saveChannelCode'
params.method = 'entmicro.api.code.saveChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -130,7 +130,7 @@ const saveChannelCode = params => {
})
}
const updateChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.updateChannelCode'
params.method = 'entmicro.api.code.updateChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......
......@@ -7,7 +7,7 @@
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
......@@ -36,7 +36,7 @@ const getCard = params => {
})
}
const findAllByPage = params => {
params.method = 'org.ore.api.dracIm.findAllByPage'
params.method = 'entmicro.api.dracIm.findAllByPage'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -46,7 +46,7 @@ const findAllByPage = params => {
})
}
const exportAdd = params => {
params.method = 'org.ore.api.dracIm.exportAdd'
params.method = 'entmicro.api.dracIm.exportAdd'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -56,7 +56,7 @@ const exportAdd = params => {
})
}
const findById = params => {
params.method = 'org.ore.api.dracIm.findById'
params.method = 'entmicro.api.dracIm.findById'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -66,7 +66,7 @@ const findById = params => {
})
}
const dracImMessage = params => {
params.method = 'org.ore.api.dracImMessage.findAllByCondition'
params.method = 'entmicro.api.dracImMessage.findAllByCondition'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -76,7 +76,7 @@ const dracImMessage = params => {
})
}
const listChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.listChannelCodeBill'
params.method = 'entmicro.api.code.listChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -86,7 +86,7 @@ const listChannelCodeBill = params => {
})
}
const addConfig = params => {
params.method = 'org.ore.api.dracImConfig.addConfig'
params.method = 'entmicro.api.dracImConfig.addConfig'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -96,7 +96,7 @@ const addConfig = params => {
})
}
const findConfig = params => {
params.method = 'org.ore.api.dracImConfig.findConfig'
params.method = 'entmicro.api.dracImConfig.findConfig'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -106,7 +106,7 @@ const findConfig = params => {
})
}
const updateConfig = params => {
params.method = 'org.ore.api.dracImConfig.updateConfig'
params.method = 'entmicro.api.dracImConfig.updateConfig'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......
......@@ -7,9 +7,9 @@
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const codeDefault = params => {
params.method = 'org.ore.api.drac.statistic.code.default'
params.method = 'entmicro.api.drac.statistic.code.default'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
......@@ -18,7 +18,7 @@ const codeDefault = params => {
})
}
const listStaff = params => {
params.method = 'org.ore.api.drac.statistic.code.detail.list.staff'
params.method = 'entmicro.api.drac.statistic.code.detail.list.staff'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
......@@ -27,7 +27,7 @@ const listStaff = params => {
})
}
const listTime = params => {
params.method = 'org.ore.api.drac.statistic.code.detail.list.time'
params.method = 'entmicro.api.drac.statistic.code.detail.list.time'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
......@@ -36,7 +36,7 @@ const listTime = params => {
})
}
const detailTotal = params => {
params.method = 'org.ore.api.drac.statistic.code.detail.total'
params.method = 'entmicro.api.drac.statistic.code.detail.total'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
......@@ -45,7 +45,7 @@ const detailTotal = params => {
})
}
const codeSearch = params => {
params.method = 'org.ore.api.drac.statistic.code.search'
params.method = 'entmicro.api.drac.statistic.code.search'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -55,7 +55,7 @@ const codeSearch = params => {
})
}
const codeTrend = params => {
params.method = 'org.ore.api.drac.statistic.code.trend'
params.method = 'entmicro.api.drac.statistic.code.trend'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -65,7 +65,7 @@ const codeTrend = params => {
})
}
const dayTrend = params => {
params.method = 'org.ore.api.drac.statistic.day.trend'
params.method = 'entmicro.api.drac.statistic.day.trend'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -75,7 +75,7 @@ const dayTrend = params => {
})
}
const overview = params => {
params.method = 'org.ore.api.drac.statistic.overview'
params.method = 'entmicro.api.drac.statistic.overview'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -84,6 +84,27 @@ const overview = params => {
sign: true
})
}
const viewChart = params => {
params.method = 'entmicro.api.customer.view.chart'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const findAllMessageByPage = params => {
params.method = 'entmicro.api.dracIm.findAllMessageByPage'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
codeDefault,
listStaff,
......@@ -92,5 +113,7 @@ export default {
codeSearch,
codeTrend,
dayTrend,
overview
overview,
viewChart,
findAllMessageByPage
}
\ No newline at end of file
......@@ -7,9 +7,9 @@
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const importsUpload = params => {
params.method = 'org.ore.api.imports.upload'
params.method = 'entmicro.api.imports.upload'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
......@@ -19,7 +19,7 @@ const importsUpload = params => {
})
}
const downloadModel = params => {
params.method = 'org.ore.api.imports.download.model'
params.method = 'entmicro.api.imports.download.model'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -29,7 +29,7 @@ const downloadModel = params => {
})
}
const importsRecord = params => {
params.method = 'org.ore.api.imports.record.page'
params.method = 'entmicro.api.imports.record.page'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -39,7 +39,7 @@ const importsRecord = params => {
})
}
const importsCount = params => {
params.method = 'org.ore.api.imports.count'
params.method = 'entmicro.api.imports.count'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -49,7 +49,7 @@ const importsCount = params => {
})
}
const importsKey = params => {
params.method = 'org.ore.api.imports.record.key'
params.method = 'entmicro.api.imports.record.key'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
......@@ -58,10 +58,20 @@ const importsKey = params => {
sign: true
})
}
const findLoginCount = params => {
params.method = 'entmicro.api.common.findLoginCount'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
importsUpload,
downloadModel,
importsRecord,
importsCount,
importsKey
importsKey,
findLoginCount
}
\ No newline at end of file
<template>
<div class="glsx-table">
<el-table style="width: 100%" id="initTable" :ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'" :data="getListApi ? data : tableData" :row-key="tableParams.mutiSelectUniqueKey || ''" v-loading="loading" :height="tableHeightValues" :border="border" :tableId="tableId" :highlight-current-row="true" :stripe="true" @sort-change="sortChange" @selection-change="handleSelect" :size="size" :header-cell-style="headerStyle">
<el-table id="initTable" :ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'" :data="getListApi ? data : tableData" :row-key="tableParams.mutiSelectUniqueKey || ''" v-loading="loading" :height="tableHeightValues" :border="border" :tableId="tableId" :highlight-current-row="true" :stripe="true" @sort-change="sortChange" @selection-change="handleSelect" :size="size" :header-cell-style="headerStyle">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" type="selection" width="55" :selectable="checkSelectable" :reserve-selection="true"></el-table-column>
<el-table-column v-if="hasNum" align="center" width="60px" label="序号" type="index" :index="index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"></el-table-column>
<el-table-column v-for="(item, index) in tableColumns" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :align="item.align || 'center'" :sortable="item.sortable">
<el-table-column v-for="(item, index) in tableColumns" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'center'" :sortable="item.sortable">
<template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
......@@ -34,18 +34,15 @@
<el-pagination v-if="hasPage" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page[this.pageConf.pageNum]" :page-sizes="[10, 20, 30, 40]" :page-size="page[this.pageConf.pageSize]" :total="getListApi ? total : tableTotal" :layout="layout"></el-pagination>
</div>
</template>
<script>
import { Table, TableColumn, Pagination } from 'element-ui'
export default {
name: 'GLTable',
components: {
[Table.name]: Table,
[TableColumn.name]: TableColumn,
[Pagination.name]: Pagination
},
props: {
size: {
type: String,
......@@ -184,7 +181,6 @@ export default {
}
}
},
data() {
return {
loading: false,
......@@ -195,12 +191,10 @@ export default {
// 多选数组
mutiSelectArr: {},
tableColumns: [],
showClass: false,
tableHeightValues: null
}
},
watch: {
customHeadShowList(val) {
this.isCustomHead && this.findShowHeadCol()
......@@ -213,7 +207,6 @@ export default {
// deep: true
// }
},
methods: {
findShowHeadCol() {
this.tableColumns = []
......@@ -236,13 +229,11 @@ export default {
sortChange({ column, prop, order }) {
this.$emit('sortChange', { column, prop, order })
},
// 多选
handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val;
this.mutiSelectArr[this.tableParams.mutiSelectName] = val
this.$emit('selectionTable', val)
},
// 清空多选
clearMutiSelect() {
this.mutiSelectArr[this.tableParams.mutiSelectName] = []
......@@ -253,8 +244,8 @@ export default {
//navHeight 传值底部高度
var baseNavEle = document.querySelector('.scrm-base-nav')
var baseSubNavEle = document.querySelector('.scrm-base-sub-nav')
var baseNavEleHeight = baseNavEle?baseNavEle.clientHeight : 0;
var baseSubNavEleHeight = baseSubNavEle?baseSubNavEle.clientHeight : 0
var baseNavEleHeight = baseNavEle ? baseNavEle.clientHeight : 0
var baseSubNavEleHeight = baseSubNavEle ? baseSubNavEle.clientHeight : 0
let paginationHeight
if (document.querySelector('.el-pagination')) {
paginationHeight = document.querySelector('.el-pagination').clientHeight + 20
......@@ -263,12 +254,10 @@ export default {
}
let offsettop = document.getElementById('initTable').offsetTop
let clientHeight = document.documentElement.clientHeight
// document.getElementById('initTable').style.height = clientHeight - offsettop - paginationHeight - navHeight + 'px'
// document.querySelector('.el-table__empty-block').style.height=(clientHeight - offsettop - paginationHeight - navHeight)+'px';
this.tableHeightValues = clientHeight - offsettop - paginationHeight - baseNavEleHeight - baseSubNavEleHeight - 10 - 30 - 20 + 'px'
},
refreshTable(isResetPageNum = true, isClearMuti = true) {
this.beforeSearchFn().then(res => {
// 清空多选
......@@ -284,12 +273,13 @@ export default {
}
this.getListApi(params)
.then(res => {
console.log(res)
this.data = this.findVal(res, this.tableParams.listName)
this.total = this.findVal(res, this.pageConf.totalCount)
this.loading = false
if (this.data.length) {
this.$emit('setTableFinishFun', this.data) //表格请求到数据
} else {
this.setTableHeightFun()
}
})
.catch(() => {
......@@ -297,7 +287,6 @@ export default {
})
})
},
// 找返回值
findVal(res, rankStr) {
var rankList = rankStr.split('.')
......@@ -306,23 +295,18 @@ export default {
}
return this.findVal(res[rankList[0]], rankList.splice(1).join('.'))
},
// 每页条数
handleSizeChange(value) {
let offsettop = document.getElementById('initTable').offsetTop
console.log('表格距离顶部1', offsettop)
this.page[this.pageConf.pageSize] = value
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
},
// 页码
handleCurrentChange(value) {
this.page[this.pageConf.pageNum] = value
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
}
},
mounted() {
this.isCustomHead ? this.findShowHeadCol() : (this.tableColumns = this.tableParams.tableColumns)
this.page = {}
......@@ -331,8 +315,7 @@ export default {
this.getListApi && this.refreshTable()
}
}
</script>
</script>
<style>
.a-click {
cursor: pointer;
......@@ -344,6 +327,8 @@ export default {
margin: 10px 0;
}
.glsx-table .line-ellipsis {
display: -webkit-box;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
/* -webkit-line-clamp: 2; */
......@@ -365,50 +350,35 @@ export default {
height: 10px;
/* display: none; */
}
/*正常情况下滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/* background-color: rgba(0, 0, 0, 0.2); */
background: #e9e8ff;
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
/* &::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
} */
/*正常时候的主干部分*/
.el-table__body-wrapper::-webkit-scrollbar-track {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*鼠标悬浮在滚动条上的主干部分*/
/* .el-table__body-wrapper::-webkit-scrollbar-track:hover {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.01);
} */
/* .hasTableContent .el-table__body{
height: 100%;
} */
......
<template>
<div class="square-main">
<el-dialog
title="选择跟进专员"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm" label-width="80px">
<el-form-item size="small" label="员工">
<el-input
v-model="tableSearchForm.staffName"
placeholder="请输入员工姓名"
></el-input>
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
@selectionTable="selectionTable"
>
</GLTable>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
export default {
name: "selectEmp",
name: 'selectEmp',
data() {
return {
loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: "data",
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: "id",
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: "salelist",
mutiSelectName: 'salelist',
tableColumns: [
{
label: "姓名",
prop: "staffName",
label: '姓名',
prop: 'staffName'
},
{
label: "部门",
prop: "departmentName",
label: '部门',
prop: 'departmentName'
},
{
label: "测试专员类型",
prop: "followerTypeName",
},
],
label: '跟进专员类型',
prop: 'followerTypeName'
}
]
},
layout: "sizes, prev, pager, next, jumper, ->, total",
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectItem: [],
};
selectEmp: []
}
},
methods: {
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.channel.getFollower(params).then((res) => {
console.log(res);
this.tableData = res.data;
this.tableTotal = res.count;
});
pageNum: this.$refs.table.page.pageNum
}
this.$apis.channel.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
this.tableData.forEach(item => {
this.selectEmp.forEach((itm, index) => {
if (itm.staffId == item.relationId) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
this.selectEmp.splice(index, 1)
}
})
})
})
},
init() {
this.dialogVisible = true;
init(item) {
this.tableSearchForm = {}
this.selectEmp = JSON.parse(JSON.stringify(item))
this.dialogVisible = true
this.$nextTick(() => {
this.getFollower();
});
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower();
this.getFollower()
},
selectionTable(val) {
this.selectItem = val;
this.selectItem = val
},
handleSelect() {
this.dialogVisible = false;
this.$emit("selectTable", this.selectItem);
handleClose() {
this.handleCancel()
},
},
};
handleCancel: utils.debounce(function () {
this.dialogVisible = false
this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, 300),
handleSelect: utils.debounce(function () {
this.loading = true
let selectEmp = this.selectEmp.map(item => {
return {
relationId: item.staffId,
staffName: item.staffName
}
})
const selectItem = this.selectItem.concat(selectEmp)
if (selectItem.length == 0) {
this.$message.error('请选择员工')
return
}
this.loading = false
this.dialogVisible = false
this.$emit('selectTable', this.selectItem.concat(selectEmp))
this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, 300)
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<style lang="scss" scoped>
.square-main {
/deep/ {
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
\ No newline at end of file
......@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
return new Http().get(' https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
return new Http({request: { timeout: 100000}}).get(' https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -5,17 +5,17 @@ const staticRoutes = Object.freeze([{
meta: {},
}, {
name: 'channel',
path: '/channel/store/:id?/:codeUuid?',
path: '/channel/store/:id/:codeUuid',
component: resolve => require([`@/views/channel/store.vue`], resolve),
meta: {}
}, {
name: 'addCode',
path: '/channel/addCode/:id?/:codeUuid?',
path: '/channel/addCode/:id/:codeUuid',
component: resolve => require([`@/views/channel/addCode.vue`], resolve),
meta: {}
}, {
name: 'poster',
path: '/channel/poster/:id?',
path: '/channel/poster/:id',
component: resolve => require([`@/views/channel/poster.vue`], resolve),
meta: {}
}, {
......@@ -30,7 +30,7 @@ const staticRoutes = Object.freeze([{
meta: {}
}, {
name: 'importResult',
path: '/square/importResult/:id?',
path: '/square/importResult/:id',
component: resolve => require([`@/views/square/importResult.vue`], resolve),
meta: {}
}, {
......@@ -55,7 +55,7 @@ const staticRoutes = Object.freeze([{
meta: {}
}, {
name: 'friends',
path: '/friends/index',
path: '/friends/index/:id',
component: resolve => require([`@/views/friends/index.vue`], resolve),
meta: {}
}])
......
......@@ -2,13 +2,13 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton ,GLTable} from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
import 'glsx-components/src/theme/theme.scss'
import '@/assets/css/common.scss'
let routes = []
......
......@@ -17,6 +17,9 @@ const render = (base, routes) => {
routes,
mode: 'history'
})
router.afterEach(() => {
document.querySelector("#app").scrollTop = 0;
})
const vm = new Vue({
router,
store,
......
import { Message } from 'element-ui'
let util = {}
util.cloneText = function(message) {
util.cloneText = function (message) {
let input = document.createElement('input')
input.value = message
document.body.appendChild(input)
......@@ -9,7 +9,7 @@ util.cloneText = function(message) {
document.body.removeChild(input)
Message.success('复制成功')
}
util.getBeforeDate = function(sign = '-') {
util.getBeforeDate = function (sign = '-') {
let day = new Date();
let month = day.getMonth() + 1;
let date = day.getDate();
......@@ -18,37 +18,66 @@ util.getBeforeDate = function(sign = '-') {
var s = day.getFullYear() + sign + month + sign + date;
return s;
}
util.getBeforeMonth = function(days) {
let month = new Date().getMonth() + 1;
let year = new Date().getFullYear();
let arr = new Array();
for (let i = 0; i < days; i++) {
if (month <= 0) {
year = year - 1;
month = month + 12;
}
if (month < 10) month = '0' + month;
arr[i] = year + '年' + month + '月'
month--
util.getBeforeMonth = function (days) {
let month = new Date().getMonth() + 1;
let year = new Date().getFullYear();
let arr = new Array();
for (let i = 0; i < days; i++) {
if (month <= 0) {
year = year - 1;
month = month + 12;
}
return arr;
if (month < 10) month = '0' + month;
arr[i] = year + '年' + month + '月'
month--
}
/**
* 格式化时间
* @param {Array} time
*/
util.formatTime = function(time) {
return arr;
}
/**
* 格式化时间
* @param {Array} time
*/
util.formatTime = function (time) {
return {
startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : ''
}
}
util.downloadIamge = function(imgsrc, name = new Date().getTime()) {
util.tringToDate = function (dateStr, separator) {
if (!separator) {
separator = "-";
}
var dateArr = dateStr.split(separator);
var year = parseInt(dateArr[0]);
var month;
//处理月份为04这样的情况
if (dateArr[1].indexOf("0") == 0) {
month = parseInt(dateArr[1].substring(1));
} else {
month = parseInt(dateArr[1]);
}
var day = parseInt(dateArr[2]);
var date = new Date(year, month - 1, day);
return date;
}
util.getDay = function (num, str = '-') {
var today = new Date();
var nowTime = today.getTime();
var ms = 24 * 3600 * 1000 * num;
today.setTime(parseInt(nowTime + ms));
var oYear = today.getFullYear();
var oMoth = (today.getMonth() + 1).toString();
if (oMoth.length <= 1) oMoth = '0' + oMoth;
var oDay = today.getDate().toString();
if (oDay.length <= 1) oDay = '0' + oDay;
return oYear + str + oMoth + str + oDay;
}
util.downloadIamge = function (imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image();
// 解决跨域 Canvas 污染问题
image.setAttribute("crossOrigin", "anonymous");
image.onload = function() {
image.onload = function () {
var canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
......
......@@ -7,29 +7,12 @@
<el-radio-button label="3">近2周</el-radio-button>
<el-radio-button label="4">近1个月</el-radio-button>
</el-radio-group>
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="80px">
<el-form-item size="small" label="添加时间">
<el-date-picker
v-model="tableSearchForm.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
<el-date-picker v-model="tableSearchForm.time" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item size="small" label="渠道名称">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入渠道名称"
>
</el-input>
<el-input size="small" v-model="tableSearchForm.keyWord" placeholder="请输入渠道名称"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
......@@ -40,7 +23,7 @@
<div class="channel-chart-box">
<div class="channel-chart-title">新增客户走势</div>
<div class="channel-chart-container">
<linechart></linechart>
<linechart ref="channelLine"></linechart>
</div>
</div>
<div class="channel-chart-desc">
......@@ -49,8 +32,11 @@
<div class="chart-title-time">昨日</div>
<div class="chart-title-num">各渠道新增客户数</div>
</div>
<div class="chart-desc-item" v-for="(item, index) in selectItem" :key="index">
<div class="chart-item-title"><span>-</span> {{ item.codeState }}</div>
<div class="chart-desc-item" v-for="(item, index) in channel" :key="index">
<div class="chart-item-title">
<span>-</span>
{{ item.codeName }}
</div>
<div class="chart-item-num">{{ item.newlyCount }}</div>
</div>
</div>
......@@ -60,105 +46,135 @@
</div>
</div>
</div>
<GLTable
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
>
</GLTable>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch"></GLTable>
<select-channel ref="channelForm" @selectTable="selectTable"></select-channel>
</div>
</template>
<script>
import linechart from "./linechart";
import selectChannel from "./selectChannel";
import utils from '@/utils/util'
import linechart from './linechart'
import selectChannel from './selectChannel'
export default {
name: "channelStatistics",
name: 'channelStatistics',
components: {
linechart,
selectChannel,
selectChannel
},
data() {
return {
timeRadio: 1,
trendType: 1,
channel: [],
tableSearchForm: {},
tableParams: {
listName: "data",
listName: 'data',
tableOption: false,
tableColumns: [
{
label: "渠道名称",
prop: "codeState",
label: '渠道名称',
prop: 'codeName'
},
{
label: "新增客户数",
prop: "newlyCount",
label: '新增客户数',
prop: 'newlyCount'
},
{
label: "留存客户数",
prop: "newlyKeepCount",
label: '留存客户数',
prop: 'newlyKeepCount'
},
{
label: "日期",
prop: "timeFrame",
},
],
label: '日期',
prop: 'timeFrame'
}
]
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
layout: "sizes, prev, pager, next, jumper, ->, total",
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectItem: [],
};
startTime: '',
endTime: '',
selectItem: []
}
},
watch: {
timeRadio() {
this.trendType = this.timeRadio
}
},
methods: {
handleSearch() {
this.getListChannel();
this.getListChannel()
this.codeSearch();
this.getFollower();
},
getListChannel() {
this.$apis.overview.codeDefault({}).then(res => {
console.log(res)
this.selectItem = res
this.selectItem.forEach(item => {
this.codeTrend(item.codeId)
})
})
},
codeSearch() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.overview.codeSearch(params).then((res) => {
this.tableData = res.data;
this.tableTotal = res.count;
});
this.$apis.overview.codeDefault({}).then((res) => {
console.log(res);
this.selectItem = res;
this.selectItem.forEach((item) => {
this.codeTrend(item.codeId);
});
});
startTime: this.startTime,
endTime: this.endTime,
trendType: this.trendType
}
this.$apis.overview.codeSearch(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
})
},
codeTrend(codeId) {
this.$apis.overview.codeTrend({ codeId }).then((res) => {
console.log(res);
});
codeTrend(codeIds,codeName) {
this.$apis.overview.codeTrend({ codeIds }).then(res => {
this.$refs.channelLine.init(res,codeName)
})
},
selectTable(item) {
console.log(item);
console.log(item)
},
handleChannel() {
this.$refs.channelForm.init();
this.$refs.channelForm.init()
},
getFollower() {
var params = {
pageSize: 8,
pageNum: 1,
};
this.$apis.channel.listChannelCodeByPage(params).then((res) => {
this.channel = res.data;
let codeId = [];
let codeName = [];
this.channel.forEach(item=>{
codeId.push(item.codeState)
codeName.push(item.codeName)
})
this.codeTrend(codeId,codeName)
});
},
},
mounted() {
this.getListChannel();
},
};
this.getListChannel()
this.getFollower();
}
}
</script>
<style lang="scss" scoped>
.channel-main {
padding: 10px;
/deep/ {
.el-radio-group {
margin-top: 3px;
}
}
}
.channel-chart {
display: flex;
......
......@@ -3,83 +3,63 @@
</template>
<script>
import * as echarts from "echarts";
import * as echarts from 'echarts'
export default {
name: "linechart",
name: 'linechart',
data() {
return {};
return {}
},
methods: {
getChart() {
let chartDom = document.getElementById("channel-main");
let myChart = echarts.init(chartDom);
let option;
init(chartList,codeName) {
let time = chartList[0].trendItemList.map(item => {
return item.dayTime
})
let seriesList = chartList.map((item,index) => {
let newlyQyCount = []
item.trendItemList.forEach(i => {
newlyQyCount.push(i.newlyQyCount)
})
return {
name: codeName[index],
type: 'line',
data: newlyQyCount
}
})
let chartDom = document.getElementById('channel-main')
let myChart = echarts.init(chartDom)
let option
option = {
legend: {
left: "auto",
icon: "stack",
legend: {
left: 'auto',
icon: 'stack',
itemHeight: 2,
textStyle: { color: ["#5850FF", "#FF6D00"] },
itemWidth: 12,
textStyle: { color: ['#5850FF', '#FF6D00'] },
itemWidth: 12
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: "category",
type: 'category',
boundaryGap: false,
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
data: time
},
yAxis: {
type: "value",
type: 'value'
},
series: [
{
name: "Email",
type: "line",
stack: "Total",
data: [120, 132, 101, 134, 90, 230, 210],
},
{
name: "Union Ads",
type: "line",
stack: "Total",
data: [220, 182, 191, 234, 290, 330, 310],
},
{
name: "Video Ads",
type: "line",
stack: "Total",
data: [150, 232, 201, 154, 190, 330, 410],
},
{
name: "Direct",
type: "line",
stack: "Total",
data: [320, 332, 301, 334, 390, 330, 320],
},
{
name: "Search Engine",
type: "line",
stack: "Total",
data: [820, 932, 901, 934, 1290, 1330, 1320],
},
],
};
series: seriesList
}
option && myChart.setOption(option);
},
},
mounted() {
this.getChart();
},
};
option && myChart.setOption(option)
}
}
}
</script>
<style scoped lang="scss">
......
......@@ -3,26 +3,30 @@
<div class="preview-content">
<div class="preview-time">{{ currentTime }}</div>
<div class="preview-info" v-for="item in previewList" :key="item.id">
<!-- <img class="avatar" src="@/assets/img/logo.png" alt="" /> -->
<template v-if="item.type == 'text'">
<div class="preview-text text">{{ item.content }}</div>
<img class="avatar" src="@/assets/img/guestCustom/logo.png" alt="" />
<template v-if="item.attType == 1">
<div class="preview-text text">{{ item.attContent }}</div>
</template>
<template v-else-if="item.type == 'link'">
<template v-else-if="item.attType == 4">
<div class="preview-text preview-link">
{{ item.url }}
{{ item.attContent.url }}
<img src="@/assets/img/guestCustom/preview-link.png" alt="" />
</div>
</template>
<template v-else-if="item.type == 'img'">
<el-image style="width: 100px" :src="item.url" fit="contain"></el-image>
<template v-else-if="item.attType == 2">
<el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
</template>
<template v-else-if="item.type == 'applet'">
<template v-else-if="item.attType == 3">
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> -->
<video style="width: 100px" :src="item.attContent"></video>
</template>
<template v-else-if="item.attType == 5">
<div class="preview-text text preview-applet">
<div class="preview-applet-title">
<img :src="item.appleIcon" alt="" />
<span>{{ item.title }}</span>
<img :src="item.attContent.picUrl" alt="" />
<span>{{ item.attContent.title }}</span>
</div>
{{ item.content }}
{{ item.attContent.page }}
</div>
</template>
</div>
......@@ -54,8 +58,7 @@ export default {
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
}
}
</script>
</script>
<style lang="scss" scope>
.img-bg {
position: relative;
......@@ -87,10 +90,11 @@ export default {
}
.preview-text {
position: relative;
max-width: 190px;
max-width: 169px;
color: #333;
background-color: #fff;
border-radius: 4px;
word-wrap: break-word;
}
.text {
font-size: 16px;
......
......@@ -43,7 +43,7 @@ export default {
tableColumns: [
{
label: "渠道名称",
prop: "codeState",
prop: "codeName",
},
{
label: "备注",
......@@ -90,4 +90,19 @@ export default {
};
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<style lang="scss" scoped>
.square-main {
/deep/ {
.el-table {
height: 50vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
\ No newline at end of file
......@@ -3,148 +3,123 @@
<div><el-button type="primary" size="small" @click="goback">返回</el-button></div>
<div class="detail-form">
<el-form :inline="true" :model="detailCodeForm" label-width="120px">
<el-row><el-form-item size="small" label="渠道名称:"> {{detailCodeForm.codeState}}</el-form-item></el-row>
<el-row><el-form-item size="small" label="备注:"> {{detailCodeForm.codeRemark}}</el-form-item></el-row>
<el-row
><el-form-item size="small" label="使用员工:">
<el-row>
<el-form-item size="small" label="渠道名称:">{{ detailCodeForm.codeName }}</el-form-item>
</el-row>
<el-row class="remark-row">
<el-form-item size="small" label="备注:">{{ detailCodeForm.codeRemark }}</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="使用员工:">
<div class="form-row">
<div class="emp-item" v-for="(item,index) in detailCodeForm.staffInfo" :key="index">{{item.staffName}}</div>
</div> </el-form-item
></el-row>
<el-row
><el-form-item size="small" label="标签:">
<div class="emp-item" v-for="(item, index) in detailCodeForm.staffInfo" :key="index">{{ item.staffName }}</div>
</div>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="标签:">
<div class="form-row">
<template v-for="item in tagging">
<div
class="tag-item"
v-for="(tag, idx) in item.labelList"
:key="idx"
>
{{ tag.name }}
</div>
</template>
<template v-for="item in tagging">
<div class="tag-item" v-for="(tag, idx) in item.labelList" :key="idx">
{{ tag.name }}
</div>
</template>
</div>
</el-form-item></el-row
>
</el-form-item>
</el-row>
</el-form>
<div class="count-panel">
<div class="count-panel-item">
<div class="count-item-title">昨日新增客户</div>
<div class="count-item-num">{{totalNum.newlyTotalCount}}人</div>
<img src="@/assets/img/channel/count1.png" class="count-item-icon" />
<div class="count-item-num">{{ totalNum.newlyTotalCount }}人</div>
<img src="@/assets/img/channel/count3.png" class="count-item-icon" />
</div>
<div class="count-panel-item">
<div class="count-item-title">总新增客户</div>
<div class="count-item-num">{{totalNum.todayNewlyCount}}人</div>
<div class="count-item-num">{{ totalNum.todayNewlyCount }}人</div>
<img src="@/assets/img/channel/count2.png" class="count-item-icon" />
</div>
<div class="count-panel-item">
<div class="count-item-title">
<span>留存客户总数</span>
<el-popover
placement="top"
title="说明"
width="200"
trigger="hover"
content="该渠道所有扫码新增的客户中,目前未删好友的客户数"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
<el-popover placement="top" width="200" trigger="hover" content="该渠道所有扫码新增的客户中,目前未删好友的客户数">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="count-item-num">{{totalNum.keepTotalCount}}人</div>
<img src="@/assets/img/channel/count3.png" class="count-item-icon" />
<div class="count-item-num">{{ totalNum.keepTotalCount }}人</div>
<img src="@/assets/img/channel/count1.png" class="count-item-icon" />
</div>
</div>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName" @tab-click="handleClick" type="card" class="tab-panel">
<el-tab-pane label="按日期查看" name="1"></el-tab-pane>
<el-tab-pane label="按成员查看" name="2"></el-tab-pane>
</el-tabs>
<GLTable
v-show="activeName == 1"
ref="timeTable"
:getListApi="getTimeApi"
:tableParams="tableParams"
:pageConf="pageConf"
:hasNum="false"
>
</GLTable>
<GLTable
v-show="activeName == 2"
ref="memberTabel"
:getListApi="getMemberApi"
:tableParams="tableMemberParams"
:pageConf="pageMemberConf"
:hasNum="false"
>
</GLTable>
<GLTable v-show="activeName == 1" ref="timeTable" :getListApi="getTimeApi" :tableParams="tableParams" :pageConf="pageConf" :hasNum="false"></GLTable>
<GLTable v-show="activeName == 2" ref="memberTabel" :getListApi="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false"></GLTable>
</div>
</template>
<script>
export default {
name: "store",
name: 'store',
data() {
return {
totalNum: {},
activeName: '1',
detailCodeForm:{},
detailCodeForm: {},
tableSearchForm: {},
getMemberApi: this.$apis.overview.listStaff,
getTimeApi: this.$apis.overview.listTime,
tableParams: {
listName: "data",
listName: 'data',
tableOption: false,
tableColumns: [
{
label: "新增客户数",
prop: "newlyTotalCount"
label: '新增客户数',
prop: 'newlyTotalCount'
},
{
label: "留存客户数",
prop: "keepTotalCount",
label: '留存客户数',
prop: 'keepTotalCount'
},
{
label: "日期",
prop: "dayTime"
},
],
label: '日期',
prop: 'dayTime'
}
]
},
tableMemberParams: {
listName: "data",
listName: 'data',
tableOption: false,
tableColumns: [
{
label: "员工姓名",
prop: "staffName",
label: '员工姓名',
prop: 'staffName'
},
{
label: "新增客户数",
prop: "newlyTotalCount",
label: '新增客户数',
prop: 'newlyTotalCount'
},
{
label: "留存客户数",
prop: "keepTotalCount",
label: '留存客户数',
prop: 'keepTotalCount'
},
{
label: "日期",
prop: "dayTime"
},
],
label: '日期',
prop: 'dayTime'
}
]
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
pageMemberConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
pageMemberConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tagging: [],
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
staffStatusList: []
}
}
},
methods: {
goback() {
......@@ -153,30 +128,33 @@ export default {
detailChannelCode(id, codeUuid) {
let param = {
id,
codeUuid,
};
this.$apis.channel.detailChannelCode(param).then((res) => {
this.detailCodeForm = Object.assign({}, res);
this.tagging = eval("(" + res.tagging + ")");
});
codeUuid
}
this.$apis.channel.detailChannelCode(param).then(res => {
this.detailCodeForm = Object.assign({}, res)
this.tagging = eval('(' + res.tagging + ')')
})
},
detailTotal(codeId) {
this.$apis.overview.detailTotal({codeId}).then((res) => {
this.totalNum = res;
this.$apis.overview.detailTotal({ codeId }).then(res => {
this.totalNum = res
})
}
},
mounted() {
const {id,codeUuid} = this.$route.params;
this.detailChannelCode(id,codeUuid)
this.detailTotal();
},
};
const { id, codeUuid } = this.$route.params
this.detailChannelCode(id, codeUuid)
this.detailTotal()
}
}
</script>
<style lang="scss" scoped>
.channel-main {
padding: 20px;
.remark-row {
color: #7d7d7d;
}
.detail-form {
margin-top: 10px;
.form-row {
......@@ -206,7 +184,7 @@ export default {
padding-left: 12px;
margin-right: 25px;
&::before {
content: "";
content: '';
position: absolute;
top: 6px;
left: 0px;
......@@ -258,4 +236,33 @@ export default {
}
}
}
.tab-panel {
margin-bottom: 20px;
display: inline-block;
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择活动"
:visible.sync="dialogVisible"
width="70%"
:before-close="handleClose"
>
<el-dialog title="选择活动" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<div class="model-panel">
<div class="model-panel-tab">
<label>活动类型:</label>
......@@ -16,91 +11,39 @@
<el-tab-pane label="活码海报" name="4"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length>0">
<div class="model-item" :class="{'checked': selectItem == item}" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="model-item-title" v-show="activeName == 3">
{{ item.cardClassName }}
</div>
<div class="model-item-title" v-show="activeName == 2">
<div class="model-item-title" v-show="activeName == 2 || activeName == 1">
{{ item.couponName }}
</div>
<div class="model-item-content" v-show="item.type == 1">数量:9999</div>
<div
class="model-item-content"
v-show="activeName == 3 && item.effectiveType == 2"
>
有效期:{{ item.effectiveNum }}天
</div>
<div
class="model-item-content"
v-show="activeName == 3 && item.effectiveType == 1"
>
有效期:无限制
</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 1"
>
有效期:{{ item.effectiveStartTime }}~{{ item.effectiveEndTime }}
</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 1"
>
有效期:{{ item.effectiveDays }}天
</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 3"
>
有效期:无限制
</div>
<div class="model-item-content" v-show="activeName == 2">
类型:{{
item.discountType == 1
? "满减劵"
: item.discountType == 2
? "折扣券"
: item.discountType == 3
? "代金券"
: item.discountType == 4
? "实物券"
: item.discountType == 5
? "购车代金券"
: item.discountType == 6
? "商品折扣券"
: item.discountType == 7
? "会员服务"
: ""
}}
</div>
<div class="model-item-content" v-show="activeName == 1"> 类型:精品卷</div>
<div class="model-item-content" v-show="activeName == 3"> 类型:权益卡</div>
<div class="model-item-content" v-show="activeName == 4"> 类型:活码海报</div>
<div class="model-item-qrcode" v-show="activeName == 4">
<img :src="item.autoUrl">
<div class="model-item-title" v-show="activeName == 4">
{{ item.codeName }}
</div>
<div class="model-item-content" v-show="activeName == 2">数量:{{ item.residueAmount }}</div>
<div class="model-item-content" v-show="activeName == 3">价格:{{ item.price }}</div>
<div class="model-item-content" v-show="activeName == 3 && item.effectiveType == 2">有效期:{{ item.effectiveNum }}天</div>
<div class="model-item-content" v-show="activeName == 3 && item.effectiveType == 1">有效期:无限制</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{ item.effectiveStartTime }}~{{ item.effectiveEndTime }}</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 1">有效期:{{ item.effectiveDays }}天</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 3">有效期:无限制</div>
<div class="model-item-content" v-show="activeName == 2">类型:{{ item.discountType == 1 ? '满减劵' : item.discountType == 2 ? '折扣券' : item.discountType == 3 ? '代金券' : item.discountType == 4 ? '实物券' : item.discountType == 5 ? '购车代金券' : item.discountType == 6 ? '商品折扣券' : item.discountType == 7 ? '会员服务' : '' }}</div>
<div class="model-item-content" v-show="activeName == 1">类型:精品卷</div>
<div class="model-item-content" v-show="activeName == 3">类型:权益卡</div>
</div>
</div>
<div class="model-item-panel" v-else>
<div class="model-item-empty" v-else v-loading="loading">
<img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect"
>确 定</el-button
>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -108,77 +51,66 @@
<script>
export default {
name: "activityModel",
name: 'activityModel',
data() {
return {
dialogVisible: false,
activeName: "1",
modelList: [
{ type: 1 },
{ type: 2 },
{ type: 3 },
{ type: 1 },
{ type: 1 },
{ type: 1 },
{ type: 1 },
],
loading: false,
activeName: '1',
modelList: [],
pageNum: 1,
pageSize: 10,
tableTotal: 0,
selectItem: {},
};
selectItem: {}
}
},
methods: {
handleSelectItem(item) {
this.selectItem = item;
this.selectItem = item
},
handleSelect() {
this.dialogVisible = false;
this.$emit('selectActivity', {id:this.selectItem.id,marketingType: this.activeName});
this.dialogVisible = false
this.$emit('selectActivity', { marketingId: this.selectItem.id, marketingType: this.activeName, marketingUrl: this.selectItem.autoUrl })
},
handleSizeChange(val) {
this.pageSize = val;
this.getModelList();
this.pageSize = val
this.getModelList()
},
handleCurrentChange(val) {
this.pageNum = val;
this.getModelList();
this.pageNum = val
this.getModelList()
},
getModelList() {
let market = "";
this.modelList = []
this.loading = true
let market = ''
switch (this.activeName) {
case "1":
market = "getCoupon";
break;
case "2":
market = "getMerchant";
break;
case "3":
market = "getCard";
break;
case "4":
market = "listChannelCodeBill";
break;
case '1':
market = 'getMerchant'
break
case '2':
market = 'getCard'
break
}
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
};
this.$apis.marketing[market](params).then((res) => {
console.log(res)
this.modelList = res.list?res.list:res.data;
this.tableTotal = res.count;
});
pageNum: this.pageNum
}
this.$apis.marketing[market](params).then(res => {
this.modelList = res.list ? res.list : res.data
this.tableTotal = res.total
this.loading = false
})
},
init() {
this.dialogVisible = true;
this.getModelList();
this.dialogVisible = true
this.getModelList()
},
handleClick() {
this.getModelList();
},
},
};
this.getModelList()
}
}
}
</script>
<style lang="scss" scoped>
......@@ -219,9 +151,7 @@ export default {
}
}
}
.model-item-panel {
display: flex;
flex-wrap: wrap;
.model-item-empty {
> img {
display: block;
margin: 50px auto 0px;
......@@ -236,21 +166,25 @@ export default {
line-height: 22px;
margin-bottom: 30px;
}
}
.model-item-panel {
display: grid;
grid-template-columns: repeat(4, 25%);
grid-row-gap: 10px;
.model-item {
position: relative;
width: 250px;
height: 128px;
background: #ffffff;
border-radius: 4px;
border: 2px solid #e6e6e6;
padding: 14px 24px;
box-sizing: border-box;
margin: 0px 20px 20px 0px;
margin-right: 10px;
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
border: 2px solid #5850FF;
border: 2px solid #5850ff;
}
&-qrcode {
position: absolute;
......@@ -266,6 +200,9 @@ export default {
color: #333333;
line-height: 25px;
margin-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
&-content {
font-size: 12px;
......@@ -273,6 +210,9 @@ export default {
color: #666666;
line-height: 17px;
margin-top: 6px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
......
......@@ -15,10 +15,10 @@
<el-tab-pane label="售后" name="3"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length>0">
<div class="model-item-panel" v-if="modelList.length>0" v-loading="loading">
<div class="model-item" v-for="(item, index) in modelList" :key="index">
<div class="model-item-radio">
<el-radio v-model="radio" :label="item"></el-radio>
<el-radio v-model="messageRadio" :label="item"></el-radio>
</div>
<div class="model-item-title">
<div class="model-title-h1">{{ item.title }}</div>
......@@ -30,7 +30,7 @@
</div>
</div>
</div>
<div class="model-item-panel" v-else>
<div class="model-item-panel" v-else v-loading="loading">
<img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
......@@ -58,8 +58,9 @@ export default {
data() {
return {
dialogVisible: false,
loading: false,
activeName: "1",
radio: "",
messageRadio: {},
modelList: [],
pageNum: 1,
pageSize: 10,
......@@ -68,17 +69,19 @@ export default {
},
methods: {
init() {
this.messageRadio = {};
this.dialogVisible = true;
this.dracImMessage();
},
selectModelItem() {
this.dialogVisible = false;
this.$emit("selectItem", this.radio);
this.$emit("selectItem", this.messageRadio);
},
handleClick() {
this.dracImMessage();
},
dracImMessage() {
this.loading = true;
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
......@@ -88,6 +91,7 @@ export default {
console.log(res);
this.modelList = res.data;
this.tableTotal = res.count;
this.loading = false;
});
},
handleSizeChange(val) {
......
<template>
<div class="square-main">
<div class="square-main-header">
<el-button type="primary" size="small" @click="addConfig"
><i class="el-icon-plus"></i> 新增营销</el-button
>
<el-button type="primary" size="small" @click="addConfig">
<i class="el-icon-plus"></i>
新增营销
</el-button>
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
<el-popover
placement="top"
title="说明"
width="400"
trigger="hover"
content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
<el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="square-tabel scrm-box-f">
<div class="square-tabel-form">
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="100px"
>
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="68px">
<el-form-item size="small" label="添加时间">
<el-date-picker
v-model="createTime"
type="daterange"
range-separator="至"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
<el-date-picker :picker-options="pickerOptions" v-model="createTime" type="daterange" value-format="yyyy/MM/dd" start-placeholder="开始时间" end-placeholder="结束时间"></el-date-picker>
</el-form-item>
<el-form-item size="small" label="状态">
<el-select v-model="tableSearchForm.imStatus" placeholder="请选择">
<el-option
v-for="item in optionstatus"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="ID">
<el-input v-model="tableSearchForm.imUid" placeholder="请输入ID"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">营销配置</el-button>
</div>
......@@ -75,96 +41,115 @@
<script>
export default {
name: "marketing",
name: 'marketing',
data() {
return {
optionstatus: [
{
value: "1",
label: "待处理",
value: '',
label: '全部'
},
{
value: "2",
label: "处理中",
value: '1',
label: '待处理'
},
{
value: "3",
label: "已处理",
value: '2',
label: '处理中'
},
{
value: '3',
label: '已处理'
}
],
createTime: "",
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
createTime: '',
dialogVisible: true,
tableSearchForm: {},
getListApi: this.$apis.marketing.findAllByPage,
tableParams: {
listName: "data",
listName: 'data',
tableOption: false,
tableColumns: [
{
label: "ID",
prop: "uuid",
label: 'ID',
prop: 'uuid'
},
{
label: "营销客户数",
prop: "customerCount",
minWidth: "100px",
label: '营销客户数',
prop: 'customerCount',
width: '120px'
},
{
label: "状态",
prop: "imStatusName",
label: '状态',
prop: 'imStatusName'
},
{
label: "创建时间",
prop: "createdTime",
width: "160px",
label: '创建时间',
prop: 'createdTime',
width: '160px'
},
{
label: "创建人",
prop: "staffPhone",
width: "130px",
label: '创建人',
prop: 'staffPhone',
width: '130px'
},
{
label: "操作",
prop: "optionBtns",
width: "100px",
addHtml: "optionBtns",
fixed: "right",
},
],
label: '操作',
prop: 'optionBtns',
width: '100px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
staffStatusList: []
}
}
},
watch: {
createTime(value) {
this.tableSearchForm.beginTime = value[0].split(" ")[0];
this.tableSearchForm.endTime = value[1].split(" ")[0];
},
if (value) {
this.tableSearchForm.beginTime = value[0]
this.tableSearchForm.endTime = value[1]
} else {
delete this.tableSearchForm.beginTime
delete this.tableSearchForm.endTime
}
}
},
methods: {
handleSearch() {
this.$refs.employeeRef.refreshTable();
this.$refs.employeeRef.refreshTable()
},
handleReset() {
this.tableSearchForm = {}
this.$refs.employeeRef.refreshTable()
},
handleImport() {},
addConfig() {
this.$router.push("/marketing/config");
this.$router.push('/marketing/config/-1')
},
handleDetail(scope) {
this.$router.push("/marketing/config/" + scope.id);
},
},
};
this.$router.push('/marketing/config/' + scope.id)
}
}
}
</script>
<style lang="scss" scoped>
.square-main-header {
label {
margin: 0px 20px 0px 10px;
color: #666666;
}
img {
width: 14px;
......@@ -335,5 +320,11 @@ export default {
.square-tabel {
padding: 10px;
margin-top: 20px;
/deep/ {
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 220px;
}
}
}
</style>
\ No newline at end of file
......@@ -3,77 +3,86 @@
</template>
<script>
import * as echarts from "echarts";
import * as echarts from 'echarts'
export default {
name: "linechart",
name: 'linechart',
data() {
return {};
return {}
},
methods: {
getChart() {
let chartDom = document.getElementById("channel-main");
let myChart = echarts.init(chartDom);
let option;
getChart(lineData) {
let newCustomerCount = lineData.customerGrowthTrends.map(item => {
return item.newCustomerCount
})
let newEntmicroCount = lineData.customerGrowthTrends.map(item => {
return item.newEntmicroCount
})
let dateTime = lineData.customerGrowthTrends.map(item => {
return item.dateTime
})
let chartDom = document.getElementById('channel-main')
let myChart = echarts.init(chartDom)
let option
option = {
legend: {
left: "auto",
icon: "stack",
left: 'auto',
icon: 'stack',
itemHeight: 2,
textStyle: { color: ["#5850FF", "#FF6D00"] },
itemWidth: 12,
textStyle: { color: ['#5850FF', '#FF6D00'] },
itemWidth: 12
},
color: ["#5850FF", "#FF6D00"],
tooltip: {
trigger: 'axis'
},
color: ['#5850FF', '#FF6D00'],
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
left: '3%',
right: '4%',
bottom: '15%',
containLabel: true
},
dataZoom: [
{
type: "inside",
type: 'inside',
start: 0,
end: 20,
end: 20
},
{
start: 0,
end: 20,
},
end: 20
}
],
xAxis: {
type: "category",
type: 'category',
boundaryGap: false,
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
data: dateTime
},
yAxis: {
type: "value",
type: 'value'
},
series: [
{
name: "未匹配企微",
type: "line",
lineStyle: { color: "#5850FF" },
data: [120, 132, 101, 134, 90, 230, 210],
name: '未匹配企微',
type: 'line',
lineStyle: { color: '#5850FF' },
data: newCustomerCount
},
{
name: "已匹配企微",
type: "line",
lineStyle: { color: "#FF6D00" },
data: [220, 182, 191, 234, 290, 330, 310],
},
],
};
name: '已匹配企微',
type: 'line',
lineStyle: { color: '#FF6D00' },
data: newEntmicroCount
}
]
}
option && myChart.setOption(option);
},
},
mounted() {
this.getChart();
},
};
option && myChart.setOption(option)
}
}
}
</script>
<style scoped lang="scss">
......
......@@ -6,7 +6,6 @@
<span>任务完成率</span>
<el-popover
placement="top"
title="说明"
width="300"
trigger="hover"
content="当前外呼任务的完成情况,分子为完成数量,分母为任务总数量。"
......@@ -41,20 +40,24 @@
<el-form-item size="small" label="电话号码">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
v-model="tableSearchForm.phone"
placeholder="请输入电话号码"
>
</el-input>
</el-form-item>
<el-form-item size="small" label="发送状态">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入电话号码"
>
</el-input>
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option
v-for="item in optionstatus"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
......@@ -83,8 +86,26 @@ export default {
},
data() {
return {
optionstatus: [
{
value: "",
label: "全部",
},
{
value: "1",
label: "未发送",
},
{
value: "2",
label: "已发送",
},
{
value: "3",
label: "待发送",
},
],
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
getListApi: this.$apis.overview.findAllMessageByPage,
tableParams: {
listName: "data",
tableOption: false,
......@@ -94,15 +115,15 @@ export default {
tableColumns: [
{
label: "用户联系方式",
prop: "staffName",
prop: "phone",
},
{
label: "发送状态",
prop: "entmicroName",
prop: "statusName",
},
{
label: "发送时间",
prop: "roleName",
prop: "sendTime",
},
{
label: "操作",
......@@ -122,9 +143,15 @@ export default {
};
},
methods: {
handleSearch() {},
handleReset() {
this.tableSearchForm = {};
this.handleSearch();
},
handleSearch() {
this.$refs.employeeRef.refreshTable();
},
handleDetail(scope) {
this.$alert('短信内容')
this.$alert(scope.content)
},
}
};
......
......@@ -166,7 +166,7 @@ export default {
],
timeRadio: 1,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
getListApi: null,
tableParams: {
listName: "data",
tableOption: false,
......
......@@ -2,18 +2,8 @@
<div class="overview-main">
<div class="overview-header">
<span>引流获客概览</span>
<el-popover
placement="top"
title="说明"
width="400"
trigger="hover"
content="引流获客整合通过整合活码营销、企微魔方,可分别针对到店用户及离店用户提供企微线上化方案。帮助门店迅速的形成企微客户池,为后续营销活动搭建起稳定高频的触达通道。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
<el-popover placement="top" width="400" trigger="hover" content="引流获客通过整合活码营销、企微魔方,可分别针对到店用户及离店用户提供企微线上化方案。帮助门店迅速的形成企微客户池,为后续营销活动搭建起稳定高频的触达通道。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="scrm-box-f store-panel">
......@@ -86,18 +76,18 @@
<div class="echart-icon"><img src="@/assets/img/overview/h5.png" /></div>
<div class="echart-num-desc">
<div class="echart-num-1">客户总数</div>
<div class="echart-num-2">{{totalCount}}人</div>
<div class="echart-num-2">{{ customerCount }}人</div>
</div>
</div>
<div class="echart-count-item">
<div class="echart-icon"><img src="@/assets/img/overview/h6.png" /></div>
<div class="echart-num-desc">
<div class="echart-num-1">匹配企微客户数</div>
<div class="echart-num-2">{{qyTotalCount}}人</div>
<div class="echart-num-2">{{ entmicroCustomerCount }}人</div>
</div>
</div>
</div>
<linechart></linechart>
<linechart ref="customerForm"></linechart>
</div>
<div class="user-panel-balance scrm-box-f">
<div class="balance-title">资源剩余</div>
......@@ -106,33 +96,27 @@
</div>
</div>
<div class="statistics-main">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="短信营销统计" name="first"></el-tab-pane>
<el-tab-pane label="外呼营销统计" name="second"></el-tab-pane>
<message-list v-show="activeName == 'first'"></message-list>
<message-statistics v-show="activeName == 'second'"></message-statistics>
</el-tabs>
<div class="statistics-title">短信营销统计</div>
<message-list></message-list>
</div>
</div>
</template>
<script>
import messageStatistics from "./components/messageStatistics";
import messageList from "./components/messageList";
import linechart from "./components/linechart";
import messageList from './components/messageList'
import linechart from './components/linechart'
export default {
name: "channel",
name: 'channel',
components: {
messageStatistics,
messageList,
linechart,
linechart
},
data() {
return {
activeName: "first",
totalCount: 0,
qyTotalCount: 0,
};
activeName: 'first',
customerCount: 0,
entmicroCustomerCount: 0
}
},
methods: {
jumpChannel() {
......@@ -141,24 +125,25 @@ export default {
jumpSquare() {
this.$router.push('/square/import')
},
overview() {
this.$apis.overview.overview({}).then(res=>{
this.qyTotalCount = res.qyTotalCount;
this.totalCount = res.totalCount;
viewChart() {
this.$apis.overview.viewChart({ day: 30 }).then(res => {
this.customerCount = res.customerCount
this.entmicroCustomerCount = res.entmicroCustomerCount
this.$refs.customerForm.getChart(res)
})
},
handleClick() {},
handleClick() {}
},
mounted() {
this.overview()
this.viewChart()
}
};
}
</script>
<style lang="scss" scoped>
.overview-header {
font-size: 20px;
font-weight: 500;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
......@@ -190,7 +175,7 @@ export default {
padding: 30px 20px;
.store-item-title {
font-size: 20px;
font-weight: 500;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
......@@ -226,7 +211,7 @@ export default {
padding: 20px;
.echart-title {
font-size: 20px;
font-weight: 500;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
......@@ -245,7 +230,7 @@ export default {
}
.echart-num-desc {
font-size: 16px;
font-weight: 500;
font-weight: 600;
color: #333333;
line-height: 22px;
.echart-num-2 {
......@@ -262,7 +247,7 @@ export default {
padding: 20px;
.balance-title {
font-size: 20px;
font-weight: 500;
font-weight: 600;
color: #333333;
line-height: 28px;
letter-spacing: 1px;
......@@ -275,6 +260,15 @@ export default {
}
}
.statistics-main {
margin-top: 10px;
.statistics-title {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin: 20px 0px;
}
/deep/ {
.el-tabs__nav-wrap::after {
height: 0px;
......@@ -283,13 +277,13 @@ export default {
}
@media screen and (max-width: 1340px) {
.store-item-ul {
font-size: 12px!important;
font-size: 12px !important;
}
.store-item-s {
padding: 10px!important;
padding: 10px !important;
}
.store-item-title {
font-size: 17px!important;
font-size: 17px !important;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!