Commit 35ff2c93 by ym

new

1 parent d94870db
Showing 44 changed files with 2506 additions and 317 deletions
...@@ -7,8 +7,131 @@ ...@@ -7,8 +7,131 @@
* @returns * @returns
*/ */
import { http } from '@/main' import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
const getListApi = params => { const getListApi = params => {
params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage' params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getFollower = params => {
params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const querylabeltree = params => {
params.method = 'datahub.api.label.querylabeltree'
params.sessionId = session
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const deleteChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.deleteChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getSubCodeChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.getSubCodeChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const saveChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.saveChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const updateChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.updateChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.listChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const deleteChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.deleteChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const detailChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.detailChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listChannelCodeByPage = params => {
params.method = 'cn.com.glsx.entmicro.code.listChannelCodeByPage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const saveChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.saveChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const updateChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.updateChannelCode'
params.sessionId = session
return http({ return http({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -18,5 +141,16 @@ const getListApi = params => { ...@@ -18,5 +141,16 @@ const getListApi = params => {
} }
export default { export default {
getListApi, getListApi,
getFollower,
querylabeltree,
saveChannelCodeBill,
getSubCodeChannelCodeBill,
deleteChannelCodeBill,
updateChannelCode,
saveChannelCode,
listChannelCodeByPage,
detailChannelCode,
deleteChannelCode,
updateChannelCodeBill,
listChannelCodeBill
} }
\ No newline at end of file \ No newline at end of file
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http } from '@/main' import { http_common } from '@/main'
const pictureUpload = params => { const pictureUpload = params => {
params.method = "glsx.accounts.biz.common.pictureUpload" params.method = "glsx.accounts.biz.common.pictureUpload"
return http({ return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload', url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST', method: 'POST',
data: params, data: params,
......
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getCard = params => {
params.method = 'scrm.api.equity.card.class.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const findAllByPage = params => {
params.method = 'org.ore.api.dracIm.findAllByPage'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const exportAdd = params => {
params.method = 'org.ore.api.dracIm.exportAdd'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const findById = params => {
params.method = 'org.ore.api.dracIm.findById'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const dracImMessage = params => {
params.method = 'org.ore.api.dracImMessage.findAllByCondition'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.listChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const addConfig = params => {
params.method = 'org.ore.api.dracImConfig.addConfig'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const findConfig = params => {
params.method = 'org.ore.api.dracImConfig.findConfig'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const updateConfig = params => {
params.method = 'org.ore.api.dracImConfig.updateConfig'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getCoupon,
getMerchant,
getCard,
listChannelCodeBill,
findAllByPage,
dracImMessage,
exportAdd,
findById,
updateConfig,
findConfig,
addConfig
}
\ No newline at end of file \ No newline at end of file
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
const codeDefault = params => {
params.method = 'org.ore.api.drac.statistic.code.default'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listStaff = params => {
params.method = 'org.ore.api.drac.statistic.code.detail.list.staff'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listTime = params => {
params.method = 'org.ore.api.drac.statistic.code.detail.list.time'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const detailTotal = params => {
params.method = 'org.ore.api.drac.statistic.code.detail.total'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const codeSearch = params => {
params.method = 'org.ore.api.drac.statistic.code.search'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const codeTrend = params => {
params.method = 'org.ore.api.drac.statistic.code.trend'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const dayTrend = params => {
params.method = 'org.ore.api.drac.statistic.day.trend'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const overview = params => {
params.method = 'org.ore.api.drac.statistic.overview'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
codeDefault,
listStaff,
listTime,
detailTotal,
codeSearch,
codeTrend,
dayTrend,
overview
}
\ No newline at end of file \ No newline at end of file
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
const importsUpload = params => {
params.method = 'org.ore.api.imports.upload'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const downloadModel = params => {
params.method = 'org.ore.api.imports.download.model'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const importsRecord = params => {
params.method = 'org.ore.api.imports.record.page'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const importsCount = params => {
params.method = 'org.ore.api.imports.count'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const importsKey = params => {
params.method = 'org.ore.api.imports.record.key'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
importsUpload,
downloadModel,
importsRecord,
importsCount,
importsKey
}
\ No newline at end of file \ No newline at end of file
<template>
<div>
<el-dialog :title="title" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false" :width="width" :show-close="isShowCloseBtn" class="app-dialog">
<!-- :modal-append-to-body="false"
:append-to-body="true" -->
<div class="container">
<slot></slot>
</div>
<div slot="footer">
<slot name="btn-front"></slot>
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm" :loading="btnLoading">{{ btnOkLabel }}</el-button>
<el-button v-if="isShowThirdBtn" @click="btnClick">创建标签</el-button>
<slot name="btn-behind"></slot>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'basic-dialog',
props: {
title: {
type: String,
default: ''
},
isShowCloseBtn: {
type: Boolean,
default: false
},
isShowThirdBtn: {
type: Boolean,
default: false
},
isVisible: {
type: Boolean,
default: false
},
btnOkLabel: {
type: String,
default: '确定'
},
width: {
type: String,
default: '580px'
},
btnLoading: {
type: Boolean,
default: false
}
},
methods: {
handleClose() {
this.$emit('closeDialog')
},
handleConfirm() {
this.$emit('confirmDialog')
},
btnClick() {
this.$emit('btnEvent')
}
}
}
</script>
<style lang="scss">
.app-dialog {
.el-dialog__header {
padding: 20px 20px 10px;
}
.el-dialog__footer {
padding: 15px;
background: #fff;
}
.el-dialog__body {
padding: 0;
border-top: 1px solid #eaeefb;
border-bottom: 1px solid #eaeefb;
min-height: 250px;
max-height: 636px;
overflow-y: auto;
.container {
> span {
display: block;
}
overflow-y: auto;
// max-height: 638px;
padding: 20px 20px;
}
&::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/*正常情况下滑块的样式*/
&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
&::-webkit-scrollbar-thumb {
// background-color: rgba(0, 0, 0, 0.2);
background: #e9e8ff;
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
// &::-webkit-scrollbar-thumb:hover {
// background-color: rgba(0, 0, 0, 0.4);
// box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
// }
/*正常时候的主干部分*/
&::-webkit-scrollbar-track {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*鼠标悬浮在滚动条上的主干部分*/
&::-webkit-scrollbar-track:hover {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.01);
}
}
}
</style>
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
import Vue from 'vue' import Vue from 'vue'
// 导入权限按钮 // 导入权限按钮
import _button from '@/components/glsx-button/index' import _button from '@/components/glsx-button/index'
import glsxTable from '@/components/glsx-table/index.vue' Vue.component('basic-dialog', () =>
import ('./basic-dialog/index.vue'))
Vue.component('glsx-button', _button) Vue.component('glsx-button', _button)
// Vue.component('glsx-table', glsxTable) // Vue.component('glsx-table', glsxTable)
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择跟进专员"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<el-form :inline="true" :model="tableSearchForm" label-width="80px">
<el-form-item size="small" label="员工">
<el-input
v-model="tableSearchForm.staffName"
placeholder="请输入员工姓名"
></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
@selectionTable="selectionTable"
>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "selectEmp",
data() {
return {
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
tableParams: {
listName: "data",
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: "id",
// 多选ref的名称
mutiSelectName: "salelist",
tableColumns: [
{
label: "姓名",
prop: "staffName",
},
{
label: "部门",
prop: "departmentName",
},
{
label: "测试专员类型",
prop: "followerTypeName",
},
],
},
layout: "sizes, prev, pager, next, jumper, ->, total",
tableData: [],
tableTotal: 0,
selectItem: [],
};
},
methods: {
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.channel.getFollower(params).then((res) => {
console.log(res);
this.tableData = res.data;
this.tableTotal = res.count;
});
},
init() {
this.dialogVisible = true;
this.$nextTick(() => {
this.getFollower();
});
},
handleSearch() {
this.getFollower();
},
selectionTable(val) {
this.selectItem = val;
},
handleSelect() {
this.dialogVisible = false;
this.$emit("selectTable", this.selectItem);
},
},
};
</script>
<style lang="scss" scoped></style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="tag-main">
<el-dialog
title="选择标签"
:visible.sync="dialogVisible"
width="70%"
:before-close="handleClose"
>
<div class="tag-panel">
<div class="tag-panel-select">
<div class="tag-title">预选标签</div>
<div class="tag-select-box">
<div class="tag-box-header">
<el-input
size="small"
v-model="labelGroupName"
placeholder="请输入搜索内容"
>
</el-input>
<el-button size="small" type="primary" @click="handleSearch"
>查询</el-button
>
</div>
<div class="checkbox-group-box" :style="{ 'max-height': heightBox + 'px' }">
<div v-for="(item, index) in labelTreeRets" :key="index">
<span
class="el-tree-node__expand-icon el-icon-caret-right"
:class="{ expanded: item.checked }"
@click="item.checked = !item.checked"
></span>
<el-checkbox
:indeterminate="item.isIndeterminate"
v-model="item.checkAll"
@change="handleCheckAllChange(item.checkAll, index)"
>{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{
item.labelList.length
}}
项)</el-checkbox
>
<div style="margin: 15px 0"></div>
<el-checkbox-group
class="tag-group"
v-model="item.tagChecked"
@change="handleCheckedChange(item.tagChecked, index)"
v-show="item.checked"
>
<el-checkbox
v-for="(itm, idx) in item.labelList"
:label="itm"
:key="idx"
>{{ itm.name }}</el-checkbox
>
</el-checkbox-group>
</div>
</div>
</div>
</div>
<div class="tag-panel-selected">
<div class="tag-title">已选标签</div>
<div class="tag-select-box">
<div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box">
<template v-for="item in labelTreeRets">
<el-tag
class="tag-selected-item"
v-for="(tag, idx) in item.tagChecked"
:key="idx"
closable
:disable-transitions="false"
@close="remove(item, idx)"
>
{{ tag.name }}
</el-tag>
</template>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "activityModel",
data() {
return {
heightBox: 200,
dialogVisible: false,
labelGroupName: "",
selectNum: 0,
labelTreeRets: [
{
labelGroup: { id: "109", name: "湖口123" },
labelList: [
{ id: "372", name: "12345678" },
{ id: "371", name: "7654321" },
{ id: "370", name: "1234567" },
],
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false,
},
{
labelGroup: { id: "65", name: "自店标签111" },
labelList: [
{ id: "179", name: "标签44" },
{ id: "178", name: "标签33" },
{ id: "176", name: "标签1112" },
],
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false,
},
],
};
},
watch: {
labelTreeRets: {
handler() {
this.selectNum = 0;
this.labelTreeRets.forEach((item) => {
this.selectNum += item.tagChecked.length;
});
},
deep: true,
},
},
methods: {
init() {
this.dialogVisible = true;
this.querylabeltree();
},
handleSearch() {
this.querylabeltree();
},
querylabeltree() {
this.$apis.channel
.querylabeltree({
labelTreeReq: {
pageNum: 1,
pageSize: 1000,
shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName,
},
})
.then((res) => {
console.log(res);
this.labelTreeRets = res.labelTreeRets.map((item) => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false,
};
});
});
},
remove(item, idx) {
item.tagChecked.splice(idx, 1);
if (item.tagChecked.length == 0) item.checkAll = false;
},
//全选
handleCheckAllChange(val, index) {
if (val) {
this.labelTreeRets[index].tagChecked = [];
for (let i in this.labelTreeRets[index].labelList) {
this.labelTreeRets[index].tagChecked.push(
this.labelTreeRets[index].labelList[i]
);
}
} else {
this.labelTreeRets[index].tagChecked = [];
}
this.labelTreeRets[index].isIndeterminate = false;
},
//选中
handleCheckedChange(value, index) {
let checkedCount = value.length;
this.labelTreeRets[index].checkAll =
checkedCount === this.labelTreeRets[index].labelList.length;
this.labelTreeRets[index].isIndeterminate =
checkedCount > 0 && checkedCount < this.labelTreeRets[index].labelList.length;
},
},
mounted() {
let clientHeight = document.documentElement.clientHeight;
this.heightBox = clientHeight - 0.15 * clientHeight - 300;
},
};
</script>
<style lang="scss" scoped>
.tag-panel {
display: flex;
.tag-panel-select {
width: 60%;
/deep/ {
.el-checkbox__label {
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-wrap: break-word;
}
}
}
.tag-panel-selected {
width: 40%;
margin-left: 10px;
.tag-box-header {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
padding-left: 20px !important;
}
}
.tag-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 22px;
}
.tag-select-box {
margin-top: 10px;
border-radius: 2px;
border: 1px solid #eeeeee;
padding: 6px;
.tag-box-header {
box-sizing: border-box;
display: flex;
height: 56px;
align-items: center;
border-bottom: 1px solid #eeeeee;
margin: -6px;
margin-bottom: 10px;
padding: 0px 6px;
/deep/ {
.el-input {
width: 60%;
margin-right: 10px;
}
}
}
.tag-selected-item {
margin: 0px 6px 6px 0px;
height: 26px;
line-height: 22px;
}
.el-tree-node__expand-icon {
color: #5850ff;
font-size: 16px;
}
.tag-group {
margin-left: 40px;
.el-checkbox {
width: 40%;
margin-bottom: 6px;
display: flex;
align-items: center;
}
}
}
}
.checkbox-group-box {
overflow: auto;
}
.tag-selected-box {
min-height: 200px;
}
</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/616d28231072f92988f059fb/home/config') return new Http().get(' https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -17,4 +17,5 @@ Vue.prototype.$apis = apis ...@@ -17,4 +17,5 @@ Vue.prototype.$apis = apis
start() start()
export { bootstrap, mount, unmount } export { bootstrap, mount, unmount }
from '@/setup' from '@/setup'
export const http = params => Vue.prototype.$http(params)
\ No newline at end of file \ No newline at end of file
export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
\ No newline at end of file \ No newline at end of file
...@@ -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', 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', 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', 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', path: '/square/importResult/:id?',
component: resolve => require([`@/views/square/importResult.vue`], resolve), component: resolve => require([`@/views/square/importResult.vue`], resolve),
meta: {} meta: {}
}, { }, {
...@@ -44,9 +44,19 @@ const staticRoutes = Object.freeze([{ ...@@ -44,9 +44,19 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/marketing/index.vue`], resolve), component: resolve => require([`@/views/marketing/index.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'config',
path: '/marketing/config/:id?',
component: resolve => require([`@/views/marketing/config.vue`], resolve),
meta: {}
}, {
name: 'overview', name: 'overview',
path: '/overview/index', path: '/overview/index',
component: resolve => require([`@/views/overview/index.vue`], resolve), component: resolve => require([`@/views/overview/index.vue`], resolve),
meta: {} meta: {}
}, {
name: 'friends',
path: '/friends/index',
component: resolve => require([`@/views/friends/index.vue`], resolve),
meta: {}
}]) }])
export default staticRoutes export default staticRoutes
\ No newline at end of file \ No newline at end of file
...@@ -15,13 +15,13 @@ let routes = [] ...@@ -15,13 +15,13 @@ let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState }) { export async function bootstrap({ name, id, history, common, messenger, globalState }) {
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret, request_common, sign_common } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
......
...@@ -17,7 +17,7 @@ import { routes } from '@/router' ...@@ -17,7 +17,7 @@ import { routes } from '@/router'
export async function start() { export async function start() {
if (window.__POWERED_BY_QIANKUN__) return if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: '1112223333444' } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error })
// Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes) render('/', routes)
} }
\ No newline at end of file \ No newline at end of file
...@@ -19,18 +19,49 @@ util.getBeforeDate = function(sign = '-') { ...@@ -19,18 +19,49 @@ util.getBeforeDate = function(sign = '-') {
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();
for (let i = 0; i < days; i++) { for (let i = 0; i < days; i++) {
if (month <= 0) { if (month <= 0) {
year = year - 1; year = year - 1;
month = month + 12; month = month + 12;
}
if (month < 10) month = '0' + month;
arr[i] = year + '年' + month + '月'
month--
} }
if (month < 10) month = '0' + month; return arr;
arr[i] = year + '年' + month + '月'
month--
} }
return arr; /**
* 格式化时间
* @param {Array} time
*/
util.formatTime = function(time) {
return {
startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : ''
}
}
util.downloadIamge = function(imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image();
// 解决跨域 Canvas 污染问题
image.setAttribute("crossOrigin", "anonymous");
image.onload = function() {
var canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
var context = canvas.getContext("2d");
context.drawImage(image, 0, 0, image.width, image.height);
var url = canvas.toDataURL("image/png"); //得到图片的base64编码数据
var a = document.createElement("a"); // 生成一个a元素
var event = new MouseEvent("click"); // 创建一个单击事件
a.download = name || "photo"; // 设置图片名称
a.href = url; // 将生成的URL设置为a.href属性
a.dispatchEvent(event); // 触发a的单击事件
};
image.src = imgsrc;
} }
export default util export default util
\ No newline at end of file \ No newline at end of file
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
:model="addCodeForm" :model="addCodeForm"
class="code-body-form" class="code-body-form"
label-width="120px" label-width="120px"
:rules="baseRules" :rules="codeRules"
> >
<el-row> <el-row>
<el-form-item label="渠道名称" prop="name"> <el-form-item label="渠道名称" prop="codeState">
<el-input <el-input
size="small" size="small"
v-model="addCodeForm.name" v-model="addCodeForm.codeState"
placeholder="请输入渠道名称" placeholder="请输入渠道名称"
></el-input> ></el-input>
</el-form-item> </el-form-item>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input
size="small" size="small"
v-model="addCodeForm.name" v-model="addCodeForm.codeRemark"
placeholder="请输入备注" placeholder="请输入备注"
></el-input> ></el-input>
<div class="form-tips">设置备注,便于后续管理查找</div> <div class="form-tips">设置备注,便于后续管理查找</div>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<el-row> <el-row>
<el-form-item label="自动通过验证"> <el-form-item label="自动通过验证">
<el-switch <el-switch
v-model="addCodeForm.value" v-model="addCodeForm.autoAdd"
active-color="#5850FF" active-color="#5850FF"
inactive-color="#999999" inactive-color="#999999"
> >
...@@ -42,20 +42,25 @@ ...@@ -42,20 +42,25 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="选择标签"> <el-form-item label="选择标签">
<el-button size="small" @click="handleAddEmp" <el-button size="small" @click="handleAddTag"
><i class="el-icon-plus"></i> 选择标签</el-button ><i class="el-icon-plus"></i> 选择标签</el-button
> >
<span class="form-tips-btn">已选择<span>8</span>个标签</span> <span class="form-tips-btn"
>已选择<span>{{ taggingLength }}</span
>个标签</span
>
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
<el-tag <template v-for="item in tagging">
v-for="(tag, idx) in innerTags" <el-tag
:key="idx" v-for="(tag, idx) in item.labelList"
closable :key="idx"
:disable-transitions="false" closable
@close="remove(tag)" :disable-transitions="false"
> @close="removeTag(item.labelList, idx)"
{{ tag.staffName }} >
</el-tag> {{ tag.name }}
</el-tag>
</template>
</div> </div>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -64,14 +69,17 @@ ...@@ -64,14 +69,17 @@
<el-button size="small" @click="handleAddEmp" <el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择专员</el-button ><i class="el-icon-plus"></i> 选择专员</el-button
> >
<span class="form-tips-btn">已选择<span>8</span>人</span> <span class="form-tips-btn"
>已选择<span>{{ staffInfo.length }}</span
>人</span
>
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
<el-tag <el-tag
v-for="(tag, idx) in innerTags" v-for="(tag, idx) in staffInfo"
:key="idx" :key="idx"
closable closable
:disable-transitions="false" :disable-transitions="false"
@close="remove(tag)" @close="removeStaff(idx)"
> >
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
...@@ -82,7 +90,8 @@ ...@@ -82,7 +90,8 @@
</div> </div>
</div> </div>
<div class="channel-main-welcome scrm-box-f"> <div class="channel-main-welcome scrm-box-f">
<div class="chanel-form-title">欢迎语</div> <!-- <div class="chanel-form-title">欢迎语</div> -->
<WelcomeWords :eventBus="eventBus"></WelcomeWords>
</div> </div>
<div <div
class="footer-panel" class="footer-panel"
...@@ -91,42 +100,129 @@ ...@@ -91,42 +100,129 @@
width: footerWidth + 'px', width: footerWidth + 'px',
}" }"
> >
<el-button type="primary">返回</el-button> <el-button type="primary" @click="goback">返回</el-button>
<el-button type="primary">提交</el-button> <el-button type="primary" @click="handleSave">提交</el-button>
<el-button type="primary">取消</el-button> <el-button type="primary" @click="goback">取消</el-button>
<el-button
type="primary"
v-show="active == 2 && statusQrcode != 'SUCCESS'"
@click="handleNext"
>确定</el-button
>
<el-button
type="primary"
v-show="active == 2 && statusQrcode == 'SUCCESS'"
@click="handleNext"
>下一步</el-button
>
</div> </div>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
<select-tag ref="selectTagForm"></select-tag>
</div> </div>
</template> </template>
<script> <script>
import Vue from "vue";
import selectEmp from "@/components/selectEmp";
import selectTag from "@/components/selectTag";
import welcomeWords from "./components/welcomeWords.vue";
export default { export default {
name: "addCode", name: "addCode",
components: { welcomeWords, selectEmp, selectTag },
data() { data() {
return { return {
addCodeForm: {}, eventBus: new Vue(),
addCodeForm: {
codeState: "",
codeRemark: "",
autoAdd: false,
welcomeInfo: [],
},
staffInfo: [
{
id: null,
codeId: 2,
staffId: 365,
staffName: "杨林龙",
delFlag: 0,
createdBy: null,
createdTime: null,
},
],
tagging: [],
taggingLength: 0,
codeId: null,
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
innerTags: [{ staffName: "等级考试" }], codeRules: {
codeState: [{ required: true, message: "请输入渠道名称", trigger: "blur" }],
},
}; };
}, },
methods: {}, watch: {
tagging: {
handler() {
this.taggingLength = 0;
this.tagging.forEach((item) => {
this.taggingLength += item.labelList.length;
});
},
deep: true,
},
},
methods: {
goback() {
this.$router.push("/channel/index");
},
removeTag(item, idx) {
item.splice(idx, 1);
},
removeStaff(index) {
this.staffInfo.splice(index, 1);
},
handleAddEmp() {
this.$refs.selectEmpForm.init();
},
handleAddTag() {
this.$refs.selectTagForm.init();
},
selectTable(item) {
this.staffInfo = item;
},
handleSave() {
this.$refs['codeForm'].validate((valid) => {
if (valid) {
let param = Object.assign({ id: this.codeId }, this.addCodeForm);
param.tagging = JSON.stringify(this.tagging);
param.autoWelcome = 0;
let staffId = [];
this.staffInfo.forEach((item) => {
staffId.push(item.relationId);
});
let channel;
if (this.codeId) {
channel = "updateChannelCode";
} else {
channel = "saveChannelCode";
}
delete param.staffInfo;
param.staffId = staffId.join(",");
param.autoAdd ? (param.autoAdd = 1) : (param.autoAdd = 0);
this.$apis.channel[channel](param).then((res) => {
if (res) this.$router.push("/channel/index");
});
}
});
},
detailChannelCode(id, codeUuid) {
let param = {
id,
codeUuid,
};
this.$apis.channel.detailChannelCode(param).then((res) => {
this.addCodeForm = Object.assign({}, res);
this.staffInfo = res.staffInfo;
this.tagging = eval("(" + res.tagging + ")");
});
},
},
mounted() { mounted() {
const { id, codeUuid } = this.$route.params;
if (id) {
this.codeId = id;
this.detailChannelCode(id, codeUuid);
}
this.footerLeft = document.querySelector(".base-container-right").offsetLeft; this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft; this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
} },
}; };
</script> </script>
...@@ -154,6 +250,7 @@ export default { ...@@ -154,6 +250,7 @@ export default {
} }
.code-body-form { .code-body-form {
padding: 20px; padding: 20px;
width: 60%;
.form-tips { .form-tips {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
......
<template> <template>
<div> <div>
<div class="form-header"> <div class="form-header">
<el-button type="primary" size="small" icon="el-icon-add">新建渠道活码</el-button> <el-button type="primary" size="small" icon="el-icon-add" @click="handleAddCode"
>新建渠道活码</el-button
>
</div> </div>
<div class="form-panel scrm-box-f"> <div class="form-panel scrm-box-f">
<el-form <el-form
...@@ -14,7 +16,7 @@ ...@@ -14,7 +16,7 @@
<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.codeStateAndRemark"
placeholder="请输入渠道名称" placeholder="请输入渠道名称"
> >
</el-input> </el-input>
...@@ -34,72 +36,91 @@ ...@@ -34,72 +36,91 @@
> >
<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>
<el-button type="text" @click="handleEdit(2, scope.scope)">修改</el-button> <el-button type="text" @click="handleEdit(scope.scope)">修改</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleAddPoster(scope.scope)"
>活码海报</el-button
>
</div>
<div slot="staffInfo" slot-scope="scope">
<div
class="accountType-row"
v-for="(item, index) in scope.scope.staffInfo"
:key="index"
>
{{ item.staffName }}
</div>
</div>
<div slot="qrCode" slot-scope="scope">
<img :src="scope.scope.qrCode" style="width: 80px; height: 80px" />
<div class="download-link" @click="downloadIamge(scope.scope.qrCode)">
下载二维码
</div>
</div>
<div slot="tagging" slot-scope="scope">
<template v-if="scope.scope.tagging">
<!-- <div v-for="(item,index) in scope.scope.tagging)" :key="index">
<span v-for="(tag, idx) in item.labelList" :key="idx">{{tag.name}}</span>
</div> -->
</template>
</div>
<div slot="codeRemark" slot-scope="scope">
<div class="codeState">{{ scope.scope.codeState }}</div>
<div class="codeRemark">备注:{{ scope.scope.codeRemark }}</div>
</div> </div>
<template slot="otherOptions" slot-scope="scope">
<el-popover placement="top" width="180" trigger="hover">
<p>启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:</p>
<p>1. 角色管理-创建角色</p>
<p>2. 选择员工账户-修改角色</p>
<el-switch
:size="size"
slot="reference"
v-model="scope.scope.statusName"
active-value="启用"
inactive-value="禁用"
@change="(e) => handleSwitchChange(e, scope.scope)"
></el-switch>
</el-popover>
</template>
</GLTable> </GLTable>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import util from "@/utils/util";
export default { export default {
name: "channelList", name: "channelList",
data() { data() {
return { return {
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi, getListApi: this.$apis.channel.listChannelCodeByPage,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [ tableColumns: [
{ {
label: "渠道名称", label: "渠道名称",
prop: "staffName", prop: "codeRemark",
addHtml: "codeRemark",
}, },
{ {
label: "昨日新增客户数", label: "昨日新增客户数",
prop: "entmicroName", prop: "yesterdayNum",
minWidth: "100px", width: "120px",
}, },
{ {
label: "总新增客户数", label: "总新增客户数",
prop: "roleName", prop: "totalNum",
width: "150px",
}, },
{ {
label: "使用人员", label: "使用人员",
prop: "staffPhone", prop: "staffInfo",
width: "130px", width: "130px",
addHtml: "staffInfo",
align: 'left'
}, },
{ {
label: "活码", label: "活码",
prop: "merchantName", prop: "qrCode",
addHtml: "qrCode",
}, },
{ {
label: "标签", label: "标签",
prop: "belongingEntmicroName", prop: "tagging",
addHtml: "tagging",
}, },
{ {
label: "创建时间", label: "创建时间",
prop: "statusName", prop: "createdTime",
width: "160px",
}, },
{ {
label: "操作", label: "操作",
...@@ -107,14 +128,7 @@ export default { ...@@ -107,14 +128,7 @@ export default {
width: "140px", width: "140px",
addHtml: "optionBtns", addHtml: "optionBtns",
fixed: "right", fixed: "right",
}, }
{
label: "启用开关",
prop: "otherOptions",
width: "80px",
addHtml: "otherOptions",
fixed: "right",
},
], ],
}, },
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" }, pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
...@@ -126,7 +140,68 @@ export default { ...@@ -126,7 +140,68 @@ export default {
}; };
}, },
methods: { methods: {
handleSearch() {}, handleDetail(scope) {
this.$router.push("/channel/store/" + scope.id + "/" + scope.codeUuid);
},
handleEdit(scope) {
this.$router.push("/channel/addCode/" + scope.id + "/" + scope.codeUuid);
},
handleSearch() {
this.$refs.employeeRef.refreshTable();
},
handleAddCode() {
this.$router.push("/channel/addCode");
},
handleAddPoster(scope) {
this.$router.push("/channel/poster/" + scope.id);
},
downloadIamge(imgsrc) {
util.downloadIamge(imgsrc);
},
handleSwitchChange(scope) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$apis.channel.deleteChannelCode({ id: scope.id }).then((res) => {
if (res) {
this.$message({
type: "success",
message: "删除成功!",
});
}
this.handleSearch();
});
})
.catch(() => {});
},
handleDelete(scope) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$apis.channel
.deleteChannelCode({
id: scope.id,
codeUuid: scope.codeUuid,
configId: scope.configId,
})
.then((res) => {
if (res) {
this.$message({
type: "success",
message: "删除成功!",
});
}
this.handleSearch();
});
})
.catch(() => {});
},
}, },
}; };
</script> </script>
...@@ -138,4 +213,33 @@ export default { ...@@ -138,4 +213,33 @@ export default {
.form-panel { .form-panel {
padding: 10px; padding: 10px;
} }
.download-link {
cursor: pointer;
margin-top: 6px;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
}
.codeRemark {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.accountType-row {
text-align: left;
position: relative;
padding-left: 15px;
&::before {
content: "";
position: absolute;
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 8px;
left: 0px;
top: 7px;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,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></linechart>
</div> </div>
</div> </div>
<div class="channel-chart-desc"> <div class="channel-chart-desc">
...@@ -49,87 +49,110 @@ ...@@ -49,87 +49,110 @@
<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 chartItem" :key="index"> <div class="chart-desc-item" v-for="(item, index) in selectItem" :key="index">
<div class="chart-item-title"><span>-</span> {{item.name}}</div> <div class="chart-item-title"><span>-</span> {{ item.codeState }}</div>
<div class="chart-item-num">{{item.num}}</div> <div class="chart-item-num">{{ item.newlyCount }}</div>
</div> </div>
</div> </div>
<div> <div>
<div class="chart-desc-add">+选择查看渠道</div> <div class="chart-desc-add" @click="handleChannel">+选择查看渠道</div>
<div class="chart-desc-addNum">最多同时查看8个渠道数据</div> <div class="chart-desc-addNum">最多同时查看8个渠道数据</div>
</div> </div>
</div> </div>
</div> </div>
<GLTable <GLTable
ref="employeeRef" ref="table"
:getListApi="getListApi" :layout="layout"
:searchForm="tableSearchForm" :tableData="tableData"
:tableParams="tableParams" :tableTotal="tableTotal"
:pageConf="pageConf" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn" :tableParams="tableParams"
@refreshTable="handleSearch"
> >
</GLTable> </GLTable>
<select-channel ref="channelForm" @selectTable="selectTable"></select-channel>
</div> </div>
</template> </template>
<script> <script>
import linechart from "./linechart"; import linechart from "./linechart";
import selectChannel from "./selectChannel";
export default { export default {
name: "channelStatistics", name: "channelStatistics",
components: { components: {
linechart linechart,
selectChannel,
}, },
data() { data() {
return { return {
chartItem: [{
name: '到店咨询客户',
num: 10
},{
name: '到店咨询客户',
num: 10
},{
name: '到店咨询客户',
num: 10
}],
timeRadio: 1, timeRadio: 1,
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [ tableColumns: [
{ {
label: "渠道名称", label: "渠道名称",
prop: "staffName", prop: "codeState",
}, },
{ {
label: "新增客户数", label: "新增客户数",
prop: "entmicroName", prop: "newlyCount",
minWidth: "100px",
}, },
{ {
label: "留存客户数", label: "留存客户数",
prop: "roleName", prop: "newlyKeepCount",
}, },
{ {
label: "日期", label: "日期",
prop: "staffPhone", prop: "timeFrame",
width: "130px",
}, },
], ],
}, },
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" }, pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: { layout: "sizes, prev, pager, next, jumper, ->, total",
allMerchantList: [], tableData: [],
roleList: [], tableTotal: 0,
staffStatusList: [], selectItem: [],
},
}; };
}, },
methods: {}, methods: {
handleSearch() {
this.getListChannel();
},
getListChannel() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.overview.codeSearch(params).then((res) => {
this.tableData = res.data;
this.tableTotal = res.count;
});
this.$apis.overview.codeDefault({}).then((res) => {
console.log(res);
this.selectItem = res;
this.selectItem.forEach((item) => {
this.codeTrend(item.codeId);
});
});
},
codeTrend(codeId) {
this.$apis.overview.codeTrend({ codeId }).then((res) => {
console.log(res);
});
},
selectTable(item) {
console.log(item);
},
handleChannel() {
this.$refs.channelForm.init();
},
},
mounted() {
this.getListChannel();
},
}; };
</script> </script>
...@@ -191,7 +214,7 @@ export default { ...@@ -191,7 +214,7 @@ export default {
line-height: 25px; line-height: 25px;
} }
.channel-chart-container { .channel-chart-container {
margin-top: 20px; margin-top: 20px;
} }
} }
} }
......
...@@ -18,8 +18,12 @@ export default { ...@@ -18,8 +18,12 @@ export default {
let option; let option;
option = { option = {
legend: { legend: {
left: "auto", left: "auto",
icon: "stack",
itemHeight: 2,
textStyle: { color: ["#5850FF", "#FF6D00"] },
itemWidth: 12,
}, },
grid: { grid: {
left: "3%", left: "3%",
......
<template>
<div class="img-bg">
<div class="preview-content">
<div class="preview-time">{{ currentTime }}</div>
<div class="preview-info" v-for="item in previewList" :key="item.id">
<!-- <img class="avatar" src="@/assets/img/logo.png" alt="" /> -->
<template v-if="item.type == 'text'">
<div class="preview-text text">{{ item.content }}</div>
</template>
<template v-else-if="item.type == 'link'">
<div class="preview-text preview-link">
{{ item.url }}
<img src="@/assets/img/guestCustom/preview-link.png" alt="" />
</div>
</template>
<template v-else-if="item.type == 'img'">
<el-image style="width: 100px" :src="item.url" fit="contain"></el-image>
</template>
<template v-else-if="item.type == 'applet'">
<div class="preview-text text preview-applet">
<div class="preview-applet-title">
<img :src="item.appleIcon" alt="" />
<span>{{ item.title }}</span>
</div>
{{ item.content }}
</div>
</template>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Preview',
props: { eventBus: Object },
data() {
return {
previewList: [],
currentTime: ''
}
},
created() {
this.eventBus.$on('update', val => {
console.log(val)
this.previewList = val
})
},
mounted() {
const date = new Date()
let hours = date.getHours()
hours = hours < 10 ? `0${hours}` : hours
let minutes = date.getMinutes()
minutes = minutes < 10 ? `0${minutes}` : minutes
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
}
}
</script>
<style lang="scss" scope>
.img-bg {
position: relative;
width: 290px;
height: 566px;
background-image: url(../../../assets/img/guestCustom/iphone-bg.png);
background-size: 100%;
.preview-content {
position: absolute;
width: 250px;
height: 350px;
overflow-y: auto;
top: 115px;
left: 20px;
// background-color: cornflowerblue;
.preview-time {
font-size: 10px;
color: #999;
text-align: center;
margin-bottom: 15px;
}
.preview-info {
display: flex;
padding: 0 44px 20px 9px;
.avatar {
width: 26px;
height: 26px;
margin-right: 8px;
}
.preview-text {
position: relative;
max-width: 190px;
color: #333;
background-color: #fff;
border-radius: 4px;
}
.text {
font-size: 16px;
padding: 8px 11px;
}
.preview-link {
display: inline-flex;
word-break: break-all;
font-size: 14px;
padding: 8px 8px 8px 11px;
img {
width: 34px;
height: 34px;
margin-left: 10px;
}
}
.preview-text::before {
content: '';
position: absolute;
left: -10px;
top: 20%;
border-width: 5px;
border-style: dashed solid dashed dashed;
border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue;
}
.preview-applet {
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
&-title {
display: flex;
align-self: center;
color: #999;
margin-bottom: 5px;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择渠道"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<GLTable
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
@selectionTable="selectionTable"
>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "selectEmp",
data() {
return {
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
tableParams: {
listName: "data",
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: "id",
// 多选ref的名称
mutiSelectName: "salelist",
tableColumns: [
{
label: "渠道名称",
prop: "codeState",
},
{
label: "备注",
prop: "codeRemark",
}
],
},
layout: "sizes, prev, pager, next, jumper, ->, total",
tableData: [],
tableTotal: 0,
selectItem: [],
};
},
methods: {
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.channel.listChannelCodeByPage(params).then((res) => {
console.log(res);
this.tableData = res.data;
this.tableTotal = res.count;
});
},
init() {
this.dialogVisible = true;
this.$nextTick(() => {
this.getFollower();
});
},
handleSearch() {
this.getFollower();
},
selectionTable(val) {
this.selectItem = val;
},
handleSelect() {
this.dialogVisible = false;
this.$emit("selectTable", this.selectItem);
},
},
};
</script>
<style lang="scss" scoped></style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="channel-main"> <div class="channel-main">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="渠道码列表" name="first"></el-tab-pane> <el-tab-pane label="渠道码列表" name="first"></el-tab-pane>
<el-tab-pane label="数据统计" name="second"></el-tab-pane> <el-tab-pane label="数据统计" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
<channel-list v-show="activeName == 'first'"></channel-list> <channel-list v-show="activeName == 'first'"></channel-list>
<channel-statistics v-show="activeName == 'second'"></channel-statistics> <channel-statistics v-show="activeName == 'second'"></channel-statistics>
</div> </div>
</template> </template>
...@@ -13,24 +13,28 @@ ...@@ -13,24 +13,28 @@
import channelList from "./components/channelList"; import channelList from "./components/channelList";
import channelStatistics from "./components/channelStatistics"; import channelStatistics from "./components/channelStatistics";
export default { export default {
name: 'channel', name: "channel",
components: { components: {
channelList, channelList,
channelStatistics channelStatistics,
}, },
data() { data() {
return { return {
activeName: 'first' activeName: "first",
} };
}, },
methods: { methods: {
handleClick() { handleClick() {},
},
};
</script>
<style lang="scss" scoped>
.channel-main {
/deep/ {
.el-tabs__nav-wrap::after {
height: 0px;
} }
} }
} }
</script>
<style lang="scss" scoped>
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -9,25 +9,25 @@ ...@@ -9,25 +9,25 @@
<div class="poster-body"> <div class="poster-body">
<div <div
class="poster-item" class="poster-item"
@dblclick="setPoster" @dblclick="setPoster(item)"
@mouseenter="item.show = true" @mouseenter="item.show = true"
@mouseleave="item.show = false" @mouseleave="item.show = false"
v-for="(item, index) in posterList" v-for="(item, index) in posterList"
:key="index" :key="index"
> >
<div class="poster-del" v-show="item.show"> <div class="poster-del" v-show="item.show" @click="handleDelete(item.id)">
<img src="@/assets/img/del.png" /> <img src="@/assets/img/del.png" />
</div> </div>
<div class="poster-item-box"> <div class="poster-item-box">
<div <img
:src="item.autoUrl"
class="poster-image" class="poster-image"
v-if="imgWidth" v-if="item.imgWidth"
:style="{ :style="{
background: 'url(' + img_url + ')', width: item.imgWidth + 'px',
width: imgWidth + 'px', height: item.imgHeight + 'px',
height: imgHeight + 'px',
}" }"
></div> />
</div> </div>
<div class="poster-item-link">下载海报</div> <div class="poster-item-link">下载海报</div>
</div> </div>
...@@ -44,18 +44,21 @@ ...@@ -44,18 +44,21 @@
class="poster-image" class="poster-image"
v-if="dragHeight" v-if="dragHeight"
:style="{ :style="{
background: 'url(' + img_url + ')', 'background-image': 'url(' + backUrl + ')',
height: dragHeight + 'px', height: dragHeight + 'px',
}" }"
> >
<vue-draggable-resizable <vue-draggable-resizable
:w="w1" :w="width"
:h="h1" :h="height"
:x="x1" :x="x"
:y="y1" :y="y"
:min-width="20" :min-width="20"
:min-height="20" :min-height="20"
class="img_cl" class="img_cl"
:style="{
'background-image': 'url(' + codeUrl + ')',
}"
:parent="true" :parent="true"
@dragging="onDrag" @dragging="onDrag"
@resizing="onResize" @resizing="onResize"
...@@ -67,9 +70,7 @@ ...@@ -67,9 +70,7 @@
</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="dialogVisible = false" <el-button size="small" type="primary" @click="savePoster">确 定</el-button>
>确 定</el-button
>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -88,21 +89,37 @@ export default { ...@@ -88,21 +89,37 @@ export default {
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
posterList: [{ show: false }, { show: false }], posterList: [],
img_url: "", img_url: "",
dragHeight: 0, dragHeight: 0,
imgWidth: 0, imgWidth: 0,
imgHeight: 0, imgHeight: 0,
x1: 0, x: 0,
y1: 0, y: 0,
w1: 50, width: 50,
h1: 50, height: 50,
backUrl: "",
codeUrl: "",
}; };
}, },
methods: { methods: {
goBack() {}, goBack() {
setPoster() { this.$router.push("/channel/index");
},
handleDelete(id) {
this.$apis.channel.deleteChannelCodeBill({ id }).then((res) => {
if (res) this.getPoster();
});
},
setPoster(item) {
this.id = item.id
this.x = item.x;
this.y = item.y;
this.width = item.width;
this.height = item.height;
this.backUrl = item.backUrl;
this.getDraggable(this.backUrl);
this.dialogVisible = true; this.dialogVisible = true;
}, },
enterPoster() {}, enterPoster() {},
...@@ -135,40 +152,81 @@ export default { ...@@ -135,40 +152,81 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res) { if (res) {
self.accountAddForm.merchantFiles.push({ self.id = null;
fileUrl: res, self.x = 0;
fileName: "", self.y = 0;
}); self.width = 50;
self.height = 50;
self.backUrl = res;
self.getDraggable(res);
self.dialogVisible = true;
} }
}); });
}; };
} }
}, },
onDrag(a, b, c, d, e) { onDrag(x, y) {
console.log(a, b, c, d, e); this.x = x;
this.y = y;
}, },
onActivated(index) { onActivated(index) {
console.log(index); console.log(index);
}, },
onResize() {}, onResize(x, y, width, height) {
getPoster() { this.x = x;
let img_url = "https://img1.baidu.com/it/u=3246628741,3439955235&fm=26&fmt=auto"; this.y = y;
this.img_url = img_url; this.width = width;
let img = new Image(); this.height = height;
img.src = img_url; },
let self = this; savePoster() {
img.onload = function () { let { x, y, width, height, backUrl, codeUrl,id } = this;
if (img.width > img.height) { let params = {
self.imgWidth = 280; x,
self.imgHeight = (img.height * 280) / img.width; y,
} else { id,
self.imgHeight = 280; width,
self.imgWidth = (img.width * 280) / img.height; height,
} backUrl,
codeUrl,
}; };
let code;
if(id) {
code = 'updateChannelCodeBill'
}else {
code = 'saveChannelCodeBill'
}
this.$apis.channel[code](params).then((res) => {
if (res) {
this.dialogVisible = false;
this.getPoster();
}
});
},
getPoster() {
let { id } = this.$route.params;
this.$apis.channel.getSubCodeChannelCodeBill({ codeId:id }).then((res) => {
let listChannelCodeBill = res.channelCodeBillInfo;
this.codeUrl = res.qrCode
listChannelCodeBill.forEach((item) => {
item.show = false;
let backUrl = item.autoUrl;
this.backUrl = backUrl;
let img = new Image();
img.src = backUrl;
img.onload = function () {
if (img.width > img.height) {
item.imgWidth = 280;
item.imgHeight = (img.height * 280) / img.width;
} else {
item.imgHeight = 280;
item.imgWidth = (img.width * 280) / img.height;
}
};
});
this.posterList = listChannelCodeBill;
});
}, },
getDraggable() { getDraggable(img_url) {
let img_url = "https://img1.baidu.com/it/u=3246628741,3439955235&fm=26&fmt=auto";
let img = new Image(); let img = new Image();
img.src = img_url; img.src = img_url;
let self = this; let self = this;
...@@ -180,7 +238,6 @@ export default { ...@@ -180,7 +238,6 @@ export default {
mounted() { mounted() {
this.getPoster(); this.getPoster();
this.getDraggable();
}, },
}; };
</script> </script>
...@@ -208,7 +265,6 @@ export default { ...@@ -208,7 +265,6 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
width: 375px; width: 375px;
.img_cl { .img_cl {
background-image: url("../../assets/img/qrcode.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -2,21 +2,27 @@ ...@@ -2,21 +2,27 @@
<div class="channel-main scrm-box-f"> <div class="channel-main scrm-box-f">
<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="detailForm" label-width="120px"> <el-form :inline="true" :model="detailCodeForm" label-width="120px">
<el-row><el-form-item size="small" label="渠道名称:"> </el-form-item></el-row> <el-row><el-form-item size="small" label="渠道名称:"> {{detailCodeForm.codeState}}</el-form-item></el-row>
<el-row><el-form-item size="small" label="备注:"> </el-form-item></el-row> <el-row><el-form-item size="small" label="备注:"> {{detailCodeForm.codeRemark}}</el-form-item></el-row>
<el-row <el-row
><el-form-item size="small" label="使用员工:"> ><el-form-item size="small" label="使用员工:">
<div class="form-row"> <div class="form-row">
<div class="emp-item">收到回复</div> <div class="emp-item" v-for="(item,index) in detailCodeForm.staffInfo" :key="index">{{item.staffName}}</div>
<div class="emp-item">收到回复</div>
</div> </el-form-item </div> </el-form-item
></el-row> ></el-row>
<el-row <el-row
><el-form-item size="small" label="标签:"> ><el-form-item size="small" label="标签:">
<div class="form-row"> <div class="form-row">
<div class="tag-item">龙湖</div> <template v-for="item in tagging">
<div class="tag-item">龙湖龙湖龙湖</div> <div
class="tag-item"
v-for="(tag, idx) in item.labelList"
:key="idx"
>
{{ tag.name }}
</div>
</template>
</div> </div>
</el-form-item></el-row </el-form-item></el-row
> >
...@@ -24,12 +30,12 @@ ...@@ -24,12 +30,12 @@
<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">75人</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/count1.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">75人</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">
...@@ -49,18 +55,30 @@ ...@@ -49,18 +55,30 @@
/> />
</el-popover> </el-popover>
</div> </div>
<div class="count-item-num">75人</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/count3.png" class="count-item-icon" />
</div> </div>
</div> </div>
</div> </div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="按日期查看" name="1"></el-tab-pane>
<el-tab-pane label="按成员查看" name="2"></el-tab-pane>
</el-tabs>
<GLTable <GLTable
ref="employeeRef" v-show="activeName == 1"
:getListApi="getListApi" ref="timeTable"
:searchForm="tableSearchForm" :getListApi="getTimeApi"
:tableParams="tableParams" :tableParams="tableParams"
:pageConf="pageConf" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn" :hasNum="false"
>
</GLTable>
<GLTable
v-show="activeName == 2"
ref="memberTabel"
:getListApi="getMemberApi"
:tableParams="tableMemberParams"
:pageConf="pageMemberConf"
:hasNum="false" :hasNum="false"
> >
</GLTable> </GLTable>
...@@ -72,36 +90,55 @@ export default { ...@@ -72,36 +90,55 @@ export default {
name: "store", name: "store",
data() { data() {
return { return {
totalNum: {},
activeName: '1',
detailCodeForm:{},
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi, getMemberApi: this.$apis.overview.listStaff,
getTimeApi: this.$apis.overview.listTime,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [ tableColumns: [
{ {
label: "渠道名称", label: "新增客户数",
prop: "newlyTotalCount"
},
{
label: "留存客户数",
prop: "keepTotalCount",
},
{
label: "日期",
prop: "dayTime"
},
],
},
tableMemberParams: {
listName: "data",
tableOption: false,
tableColumns: [
{
label: "员工姓名",
prop: "staffName", prop: "staffName",
}, },
{ {
label: "新增客户数", label: "新增客户数",
prop: "entmicroName", prop: "newlyTotalCount",
minWidth: "100px",
}, },
{ {
label: "留存客户数", label: "留存客户数",
prop: "roleName", prop: "keepTotalCount",
}, },
{ {
label: "日期", label: "日期",
prop: "staffPhone", prop: "dayTime"
width: "130px",
}, },
], ],
}, },
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" }, pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
pageMemberConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
tagging: [],
baseData: { baseData: {
allMerchantList: [], allMerchantList: [],
roleList: [], roleList: [],
...@@ -110,7 +147,29 @@ export default { ...@@ -110,7 +147,29 @@ export default {
}; };
}, },
methods: { methods: {
goback() {}, goback() {
this.$router.push('/channel/index')
},
detailChannelCode(id, codeUuid) {
let param = {
id,
codeUuid,
};
this.$apis.channel.detailChannelCode(param).then((res) => {
this.detailCodeForm = Object.assign({}, res);
this.tagging = eval("(" + res.tagging + ")");
});
},
detailTotal(codeId) {
this.$apis.overview.detailTotal({codeId}).then((res) => {
this.totalNum = res;
})
}
},
mounted() {
const {id,codeUuid} = this.$route.params;
this.detailChannelCode(id,codeUuid)
this.detailTotal();
}, },
}; };
</script> </script>
......
<template>
<div class="square-main">
<el-dialog
title="选择活动"
:visible.sync="dialogVisible"
width="70%"
:before-close="handleClose"
>
<div class="model-panel">
<div class="model-panel-tab">
<label>活动类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="券营销" name="1"></el-tab-pane>
<el-tab-pane label="预约有礼" name="2"></el-tab-pane>
<el-tab-pane label="权益卡" name="3"></el-tab-pane>
<el-tab-pane label="活码海报" name="4"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length>0">
<div class="model-item" :class="{'checked': selectItem == item}" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="model-item-title" v-show="activeName == 3">
{{ item.cardClassName }}
</div>
<div class="model-item-title" v-show="activeName == 2">
{{ item.couponName }}
</div>
<div class="model-item-content" v-show="item.type == 1">数量:9999</div>
<div
class="model-item-content"
v-show="activeName == 3 && item.effectiveType == 2"
>
有效期:{{ item.effectiveNum }}天
</div>
<div
class="model-item-content"
v-show="activeName == 3 && item.effectiveType == 1"
>
有效期:无限制
</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 1"
>
有效期:{{ item.effectiveStartTime }}~{{ item.effectiveEndTime }}
</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 1"
>
有效期:{{ item.effectiveDays }}天
</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 3"
>
有效期:无限制
</div>
<div class="model-item-content" v-show="activeName == 2">
类型:{{
item.discountType == 1
? "满减劵"
: item.discountType == 2
? "折扣券"
: item.discountType == 3
? "代金券"
: item.discountType == 4
? "实物券"
: item.discountType == 5
? "购车代金券"
: item.discountType == 6
? "商品折扣券"
: item.discountType == 7
? "会员服务"
: ""
}}
</div>
<div class="model-item-content" v-show="activeName == 1"> 类型:精品卷</div>
<div class="model-item-content" v-show="activeName == 3"> 类型:权益卡</div>
<div class="model-item-content" v-show="activeName == 4"> 类型:活码海报</div>
<div class="model-item-qrcode" v-show="activeName == 4">
<img :src="item.autoUrl">
</div>
</div>
</div>
<div class="model-item-panel" v-else>
<img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "activityModel",
data() {
return {
dialogVisible: false,
activeName: "1",
modelList: [
{ type: 1 },
{ type: 2 },
{ type: 3 },
{ type: 1 },
{ type: 1 },
{ type: 1 },
{ type: 1 },
],
pageNum: 1,
pageSize: 10,
tableTotal: 0,
selectItem: {},
};
},
methods: {
handleSelectItem(item) {
this.selectItem = item;
},
handleSelect() {
this.dialogVisible = false;
this.$emit('selectActivity', {id:this.selectItem.id,marketingType: this.activeName});
},
handleSizeChange(val) {
this.pageSize = val;
this.getModelList();
},
handleCurrentChange(val) {
this.pageNum = val;
this.getModelList();
},
getModelList() {
let market = "";
switch (this.activeName) {
case "1":
market = "getCoupon";
break;
case "2":
market = "getMerchant";
break;
case "3":
market = "getCard";
break;
case "4":
market = "listChannelCodeBill";
break;
}
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
};
this.$apis.marketing[market](params).then((res) => {
console.log(res)
this.modelList = res.list?res.list:res.data;
this.tableTotal = res.count;
});
},
init() {
this.dialogVisible = true;
this.getModelList();
},
handleClick() {
this.getModelList();
},
},
};
</script>
<style lang="scss" scoped>
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/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;
}
}
}
.model-item-panel {
display: flex;
flex-wrap: wrap;
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
.model-item {
position: relative;
width: 250px;
height: 128px;
background: #ffffff;
border-radius: 4px;
border: 2px solid #e6e6e6;
padding: 14px 24px;
box-sizing: border-box;
margin: 0px 20px 20px 0px;
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
border: 2px solid #5850FF;
}
&-qrcode {
position: absolute;
right: 10px;
bottom: 10px;
width: 60px;
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 5px;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 6px;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择模板"
:visible.sync="dialogVisible"
width="70%"
:before-close="handleClose"
>
<div class="model-panel">
<div class="model-panel-tab">
<label>模板类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="售前" name="1"></el-tab-pane>
<el-tab-pane label="售中" name="2"></el-tab-pane>
<el-tab-pane label="售后" name="3"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length>0">
<div class="model-item" v-for="(item, index) in modelList" :key="index">
<div class="model-item-radio">
<el-radio v-model="radio" :label="item"></el-radio>
</div>
<div class="model-item-title">
<div class="model-title-h1">{{ item.title }}</div>
<div class="model-title-h2">{{ item.content }}</div>
</div>
<div class="model-item-content">
<div class="model-content">创建人:巴拉巴拉</div>
<div class="model-content">创建日期:{{ item.createdTime }}</div>
</div>
</div>
</div>
<div class="model-item-panel" v-else>
<img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="selectModelItem">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "activityModel",
data() {
return {
dialogVisible: false,
activeName: "1",
radio: "",
modelList: [],
pageNum: 1,
pageSize: 10,
tableTotal: 0,
};
},
methods: {
init() {
this.dialogVisible = true;
this.dracImMessage();
},
selectModelItem() {
this.dialogVisible = false;
this.$emit("selectItem", this.radio);
},
handleClick() {
this.dracImMessage();
},
dracImMessage() {
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
type: this.activeName,
};
this.$apis.marketing.dracImMessage(params).then((res) => {
console.log(res);
this.modelList = res.data;
this.tableTotal = res.count;
});
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
},
},
};
</script>
<style lang="scss" scoped>
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/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;
}
}
}
.model-item-panel {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
.model-item {
display: flex;
padding: 20px;
border-bottom: 1px solid #e9e9e9;
&-radio {
width: 80px;
/deep/ {
.el-radio__input {
margin-top: 10px;
}
.el-radio__label {
display: none;
}
}
}
&-content {
width: 210px;
.model-content {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
&-title {
flex: 1;
.model-title-h1 {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
.model-title-h2 {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="square-main"> <div class="square-main">
<div class="square-main-header"> <div class="square-main-header">
<el-button size="small" type="primary" @click="handleSearch" <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
...@@ -25,20 +25,21 @@ ...@@ -25,20 +25,21 @@
:inline="true" :inline="true"
:model="tableSearchForm" :model="tableSearchForm"
class="follow-form-item" class="follow-form-item"
label-width="120px" label-width="100px"
> >
<el-form-item size="small" label="添加时间"> <el-form-item size="small" label="添加时间">
<el-date-picker <el-date-picker
v-model="tableSearchForm.time" v-model="createTime"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
> >
</el-date-picker> </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.status" placeholder="请选择"> <el-select v-model="tableSearchForm.imStatus" placeholder="请选择">
<el-option <el-option
v-for="item in optionstatus" v-for="item in optionstatus"
:key="item.value" :key="item.value"
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
</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.id" 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 type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
...@@ -80,37 +81,42 @@ export default { ...@@ -80,37 +81,42 @@ export default {
optionstatus: [ optionstatus: [
{ {
value: "1", value: "1",
label: "进行中", label: "待处理",
}, },
{ {
value: "2", value: "2",
label: "已完成", label: "处理中",
},
{
value: "3",
label: "已处理",
}, },
], ],
createTime: "",
dialogVisible: true, dialogVisible: true,
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi, getListApi: this.$apis.marketing.findAllByPage,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: "ID", label: "ID",
prop: "staffName", prop: "uuid",
}, },
{ {
label: "营销客户数", label: "营销客户数",
prop: "entmicroName", prop: "customerCount",
minWidth: "100px", minWidth: "100px",
}, },
{ {
label: "状态", label: "状态",
prop: "roleName", prop: "imStatusName",
}, },
{ {
label: "创建时间", label: "创建时间",
prop: "staffPhone", prop: "createdTime",
width: "130px", width: "160px",
}, },
{ {
label: "创建人", label: "创建人",
...@@ -134,24 +140,36 @@ export default { ...@@ -134,24 +140,36 @@ export default {
}, },
}; };
}, },
watch: {
createTime(value) {
this.tableSearchForm.beginTime = value[0].split(" ")[0];
this.tableSearchForm.endTime = value[1].split(" ")[0];
},
},
methods: { methods: {
handleSearch() {}, handleSearch() {
handleDetail() {}, this.$refs.employeeRef.refreshTable();
},
handleImport() {},
addConfig() {
this.$router.push("/marketing/config");
},
handleDetail(scope) {
this.$router.push("/marketing/config/" + scope.id);
},
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.square-main-header { .square-main-header {
display: flex;
align-items: center;
label { label {
margin: 0px 20px 0px 10px; margin: 0px 20px 0px 10px;
} }
img { img {
width: 14px; width: 14px;
height: 14px; height: 14px;
vertical-align: middle; margin-top: 8px;
} }
} }
.dialog-wrap-box { .dialog-wrap-box {
......
...@@ -123,7 +123,10 @@ export default { ...@@ -123,7 +123,10 @@ export default {
}, },
methods: { methods: {
handleSearch() {}, handleSearch() {},
handleDetail(scope) {
this.$alert('短信内容')
}, },
}
}; };
</script> </script>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="store-item"> <div class="store-item">
<div class="store-item-s"> <div class="store-item-s">
<div class="store-item-title">到店用户线上化</div> <div class="store-item-title">到店用户线上化</div>
<el-button type="primary" size="small">配置活码</el-button> <el-button type="primary" size="small" @click="jumpChannel">配置活码</el-button>
</div> </div>
<div class="store-item-s"> <div class="store-item-s">
<div class="store-item-icon"> <div class="store-item-icon">
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<div class="store-item"> <div class="store-item">
<div class="store-item-s"> <div class="store-item-s">
<div class="store-item-title">离店用户线上化</div> <div class="store-item-title">离店用户线上化</div>
<el-button type="primary" size="small">企微魔方</el-button> <el-button type="primary" size="small" @click="jumpSquare">企微魔方</el-button>
</div> </div>
<div class="store-item-s"> <div class="store-item-s">
<div class="store-item-icon"> <div class="store-item-icon">
...@@ -86,14 +86,14 @@ ...@@ -86,14 +86,14 @@
<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">1,242,323人</div> <div class="echart-num-2">{{totalCount}}人</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">1,242,323人</div> <div class="echart-num-2">{{qyTotalCount}}人</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -130,11 +130,28 @@ export default { ...@@ -130,11 +130,28 @@ export default {
data() { data() {
return { return {
activeName: "first", activeName: "first",
totalCount: 0,
qyTotalCount: 0,
}; };
}, },
methods: { methods: {
jumpChannel() {
this.$router.push('/channel/index')
},
jumpSquare() {
this.$router.push('/square/import')
},
overview() {
this.$apis.overview.overview({}).then(res=>{
this.qyTotalCount = res.qyTotalCount;
this.totalCount = res.totalCount;
})
},
handleClick() {}, handleClick() {},
}, },
mounted() {
this.overview()
}
}; };
</script> </script>
...@@ -257,6 +274,13 @@ export default { ...@@ -257,6 +274,13 @@ export default {
} }
} }
} }
.statistics-main {
/deep/ {
.el-tabs__nav-wrap::after {
height: 0px;
}
}
}
@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;
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
<el-button type="primary" size="small" @click="goBack">返回</el-button> <el-button type="primary" size="small" @click="goBack">返回</el-button>
<div class="squre-safe-panel scrm-box-f"> <div class="squre-safe-panel scrm-box-f">
<div class="safe-upload-panel" id="drop_area"> <div class="safe-upload-panel" id="drop_area">
<el-upload action="" class="image-uploader" :before-upload="upLoadImg"> <el-upload action="" class="image-uploader" :before-upload="uploadFile">
<div class="safe-upload-icon"><i class="el-icon-tickets"></i></div> <div class="safe-upload-icon"><i class="el-icon-tickets"></i></div>
</el-upload> </el-upload>
<div class="safe-upload-tips">点击或将文件拖拽到这里上传</div> <div class="safe-upload-tips">点击或将文件拖拽到这里上传</div>
<div class="safe-upload-xl">支持扩展名:.csv .xls .xlsl</div> <div class="safe-upload-xl">支持扩展名:.csv .xls .xlsl</div>
<div class="safe-upload-link">下载模版</div> <div class="safe-upload-link" @click="downloadModel">下载模版</div>
</div> </div>
<div class="safe-upload-footer"> <div class="safe-upload-footer">
<el-button type="primary" size="small">提交</el-button> <el-button type="primary" size="small" @click="handleSubmit">提交</el-button>
<el-button size="small">返回</el-button> <el-button size="small">返回</el-button>
</div> </div>
</div> </div>
...@@ -46,10 +46,18 @@ export default { ...@@ -46,10 +46,18 @@ export default {
borderhover: false, //文件拖拖动到区域的hover效果 borderhover: false, //文件拖拖动到区域的hover效果
imgArr: [], imgArr: [],
fileData: [], fileData: [],
fileInfo: ''
}; };
}, },
methods: { methods: {
goBack() {}, goBack() {
this.$router.push("/square/index");
},
downloadModel() {
this.$apis.square.downloadModel({}).then((res) => {
window.open(res);
});
},
enentDrop(e) { enentDrop(e) {
this.borderhover = false; this.borderhover = false;
e.stopPropagation(); e.stopPropagation();
...@@ -58,17 +66,35 @@ export default { ...@@ -58,17 +66,35 @@ export default {
console.log(fileData); console.log(fileData);
this.uploadFile(fileData); this.uploadFile(fileData);
}, },
uploadFile(file) { uploadFile(e) {
let AllImgExt = ".csv|.xls|.xlsl"; let AllImgExt = ".csv|.xls|.xlsx";
let extName = file[0].name.substring(file[0].name.lastIndexOf(".")).toLowerCase(); let extName = e.name.substring(e.name.lastIndexOf(".")).toLowerCase();
if (file.length > 1) { console.log(extName);
this.$message.error("只能上传一个文件"); if (AllImgExt.indexOf(extName) === -1) {
return false;
}
if (AllImgExt.indexOf(extName + "|") === -1) {
this.$message.error("上传格式不正确"); this.$message.error("上传格式不正确");
return false; return false;
} }
const size = e.size / 1024 / 1024
if (size < 9) {
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const fileInfo = e.name.split('.')[1] + '@' + arrBase64[1];
this.$apis.common.pictureUpload({file: fileInfo} ).then((res) => {
this.fileInfo = res
});
}
} else {
this.$message.error("上传文件不可超过9M");
}
},
handleSubmit() {
this.$apis.square.importsUpload({fileUrl:'https://qcwx.glsx.com.cn/upload/biz/777fa90a-cded-468a-85b6-6cc19a10a0ae.xlsx'}).then(res=>{
console.log(res)
})
}, },
}, },
mounted() { mounted() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-button type="primary" size="small" @click="goBack">返回</el-button> <el-button type="primary" size="small" @click="goBack">返回</el-button>
<div class="squre-success-panel scrm-box-f"> <div class="squre-success-panel scrm-box-f">
<div class="contact-us-wrap"> <div class="contact-us-wrap">
<img src="@/assets/img/qrcode.png"> <img src="@/assets/img/qrcode.png" />
<div class="contact-us-about">联系我们</div> <div class="contact-us-about">联系我们</div>
</div> </div>
<div class="squre-success-image"><i class="el-icon-success"></i></div> <div class="squre-success-image"><i class="el-icon-success"></i></div>
...@@ -17,15 +17,17 @@ ...@@ -17,15 +17,17 @@
<div class="squre-success-footer"> <div class="squre-success-footer">
<div class="squre-success-item"> <div class="squre-success-item">
<div class="success-item-title">本次导入总客户数</div> <div class="success-item-title">本次导入总客户数</div>
<div class="success-item-num">1,000</div> <div class="success-item-num">{{ detailInfo.importNumber }}</div>
</div> </div>
<div class="squre-success-item"> <div class="squre-success-item">
<div class="success-item-title">新导入客户数</div> <div class="success-item-title">新导入客户数</div>
<div class="success-item-num">1,000</div> <div class="success-item-num">{{ detailInfo.newCustomerNumber }}</div>
</div> </div>
<div class="squre-success-item"> <div class="squre-success-item">
<div class="success-item-title">企微客户占比</div> <div class="success-item-title">企微客户占比</div>
<div class="success-item-num">1,000</div> <div class="success-item-num">
{{ detailInfo.entmicroNumber }}/{{ detailInfo.importNumber }}
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -37,17 +39,17 @@ ...@@ -37,17 +39,17 @@
<div class="custom-wrap-sta"> <div class="custom-wrap-sta">
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div> <div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">{{ detailInfo.waitAddEntmicroNumber }}人</div>
</div> </div>
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div> <div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">{{ detailInfo.waitAddEntmicroTotal }}人</div>
</div> </div>
</div> </div>
<div class="custom-wrap-content"> <div class="custom-wrap-content">
当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。 当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。
</div> </div>
<div class="custom-wrap-config">营销配置</div> <div class="custom-wrap-config" @click="jumpDrainage">营销配置</div>
</div> </div>
</div> </div>
<div class="custom-wrap-item"> <div class="custom-wrap-item">
...@@ -56,11 +58,11 @@ ...@@ -56,11 +58,11 @@
<div class="custom-wrap-sta"> <div class="custom-wrap-sta">
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div> <div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">{{ detailInfo.waitRenewalNumber }}人</div>
</div> </div>
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div> <div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">{{ detailInfo.waitTotal }}人</div>
</div> </div>
</div> </div>
<div class="custom-wrap-content"> <div class="custom-wrap-content">
...@@ -75,11 +77,15 @@ ...@@ -75,11 +77,15 @@
<div class="custom-wrap-sta"> <div class="custom-wrap-sta">
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div> <div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">
{{ detailInfo.waitRegularMaintainNumber }}人
</div>
</div> </div>
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div> <div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">
{{ detailInfo.waitRegularMaintainTotal }}人
</div>
</div> </div>
</div> </div>
<div class="custom-wrap-content"> <div class="custom-wrap-content">
...@@ -96,10 +102,26 @@ ...@@ -96,10 +102,26 @@
export default { export default {
name: "importResult", name: "importResult",
data() { data() {
return {}; return {
detailInfo: {},
};
}, },
methods: { methods: {
goBack() {}, goBack() {
this.$router.push("/square/index");
},
jumpDrainage() {
this.$router.push("/square/drainage");
},
importsKey() {
let { id } = this.$route.params;
this.$apis.square.importsKey({ id }).then((res) => {
this.detailInfo = res;
});
},
},
mounted() {
this.importsKey();
}, },
}; };
</script> </script>
...@@ -117,18 +139,18 @@ export default { ...@@ -117,18 +139,18 @@ export default {
background: #ffffff; background: #ffffff;
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
0px 9px 28px 8px rgba(0, 0, 0, 0.05); 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
text-align: center; text-align: center;
img { img {
width: 124px; width: 124px;
height: 124px; height: 124px;
margin: 15px 0px; margin: 15px 0px;
} }
.contact-us-about { .contact-us-about {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
} }
} }
.squre-success-image { .squre-success-image {
padding-top: 45px; padding-top: 45px;
...@@ -232,6 +254,7 @@ line-height: 20px; ...@@ -232,6 +254,7 @@ line-height: 20px;
height: 110px; height: 110px;
} }
.custom-wrap-config { .custom-wrap-config {
cursor: pointer;
margin: 10px auto; margin: 10px auto;
display: inline-block; display: inline-block;
border-radius: 4px; border-radius: 4px;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-popover <el-popover
placement="top" placement="top"
title="说明" title="说明"
width="200" width="400"
trigger="hover" trigger="hover"
content="通过导入的客户基础信息,过滤出系统策略所匹配的目标营销人群,从而引导门店分门别类的配置营销方案,并监控实施效果。" content="通过导入的客户基础信息,过滤出系统策略所匹配的目标营销人群,从而引导门店分门别类的配置营销方案,并监控实施效果。"
> >
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
<div class="square-num-box"> <div class="square-num-box">
<div class="square-num-item"> <div class="square-num-item">
<div class="square-num-title">客户总数</div> <div class="square-num-title">客户总数</div>
<div class="square-num-count">1,230,000</div> <div class="square-num-count">{{countAll.totalCount}}</div>
</div> </div>
<div class="square-num-item"> <div class="square-num-item">
<div class="square-num-title">企微客户数</div> <div class="square-num-title">企微客户数</div>
<div class="square-num-count">1,230,000</div> <div class="square-num-count">{{countAll.qyCount}}</div>
</div> </div>
<div class="square-num-item"> <div class="square-num-item">
<div class="square-num-title">魔方导入客户数</div> <div class="square-num-title">魔方导入客户数</div>
<div class="square-num-count">1,230,000</div> <div class="square-num-count">{{countAll.magicCount}}</div>
</div> </div>
</div> </div>
<div class="square-title">客户分群营销</div> <div class="square-title">客户分群营销</div>
...@@ -38,13 +38,13 @@ ...@@ -38,13 +38,13 @@
<echart-circle bgColor="#6395FA" coustomId="coustomId_1"></echart-circle> <echart-circle bgColor="#6395FA" coustomId="coustomId_1"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div> <div class="coustom-echart-title">人群数量</div>
<div class="coustom-echart-num">107</div> <div class="coustom-echart-num">{{countAll.unQyCount}}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content"> <div class="coustom-box-content">
当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。 当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。
</div> </div>
<div class="coustom-box-config">营销配置</div> <div class="coustom-box-config" @click="jumpDrainage">营销配置</div>
</div> </div>
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">信息待完善客户</div> <div class="coustom-box-title">信息待完善客户</div>
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
<echart-circle bgColor="#5AD8A6" coustomId="coustomId_2"></echart-circle> <echart-circle bgColor="#5AD8A6" coustomId="coustomId_2"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div> <div class="coustom-echart-title">人群数量</div>
<div class="coustom-echart-num">107</div> <div class="coustom-echart-num">{{countAll.unInfoCount}}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content"> <div class="coustom-box-content">
当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。 当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。
</div> </div>
<div class="coustom-box-config">营销配置</div> <div class="coustom-box-config" @click="jumpDrainage">营销配置</div>
</div> </div>
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">待续保客户</div> <div class="coustom-box-title">待续保客户</div>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<echart-circle bgColor="#5D7092" coustomId="coustomId_3"></echart-circle> <echart-circle bgColor="#5D7092" coustomId="coustomId_3"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div> <div class="coustom-echart-title">人群数量</div>
<div class="coustom-echart-num">107</div> <div class="coustom-echart-num">{{countAll.unRenewCount}}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content"> <div class="coustom-box-content">
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<echart-circle bgColor="#5B8FF9" coustomId="coustomId_4"></echart-circle> <echart-circle bgColor="#5B8FF9" coustomId="coustomId_4"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群占比</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">10%</div> <div class="coustom-echart-num">{{countAll.unRegularCount}}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content"> <div class="coustom-box-content">
...@@ -97,18 +97,17 @@ ...@@ -97,18 +97,17 @@
class="follow-form-item" class="follow-form-item"
label-width="120px" label-width="120px"
> >
<el-button size="small" type="primary" @click="handleSearch" <el-button size="small" type="primary" @click="handleImport"
><i class="el-icon-plus"></i> 导入魔方</el-button ><i class="el-icon-plus"></i> 导入魔方</el-button
> >
<el-form-item size="small" label="导入时间"> <el-form-item size="small" label="导入时间">
<el-date-picker <el-date-picker
v-model="tableSearchForm.time" v-model='createTime'
type="daterange" type='datetimerange'
range-separator="至" value-format='yyyy-MM-dd HH:mm:ss'
start-placeholder="开始日期" start-placeholder='开始时间'
end-placeholder="结束日期" end-placeholder='结束时间'
> ></el-date-picker>
</el-date-picker>
</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>
...@@ -122,6 +121,12 @@ ...@@ -122,6 +121,12 @@
:pageConf="pageConf" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn" :beforeSearchFn="beforeSearchFn"
> >
<div slot="importNumber" slot-scope="scope">
{{scope.scope.entmicroNumber}} | {{scope.scope.importNumber}}
</div>
<div slot="newCostomerNumber" slot-scope="scope">
{{scope.scope.newCustomerNumber}} | {{scope.scope.importNumber}}
</div>
<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>
...@@ -174,9 +179,11 @@ export default { ...@@ -174,9 +179,11 @@ export default {
}, },
data() { data() {
return { return {
createTime: '',
countAll: {},
dialogVisible: true, dialogVisible: true,
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi, getListApi: this.$apis.square.importsRecord,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
...@@ -186,20 +193,22 @@ export default { ...@@ -186,20 +193,22 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "导入时间", label: "导入时间",
prop: "staffName", prop: "createdTime",
}, },
{ {
label: "企微客户数 | 导入客户数", label: "企微客户数 | 导入客户数",
prop: "entmicroName", prop: "importNumber",
minWidth: "100px", minWidth: "100px",
addHtml: "importNumber",
}, },
{ {
label: "新增客户数 | 导入客户数", label: "新增客户数 | 导入客户数",
prop: "roleName", prop: "newCostomerNumber",
addHtml: "newCostomerNumber",
}, },
{ {
label: "导入人员", label: "导入人员",
prop: "staffPhone", prop: "importStaffName",
width: "130px", width: "130px",
}, },
{ {
...@@ -219,9 +228,37 @@ export default { ...@@ -219,9 +228,37 @@ export default {
}, },
}; };
}, },
watch: {
'createTime'(value) {
this.tableSearchForm.startTime = value[0]
this.tableSearchForm.endTime = value[1]
}
},
methods: { methods: {
handleSearch() {}, importsCount() {
handleDetail() {}, let params = {
merchantId: "1",
};
this.$apis.square.importsCount({}).then((res) => {
console.log(res)
this.countAll = res;
});
},
handleSearch() {
this.$refs.employeeRef.refreshTable();
},
jumpDrainage() {
this.$router.push("/square/drainage");
},
handleDetail(scope) {
this.$router.push("/square/importResult/" + scope.id);
},
handleImport() {
this.$router.push("/square/import");
},
},
mounted() {
this.importsCount();
}, },
}; };
</script> </script>
...@@ -300,7 +337,8 @@ export default { ...@@ -300,7 +337,8 @@ export default {
img { img {
width: 14px; width: 14px;
height: 14px; height: 14px;
margin-top: 5px; margin-top: 3px;
margin-left: 18px;
} }
} }
.square-num-box { .square-num-box {
...@@ -375,6 +413,7 @@ export default { ...@@ -375,6 +413,7 @@ export default {
height: 110px; height: 110px;
} }
.coustom-box-config { .coustom-box-config {
cursor: pointer;
margin: 10px auto; margin: 10px auto;
display: inline-block; display: inline-block;
border-radius: 4px; border-radius: 4px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!