Commit 57810959 by 杨明

fixed

1 parent cba65149
...@@ -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> <template v-else>
{{ content ? content : label }} {{ label }}
</template> </template>
</div> </div>
<div :class="[line ? 'full-text-line' : 'full-text']" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }"> <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>
{{ label }}
</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 :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>
<template v-if="$slots.default"><slot></slot></template> <div :class="['full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px' }" v-if="textType != 'text' && !haveClose">
<template v-else> <el-tag type="info" class="full-text" :disable-transitions="false">
{{ label }} <i class="el-icon-user-solid" v-if="textType == 'user'"></i>
</template> <template v-if="$slots.default"><slot></slot></template>
</div> <template v-else>
{{ label }}
</template>
</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> </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> <template>
<div class="square-main"> <div class="square-main">
<el-dialog title="选择活动" :visible.sync="dialogVisible" width="1088px" :before-close="handleClose"> <el-dialog title="选择活动" :visible.sync="dialogVisible" width="1088px" :before-close="handleClose">
<div class="model-panel"> <div class="model-panel" v-loading="loading">
<div class="model-panel-tab"> <div class="model-panel-tab">
<label>活动类型:</label> <label>活动类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card"> <el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="权益卡试用" name="3"></el-tab-pane> <el-tab-pane :label="item.itemName" :name="item.itemValue" v-for="(item, index) in activityList" :key="index"></el-tab-pane>
<el-tab-pane label="权益套餐" name="4"></el-tab-pane> <!-- <el-tab-pane label="无忧服务" name="6" v-if="openFlag"></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="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">
<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> <template v-if="selectType == 'card'">
<div class="model-item-title" :title="item.couponName" v-show="activeName == 2">{{ item.couponName }}</div> <div class="model-item-title" :title="item.equityName">{{ item.equityName }}</div>
<div class="model-item-title" :title="item.couponName" v-show="activeName == 6">{{ item.equityName }}</div> <div class="model-item-content">领取方式:免费领用</div>
<div class="model-item-title" :title="item.packageName" v-show="activeName == 4">{{ item.packageName }}</div> <div class="model-item-content"></div>
<div class="model-item-title" :title="item.activityName" v-show="activeName == 5">{{ item.activityName }}</div> <div class="model-item-content model-item-contents">
<div class="model-item-content" v-show="activeName == 3">领取方式:免费领用</div> 试用天数:
<div class="model-item-content" v-show="activeName == 4">领取方式:付费购买</div> <span>{{ item.freeDay }}天</span>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 6">有效期:{{ item.effectiveDays }}天</div> </div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 3">有效期:无限制</div> </template>
<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> <template v-else-if="selectType == 'package'">
<div class="model-item-content" v-show="activeName == 6">获取方式:需先购买无忧服务套餐</div> <div class="model-item-title" :title="item.packageName">{{ item.packageName }}</div>
<div class="model-item-content" v-show="activeName == 6">获取限制:每个服务套餐限领一次</div> <div class="model-item-content">领取方式:付费购买</div>
<div class="model-item-content"></div>
<div class="model-item-content" v-show="activeName == 3"></div> <div class="model-item-content model-item-contents">
<div class="model-item-content model-item-contents" v-show="activeName == 3"> 销售价格:
试用天数: <span>{{ item.packagePrice }}元</span>
<span>{{ item.freeDay }}天</span> </div>
</div> </template>
<div class="model-item-content" v-show="activeName == 2"> <template v-else-if="selectType == 'coupon'">
使用途径: <div class="model-item-title" :title="item.couponName">{{ item.couponName }}</div>
{{ item.useChannel == 1 ? '线上商品' : '到店核销' }} <div class="model-item-content" v-if="item.effectiveType == 3">有效期:无限制</div>
</div> <div class="model-item-content" v-if="item.effectiveType == 6">有效期:{{ item.effectiveDays }}天</div>
<div class="model-item-content model-item-weight" v-show="activeName == 6"> <div class="model-item-content" v-if="item.effectiveType == 2">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div>
赠送天数: <div class="model-item-content">
<span>{{ item.effectiveType == 2 ? item.effectivedDay + '天' : '永久有效' }}</span> 使用途径:
</div> {{ item.useChannel == 1 ? '线上商品' : '到店核销' }}
<div class="model-item-content" v-show="activeName == 4 || activeName == 5"></div> </div>
<div class="model-item-content model-item-contents" v-show="activeName == 4"> <div class="model-item-content model-item-contents">
销售价格: 数量:
<span>{{ item.packagePrice }}元</span> <span>{{ item.residueAmount }}</span>
</div> </div>
<div class="model-item-content" v-if="activeName == 5"> </template>
开始时间: <template v-else-if="selectType == 'activity'">
{{ item.startTime }} <div class="model-item-title" :title="item.activityName">{{ item.activityName }}</div>
</div> <div class="model-item-content"></div>
<div class="model-item-content" v-if="activeName == 5"> <div class="model-item-content">
结束时间: 开始时间:
{{ item.endTime }} {{ item.startTime }}
</div> </div>
<div class="model-item-content">
<div class="model-item-content model-item-contents" v-show="activeName == 2"> 结束时间:
数量: {{ item.endTime }}
<span>{{ item.residueAmount }}</span> </div>
</div> </template>
<template v-else>
<div class="model-item-title" :title="item.couponName">{{ item.equityName }}</div>
<div class="model-item-content">获取方式:需先购买无忧服务套餐</div>
<div class="model-item-content">获取限制:每个服务套餐限领一次</div>
<div class="model-item-content model-item-weight">
赠送天数:
<span>{{ item.effectiveType == 2 ? item.effectivedDay + '天' : '永久有效' }}</span>
</div>
</template>
</div> </div>
</div> </div>
<div class="model-item-empty" v-else v-loading="loading"> <div class="model-item-empty" v-else v-loading="loading">
...@@ -86,7 +92,7 @@ export default { ...@@ -86,7 +92,7 @@ export default {
dialogVisible: false, dialogVisible: false,
couponMenu: false, couponMenu: false,
loading: false, loading: false,
activeName: '3', activeName: 3,
modelList: [], modelList: [],
pageNum: 1, pageNum: 1,
pageSize: 12, pageSize: 12,
...@@ -97,6 +103,14 @@ export default { ...@@ -97,6 +103,14 @@ export default {
} }
} }
}, },
props: {
activityList: Array
},
computed: {
selectType() {
return this.activityList.find(act => act.itemValue == this.activeName).itemType
}
},
methods: { methods: {
handleSelectItem(item) { handleSelectItem(item) {
this.selectItem = item this.selectItem = item
...@@ -143,52 +157,17 @@ export default { ...@@ -143,52 +157,17 @@ export default {
getModelList() { getModelList() {
this.modelList = [] this.modelList = []
this.loading = true this.loading = true
let market = ''
switch (this.activeName) {
case '6':
market = 'merchant'
break
case '2':
market = 'getMerchant'
break
case '3':
market = 'getCard'
break
case '4':
market = 'getPackage'
break
case '5':
market = 'getActivity'
break
}
let params = { let params = {
pageSize: this.pageSize, pageSize: this.pageSize,
pageNum: this.pageNum pageNum: this.pageNum
} }
if (this.activeName == 3) { const activityChecked = this.activityList.find(act => act.itemValue == this.activeName)
params.tryAble = 1 Object.assign(params, activityChecked.params)
params.merchantId = this.$globalState.session.merchantId activityChecked
} .getInterfaceApi(params)
if (this.activeName == 2) {
params.discountTypes = [2, 3, 4]
params.directionalFlag = 1 // 1所有人可用2定向礼包专用3关联优惠券
params.validType = 'valid'
}
if (this.activeName == 5) {
params.currentPage = this.pageNum
params.activityStatus = 2
}
if (this.activeName == 6) {
params.merchantId = this.$globalState.session.merchantId
}
this.$apis.customerTransform[market](params)
.then(res => { .then(res => {
if (this.activeName == 3 || this.activeName == 6) { this.modelList = res.list ? res.list : res.data ? res.data : res
this.modelList = res this.tableTotal = res.total ? res.total : 0
} else {
this.modelList = res.list ? res.list : res.data
this.tableTotal = res.total
}
this.loading = false this.loading = false
}) })
.catch(() => { .catch(() => {
......
...@@ -245,7 +245,7 @@ export default { ...@@ -245,7 +245,7 @@ export default {
.container { .container {
margin-bottom: 20px; margin-bottom: 20px;
background-color: #ffffff; background-color: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
.title { .title {
padding: 20px 0 17px 20px; padding: 20px 0 17px 20px;
font-size: 16px; font-size: 16px;
......
...@@ -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: {}
},
{
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
}, },
{ {
id: 5,
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
} }
} }
......
...@@ -112,6 +112,9 @@ export default { ...@@ -112,6 +112,9 @@ export default {
this.userId = this.$globalState.session.id this.userId = this.$globalState.session.id
} }
}, },
props: {
messageList: Object
},
methods: { methods: {
init() { init() {
this.messageLoading = true this.messageLoading = true
...@@ -147,8 +150,8 @@ export default { ...@@ -147,8 +150,8 @@ export default {
params.title = searcher.title params.title = searcher.title
params.createdBy = searcher.createdBy params.createdBy = searcher.createdBy
} }
this.$apis.customerTransform.templatePage(params).then(res => { const { templateApi } = this.messageList
console.log(res) templateApi(params).then(res => {
if (res) { if (res) {
this.modelList = res.data this.modelList = res.data
this.tableTotal = res.count this.tableTotal = res.count
...@@ -182,13 +185,13 @@ export default { ...@@ -182,13 +185,13 @@ export default {
title: this.templateForm.title, title: this.templateForm.title,
content: this.templateForm.content content: this.templateForm.content
} }
let api = 'templateSave' const { templateSaveApi, templateUpdateApi } = this.messageList
let api = templateSaveApi
if (this.templateForm.id) { if (this.templateForm.id) {
api = 'templateUpdate' api = templateUpdateApi
params.id = this.templateForm.id params.id = this.templateForm.id
} }
console.log(params) api(params).then(res => {
this.$apis.customerTransform[api](params).then(res => {
console.log(res) console.log(res)
this.createLoading = false this.createLoading = false
if (res) { if (res) {
...@@ -210,7 +213,8 @@ export default { ...@@ -210,7 +213,8 @@ export default {
this.getTemplateDetail(id) this.getTemplateDetail(id)
}, },
getCreatedList() { getCreatedList() {
this.$apis.customerTransform.createdNameList({}).then(res => { const { getSearchApi } = this.messageList
getSearchApi({}).then(res => {
this.createdList = res this.createdList = res
this.$nextTick(() => { this.$nextTick(() => {
this.messageLoading = false this.messageLoading = false
...@@ -218,7 +222,8 @@ export default { ...@@ -218,7 +222,8 @@ export default {
}) })
}, },
getTemplateDetail(id) { getTemplateDetail(id) {
this.$apis.customerTransform.templateDetail({ id }).then(res => { const { templateDetailApi } = this.messageList
templateDetailApi({ id }).then(res => {
console.log(res) console.log(res)
if (res) { if (res) {
this.templateForm = res this.templateForm = res
......
<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 = {}
......
...@@ -111,6 +111,7 @@ export default { ...@@ -111,6 +111,7 @@ export default {
this.$emit('add', type) this.$emit('add', type)
}, },
addTag(text) { addTag(text) {
console.log(88)
// 创建模版标签 // 创建模版标签
let node = document.createElement(this.tag) let node = document.createElement(this.tag)
if (navigator.userAgent.indexOf('Firefox') > 0) { if (navigator.userAgent.indexOf('Firefox') > 0) {
......
<template> <template>
<div class="welcome-box"> <div class="welcome-box">
<!-- <div class="required">入群欢迎语</div> -->
<div class="content"> <div class="content">
<div class="content-bg"> <div class="content-bg">
<!-- <div id="nick" contenteditable="false" class="nickname">
@昵称
<i class="el-icon-error"></i>
</div>-->
<!-- <div id="toolbar-container" style="display: none;"></div>
<div id="text-container" class="editor-container"></div>-->
<wTextarea ref="textContent" v-model="textValue" @updateText="updateText"></wTextarea> <wTextarea ref="textContent" v-model="textValue" @updateText="updateText"></wTextarea>
<!-- <el-input
type="textarea"
:rows="9"
maxlength="600"
show-word-limit
v-model="guestForm.name"
@input="textInput"
style="-webkit-user-modify: read-write-plaintext-only !important;"
placeholder="请输入内容"
></el-input>-->
<div v-for="(itm, index) in previewList" :key="itm.id"> <div v-for="(itm, index) in previewList" :key="itm.id">
<div class="welcome-file" v-if="itm.attType != 1"> <div class="welcome-file" v-if="itm.attType != 1">
<template v-if="itm.attType == 2"> <template v-if="itm.attType == 2">
...@@ -28,7 +11,7 @@ ...@@ -28,7 +11,7 @@
<span :title="itm.attContent">{{ itm.attContent }}</span> <span :title="itm.attContent">{{ itm.attContent }}</span>
</template> </template>
<template v-else-if="itm.attType == 3"> <template v-else-if="itm.attType == 3">
<img src="@/assets/img/guestCustom/icon-img.png" alt /> <img src="@/assets/img/guestCustom/icon-video.png" alt />
<span :title="itm.attContent">{{ itm.attContent }}</span> <span :title="itm.attContent">{{ itm.attContent }}</span>
</template> </template>
<template v-else-if="itm.attType == 7"> <template v-else-if="itm.attType == 7">
...@@ -51,7 +34,7 @@ ...@@ -51,7 +34,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 == 'message' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
...@@ -59,8 +42,9 @@ ...@@ -59,8 +42,9 @@
<emotion class="emotion-panel-box" @emotion="handleEmotion" :height="280"></emotion> <emotion class="emotion-panel-box" @emotion="handleEmotion" :height="280"></emotion>
</div> </div>
</div> </div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel> <ActivityModel ref="activity" @selectActivity="selectActivity" :activityList="activityList"></ActivityModel>
<MessageModel ref="message" @selectItem="selectMessage"></MessageModel> <MessageModel ref="message" @selectItem="selectMessage" :messageList="messageList"></MessageModel>
<!-- <material-model v-if="isMaterialVisible" :isMaterialVisible.sync="isMaterialVisible" @handleMaterialConfirm="handleMaterialConfirm" @handleMaterialClose="handleMaterialClose"></material-model> -->
</div> </div>
</template> </template>
<script> <script>
...@@ -76,6 +60,7 @@ const ATT_TYPE = { ...@@ -76,6 +60,7 @@ const ATT_TYPE = {
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
import ActivityModel from './activityModel' import ActivityModel from './activityModel'
import MessageModel from './messageModel' import MessageModel from './messageModel'
// 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'
...@@ -86,40 +71,13 @@ export default { ...@@ -86,40 +71,13 @@ export default {
Emotion, Emotion,
wTextarea, wTextarea,
MessageModel MessageModel
// materialModel
}, },
props: { eventBus: Object, btnList: Array, form: String }, props: { btnList: Array, form: String },
data() { data() {
return { return {
loading: false, loading: false,
emotionStatus: false, emotionStatus: false,
// btnList: [
// {
// id: 1,
// name: '表情',
// funcName: '',
// type: 'expression',
// limitSize: 10
// },
// {
// id: 2,
// name: '图片',
// funcName: '',
// type: 'img',
// limitSize: 10
// },
// {
// id: 3,
// name: '昵称',
// type: 'nickname',
// funName: 'nickname'
// },
// {
// id: 4,
// name: '活动',
// type: 'acivity',
// funName: 'activity'
// }
// ],
guestForm: {}, guestForm: {},
previewList: [], previewList: [],
sendType: '', sendType: '',
...@@ -131,22 +89,23 @@ export default { ...@@ -131,22 +89,23 @@ export default {
} }
}, },
mounted() { mounted() {
// const _this = this
// this.editor = new E('#toolbar-container', '#text-container')
// this.editor.config.zIndex = 100
// this.editor.config.height = 165
// this.editor.config.colors = ['#000000', '#f7f7f7']
// this.editor.config.focus = false
// this.editor.config.onchange = function(newHtml) {
// console.log('change 之后最新的 html', newHtml)
// console.log(_this.editor.txt.text())
// const val = _this.editor.txt.text()
// _this.textInput(val)
// }
// this.editor.config.onchangeTimeout = 500
// this.editor.create()
console.log(this.previewList) console.log(this.previewList)
// this.eventBus.$emit('update', this.previewList) },
computed: {
activityList() {
return this.btnList.find(item => item.type == 'acivity').funParams
},
messageList() {
return this.btnList.find(item => item.type == 'message')
}
},
watch: {
previewList: {
handler(val) {
this.$emit('previewWord', val)
},
deep: true
}
}, },
methods: { methods: {
selectEmotion() { selectEmotion() {
...@@ -235,11 +194,12 @@ export default { ...@@ -235,11 +194,12 @@ export default {
this.$refs.activity.init() this.$refs.activity.init()
} else if (name == 'message') { } else if (name == 'message') {
this.$refs.message.init() this.$refs.message.init()
} else if (name == 'material') {
this.$refs.material.init()
} }
}, },
close(index) { close(index) {
this.previewList.splice(index, 1) this.previewList.splice(index, 1)
this.eventBus.$emit('update', this.previewList)
}, },
textInput(val) { textInput(val) {
console.log(val) console.log(val)
...@@ -256,7 +216,6 @@ export default { ...@@ -256,7 +216,6 @@ export default {
attType: ATT_TYPE.TEXT attType: ATT_TYPE.TEXT
}) })
} }
console.log(this.previewList)
}, },
selectActivity(val) { selectActivity(val) {
let idx let idx
...@@ -279,17 +238,11 @@ export default { ...@@ -279,17 +238,11 @@ export default {
}) })
} }
} }
console.log(this.previewList)
}, },
selectMessage(val) { selectMessage(val) {
console.log(val)
const content = val.content const content = val.content
this.updateText(content) this.updateText(content)
this.textValue = content this.textValue = content
// this.previewList[0] = {
// attContent: content,
// attType: ATT_TYPE.TEXT
// }
}, },
insertHtmlAtCaret(html) { insertHtmlAtCaret(html) {
var sel, range, frag var sel, range, frag
......
...@@ -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!