Commit 396e1482 by 前端

Merge branch 'v2.6.0' into 'master'

fixed

See merge request !34
2 parents fbad4209 93e83550
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.3.7", "glsx-components": "^1.4.2",
"glsx-table": "^1.0.9", "glsx-table": "^1.0.9",
"vue-draggable-resizable": "^2.3.0", "vue-draggable-resizable": "^2.3.0",
"vuedraggable": "^2.24.3", "vuedraggable": "^2.24.3",
......
import { http } from '@/main'
// 获取客户列表
const getCustomerListApi = params => {
params.method = 'entmicro.api.customer.page'
params.source = 'scrm-home'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 标签获取客户列表
const getCustomerByTagListApi = params => {
params.method = 'entmicro.api.customer.getCustomerPageByTag'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 人群获取客户列表
const getCustomerCrowdApi = params => {
params.method = 'entmicro.api.customer.crowd.page'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getSopInfoListApi = params => {
params.method = 'scrm.api.sop.sopInfo.listWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop基本信息
const getSopBaseInfoApi = params => {
params.method = 'scrm.api.sop.sopInfo.getBaseBySopId'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
//sop分析-触达率-筛选框
const getEventListApi = params => {
params.method = 'scrm.api.sop.sopEvent.listWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop分析-触达率列表
const getSopCustomerStatisticsListApi = params => {
params.method = 'scrm.api.sop.sopCustomer.listStatisticsWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop分析-员工完成率列表
const getSopStaffTaskListApi = params => {
params.method = 'scrm.api.sop.staffTaskStatistics.listWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop-完成率-根据evnetid获取失败事件列表
const getFailEventList = params => {
params.method = 'scrm.api.sop.sopEvent.listEventFailByEventId'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 校验当前商户的企微群发任务情况
const getTaskStatusApi = params => {
params.method = 'scrm.api.sop.task.merchantWWMsgTaskStatusCheck'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop营销事件次数分析
const parseEventCountApi = params => {
params.method = 'scrm.api.sop.sopEvent.parseEventCount'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 删除sop事件
const deleteSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.delete'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 结束sop事件
const endSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.updateEndStatus'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 事件进行中,修改sop事件列表
// const insertOrUpdateSopEventApi = params => {
// params.method = 'scrm.api.sop.sopEvent.insertOrUpdate'
// return http({
// url: 'rop-scrm-sop/router',
// method: 'POST',
// data: params,
// sign: true,
// returnAll: true
// })
// }
// 事件进行中,批量编辑sop
const batchEditSopEventApi = params => {
params.method = 'scrm.api.sop.sopEvent.batchEdit'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 新增或者事件未开始,新增/修改sop
const insertOrUpdateSopApi = params => {
params.method = 'scrm.api.sop.sopInfo.insertOrUpdate'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const getSopInfoDetailApi = params => {
params.method = 'scrm.api.sop.sopInfo.getDetailBySopId'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材组列表
const getGroupListApi = params => {
params.method = 'marketing.api.material.group.list'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材列表
const getMaterialListApi = params => {
// params.method = 'marketing.api.material.page'
params.method = 'marketing.api.material.sop.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 朋友圈模板
const getMomentListApi = params => {
params.method = 'marketing.api.moment.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCustomerListApi, getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getFailEventList, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi }
<template>
<div class="full-container">
<el-tooltip placement="top" v-if="hoverStatus">
<div slot="content">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
<div :class="['full-text', identification]" :style="{ width: labelWidth + 'px' }" @mouseenter="hoverFun" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
{{ label }}
</el-tag>
</div>
<div v-if="textType != 'text' && haveClose" @mouseenter="hoverFun">
<el-tag class="tag-user-closable" :style="{ 'max-width': labelWidth + 'px' }" type="info" :disable-transitions="false" closable @close="handleRemove">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
<span :class="['full-text-user', { 'user-icon-checked': textType == 'user' && haveClose }, identification]">{{ label }}</span>
</el-tag>
</div>
<div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
</el-tooltip>
<template v-else>
<div :class="['full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px' }" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
{{ label }}
</el-tag>
</div>
<div @mouseenter="hoverFun" v-if="textType != 'text' && haveClose">
<el-tag class="tag-user-closable" type="info" :style="{ 'max-width': labelWidth + 'px' }" :disable-transitions="false" closable @close="handleRemove">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
<span :class="['full-text-user', identification]">{{ label }}</span>
</el-tag>
</div>
<div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'GLFull',
data() {
return {
hoverStatus: false
}
},
props: {
//唯一标识
identi: {
type: String,
default: 'identi'
},
//文本
label: {
type: String,
default: ''
},
//文本宽度
labelWidth: {
type: Number,
default: 100
},
//行数
line: {
type: Number,
default: 0
},
textType: {
type: String,
default: 'text', // text 文本 user 跟进员工 tag 标签
validator: function(value) {
return ['text', 'user', 'tag'].indexOf(value) !== -1
}
},
//是否包含关闭按钮
haveClose: {
type: Boolean,
default: false
}
},
computed: {
identification() {
return 'text_' + this.identi
}
},
methods: {
hoverFun() {
if (this.haveClose) {
//this.hoverStatus = this.identi ? document.querySelector(`.${this.identification}`).scrollWidth > document.querySelector(`.${this.identification}`).offsetWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth - 30
this.hoverStatus = document.querySelector(`.${this.identification}`).scrollWidth > document.querySelector(`.${this.identification}`).offsetWidth
} else {
let widthMuti = this.textType == 'user' ? 17 : this.textType == 'tag' ? 20 : 0
// this.hoverStatus = this.identi ? document.querySelector(`.${this.identification}`).scrollWidth - widthMuti > this.labelWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth
this.hoverStatus = document.querySelector(`.${this.identification}`).scrollWidth - widthMuti > this.labelWidth
}
console.log(this.hoverStatus)
},
handleRemove() {
this.$emit('handleRemove')
}
}
}
</script>
<style scoped lang="scss">
.full-container {
display: inline-block;
/deep/ {
.el-tag {
height: 26px;
line-height: 26px;
}
}
}
.full-text {
max-width: 100%;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.full-text-user {
max-width: calc(100% - 14px);
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
&.user-icon-checked {
max-width: calc(100% - 30px);
}
}
.tag-user-closable {
display: flex;
align-items: center;
/deep/ {
.el-icon-close {
margin-top: 2px;
}
}
}
.full-text-line {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
word-break: break-all;
}
.el-icon-user-solid {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
</style>
<template>
<div class="collect-panel" :style="{ display }" v-stat="dataAnalyics">
<slot></slot>
</div>
</template>
<script>
import Vue from 'vue'
export default {
name: 'collect-form',
data() {
return {}
},
props: {
dataAnalyics: Object,
display: {
type: String,
default: 'inline-block'
}
},
directives: {
stat: function(el, binding, vnode) {
el.addEventListener('click', () => {
const datajson = binding.value
Vue.prototype.$tracker.track(datajson)
})
}
}
}
</script>
<!-- 弹窗 -->
<template>
<div>
<el-dialog :title="title" :top="top" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :modal-append-to-body="false" :width="width">
<el-scrollbar v-if="hasScroll">
<span slot="title">
<span class="main-title">{{ title }}</span>
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
</el-scrollbar>
<template v-if="!hasScroll">
<span slot="title">
<span class="main-title">{{ title }}</span>
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
</template>
<div slot="footer">
<slot name="btn-start"></slot>
<el-button :type="typeName" v-if="!noClose" :size="btnSize" @click="handleClose">{{ btnCloseLabel }}</el-button>
<el-button type="default" v-if="!noCancel" :size="btnSize" @click="handleClose">{{ btnCancelLabel }}</el-button>
<el-button type="primary" v-if="!noBtnOk" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button>
<slot name="btn-middle"></slot>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'glsx-dialog',
data() {
return {}
},
props: {
hasScroll: {
type: Boolean,
default: true
},
title: {
type: String,
default: ''
},
isVisible: {
type: Boolean,
default: false
},
showClose: {
type: Boolean,
default: false
},
btnCloseLabel: {
type: String,
default: '关闭'
},
btnOkLabel: {
type: String,
default: '确定'
},
btnCancelLabel: {
type: String,
default: '取消'
},
noBtnOk: {
type: Boolean,
default: false
},
noCancel: {
type: Boolean,
default: false
},
noClose: {
type: Boolean,
default: true
},
typeName: {
type: String,
default: 'default'
},
// modalAppendToBody:{
// type: Boolean,
// default: false
// },
width: {
type: String,
default: '580px'
},
btnSize: {
type: String,
default: 'small'
}
},
methods: {
handleClose() {
this.$emit('closeDialog')
},
handleConfirm() {
this.$emit('confirmDialog')
}
}
}
</script>
<style lang="scss">
.dialog-sub-title {
font-size: 12px;
color: #666666;
}
// ::v-deep .el-dialog__body {
// border-top: 1px solid #e6e6e6;
// border-bottom: 1px solid #e6e6e6;
// padding: 20px 25px;
// }
// .el-dialog-div {
// height: 60vh;
// overflow: auto;
// }
// .app-dialog {
// // .el-dialog__header {
// // padding: 15px;
// // }
// .el-dialog__body {
// border-top: 1px solid #eaeefb;
// border-bottom: 1px solid #eaeefb;
// }
// .el-dialog__footer {
// padding: 15px;
// // .el-button--small {
// // padding: 9px 21px;
// // font-size: 14px;
// // border-radius: 4px;
// // }
// }
// }
</style>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<span v-else>{{ 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-if="item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link> <el-link v-else-if="item.type == 'nickname' || item.type == 'acivity' || item.type == 'material'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
</div> </div>
</div> </div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel> <ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel>
<!-- <material-model v-if="isMaterialVisible" :isMaterialVisible.sync="isMaterialVisible" @handleMaterialConfirm="handleMaterialConfirm" @handleMaterialClose="handleMaterialClose"></material-model> -->
</div> </div>
</template> </template>
<script> <script>
...@@ -77,6 +78,7 @@ const ATT_TYPE = { ...@@ -77,6 +78,7 @@ const ATT_TYPE = {
} }
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
import ActivityModel from './activityModel' import ActivityModel from './activityModel'
// import materialModel from './materialModel'
import Emotion from './emotionWords' import Emotion from './emotionWords'
import wTextarea from './tag-textarea' import wTextarea from './tag-textarea'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
...@@ -84,6 +86,7 @@ export default { ...@@ -84,6 +86,7 @@ export default {
name: 'WelcomeWords', name: 'WelcomeWords',
components: { components: {
ActivityModel, ActivityModel,
// materialModel,
Emotion, Emotion,
wTextarea wTextarea
}, },
...@@ -92,6 +95,7 @@ export default { ...@@ -92,6 +95,7 @@ export default {
return { return {
loading: false, loading: false,
emotionStatus: false, emotionStatus: false,
isMaterialVisible: false,
btnList: [ btnList: [
{ {
id: 1, id: 1,
...@@ -113,6 +117,12 @@ export default { ...@@ -113,6 +117,12 @@ export default {
type: 'nickname', type: 'nickname',
funName: 'nickname' funName: 'nickname'
}, },
// {
// id: 5,
// name: '素材',
// type: 'material',
// funName: 'material'
// },
{ {
id: 4, id: 4,
name: '活动', name: '活动',
...@@ -229,11 +239,33 @@ export default { ...@@ -229,11 +239,33 @@ export default {
}) })
} }
}, },
// 素材
handleMaterialConfirm(val) {
console.log(val)
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
// objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动,10-素材)
this.editForm.object = JSON.parse(JSON.stringify(val))
this.editRule.eventContent[0].required = true
this.editForm.pushChannelType = ''
this.previewList = [
{
attContent: val,
additionalType: val.additionalType
}
]
this.handleMaterialClose()
},
handleMaterialClose() {
this.isMaterialVisible = !this.isMaterialVisible
},
handleFun(name) { handleFun(name) {
if (name == 'nickname') { if (name == 'nickname') {
this.$refs.textContent.addTag('@昵称') this.$refs.textContent.addTag('@昵称')
} else if (name == 'activity') { } else if (name == 'activity') {
this.$refs.activity.init() this.$refs.activity.init()
} else if (name == 'material') {
this.handleMaterialClose()
} }
}, },
close(index) { close(index) {
...@@ -304,7 +336,7 @@ export default { ...@@ -304,7 +336,7 @@ export default {
} }
} }
}, },
changeInput: utils.debounce(function () { changeInput: utils.debounce(function() {
console.log(document.getElementById('editor').childNodes) console.log(document.getElementById('editor').childNodes)
var allNodes = document.getElementById('editor').childNodes var allNodes = document.getElementById('editor').childNodes
var str = '' var str = ''
...@@ -324,7 +356,7 @@ export default { ...@@ -324,7 +356,7 @@ 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) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) {
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1 let index = parseInt(list.indexOf(word)) + 1
......
...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(cfg) return Promise.resolve(cfg)
} }
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config') return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
// return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config') // return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
} }
export const config = { export const config = {
......
...@@ -3,12 +3,16 @@ import Vue from 'vue' ...@@ -3,12 +3,16 @@ import Vue from 'vue'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLTable, GLButton, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLTable, GLButton, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import collectForm from '@/components/collectForm'
import GLFull from '@/components/GLFull'
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) Vue.use(GLFooter)
Vue.use(GLCombiForm) Vue.use(GLCombiForm)
Vue.component('GLFull', GLFull)
Vue.component(collectForm.name, collectForm)
// 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'
...@@ -23,6 +27,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -23,6 +27,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
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.$tracker = common.tracker
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_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 } })
......
...@@ -17,6 +17,16 @@ const render = (base, routes) => { ...@@ -17,6 +17,16 @@ const render = (base, routes) => {
routes, routes,
mode: 'history' mode: 'history'
}) })
// router.beforeEach((to, from, next) => {
// const pageName = to.meta.title
// Vue.prototype.$tracker.track(
// {
// pageName
// },
// 'pv'
// )
// next()
// })
router.afterEach(() => { router.afterEach(() => {
document.querySelector('#app').scrollTop = 0 document.querySelector('#app').scrollTop = 0
}) })
......
...@@ -35,10 +35,15 @@ ...@@ -35,10 +35,15 @@
<div class="form-tips">自动为通过该活码添加的客户打上所选标签</div> <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 v-for="(item, index) in tagging">
<div v-for="(tag, idx) in item.labelList" :key="idx">
<GLFull :labelWidth="150" :idx="idx" @handleRemove="removeTag(item, idx, index)" :identi="`node_${tag.id}`" :label="tag.name" :haveClose="true" textType="tag"></GLFull>
</div>
</template> </template>
</template> </template>
</div> </div>
...@@ -59,10 +64,13 @@ ...@@ -59,10 +64,13 @@
</span> </span>
<div class="form-tips">客户扫码后将添加所选专员为好友,选择多名专员则按ABAB的顺序添加客户</div> <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>
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag> -->
<div v-for="(tag, idx) in staffInfo" :key="idx">
<GLFull :labelWidth="150" @handleRemove="removeStaff(idx)" :identi="`node_${idx}`" :label="tag.staffName" :haveClose="true" textType="user"></GLFull>
</div>
</div> </div>
<div class="el-form-item__error" v-if="staffStatus">请选择专员</div> <div class="el-form-item__error" v-if="staffStatus">请选择专员</div>
</div> </div>
...@@ -83,8 +91,7 @@ ...@@ -83,8 +91,7 @@
</div> </div>
</div> </div>
</div> </div>
<GLFooter <GLFooter>
>
<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>
</GLFooter> </GLFooter>
...@@ -181,8 +188,8 @@ export default { ...@@ -181,8 +188,8 @@ export default {
this.tagging.splice(index, 1) this.tagging.splice(index, 1)
} }
}, },
removeStaff(index) { removeStaff(idx) {
this.staffInfo.splice(index, 1) this.staffInfo.splice(idx, 1)
}, },
handleAddEmp() { handleAddEmp() {
this.staffStatus = false this.staffStatus = false
...@@ -202,7 +209,7 @@ export default { ...@@ -202,7 +209,7 @@ export default {
tagSelected(item) { tagSelected(item) {
this.tagging = item this.tagging = item
}, },
handleSave: utils.debounce(function () { handleSave: utils.debounce(function() {
if (this.staffInfo.length == 0) { if (this.staffInfo.length == 0) {
this.staffStatus = true this.staffStatus = true
return return
...@@ -250,6 +257,13 @@ export default { ...@@ -250,6 +257,13 @@ export default {
} }
return item return item
}) })
this.$tracker.track({
codeName: param.codeName,
staffInfo: this.staffInfo,
welcomeInfo: attachmentList,
pageName: this.codeId ? '活码编辑' : '新增活码',
name: '提交'
})
param.welcomeInfo = attachmentList param.welcomeInfo = attachmentList
this.$apis.channel[channel](param).then(res => { this.$apis.channel[channel](param).then(res => {
if (res) this.$router.push('/channel/index') if (res) this.$router.push('/channel/index')
...@@ -296,7 +310,7 @@ export default { ...@@ -296,7 +310,7 @@ export default {
this.previewListStart = this.$common.utils.deepClone(this.$refs.welcome.previewList) this.previewListStart = this.$common.utils.deepClone(this.$refs.welcome.previewList)
}) })
}) })
}, }
// resize() { // 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
...@@ -313,7 +327,7 @@ export default { ...@@ -313,7 +327,7 @@ export default {
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main-welcome { .channel-main-welcome {
...@@ -385,6 +399,7 @@ export default { ...@@ -385,6 +399,7 @@ export default {
outline: none; outline: none;
padding: 5px 5px 0px 5px; padding: 5px 5px 0px 5px;
max-height: 68px; max-height: 68px;
min-height: 40px;
overflow: auto; overflow: auto;
flex-wrap: wrap; flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
...@@ -393,6 +408,11 @@ export default { ...@@ -393,6 +408,11 @@ export default {
align-items: center; align-items: center;
margin-top: 6px; margin-top: 6px;
font-size: 14px; font-size: 14px;
> div {
height: 26px;
line-height: 26px;
margin: 0px 5px 5px 0px;
}
i { i {
color: #75acff; color: #75acff;
margin-right: 3px; margin-right: 3px;
...@@ -406,4 +426,4 @@ export default { ...@@ -406,4 +426,4 @@ export default {
margin-bottom: 5px; margin-bottom: 5px;
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :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">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="到店咨询客户数据">数据</GLButton> <collect-form :dataAnalyics="{ pageName: '渠道活码', codeId: scope.scope.id, name: '数据' }"><GLButton type="text" @click="handleDetail(scope.scope)" fn="到店咨询客户数据">数据</GLButton></collect-form>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="活码编辑">修改</GLButton> <collect-form :dataAnalyics="{ pageName: '渠道活码', codeId: scope.scope.id, name: '修改' }"><GLButton type="text" @click="handleEdit(scope.scope)" fn="活码编辑">修改</GLButton></collect-form>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<GLButton type="text" @click="handleAddPoster(scope.scope)" fn="活码海报">活码海报</GLButton> <collect-form :dataAnalyics="{ pageName: '渠道活码', codeId: scope.scope.id, name: '活码海报' }"><GLButton type="text" @click="handleAddPoster(scope.scope)" fn="活码海报">活码海报</GLButton></collect-form>
</div> </div>
<div slot="yesterdayNum" slot-scope="scope"> <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 class="link-dialog" @click="handleEmpDetail(scope.scope, 'day')" v-if="scope.scope.yesterdayNum">{{ scope.scope.yesterdayNum }}</div>
...@@ -48,7 +48,9 @@ ...@@ -48,7 +48,9 @@
<img :src="scope.scope.qrCode" style="width: 360px; height: 360px" /> <img :src="scope.scope.qrCode" style="width: 360px; height: 360px" />
<img :src="scope.scope.qrCode" style="width: 80px; height: 80px" slot="reference" /> <img :src="scope.scope.qrCode" style="width: 80px; height: 80px" slot="reference" />
</el-popover> </el-popover>
<div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div> <collect-form :dataAnalyics="{ qrCode: scope.scope.qrCode }" display="block">
<div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div>
</collect-form>
</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">
...@@ -140,7 +142,8 @@ export default { ...@@ -140,7 +142,8 @@ export default {
{ {
label: '活码', label: '活码',
prop: 'qrCode', prop: 'qrCode',
addHtml: 'qrCode' addHtml: 'qrCode',
width: '120px'
}, },
{ {
label: '标签', label: '标签',
......
...@@ -670,6 +670,13 @@ export default { ...@@ -670,6 +670,13 @@ export default {
} }
return item return item
}) })
this.$tracker.track({
selectType: this.selectType == 1 ? '通过标签筛选' : this.selectType == 2 ? '通过Excel导入' : '通过人群筛选',
marketInfo: `短信内容:${this.addForm.content},营销时间:${this.addForm.time},营销名称:${this.imName}`,
welcomeInfo: attachmentList,
pageName: '新增营销',
name: '提交'
})
params.welcomeInfo = attachmentList params.welcomeInfo = attachmentList
this.loading = true this.loading = true
this.$apis.marketing.exportAdd(params).then(res => { this.$apis.marketing.exportAdd(params).then(res => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!