Commit 787d728c by yangming

bug

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