Commit 17aa28c5 by 前端

Merge branch 'v2.7.0' into 'master'

V2.7.0

See merge request !1
2 parents cba65149 6c5b06a0
Showing 43 changed files with 525 additions and 854 deletions
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
"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.9", "glsx-common": "^1.4.9",
"glsx-components": "^1.4.2" "glsx-components": "^1.4.7",
"vuedraggable": "^2.24.3"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.5.0", "@vue/cli-plugin-babel": "^4.5.0",
......
...@@ -57,6 +57,16 @@ const activityGroupList = params => { ...@@ -57,6 +57,16 @@ const activityGroupList = params => {
sign: true sign: true
}) })
} }
//活动配置创建
const machetes = params => {
params.method = 'marketing.api.activity.customer.machetes'
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动配置编辑 //活动配置编辑
const activityUpdate = params => { const activityUpdate = params => {
...@@ -119,5 +129,6 @@ export default { ...@@ -119,5 +129,6 @@ export default {
activityInsert, activityInsert,
activityUpdate, activityUpdate,
queryCrowdGroupTree, queryCrowdGroupTree,
activityGroupList activityGroupList,
machetes
} }
...@@ -335,7 +335,27 @@ const followerType = params => { ...@@ -335,7 +335,27 @@ const followerType = params => {
sign: true 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
})
}
export default { export default {
customerList, customerList,
customerGroupList, customerGroupList,
...@@ -369,5 +389,7 @@ export default { ...@@ -369,5 +389,7 @@ export default {
templateDetail, templateDetail,
groupDetailUpdate, groupDetailUpdate,
findLordGroup, findLordGroup,
followerType followerType,
getGroupListApi,
getMaterialListApi
} }
import { http } from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
//权益卡
const getCard = 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 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 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 getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//套餐
const getPackage = params => {
params.method = 'scrm.api.equity.package.info.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
//秒杀活动
const getActivity = params => {
params.method = 'scrm.api.shopmall.activity.page'
return http({
url: 'rop-scrm-shopmall/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 templatePage = params => {
params.method = `${path}template.page.search`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板保存
const templateSave = params => {
params.method = `${path}template.save`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板更新
const templateUpdate = params => {
params.method = `${path}template.update`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板创建人
const createdNameList = params => {
params.method = `${path}template.created.name.list`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
getCard,
merchant,
getActivity,
getPackage,
getMerchant,
getCoupon,
merchantOpen,
getGroupListApi,
getMaterialListApi,
templatePage,
createdNameList,
templateUpdate,
templateSave
}
...@@ -101,7 +101,6 @@ img { ...@@ -101,7 +101,6 @@ img {
.scrm-box-f { .scrm-box-f {
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
} }
.scrm-flex { .scrm-flex {
......
export const Util = {
isShowBtn: function(value) {
let isShowStatus = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menuLevel(menu)
function menuLevel(item) {
item.forEach(itm => {
if (itm.path == value) {
isShowStatus = true
}
if (itm.children) {
menuLevel(itm.children)
}
})
}
return isShowStatus
}
}
<template> <template>
<div class="full-container"> <div class="full-container" v-bind="$attrs">
<el-tooltip placement="top" v-if="hoverStatus"> <el-tooltip placement="top" v-if="hoverStatus">
<div slot="content"> <div slot="content">
<template v-if="$slots.default && content">{{ content }}</template> <template v-if="$slots.default"><slot></slot></template>
<template v-else-if="$slots.default && !content"><slot></slot></template> <template v-else>
{{ label }}
</template>
</div>
<div :class="['full-text', identification]" :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>
<template v-if="$slots.default"><slot></slot></template>
<template v-else> <template v-else>
{{ content ? content : label }} {{ label }}
</template> </template>
</el-tag>
</div>
<div v-if="textType != 'text' && haveClose">
<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>
<div :class="[line ? 'full-text-line' : 'full-text']" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }"> <div :class="[line ? 'full-text-line' : 'full-text', identification]" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
<template v-if="$slots.default"><slot></slot></template> <template v-if="$slots.default"><slot></slot></template>
<template v-else> <template v-else>
{{ label }} {{ label }}
</template> </template>
</div> </div>
</el-tooltip> </el-tooltip>
<div :class="[line ? 'full-text-line' : 'full-text', identification]" v-else @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }"> <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>
<template v-if="$slots.default"><slot></slot></template> <template v-if="$slots.default"><slot></slot></template>
<template v-else> <template v-else>
{{ label }} {{ label }}
</template> </template>
</el-tag>
</div> </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> </div>
</template> </template>
<script> <script>
...@@ -28,35 +59,62 @@ export default { ...@@ -28,35 +59,62 @@ export default {
name: 'GLFull', name: 'GLFull',
data() { data() {
return { return {
hoverStatus: false hoverStatus: false,
identification: 'text_' + this.identi
} }
}, },
props: { props: {
identification: { //唯一标识
identi: {
type: String, type: String,
default: '' default: 'identi'
}, },
//文本
label: { label: {
type: String, type: String,
default: '' default: ''
}, },
content: { //文本宽度
type: String,
default: ''
},
labelWidth: { labelWidth: {
type: Number, type: Number,
default: 100 default: 100
}, },
//行数
line: { line: {
type: Number, type: Number,
default: 0 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
} }
}, },
methods: { methods: {
hoverFun() { hoverFun() {
console.log(document.querySelector(`.full-text`).scrollWidth) if (this.line > 1) {
this.hoverStatus = this.identification ? document.querySelector(`.${this.identification}`).scrollWidth > this.labelWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth this.hoverStatus = document.querySelector(`.${this.identification}`).scrollHeight - 10 > document.querySelector(`.${this.identification}`).offsetHeight
return
}
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(document.querySelector(`.${this.identification}`).scrollWidth)
}
},
handleRemove() {
this.$emit('handleRemove', this.$attrs)
} }
} }
} }
...@@ -66,10 +124,30 @@ export default { ...@@ -66,10 +124,30 @@ export default {
display: inline-block; display: inline-block;
} }
.full-text { .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; display: inline-block;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; 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 { .full-text-line {
display: -webkit-box; display: -webkit-box;
...@@ -78,4 +156,9 @@ export default { ...@@ -78,4 +156,9 @@ export default {
overflow: hidden; overflow: hidden;
word-break: break-all; word-break: break-all;
} }
.el-icon-user-solid {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
</style> </style>
...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) {
return Promise.resolve(cfg) return Promise.resolve(cfg)
} }
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/62ab1da70da5034a58680aa9/activity/cofing') return new Http({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/62ab1da70da5034a58680aa9/activity/cofing')
// return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config') //return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=activity').then(res => res.data)
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -12,9 +12,11 @@ import apis from './api' ...@@ -12,9 +12,11 @@ import apis from './api'
import './public-path' import './public-path'
// import './components' // import './components'
import filters from './utils/filters' import filters from './utils/filters'
import { Util } from './common/util'
import { start } from '@/setup' import { start } from '@/setup'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.$Utils = Util
//过滤器统一处理预加载 //过滤器统一处理预加载
Object.keys(filters).forEach(key => { Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key]) Vue.filter(key, filters[key])
......
...@@ -6,7 +6,7 @@ export default { ...@@ -6,7 +6,7 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
async queryCrowdGroupTree() { async queryCrowdGroupTree(isHead) {
let params = { let params = {
req: { req: {
pageSize: 1000, pageSize: 1000,
...@@ -16,7 +16,8 @@ export default { ...@@ -16,7 +16,8 @@ export default {
} }
} }
const crowdGroupUnitList = await this.$apis.activity.queryCrowdGroupTree(params) const crowdGroupUnitList = await this.$apis.activity.queryCrowdGroupTree(params)
return crowdGroupUnitList.crowdGroupUnitList console.log(crowdGroupUnitList)
return isHead ? [{ crowdGroupName: '默认客群', crowdGroupId: '0' }].concat(crowdGroupUnitList.crowdGroupUnitList) : crowdGroupUnitList.crowdGroupUnitList
}, },
async queryCrowdTree() { async queryCrowdTree() {
const commonParam = { pageSize: 1000, pageNum: 1, merchantId: this.$globalState.session.merchantId } const commonParam = { pageSize: 1000, pageNum: 1, merchantId: this.$globalState.session.merchantId }
......
...@@ -2,15 +2,19 @@ import Vue from 'vue' ...@@ -2,15 +2,19 @@ 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, GLButton, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLTable, GLButton, GLCombiForm, GLFooter, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLFull from '@/components/GLFull' import GLFull from '@/components/GLFull'
import collectButton from '@/components/collect-button' import collectButton from '@/components/collect-button'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
import GLEditor from 'glsx-components/src/packages/Editor' //权限按钮 (根据权限动态创建)
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.use(GLEditor)
Vue.use(GLDialog)
Vue.component(collectButton.name, collectButton) Vue.component(collectButton.name, collectButton)
Vue.component('GLFull', GLFull) Vue.component('GLFull', GLFull)
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
......
let util = {} let util = {}
util.openUrl = function(url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
export default util export default util
<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>
<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;
line-height: 23px;
/deep/ {
img {
width: 24px;
-webkit-user-select: none;
cursor: default;
pointer-events: none;
}
}
}
</style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</div> </div>
<div class="market-title">营销内容</div> <div class="market-title">营销内容</div>
<div class="market-content" v-if="drawer"> <div class="market-content" v-if="drawer">
<WelcomeWords ref="welcome" :form="'customer'" :btnList="btnList" :eventBus="eventBus"></WelcomeWords> <GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div> </div>
</div> </div>
<div class="drawer-btn"> <div class="drawer-btn">
...@@ -21,13 +21,18 @@ ...@@ -21,13 +21,18 @@
</template> </template>
<script> <script>
import WelcomeWords from './welcomeWords.vue' const ATT_TYPE = {
import Vue from 'vue' TEXT: 1,
IMAGE: 2,
VEDIO: 3,
URL: 4,
MINIPROGRAM: 5,
FILE: 6,
ACTIVITY: 7,
MATERIAL: 10
}
export default { export default {
name: 'marketConfig', name: 'marketConfig',
components: {
WelcomeWords
},
props: { props: {
title: { title: {
type: String, type: String,
...@@ -40,54 +45,158 @@ export default { ...@@ -40,54 +45,158 @@ export default {
}, },
data() { data() {
return { return {
eventBus: new Vue(),
drawer: false, drawer: false,
welcomeStatus: false, welcomeStatus: false,
btnList: [ btnList: [
{ {
id: 1,
name: '表情', name: '表情',
funcName: '', funcName: '',
type: 'expression', type: 'expression',
limitSize: 10 limitSize: 10
}, },
{ {
id: 2,
name: '图片', name: '图片',
funcName: '', funcName: '',
type: 'img', type: 'img',
limitSize: 10 // togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
}, },
// { // {
// id: 3, // name: '视频',
// funcName: '',
// type: 'video',
// // limitSize: 10,//限制视频大小
// // togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// // limitNum: 2,//限制视频数量
// // limitWidth: 10000,//限制视频宽度
// // limitHeight: 10000,//限制视频高度
// // limitTime: 2,//限制视频时长
// uploadApi: this.$apis.common.pictureUpload
// },
// {
// name: '昵称', // name: '昵称',
// type: 'nickname', // type: 'nickname',
// funName: 'nickname' // funName: 'nickname'
// }, // },
{ {
id: 4,
name: '活动', name: '活动',
type: 'acivity', type: 'activity',
funName: 'activity' funName: 'activity',
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {}
}, },
{ {
id: 5, itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid'
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
activityStatus: 2,
currentPage: 1
}
},
{
itemName: '无忧服务',
itemValue: 6,
itemType: 'merchant',
getInterfaceApi: this.$apis.welcomeword.merchant,
merchantOpen: {
merchantOpenApi: this.$apis.welcomeword.merchantOpen,
params: {
merchantId: this.$globalState.session.merchantId
}
},
params: {
merchantId: this.$globalState.session.merchantId
}
}
]
},
// {
// name: '质保卡',
// type: 'link',
// funName: 'link',
// text: '车主朋友,您好!<br>我是您的福利官,欢迎您领取电子质保卡,<br>请点击下方链接进行领取及查看:<br><span style="color:#409eff;">https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/</span><br>祝您用车愉快!<br>'
// },
// {
// name: '素材',
// type: 'material',
// funName: 'material',
// groupListApi: this.$apis.welcomeword.getGroupListApi,
// materialListApi: this.$apis.welcomeword.getMaterialListApi,
// // videoNo: true
// pdfNo: true
// },
{
name: '模板', name: '模板',
type: 'nickname', type: 'message',
funName: 'message' funName: 'message',
getSearchApi: this.$apis.welcomeword.createdNameList,
templateApi: this.$apis.welcomeword.templatePage,
templateUpdateApi: this.$apis.welcomeword.templateUpdate,
templateSaveApi: this.$apis.welcomeword.templateSave,
templateDetailApi: this.$apis.welcomeword.templateDetail
} }
] ]
} }
}, },
watch: {
drawer(val) {
if (!val) {
let previewList = this.$refs.welcome.previewList
previewList.map(item => {
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
})
this.$emit('handleConfigChecked', previewList)
}
}
},
methods: { methods: {
init(previewList) { init(previewList) {
this.drawer = true this.drawer = true
this.$nextTick(() => { this.$nextTick(() => {
previewList.map(item => {
if (item.attType == 7) {
item.attContent = JSON.parse(item.attContent)
}
})
this.$refs.welcome.updateList(previewList) this.$refs.welcome.updateList(previewList)
}) })
}, },
handleSaveConfig() { handleSaveConfig() {
this.$emit('handleConfigChecked', this.$refs.welcome.previewList)
this.drawer = false this.drawer = false
} }
} }
......
<template>
<div class="select-emp-panel">
<div class="scrm-p10 emp-tree-panel">
<div class="popper-arrow"></div>
<div
class="emp-scroll-panel"
:style="{
height: treeHeight + 'px'
}"
>
<div class="tree-title">所在门店/部门</div>
<el-tree v-loading="loading" :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</div>
</div>
<el-col
class="scrm-p10 emp-table-panel"
:style="{
height: treeHeight + 20 + 'px'
}"
>
<GLTable v-loading="loading" ref="saleTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable"></GLTable>
</el-col>
</div>
</template>
<script>
export default {
name: 'selectEmp',
props: ['selectData', 'islord'],
data() {
return {
treeHeight: 0,
staffName: '',
listTree: [],
defaultProps: {
children: 'children',
label: 'departmentName'
},
// 表格参数
tableParams: {
checkSelectKey: 'id',
checkSelectVal: [],
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '职务',
prop: 'staffTitle'
}
]
},
tableEmpData: [],
currentArr: [],
loading: true
}
},
methods: {
selectionTable(val) {
this.$emit('selectTable', val)
},
listDepartmentTree() {
const params = { merchantId: 10001001, addChildrensFlag: true }
if (this.islord) {
params.islord = this.islord
}
params.isHavCustomer = true
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
this.listTree = res
this.loading = false
if (this.listTree.length) {
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
}
if (this.selectData && this.selectData.length) {
this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
this.clearSelect(row)
})
}
this.$nextTick(() => {
document.getElementsByClassName('el-tree-node__expand-icon')[0].click()
document.getElementsByClassName('el-tree-node__content')[0].click()
})
})
},
clearSelect(row) {
this.$refs.saleTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
clearSelection() {
this.$refs.saleTable.$refs.salelistMutiTable.clearSelection()
},
handleNodeClick(data) {
this.departmentId = data.id
this.tableEmpData = data.entmicroStaffResponses
// this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses)
// this.listEntmicroStaff()
},
getEmployee(d, arr = []) {
d.forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
const flag = arr.find(m => m.id == j.id)
if (!flag) {
arr.push(j)
}
})
}
if (i.children) {
this.getEmployee(i.children, arr)
}
})
return arr
},
searchTable(search) {
const arr = []
if (this.currentArr && this.currentArr.length != 0) {
this.currentArr.forEach(item => {
if (item.staffName.indexOf(search) != -1) {
arr.push(item)
}
})
}
this.tableEmpData = arr
}
// listEntmicroStaff(staffName) {
// let params = {
// departmentId: this.departmentId,
// staffName: staffName ? staffName : this.staffName,
// merchantid: this.$globalState.session.merchantId
// }
// this.$apis.emp.listEntmicroStaff(params).then(res => {
// this.tableEmpData = res
// })
// }
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.treeHeight = clientHeight - 650
this.listDepartmentTree()
}
}
</script>
<style scoped lang="scss">
.select-emp-panel {
display: flex;
.emp-tree-panel {
margin-top: 10px;
width: 200px;
position: relative;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
.emp-scroll-panel {
min-height: 200px;
overflow: auto;
box-sizing: border-box;
}
.popper-arrow {
border-top-width: 0;
border-width: 6px;
position: absolute;
top: -12px;
left: 30px;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-bottom-color: #e4e7ed;
&:after {
content: ' ';
border-width: 6px;
top: 1px;
margin-left: -6px;
border-top-width: 0;
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-bottom-color: #fff;
}
}
}
.emp-table-panel {
flex: 1;
min-height: 200px;
overflow: auto;
margin-top: 10px;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
/deep/ .el-checkbox__input.is-disabled .el-checkbox__inner {
background-color: #999999;
}
}
.emp-tree-panel {
margin-right: 10px;
font-size: 15px;
/deep/ .el-tree-node:focus > .el-tree-node__content {
color: #5850ff;
background: #f2f5fa;
}
}
.tree-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 14px;
padding: 10px;
}
}
</style>
<template>
<div class="member-wrapper">
<div class="member-left">
<div class="member-title">
预选
<span>共{{ chatGroupCount }}个群聊,{{ tableEmpData.length }}个群主成员</span>
</div>
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item style="margin-bottom: 0">
<span class="lord-label" slot="label">所在门店/部门</span>
<el-popover ref="popover" placement="bottom" width="215" trigger="click" v-model="popoverVisible" @show="onShowPopover" @hide="onHidePopover">
<el-tree class="select-tree" :data="treeData" :props="defaultProps" default-expand-all @node-click="handleNodeClick"></el-tree>
<el-input v-model="searchForm.department" slot="reference" :size="size" readonly style="width: 215px" placeholder="请选择所在门店/部门" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" @keyup.enter.native="search"></el-input>
</el-popover>
</el-form-item>
<el-form-item label="姓名" style="margin-bottom: 0">
<el-input :size="size" v-model.trim="searchForm.lordName" @keyup.enter.native="search" clearable placeholder="请输入姓名搜索"></el-input>
</el-form-item>
<el-form-item style="margin-bottom: 0">
<span class="lord-label" slot="label">跟进专员类型</span>
<el-select v-model="searchForm.followerId" style="width: 215px" :size="size" placeholder="请选择">
<el-option v-for="item in followTypeList" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item>
<el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox>
</el-form-item>-->
<el-form-item label style="margin-bottom: 0; margin-left: 40px">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button type="primary" :size="size" @click="search">搜索</el-button>
</el-form-item>
</el-form>
<div class="table-content" style="max-height: 456px">
<GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @selectionTable="selectionTable" @row-click="rowClick">
<div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span>
<span class="staff-title" v-show="scope.scope.staffTitle">{{ scope.scope.staffTitle }}</span>
</div>
</GLTable>
</div>
</div>
</div>
<div class="member-right">
<div class="member-title">已选</div>
<div class="member-name">成员名称({{ innerTags.length }}项)</div>
<div class="input-tag-wrapper">
<div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
</div>
</div>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'SelectLord',
props: ['selectData'],
data() {
return {
url: url,
searchForm: {},
checked: '',
treeData: [],
defaultProps: {
children: 'children',
label: 'departmentName'
},
popoverVisible: false,
loading: false,
// 表格参数
tableParams: {
checkSelectKey: 'id',
checkSelectVal: [],
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName',
addHtml: 'staffName'
},
{
label: '所在门店/部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName',
formatter: cellValue => {
return cellValue.followerTypeName ? cellValue.followerTypeName : '-'
}
},
{
label: '群数量',
prop: 'chatCount'
}
]
},
tableEmpData: [],
allTreeData: [],
currentTreeData: [],
innerTags: [],
followTypeList: [],
chatGroupCount: 0
}
},
mounted() {
this.getFindLordGroup({}, true)
this.getFollowerType()
this.listDepartmentTree()
},
methods: {
selectionTable(val) {
this.innerTags = val
},
// 清空搜索条件
resetSearch() {
this.searchForm = {}
this.tableEmpData = this.allTreeData
},
// 显示时触发
onShowPopover() {
this.popoverVisible = true
},
// 隐藏时触发
onHidePopover() {
this.popoverVisible = false
},
getFindLordGroup(params, isFirst) {
this.$apis.customerTransform.findLordGroup(params).then(res => {
this.loading = false
if (res) {
this.tableEmpData = res
this.tableEmpData.map(item => (this.chatGroupCount += item.chatCount))
this.$refs.empTable.tableHeightValues = this.tableEmpData.length ? '' : '230px'
if (isFirst && this.selectData && this.selectData.length) {
this.selectData.forEach(item => {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
})
}
} else {
this.treeData = []
}
})
},
listDepartmentTree() {
const params = { addChildrensFlag: true }
params.islord = true
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
this.treeData = res
})
},
handleNodeClick(data) {
this.searchForm.department = data.departmentName
this.currentTreeData = data
this.onHidePopover()
},
getEmployee(d, arr = []) {
d.reverse().forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
const flag = arr.find(m => m.id == j.id)
if (!flag) {
arr.push(j)
}
})
}
if (i.children) {
this.getEmployee(i.children, arr)
}
})
return arr
},
search() {
this.getFindLordGroup(this.searchForm)
},
remove(item) {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
},
rowClick(row) {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
getFollowerType() {
this.$apis.customerTransform.followerType({}).then(res => {
this.followTypeList = res
})
},
handleReset() {
this.searchForm = {}
this.search()
}
}
}
</script>
<style lang="scss">
.el-input.el-input--suffix.rotate .el-input__suffix .el-icon-arrow-down {
transform: rotate(-180deg);
}
.select-tree {
max-height: 400px;
overflow-y: scroll;
}
.staff-title {
position: relative;
font-size: 12px;
padding: 0 10px;
line-height: 12px;
color: #999;
&::before {
content: '';
position: absolute;
top: 50%;
left: 5px;
transform: translateY(-50%);
display: inline-block;
width: 1px;
height: 12px;
background-color: #999;
}
}
.lord-label {
display: inline-block;
width: 110px;
}
.member-wrapper {
display: flex;
.member-title {
font-size: 16px;
font-weight: 600;
line-height: 22px;
margin-bottom: 6px;
span {
display: inline-block;
padding-left: 5px;
font-size: 12px;
color: #999;
font-weight: 500;
}
}
.member-left {
width: 800px;
.member-content {
border: 1px solid #eee;
border-bottom: none;
.member-form {
padding: 10px 20px;
}
.table-content {
max-height: 456px;
overflow: auto;
border: 1px solid #eee;
}
}
.member-checked {
text-align: right;
margin-top: 10px;
}
}
.member-right {
width: 286px;
margin-left: 14px;
.member-name {
font-size: 14px;
color: #333;
line-height: 20px;
padding: 18px;
border: 1px solid #eee;
}
}
}
.tag-box {
height: 100%;
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
border: 1px solid #eee;
border-top: none;
box-sizing: border-box;
color: #606266;
display: inline-block;
padding: 8px 10px;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
height: calc(100% - 86px);
display: flex;
align-items: center;
max-height: 500px;
overflow: auto;
// margin-bottom: 10px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 10px;
line-height: 22px;
margin-bottom: 5px;
height: 24px;
}
</style>
<template> <template>
<div> <div>
<el-dialog title="分配任务" :visible.sync="dialogVisible" width="60%"> <GLDialog title="分配任务" :hasFooter="true" @onOk="handleSure" @onCancel="handleCancel" :visible.sync="dialogVisible" mode="big">
<div class="member-item"> <div class="member-item">
<label>任务提醒:</label> <label>任务提醒:</label>
<el-radio-group v-model="immExecutionFlag"> <el-radio-group v-model="immExecutionFlag">
...@@ -62,17 +62,18 @@ ...@@ -62,17 +62,18 @@
</div> </div>
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <!-- <div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false"> <el-button size="small" @click="dialogVisible = false">
取消 取消
</el-button> </el-button>
<el-button size="small" type="primary" @click="handleSure">确定</el-button> <el-button size="small" type="primary" @click="handleSure">确定</el-button>
</div> </div> -->
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
<script> <script>
import { utils } from 'glsx-common'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
export default { export default {
name: 'SelectMember', name: 'SelectMember',
...@@ -139,6 +140,9 @@ export default { ...@@ -139,6 +140,9 @@ export default {
this.listDepartmentTree(false) this.listDepartmentTree(false)
}, },
methods: { methods: {
handleCancel() {
this.dialogVisible = false
},
selectionTable(val) { selectionTable(val) {
this.innerTags = val this.innerTags = val
// this.$emit('selectTable', val) // this.$emit('selectTable', val)
...@@ -150,7 +154,7 @@ export default { ...@@ -150,7 +154,7 @@ export default {
this.innerTags = [] this.innerTags = []
this.dialogVisible = true this.dialogVisible = true
}, },
handleSure() { handleSure: utils.debounce(function() {
const { flowFirstFlag, immExecutionFlag, sendDate, customerIds, innerTags } = this const { flowFirstFlag, immExecutionFlag, sendDate, customerIds, innerTags } = this
const staffIds = innerTags.map(item => item.staffId) const staffIds = innerTags.map(item => item.staffId)
const activityId = this.$route.query.id const activityId = this.$route.query.id
...@@ -162,6 +166,9 @@ export default { ...@@ -162,6 +166,9 @@ export default {
customerIds, customerIds,
staffIds staffIds
} }
if (immExecutionFlag) {
delete params.sendDate
}
this.$apis.activity.assignmentCustomer(params).then(res => { this.$apis.activity.assignmentCustomer(params).then(res => {
if (res) { if (res) {
this.$message({ this.$message({
...@@ -172,7 +179,7 @@ export default { ...@@ -172,7 +179,7 @@ export default {
this.dialogVisible = false this.dialogVisible = false
} }
}) })
}, }, 300),
// 清空搜索条件 // 清空搜索条件
resetSearch() { resetSearch() {
this.searchForm = {} this.searchForm = {}
...@@ -189,7 +196,7 @@ export default { ...@@ -189,7 +196,7 @@ export default {
listDepartmentTree(isFollowerStaff) { listDepartmentTree(isFollowerStaff) {
const params = { addChildrensFlag: true } const params = { addChildrensFlag: true }
this.loading = true this.loading = true
params.isHavCustomer = true params.isHavCustomer = false
params.isFollowerStaff = isFollowerStaff params.isFollowerStaff = isFollowerStaff
this.$apis.custom.listDepartmentTree(params).then(res => { this.$apis.custom.listDepartmentTree(params).then(res => {
console.log(res) console.log(res)
......
<!-- 树形搜索 -->
<template>
<div>
<el-popover ref="popover" placement="bottom-start" trigger="click" v-model="popoverVisible" :disabled="targetItem.isDisabled" @show="onShowPopover" @hide="onHidePopover">
<el-tree ref="tree" class="select-tree" highlight-current default-expand-all node-key="id" :expand-on-click-node="isExpand" :style="`min-width: ${treeWidth}`" :data="treeData" :current-node-key="form[targetItem.name]" :props="defaultProps" :filter-node-method="handleFilterNode" @current-change="handleNodeClick"></el-tree>
<el-input slot="reference" ref="input" v-model="form[targetItem.nameLabel]" clearable :disabled="targetItem.isDisabled" :style="`width: ${width}px`" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" :placeholder="'请选择' + targetItem.label" @change="handleClear"></el-input>
</el-popover>
</div>
</template>
<script>
export default {
name: 'SelectTree',
data() {
return {
isExpand: false,
// 树状菜单显示状态
popoverVisible: false,
treeWidth: 'auto'
}
},
props: {
// 输入框宽度
width: String,
form: {
type: Object,
default: () => {}
},
targetItem: {
type: Object,
default: () => {}
},
treeData: {
type: Array,
default: () => []
},
defaultProps: {
type: Object,
default: () => ({
parent: 'parentId',
value: 'id',
label: 'menuName',
children: 'childlist'
})
}
},
watch: {
form(val) {
if (this.form[this.targetItem.name]) {
this.form[this.targetItem.nameLabel] = this.queryTree(this.treeData, this.form[this.targetItem.name])
this.$nextTick().then(() => {
this.$refs.tree.setCheckedKeys([this.form[this.targetItem.name]])
})
}
}
},
created() {
// 获取输入框宽度同步至树状菜单宽度
this.$nextTick(() => {
this.treeWidth = `${(this.width || this.$refs.input.$refs.input.clientWidth) - 24}px`
})
},
mounted() {
if (this.form[this.targetItem.name]) {
// console.log(this.treeData)
// console.log(this.form)
this.form[this.targetItem.nameLabel] = this.queryTree(this.treeData, this.form[this.targetItem.name])
this.$nextTick().then(() => {
this.$refs.tree.setCheckedKeys([this.form[this.targetItem.name]])
})
}
},
methods: {
// 显示时触发
onShowPopover() {
this.popoverVisible = true
this.$refs.tree.filter(false)
},
// 隐藏时触发
onHidePopover() {
this.popoverVisible = false
},
// 树节点过滤方法
handleFilterNode(query, data) {
if (!query) return true
return data[this.defaultProps.label].indexOf(query) !== -1
},
handleNodeClick(val) {
this.$emit('selected', { val: val, targetItem: this.targetItem, formName: this.targetItem.formName })
this.onHidePopover()
},
handleClear(val) {
this.$emit('selected', { val: val, targetItem: this.targetItem, formName: this.targetItem.formName })
window.event.stopPropagation()
},
// 搜索树状数据中的 ID
queryTree(tree, id) {
let stark = []
stark = stark.concat(tree)
while (stark.length) {
const temp = stark.shift()
if (temp[this.defaultProps.children]) {
stark = stark.concat(temp[this.defaultProps.children])
}
if (temp[this.defaultProps.value] === id) {
return temp[this.defaultProps.label]
}
}
return
}
}
}
</script>
<style>
.el-input.el-input--suffix.rotate .el-input__suffix .el-icon-arrow-down {
transform: rotate(-180deg);
}
.select-tree {
max-height: 400px;
overflow-y: scroll;
}
</style>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<GLTable @selectionTable="selectionTable" @setTableFinishFun="setTableFinishFun" ref="customForm" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :pageConf="pageConf" :tableParams="tableParams" :pageSizes="[10, 100, 1000, 2000]"> <GLTable @selectionTable="selectionTable" @setTableFinishFun="setTableFinishFun" ref="customForm" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :pageConf="pageConf" :tableParams="tableParams" :pageSizes="[10, 100, 1000, 2000]">
<span slot="customerName" slot-scope="scope"> <span slot="customerName" slot-scope="scope">
<GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName }}</GLFull> <GLFull :labelWidth="70" :identi="`node_${scope.scope.id}`">{{ scope.scope.customerName }}</GLFull>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span> <span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span>
...@@ -23,12 +23,7 @@ ...@@ -23,12 +23,7 @@
<div slot="followName" class="entmicro" slot-scope="scope"> <div slot="followName" class="entmicro" slot-scope="scope">
<div v-if="!followList(scope.scope.followName).length">--</div> <div v-if="!followList(scope.scope.followName).length">--</div>
<div class="entmicro-tag" style="padding-right:3px" v-for="(tag, idx) in followList(scope.scope.followName)" :key="idx"> <div class="entmicro-tag" style="padding-right:3px" v-for="(tag, idx) in followList(scope.scope.followName)" :key="idx">
<GLFull :labelWidth="110" :content="tag" identification="ellipsis-1"> <GLFull :labelWidth="110" :label="tag" textType="user" :identi="`tagIdentification_${scope.scope.id}`"></GLFull>
<el-tag type="info" class="ellipsis-1" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ tag }}
</el-tag>
</GLFull>
</div> </div>
</div> </div>
<!-- 企微名称 --> <!-- 企微名称 -->
...@@ -67,7 +62,7 @@ ...@@ -67,7 +62,7 @@
<span @click="goDetail(scope.scope.oneId)" class="blue-text">详情</span> <span @click="goDetail(scope.scope.oneId)" class="blue-text">详情</span>
</template> --> </template> -->
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope)">详情</el-button> <el-button type="text" :disabled="!scope.scope.oneId" @click="goDetail(scope.scope)" v-if="$Utils.isShowBtn('/clientManage/clientDetail')">详情</el-button>
<!-- <GLButton @click="goDetail(scope.scope.oneId)" fn="客户详情" type="text">详情</GLButton> --> <!-- <GLButton @click="goDetail(scope.scope.oneId)" fn="客户详情" type="text">详情</GLButton> -->
</div> </div>
</GLTable> </GLTable>
...@@ -346,7 +341,7 @@ export default { ...@@ -346,7 +341,7 @@ export default {
this.$refs.customForm.refreshTable() this.$refs.customForm.refreshTable()
}, },
goDetail(scope) { goDetail(scope) {
this.$history.push('/custom/clientManage/clientDetail?id=' + scope.nickNameList[0].oneId) this.$history.push('/custom/clientManage/clientDetail?id=' + scope.oneId)
}, },
//获取跟进员工 //获取跟进员工
getStaffList() { getStaffList() {
...@@ -365,7 +360,6 @@ export default { ...@@ -365,7 +360,6 @@ export default {
}) })
staff.unshift({ label: '全部', value: '' }) staff.unshift({ label: '全部', value: '' })
this.clientManageFormList.find(item => item.name == 'staffId').optionList = staff this.clientManageFormList.find(item => item.name == 'staffId').optionList = staff
console.log(this.tagsPartFormList[index])
}) })
}, },
queryCrowdTree() { queryCrowdTree() {
...@@ -378,14 +372,14 @@ export default { ...@@ -378,14 +372,14 @@ export default {
} }
} }
this.$apis.custom.queryCrowdTree(params).then(res => { this.$apis.custom.queryCrowdTree(params).then(res => {
this.clientManageFormList.find(item => item.name == 'groupId').optionList = res.crowdUnitList this.clientManageFormList.find(item => item.name == 'groupId').optionList = [{ crowdName: '默认人群', crowdId: '0' }].concat(res.crowdUnitList)
}) })
} }
}, },
async mounted() { async mounted() {
console.log(document.querySelector('.task-header').$el)
this.getStaffList() this.getStaffList()
this.queryCrowdTree() this.queryCrowdTree()
this.clientManageFormList.find(item => item.name == 'custGroupId').optionList = await this.queryCrowdGroupTree()
} }
} }
</script> </script>
...@@ -481,7 +475,7 @@ export default { ...@@ -481,7 +475,7 @@ export default {
} }
} }
padding: 20px 20px 30px; padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px; // min-width: 1300px;
background-color: #fff; background-color: #fff;
.el-button + .el-button { .el-button + .el-button {
...@@ -511,7 +505,7 @@ export default { ...@@ -511,7 +505,7 @@ export default {
} }
.el-tag { .el-tag {
max-width: 110%; max-width: 100%;
cursor: pointer; cursor: pointer;
background-color: #fff !important; background-color: #fff !important;
} }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<script> <script>
import url from '@/assets/img/empty.png' import url from '@/assets/img/empty.png'
import crowd from '@/mixins/crowd' import crowd from '@/mixins/crowd'
import hello from '../message.js'
export default { export default {
name: 'activity', name: 'activity',
mixins: [crowd], mixins: [crowd],
...@@ -78,11 +79,15 @@ export default { ...@@ -78,11 +79,15 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '活动名称', label: '活动名称',
prop: 'activityName' prop: 'activityName',
width: 300,
line: 1
}, },
{ {
label: '人群类型', label: '人群类型',
prop: 'groupTypeIdName' prop: 'groupTypeIdName',
width: 200,
line: 1
}, },
{ {
label: '客户总数', label: '客户总数',
...@@ -119,7 +124,7 @@ export default { ...@@ -119,7 +124,7 @@ export default {
} }
}, },
async mounted() { async mounted() {
this.searchFormData.find(item => (item.name = 'groupTypeId')).optionList = await this.queryCrowdGroupTree() this.searchFormData.find(item => (item.name = 'groupTypeId')).optionList = await this.queryCrowdGroupTree(1)
}, },
methods: { methods: {
handleSearch() { handleSearch() {
...@@ -251,7 +256,6 @@ export default { ...@@ -251,7 +256,6 @@ export default {
height: 102px; height: 102px;
margin: 20px 0px; margin: 20px 0px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
display: flex; display: flex;
.activity-num-item { .activity-num-item {
width: 33.33%; width: 33.33%;
...@@ -281,7 +285,6 @@ export default { ...@@ -281,7 +285,6 @@ export default {
padding: 20px; padding: 20px;
height: 334px; height: 334px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
text-align: center; text-align: center;
&:last-child { &:last-child {
margin-right: 0px; margin-right: 0px;
...@@ -337,7 +340,7 @@ export default { ...@@ -337,7 +340,7 @@ export default {
/deep/ { /deep/ {
.el-date-editor.el-input, .el-date-editor.el-input,
.el-date-editor.el-input__inner { .el-date-editor.el-input__inner {
width: 220px; // width: 220px;
} }
.el-form-item { .el-form-item {
margin-right: 20px; margin-right: 20px;
......
...@@ -11,12 +11,13 @@ ...@@ -11,12 +11,13 @@
<div class="activity-tabel-form"> <div class="activity-tabel-form">
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable @setTableFinishFun="setTableFinishFun" ref="taskForm" :noDataImg="url" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable @setTableFinishFun="setTableFinishFun" ref="taskForm" :noDataImg="url" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="status" slot-scope="scope"> <div class="table-btns" slot="status" slot-scope="scope" v-if="scope.scope.custTypeName != '默认客群'">
<el-switch v-model="scope.scope.status" :active-value="0" :inactive-value="-1" @change="changeSwitch(scope.scope)"></el-switch> <el-switch v-model="scope.scope.status" :active-value="0" :inactive-value="-1" @change="changeSwitch(scope.scope)"></el-switch>
{{ scope.scope.status == 0 ? '启用' : '停用' }} {{ scope.scope.status == 0 ? '启用' : '停用' }}
</div> </div>
<div v-else>--</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleAdd(scope.scope)" fn="智能营销配置">编辑</el-button> <el-button type="text" @click="handleAdd(scope.scope)" :disabled="scope.scope.custTypeName == '默认客群'">编辑</el-button>
<!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> --> <!-- <GLButton :disabled="scope.scope.imStatus!=1" type="text" @click="handleStatistics(scope.scope)" fn="营销统计">营销统计</GLButton> -->
</div> </div>
</GLTable> </GLTable>
...@@ -88,11 +89,15 @@ export default { ...@@ -88,11 +89,15 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '活动名称', label: '活动名称',
prop: 'configName' prop: 'configName',
width: 300,
line: 1
}, },
{ {
label: '人群类型', label: '人群类型',
prop: 'custTypeName' prop: 'custTypeName',
width: 200,
line: 1
}, },
{ {
label: '推送日期', label: '推送日期',
...@@ -131,7 +136,7 @@ export default { ...@@ -131,7 +136,7 @@ export default {
} }
}, },
async mounted() { async mounted() {
this.searchFormData.find(item => (item.name = 'custGroupId')).optionList = await this.queryCrowdGroupTree() this.searchFormData.find(item => (item.name = 'custGroupId')).optionList = await this.queryCrowdGroupTree(1)
}, },
methods: { methods: {
handleSearch() { handleSearch() {
...@@ -296,7 +301,6 @@ export default { ...@@ -296,7 +301,6 @@ export default {
height: 102px; height: 102px;
margin: 20px 0px; margin: 20px 0px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
display: flex; display: flex;
.activity-num-item { .activity-num-item {
width: 33.33%; width: 33.33%;
...@@ -326,7 +330,6 @@ export default { ...@@ -326,7 +330,6 @@ export default {
padding: 20px; padding: 20px;
height: 334px; height: 334px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
text-align: center; text-align: center;
&:last-child { &:last-child {
margin-right: 0px; margin-right: 0px;
...@@ -388,7 +391,7 @@ export default { ...@@ -388,7 +391,7 @@ export default {
/deep/ { /deep/ {
.el-date-editor.el-input, .el-date-editor.el-input,
.el-date-editor.el-input__inner { .el-date-editor.el-input__inner {
width: 220px; // width: 220px;
} }
.el-form-item { .el-form-item {
margin-right: 20px; margin-right: 20px;
......
// hello.js
import Vue from 'vue'
import HelloTemplate from './message.vue'
// 使用extend方法创建vue的子类
const HelloConstructor = Vue.extend(HelloTemplate)
// 使用这个方法调用hello组件
function Hello(options) {
options = options || {}
if (typeof options === 'string') {
options = {
text: options
}
}
// 实例化子组件,然后获取到DOM结构并挂载到body上
const helloInstence = new HelloConstructor({ data: options })
helloInstence.vm = helloInstence.$mount()
console.log(helloInstence.vm)
document.body.appendChild(helloInstence.vm.$el)
}
export default Hello
<template>
<div>{{ text }}</div>
</template>
<script>
export default {
name: 'hello',
data() {
return {
text: ''
}
}
}
</script>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!