Commit d9b9ce0e by yy

init

1 parent 6e72223e
Showing 50 changed files with 4031 additions and 390 deletions
NODE_ENV='production' NODE_ENV='production'
# must start with VUE_APP_ # must start with VUE_APP_
VUE_APP_ENV = 'production' VUE_APP_ENV = 'production'
VUE_APP_SERVER = production
\ No newline at end of file \ No newline at end of file
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint",
"build:test": "vue-cli-service build --mode test"
}, },
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
......
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
} }
#app { #app {
background: #f4f5fa; background: #f4f5fa;
padding: 0px 20px 20px 40px; padding: 0px 20px 20px 20px;
position: absolute; position: absolute;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http } from '@/main' import { http,http_tag } from '@/main'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop' let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const getListApi = params => { const getListApi = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage' params.method = 'entmicro.api.staff.listFollowerStaffByPage'
...@@ -29,9 +29,9 @@ const getFollower = params => { ...@@ -29,9 +29,9 @@ const getFollower = params => {
}) })
} }
const querylabeltree = params => { const querylabeltree = params => {
params.method = 'scrm.api.datahub.label.querylabeltree' params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
params.sessionId = session params.sessionId = session
return http({ return http_tag({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -112,6 +112,7 @@ const detailChannelCode = params => { ...@@ -112,6 +112,7 @@ const detailChannelCode = params => {
const listChannelCodeByPage = params => { const listChannelCodeByPage = params => {
params.method = 'entmicro.api.code.listChannelCodeByPage' params.method = 'entmicro.api.code.listChannelCodeByPage'
params.sessionId = session params.sessionId = session
console.log(http)
return http({ return http({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -139,7 +140,39 @@ const updateChannelCode = params => { ...@@ -139,7 +140,39 @@ const updateChannelCode = params => {
sign: true sign: true
}) })
} }
const getCustomer = params => {
params.method = 'entmicro.api.customer.code.page'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getChannelCodeStaffList = params => {
params.method = 'entmicro.api.code.getChannelCodeStaffList'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getStatus = params => {
params.method = 'scrm.api.work.wechat.access.status'
params.sessionId = session
return http({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getStatus,
getListApi, getListApi,
getFollower, getFollower,
querylabeltree, querylabeltree,
...@@ -152,5 +185,7 @@ export default { ...@@ -152,5 +185,7 @@ export default {
detailChannelCode, detailChannelCode,
deleteChannelCode, deleteChannelCode,
updateChannelCodeBill, updateChannelCodeBill,
listChannelCodeBill listChannelCodeBill,
getCustomer,
getChannelCodeStaffList
} }
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @returns * @returns
*/ */
import { http } from '@/main' import { http } from '@/main'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop' let session = 'mini-57c1c42e-8a0c-4fc3-959c-b62813a471cd-rop'
const getCoupon = params => { const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page' params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({ return http({
...@@ -35,6 +35,25 @@ const getCard = params => { ...@@ -35,6 +35,25 @@ const getCard = params => {
sign: true sign: true
}) })
} }
const merchantOpen = params => {
params.method = 'scrm.api.equity.service.merchant.config.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const merchant = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getPackage = params => { const getPackage = params => {
params.method = 'scrm.api.equity.package.info.list.with.page' params.method = 'scrm.api.equity.package.info.list.with.page'
return http({ return http({
...@@ -143,9 +162,21 @@ const updateConfig = params => { ...@@ -143,9 +162,21 @@ const updateConfig = params => {
sign: true sign: true
}) })
} }
const customerPage = params => {
params.method = 'entmicro.api.dracIm.customer.search.page'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getCoupon, getCoupon,
getMerchant, getMerchant,
merchantOpen,
merchant,
getCard, getCard,
getPackage, getPackage,
getActivity, getActivity,
...@@ -157,5 +188,6 @@ export default { ...@@ -157,5 +188,6 @@ export default {
findById, findById,
updateConfig, updateConfig,
findConfig, findConfig,
addConfig addConfig,
customerPage
} }
\ No newline at end of file \ No newline at end of file
...@@ -148,3 +148,39 @@ img { ...@@ -148,3 +148,39 @@ img {
.el-table tbody tr:hover > td { .el-table tbody tr:hover > td {
background: #f4f3ff !important; background: #f4f3ff !important;
} }
.el-message-box .el-message-box__title,.el-message-box .el-message-box__headerbtn {
display: none;
}
.el-message-box__content {
text-align: center;
padding: 50px 0px 50px;
}
.el-message-box__status.el-icon-warning {
display: none;
}
.el-message-box__btns {
text-align: center;
padding: 20px 0px 10px;
border-top: 1px solid #E6E6E6;
}
.el-message-box__btns button:nth-child(2) {
margin-left: 40px;
}
.el-message-box__status+.el-message-box__message {
padding: 0px 10px;
}
.el-message-box--center {
padding: 0px;
}
.el-message--info {
height: 40px;
background: #e6e9ff;
border: 1px solid #5850ff;
border-radius: 4px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-message .el-icon-info {
color: #5850ff;
font-size: 16px;
}
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="basic-panel"> <div class="basic-panel">
<el-tooltip class="item" effect="dark" :content="content" placement="top" v-show="tooltipStatus"> <el-popover placement="top" popper-class="base-popper" trigger="hover" :content="content" v-if="tooltipStatus">
<div class="basic-title-s">{{ content }}</div> <div class="basic-title" slot="reference">{{ content | ellipsis(this) }}</div>
</el-tooltip> </el-popover>
<div class="basic-title" v-show="!tooltipStatus">{{ content }}</div> <div class="basic-title" v-else>{{ content | ellipsis(this) }}</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -14,9 +14,9 @@ export default { ...@@ -14,9 +14,9 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
titleWid: { textLength: {
type: Number, type: Number,
default: 100 default: 8
} }
}, },
data() { data() {
...@@ -24,28 +24,26 @@ export default { ...@@ -24,28 +24,26 @@ export default {
tooltipStatus: false tooltipStatus: false
} }
}, },
watch: { filters: {
content: { ellipsis(value,that) {
handler(value) { console.log(value,that)
const title = document.querySelector('.basic-title') if (value.length > that.textLength) {
console.log(title, value) that.tooltipStatus = true
if (title.innerText == value) { return value.slice(0, that.textLength) + '...'
this.tooltipStatus = false
} else {
this.tooltipStatus = true
} }
}, return value
deep: true
} }
}, },
mounted() { mounted() {
const title = document.querySelector('.basic-title-s') // this.$nextTick(() => {
console.log(title.innerText, this.content) // const title = document.querySelector('.basic-title-s')
if (title.innerText == this.content) { // console.log(title.innerText, this.content)
this.tooltipStatus = false // if (title.innerText == this.content) {
} else { // this.tooltipStatus = false
this.tooltipStatus = true // } else {
} // this.tooltipStatus = true
// }
// })
} }
} }
</script> </script>
...@@ -54,11 +52,4 @@ export default { ...@@ -54,11 +52,4 @@ export default {
.basic-panel { .basic-panel {
display: inline-block; display: inline-block;
} }
.basic-title,.basic-title-s {
width: 100%;
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
</style> </style>
.vdr {
touch-action: none;
position: absolute;
box-sizing: border-box;
border: 1px dashed black;
}
.handle {
box-sizing: border-box;
position: absolute;
width: 10px;
height: 10px;
background: #EEE;
border: 1px solid #333;
}
.handle-tl {
top: -10px;
left: -10px;
cursor: nw-resize;
}
.handle-tm {
top: -10px;
left: 50%;
margin-left: -5px;
cursor: n-resize;
}
.handle-tr {
top: -10px;
right: -10px;
cursor: ne-resize;
}
.handle-ml {
top: 50%;
margin-top: -5px;
left: -10px;
cursor: w-resize;
}
.handle-mr {
top: 50%;
margin-top: -5px;
right: -10px;
cursor: e-resize;
}
.handle-bl {
bottom: -10px;
left: -10px;
cursor: sw-resize;
}
.handle-bm {
bottom: -10px;
left: 50%;
margin-left: -5px;
cursor: s-resize;
}
.handle-br {
bottom: -10px;
right: -10px;
cursor: se-resize;
}
@media only screen and (max-width: 768px) {
[class*="handle-"]:before {
content: '';
left: -10px;
right: -10px;
bottom: -10px;
top: -10px;
position: absolute;
}
}
<template>
<div
:style="style"
:class="[{
[classNameActive]: enabled,
[classNameDragging]: dragging,
[classNameResizing]: resizing,
[classNameDraggable]: draggable,
[classNameResizable]: resizable
}, className]"
@mousedown="elementMouseDown"
@touchstart="elementTouchDown"
>
<div
v-for="handle in actualHandles"
:key="handle"
:class="[classNameHandle, classNameHandle + '-' + handle]"
:style="{display: enabled ? 'block' : 'none'}"
@mousedown.stop.prevent="handleDown(handle, $event)"
@touchstart.stop.prevent="handleTouchDown(handle, $event)"
>
<slot :name="handle"></slot>
</div>
<slot></slot>
</div>
</template>
<script>
import { matchesSelectorToParentElements, getComputedSize, addEvent, removeEvent } from '../../utils/dom'
import { computeWidth, computeHeight, restrictToBounds, snapToGrid } from '../../utils/fns'
const events = {
mouse: {
start: 'mousedown',
move: 'mousemove',
stop: 'mouseup'
},
touch: {
start: 'touchstart',
move: 'touchmove',
stop: 'touchend'
}
}
const userSelectNone = {
userSelect: 'none',
MozUserSelect: 'none',
WebkitUserSelect: 'none',
MsUserSelect: 'none'
}
const userSelectAuto = {
userSelect: 'auto',
MozUserSelect: 'auto',
WebkitUserSelect: 'auto',
MsUserSelect: 'auto'
}
let eventsFor = events.mouse
export default {
replace: true,
name: 'vue-draggable-resizable',
props: {
className: {
type: String,
default: 'vdr'
},
classNameDraggable: {
type: String,
default: 'draggable'
},
classNameResizable: {
type: String,
default: 'resizable'
},
classNameDragging: {
type: String,
default: 'dragging'
},
classNameResizing: {
type: String,
default: 'resizing'
},
classNameActive: {
type: String,
default: 'active'
},
classNameHandle: {
type: String,
default: 'handle'
},
disableUserSelect: {
type: Boolean,
default: true
},
enableNativeDrag: {
type: Boolean,
default: false
},
preventDeactivation: {
type: Boolean,
default: false
},
active: {
type: Boolean,
default: false
},
draggable: {
type: Boolean,
default: true
},
resizable: {
type: Boolean,
default: true
},
lockAspectRatio: {
type: Boolean,
default: false
},
w: {
type: [Number, String],
default: 200,
validator: (val) => {
if (typeof val === 'number') {
return val > 0
}
return val === 'auto'
}
},
h: {
type: [Number, String],
default: 200,
validator: (val) => {
if (typeof val === 'number') {
return val > 0
}
return val === 'auto'
}
},
minWidth: {
type: Number,
default: 0,
validator: (val) => val >= 0
},
minHeight: {
type: Number,
default: 0,
validator: (val) => val >= 0
},
maxWidth: {
type: Number,
default: null,
validator: (val) => val >= 0
},
maxHeight: {
type: Number,
default: null,
validator: (val) => val >= 0
},
x: {
type: Number,
default: 0
},
y: {
type: Number,
default: 0
},
z: {
type: [String, Number],
default: 'auto',
validator: (val) => (typeof val === 'string' ? val === 'auto' : val >= 0)
},
handles: {
type: Array,
default: () => ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'],
validator: (val) => {
const s = new Set(['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'])
return new Set(val.filter(h => s.has(h))).size === val.length
}
},
dragHandle: {
type: String,
default: null
},
dragCancel: {
type: String,
default: null
},
axis: {
type: String,
default: 'both',
validator: (val) => ['x', 'y', 'both'].includes(val)
},
grid: {
type: Array,
default: () => [1, 1]
},
customId: {
type: [String,Number],
default: ''
},
parent: {
type: Boolean,
default: false
},
scale: {
type: [Number, Array],
default: 1,
validator: (val) => {
if (typeof val === 'number') {
return val > 0
}
return val.length === 2 && val[0] > 0 && val[1] > 0
}
},
onDragStart: {
type: Function,
default: () => true
},
onDrag: {
type: Function,
default: () => true
},
onResizeStart: {
type: Function,
default: () => true
},
onResize: {
type: Function,
default: () => true
}
},
data: function () {
return {
left: this.x,
top: this.y,
right: null,
bottom: null,
width: null,
height: null,
widthTouched: false,
heightTouched: false,
aspectFactor: null,
parentWidth: null,
parentHeight: null,
minW: this.minWidth,
minH: this.minHeight,
maxW: this.maxWidth,
maxH: this.maxHeight,
handle: null,
enabled: this.active,
resizing: false,
dragging: false,
dragEnable: false,
resizeEnable: false,
zIndex: this.z
}
},
created: function () {
// eslint-disable-next-line
if (this.maxWidth && this.minWidth > this.maxWidth) console.warn('[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth')
// eslint-disable-next-line
if (this.maxWidth && this.minHeight > this.maxHeight) console.warn('[Vdr warn]: Invalid prop: minHeight cannot be greater than maxHeight')
this.resetBoundsAndMouseState()
},
mounted: function () {
if (!this.enableNativeDrag) {
this.$el.ondragstart = () => false
}
const [parentWidth, parentHeight] = this.getParentSize()
this.parentWidth = parentWidth
this.parentHeight = parentHeight
const [width, height] = getComputedSize(this.$el)
this.aspectFactor = (this.w !== 'auto' ? this.w : width) / (this.h !== 'auto' ? this.h : height)
this.width = this.w !== 'auto' ? this.w : width
this.height = this.h !== 'auto' ? this.h : height
this.right = this.parentWidth - this.width - this.left
this.bottom = this.parentHeight - this.height - this.top
if (this.active) {
this.$emit('activated')
}
addEvent(document.documentElement, 'mousedown', this.deselect)
addEvent(document.documentElement, 'touchend touchcancel', this.deselect)
addEvent(window, 'resize', this.checkParentSize)
},
beforeDestroy: function () {
removeEvent(document.documentElement, 'mousedown', this.deselect)
removeEvent(document.documentElement, 'touchstart', this.handleUp)
removeEvent(document.documentElement, 'mousemove', this.move)
removeEvent(document.documentElement, 'touchmove', this.move)
removeEvent(document.documentElement, 'mouseup', this.handleUp)
removeEvent(document.documentElement, 'touchend touchcancel', this.deselect)
removeEvent(window, 'resize', this.checkParentSize)
},
methods: {
resetBoundsAndMouseState () {
this.mouseClickPosition = { mouseX: 0, mouseY: 0, x: 0, y: 0, w: 0, h: 0 }
this.bounds = {
minLeft: null,
maxLeft: null,
minRight: null,
maxRight: null,
minTop: null,
maxTop: null,
minBottom: null,
maxBottom: null
}
},
checkParentSize () {
if (this.parent) {
const [newParentWidth, newParentHeight] = this.getParentSize()
this.parentWidth = newParentWidth
this.parentHeight = newParentHeight
this.right = this.parentWidth - this.width - this.left
this.bottom = this.parentHeight - this.height - this.top
}
},
getParentSize () {
if (this.parent) {
const style = window.getComputedStyle(this.$el.parentNode, null)
return [
parseInt(style.getPropertyValue('width'), 10),
parseInt(style.getPropertyValue('height'), 10)
]
}
return [null, null]
},
elementTouchDown (e) {
eventsFor = events.touch
this.elementDown(e)
},
elementMouseDown (e) {
eventsFor = events.mouse
this.elementDown(e)
},
elementDown (e) {
if (e instanceof MouseEvent && e.which !== 1) {
return
}
const target = e.target || e.srcElement
if (this.$el.contains(target)) {
if (this.onDragStart(e) === false) {
return
}
if (
(this.dragHandle && !matchesSelectorToParentElements(target, this.dragHandle, this.$el)) ||
(this.dragCancel && matchesSelectorToParentElements(target, this.dragCancel, this.$el))
) {
this.dragging = false
return
}
if (!this.enabled) {
this.enabled = true
this.$emit('activated',this.customId)
this.$emit('update:active', true)
}
if (this.draggable) {
this.dragEnable = true
}
this.mouseClickPosition.mouseX = e.touches ? e.touches[0].pageX : e.pageX
this.mouseClickPosition.mouseY = e.touches ? e.touches[0].pageY : e.pageY
this.mouseClickPosition.left = this.left
this.mouseClickPosition.right = this.right
this.mouseClickPosition.top = this.top
this.mouseClickPosition.bottom = this.bottom
if (this.parent) {
this.bounds = this.calcDragLimits()
}
addEvent(document.documentElement, eventsFor.move, this.move)
addEvent(document.documentElement, eventsFor.stop, this.handleUp)
}
},
calcDragLimits () {
return {
minLeft: this.left % this.grid[0],
maxLeft: Math.floor((this.parentWidth - this.width - this.left) / this.grid[0]) * this.grid[0] + this.left,
minRight: this.right % this.grid[0],
maxRight: Math.floor((this.parentWidth - this.width - this.right) / this.grid[0]) * this.grid[0] + this.right,
minTop: this.top % this.grid[1],
maxTop: Math.floor((this.parentHeight - this.height - this.top) / this.grid[1]) * this.grid[1] + this.top,
minBottom: this.bottom % this.grid[1],
maxBottom: Math.floor((this.parentHeight - this.height - this.bottom) / this.grid[1]) * this.grid[1] + this.bottom
}
},
deselect (e) {
const target = e.target || e.srcElement
const regex = new RegExp(this.className + '-([trmbl]{2})', '')
if (!this.$el.contains(target) && !regex.test(target.className)) {
if (this.enabled && !this.preventDeactivation) {
this.enabled = false
this.$emit('deactivated')
this.$emit('update:active', false)
}
removeEvent(document.documentElement, eventsFor.move, this.handleResize)
}
this.resetBoundsAndMouseState()
},
handleTouchDown (handle, e) {
eventsFor = events.touch
this.handleDown(handle, e)
},
handleDown (handle, e) {
if (e instanceof MouseEvent && e.which !== 1) {
return
}
if (this.onResizeStart(handle, e) === false) {
return
}
if (e.stopPropagation) e.stopPropagation()
// Here we avoid a dangerous recursion by faking
// corner handles as middle handles
if (this.lockAspectRatio && !handle.includes('m')) {
this.handle = 'm' + handle.substring(1)
} else {
this.handle = handle
}
this.resizeEnable = true
this.mouseClickPosition.mouseX = e.touches ? e.touches[0].pageX : e.pageX
this.mouseClickPosition.mouseY = e.touches ? e.touches[0].pageY : e.pageY
this.mouseClickPosition.left = this.left
this.mouseClickPosition.right = this.right
this.mouseClickPosition.top = this.top
this.mouseClickPosition.bottom = this.bottom
this.bounds = this.calcResizeLimits()
addEvent(document.documentElement, eventsFor.move, this.handleResize)
addEvent(document.documentElement, eventsFor.stop, this.handleUp)
},
calcResizeLimits () {
let minW = this.minW
let minH = this.minH
let maxW = this.maxW
let maxH = this.maxH
const aspectFactor = this.aspectFactor
const [gridX, gridY] = this.grid
const width = this.width
const height = this.height
const left = this.left
const top = this.top
const right = this.right
const bottom = this.bottom
if (this.lockAspectRatio) {
if (minW / minH > aspectFactor) {
minH = minW / aspectFactor
} else {
minW = aspectFactor * minH
}
if (maxW && maxH) {
maxW = Math.min(maxW, aspectFactor * maxH)
maxH = Math.min(maxH, maxW / aspectFactor)
} else if (maxW) {
maxH = maxW / aspectFactor
} else if (maxH) {
maxW = aspectFactor * maxH
}
}
maxW = maxW - (maxW % gridX)
maxH = maxH - (maxH % gridY)
const limits = {
minLeft: null,
maxLeft: null,
minTop: null,
maxTop: null,
minRight: null,
maxRight: null,
minBottom: null,
maxBottom: null
}
if (this.parent) {
limits.minLeft = left % gridX
limits.maxLeft = left + Math.floor((width - minW) / gridX) * gridX
limits.minTop = top % gridY
limits.maxTop = top + Math.floor((height - minH) / gridY) * gridY
limits.minRight = right % gridX
limits.maxRight = right + Math.floor((width - minW) / gridX) * gridX
limits.minBottom = bottom % gridY
limits.maxBottom = bottom + Math.floor((height - minH) / gridY) * gridY
if (maxW) {
limits.minLeft = Math.max(limits.minLeft, this.parentWidth - right - maxW)
limits.minRight = Math.max(limits.minRight, this.parentWidth - left - maxW)
}
if (maxH) {
limits.minTop = Math.max(limits.minTop, this.parentHeight - bottom - maxH)
limits.minBottom = Math.max(limits.minBottom, this.parentHeight - top - maxH)
}
if (this.lockAspectRatio) {
limits.minLeft = Math.max(limits.minLeft, left - top * aspectFactor)
limits.minTop = Math.max(limits.minTop, top - left / aspectFactor)
limits.minRight = Math.max(limits.minRight, right - bottom * aspectFactor)
limits.minBottom = Math.max(limits.minBottom, bottom - right / aspectFactor)
}
} else {
limits.minLeft = null
limits.maxLeft = left + Math.floor((width - minW) / gridX) * gridX
limits.minTop = null
limits.maxTop = top + Math.floor((height - minH) / gridY) * gridY
limits.minRight = null
limits.maxRight = right + Math.floor((width - minW) / gridX) * gridX
limits.minBottom = null
limits.maxBottom = bottom + Math.floor((height - minH) / gridY) * gridY
if (maxW) {
limits.minLeft = -(right + maxW)
limits.minRight = -(left + maxW)
}
if (maxH) {
limits.minTop = -(bottom + maxH)
limits.minBottom = -(top + maxH)
}
if (this.lockAspectRatio && (maxW && maxH)) {
limits.minLeft = Math.min(limits.minLeft, -(right + maxW))
limits.minTop = Math.min(limits.minTop, -(maxH + bottom))
limits.minRight = Math.min(limits.minRight, -left - maxW)
limits.minBottom = Math.min(limits.minBottom, -top - maxH)
}
}
return limits
},
move (e) {
if (this.resizing) {
this.handleResize(e)
} else if (this.dragEnable) {
this.handleDrag(e)
}
},
handleDrag (e) {
const axis = this.axis
const grid = this.grid
const bounds = this.bounds
const mouseClickPosition = this.mouseClickPosition
const tmpDeltaX = axis && axis !== 'y' ? mouseClickPosition.mouseX - (e.touches ? e.touches[0].pageX : e.pageX) : 0
const tmpDeltaY = axis && axis !== 'x' ? mouseClickPosition.mouseY - (e.touches ? e.touches[0].pageY : e.pageY) : 0
const [deltaX, deltaY] = snapToGrid(grid, tmpDeltaX, tmpDeltaY, this.scale)
const left = restrictToBounds(mouseClickPosition.left - deltaX, bounds.minLeft, bounds.maxLeft)
const top = restrictToBounds(mouseClickPosition.top - deltaY, bounds.minTop, bounds.maxTop)
if (this.onDrag(left, top) === false) {
return
}
const right = restrictToBounds(mouseClickPosition.right + deltaX, bounds.minRight, bounds.maxRight)
const bottom = restrictToBounds(mouseClickPosition.bottom + deltaY, bounds.minBottom, bounds.maxBottom)
this.left = left
this.top = top
this.right = right
this.bottom = bottom
this.$emit('dragging', this.left, this.top)
this.dragging = true
},
moveHorizontally (val) {
// should calculate with scale 1.
const [deltaX, _] = snapToGrid(this.grid, val, this.top, 1)
const left = restrictToBounds(deltaX, this.bounds.minLeft, this.bounds.maxLeft)
this.left = left
this.right = this.parentWidth - this.width - left
},
moveVertically (val) {
// should calculate with scale 1.
const [_, deltaY] = snapToGrid(this.grid, this.left, val, 1)
const top = restrictToBounds(deltaY, this.bounds.minTop, this.bounds.maxTop)
this.top = top
this.bottom = this.parentHeight - this.height - top
},
handleResize (e) {
let left = this.left
let top = this.top
let right = this.right
let bottom = this.bottom
const mouseClickPosition = this.mouseClickPosition
const lockAspectRatio = this.lockAspectRatio
const aspectFactor = this.aspectFactor
const tmpDeltaX = mouseClickPosition.mouseX - (e.touches ? e.touches[0].pageX : e.pageX)
const tmpDeltaY = mouseClickPosition.mouseY - (e.touches ? e.touches[0].pageY : e.pageY)
if (!this.widthTouched && tmpDeltaX) {
this.widthTouched = true
}
if (!this.heightTouched && tmpDeltaY) {
this.heightTouched = true
}
const [deltaX, deltaY] = snapToGrid(this.grid, tmpDeltaX, tmpDeltaY, this.scale)
if (this.handle.includes('b')) {
bottom = restrictToBounds(
mouseClickPosition.bottom + deltaY,
this.bounds.minBottom,
this.bounds.maxBottom
)
if (this.lockAspectRatio && this.resizingOnY) {
right = this.right - (this.bottom - bottom) * aspectFactor
}
} else if (this.handle.includes('t')) {
top = restrictToBounds(
mouseClickPosition.top - deltaY,
this.bounds.minTop,
this.bounds.maxTop
)
if (this.lockAspectRatio && this.resizingOnY) {
left = this.left - (this.top - top) * aspectFactor
}
}
if (this.handle.includes('r')) {
right = restrictToBounds(
mouseClickPosition.right + deltaX,
this.bounds.minRight,
this.bounds.maxRight
)
if (this.lockAspectRatio && this.resizingOnX) {
bottom = this.bottom - (this.right - right) / aspectFactor
}
} else if (this.handle.includes('l')) {
left = restrictToBounds(
mouseClickPosition.left - deltaX,
this.bounds.minLeft,
this.bounds.maxLeft
)
if (this.lockAspectRatio && this.resizingOnX) {
top = this.top - (this.left - left) / aspectFactor
}
}
const width = computeWidth(this.parentWidth, left, right)
const height = computeHeight(this.parentHeight, top, bottom)
if (this.onResize(this.handle, left, top, width, height) === false) {
return
}
this.left = left
this.top = top
this.right = right
this.bottom = bottom
this.width = width
this.height = height
this.$emit('resizing', this.left, this.top, this.width, this.height)
this.resizing = true
},
changeWidth (val) {
// should calculate with scale 1.
const [newWidth, _] = snapToGrid(this.grid, val, 0, 1)
let right = restrictToBounds(
(this.parentWidth - newWidth - this.left),
this.bounds.minRight,
this.bounds.maxRight
)
let bottom = this.bottom
if (this.lockAspectRatio) {
bottom = this.bottom - (this.right - right) / this.aspectFactor
}
const width = computeWidth(this.parentWidth, this.left, right)
const height = computeHeight(this.parentHeight, this.top, bottom)
this.right = right
this.bottom = bottom
this.width = width
this.height = height
},
changeHeight (val) {
// should calculate with scale 1.
const [_, newHeight] = snapToGrid(this.grid, 0, val, 1)
let bottom = restrictToBounds(
(this.parentHeight - newHeight - this.top),
this.bounds.minBottom,
this.bounds.maxBottom
)
let right = this.right
if (this.lockAspectRatio) {
right = this.right - (this.bottom - bottom) * this.aspectFactor
}
const width = computeWidth(this.parentWidth, this.left, right)
const height = computeHeight(this.parentHeight, this.top, bottom)
this.right = right
this.bottom = bottom
this.width = width
this.height = height
},
handleUp (e) {
this.handle = null
this.resetBoundsAndMouseState()
this.dragEnable = false
this.resizeEnable = false
if (this.resizing) {
this.resizing = false
this.$emit('resizestop', this.left, this.top, this.width, this.height)
}
if (this.dragging) {
this.dragging = false
this.$emit('dragstop', this.left, this.top)
}
removeEvent(document.documentElement, eventsFor.move, this.handleResize)
}
},
computed: {
style () {
return {
transform: `translate(${this.left}px, ${this.top}px)`,
width: this.computedWidth,
height: this.computedHeight,
zIndex: this.zIndex,
...(this.dragging && this.disableUserSelect ? userSelectNone : userSelectAuto)
}
},
actualHandles () {
if (!this.resizable) return []
return this.handles
},
computedWidth () {
if (this.w === 'auto') {
if (!this.widthTouched) {
return 'auto'
}
}
return this.width + 'px'
},
computedHeight () {
if (this.h === 'auto') {
if (!this.heightTouched) {
return 'auto'
}
}
return this.height + 'px'
},
resizingOnX () {
return (Boolean(this.handle) && (this.handle.includes('l') || this.handle.includes('r')))
},
resizingOnY () {
return (Boolean(this.handle) && (this.handle.includes('t') || this.handle.includes('b')))
},
isCornerHandle () {
return (Boolean(this.handle) && ['tl', 'tr', 'br', 'bl'].includes(this.handle))
}
},
watch: {
active (val) {
this.enabled = val
if (val) {
this.$emit('activated')
} else {
this.$emit('deactivated')
}
},
z (val) {
if (val >= 0 || val === 'auto') {
this.zIndex = val
}
},
x (val) {
if (this.resizing || this.dragging) {
return
}
if (this.parent) {
this.bounds = this.calcDragLimits()
}
this.moveHorizontally(val)
},
y (val) {
if (this.resizing || this.dragging) {
return
}
if (this.parent) {
this.bounds = this.calcDragLimits()
}
this.moveVertically(val)
},
lockAspectRatio (val) {
if (val) {
this.aspectFactor = this.width / this.height
} else {
this.aspectFactor = undefined
}
},
minWidth (val) {
if (val > 0 && val <= this.width) {
this.minW = val
}
},
minHeight (val) {
if (val > 0 && val <= this.height) {
this.minH = val
}
},
maxWidth (val) {
this.maxW = val
},
maxHeight (val) {
this.maxH = val
},
w (val) {
if (this.resizing || this.dragging) {
return
}
if (this.parent) {
this.bounds = this.calcResizeLimits()
}
this.changeWidth(val)
},
h (val) {
if (this.resizing || this.dragging) {
return
}
if (this.parent) {
this.bounds = this.calcResizeLimits()
}
this.changeHeight(val)
}
}
}
</script>
<template>
<div
class="scrm-footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<slot></slot>
</div>
</template>
<script>
export default {
name: 'glsx-footer',
props: {
className: {
type: String,
default: '.base-container-right'
}
},
data() {
return {
footerLeft: 0,
footerWidth: 0
}
},
methods: {
resize() {
this.footerLeft = document.querySelector(this.className).offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}
},
destroyed() {
window.removeEventListener('resize', this.resize)
},
mounted() {
this.resize()
window.addEventListener('resize', this.resize)
}
}
</script>
<style lang="scss">
.scrm-footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style>
...@@ -11,8 +11,10 @@ import Vue from 'vue' ...@@ -11,8 +11,10 @@ import Vue from 'vue'
// 导入权限按钮 // 导入权限按钮
import _button from '@/components/glsx-button/index' import _button from '@/components/glsx-button/index'
import _title from '@/components/basic-title/index' import _title from '@/components/basic-title/index'
// import _footer from '@/components/glsx-footer/index'
Vue.component('basic-dialog', () => Vue.component('basic-dialog', () =>
import('./basic-dialog/index.vue')) import('./basic-dialog/index.vue'))
Vue.component('GLButton', _button) Vue.component('GLButton', _button)
Vue.component('GLTitle', _title) Vue.component('GLTitle', _title)
// Vue.component('GLFooter', _footer)
// Vue.component('glsx-table', glsxTable) // Vue.component('glsx-table', glsxTable)
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable> <GLTable v-if="dialogVisible" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a> <a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button> <el-button size="small" @click="handleCancel">取 消</el-button>
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<script> <script>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import util from '@/utils/util'
export default { export default {
name: 'selectEmp', name: 'selectEmp',
data() { data() {
...@@ -60,7 +61,7 @@ export default { ...@@ -60,7 +61,7 @@ export default {
}, },
methods: { methods: {
jumpUrl() { jumpUrl() {
this.$history.push('/home/followUp/index') util.openUrl(location.origin + '/home/followUp/index')
}, },
getFollower() { getFollower() {
var params = { var params = {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容"></el-input> <el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容"></el-input>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button> <el-button size="small" type="primary" @click="handleSearch">查询</el-button>
</div> </div>
<div class="checkbox-group-box" :style="{ 'height': heightBox + 'px' }"> <div class="checkbox-group-box" :style="{ height: heightBox + 'px' }">
<div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index"> <div style="margin-bottom: 8px" 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> <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> <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>
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
<div class="tag-title">已选标签</div> <div class="tag-title">已选标签</div>
<div class="tag-select-box"> <div class="tag-select-box">
<div class="tag-box-header">标签名称({{ selectNum }}项)</div> <div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box" :style="{ 'height': heightBox + 'px' }"> <div class="tag-selected-box" :style="{ height: heightBox + 'px' }">
<template v-for="item in labelTreeRetSelect"> <template v-for="item in labelTreeRetSelect">
<template v-for="(tag, idx) in item.tagChecked"> <template v-for="(tag, idx) in item.tagChecked">
<el-tag :title="tag.name" type='info' class="tag-selected-item" :key="idx" v-if="tag" closable :disable-transitions="false" @close="remove(item, idx)"> <el-tag :title="tag.name" type="info" class="tag-selected-item" :key="idx" v-if="tag" closable :disable-transitions="false" @close="remove(item, idx)">
{{ tag.name }} {{ tag.name }}
</el-tag> </el-tag>
</template> </template>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">没有意向标签?点我创建</a> <a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a>
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span> </span>
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<script> <script>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import util from '@/utils/util'
export default { export default {
name: 'activityModel', name: 'activityModel',
data() { data() {
...@@ -58,32 +59,7 @@ export default { ...@@ -58,32 +59,7 @@ export default {
selectNum: 0, selectNum: 0,
searchStatus: false, searchStatus: false,
labelTreeRetSelect: [], labelTreeRetSelect: [],
labelTreeRets: [ 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: { watch: {
...@@ -99,7 +75,8 @@ export default { ...@@ -99,7 +75,8 @@ export default {
}, },
methods: { methods: {
jumpUrl() { jumpUrl() {
this.$history.push('/custom/tagsManage/index') util.openUrl(location.origin + '/custom/tagsManage/index')
this.dialogVisible = false
}, },
init(item) { init(item) {
this.labelGroupName = '' this.labelGroupName = ''
...@@ -118,7 +95,8 @@ export default { ...@@ -118,7 +95,8 @@ export default {
pageSize: 1000, pageSize: 1000,
shopId: this.$globalState.session.merchantId, shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName, labelGroupName: this.labelGroupName,
labelTypesStr: '自店标签,企业标签' labelTypesStr: '自店标签,企业标签',
edition: this.$globalState.session.merchantModel
} }
}) })
.then(res => { .then(res => {
...@@ -147,13 +125,6 @@ export default { ...@@ -147,13 +125,6 @@ export default {
} }
}) })
}) })
this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => {
if (itm.labelGroup.id == item.labelGroup.id) {
item.tagChecked = utils.deepClone(itm.tagChecked)
}
})
})
this.labelTreeRets.forEach((item, index) => { this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => { this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index) this.handleCheckedChange(item.tagChecked, index)
...@@ -193,12 +164,18 @@ export default { ...@@ -193,12 +164,18 @@ export default {
} }
}) })
}, },
remove(item, idx) { remove(items, idx) {
item.tagChecked.splice(idx, 1) items.tagChecked.splice(idx, 1)
this.labelTreeRets.forEach(item => { this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => { this.labelTreeRetSelect.forEach(itm => {
if (item.labelGroup.id == itm.labelGroup.id) { if (item.labelGroup.id == itm.labelGroup.id) {
item.tagChecked = utils.deepClone(itm.tagChecked) let tagChecked = []
itm.tagChecked.forEach(x => {
tagChecked.push(x.id)
})
this.$nextTick(() => {
item.tagChecked = item.labelList.filter(i => tagChecked.includes(i.id))
})
} }
if (item.tagChecked.length == 0) { if (item.tagChecked.length == 0) {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -207,7 +184,6 @@ export default { ...@@ -207,7 +184,6 @@ export default {
} }
}) })
}) })
this.labelTreeRets.forEach((item, index) => { this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => { this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index) this.handleCheckedChange(item.tagChecked, index)
...@@ -274,7 +250,7 @@ export default { ...@@ -274,7 +250,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-jump { .dialog-jump {
color: #5850FF; color: #5850ff;
float: left; float: left;
line-height: 24px; line-height: 24px;
text-decoration: underline; text-decoration: underline;
......
<template>
<div class="ly-emotion">
<slot></slot>
</div>
</template>
<script>
import emoji from '@/utils/emo'
export default {
name: 'ly-emotion',
mounted() {
const name = this.$el.innerHTML
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(name)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
let imgHTML = `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
this.$nextTick(() => {
this.$el.innerHTML = imgHTML
})
}
}
</script>
<style scoped>
.ly-emotion {
display: inline-block;
}
.ly-static-emotion {
width: 24px;
height: 24px;
display: inline-block;
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="square-main"> <div class="square-main">
<el-dialog title="选择活动" :visible.sync="dialogVisible" width="70%" :before-close="handleClose"> <el-dialog title="选择活动" :visible.sync="dialogVisible" width="1088px" :before-close="handleClose">
<div class="model-panel"> <div class="model-panel">
<div class="model-panel-tab"> <div class="model-panel-tab">
<label>活动类型:</label> <label>活动类型:</label>
...@@ -9,46 +9,54 @@ ...@@ -9,46 +9,54 @@
<el-tab-pane label="权益套餐" name="4"></el-tab-pane> <el-tab-pane label="权益套餐" name="4"></el-tab-pane>
<el-tab-pane label="商城券" name="2"></el-tab-pane> <el-tab-pane label="商城券" name="2"></el-tab-pane>
<el-tab-pane label="秒杀活动" name="5"></el-tab-pane> <el-tab-pane label="秒杀活动" name="5"></el-tab-pane>
<el-tab-pane label="无忧服务" name="6" v-if="openFlag"></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading"> <div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)"> <div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="model-item-title" :title="item.equityName" v-show="activeName == 3">{{ item.equityName }}</div> <div class="model-item-title" :title="item.equityName" v-show="activeName == 3">{{ item.equityName }}</div>
<div class="model-item-title" :title="item.couponName" v-show="activeName == 2">{{ item.couponName }}</div> <div class="model-item-title" :title="item.couponName" v-show="activeName == 2">{{ item.couponName }}</div>
<div class="model-item-title" :title="item.couponName" v-show="activeName == 1">{{ item.couponName }}</div> <div class="model-item-title" :title="item.couponName" v-show="activeName == 6">{{ item.equityName }}</div>
<div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}</div> <div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}</div>
<div class="model-item-title" :title="item.activityName" v-show="activeName == 5">{{ item.activityName }}</div> <div class="model-item-title" :title="item.activityName" v-show="activeName == 5">{{ item.activityName }}</div>
<div class="model-item-content" v-show="activeName == 1 || activeName == 4"></div> <div class="model-item-content" v-show="activeName == 3">领取方式:免费领用</div>
<div class="model-item-content" v-show="activeName == 2">剩余数量:{{ item.residueAmount }}</div> <div class="model-item-content" v-show="activeName == 4">领取方式:付费购买</div>
<div class="model-item-content" v-show="activeName == 1">剩余数量:{{ item.remainAmount }}</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 6">有效期:{{ item.effectiveDays }}天</div>
<div class="model-item-content" v-show="activeName == 3">价格:{{ item.goodPrice }}元</div>
<div class="model-item-content" v-show="activeName == 4">价格:{{ item.packagePrice }}元</div>
<div class="model-item-content" v-show="activeName == 5"></div>
<div class="model-item-content" v-show="activeName == 5"></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.effectiveType == 3">有效期:无限制</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div> <div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div>
<div class="model-item-content" v-show="activeName == 6">获取方式:需先购买无忧服务套餐</div>
<div class="model-item-content" v-show="activeName == 6">获取限制:每个服务套餐限领一次</div>
<div class="model-item-content" v-show="activeName == 3">有效期:{{ item.effectivedDay }}天</div> <div class="model-item-content" v-show="activeName == 3"></div>
<div class="model-item-content model-item-contents" v-show="activeName == 3">
试用天数:
<span>{{ item.freeDay }}天</span>
</div>
<div class="model-item-content" v-show="activeName == 2"> <div class="model-item-content" v-show="activeName == 2">
类型: 使用途径:
<span>{{ item.discountType == 2 ? '折扣券' : item.discountType == 3 ? '代金券' : item.discountType == 4 ? '兑换券' : '' }}</span> {{ item.useChannel == 1 ? '线上商品' : '到店核销' }}
</div> </div>
<div class="model-item-content" v-show="activeName == 1"> <div class="model-item-content model-item-weight" v-show="activeName == 6">
类型: 赠送天数:
<span>精品券</span> <span>{{ item.effectiveType == 2 ? item.effectivedDay + '天' : '永久有效' }}</span>
</div> </div>
<div class="model-item-content" v-show="activeName == 3"> <div class="model-item-content" v-show="activeName == 4 || activeName == 5"></div>
类型: <div class="model-item-content model-item-contents" v-show="activeName == 4">
<span>权益卡</span> 销售价格:
<span>{{ item.packagePrice }}元</span>
</div> </div>
<div class="model-item-content" v-show="activeName == 4"> <div class="model-item-content" v-if="activeName == 5">
类型: 开始时间:
<span>权益套餐</span> {{ item.startTime }}
</div> </div>
<div class="model-item-content" v-if="activeName == 5"> <div class="model-item-content" v-if="activeName == 5">
活动时间: 结束时间:
{{ item.startTime.split(' ')[0] }}-{{ item.endTime.split(' ')[0] }} {{ item.endTime }}
</div>
<div class="model-item-content model-item-contents" v-show="activeName == 2">
数量:
<span>{{ item.residueAmount }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -60,24 +68,30 @@ ...@@ -60,24 +68,30 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect" v-show="modelList.length">确 定</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName == 2 && memberMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName == 4 && couponMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName == 5 && activityMenu">立即添加</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import util from '@/utils/util'
export default { export default {
name: 'ActivityModel', name: 'ActivityModel',
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
couponMenu: false,
loading: false, loading: false,
activeName: '3', activeName: '3',
modelList: [], modelList: [],
pageNum: 1, pageNum: 1,
pageSize: 12, pageSize: 12,
tableTotal: 0, tableTotal: 0,
openFlag: 0,
selectItem: { selectItem: {
id: '' id: ''
} }
...@@ -86,7 +100,7 @@ export default { ...@@ -86,7 +100,7 @@ export default {
methods: { methods: {
handleSelectItem(item) { handleSelectItem(item) {
this.selectItem = item this.selectItem = item
if(item.equityClassId) { if (item.equityClassId) {
this.selectItem.id = item.equityClassId this.selectItem.id = item.equityClassId
} }
console.log(this.selectItem) console.log(this.selectItem)
...@@ -100,7 +114,7 @@ export default { ...@@ -100,7 +114,7 @@ export default {
return return
} }
this.dialogVisible = false this.dialogVisible = false
this.$emit('selectActivity', { marketingId: this.selectItem.id, marketingType: this.activeName, marketingName: this.activeName == 3 ? this.selectItem.equityName : this.activeName == 4 ? this.selectItem.packageName : this.activeName == 5 ? this.selectItem.activityName : this.selectItem.couponName }) this.$emit('selectActivity', { marketingId: this.selectItem.id ? this.selectItem.id : this.selectItem.equityClassId, marketingType: this.activeName, marketingName: this.activeName == 3 ? this.selectItem.equityName : this.activeName == 4 ? this.selectItem.packageName : this.activeName == 5 ? this.selectItem.activityName : this.activeName == 2 ? this.selectItem.couponName : this.selectItem.equityName })
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val
...@@ -110,13 +124,29 @@ export default { ...@@ -110,13 +124,29 @@ export default {
this.pageNum = val this.pageNum = val
this.getModelList() this.getModelList()
}, },
handleOpen() {
let url
switch (this.activeName) {
case '2':
url = '/marketing/couponManage/index'
break
case '4':
url = '/marketing/memberCenter/setmealAddUpdate?%24title=%25E5%2588%259B%25E5%25BB%25BA%25E5%25A5%2597%25E9%25A4%2590'
break
case '5':
url = '/marketing/seckillActivity/editActivity/1'
break
}
util.openUrl(location.origin + url)
this.dialogVisible = false
},
getModelList() { getModelList() {
this.modelList = [] this.modelList = []
this.loading = true this.loading = true
let market = '' let market = ''
switch (this.activeName) { switch (this.activeName) {
case '1': case '6':
market = 'getCoupon' market = 'merchant'
break break
case '2': case '2':
market = 'getMerchant' market = 'getMerchant'
...@@ -147,9 +177,12 @@ export default { ...@@ -147,9 +177,12 @@ export default {
params.currentPage = this.pageNum params.currentPage = this.pageNum
params.activityStatus = 2 params.activityStatus = 2
} }
if (this.activeName == 6) {
params.merchantId = this.$globalState.session.merchantId
}
this.$apis.marketing[market](params) this.$apis.marketing[market](params)
.then(res => { .then(res => {
if (this.activeName == 3) { if (this.activeName == 3 || this.activeName == 6) {
this.modelList = res this.modelList = res
} else { } else {
this.modelList = res.list ? res.list : res.data this.modelList = res.list ? res.list : res.data
...@@ -161,7 +194,36 @@ export default { ...@@ -161,7 +194,36 @@ export default {
this.loading = false this.loading = false
}) })
}, },
merchantOpen() {
this.$apis.marketing.merchantOpen({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.openFlag = res.openFlag
})
},
init() { init() {
this.merchantOpen()
this.couponMenu = false
this.activityMenu = false
this.memberMenu = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (item.name == 'marketing') {
if (!item.children) {
return
}
item.children.forEach(itm => {
console.log(itm.path)
if (itm.path == '/couponManage/index') {
this.couponMenu = true
}
if (itm.path == '/seckillActivity/index') {
this.activityMenu = true
}
if (itm.path == '^') {
this.memberMenu = true
}
})
}
})
this.dialogVisible = true this.dialogVisible = true
this.getModelList() this.getModelList()
this.selectItem = {} this.selectItem = {}
...@@ -174,6 +236,13 @@ export default { ...@@ -174,6 +236,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.square-main {
/deep/ {
.el-dialog__footer {
text-align: center;
}
}
}
.model-panel { .model-panel {
.model-panel-tab { .model-panel-tab {
display: flex; display: flex;
...@@ -229,27 +298,33 @@ export default { ...@@ -229,27 +298,33 @@ export default {
} }
} }
.model-item-panel { .model-item-panel {
display: grid; // display: grid;
grid-template-columns: repeat(4, 25%); // grid-template-columns: repeat(4, 25%);
grid-row-gap: 10px; // grid-row-gap: 10px;
height: 38vh; max-height: 38vh;
padding: 10px;
overflow: auto; overflow: auto;
text-align: center; display: flex;
flex-wrap: wrap;
align-items: stretch;
flex-direction: row;
.model-item { .model-item {
width: 240px;
margin-right: 24px;
margin-bottom: 24px;
padding: 12px 16px;
position: relative; position: relative;
height: 128px; height: 128px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
border: 2px solid #e6e6e6; border: 1px solid #e6e6e6;
padding: 14px 24px; padding: 14px 24px;
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px;
&:nth-child(4n) { &:nth-child(4n) {
margin-right: 0px; margin-right: 0px;
} }
&.checked { &.checked {
border: 2px solid #5850ff; background: rgba(88, 80, 255, 0.1);
border: 1px solid #5850ff;
} }
&-qrcode { &-qrcode {
position: absolute; position: absolute;
...@@ -273,15 +348,25 @@ export default { ...@@ -273,15 +348,25 @@ export default {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 17px; line-height: 16px;
height: 16px;
margin-top: 6px; margin-top: 6px;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
&.model-item-weight {
line-height: 20px;
height: 20px;
}
span { span {
color: #5850ff; color: #5850ff;
font-size: 20px;
} }
} }
&-contents {
line-height: 22px;
height: 22px;
}
} }
} }
} }
......
<template>
<div>
<div class="emotion-box" :style="{ height: height + 'px' }">
<div class="emotion-box-line" v-for="(line, i) in list" :key="i">
<emotion class="emotion-item" v-for="(item, i) in line" :key="i" @click.native="clickHandler(item)">{{ item }}</emotion>
</div>
</div>
</div>
</template>
<script>
import emoji from '@/utils/emo'
import Emotion from './Emotion'
export default {
props: {
height: {
type: Number,
default: 200
}
},
data() {
return {
list: emoji
}
},
methods: {
clickHandler(i) {
let emotion = `${i}`
this.$emit('emotion', emotion)
}
},
components: {
Emotion
}
}
</script>
<style scoped lang="scss">
.emotion-box {
z-index: 2004;
background-color: #fff;
border-radius: 2px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
width: 300px;
box-sizing: border-box;
padding: 5px;
overflow: hidden;
overflow-y: auto;
}
.emotion-box-line {
display: flex;
}
.emotion-item {
flex: 1;
text-align: center;
cursor: pointer;
/deep/ {
img {
width: 24px;
-webkit-user-select: none;
cursor: default;
pointer-events: none;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="w-textarea" ref="wTextarea"> <div class="w-textarea" ref="wTextarea">
<div contenteditable="true" class="w-textarea_input" ref="wTextareaContent" :id="contentId" @click="inputClick($event)" @focus="isLocked = true" @blur="isLocked = false" @keydown.delete="handleDelete($event)" @input="handleInput($event.target)"></div> <div contenteditable="true" class="w-textarea_input" ref="wTextareaContent" :id="contentId" @click="inputClick($event)" @focus="onFocus" @blur="onBlur" @keydown="textareaKeydown($event)" @input="handleInput($event.target)"></div>
<!-- <div class="w-textarea_tools" v-if="tools.length > 0 || maxlength"> <!-- <div class="w-textarea_tools" v-if="tools.length > 0 || maxlength">
<button <button
class="w-textarea_tools__item" class="w-textarea_tools__item"
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</template> </template>
<script> <script>
import emoji from '@/utils/emo'
export default { export default {
name: 'wTextarea', name: 'wTextarea',
data() { data() {
...@@ -31,6 +32,7 @@ export default { ...@@ -31,6 +32,7 @@ export default {
contentId: `content${this.getGuid()}`, contentId: `content${this.getGuid()}`,
// 输入的时候锁定,禁止更新innerHTML // 输入的时候锁定,禁止更新innerHTML
isLocked: false, isLocked: false,
isInsert: false,
// 记录当前选中tag的ID // 记录当前选中tag的ID
currentTagId: null, currentTagId: null,
// 当前光标位置 // 当前光标位置
...@@ -108,6 +110,50 @@ export default { ...@@ -108,6 +110,50 @@ export default {
// 处理后需要调用 addTag() 或者 addLink() 将内容传回来 // 处理后需要调用 addTag() 或者 addLink() 将内容传回来
this.$emit('add', type) this.$emit('add', type)
}, },
textareaKeydown(event) {
if (event.keyCode == 13) {
this.insertHtml('<br>')
let nn = document.createElement('br')
document.querySelector('.w-textarea_input').appendChild(nn)
return false
}
},
/*换行*/
insertHtml(html) {
var sel, range
if (window.getSelection) {
// IE9 或 非IE浏览器
sel = window.getSelection()
if (sel.getRangeAt && sel.rangeCount) {
range = sel.getRangeAt(0)
range.deleteContents()
// Range.createContextualFragment() would be useful here but is
// non-standard and not supported in all browsers (IE9, for one)
var el = document.createElement('div')
el.innerHTML = html
var frag = document.createDocumentFragment(),
node,
lastNode
while ((node = el.firstChild)) {
lastNode = frag.appendChild(node)
}
range.insertNode(frag)
// Preserve the selection
if (lastNode) {
range = range.cloneRange()
range.setStartAfter(lastNode)
range.collapse(true)
sel.removeAllRanges()
sel.addRange(range)
}
}
} else if (document.selection && document.selection.type != 'Control') {
// IE < 9
document.selection.createRange().pasteHTML(html)
}
this.currentText = document.querySelector('.w-textarea_input').innerHTML
this.$emit('updateText', this.currentText)
},
addTag(text) { addTag(text) {
// 创建模版标签 // 创建模版标签
let node = document.createElement(this.tag) let node = document.createElement(this.tag)
...@@ -173,12 +219,42 @@ export default { ...@@ -173,12 +219,42 @@ export default {
node.target = 'blank' node.target = 'blank'
this.insertNode(node) this.insertNode(node)
}, },
addImg(url) {
// 创建a标签
let node = document.createElement('img')
node.src = url
// node.setAttribute('ondragstart', 'return false;')
this.insertNode(node)
},
onFocus() {
this.isLocked = true
this.isInsert = true
},
onBlur() {
this.isLocked = false
},
insertNode(node) { insertNode(node) {
// 在内容中插入标签 // 在内容中插入标签
// 删掉选中的内容(如有) // 删掉选中的内容(如有)
if (this.savedRange.startContainer) {
this.insertNodeFirst(node)
} else {
document.querySelector('.w-textarea_input').focus()
setTimeout(() => {
this.insertNodeFirst(node)
document.querySelector('.w-textarea_input').blur()
}, 100)
}
},
insertNodeFirst(node) {
this.savedRange.deleteContents() this.savedRange.deleteContents()
// 插入链接 // 插入链接
if (this.isInsert) {
this.savedRange.insertNode(node) this.savedRange.insertNode(node)
} else {
document.querySelector('.w-textarea_input').appendChild(node)
}
this.isInsert = false
// 更新双向绑定数据 // 更新双向绑定数据
let target = this.$refs.wTextareaContent let target = this.$refs.wTextareaContent
if (navigator.userAgent.indexOf('Firefox') > 0 || navigator.userAgent.indexOf('QQBrowser') > 0) { if (navigator.userAgent.indexOf('Firefox') > 0 || navigator.userAgent.indexOf('QQBrowser') > 0) {
...@@ -186,7 +262,17 @@ export default { ...@@ -186,7 +262,17 @@ export default {
} else { } else {
this.updateData(target.innerHTML) this.updateData(target.innerHTML)
} }
this.currentText = target.innerText let htm = target.innerHTML
const list = emoji.flat(Infinity)
const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]`
})
let Textnode = document.createElement('div')
Textnode.innerHTML = replaceImg
this.currentText = replaceImg.substring(0, 600)
console.log(this.currentText)
this.$emit('updateText', this.currentText) this.$emit('updateText', this.currentText)
}, },
placeCaretAtEnd(el) { placeCaretAtEnd(el) {
...@@ -209,7 +295,18 @@ export default { ...@@ -209,7 +295,18 @@ export default {
handleInput(target) { handleInput(target) {
// 即时更新数据 // 即时更新数据
this.updateData(target.innerHTML) this.updateData(target.innerHTML)
this.currentText = target.innerText let htm = target.innerHTML
console.log(htm)
const list = emoji.flat(Infinity)
const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]`
})
let Textnode = document.createElement('div')
Textnode.innerHTML = replaceImg
this.currentText = replaceImg.substring(0, 600)
console.log(this.currentText)
this.$emit('updateText', this.currentText) this.$emit('updateText', this.currentText)
}, },
handleDelete(e) { handleDelete(e) {
...@@ -241,11 +338,11 @@ export default { ...@@ -241,11 +338,11 @@ export default {
} else { } else {
this.currentTagId = null this.currentTagId = null
} }
}, },
getGuid() { getGuid() {
return 1
// 生成随机ID // 生成随机ID
return `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}` // return `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}`
}, },
selectHandler() { selectHandler() {
// 监听选定文本的变动 // 监听选定文本的变动
...@@ -284,6 +381,13 @@ export default { ...@@ -284,6 +381,13 @@ export default {
cursor: default; cursor: default;
-webkit-user-modify: read-only !important; -webkit-user-modify: read-only !important;
} }
img {
width: 24px;
height: 24px;
-webkit-user-select: none;
cursor: default;
pointer-events: none;
}
.active { .active {
background: #dcdfe6; background: #dcdfe6;
} }
......
...@@ -45,17 +45,21 @@ ...@@ -45,17 +45,21 @@
<div class="btn-group"> <div class="btn-group">
<div class="add-btn" v-for="item in btnList" :key="item.id"> <div class="add-btn" v-for="item in btnList" :key="item.id">
<!-- <i class="el-icon-circle-plus-outline"></i> --> <!-- <i class="el-icon-circle-plus-outline"></i> -->
<img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" alt /> <img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" />
<span>{{ item.name }}</span> <img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" v-else alt />
<span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span>
<span v-else>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" /> <input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" /> <input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<el-link v-else style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link> <el-link v-else-if="item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
<div v-show="emotionStatus" class="emotion-panel"><emotion class="emotion-panel-box" @emotion="handleEmotion" :height="376"></emotion></div>
<div class="tips-text"> <div class="tips-text">
<img src="@/assets/img/guestCustom/tips.png" class="tips-icon" alt /> <img src="@/assets/img/guestCustom/tips.png" class="tips-icon" alt />
<span>如在企业微信管理后台已为所选员工设置了欢迎语,则此处设置的将不生效。</span> <span @click="selectEmotion">如在企业微信管理后台已为所选员工设置了欢迎语,则此处设置的将不生效。</span>
</div> </div>
</div> </div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel> <ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel>
...@@ -71,28 +75,31 @@ const ATT_TYPE = { ...@@ -71,28 +75,31 @@ const ATT_TYPE = {
FILE: 6, FILE: 6,
ACTIVITY: 7 ACTIVITY: 7
} }
// import E from 'wangeditor' import emoji from '@/utils/emo'
import ActivityModel from './activityModel' import ActivityModel from './activityModel'
import Emotion from './emotionWords'
import wTextarea from './tag-textarea' import wTextarea from './tag-textarea'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
export default { export default {
name: 'WelcomeWords', name: 'WelcomeWords',
components: { components: {
ActivityModel, ActivityModel,
Emotion,
wTextarea wTextarea
}, },
props: { eventBus: Object }, props: { eventBus: Object },
data() { data() {
return { return {
loading: false, loading: false,
emotionStatus: false,
btnList: [ btnList: [
// { {
// id: 1, id: 1,
// name: '表情', name: '表情',
// funcName: '', funcName: '',
// type: 'expression', type: 'expression',
// limitSize: 10 limitSize: 10
// }, },
{ {
id: 2, id: 2,
name: '图片', name: '图片',
...@@ -140,6 +147,20 @@ export default { ...@@ -140,6 +147,20 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
}, },
methods: { methods: {
selectEmotion() {
this.emotionStatus = !this.emotionStatus
},
handleEmotion(i) {
this.emotionStatus = false
const list = emoji.flat(Infinity)
let index = list.indexOf(i) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
this.$refs.textContent.addImg(`https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png`)
},
updateText(val) { updateText(val) {
this.textInput(val) this.textInput(val)
}, },
...@@ -303,9 +324,20 @@ export default { ...@@ -303,9 +324,20 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
const obj = val.find(item => item.attType == 1) const obj = val.find(item => item.attType == 1)
let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>') let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>')
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
})
document.querySelector('.w-textarea_input').focus() document.querySelector('.w-textarea_input').focus()
setTimeout(() => { setTimeout(() => {
document.querySelector('.w-textarea_input').innerHTML = attContent document.querySelector('.w-textarea_input').innerHTML = htm
}, 100) }, 100)
} }
} }
...@@ -315,6 +347,14 @@ export default { ...@@ -315,6 +347,14 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.welcome-box { .welcome-box {
} }
.emotion-panel {
position: relative;
height: 0px;
&-box {
position: absolute;
top: -415px;
}
}
.content-bg { .content-bg {
background-color: #f7f7f7; background-color: #f7f7f7;
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
import Vue from 'vue' import Vue from 'vue'
import apis from './api' import apis from './api'
import './public-path' import './public-path'
import './components'
// import 'glsx-components/dist/glsx-components.css' // import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup' import { start } from '@/setup'
Vue.config.productionTip = false Vue.config.productionTip = false
...@@ -19,3 +20,4 @@ export { bootstrap, mount, unmount } ...@@ -19,3 +20,4 @@ export { bootstrap, mount, unmount }
from '@/setup' from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
export const http_tag = params => Vue.prototype.$http_tag(params)
\ No newline at end of file \ No newline at end of file
...@@ -29,6 +29,11 @@ const staticRoutes = Object.freeze([{ ...@@ -29,6 +29,11 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/square/import.vue`], resolve), component: resolve => require([`@/views/square/import.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'customDetail',
path: '/square/customDetail',
component: resolve => require([`@/views/square/customDetail.vue`], resolve),
meta: {}
}, {
name: 'importResult', name: 'importResult',
path: '/square/importResult/:id', path: '/square/importResult/:id',
component: resolve => require([`@/views/square/importResult.vue`], resolve), component: resolve => require([`@/views/square/importResult.vue`], resolve),
...@@ -45,10 +50,20 @@ const staticRoutes = Object.freeze([{ ...@@ -45,10 +50,20 @@ const staticRoutes = Object.freeze([{
meta: {} meta: {}
}, { }, {
name: 'config', name: 'config',
path: '/market/config/:id?', path: '/market/config',
component: resolve => require([`@/views/market/config.vue`], resolve), component: resolve => require([`@/views/market/config.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'configDetail',
path: '/market/configDetail/:id?',
component: resolve => require([`@/views/market/configDetail.vue`], resolve),
meta: {}
}, {
name: 'effect',
path: '/market/effect/:id?',
component: resolve => require([`@/views/market/effect.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),
......
...@@ -2,32 +2,33 @@ import Vue from 'vue' ...@@ -2,32 +2,33 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLTable} from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLTable, GLButton, GLFooter } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLButton from 'glsx-components/src/packages/Button'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) // Vue.component('GLTable', GLTable)
import 'glsx-components/src/theme/theme.scss' // import 'glsx-components/src/theme/theme.scss'
import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/common.scss' import '@/assets/css/common.scss'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, sign_common } = await fetchConfig() const { response, request, sign, secret, request_common, sign_common, request_tag } = 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.$http_tag = new common.Http({ response, request: request_tag, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
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.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 } })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
console.log(routes,routesData) Vue.use(GLButton, { routes, routerBase })
Vue.use(GLButton, { routes, routerBase})
} }
export async function mount(props) { export async function mount(props) {
console.log('11111', props) console.log('11111', props)
......
...@@ -17,6 +17,7 @@ const modules = modulesFiles.keys().reduce( ...@@ -17,6 +17,7 @@ const modules = modulesFiles.keys().reduce(
const value = modulesFiles(modulePath) const value = modulesFiles(modulePath)
result.getters[moduleName] = state => state[moduleName] result.getters[moduleName] = state => state[moduleName]
result.modules[moduleName] = value.default result.modules[moduleName] = value.default
console.log(result)
return result return result
}, },
{ modules: {}, getters: {} } { modules: {}, getters: {} }
......
const emoji = [
['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴'],
['睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过'],
['酷', '囧', '抓狂', '吐', '微笑', '愉快', '白眼', '傲慢'],
['饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂'],
['疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见'],
['擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠'],
['鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀'],
['西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰'],
['凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀'],
['足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强'],
['弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你'],
['NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈'],
['磕头', '回头', '跳绳', '投降', '挥手', '激动', '街舞', '左太极'],
['右太极', '嘿哈', '捂脸', '奸笑', '机智', '皱眉', '耶', '社会社会'],
['让我看看', '666', '红包', '蜡烛', '烟花', '福', '庆祝', '爆竹'],
]
export default emoji
\ No newline at end of file \ No newline at end of file
...@@ -72,6 +72,13 @@ util.getDay = function (num, str = '-') { ...@@ -72,6 +72,13 @@ util.getDay = function (num, str = '-') {
if (oDay.length <= 1) oDay = '0' + oDay; if (oDay.length <= 1) oDay = '0' + oDay;
return oYear + str + oMoth + str + oDay; return oYear + str + oMoth + str + oDay;
} }
util.openUrl = function (url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
util.downloadIamge = function (imgsrc, name = new Date().getTime()) { util.downloadIamge = function (imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名 //下载图片地址和图片名
var image = new Image(); var image = new Image();
......
...@@ -32,10 +32,11 @@ ...@@ -32,10 +32,11 @@
<span>{{ taggingLength }}</span> <span>{{ taggingLength }}</span>
个标签 个标签
</span> </span>
<div class="form-tips">自动为通过该活码添加的客户打上所选标签</div>
<div class="el-input-tag input-tag-wrapper" v-show="taggingLength"> <div class="el-input-tag input-tag-wrapper" v-show="taggingLength">
<template v-if="tagging && tagging.length > 0"> <template v-if="tagging && tagging.length > 0">
<template v-for="(item,index) in tagging"> <template v-for="(item, index) in tagging">
<el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx,index)"> <el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx, index)">
{{ tag ? tag.name : '' }} {{ tag ? tag.name : '' }}
</el-tag> </el-tag>
</template> </template>
...@@ -56,6 +57,7 @@ ...@@ -56,6 +57,7 @@
<span>{{ staffInfo.length }}</span> <span>{{ staffInfo.length }}</span>
人 人
</span> </span>
<div class="form-tips">客户扫码后将添加所选专员为好友,选择多名专员则按ABAB的顺序添加客户</div>
<div class="el-input-tag input-tag-wrapper" v-show="staffInfo.length"> <div class="el-input-tag input-tag-wrapper" v-show="staffInfo.length">
<el-tag effect="plain" type="info" v-for="(tag, idx) in staffInfo" :key="idx" closable :disable-transitions="false" @close="removeStaff(idx)"> <el-tag effect="plain" type="info" v-for="(tag, idx) in staffInfo" :key="idx" closable :disable-transitions="false" @close="removeStaff(idx)">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
...@@ -81,16 +83,11 @@ ...@@ -81,16 +83,11 @@
</div> </div>
</div> </div>
</div> </div>
<div <GLFooter
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
> >
<el-button type="primary" @click="handleSave">提交</el-button> <el-button type="primary" @click="handleSave">提交</el-button>
<el-button @click="goback">取消</el-button> <el-button @click="goback">取消</el-button>
</div> </GLFooter>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp> <select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
<select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag> <select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag>
</div> </div>
...@@ -121,6 +118,8 @@ export default { ...@@ -121,6 +118,8 @@ export default {
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
autoWelcome: true, autoWelcome: true,
editStatus: false,
previewListStart: [],
codeRules: { codeRules: {
codeName: [{ required: true, message: '请输入渠道名称', trigger: 'blur' }] codeName: [{ required: true, message: '请输入渠道名称', trigger: 'blur' }]
} }
...@@ -133,18 +132,53 @@ export default { ...@@ -133,18 +132,53 @@ export default {
this.tagging.forEach(item => { this.tagging.forEach(item => {
this.taggingLength += item.labelList.length this.taggingLength += item.labelList.length
}) })
this.editStatus = true
},
deep: true
},
addCodeForm: {
handler() {
this.editStatus = true
},
deep: true
},
staffInfo: {
handler() {
this.editStatus = true
}, },
deep: true deep: true
} }
}, },
methods: { methods: {
goback() { goback() {
this.previewListStart.forEach(item => {
this.$refs.welcome.previewList.forEach(itm => {
if (item.attType == itm.attType) {
if (typeof item.attContent != 'object' && item.attContent != itm.attContent) {
this.editStatus = true
}
if (typeof item.attContent == 'object' && item.attContent.marketingName != itm.attContent.marketingName) {
this.editStatus = true
}
}
})
})
if (this.editStatus || (this.$refs.welcome.previewList.length > 0 && !this.codeId)) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$router.push('/channel/index')
})
} else {
this.$router.push('/channel/index') this.$router.push('/channel/index')
}
}, },
removeTag(item, idx,index) { removeTag(item, idx, index) {
item.labelList.splice(idx, 1) item.labelList.splice(idx, 1)
if(item.labelList.length == 0) { if (item.labelList.length == 0) {
this.tagging.splice(index,1) this.tagging.splice(index, 1)
} }
}, },
removeStaff(index) { removeStaff(index) {
...@@ -250,22 +284,33 @@ export default { ...@@ -250,22 +284,33 @@ export default {
}) })
this.tagging = taggingList this.tagging = taggingList
this.autoWelcome = res.autoWelcome ? true : false this.autoWelcome = res.autoWelcome ? true : false
if (res.welcomeInfo.length != 0) {
const previewList = res.welcomeInfo.map(item => { const previewList = res.welcomeInfo.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item return item
}) })
this.$refs.welcome.updateList(previewList) this.$refs.welcome.updateList(previewList)
})
} }
this.$nextTick(() => {
this.editStatus = false
this.previewListStart = this.$common.utils.deepClone(this.$refs.welcome.previewList)
})
})
},
// resize() {
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// }
}, },
// destroyed() {
// window.removeEventListener('resize', this.resize)
// },
mounted() { mounted() {
const { id, codeUuid } = this.$route.params const { id, codeUuid } = this.$route.params
if (id != -1) { if (id) {
this.codeId = id this.codeId = id
this.detailChannelCode(id, codeUuid) this.detailChannelCode(id, codeUuid)
} }
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
} }
} }
</script> </script>
......
<template> <template>
<div> <div>
<div class="form-header"> <div class="form-header">
<el-button type="primary" size="small" icon="el-icon-add" @click="handleAddCode">新建渠道活码</el-button> <GLButton type="primary" size="small" icon="el-icon-add" @click="handleAddCode" fn="新增活码">新建渠道活码</GLButton>
</div> </div>
<div class="form-panel scrm-box-f"> <div class="form-panel scrm-box-f">
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item"> <el-form :inline="true" :model="tableSearchForm" class="follow-form-item">
...@@ -9,64 +9,80 @@ ...@@ -9,64 +9,80 @@
<el-form-item size="small" label="渠道名称或备注"> <el-form-item size="small" label="渠道名称或备注">
<el-input size="small" v-model="tableSearchForm.codeNameAndRemark" placeholder="请输入渠道名称或备注"></el-input> <el-input size="small" v-model="tableSearchForm.codeNameAndRemark" placeholder="请输入渠道名称或备注"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="关联专员" style="margin-left: 20px">
<el-input size="small" v-model="tableSearchForm.staffName" placeholder="请输入关联专员"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right"> <el-form-item size="small" style="float: right">
<el-button @click="handleReset">重置</el-button> <el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<GLTable ref="table" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams"> <GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<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> <GLButton type="text" @click="handleDetail(scope.scope)" fn="到店咨询客户数据">数据</GLButton>
<el-button type="text" @click="handleEdit(scope.scope)">修改</el-button> <GLButton type="text" @click="handleEdit(scope.scope)" fn="活码编辑">修改</GLButton>
<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> <GLButton type="text" @click="handleAddPoster(scope.scope)" fn="活码海报">活码海报</GLButton>
</div>
<div slot="yesterdayNum" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day')" v-if="scope.scope.yesterdayNum">{{ scope.scope.yesterdayNum }}</div>
<div v-else>0</div>
</div>
<div slot="totalNum" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope)" v-if="scope.scope.totalNum">{{ scope.scope.totalNum }}</div>
<div v-else>0</div>
</div> </div>
<div slot="staffInfo" slot-scope="scope"> <div slot="staffInfo" slot-scope="scope">
<el-popover trigger="hover" placement="top" v-if="scope.scope.staffInfo.length > 3"> <el-popover trigger="hover" placement="top" v-if="scope.scope.staffName.split(',').length > 3">
<div class="accountType-row" v-for="(item, index) in scope.scope.staffInfo" :key="index"> <div class="accountType-row" v-for="(item, index) in scope.scope.staffName.split(',')" :key="index">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ item.staffName }} <GLTitle :content="item" textLength="4"></GLTitle>
</div> </div>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-show="index < 4"> <div v-for="(item, index) in scope.scope.staffName.split(',')" :key="index" v-show="index < 4">
<div class="accountType-row" > <div class="accountType-row">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ index == 3 && scope.scope.staffInfo.length > 3 ? '...(' + scope.scope.staffInfo.length + ')' : item.staffName }} <span v-if="index == 3 && scope.scope.staffName.split(',').length > 3">{{ '...(' + scope.scope.staffName.split(',').length + ')' }}</span>
<GLTitle :content="item" textLength="4" v-else></GLTitle>
</div> </div>
</div> </div>
</div> </div>
</el-popover> </el-popover>
<div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-else> <div v-for="(item, index) in scope.scope.staffName.split(',')" :key="index" v-else>
<div class="accountType-row"> <div class="accountType-row">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ item.staffName }} <GLTitle :content="item" textLength="4"></GLTitle>
</div> </div>
</div> </div>
</div> </div>
<div slot="qrCode" slot-scope="scope"> <div slot="qrCode" slot-scope="scope">
<img :src="scope.scope.qrCode" style="width: 80px; height: 80px" /> <el-popover placement="bottom" width="400" trigger="click">
<img :src="scope.scope.qrCode" style="width: 360px; height: 360px" />
<img :src="scope.scope.qrCode" style="width: 80px; height: 80px" slot="reference" />
</el-popover>
<div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div> <div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div>
</div> </div>
<div slot="tagging" slot-scope="scope" class="tag-panel"> <div slot="tagging" slot-scope="scope" class="tag-panel">
<el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3"> <el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3">
<div :title="item.name" class="accountType-row accountType-row-tag" v-for="(item, index) in scope.scope.taggingList" :key="index"> <!-- <div :title="item.name" class="accountType-row accountType-row-tag" v-for="(item, index) in scope.scope.taggingList" :key="index">
{{ item ? item.name : '' }} {{ item.name.length > 8 ? item.name.substring(0, 8) + '...' : item.name }}
</div> </div> -->
<GLTitle :content="item.name" class="accountType-row accountType-row-tag" v-for="(item, index) in scope.scope.taggingList" :key="index"></GLTitle>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<div v-for="(item, index) in scope.scope.taggingList" :key="index" v-show="index < 4"> <div v-for="(item, index) in scope.scope.taggingList" :key="index" v-show="index < 4">
<div :title="item.name" class="accountType-row accountType-row-tag"> {{ index == 3 && scope.scope.taggingList.length > 3 ? '...('+scope.scope.taggingList.length+')' : item ? item.name : '' }}</div> <div :title="item.name" class="accountType-row accountType-row-tag" v-if="index == 3 && scope.scope.taggingList.length > 3">{{ '...(' + scope.scope.taggingList.length + ')' }}</div>
<GLTitle :content="item.name" class="accountType-row accountType-row-tag" v-else></GLTitle>
</div> </div>
</div> </div>
</el-popover> </el-popover>
<template v-if="scope.scope.taggingList && scope.scope.taggingList.length <= 3 && scope.scope.taggingList.length > 0"> <template v-if="scope.scope.taggingList && scope.scope.taggingList.length <= 3 && scope.scope.taggingList.length > 0">
<div v-for="(item, index) in scope.scope.taggingList" :key="index"> <div v-for="(item, index) in scope.scope.taggingList" :key="index">
<div :title="item.name" class="accountType-row accountType-row-tag">{{ item ? item.name : '' }}</div> <GLTitle :content="item.name" class="accountType-row accountType-row-tag"></GLTitle>
<!-- <div :title="item.name" class="accountType-row accountType-row-tag">{{ item.name.length > 8 ? item.name.substring(0, 8) + '...' : item.name }}</div> -->
</div> </div>
</template> </template>
<div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)"> <div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">--</div>
--
</div>
</div> </div>
<div slot="codeRemark" slot-scope="scope"> <div slot="codeRemark" slot-scope="scope">
<div class="codeName">{{ scope.scope.codeName }}</div> <div class="codeName">{{ scope.scope.codeName }}</div>
...@@ -74,15 +90,19 @@ ...@@ -74,15 +90,19 @@
</div> </div>
</GLTable> </GLTable>
</div> </div>
<emp-detail ref="empDetailForm"></emp-detail>
</div> </div>
</template> </template>
<script> <script>
import util from '@/utils/util' import util from '@/utils/util'
import empDetail from './empDetail.vue'
export default { export default {
components: { empDetail },
name: 'channelList', name: 'channelList',
data() { data() {
return { return {
loading: false,
tableSearchForm: {}, tableSearchForm: {},
tableData: [], tableData: [],
tableParams: { tableParams: {
...@@ -97,12 +117,14 @@ export default { ...@@ -97,12 +117,14 @@ export default {
{ {
label: '今日新增客户数', label: '今日新增客户数',
prop: 'yesterdayNum', prop: 'yesterdayNum',
width: '120px' width: '120px',
addHtml: 'yesterdayNum'
}, },
{ {
label: '总新增客户数', label: '总新增客户数',
prop: 'totalNum', prop: 'totalNum',
width: '150px' width: '150px',
addHtml: 'totalNum'
}, },
{ {
label: '使用专员', label: '使用专员',
...@@ -156,11 +178,14 @@ export default { ...@@ -156,11 +178,14 @@ export default {
this.listChannelCodeByPage() this.listChannelCodeByPage()
}, },
handleAddCode() { handleAddCode() {
this.$router.push('/channel/addCode/-1/-1') this.$router.push('/channel/addCode')
}, },
handleAddPoster(scope) { handleAddPoster(scope) {
this.$router.push('/channel/poster/' + scope.id) this.$router.push('/channel/poster/' + scope.id)
}, },
handleEmpDetail(scope, status) {
this.$refs.empDetailForm.init(scope, status)
},
downloadIamge(imgsrc) { downloadIamge(imgsrc) {
util.downloadIamge(imgsrc) util.downloadIamge(imgsrc)
}, },
...@@ -214,18 +239,22 @@ export default { ...@@ -214,18 +239,22 @@ export default {
pageSize: this.$refs.table.page.pageSize, pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum pageNum: this.$refs.table.page.pageNum
} }
this.loading = true
this.$apis.channel.listChannelCodeByPage(params).then(res => { this.$apis.channel.listChannelCodeByPage(params).then(res => {
this.loading = false
if (res) { if (res) {
this.tableData = res.data this.tableData = res.data
this.tableData.forEach(item => { this.tableData.forEach(item => {
this.$set(item, 'taggingList', []) this.$set(item, 'taggingList', [])
const tagging = eval(item.tagging) const tagging = eval(item.tagging)
if (tagging && tagging.length > 0) {
tagging.forEach(itm => { tagging.forEach(itm => {
let name = itm.name.split(',') let name = itm.name.split(',')
name.forEach((tag, index) => { name.forEach((tag, index) => {
item.taggingList.push({ name: tag }) item.taggingList.push({ name: tag })
}) })
}) })
}
}) })
this.tableTotal = res.count this.tableTotal = res.count
} }
...@@ -237,7 +266,11 @@ export default { ...@@ -237,7 +266,11 @@ export default {
} }
} }
</script> </script>
<style>
.el-popover {
max-width: 800px;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.popover-panel { .popover-panel {
width: 1000px; width: 1000px;
...@@ -247,7 +280,7 @@ export default { ...@@ -247,7 +280,7 @@ export default {
} }
.form-panel { .form-panel {
padding: 20px; padding: 20px;
/deep/ .el-popover{ /deep/ .el-popover {
max-width: 1000px; max-width: 1000px;
} }
} }
...@@ -338,6 +371,10 @@ export default { ...@@ -338,6 +371,10 @@ export default {
} }
} }
} }
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.accountType-row { .accountType-row {
text-align: left; text-align: left;
position: relative; position: relative;
...@@ -365,6 +402,7 @@ export default { ...@@ -365,6 +402,7 @@ export default {
} }
i { i {
color: #75acff; color: #75acff;
margin-right: 3px;
} }
// &::before { // &::before {
// content: ''; // content: '';
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
</el-radio-group> </el-radio-group>
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="80px"> <el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="80px">
<el-form-item size="small" label="添加时间"> <el-form-item size="small" label="添加时间">
<el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <el-date-picker :picker-options="pickerOptions" @change="handleTime" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" label="渠道名称"> <el-form-item size="small" label="渠道名称">
<el-input size="small" v-model="tableSearchForm.keyWord" placeholder="请输入渠道名称"></el-input> <el-input size="small" v-model="tableSearchForm.keyWord" placeholder="请输入渠道名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float: right;margin-left: 40px"> <el-form-item size="small" style="float: right; margin-left: 40px">
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -33,11 +33,12 @@ ...@@ -33,11 +33,12 @@
<div class="chart-title-num">各渠道新增客户数</div> <div class="chart-title-num">各渠道新增客户数</div>
</div> </div>
<div class="chart-desc-item" v-for="(item, index) in codeIds" :key="index"> <div class="chart-desc-item" v-for="(item, index) in codeIds" :key="index">
<div class="chart-item-title"> <div class="chart-item-title" :title="item.codeName">
<span :style="{ background: colorList[index], }"></span> <span :style="{ background: colorList[index] }"></span>
{{ item.codeName }} {{ item.codeName }}
</div> </div>
<div class="chart-item-num">{{ item.totalNum }}</div> <div class="chart-item-num link-dialog" @click="handleEmpDetail(item)" v-if="item.totalNum">{{ item.totalNum }}</div>
<div class="chart-item-num" v-else>0</div>
</div> </div>
</div> </div>
<div> <div>
...@@ -46,8 +47,18 @@ ...@@ -46,8 +47,18 @@
</div> </div>
</div> </div>
</div> </div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch"></GLTable> <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day', scope.scope.timeFrame)" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'status', scope.scope.timeFrame)" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div>
</div>
</GLTable>
<select-channel :colorList="colorList" ref="channelForm" @selectTable="selectTable"></select-channel> <select-channel :colorList="colorList" ref="channelForm" @selectTable="selectTable"></select-channel>
<emp-detail ref="empDetailForm"></emp-detail>
</div> </div>
</template> </template>
...@@ -55,11 +66,13 @@ ...@@ -55,11 +66,13 @@
import utils from '@/utils/util' import utils from '@/utils/util'
import linechart from './linechart' import linechart from './linechart'
import selectChannel from './selectChannel' import selectChannel from './selectChannel'
import empDetail from './empDetail.vue'
export default { export default {
name: 'channelStatistics', name: 'channelStatistics',
components: { components: {
linechart, linechart,
selectChannel selectChannel,
empDetail
}, },
data() { data() {
return { return {
...@@ -83,11 +96,13 @@ export default { ...@@ -83,11 +96,13 @@ export default {
}, },
{ {
label: '新增客户数', label: '新增客户数',
prop: 'newlyCount' prop: 'newlyCount',
addHtml: 'newlyCount'
}, },
{ {
label: '留存客户数', label: '留存客户数',
prop: 'newlyKeepCount' prop: 'newlyKeepCount',
addHtml: 'newlyKeepCount'
}, },
{ {
label: '日期', label: '日期',
...@@ -106,9 +121,27 @@ export default { ...@@ -106,9 +121,27 @@ export default {
colorList: ['#5850FF', '#2CCA74', '#EB4E4E', '#FF6D00', '#F8C900', '#2CCAC4', '#E74EEB', '#6F2828'] colorList: ['#5850FF', '#2CCA74', '#EB4E4E', '#FF6D00', '#F8C900', '#2CCAC4', '#E74EEB', '#6F2828']
} }
}, },
watch: { // watch: {
createTime(value) { // createTime(value) {
if (value) { // if (value) {
// this.startTime = value[0]
// this.endTime = value[1]
// this.timeRadio = null
// this.trendType = null
// } else {
// this.startTime = ''
// this.endTime = ''
// this.timeRadio = 1
// this.trendType = 1
// }
// this.getFollower()
// this.codeSearch()
// }
// },
methods: {
handleTime() {
const value = this.createTime
if (value && value.length > 0) {
this.startTime = value[0] this.startTime = value[0]
this.endTime = value[1] this.endTime = value[1]
this.timeRadio = null this.timeRadio = null
...@@ -121,12 +154,11 @@ export default { ...@@ -121,12 +154,11 @@ export default {
} }
this.getFollower() this.getFollower()
this.codeSearch() this.codeSearch()
}
}, },
methods: {
handleTab() { handleTab() {
this.createTime = [];
this.trendType = this.timeRadio this.trendType = this.timeRadio
this.startTime = '' this.createTime = ''
this.endTime = '' this.endTime = ''
this.codeSearch() this.codeSearch()
this.getFollower() this.getFollower()
...@@ -134,6 +166,9 @@ export default { ...@@ -134,6 +166,9 @@ export default {
handleSearch() { handleSearch() {
this.codeSearch() this.codeSearch()
}, },
handleEmpDetail(scope, value, day) {
this.$refs.empDetailForm.init(scope, value, day)
},
codeSearch() { codeSearch() {
var params = { var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)), ...JSON.parse(JSON.stringify(this.tableSearchForm)),
...@@ -179,6 +214,24 @@ export default { ...@@ -179,6 +214,24 @@ export default {
handleChannel() { handleChannel() {
this.$refs.channelForm.init(this.codeIds) this.$refs.channelForm.init(this.codeIds)
}, },
getFollowerTotal() {
var params = {
pageSize: 1000,
pageNum: 1
}
this.$apis.channel.listChannelCodeByPage(params).then(res => {
console.log(res)
this.tableData = res.data
this.tableTotal = res.count
this.tableData.forEach(item => {
this.selectCode.forEach((itm, index) => {
if (itm.codeState == item.codeState) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
}
})
})
})
},
getFollower() { getFollower() {
let codeState = this.codeIds.map(item => item.codeState) let codeState = this.codeIds.map(item => item.codeState)
var params = { var params = {
...@@ -218,6 +271,10 @@ export default { ...@@ -218,6 +271,10 @@ export default {
} }
} }
} }
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.channel-chart { .channel-chart {
display: flex; display: flex;
.channel-chart-desc { .channel-chart-desc {
...@@ -248,6 +305,9 @@ export default { ...@@ -248,6 +305,9 @@ export default {
line-height: 17px; line-height: 17px;
margin-top: 10px; margin-top: 10px;
.chart-item-title { .chart-item-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
span { span {
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
......
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="客户列表" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm" class="emp-form">
<el-form-item size="small" label="客户名称">
<el-input v-model="tableSearchForm.customerName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" label="状态" v-if="!pStatus">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="跟进员工" v-if="!staffIds">
<el-select v-model="staffId" placeholder="请选择">
<el-option v-for="item in staffName" :key="item.staffId" :label="item.staffName" :value="item.staffId"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="添加时间" v-if="timeStatus">
<el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable v-loading="loading" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</div>
<template slot="status" slot-scope="scope">
<div class="status-form" v-if="scope.scope.status" style="color: #eb4e4e">删除好友</div>
<div class="status-form" v-else style="color: #00a854">正常</div>
</template>
<template slot="customerName" slot-scope="scope">
<div class="form-row">
<img :src="scope.scope.avatar" v-if="scope.scope.avatar">
{{ scope.scope.customerName }}
<span style="color: #5850ff">{{ scope.scope.type == 1 ? '@微信' : '@企微' }}</span>
</div>
</template>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel" type="primary">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
loading: false,
dialogVisible: false,
status: '',
createTime: [],
optionstatus: [
{
value: '',
label: '全部'
},
{
value: '0',
label: '正常'
},
{
value: '-1',
label: '删除好友'
}
],
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
align: 'left'
},
{
label: '客户性别',
prop: 'customerSex',
formatter: cellValue => {
console.log(cellValue)
return cellValue.customerSex == 1 ? '男' : '女'
},
width: '80px',
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
width: '80px',
},
{
label: '跟进员工',
prop: 'followStaff',
width: '80px',
},
{
label: '添加时间',
prop: 'addTime',
},
{
label: '操作',
prop: 'optionBtns',
width: '80px',
addHtml: 'optionBtns'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
staffName: [],
tableTotal: 0,
selectItem: [],
selectEmp: [],
pStatus: null,
staffIds: null,
staffId: null
}
},
methods: {
jumpUrl() {
this.$history.push('/home/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
custState: this.selectRow.codeState,
staffIds: this.staffId ? [this.staffId] : null
}
if (this.createTime && this.createTime.length > 0) {
params.beginTime = this.createTime[0]
params.endTime = this.createTime[1]
}
if (this.pStatus) {
params.status = 0
}
if (this.staffIds) {
params.staffIds = this.staffIds
}
this.loading = true
this.$apis.channel.getCustomer(params).then(res => {
this.loading = false
this.tableData = res.data
this.tableTotal = res.count
})
},
getChannelCodeStaffList() {
var params = {
pageSize: 1000,
pageNum: 1,
codeState: this.selectRow.codeState
}
this.$apis.channel.getChannelCodeStaffList(params).then(res => {
this.staffName = [{ staffName: '全部', staffId: null }].concat(res.data)
})
},
init(item, value, day) {
this.createTime = []
this.pStatus = null
this.staffIds = null
this.timeStatus = true;
if (value == 'day' && !day) {
this.createTime = [util.getDay(0), util.getDay(0)]
this.timeStatus = false
}
if (value == 'day' && day) {
if (day.indexOf('~') == -1) {
this.createTime = [day, day]
} else {
this.createTime = [day.split('~')[0], day.split('~')[1]]
}
this.timeStatus = false
}
if (value == 'status' && !day) {
this.pStatus = 'status'
}
if (value == 'status' && day) {
this.pStatus = 'status'
if (day.indexOf('~') == -1) {
this.createTime = [day, day]
} else {
this.createTime = [day.split('~')[0], day.split('~')[1]]
}
this.timeStatus = false
}
if (value == 'staffIds') {
this.staffIds = item.staffId
}
if (value == 'statusAndStaffIds') {
this.pStatus = 'status'
this.staffIds = item.staffId
}
this.selectRow = item
this.tableSearchForm = {}
this.dialogVisible = true
this.getChannelCodeStaffList()
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
handleDetail(scope) {
this.$history.push('/custom/clientManage/clientDetail?id=' + scope.oneId)
},
handleCancel: utils.debounce(function () {
this.dialogVisible = false
}, 300)
}
}
</script>
<style lang="scss" scoped>
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.emp-form {
/deep/ {
.el-date-editor,.el-input {
width: 215px;
}
}
}
.square-main {
/deep/ {
.el-table {
height: 35vh;
overflow-y: auto;
}
.el-form-item {
margin-right: 20px;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
.form-row {
img {
width: 50px;
height: 50px;
vertical-align: middle;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="selected-title">已选渠道</div> <div class="selected-title">已选渠道</div>
<div class="selected-panel"> <div class="selected-panel">
<div class="selected-item" v-for="(item, index) in selectedList" :key="index"> <div class="selected-item" v-for="(item, index) in selectedList" :key="index">
<div> <div :title="item.codeName">
<span :style="{ background: colorList[index]}"></span> <span :style="{ background: colorList[index]}"></span>
{{ item.codeName }} {{ item.codeName }}
</div> </div>
...@@ -148,6 +148,11 @@ export default { ...@@ -148,6 +148,11 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
div {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
span { span {
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
......
<template> <template>
<div class="channel-main"> <div class="channel-main">
{{aaa}}
<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>
...@@ -10,23 +11,54 @@ ...@@ -10,23 +11,54 @@
</template> </template>
<script> <script>
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() {}, jumpWx() {
this.$history.push('/settings/enterpriseWechat/index')
},
wxTips() {
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (!item.children) {
return
}
item.children.forEach(itm => {
if (itm.path == '/enterpriseWechat/index') {
this.$apis.channel.getStatus({}).then(res => {
if (res.status != 'SUCCESS') {
const h = this.$createElement
this.$message({
showClose: true,
duration: 0,
message: h('p', null, [h('span', null, '此功能需完成【企业微信授权】后方可使用! '), h('span', { on: { click: this.jumpWx }, style: { marginRight: '150px', cursor: 'pointer', color: '#5850ff' } }, ['企业微信授权 ', h('i', { class: 'el-icon-d-arrow-right' }, '')])])
})
}
})
}
})
})
}, },
}; handleClick() {}
},
beforeDestroy() {
this.$message.closeAll()
},
mounted() {
this.wxTips()
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
<el-button type="primary" size="small" @click="goBack">返回</el-button> <el-button type="primary" size="small" @click="goBack">返回</el-button>
</div> </div>
<div class="poster-body"> <div class="poster-body">
<div class="poster-item" @dblclick="setPoster(item)" @mouseenter="item.show = true" @mouseleave="item.show = false" v-for="(item, index) in posterList" :key="index"> <div class="poster-item" @click="setPoster(item)" @mouseenter="item.show = true" @mouseleave="item.show = false" v-for="(item, index) in posterList" :key="index">
<div class="poster-del" v-show="item.show" @click="handleDelete(item.id)"> <div class="poster-del" v-show="item.show" @click.stop="handleDelete(item.id)">
<img src="@/assets/img/del.png" /> <img src="@/assets/img/del.png" />
</div> </div>
<div class="poster-item-box" v-loading="item.loadingImg"> <div class="poster-item-box" v-loading="item.loadingImg">
<img <img
:src="item.autoUrl" :src="item.thumbnailUrl?item.thumbnailUrl:item.autoUrl"
class="poster-image" class="poster-image"
v-if="item.imgWidth" v-if="item.imgWidth"
:style="{ :style="{
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
}" }"
/> />
</div> </div>
<div class="poster-item-link" @click="downloadIamge(item.autoUrl)">下载海报</div> <div class="poster-item-link" @click.stop="downloadIamge(item.autoUrl)">下载海报</div>
</div> </div>
<div class="poster-item"> <div class="poster-item">
<div class="poster-item-box"> <div class="poster-item-box">
...@@ -28,9 +28,10 @@ ...@@ -28,9 +28,10 @@
<img src="@/assets/img/channel/upload.png" /> <img src="@/assets/img/channel/upload.png" />
<div class="poster-tips">上传海报图片,将自动配上渠道活码</div> <div class="poster-tips">上传海报图片,将自动配上渠道活码</div>
</div> </div>
<el-upload action="#" class="image-uploader" :before-upload="upLoadImg"> <div class="image-uploader">
<div class="poster-item-link">上传海报</div> <div class="poster-item-link">上传海报</div>
</el-upload> <input type="file" class="image-uploader" style="opacity: 0" ref="file" accept="*" @change="upLoadImg" />
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -75,8 +76,8 @@ ...@@ -75,8 +76,8 @@
<script> <script>
import util from '@/utils/util' import util from '@/utils/util'
import VueDraggableResizable from '@/components/vue-draggable-resizable' import VueDraggableResizable from '@/components/draggable/vue-draggable-resizable'
import '@/components/vue-draggable-resizable.css' import '@/components/draggable/vue-draggable-resizable.css'
export default { export default {
name: 'poster', name: 'poster',
components: { components: {
...@@ -134,8 +135,8 @@ export default { ...@@ -134,8 +135,8 @@ export default {
}, },
enterPoster() {}, enterPoster() {},
leavePoster() {}, leavePoster() {},
upLoadImg(file) { upLoadImg(e) {
console.log(file.size / 1024 / 1000 > 5) const file = e.srcElement.files[0]
let fileName = file.name let fileName = file.name
if (file.name.lastIndexOf('.') === -1) { if (file.name.lastIndexOf('.') === -1) {
this.$message.info('路径不正确') this.$message.info('路径不正确')
...@@ -178,6 +179,7 @@ export default { ...@@ -178,6 +179,7 @@ export default {
} else { } else {
self.loading = false self.loading = false
} }
self.$refs.file.value = '';
}) })
} }
} }
...@@ -230,7 +232,7 @@ export default { ...@@ -230,7 +232,7 @@ export default {
listChannelCodeBill.forEach(item => { listChannelCodeBill.forEach(item => {
item.show = false item.show = false
item.loadingImg = true item.loadingImg = true
let backUrl = item.autoUrl let backUrl = item.thumbnailUrl?item.thumbnailUrl: item.autoUrl
this.backUrl = backUrl this.backUrl = backUrl
let img = new Image() let img = new Image()
img.src = backUrl img.src = backUrl
...@@ -274,8 +276,16 @@ export default { ...@@ -274,8 +276,16 @@ export default {
min-height: calc(100% - 30px); min-height: calc(100% - 30px);
} }
.image-uploader { .image-uploader {
display: inline-block; position: relative;
height: 20px; cursor: pointer;
.poster-item-link {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
margin: 0 auto !important;
text-align: center;
}
/deep/ { /deep/ {
.el-upload-list { .el-upload-list {
display: none; display: none;
...@@ -344,6 +354,7 @@ export default { ...@@ -344,6 +354,7 @@ export default {
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 20px; line-height: 20px;
margin-bottom: 20px;
img { img {
width: 90px; width: 90px;
height: auto; height: auto;
......
...@@ -34,12 +34,14 @@ ...@@ -34,12 +34,14 @@
<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">{{ detailCodeForm.yesTodayAddCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'day')" v-if="detailCodeForm.yesTodayAddCount">{{ detailCodeForm.yesTodayAddCount }}人</div>
<div class="count-item-num2" v-else>0人</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 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">{{ detailCodeForm.newlyCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm)" v-if="detailCodeForm.newlyCount">{{ detailCodeForm.newlyCount }}人</div>
<div class="count-item-num2" v-else>0人</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,7 +51,8 @@ ...@@ -49,7 +51,8 @@
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
</div> </div>
<div class="count-item-num">{{ detailCodeForm.newlyKeepCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'status')" v-if="detailCodeForm.newlyKeepCount">{{ detailCodeForm.newlyKeepCount }}人</div>
<div class="count-item-num2" v-else>0人</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> </div>
...@@ -58,14 +61,35 @@ ...@@ -58,14 +61,35 @@
<el-tab-pane label="按日期查看" name="1"></el-tab-pane> <el-tab-pane label="按日期查看" name="1"></el-tab-pane>
<el-tab-pane label="按成员查看" name="2"></el-tab-pane> <el-tab-pane label="按成员查看" name="2"></el-tab-pane>
</el-tabs> </el-tabs>
<GLTable v-show="activeName == 1" ref="timeTable" :tableData="getTimeApi" :tableParams="tableParams" :hasNum="false" :hasPage="false"></GLTable> <GLTable v-show="activeName == 1" ref="timeTable" :tableData="getTimeApi" :tableParams="tableParams" :hasNum="false" :hasPage="false">
<GLTable v-show="activeName == 2" @refreshTable="listStaff" :layout="layout" :tableTotal="tableTotal" ref="memberTabel" :tableData="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false"></GLTable> <div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day', scope.scope.dayTime)" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'status', scope.scope.dayTime)" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div>
</div>
</GLTable>
<GLTable v-show="activeName == 2" @refreshTable="listStaff" :layout="layout" :tableTotal="tableTotal" ref="memberTabel" :tableData="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false">
<div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'staffIds')" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'statusAndStaffIds')" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div>
</div>
</GLTable>
<emp-detail ref="empDetailForm"></emp-detail>
</div> </div>
</template> </template>
<script> <script>
import empDetail from './components/empDetail.vue'
export default { export default {
name: 'store', name: 'store',
components: { empDetail },
data() { data() {
return { return {
activeName: '1', activeName: '1',
...@@ -79,11 +103,13 @@ export default { ...@@ -79,11 +103,13 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '新增客户数', label: '新增客户数',
prop: 'newlyCount' prop: 'newlyCount',
addHtml: 'newlyCount'
}, },
{ {
label: '留存客户数', label: '留存客户数',
prop: 'newlyKeepCount' prop: 'newlyKeepCount',
addHtml: 'newlyKeepCount'
}, },
{ {
label: '日期', label: '日期',
...@@ -101,11 +127,13 @@ export default { ...@@ -101,11 +127,13 @@ export default {
}, },
{ {
label: '新增客户数', label: '新增客户数',
prop: 'newlyCount' prop: 'newlyCount',
addHtml: 'newlyCount'
}, },
{ {
label: '留存客户数', label: '留存客户数',
prop: 'newlyKeepCount' prop: 'newlyKeepCount',
addHtml: 'newlyKeepCount'
}, },
{ {
label: '日期', label: '日期',
...@@ -127,6 +155,9 @@ export default { ...@@ -127,6 +155,9 @@ export default {
goback() { goback() {
this.$router.push('/channel/index') this.$router.push('/channel/index')
}, },
handleEmpDetail(scope,status,day) {
this.$refs.empDetailForm.init(scope,status,day)
},
detailChannelCode(id, codeUuid) { detailChannelCode(id, codeUuid) {
let param = { let param = {
id, id,
...@@ -199,6 +230,10 @@ export default { ...@@ -199,6 +230,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.channel-main { .channel-main {
padding: 20px; padding: 20px;
.remark-row { .remark-row {
...@@ -306,6 +341,17 @@ export default { ...@@ -306,6 +341,17 @@ export default {
color: #333333; color: #333333;
line-height: 26px; line-height: 26px;
margin-top: 28px; margin-top: 28px;
display: inline-block;
cursor: pointer;
text-decoration: underline;
}
.count-item-num2 {
font-size: 26px;
font-weight: 600;
color: #333333;
line-height: 26px;
margin-top: 28px;
display: inline-block;
} }
.count-item-icon { .count-item-icon {
position: absolute; position: absolute;
......
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
</div> </div>
</div> </div>
<div class="config-title"> <div class="config-title">
<span v-if="!editStatus && !configType" @click="editStatus = true"> <el-button type="primary" icon="el-icon-edit-outline" size="small" v-if="!editStatus && !configType" @click="editStatus = true">编辑配置</el-button>
<label>编辑配置</label>
<i class="el-icon-edit-outline"></i>
</span>
</div> </div>
<div class="config-market" v-if="configType"> <div class="config-market" v-if="configType">
<div class="config-market-item checked"> <div class="config-market-item checked">
...@@ -304,7 +301,7 @@ export default { ...@@ -304,7 +301,7 @@ export default {
if (res) { if (res) {
this.configItem = res this.configItem = res
this.addValue = res.delFlag == 0 ? true : false this.addValue = res.delFlag == 0 ? true : false
this.staffIds = res.staffIds?eval(res.staffIds):[] this.staffIds = res.staffIds ? eval(res.staffIds) : []
} }
}) })
}, },
...@@ -326,12 +323,18 @@ export default { ...@@ -326,12 +323,18 @@ export default {
this.findConfig(1) this.findConfig(1)
this.configType = false this.configType = false
} }
}
}, },
mounted() { resize() {
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
}
},
mounted() {
this.resize()
this.init() this.init()
window.addEventListener('resize', () => {
this.resize()
})
} }
} }
</script> </script>
...@@ -454,6 +457,7 @@ export default { ...@@ -454,6 +457,7 @@ export default {
color: #5850ff; color: #5850ff;
line-height: 40px; line-height: 40px;
height: 40px; height: 40px;
margin: 8px 0px;
span { span {
cursor: pointer; cursor: pointer;
} }
......
<template>
<div class="square-main" v-loading.fullscreen.lock="loading">
<div class="drainage-wrap scrm-box-f">
<div class="drainage-title">营销配置</div>
<div class="form-main">
<div class="drainage-form">
<div class="drainage-form-item">
<label class="is-require" style="line-height: 32px">营销名称</label>
<div style="position: relative">
<el-input @focus="imNameStatus = false" type="type" size="small" placeholder="请输入营销名称" v-model.trim="imName" :disabled="!editStatus" maxlength="30"></el-input>
<div class="el-form-item__error" v-if="imNameStatus">请输入营销名称</div>
</div>
</div>
<div class="drainage-form-item">
<label>群发短信</label>
<div class="message-panel">
<el-form ref="configForm" label-position="left" label-width="100px" :model="addForm" :rules="addRules" class="code-body-form">
<el-form-item label="推送规则:"><div class="configForm-desc">系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信下放。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</div></el-form-item>
<el-form-item size="small" label="营销时间" prop="time">
<el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item>
<el-form-item label="短信内容" prop="content">
<el-input type="textarea" v-model="addForm.content" rows="5" :disabled="!editStatus" maxlength="280" show-word-limit></el-input>
<div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div>
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item>
<div class="drainage-form-item">
<label style="width: 100px; text-align: left; color: #666">
自动打标签
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="drainage-emp">
<template v-for="item in tagging">
<div :key="index" v-for="(tag, index) in item.labelList">
{{ tag.name }}
</div>
</template>
</div>
</div>
</el-form>
</div>
</div>
<div class="drainage-form-item">
<label>
跟进员工
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="drainage-emp">
<div :key="index" v-for="(item, index) in dracImFollowStaffResponses">
<i class="el-icon-user-solid"></i>
{{ item.staffName }}
</div>
</div>
</div>
</div>
<div class="form-image">
<img src="@/assets/img/marketing/phone.png" />
<div class="preview-content">
<div class="preview-info">
<div class="preview-text text" v-for="(item, index) in content" :key="index">{{ item }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="channel-main-welcome scrm-box-f">
<div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel">
<div class="welcome-switch">
<label>自动发送欢迎语</label>
<el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div>
<div class="welcome-box" v-show="!editStatus && autoWelcome">
<div class="welcome-box-contaner">
<div :key="index" v-for="(item, index) in welcomeInfo">
<div v-if="item.attType == 1">
<div v-html="item.attContent" class="welcome-box-name"></div>
</div>
<div v-else-if="item.attType == 2">
<img src="@/assets/img/guestCustom/icon-img.png" alt="" />
<span>{{ item.attContent }}</span>
</div>
<div v-else-if="item.attType == 3">
<img src="@/assets/img/guestCustom/icon-img.png" alt="" />
<span>{{ item.attContent }}</span>
</div>
<div v-else-if="item.attType == 4">
<img src="@/assets/img/guestCustom/icon-link.png" alt="" />
<span>{{ item.attContent }}</span>
</div>
<div v-else-if="item.attType == 5">
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ item.attContent }}</span>
</div>
<div v-else-if="item.attType == 7">
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ item.attContent.marketingName }}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Vue from 'vue'
export default {
name: 'configInfo',
data() {
return {
loading: false,
welcomeInfo: [],
eventBus: new Vue(),
taggingLength: 0,
autoWelcome: true,
imName: '',
imNameStatus: false,
empStatus: false,
importName: null,
exportUrl: null,
editStatus: false,
saveStatus: false,
importStatus: false,
ExportDracImResponse: {},
footerLeft: 0,
footerWidth: 0,
addForm: {
desc: '',
content: '',
time: ['9:00:00', '18:00:00']
},
content: [],
editId: null,
tagging: [],
messageItem: {},
dialogVisible: true,
value: false,
value1: false,
dracImFollowStaffResponses: [],
dracImMessageConfigAddRequest: {},
ModelItem: {}
}
},
watch: {
'addForm.content': {
handler: function () {
this.content = []
let str = this.addForm.content
let num = 70
let len = str.length
for (let i = 0; i < len / num; i++) {
let str1 = str.substring(i * num, (i + 1) * num)
this.content.push(str1)
}
}
},
importName: {
handler() {
this.saveStatus = true
},
deep: true
},
imName: {
handler() {
this.saveStatus = true
},
deep: true
},
autoWelcome: {
handler() {
this.saveStatus = true
},
deep: true
},
addForm: {
handler() {
this.saveStatus = true
},
deep: true
},
tagging: {
handler: function () {
this.taggingLength = 0
this.tagging.forEach(item => {
this.taggingLength += item.labelList.length
})
this.saveStatus = true
},
deep: true
},
dracImFollowStaffResponses: {
handler() {
this.saveStatus = true
},
deep: true
}
},
methods: {
goback() {
this.importStatus = false
},
findById(id) {
this.$apis.marketing.findById({ id }).then(res => {
this.$nextTick(() => {
this.$refs.configForm.validate()
})
this.dracImFollowStaffResponses = res.dracImFollowStaffResponses
this.addForm.time = [res.dracImMessageConResponse.startTime, res.dracImMessageConResponse.endTime]
this.addForm.content = res.dracImMessageConResponse.content
this.imName = res.imName
this.autoWelcome = res.autoWelcome ? true : false
const previewList = res.dracScrmWelcomeConfigDTOS.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
if (item.attType == 1) item.attContent = item.attContent.replaceAll('[@昵称]', '<span style="color:#5850FF">@昵称</span>')
return item
})
this.welcomeInfo = previewList
const tagging = eval(res.tagging)
const taggingList = tagging.map(item => {
let name = item.name.split(',')
let ids = item.tagIds.split(',')
console.log(ids)
let labelList = name.map((tag, index) => {
return { id: ids[index], name: tag }
})
return {
labelGroup: {
id: item.groupId,
name: item.labelType
},
labelList
}
})
this.tagging = taggingList
this.$nextTick(() => {
this.saveStatus = false
})
})
}
},
mounted() {
let { id } = this.$route.params
this.editId = id
this.findById(id)
}
}
</script>
<style lang="scss" scoped>
.channel-main-welcome {
margin: 20px 0px 60px;
.chanel-form-title {
padding-left: 20px;
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 57px;
height: 57px;
border-bottom: 1px solid #d8d8d8;
}
.welcome-panel {
margin: 10px;
padding: 0px 42px 20px;
.welcome-switch {
margin-bottom: 20px;
label {
margin-right: 10px;
font-size: 14px;
font-weight: 400;
color: #666666;
}
}
.welcome-box {
margin-left: 48px;
&-contaner {
margin: 20px;
background: rgba(247, 247, 247, 0.52);
border-radius: 2px;
line-height: 22px;
padding: 10px;
min-width: 500px;
}
img {
width: 16px;
height: 16px;
vertical-align: sub;
margin-right: 5px;
}
}
}
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.image-uploader {
display: inline-block;
margin-bottom: 6px;
width: 100px;
position: relative;
input {
cursor: pointer;
position: absolute;
top: 0px;
width: 100%;
height: 100%;
font-size: 0px;
}
/deep/ {
.el-upload-list {
display: none;
}
}
}
.import-panel {
z-index: 2001;
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
&-box {
width: 712px;
height: 266px;
background: #ffffff;
border-radius: 4px;
padding: 20px;
box-sizing: border-box;
.import-title {
font-size: 20px;
font-weight: 500;
color: #424242;
line-height: 28px;
}
.import-num-panel {
display: flex;
margin: 10px;
.import-num-item {
width: 50%;
height: 140px;
text-align: center;
display: table-cell;
vertical-align: middle;
.import-num {
margin-top: 40px;
font-size: 20px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 28px;
}
.import-num-h2 {
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
}
}
.import-footer {
display: flex;
justify-content: space-between;
}
}
}
.drainage-wrap {
margin-bottom: 20px;
&:nth-child(2) {
margin-bottom: 20px;
}
.drainage-title {
padding-left: 20px;
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 57px;
height: 57px;
border-bottom: 1px solid #d8d8d8;
}
.form-main {
display: flex;
.form-image {
width: 280px;
height: 546px;
margin: 20px 10px;
position: relative;
.preview-content {
position: absolute;
width: 250px;
height: 320px;
overflow-y: auto;
top: 125px;
left: 50px;
.preview-text {
padding: 10px;
position: relative;
width: 160px;
color: #333;
background-color: #f4f4f4;
border-radius: 4px;
word-wrap: break-word;
margin-bottom: 10px;
}
}
img {
width: 100%;
height: auto;
}
}
.drainage-form {
flex: 1;
}
}
.form-tips {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
margin-top: 5px;
}
.drainage-form {
padding: 20px;
.drainage-form-item {
display: flex;
margin-top: 20px;
/deep/ {
.el-input__inner {
width: 448px;
}
}
label {
width: 120px;
text-align: right;
margin-right: 20px;
height: 36px;
line-height: 36px;
img {
width: 14px;
height: 14px;
vertical-align: middle;
margin-left: 5px;
}
&.is-require {
&::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
}
}
/deep/ {
.el-textarea__inner {
border-radius: 0px;
border: 1px solid #dcdfe6;
}
}
.select-panel {
padding-left: 20px;
background: #fff;
display: flex;
font-size: 14px;
font-weight: 400;
color: #717171;
line-height: 30px;
border: 1px solid #dcdfe6;
border-top: 0px;
> div {
cursor: pointer;
margin-right: 10px;
span {
margin-left: 3px;
}
}
}
.upload-box {
margin-bottom: 10px;
.upload-file-panel {
display: flex;
align-items: center;
> a {
margin-left: 10px;
text-decoration: underline;
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
}
}
.upload-btn {
text-align: center;
width: 96px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #dcdfe6;
font-size: 14px;
font-weight: 400;
color: #999999;
padding: 6px 0px;
}
.upload-tips {
margin-top: 6px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
.message-panel {
background: #f7f7f7;
border: 1px solid #dcdfe6;
padding: 20px;
flex: 1;
box-sizing: border-box;
font-size: 14px;
color: #3a3a3a;
.configForm-desc {
margin-top: 10px;
line-height: 20px;
}
}
.drainage-emp {
display: flex;
margin-top: 6px;
flex-wrap: wrap;
div {
text-align: left;
position: relative;
font-size: 14px;
line-height: 14px;
padding-left: 15px;
-webkit-border-radius: 4px;
border-radius: 4px;
border: 1px solid #e8e8ea;
padding: 6px;
display: inline-block;
margin-bottom: 5px;
margin-right: 5px;
i {
color: #75acff;
}
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px 5px 0px 5px;
max-height: 68px;
overflow: auto;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 450px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
margin-bottom: 5px;
}
.tag-item-panel {
display: flex;
}
.drainage-coutom-count {
font-size: 14px;
font-weight: 400;
color: #7d7d7d;
line-height: 36px;
margin-left: 20px;
}
}
.drainage-panel {
padding: 20px;
.drainage-config-wrap {
display: flex;
justify-content: space-between;
align-items: center;
.drainage-item-label {
width: 50%;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
.config-title {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
margin: 20px 0px;
i {
margin-left: 6px;
}
}
.config-market {
display: flex;
&-item {
position: relative;
padding: 10px;
width: 50%;
height: 150px;
background: #f6f6ff;
border-radius: 4px;
opacity: 0.8;
box-sizing: border-box;
&:first-child {
margin-right: 20px;
}
&.checked {
border: 1px solid #5850ff;
.config-market-title {
color: #5850ff;
}
.config-market-icon {
background: linear-gradient(153deg, #8085ef 0%, #6f76ee 100%, #6f76ee 100%) !important;
}
.config-market-name {
color: #333333 !important;
}
.config-line {
border: 1px solid #5850ff !important;
}
}
.config-market-title {
font-size: 16px;
font-weight: 400;
color: #999999;
line-height: 22px;
text-align: center;
}
.config-switch-icon {
position: absolute;
right: 10px;
top: 10px;
}
.config-market-select {
display: flex;
.config-market-s1 {
width: 33.33%;
margin: 0 auto;
text-align: center;
position: relative;
.config-line {
position: absolute;
top: 45px;
right: -30%;
width: 60%;
border: 1px solid #999999;
}
.config-market-icon {
width: 56px;
height: 56px;
background: #999999;
border-radius: 50%;
margin: 20px auto 10px;
}
.config-market-name {
font-size: 14px;
font-weight: 400;
color: #adadad;
line-height: 20px;
}
}
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<div class="form-panel scrm-box-f">
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item">
<el-row>
<el-form-item size="small" label="手机号">
<el-input size="small" v-model="tableSearchForm.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item size="small" label="发送状态" style="margin-left: 20px">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="客户姓名" style="margin-left: 20px">
<el-input size="small" v-model="tableSearchForm.customerName" placeholder="请输入客户姓名"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import util from '@/utils/util'
export default {
name: 'customList',
data() {
return {
loading: false,
tableSearchForm: {},
tableData: [],
optionstatus: [
{
value: '',
label: '全部'
},
{
value: '0',
label: '未发送'
},
{
value: '1',
label: '已发送'
}
],
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '手机号',
prop: 'phone'
},
{
label: '客户姓名',
prop: 'customerName'
},
{
label: '发送状态',
prop: 'statusName'
},
{
label: '发送时间',
prop: 'sendTime'
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal: 0,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }
}
},
methods: {
handleDetail(scope) {
this.$alert(scope.content, { center: true })
},
handleSearch() {
this.listChannelCodeByPage()
},
handleReset() {
this.tableSearchForm = {}
this.listChannelCodeByPage()
},
listChannelCodeByPage() {
const { id } = this.$route.params
const params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
id
}
this.loading = true
this.$apis.marketing.customerPage(params).then(res => {
this.loading = false
if (res) {
this.tableData = res.data
this.tableData.forEach(item => {
this.$set(item, 'taggingList', [])
const tagging = eval(item.tagging)
if (tagging && tagging.length > 0) {
tagging.forEach(itm => {
let name = itm.name.split(',')
name.forEach((tag, index) => {
item.taggingList.push({ name: tag })
})
})
}
})
this.tableTotal = res.count
}
})
}
},
mounted() {
this.listChannelCodeByPage()
}
}
</script>
<style>
.el-popover {
max-width: 800px;
}
</style>
<style lang="scss" scoped>
.popover-panel {
width: 1000px;
}
.form-header {
margin-bottom: 20px;
}
.form-panel {
padding: 20px;
margin-bottom: 60px;
/deep/ .el-popover {
max-width: 1000px;
}
}
.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;
}
.tag-panel {
.tag-item {
border-radius: 4px;
border: 1px solid #e8e8ea;
display: inline-block;
padding: 4px 6px;
margin-right: 3px;
margin-bottom: 3px;
}
}
.allTagsWrap {
position: relative;
display: -webkit-box;
// max-height: 56px;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
padding-bottom: -2px;
box-sizing: border-box;
// &:hover {
// -webkit-line-clamp: 9999;
// // .tag-box-wrap {
// // margin-bottom: 10px;
// // }
// }
.tag-box-wrap {
display: inline-block;
margin-right: 10px;
// margin-bottom: 2px;
padding: 0 10px;
box-sizing: border-box;
min-width: 76px;
max-width: 200px;
height: 26px;
line-height: 26px;
border-radius: 4px;
border: 1px solid #e8e8ea;
background: #fafbfe;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #666666;
max-width: 245px;
cursor: pointer;
margin-bottom: 3px;
// &:first-child{
// margin-bottom: 4px;
// }
}
// .tag-box-wrap + .tag-box-wrap {
// margin-bottom: 4px;
// }
.expande-button-wrap {
position: absolute;
right: 0;
bottom: 0;
.expande-button {
color: #fafbfe;
cursor: pointer;
i {
height: 8px;
}
span {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #fafbfe;
line-height: 20px;
}
}
}
}
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.accountType-row {
text-align: left;
position: relative;
font-size: 14px;
line-height: 14px;
padding-left: 15px;
border-radius: 4px;
border: 1px solid #e8e8ea;
padding: 6px;
display: inline-block;
margin-bottom: 5px;
margin-right: 5px;
&-tag {
display: inline-block;
border: 1px solid #e8e8ea;
background: #fafbfe;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #666;
max-width: 150px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
i {
color: #75acff;
margin-right: 3px;
}
// &::before {
// content: '';
// position: absolute;
// width: 6px;
// height: 6px;
// background: #5850ff;
// border-radius: 8px;
// left: 0px;
// top: 7px;
// }
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -8,12 +8,8 @@ ...@@ -8,12 +8,8 @@
> >
<div class="model-panel"> <div class="model-panel">
<div class="model-panel-tab"> <div class="model-panel-tab">
<label>模板类型:</label> <el-input v-model="keyword" placeholder="请输入关键字" width="215px" size="small"></el-input>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card"> <el-button type="primary" @click="handleSearch" size="small">查询</el-button>
<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>
<div class="model-item-panel" v-if="modelList.length>0" v-loading="loading"> <div class="model-item-panel" v-if="modelList.length>0" v-loading="loading">
<div class="model-item" v-for="(item, index) in modelList" :key="index"> <div class="model-item" v-for="(item, index) in modelList" :key="index">
...@@ -57,6 +53,7 @@ export default { ...@@ -57,6 +53,7 @@ export default {
name: "activityModel", name: "activityModel",
data() { data() {
return { return {
keyword: '',
dialogVisible: false, dialogVisible: false,
loading: false, loading: false,
activeName: "1", activeName: "1",
...@@ -69,6 +66,7 @@ export default { ...@@ -69,6 +66,7 @@ export default {
}, },
methods: { methods: {
init() { init() {
this.keyword = '';
this.messageRadio = {}; this.messageRadio = {};
this.dialogVisible = true; this.dialogVisible = true;
this.dracImMessage(); this.dracImMessage();
...@@ -85,7 +83,7 @@ export default { ...@@ -85,7 +83,7 @@ export default {
let params = { let params = {
pageSize: this.pageSize, pageSize: this.pageSize,
pageNum: this.pageNum, pageNum: this.pageNum,
type: this.activeName, keyword: this.keyword
}; };
this.$apis.marketing.dracImMessage(params).then((res) => { this.$apis.marketing.dracImMessage(params).then((res) => {
this.messageRadio = {}; this.messageRadio = {};
...@@ -94,6 +92,9 @@ export default { ...@@ -94,6 +92,9 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
handleSearch() {
this.dracImMessage();
},
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
}, },
...@@ -117,8 +118,9 @@ export default { ...@@ -117,8 +118,9 @@ export default {
line-height: 24px; line-height: 24px;
} }
/deep/ { /deep/ {
.el-checkbox:last-of-type { .el-input,.el-input__inner {
margin-right: 8px; width: 320px;
margin-right: 20px;
} }
.el-tabs__nav { .el-tabs__nav {
border: 0; border: 0;
......
...@@ -7,12 +7,13 @@ ...@@ -7,12 +7,13 @@
<label>客户信息</label> <label>客户信息</label>
<div class="upload-box"> <div class="upload-box">
<div class="upload-file-panel"> <div class="upload-file-panel">
<el-upload action="" class="image-uploader" :before-upload="uploadFile"> <div class="image-uploader">
<div class="upload-btn"> <div class="upload-btn">
<i class="el-icon-upload2"></i> <i class="el-icon-upload2"></i>
上传文件 上传文件
</div> </div>
</el-upload> <input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile" />
</div>
<a class="download-url" href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/客户信息导入模板.xlsx">下载导入模版</a> <a class="download-url" href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/客户信息导入模板.xlsx">下载导入模版</a>
</div> </div>
<div class="upload-tips" v-if="importName">{{ importName }}</div> <div class="upload-tips" v-if="importName">{{ importName }}</div>
...@@ -50,13 +51,19 @@ ...@@ -50,13 +51,19 @@
<div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div> <div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div>
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div> <div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item> </el-form-item>
<el-form-item label="自动打标签"> <div class="drainage-form-item">
<label style="width: 100px; text-align: left; color: #666">
自动打标签
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="tag-item-panel" v-if="editStatus"> <div class="tag-item-panel" v-if="editStatus">
<div> <div>
<el-button size="small" @click="handleAddTag">添加</el-button> <el-button size="small" @click="handleAddTag">添加</el-button>
<div class="el-input-tag input-tag-wrapper" v-if="taggingLength"> <div class="el-input-tag input-tag-wrapper" v-if="taggingLength">
<template v-for="(item,index) in tagging"> <template v-for="(item, index) in tagging">
<el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx,index)"> <el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx, index)">
{{ tag.name }} {{ tag.name }}
</el-tag> </el-tag>
</template> </template>
...@@ -70,12 +77,17 @@ ...@@ -70,12 +77,17 @@
</div> </div>
</template> </template>
</div> </div>
</el-form-item> </div>
</el-form> </el-form>
</div> </div>
</div> </div>
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item" v-if="editStatus">
<label class="is-require">跟进员工</label> <label class="is-require">
跟进员工
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div style="position: relative"> <div style="position: relative">
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
...@@ -92,7 +104,12 @@ ...@@ -92,7 +104,12 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
<label>跟进员工</label> <label>
跟进员工
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="drainage-emp"> <div class="drainage-emp">
<div :key="index" v-for="(item, index) in dracImFollowStaffResponses"> <div :key="index" v-for="(item, index) in dracImFollowStaffResponses">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
...@@ -194,6 +211,13 @@ import welcomeWords from '@/components/welcome/welcomeWords.vue' ...@@ -194,6 +211,13 @@ import welcomeWords from '@/components/welcome/welcomeWords.vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import messageModel from './components/messageModel' import messageModel from './components/messageModel'
const validateTime = (rule, value, callback) => {
if ((new Date(`2000-1-1 ${value[1]}`).getTime() - new Date(`2000-1-1 ${value[0]}`).getTime()) / (1000 * 60) < 120) {
callback(new Error('因营销类短信内容需人工审核,建议预留2小时的营销时长。'))
} else {
callback()
}
}
export default { export default {
name: 'config', name: 'config',
components: { components: {
...@@ -215,6 +239,7 @@ export default { ...@@ -215,6 +239,7 @@ export default {
importName: null, importName: null,
exportUrl: null, exportUrl: null,
editStatus: true, editStatus: true,
saveStatus: false,
importStatus: false, importStatus: false,
ExportDracImResponse: {}, ExportDracImResponse: {},
footerLeft: 0, footerLeft: 0,
...@@ -222,7 +247,7 @@ export default { ...@@ -222,7 +247,7 @@ export default {
addForm: { addForm: {
desc: '', desc: '',
content: '', content: '',
time: '' time: ['9:00:00', '18:00:00']
}, },
content: [], content: [],
editId: null, editId: null,
...@@ -235,7 +260,10 @@ export default { ...@@ -235,7 +260,10 @@ export default {
dracImMessageConfigAddRequest: {}, dracImMessageConfigAddRequest: {},
ModelItem: {}, ModelItem: {},
addRules: { addRules: {
time: [{ required: true, message: '请选择营销时间', trigger: 'change' }], time: [
{ required: true, message: '请选择营销时间', trigger: 'change' },
{ validator: validateTime, trigger: 'change' }
],
content: [{ required: true, message: '请选择短信模板', trigger: 'change' }] content: [{ required: true, message: '请选择短信模板', trigger: 'change' }]
} }
} }
...@@ -253,12 +281,43 @@ export default { ...@@ -253,12 +281,43 @@ export default {
} }
} }
}, },
importName: {
handler() {
this.saveStatus = true
},
deep: true
},
imName: {
handler() {
this.saveStatus = true
},
deep: true
},
autoWelcome: {
handler() {
this.saveStatus = true
},
deep: true
},
addForm: {
handler() {
this.saveStatus = true
},
deep: true
},
tagging: { tagging: {
handler: function () { handler: function () {
this.taggingLength = 0 this.taggingLength = 0
this.tagging.forEach(item => { this.tagging.forEach(item => {
this.taggingLength += item.labelList.length this.taggingLength += item.labelList.length
}) })
this.saveStatus = true
},
deep: true
},
dracImFollowStaffResponses: {
handler() {
this.saveStatus = true
}, },
deep: true deep: true
} }
...@@ -271,7 +330,18 @@ export default { ...@@ -271,7 +330,18 @@ export default {
this.importStatus = false this.importStatus = false
}, },
handleCancel() { handleCancel() {
console.log(this.saveStatus)
if (this.saveStatus || (this.$refs.welcome.previewList.length > 0 && this.editStatus)) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$router.push('/market/index')
})
} else {
this.$router.push('/market/index') this.$router.push('/market/index')
}
}, },
selectItem(item) { selectItem(item) {
this.messageItem = item this.messageItem = item
...@@ -280,7 +350,8 @@ export default { ...@@ -280,7 +350,8 @@ export default {
tagSelected(item) { tagSelected(item) {
this.tagging = item this.tagging = item
}, },
uploadFile(file) { uploadFile(e) {
const file = e.srcElement.files[0]
let AllImgExt = '.xls|.xlsx' let AllImgExt = '.xls|.xlsx'
let extName = file.name.substring(file.name.lastIndexOf('.')).toLowerCase() let extName = file.name.substring(file.name.lastIndexOf('.')).toLowerCase()
console.log(extName) console.log(extName)
...@@ -297,6 +368,7 @@ export default { ...@@ -297,6 +368,7 @@ export default {
this.$apis.common.pictureUpload({ file: fileUrl }).then(res => { this.$apis.common.pictureUpload({ file: fileUrl }).then(res => {
this.importName = file.name this.importName = file.name
this.exportUrl = res this.exportUrl = res
this.$refs.file.value = ''
this.handleSaveImport() this.handleSaveImport()
}) })
} }
...@@ -323,9 +395,9 @@ export default { ...@@ -323,9 +395,9 @@ export default {
console.log(this.ModelItem) console.log(this.ModelItem)
}, },
handleSaveImport() { handleSaveImport() {
this.loading = true; this.loading = true
let params; let params
let config; let config
if (this.editId) { if (this.editId) {
config = 'exportUpdate' config = 'exportUpdate'
params = { params = {
...@@ -361,7 +433,6 @@ export default { ...@@ -361,7 +433,6 @@ export default {
this.empStatus = true this.empStatus = true
return return
} }
this.loading = true;
this.$refs['configForm'].validate(valid => { this.$refs['configForm'].validate(valid => {
if (valid) { if (valid) {
let startTime, endTime let startTime, endTime
...@@ -422,7 +493,7 @@ export default { ...@@ -422,7 +493,7 @@ export default {
}) })
params.welcomeInfo = attachmentList params.welcomeInfo = attachmentList
} }
this.loading = true
this.$apis.marketing[config](params).then(res => { this.$apis.marketing[config](params).then(res => {
this.loading = false this.loading = false
if (res) { if (res) {
...@@ -478,6 +549,9 @@ export default { ...@@ -478,6 +549,9 @@ export default {
} }
}) })
this.tagging = taggingList this.tagging = taggingList
this.$nextTick(() => {
this.saveStatus = false
})
}) })
} }
}, },
...@@ -485,7 +559,7 @@ export default { ...@@ -485,7 +559,7 @@ export default {
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
let { id } = this.$route.params let { id } = this.$route.params
if (id != -1) { if (id) {
this.editId = id this.editId = id
this.findById(id) this.findById(id)
this.editStatus = false this.editStatus = false
...@@ -508,7 +582,7 @@ export default { ...@@ -508,7 +582,7 @@ export default {
} }
.welcome-panel { .welcome-panel {
margin: 10px; margin: 10px;
padding: 0px 20px 20px; padding: 0px 42px 20px;
.welcome-switch { .welcome-switch {
margin-bottom: 20px; margin-bottom: 20px;
label { label {
...@@ -550,7 +624,16 @@ export default { ...@@ -550,7 +624,16 @@ export default {
.image-uploader { .image-uploader {
display: inline-block; display: inline-block;
margin-bottom: 6px; margin-bottom: 6px;
height: 20px; width: 100px;
position: relative;
input {
cursor: pointer;
position: absolute;
top: 0px;
width: 100%;
height: 100%;
font-size: 0px;
}
/deep/ { /deep/ {
.el-upload-list { .el-upload-list {
display: none; display: none;
...@@ -682,6 +765,12 @@ export default { ...@@ -682,6 +765,12 @@ export default {
margin-right: 20px; margin-right: 20px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
img {
width: 14px;
height: 14px;
vertical-align: middle;
margin-left: 5px;
}
&.is-require { &.is-require {
&::before { &::before {
content: '*'; content: '*';
......
<template>
<div class="channel-main">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="营销配置" name="first"></el-tab-pane>
<el-tab-pane label="客户列表" name="second"></el-tab-pane>
</el-tabs>
<component :is="activeName == 'first'?configInfo:customList"></component>
<GLFooter
>
<el-button type="primary" @click="goback">返回</el-button>
</GLFooter>
</div>
</template>
<script>
import configInfo from "./components/configInfo";
import customList from "./components/customList";
export default {
name: "config",
components: {
configInfo,
customList,
},
data() {
return {
activeName: "first",
customList: 'customList',
configInfo: 'configInfo'
};
},
methods: {
goback() {
this.$router.push('/market/index')
},
},
};
</script>
<style lang="scss" scoped>
.channel-main {
/deep/ {
.el-tabs__nav-wrap::after {
height: 0px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="form-panel scrm-box-f">
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item">
<el-form-item size="small" label="客户名称">
<el-input size="small" v-model="tableSearchForm.phone" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" label="手机号">
<el-input size="small" v-model="tableSearchForm.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item size="small" label="领取状态">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">导出</el-button>
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<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>
</GLTable>
</div>
</template>
<script>
export default {
name: 'effect',
data() {
return {
totalCount: 0,
percentage: 0,
optionstatus: [
{
value: '',
label: '全部'
},
{
value: '0',
label: '未发送'
},
{
value: '1',
label: '已发送'
}
],
tableSearchForm: {},
getListApi: this.$apis.overview.findAllMessageByPage,
tableParams: {
mutiSelectUniqueKey: 'id',
mutiSelectName: 'emp',
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'phone'
},
{
label: '手机号',
prop: 'phone'
},
{
label: '是否加企微',
prop: 'phone'
},
{
label: '手机号',
prop: 'phone'
},
{
label: '跟进员工',
prop: 'statusName'
},
{
label: '领取状态',
prop: 'phone'
},
{
label: '领取时间',
prop: 'sendTime'
},
{
label: '核销状态',
prop: 'phone'
},
{
label: '核销时间',
prop: 'sendTime'
},
{
label: '操作',
prop: 'optionBtns',
width: '160px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: []
}
}
},
methods: {
findMessageStatic() {
this.$apis.overview.findMessageStatic({}).then(res => {
this.totalCount = res.totalCount
this.percentage = res.percentage
})
},
handleReset() {
this.tableSearchForm = {}
this.handleSearch()
},
handleSearch() {
this.$refs.employeeRef.refreshTable()
},
handleDetail(scope) {
this.$alert(scope.content, { center: true })
}
},
mounted() {
this.findMessageStatic()
}
}
</script>
<style lang="scss" scoped>
.form-header {
margin-bottom: 20px;
}
.form-panel {
padding: 20px;
.statistics-panel {
display: flex;
&-item {
width: 33.33%;
.statistics-title-h {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin-bottom: 20px;
}
.statistics-title {
font-size: 16px;
font-weight: 500;
color: #424242;
line-height: 22px;
img {
width: 14px;
height: 14px;
margin-left: 10px;
margin-top: 4px;
}
}
.circle-box {
margin: 20px 0px;
display: flex;
align-items: center;
.circle-box-item {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
.circle-item-num {
font-size: 22px;
font-weight: 600;
color: #333333;
line-height: 30px;
}
}
}
}
}
}
</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 type="primary" size="small" @click="addConfig"> <GLButton type="primary" size="small" @click="addConfig" fn="新增营销">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
新增营销 新增营销
</el-button> </GLButton>
<!-- <GLButton type="primary" @click="addConfig" size="small" fn="新增" mode="el-button">新增营销</GLButton> --> <!-- <GLButton type="primary" @click="addConfig" size="small" fn="新增" mode="el-button">新增营销</GLButton> -->
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label> <label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
</el-form> </el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button :disabled="scope.scope.imStatus!=1" type="text" @click="handleDetail(scope.scope)">营销配置</el-button> <GLButton type="text" @click="handleDetail(scope.scope)" fn="智能营销配置">查看配置</GLButton>
<!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> -->
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -93,12 +94,13 @@ export default { ...@@ -93,12 +94,13 @@ export default {
}, },
{ {
label: '创建人', label: '创建人',
prop: 'createdName' prop: 'createdName',
width: '220px'
}, },
{ {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '100px', width: '180px',
addHtml: 'optionBtns', addHtml: 'optionBtns',
fixed: 'right' fixed: 'right'
} }
...@@ -134,10 +136,13 @@ export default { ...@@ -134,10 +136,13 @@ export default {
}, },
handleImport() {}, handleImport() {},
addConfig() { addConfig() {
this.$router.push('/market/config/-1') this.$router.push('/market/config')
}, },
handleDetail(scope) { handleDetail(scope) {
this.$router.push('/market/config/' + scope.id) this.$router.push('/market/configDetail/' + scope.id)
},
handleStatistics(scope) {
this.$router.push('/market/effect/' + scope.id)
} }
} }
} }
......
<template> <template>
<div class="square-main"> <div class="square-main">
<div class="drainage-wrap scrm-box-f"> <div class="drainage-wrap scrm-box-f">
<div class="drainage-title">指定客户</div> <div class="drainage-title">指定客户1</div>
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item"> <div class="drainage-form-item">
<label>客户信息</label> <label>客户信息1</label>
<div class="upload-box"> <div class="upload-box">
<div class="upload-file-panel"> <div class="upload-file-panel">
<el-upload action="" class="image-uploader" :before-upload="uploadFile"> <el-upload action="" class="image-uploader" :before-upload="uploadFile">
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item" v-if="editStatus">
<label class="is-require">跟进员工</label> <label class="is-require">跟进员工</label>
<el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
<div> <div>
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
...@@ -321,11 +324,17 @@ export default { ...@@ -321,11 +324,17 @@ export default {
this.addForm.content = res.dracImMessageConResponse.content this.addForm.content = res.dracImMessageConResponse.content
this.tagging = eval(res.tagging) this.tagging = eval(res.tagging)
}) })
}
}, },
mounted() { resize() {
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
}
},
mounted() {
this.resize();
window.addEventListener('resize', () => {
this.resize()
})
let { id } = this.$route.params let { id } = this.$route.params
if (id != -1) { if (id != -1) {
this.editId = id this.editId = id
......
<template> <template>
<div class="square-main"> <div class="square-main">
<div class="square-main-header"> <div class="square-main-header">
<el-button type="primary" size="small" @click="addConfig"> <GLButton type="primary" size="small" @click="addConfig" fn="新增营销">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
新增营销 新增营销
</el-button> </GLButton>
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label> <label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
<el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。"> <el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</el-form> </el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">营销配置</el-button> <GLButton type="text" @click="handleDetail(scope.scope)" fn="智能营销配置">营销配置</GLButton>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -54,12 +54,8 @@ export default { ...@@ -54,12 +54,8 @@ export default {
label: '待处理' label: '待处理'
}, },
{ {
value: '2',
label: '处理中'
},
{
value: '3', value: '3',
label: '已处理' label: '已完成'
} }
], ],
pickerOptions: { pickerOptions: {
......
...@@ -3,30 +3,30 @@ ...@@ -3,30 +3,30 @@
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from 'echarts'
export default { export default {
name: "echartCircle", name: 'echartCircle',
props: { props: {
coustomId: { coustomId: {
type: String, type: String,
default: "", default: ''
}, },
bgColor1: { bgColor1: {
type: String, type: String,
default: "", default: ''
}, },
bgColor2: { bgColor2: {
type: String, type: String,
default: "", default: ''
}, },
coustomCount: { coustomCount: {
type: String, type: String
}, }
}, },
data() { data() {
return {}; return {}
}, },
watch: { watch: {
coustomCount() { coustomCount() {
...@@ -35,33 +35,33 @@ export default { ...@@ -35,33 +35,33 @@ export default {
}, },
methods: { methods: {
getEchart() { getEchart() {
const chartDom = document.getElementById(this.coustomId); const chartDom = document.getElementById(this.coustomId)
const myChart = echarts.init(chartDom); const myChart = echarts.init(chartDom)
let option; let option
option = { option = {
series: [ series: [
{ {
type: "pie", type: 'pie',
radius: ["40%", "70%"], radius: ['40%', '70%'],
hoverAnimation: false, hoverAnimation: false,
avoidLabelOverlap: false, avoidLabelOverlap: false,
color: [this.bgColor1, this.bgColor2], color: [this.bgColor1, this.bgColor2],
label: { label: {
show: false, show: false,
position: "center", position: 'center'
}, },
labelLine: { labelLine: {
show: false, show: false
},
data: [{ value: 100 }, { value: this.coustomCount}],
}, },
], data: [{ value: 100 - this.coustomCount }, { value: this.coustomCount }]
}; }
]
}
option && myChart.setOption(option); option && myChart.setOption(option)
},
} }
}; }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -27,6 +27,12 @@ export default { ...@@ -27,6 +27,12 @@ export default {
let notAddEntMicroCount = lineData.map(item => { let notAddEntMicroCount = lineData.map(item => {
return item.notAddEntMicroCount return item.notAddEntMicroCount
}) })
const lengthC = entMicroCount.length - 1
if (notAddEntMicroCount.every(item => item == 0) && entMicroCount.every(item => item == 0)) {
this.lineStatus = false
return
}
this.lineStatus = true
let dateTime = lineData.map(item => { let dateTime = lineData.map(item => {
return item.dayTime return item.dayTime
}) })
...@@ -54,13 +60,13 @@ export default { ...@@ -54,13 +60,13 @@ export default {
}, },
dataZoom: [ dataZoom: [
{ {
type: 'inside', startValue: lengthC-29,
startValue: 0, endValue: lengthC
endValue: 29
}, },
{ {
startValue: 0, type: 'inside',
endValue: 29 startValue: lengthC-29,
endValue: lengthC
} }
], ],
xAxis: { xAxis: {
...@@ -70,7 +76,7 @@ export default { ...@@ -70,7 +76,7 @@ export default {
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
minInterval: 1, minInterval: 1
}, },
series: [ series: [
{ {
...@@ -89,11 +95,6 @@ export default { ...@@ -89,11 +95,6 @@ export default {
} }
option && myChart.setOption(option) option && myChart.setOption(option)
if(notAddEntMicroCount.every(item => item == 0) && entMicroCount.every(item => item == 0)) {
this.lineStatus = false
}else {
this.lineStatus = true
}
} }
} }
} }
......
...@@ -172,7 +172,7 @@ export default { ...@@ -172,7 +172,7 @@ export default {
} }
.store-item-s { .store-item-s {
width: 33.33%; width: 33.33%;
padding: 30px 20px; padding: 30px 15px;
.store-item-title { .store-item-title {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
...@@ -205,9 +205,7 @@ export default { ...@@ -205,9 +205,7 @@ export default {
} }
} }
.user-panel { .user-panel {
display: flex;
&-line { &-line {
flex: 1;
padding: 20px; padding: 20px;
.echart-title { .echart-title {
font-size: 20px; font-size: 20px;
......
<template>
<div class="form-panel scrm-box-f">
<div class="form-header"><el-button type="primary" size="small" @click="goback">返回</el-button></div>
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item">
<el-form-item size="small" label="客户名称">
<el-input size="small" v-model="tableSearchForm.phone" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" label="电话号码">
<el-input size="small" v-model="tableSearchForm.phone" placeholder="请输入电话号码"></el-input>
</el-form-item>
<el-form-item size="small" label="是否添加企微">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="首次添加企微">
<el-date-picker :picker-options="pickerOptions" v-model="createTime" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始时间" end-placeholder="结束时间"></el-date-picker>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px">
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">导出</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">客户详情</el-button>
</div>
</GLTable>
</div>
</template>
<script>
export default {
name: 'customDetail',
data() {
return {
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
createTime: '',
totalCount: 0,
percentage: 0,
optionstatus: [
{
value: '',
label: '全部'
},
{
value: '0',
label: '是'
},
{
value: '1',
label: '否'
}
],
tableSearchForm: {},
getListApi: this.$apis.overview.findAllMessageByPage,
tableParams: {
mutiSelectUniqueKey: 'id',
mutiSelectName: 'emp',
listName: 'data',
tableOption: false,
otherOptions: {
label: '启用开关'
},
tableColumns: [
{
label: '客户名称',
prop: 'phone'
},
{
label: '手机号',
prop: 'phone'
},
{
label: '性别',
prop: 'phone'
},
{
label: '是否加企微',
prop: 'statusName'
},
{
label: '来源',
prop: 'sendTime',
align: 'left'
},
{
label: '跟进员工',
prop: 'phone'
},
{
label: '首次添加企微',
prop: 'sendTime'
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: []
}
}
},
watch: {
createTime(value) {
if (value) {
this.tableSearchForm.startTime = value[0] + ' 00:00:00'
this.tableSearchForm.endTime = value[1] + ' 23:59:59'
} else {
delete this.tableSearchForm.startTime
delete this.tableSearchForm.endTime
}
}
},
methods: {
findMessageStatic() {
this.$apis.overview.findMessageStatic({}).then(res => {
this.totalCount = res.totalCount
this.percentage = res.percentage
})
},
goback() {
this.$router.go('-1')
},
handleReset() {
this.tableSearchForm = {}
this.handleSearch()
},
handleSearch() {
this.$refs.employeeRef.refreshTable()
},
handleDetail(scope) {
this.$alert(scope.content, { center: true })
}
},
mounted() {
this.findMessageStatic()
}
}
</script>
<style lang="scss" scoped>
.form-header {
margin-bottom: 20px;
}
.form-panel {
padding: 20px;
.follow-form-item {
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-input__inner {
width: 215px;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -10,10 +10,7 @@ ...@@ -10,10 +10,7 @@
</div> </div>
</div> </div>
<div class="config-title"> <div class="config-title">
<span v-if="!editStatus" @click="editStatus = true"> <el-button type="primary" icon="el-icon-edit-outline" size="small" v-if="!editStatus" @click="editStatus = true">编辑配置</el-button>
<label>编辑配置</label>
<i class="el-icon-edit-outline"></i>
</span>
</div> </div>
<div class="config-market"> <div class="config-market">
<div class="config-market-item checked"> <div class="config-market-item checked">
...@@ -91,7 +88,14 @@ ...@@ -91,7 +88,14 @@
<div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div> <div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div>
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div> <div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item> </el-form-item>
<el-form-item label="自动打标签"> <div class="drainage-form-item">
<label style="width: 100px; text-align: left; color: #666">
自动打标签
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="tag-item-panel" v-if="editStatus"> <div class="tag-item-panel" v-if="editStatus">
<div> <div>
<el-button size="small" @click="handleAddTag">添加</el-button> <el-button size="small" @click="handleAddTag">添加</el-button>
...@@ -111,12 +115,17 @@ ...@@ -111,12 +115,17 @@
</div> </div>
</template> </template>
</div> </div>
</el-form-item> </div>
</el-form> </el-form>
</div> </div>
</div> </div>
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item" v-if="editStatus">
<label class="is-require">跟进员工</label> <label class="is-require">
跟进员工
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div style="position: relative"> <div style="position: relative">
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
...@@ -133,7 +142,12 @@ ...@@ -133,7 +142,12 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
<label>跟进员工</label> <label>
跟进员工
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="drainage-emp" v-if="addForm.staffIds.length"> <div class="drainage-emp" v-if="addForm.staffIds.length">
<div :key="index" v-for="(item, index) in addForm.staffIds"> <div :key="index" v-for="(item, index) in addForm.staffIds">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
...@@ -193,17 +207,11 @@ ...@@ -193,17 +207,11 @@
</div> </div>
</div> </div>
</div> </div>
<div <GLFooter
class="footer-panel"
v-if="editStatus"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
> >
<el-button type="primary" @click="handleSave">提交</el-button> <el-button type="primary" @click="handleSave" v-if="editStatus">提交</el-button>
<el-button @click="goback">取消</el-button> <el-button @click="goback">取消</el-button>
</div> </GLFooter>
<select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp> <select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp>
<select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag> <select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag>
<message-model ref="selectMessageForm" @selectItem="selectItem"></message-model> <message-model ref="selectMessageForm" @selectItem="selectItem"></message-model>
...@@ -278,6 +286,13 @@ import welcomeWords from '@/components/welcome/welcomeWords.vue' ...@@ -278,6 +286,13 @@ import welcomeWords from '@/components/welcome/welcomeWords.vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import messageModel from '../market/components/messageModel' import messageModel from '../market/components/messageModel'
const validateTime = (rule, value, callback) => {
if ((new Date(`2000-1-1 ${value[1]}`).getTime() - new Date(`2000-1-1 ${value[0]}`).getTime()) / (1000 * 60) < 120) {
callback(new Error('因营销类短信内容需人工审核,建议预留2小时的营销时长。'))
} else {
callback()
}
}
export default { export default {
name: 'drainage', name: 'drainage',
components: { components: {
...@@ -292,6 +307,7 @@ export default { ...@@ -292,6 +307,7 @@ export default {
eventBus: new Vue(), eventBus: new Vue(),
autoWelcome: true, autoWelcome: true,
editStatus: false, editStatus: false,
saveStatus: false,
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
taggingLength: 0, taggingLength: 0,
...@@ -305,14 +321,18 @@ export default { ...@@ -305,14 +321,18 @@ export default {
tagging: [], tagging: [],
templateId: '' templateId: ''
}, },
previewListStart: [],
content: [], content: [],
dialogVisible: false, dialogVisible: false,
addValue: false, addValue: false,
empStatus: false, empStatus: false,
value1: false, value1: false,
dracImFollowStaffResponses: [{ codeId: null, imId: 5, staffId: 366, staffName: 'fddfdf' }], dracImFollowStaffResponses: [],
addRules: { addRules: {
time: [{ required: true, message: '请选择营销时间', trigger: 'change' }], time: [
{ required: true, message: '请选择营销时间', trigger: 'change' },
{ validator: validateTime, trigger: 'change' }
],
content: [{ required: true, message: '请选择短信模板', trigger: 'change' }] content: [{ required: true, message: '请选择短信模板', trigger: 'change' }]
} }
} }
...@@ -342,6 +362,18 @@ export default { ...@@ -342,6 +362,18 @@ export default {
} }
}, },
deep: true deep: true
},
addForm: {
handler() {
this.saveStatus = true
},
deep: true
},
autoWelcome: {
handler() {
this.saveStatus = true
},
deep: true
} }
}, },
methods: { methods: {
...@@ -394,7 +426,32 @@ export default { ...@@ -394,7 +426,32 @@ export default {
.catch(() => {}) .catch(() => {})
}, },
goback() { goback() {
this.$router.push('/square/index') this.previewListStart.forEach(item => {
this.$refs.welcome.previewList.forEach(itm => {
if (item.attType == itm.attType) {
if (typeof item.attContent != 'object' && item.attContent != itm.attContent) {
this.saveStatus = true
}
if (typeof item.attContent == 'object' && item.attContent.marketingName != itm.attContent.marketingName) {
this.saveStatus = true
}
}
})
})
if (this.previewListStart.length == 0 && this.$refs.welcome.previewList.length > 0) {
this.saveStatus = true
}
if (this.saveStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$router.go(-1)
})
} else {
this.$router.go(-1)
}
}, },
//开关 //开关
handleSwitch() { handleSwitch() {
...@@ -454,7 +511,7 @@ export default { ...@@ -454,7 +511,7 @@ export default {
console.log(item.attContent) console.log(item.attContent)
item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称') item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称')
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]') item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
} else if (item.attType == 7) { } else if (item.attType == 7 && item.attContent) {
item.attContent = JSON.stringify(item.attContent) item.attContent = JSON.stringify(item.attContent)
} }
return item return item
...@@ -483,7 +540,7 @@ export default { ...@@ -483,7 +540,7 @@ export default {
this.editStatus = false this.editStatus = false
this.$apis.marketing.findConfig({ configType: 3 }).then(res => { this.$apis.marketing.findConfig({ configType: 3 }).then(res => {
if (res) { if (res) {
if(!res.staffIds) { if (!res.staffIds) {
this.addForm.id = res.id this.addForm.id = res.id
this.addForm.content = '' this.addForm.content = ''
return return
...@@ -526,13 +583,15 @@ export default { ...@@ -526,13 +583,15 @@ export default {
}) })
this.$refs.welcome.updateList(previewList) this.$refs.welcome.updateList(previewList)
} }
} this.$nextTick(() => {
this.saveStatus = false
this.previewListStart = this.$common.utils.deepClone(this.$refs.welcome.previewList)
}) })
} }
})
},
}, },
mounted() { mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.findConfig() this.findConfig()
} }
} }
...@@ -552,7 +611,7 @@ export default { ...@@ -552,7 +611,7 @@ export default {
} }
.welcome-panel { .welcome-panel {
margin: 10px; margin: 10px;
padding: 0px 20px 20px; padding: 0px 42px 20px;
.welcome-switch { .welcome-switch {
margin-bottom: 20px; margin-bottom: 20px;
label { label {
...@@ -765,6 +824,11 @@ export default { ...@@ -765,6 +824,11 @@ export default {
margin-right: 20px; margin-right: 20px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
img {
width: 14px;
height: 14px;
vertical-align: middle;
}
&.is-require { &.is-require {
&::before { &::before {
content: '*'; content: '*';
...@@ -905,6 +969,7 @@ export default { ...@@ -905,6 +969,7 @@ export default {
color: #5850ff; color: #5850ff;
line-height: 40px; line-height: 40px;
height: 40px; height: 40px;
margin: 8px 0px;
span { span {
cursor: pointer; cursor: pointer;
} }
......
...@@ -54,13 +54,14 @@ ...@@ -54,13 +54,14 @@
</div> </div>
</div> </div>
<div class="safe-upload-panel" id="drop_area"> <div class="safe-upload-panel" id="drop_area">
<el-upload action="" class="image-uploader" :before-upload="uploadFile"> <div class="image-uploader">
<input type="file" style="opacity: 0" ref="file" accept="*" @change="changeInput" />
<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> </div>
<div class="safe-upload-tips">点击或将文件拖拽到这里{{ importName ? '重新' : '' }}上传</div> <div class="safe-upload-tips">点击或将文件拖拽到这里{{ importName ? '重新' : '' }}上传</div>
<div class="safe-upload-xl" v-if="importName">{{ importName }}</div> <div class="safe-upload-xl" v-if="importName">{{ importName }}</div>
<div class="safe-upload-xl">支持扩展名:.xls .xlsl</div> <div class="safe-upload-xl">支持扩展名:.xls .xlsx</div>
<div class="safe-upload-link" @click="downloadModel">下载模版</div> <div class="safe-upload-link" @click="downloadModel">下载模版</div>
</div> </div>
<div class="safe-upload-footer"> <div class="safe-upload-footer">
...@@ -141,14 +142,16 @@ export default { ...@@ -141,14 +142,16 @@ export default {
this.$refs.carousel.handleMouseEnter = () => {} this.$refs.carousel.handleMouseEnter = () => {}
}, },
goBack() { goBack() {
this.$router.push('/square/index') this.$router.go(-1)
}, },
downloadModel() { downloadModel() {
this.$apis.square.downloadModel({}).then(res => { this.$apis.square.downloadModel({}).then(res => {
if (res) {
const link = document.createElement('a') const link = document.createElement('a')
link.setAttribute('href', res) //设置下载文件的url地址 link.setAttribute('href', res) //设置下载文件的url地址
//link.setAttribute('download', 'download'); //用于设置下载文件的文件名 //link.setAttribute('download', 'download'); //用于设置下载文件的文件名
link.click() link.click()
}
}) })
}, },
enentDrop(e) { enentDrop(e) {
...@@ -163,6 +166,9 @@ export default { ...@@ -163,6 +166,9 @@ export default {
console.log(fileData[1]) console.log(fileData[1])
this.uploadFile(fileData[0]) this.uploadFile(fileData[0])
}, },
changeInput(e) {
this.uploadFile(e.target.files[0])
},
uploadFile(e) { uploadFile(e) {
let AllImgExt = '.xls|.xlsx' let AllImgExt = '.xls|.xlsx'
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase() let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
...@@ -183,6 +189,7 @@ export default { ...@@ -183,6 +189,7 @@ export default {
this.$apis.common.pictureUpload({ file: fileInfo }).then(res => { this.$apis.common.pictureUpload({ file: fileInfo }).then(res => {
this.fileInfo = res this.fileInfo = res
this.importName = e.name this.importName = e.name
this.$refs.file.value = ''
}) })
} }
} else { } else {
...@@ -310,6 +317,19 @@ export default { ...@@ -310,6 +317,19 @@ export default {
font-weight: 700; font-weight: 700;
} }
.image-uploader { .image-uploader {
position: relative;
height: 40px;
display: flex;
margin: 20px 0px;
justify-content: center;
input {
cursor: pointer;
position: absolute;
top: 0px;
width: 35px;
height: 35px;
font-size: 0px;
}
/deep/ { /deep/ {
.el-upload-list { .el-upload-list {
display: none; display: none;
...@@ -336,7 +356,6 @@ export default { ...@@ -336,7 +356,6 @@ export default {
border: 1px solid rgba(0, 0, 0, 0.15); border: 1px solid rgba(0, 0, 0, 0.15);
text-align: center; text-align: center;
.safe-upload-icon { .safe-upload-icon {
margin: 20px 0px;
i { i {
font-size: 35px; font-size: 35px;
color: #5850ff; color: #5850ff;
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<div class="squre-main"> <div class="squre-main">
<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>
<div class="squre-success-tips">提交成功</div> <div class="squre-success-tips">提交成功</div>
<div class="squre-success-content">所提交的数据已经过加密,并安全存储专属加密区。</div> <div class="squre-success-content">所提交的数据已经过加密,并安全存储专属加密区。</div>
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,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">{{ detailInfo.waitAddEntmicroNumber }}人</div> <div class="custom-count-num" @click="jumpDetail">{{ 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">{{ detailInfo.waitAddEntmicroTotal }}人</div> <div class="custom-count-num" @click="jumpDetail">{{ detailInfo.waitAddEntmicroTotal }}人</div>
</div> </div>
</div> </div>
<div class="custom-wrap-content">当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。</div> <div class="custom-wrap-content">当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。</div>
...@@ -56,11 +56,11 @@ ...@@ -56,11 +56,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">{{ detailInfo.waitRenewalNumber }}人</div> <div class="custom-count-num" @click="jumpDetail">{{ 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">{{ detailInfo.waitTotal }}人</div> <div class="custom-count-num" @click="jumpDetail">{{ detailInfo.waitTotal }}人</div>
</div> </div>
</div> </div>
<div class="custom-wrap-content">提前给车险快到期的用户自动推荐适合该客户的优惠服务,提高客户续保率。</div> <div class="custom-wrap-content">提前给车险快到期的用户自动推荐适合该客户的优惠服务,提高客户续保率。</div>
...@@ -69,18 +69,18 @@ ...@@ -69,18 +69,18 @@
</div> </div>
<div class="custom-wrap-item"> <div class="custom-wrap-item">
<div class="custom-wrap-itemBox"> <div class="custom-wrap-itemBox">
<div class="custom-wrap-title">待定保客户</div> <div class="custom-wrap-title">待首保客户</div>
<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">{{ detailInfo.waitRegularMaintainNumber }}人</div> <div class="custom-count-num" @click="jumpDetail">{{ 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">{{ detailInfo.waitRegularMaintainTotal }}人</div> <div class="custom-count-num" @click="jumpDetail">{{ detailInfo.waitRegularMaintainTotal }}人</div>
</div> </div>
</div> </div>
<div class="custom-wrap-content">智能提醒用户定期保养,推荐保养项目和优惠活动,提高用户返店率。</div> <div class="custom-wrap-content">智能提醒用户回店首保,提高用户返店率。</div>
<div class="custom-wrap-config">敬请期待</div> <div class="custom-wrap-config">敬请期待</div>
</div> </div>
</div> </div>
...@@ -104,6 +104,9 @@ export default { ...@@ -104,6 +104,9 @@ export default {
jumpDrainage() { jumpDrainage() {
this.$router.push('/square/drainage') this.$router.push('/square/drainage')
}, },
jumpDetail() {
// this.$router.push('/square/customDetail')
},
importsKey() { importsKey() {
this.importData = this.$store.getters.square.importData this.importData = this.$store.getters.square.importData
let { id } = this.$route.params let { id } = this.$route.params
...@@ -253,6 +256,7 @@ export default { ...@@ -253,6 +256,7 @@ export default {
font-weight: 500; font-weight: 500;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
line-height: 34px; line-height: 34px;
cursor: pointer;
} }
} }
.custom-wrap-content { .custom-wrap-content {
......
...@@ -9,15 +9,30 @@ ...@@ -9,15 +9,30 @@
<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">{{ countAll.totalCount }}</div> <div class="square-num-count">
<span class="detail-content">
{{ countAll.totalCount }}
<GLButton @click="jumpDetail" class="detail-btn" fn="客户明细" mode="label"></GLButton>
</span>
</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">{{ countAll.qyCount }}</div> <div class="square-num-count">
<span class="detail-content">
{{ countAll.qyCount }}
<GLButton @click="jumpDetail" class="detail-btn" fn="客户明细" mode="label"></GLButton>
</span>
</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">{{ countAll.magicCount }}</div> <div class="square-num-count">
<span class="detail-content">
{{ countAll.magicCount }}
<GLButton @click="jumpDetail" class="detail-btn" fn="客户明细" mode="label"></GLButton>
</span>
</div>
</div> </div>
</div> </div>
<div class="square-title">客户分群营销</div> <div class="square-title">客户分群营销</div>
...@@ -28,11 +43,16 @@ ...@@ -28,11 +43,16 @@
<echart-circle bgColor="#6395FA" coustomId="coustomId_1" :lineData="[countAll.unQyCount, countAll.totalCount - countAll.unQyCount]"></echart-circle> <echart-circle bgColor="#6395FA" coustomId="coustomId_1" :lineData="[countAll.unQyCount, countAll.totalCount - countAll.unQyCount]"></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">{{ countAll.unQyCount }}/{{ countAll.totalCount }}</div> <div class="coustom-echart-num">
<span class="detail-content">
{{ countAll.unQyCount }}/{{ countAll.totalCount }}
<GLButton @click="jumpDetail" class="detail-btn" fn="客户明细" mode="label"></GLButton>
</span>
</div>
</div> </div>
</div> </div>
<div class="coustom-box-content">当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。</div> <div class="coustom-box-content">当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。</div>
<div class="coustom-box-config" @click="jumpDrainage">营销配置</div> <GLButton class="coustom-box-config" @click="jumpDrainage" fn="客户引流企微" mode="div">营销配置</GLButton>
</div> </div>
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">信息待完善客户</div> <div class="coustom-box-title">信息待完善客户</div>
...@@ -40,11 +60,16 @@ ...@@ -40,11 +60,16 @@
<echart-circle bgColor="#5AD8A6" coustomId="coustomId_2" :lineData="[countAll.unInfoCount, countAll.totalCount - countAll.unInfoCount]"></echart-circle> <echart-circle bgColor="#5AD8A6" coustomId="coustomId_2" :lineData="[countAll.unInfoCount, countAll.totalCount - countAll.unInfoCount]"></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">{{ countAll.unInfoCount }}/{{ countAll.totalCount }}</div> <div class="coustom-echart-num">
<span class="detail-content">
{{ countAll.unInfoCount }}/{{ countAll.totalCount }}
<GLButton @click="jumpDetail" class="detail-btn" fn="客户明细" mode="label"></GLButton>
</span>
</div>
</div> </div>
</div> </div>
<div class="coustom-box-content">当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。</div> <div class="coustom-box-content">当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。</div>
<div class="coustom-box-config" @click="jumpFriend">营销配置</div> <GLButton class="coustom-box-config" @click="jumpFriend" fn="客户资料跟进" mode="div">营销配置</GLButton>
</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,7 +77,12 @@ ...@@ -52,7 +77,12 @@
<echart-circle bgColor="#5D7092" coustomId="coustomId_3" :lineData="[countAll.unRenewCount, countAll.totalCount - countAll.unRenewCount]"></echart-circle> <echart-circle bgColor="#5D7092" coustomId="coustomId_3" :lineData="[countAll.unRenewCount, countAll.totalCount - countAll.unRenewCount]"></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">{{ countAll.unRenewCount }}/{{ countAll.totalCount }}</div> <div class="coustom-echart-num">
<span class="detail-content">
{{ countAll.unRenewCount }}/{{ countAll.totalCount }}
<GLButton @click="jumpDetail" class="detail-btn" fn="客户明细" mode="label"></GLButton>
</span>
</div>
</div> </div>
</div> </div>
<div class="coustom-box-content">提前给车险快到期的用户自动推荐适合该客户的优惠服务,提高客户续保率。</div> <div class="coustom-box-content">提前给车险快到期的用户自动推荐适合该客户的优惠服务,提高客户续保率。</div>
...@@ -64,7 +94,12 @@ ...@@ -64,7 +94,12 @@
<echart-circle bgColor="#5B8FF9" coustomId="coustomId_4" :lineData="[countAll.unRegularCount, countAll.totalCount - countAll.unRegularCount]"></echart-circle> <echart-circle bgColor="#5B8FF9" coustomId="coustomId_4" :lineData="[countAll.unRegularCount, countAll.totalCount - countAll.unRegularCount]"></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">{{ countAll.unRegularCount }}/{{ countAll.totalCount }}</div> <div class="coustom-echart-num">
<span class="detail-content">
{{ countAll.unRegularCount }}/{{ countAll.totalCount }}
<GLButton @click="jumpDetail" class="detail-btn" fn="客户明细" mode="label"></GLButton>
</span>
</div>
</div> </div>
</div> </div>
<div class="coustom-box-content">智能提醒用户回店首保,提高用户返店率。</div> <div class="coustom-box-content">智能提醒用户回店首保,提高用户返店率。</div>
...@@ -74,10 +109,10 @@ ...@@ -74,10 +109,10 @@
<div class="square-tabel scrm-box-f"> <div class="square-tabel scrm-box-f">
<div class="square-tabel-form"> <div class="square-tabel-form">
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="120px"> <el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="120px">
<el-button size="small" type="primary" @click="handleImport"> <GLButton size="small" type="primary" @click="handleImport" fn="魔方导入">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
导入魔方 导入魔方
</el-button> </GLButton>
<el-form-item size="small" label="导入时间"> <el-form-item size="small" label="导入时间">
<el-date-picker :picker-options="pickerOptions" v-model="createTime" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始时间" end-placeholder="结束时间"></el-date-picker> <el-date-picker :picker-options="pickerOptions" v-model="createTime" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始时间" end-placeholder="结束时间"></el-date-picker>
</el-form-item> </el-form-item>
...@@ -88,14 +123,21 @@ ...@@ -88,14 +123,21 @@
</el-form> </el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="importNumber" slot-scope="scope"> <div slot="importNumber" slot-scope="scope">
<div class="number-form"><span>{{ scope.scope.entmicroNumber }}</span> | <span>{{ scope.scope.importNumber }}</span></div> <div class="number-form">
<span>{{ scope.scope.entmicroNumber }}</span>
|
<span>{{ scope.scope.importNumber }}</span>
</div>
</div> </div>
<div slot="newCostomerNumber" slot-scope="scope"> <div slot="newCostomerNumber" slot-scope="scope">
<div class="number-form"><span>{{ scope.scope.newCustomerNumber }}</span> | <span>{{ scope.scope.importNumber }}</span> <div class="number-form">
<span>{{ scope.scope.newCustomerNumber }}</span>
|
<span>{{ scope.scope.importNumber }}</span>
</div> </div>
</div> </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> <GLButton type="text" @click="handleDetail(scope.scope)" fn="魔方导入结果">详情</GLButton>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -174,8 +216,7 @@ export default { ...@@ -174,8 +216,7 @@ export default {
}, },
{ {
label: '导入人员', label: '导入人员',
prop: 'importStaffName', prop: 'importStaffName'
width: '130px'
}, },
{ {
label: '操作', label: '操作',
...@@ -207,9 +248,6 @@ export default { ...@@ -207,9 +248,6 @@ export default {
}, },
methods: { methods: {
importsCount() { importsCount() {
let params = {
merchantId: '1'
}
this.$apis.square.importsCount({}).then(res => { this.$apis.square.importsCount({}).then(res => {
console.log(res) console.log(res)
this.countAll = res this.countAll = res
...@@ -235,6 +273,9 @@ export default { ...@@ -235,6 +273,9 @@ export default {
handleImport() { handleImport() {
this.$router.push('/square/import') this.$router.push('/square/import')
}, },
jumpDetail() {
// this.$router.push('/square/customDetail')
},
findLogin() { findLogin() {
this.$apis.square.findLoginCount({ loginType: 1005 }).then(res => { this.$apis.square.findLoginCount({ loginType: 1005 }).then(res => {
if (res) { if (res) {
...@@ -251,6 +292,26 @@ export default { ...@@ -251,6 +292,26 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.detail-content {
position: relative;
}
.detail-btn {
display: inline-block;
position: absolute;
cursor: pointer;
opacity: 0;
width: 100%;
height: 100%;
left: 0px;
top: 0px;
}
.detail-btn::after {
content: '';
position: absolute;
width: 100%;
height: 100%;
background: brown;
}
.number-form { .number-form {
span { span {
display: inline-block; display: inline-block;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!