Commit 2ea4cbdd by 杨明

fixed

1 parent 6c098b55
...@@ -101,7 +101,7 @@ img { ...@@ -101,7 +101,7 @@ img {
.scrm-box-f { .scrm-box-f {
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); // box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
} }
.scrm-flex { .scrm-flex {
...@@ -148,7 +148,8 @@ img { ...@@ -148,7 +148,8 @@ img {
.el-table tbody tr:hover > td { .el-table tbody tr:hover > td {
background: #f4f3ff !important; background: #f4f3ff !important;
} }
.el-message-box .el-message-box__title,.el-message-box .el-message-box__headerbtn { .el-message-box .el-message-box__title,
.el-message-box .el-message-box__headerbtn {
display: none; display: none;
} }
.el-message-box__content { .el-message-box__content {
...@@ -161,12 +162,12 @@ img { ...@@ -161,12 +162,12 @@ img {
.el-message-box__btns { .el-message-box__btns {
text-align: center; text-align: center;
padding: 20px 0px 10px; padding: 20px 0px 10px;
border-top: 1px solid #E6E6E6; border-top: 1px solid #e6e6e6;
} }
.el-message-box__btns button:nth-child(2) { .el-message-box__btns button:nth-child(2) {
margin-left: 40px; margin-left: 40px;
} }
.el-message-box__status+.el-message-box__message { .el-message-box__status + .el-message-box__message {
padding: 0px 10px; padding: 0px 10px;
} }
.el-message-box--center { .el-message-box--center {
...@@ -185,5 +186,5 @@ img { ...@@ -185,5 +186,5 @@ img {
font-size: 16px; font-size: 16px;
} }
.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner { .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none!important; box-shadow: none !important;
} }
<template> <template>
<div class="tag-main"> <div class="tag-main">
<el-dialog title="选择标签" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <el-dialog bigTitle="选择标签" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<div class="tag-panel"> <div class="tag-panel">
<div class="tag-panel-select"> <div class="tag-panel-select">
<div class="tag-title">预选标签</div> <div class="tag-title">预选标签</div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
--> -->
<template> <template>
<div> <div>
<el-dialog :title="'人群筛选'" :width="'1080px'" :visible.sync="crowdVisible" v-if="crowdVisible"> <GLDialog title="人群筛选" :hasFooter="true" :visible.sync="crowdVisible" mode="big">
<div class="member-wrapper"> <div class="member-wrapper">
<div class="member-left"> <div class="member-left">
<div class="member-title"> <div class="member-title">
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<el-button style="width: 68px;" size="small" @click="crowdVisible = false">取 消</el-button> <el-button style="width: 68px;" size="small" @click="crowdVisible = false">取 消</el-button>
<el-button style="width: 68px;" size="small" type="primary" @click.native="handleConfirm">确 定</el-button> <el-button style="width: 68px;" size="small" type="primary" @click.native="handleConfirm">确 定</el-button>
</span> </span>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -97,7 +97,6 @@ export default { ...@@ -97,7 +97,6 @@ export default {
}, },
methods: { methods: {
init(val) { init(val) {
// console.log(val)
this.inner = this.$common.utils.deepClone(val) this.inner = this.$common.utils.deepClone(val)
this.innerTags = this.$common.utils.deepClone(val) this.innerTags = this.$common.utils.deepClone(val)
this.crowdVisible = true this.crowdVisible = true
......
<template> <template>
<div class="square-main" v-loading="loading"> <div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <GLDialog title="选择跟进专员" :hasFooter="true" :visible.sync="dialogVisible">
<el-form :inline="true" :model="tableSearchForm"> <el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工"> <el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input> <el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-button size="small" @click="handleCancel">取 消</el-button> <el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span> </span>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
......
<template> <template>
<div class="tag-main"> <div class="tag-main">
<el-dialog title="选择标签" :visible.sync="dialogVisible" width="70%" :before-close="handleClose"> <GLDialog bigTitle="选择标签" :hasFooter="true" :visible.sync="dialogVisible" mode="big">
<div class="tag-panel"> <div class="tag-panel">
<div class="tag-panel-select"> <div class="tag-panel-select">
<div class="tag-title">预选标签</div> <div class="tag-title">预选标签</div>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</el-button> </el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span> </span>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
......
...@@ -264,8 +264,11 @@ export default { ...@@ -264,8 +264,11 @@ export default {
} }
let htm = target.innerHTML let htm = target.innerHTML
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n') const cutImg = htm
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) { .replace(/<img src="https:\/\/img01.glsx.com.cn\/weapp\/resource\/saas\/scrm\/emoji\//g, '')
.replace(/<wise.+?(?:<\/wise>)/g, '@昵称')
.replace(/<br>/g, '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
let s = list[parseInt(str.split('.')[0]) - 1] let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]` return `[${s}]`
}) })
...@@ -298,8 +301,11 @@ export default { ...@@ -298,8 +301,11 @@ export default {
let htm = target.innerHTML let htm = target.innerHTML
console.log(htm) console.log(htm)
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '').replaceAll('<wise id="1">@昵称</wise>', '@昵称').replaceAll('<br>', '\n') const cutImg = htm
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) { .replace(/<img src="https:\/\/img01.glsx.com.cn\/weapp\/resource\/saas\/scrm\/emoji\//g, '')
.replace(/<wise.+?(?:<\/wise>)/g, '@昵称')
.replace(/<br>/g, '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
let s = list[parseInt(str.split('.')[0]) - 1] let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]` return `[${s}]`
}) })
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<span v-else>{{ item.name }}</span> <span v-else>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" /> <input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" /> <input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<el-link v-else-if="item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link> <el-link v-else-if="item.type == 'nickname' || item.type == 'acivity' || item.type == 'material'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
</div> </div>
</div> </div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel> <ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel>
<!-- <material-model v-if="isMaterialVisible" :isMaterialVisible.sync="isMaterialVisible" @handleMaterialConfirm="handleMaterialConfirm" @handleMaterialClose="handleMaterialClose"></material-model> -->
</div> </div>
</template> </template>
<script> <script>
...@@ -77,6 +78,7 @@ const ATT_TYPE = { ...@@ -77,6 +78,7 @@ const ATT_TYPE = {
} }
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
import ActivityModel from './activityModel' import ActivityModel from './activityModel'
// import materialModel from './materialModel'
import Emotion from './emotionWords' import Emotion from './emotionWords'
import wTextarea from './tag-textarea' import wTextarea from './tag-textarea'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
...@@ -84,6 +86,7 @@ export default { ...@@ -84,6 +86,7 @@ export default {
name: 'WelcomeWords', name: 'WelcomeWords',
components: { components: {
ActivityModel, ActivityModel,
// materialModel,
Emotion, Emotion,
wTextarea wTextarea
}, },
...@@ -92,6 +95,7 @@ export default { ...@@ -92,6 +95,7 @@ export default {
return { return {
loading: false, loading: false,
emotionStatus: false, emotionStatus: false,
isMaterialVisible: false,
btnList: [ btnList: [
{ {
id: 1, id: 1,
...@@ -113,6 +117,12 @@ export default { ...@@ -113,6 +117,12 @@ export default {
type: 'nickname', type: 'nickname',
funName: 'nickname' funName: 'nickname'
}, },
// {
// id: 5,
// name: '素材',
// type: 'material',
// funName: 'material'
// },
{ {
id: 4, id: 4,
name: '活动', name: '活动',
...@@ -229,11 +239,33 @@ export default { ...@@ -229,11 +239,33 @@ export default {
}) })
} }
}, },
// 素材
handleMaterialConfirm(val) {
console.log(val)
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
// objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动,10-素材)
this.editForm.object = JSON.parse(JSON.stringify(val))
this.editRule.eventContent[0].required = true
this.editForm.pushChannelType = ''
this.previewList = [
{
attContent: val,
additionalType: val.additionalType
}
]
this.handleMaterialClose()
},
handleMaterialClose() {
this.isMaterialVisible = !this.isMaterialVisible
},
handleFun(name) { handleFun(name) {
if (name == 'nickname') { if (name == 'nickname') {
this.$refs.textContent.addTag('@昵称') this.$refs.textContent.addTag('@昵称')
} else if (name == 'activity') { } else if (name == 'activity') {
this.$refs.activity.init() this.$refs.activity.init()
} else if (name == 'material') {
this.handleMaterialClose()
} }
}, },
close(index) { close(index) {
...@@ -241,6 +273,7 @@ export default { ...@@ -241,6 +273,7 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
}, },
textInput(val) { textInput(val) {
val = val.replace(/&nbsp;/g, '')
const hasText = this.previewList.some(item => item.attType == 1) const hasText = this.previewList.some(item => item.attType == 1)
if (hasText) { if (hasText) {
this.$set(this.previewList, 0, { this.$set(this.previewList, 0, {
...@@ -276,35 +309,7 @@ export default { ...@@ -276,35 +309,7 @@ export default {
} }
} }
}, },
insertHtmlAtCaret(html) { changeInput: utils.debounce(function() {
var sel, range, frag
if (window.getSelection) {
sel = window.getSelection()
if (sel.getRangeAt && sel.rangeCount) {
range = sel.getRangeAt(0)
range.deleteContents()
var el = document.createElement('span')
el.innerHTML = '<span contenteditable="false" class="nickname">@昵称<i class="el-icon-error"></i></span>'
// var el = document.createElement('div')
// el.innerHTML = html
frag = document.createDocumentFragment()
var node
var lastNode
while ((node = el.firstChild)) {
lastNode = frag.appendChild(node)
}
range.insertNode(frag)
if (lastNode) {
range = range.cloneRange()
range.setEndAfter(lastNode)
range.collapse(true)
sel.removeAllRanges()
sel.addRange(range)
}
}
}
},
changeInput: utils.debounce(function () {
console.log(document.getElementById('editor').childNodes) console.log(document.getElementById('editor').childNodes)
var allNodes = document.getElementById('editor').childNodes var allNodes = document.getElementById('editor').childNodes
var str = '' var str = ''
...@@ -323,8 +328,8 @@ export default { ...@@ -323,8 +328,8 @@ export default {
this.previewList = val this.previewList = val
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
const obj = val.find(item => item.attType == 1) const obj = val.find(item => item.attType == 1)
let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>') let attContent = obj.attContent.replace(/\[@昵称\]/g, '<wise id="1" contenteditable="false">@昵称</wise>')
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) {
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1 let index = parseInt(list.indexOf(word)) + 1
......
const staticRoutes = Object.freeze([{ const staticRoutes = Object.freeze([
{
name: 'channel', name: 'channel',
path: '/channel/index', path: '/channel/index',
component: resolve => require([`@/views/channel/index.vue`], resolve), component: resolve => require([`@/views/channel/index.vue`], resolve),
meta: {}, meta: {}
}, { },
{
name: 'channel', name: 'channel',
path: '/channel/store/:id/:codeUuid/:codeState', path: '/channel/store/:id/:codeUuid/:codeState',
component: resolve => require([`@/views/channel/store.vue`], resolve), component: resolve => require([`@/views/channel/store.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'addCode', name: 'addCode',
path: '/channel/addCode/:id/:codeUuid', path: '/channel/addCode/:id/:codeUuid',
component: resolve => require([`@/views/channel/addCode.vue`], resolve), component: resolve => require([`@/views/channel/addCode.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'poster', name: 'poster',
path: '/channel/poster/:id', path: '/channel/poster/:id',
component: resolve => require([`@/views/channel/poster.vue`], resolve), component: resolve => require([`@/views/channel/poster.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'square', name: 'square',
path: '/square/index', path: '/square/index',
component: resolve => require([`@/views/square/index.vue`], resolve), component: resolve => require([`@/views/square/index.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'import', name: 'import',
path: '/square/import', path: '/square/import',
component: resolve => require([`@/views/square/import.vue`], resolve), component: resolve => require([`@/views/square/import.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'customDetail', name: 'customDetail',
path: '/square/customDetail', path: '/square/customDetail',
component: resolve => require([`@/views/square/customDetail.vue`], resolve), component: resolve => require([`@/views/square/customDetail.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'importResult', name: 'importResult',
path: '/square/importResult/:id', path: '/square/importResult/:id',
component: resolve => require([`@/views/square/importResult.vue`], resolve), component: resolve => require([`@/views/square/importResult.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'drainage', name: 'drainage',
path: '/square/drainage', path: '/square/drainage',
component: resolve => require([`@/views/square/drainage.vue`], resolve), component: resolve => require([`@/views/square/drainage.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'market', name: 'market',
path: '/market/index', path: '/market/index',
component: resolve => require([`@/views/market/index.vue`], resolve), component: resolve => require([`@/views/market/index.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'config', name: 'config',
path: '/market/config', path: '/market/config',
component: resolve => require([`@/views/market/config.vue`], resolve), component: resolve => require([`@/views/market/config.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'configDetail', name: 'configDetail',
path: '/market/configDetail/:id?', path: '/market/configDetail/:id?',
component: resolve => require([`@/views/market/configDetail.vue`], resolve), component: resolve => require([`@/views/market/configDetail.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'effect', name: 'effect',
path: '/market/effect/:id?', path: '/market/effect/:id?',
component: resolve => require([`@/views/market/effect.vue`], resolve), component: resolve => require([`@/views/market/effect.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'overview', name: 'overview',
path: '/overview/index', path: '/overview/index',
component: resolve => require([`@/views/overview/index.vue`], resolve), component: resolve => require([`@/views/overview/index.vue`], resolve),
meta: {} meta: {}
}, { },
{
name: 'friends', name: 'friends',
path: '/friends/index/:id', path: '/friends/index/:id',
component: resolve => require([`@/views/friends/index.vue`], resolve), component: resolve => require([`@/views/friends/index.vue`], resolve),
meta: { permissions: ['新增'] } meta: { permissions: ['新增'] }
}]) }
])
export default staticRoutes export default staticRoutes
...@@ -2,15 +2,20 @@ import Vue from 'vue' ...@@ -2,15 +2,20 @@ 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, GLFooter, GLCombiForm, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLEditor from 'glsx-components/src/packages/Editor' //权限按钮 (根据权限动态创建)
import GLFull from '@/components/GLFull'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
Vue.use(GLCombiForm) Vue.use(GLCombiForm)
Vue.use(GLDialog)
// Vue.use(GLFull)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) Vue.component('GLEditor', GLEditor)
Vue.component('GLFull', GLFull)
// import 'glsx-components/src/theme/theme.scss' // import 'glsx-components/src/theme/theme.scss'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/common.scss' import '@/assets/css/common.scss'
......
...@@ -79,15 +79,16 @@ ...@@ -79,15 +79,16 @@
<el-switch v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
<div class="welcome-box" v-show="autoWelcome"> <div class="welcome-box" v-show="autoWelcome">
<welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> <!-- <welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> -->
<GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div> </div>
</div> </div>
</div> </div>
<GLFooter <GLFooter>
>
<el-button type="primary" @click="handleSave">提交</el-button> <el-button type="primary" @click="handleSave">提交</el-button>
<el-button @click="goback">取消</el-button> <el-button @click="goback">取消</el-button>
</GLFooter> </GLFooter>
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisible = false" type="warning" content="当前有内容信息未保存,是否继续返回?" :visible.sync="dialogVisible" mode="small"></GLDialog>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp> <select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
<select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag> <select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag>
</div> </div>
...@@ -95,16 +96,16 @@ ...@@ -95,16 +96,16 @@
<script> <script>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import Vue from 'vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import welcomeWords from '@/components/welcome/welcomeWords.vue' import word from '@/mixins/word'
export default { export default {
mixins: [word],
name: 'addCode', name: 'addCode',
components: { welcomeWords, selectEmp, selectTag }, components: { selectEmp, selectTag },
data() { data() {
return { return {
eventBus: new Vue(), dialogVisible: false,
addCodeForm: { addCodeForm: {
codeName: '', codeName: '',
codeRemark: '', codeRemark: '',
...@@ -164,17 +165,14 @@ export default { ...@@ -164,17 +165,14 @@ export default {
}) })
}) })
if (this.editStatus || (this.$refs.welcome.previewList.length > 0 && !this.codeId)) { if (this.editStatus || (this.$refs.welcome.previewList.length > 0 && !this.codeId)) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', { this.dialogVisible = true
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$router.push('/channel/index')
})
} else { } else {
this.$router.push('/channel/index') this.$router.push('/channel/index')
} }
}, },
handleSure() {
this.$router.push('/channel/index')
},
removeTag(item, idx, index) { removeTag(item, idx, index) {
item.labelList.splice(idx, 1) item.labelList.splice(idx, 1)
if (item.labelList.length == 0) { if (item.labelList.length == 0) {
...@@ -202,7 +200,7 @@ export default { ...@@ -202,7 +200,7 @@ export default {
tagSelected(item) { tagSelected(item) {
this.tagging = item this.tagging = item
}, },
handleSave: utils.debounce(function () { handleSave: utils.debounce(function() {
if (this.staffInfo.length == 0) { if (this.staffInfo.length == 0) {
this.staffStatus = true this.staffStatus = true
return return
...@@ -296,7 +294,7 @@ export default { ...@@ -296,7 +294,7 @@ export default {
this.previewListStart = this.$common.utils.deepClone(this.$refs.welcome.previewList) this.previewListStart = this.$common.utils.deepClone(this.$refs.welcome.previewList)
}) })
}) })
}, }
// resize() { // resize() {
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft // this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft // this.footerWidth = document.documentElement.clientWidth - this.footerLeft
...@@ -317,7 +315,7 @@ export default { ...@@ -317,7 +315,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main-welcome { .channel-main-welcome {
margin: 20px 0px 60px; margin: 20px 0px 16px;
.welcome-panel { .welcome-panel {
margin: 10px; margin: 10px;
padding: 0px 20px 20px; padding: 0px 20px 20px;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<GLButton type="primary" size="small" icon="el-icon-add" @click="handleAddCode" fn="新增活码">新建渠道活码</GLButton> <GLButton type="primary" size="small" icon="el-icon-add" @click="handleAddCode" fn="新增活码">新建渠道活码</GLButton>
</div> </div>
<div class="form-panel scrm-box-f"> <div class="form-panel scrm-box-f">
<GLCombiForm 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 v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams"> <GLTable v-loading="loading" ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="到店咨询客户数据">数据</GLButton> <GLButton type="text" @click="handleDetail(scope.scope)" fn="到店咨询客户数据">数据</GLButton>
...@@ -22,26 +22,49 @@ ...@@ -22,26 +22,49 @@
</div> </div>
<div slot="staffInfo" slot-scope="scope"> <div slot="staffInfo" slot-scope="scope">
<el-popover trigger="hover" placement="top" v-if="staffNameSplit(scope.scope.staffName).length > 3"> <el-popover trigger="hover" placement="top" v-if="staffNameSplit(scope.scope.staffName).length > 3">
<div class="accountType-row" v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index"> <GLFull
<i class="el-icon-user-solid"></i> :labelWidth="110"
<GLTitle :content="item" textLength="4"></GLTitle> :label="item"
</div> textType="user"
:identi="
`text_${Math.random()
.toString()
.replace('.', '')}`
"
v-for="(item, index) in staffNameSplit(scope.scope.staffName)"
:key="index"
></GLFull>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<div v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-show="index < 4"> <div v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-show="index < 4">
<template v-if="index == 3 && staffNameSplit(scope.scope.staffName).length > 3">
<div class="accountType-row"> <div class="accountType-row">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
<span v-if="index == 3 && staffNameSplit(scope.scope.staffName).length > 3">{{ '...(' + staffNameSplit(scope.scope.staffName).length + ')' }}</span> <span>{{ '...(' + staffNameSplit(scope.scope.staffName).length + ')' }}</span>
<GLTitle :content="item" textLength="4" v-else></GLTitle>
</div> </div>
</template>
<GLFull :labelWidth="110" :label="item" textType="user" v-if="index < 3"></GLFull>
</div> </div>
</div> </div>
</el-popover> </el-popover>
<div v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-else> <GLFull
:labelWidth="110"
:label="item"
textType="user"
:identi="
`text_${Math.random()
.toString()
.replace('.', '')}`
"
v-for="(item, index) in staffNameSplit(scope.scope.staffName)"
:key="index"
v-else
></GLFull>
<!-- <div v-for="(item, index) in staffNameSplit(scope.scope.staffName)" :key="index" v-else>
<div class="accountType-row"> <div class="accountType-row">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
<GLTitle :content="item" textLength="4"></GLTitle> <GLTitle :content="item" textLength="4"></GLTitle>
</div> </div>
</div> </div> -->
</div> </div>
<div slot="qrCode" slot-scope="scope"> <div slot="qrCode" slot-scope="scope">
<el-popover placement="bottom" width="400" trigger="click"> <el-popover placement="bottom" width="400" trigger="click">
...@@ -77,6 +100,7 @@ ...@@ -77,6 +100,7 @@
</div> </div>
</GLTable> </GLTable>
</div> </div>
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisibleDel = false" type="error" content="是否删除?" :visible.sync="dialogVisibleDel" mode="small"></GLDialog>
<emp-detail ref="empDetailForm"></emp-detail> <emp-detail ref="empDetailForm"></emp-detail>
</div> </div>
</template> </template>
...@@ -89,6 +113,8 @@ export default { ...@@ -89,6 +113,8 @@ export default {
name: 'channelList', name: 'channelList',
data() { data() {
return { return {
dialogVisibleDel: false,
selectItem: '',
loading: false, loading: false,
tableSearchForm: { tableSearchForm: {
staffName: '', staffName: '',
...@@ -215,18 +241,13 @@ export default { ...@@ -215,18 +241,13 @@ export default {
}) })
.catch(() => {}) .catch(() => {})
}, },
handleDelete(scope) { handleSure() {
this.$confirm('是否删除?', '提示', { const { id, codeUuid, configId } = this.selectItem
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.channel this.$apis.channel
.deleteChannelCode({ .deleteChannelCode({
id: scope.id, id,
codeUuid: scope.codeUuid, codeUuid,
configId: scope.configId configId
}) })
.then(res => { .then(res => {
if (res) { if (res) {
...@@ -237,8 +258,11 @@ export default { ...@@ -237,8 +258,11 @@ export default {
} }
this.handleSearch() this.handleSearch()
}) })
}) this.dialogVisibleDel = false
.catch(() => {}) },
handleDelete(scope) {
this.dialogVisibleDel = true
this.selectItem = scope
}, },
listChannelCodeByPage() { listChannelCodeByPage() {
const params = { const params = {
......
<template> <template>
<div class="square-main"> <div class="square-main">
<el-dialog title="选择渠道" :visible.sync="dialogVisible" width="70%" :before-close="handleCancel"> <GLDialog title="选择渠道" :visible.sync="dialogVisible" @onOk="handleSelect" @onCancel="handleCancel" mode="big">
<div class="square-tabel"> <div class="square-tabel">
<div class="square-tabel-select"> <div class="square-tabel-select">
<GLTable ref="table" :hasPage="false" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable> <GLTable ref="table" :hasPage="false" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="selected-panel"> <div class="selected-panel">
<div class="selected-item" v-for="(item, index) in selectedList" :key="index"> <div class="selected-item" v-for="(item, index) in selectedList" :key="index">
<div :title="item.codeName"> <div :title="item.codeName">
<span :style="{ background: colorList[index]}"></span> <span :style="{ background: colorList[index] }"></span>
{{ item.codeName }} {{ item.codeName }}
</div> </div>
<img src="@/assets/img/channel/del.png" @click="delTag(item)" /> <img src="@/assets/img/channel/del.png" @click="delTag(item)" />
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<el-button size="small" @click="handleCancel">取 消</el-button> <el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span> </span>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
this.dialogVisible = false this.dialogVisible = false
this.$refs.table.$refs.salelistMutiTable.clearSelection() this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, },
handleSelect: utils.debounce(function () { handleSelect: utils.debounce(function() {
if (this.selectedList.length == 0) { if (this.selectedList.length == 0) {
this.$message.error('请选择渠道') this.$message.error('请选择渠道')
return return
......
<template> <template>
<div class="channel-main scrm-box-f" v-loading="loading"> <div class="channel-main scrm-box-f" v-loading="loading">
<div class="channel-header">
<el-button type="primary" size="small" @click="goBack">返回</el-button>
</div>
<div class="poster-body"> <div class="poster-body">
<div class="poster-item" @click="setPoster(item)" @mouseenter="item.show = true" @mouseleave="item.show = false" v-for="(item, index) in posterList" :key="index"> <div class="poster-item" @click="setPoster(item)" @mouseenter="item.show = true" @mouseleave="item.show = false" v-for="(item, index) in posterList" :key="index">
<div class="poster-del" v-show="item.show" @click.stop="handleDelete(item.id)"> <div class="poster-del" v-show="item.show" @click.stop="handleDelete(item.id)">
...@@ -36,7 +33,7 @@ ...@@ -36,7 +33,7 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog v-loading="loadingDrag" title="创建活码海报" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <GLDialog @onOk="savePoster" @onCancel="dialogVisible = false" v-loading="loadingDrag" title="创建活码海报" :visible.sync="dialogVisible">
<div class="poster-draggable-title">拖动活码可调整活码位置</div> <div class="poster-draggable-title">拖动活码可调整活码位置</div>
<div class="poster-draggable"> <div class="poster-draggable">
<div <div
...@@ -66,11 +63,11 @@ ...@@ -66,11 +63,11 @@
></vue-draggable-resizable> ></vue-draggable-resizable>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <!-- <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="savePoster">确 定</el-button> <el-button size="small" type="primary" @click="savePoster">确 定</el-button>
</span> </span> -->
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
......
<template> <template>
<div class="channel-main scrm-box-f"> <div class="channel-main scrm-box-f">
<div><el-button type="primary" size="small" @click="goback">返回</el-button></div>
<div class="detail-form"> <div class="detail-form">
<el-form :model="detailCodeForm" label-width="120px"> <el-form :model="detailCodeForm" label-width="120px">
<el-row> <el-row>
...@@ -34,7 +33,7 @@ ...@@ -34,7 +33,7 @@
<div class="count-panel"> <div class="count-panel">
<div class="count-panel-item"> <div class="count-panel-item">
<div class="count-item-title">今日新增客户</div> <div class="count-item-title">今日新增客户</div>
<div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'day')" v-if="detailCodeForm.yesTodayAddCount">{{ detailCodeForm.yesTodayAddCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm, 'day')" v-if="detailCodeForm.yesTodayAddCount">{{ detailCodeForm.yesTodayAddCount }}人</div>
<div class="count-item-num2" v-else>0人</div> <div class="count-item-num2" v-else>0人</div>
<img src="@/assets/img/channel/count3.png" class="count-item-icon" /> <img src="@/assets/img/channel/count3.png" class="count-item-icon" />
</div> </div>
...@@ -51,7 +50,7 @@ ...@@ -51,7 +50,7 @@
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
</div> </div>
<div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'status')" v-if="detailCodeForm.newlyKeepCount">{{ detailCodeForm.newlyKeepCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm, 'status')" v-if="detailCodeForm.newlyKeepCount">{{ detailCodeForm.newlyKeepCount }}人</div>
<div class="count-item-num2" v-else>0人</div> <div class="count-item-num2" v-else>0人</div>
<img src="@/assets/img/channel/count1.png" class="count-item-icon" /> <img src="@/assets/img/channel/count1.png" class="count-item-icon" />
</div> </div>
...@@ -73,11 +72,11 @@ ...@@ -73,11 +72,11 @@
</GLTable> </GLTable>
<GLTable v-show="activeName == 2" @refreshTable="listStaff" :layout="layout" :tableTotal="tableTotal" ref="memberTabel" :tableData="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false"> <GLTable v-show="activeName == 2" @refreshTable="listStaff" :layout="layout" :tableTotal="tableTotal" ref="memberTabel" :tableData="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false">
<div slot="newlyCount" slot-scope="scope"> <div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'staffIds')" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div> <div class="link-dialog" @click="handleEmpDetail(scope.scope, 'staffIds')" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div> <div v-else>0</div>
</div> </div>
<div slot="newlyKeepCount" slot-scope="scope"> <div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'statusAndStaffIds')" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div> <div class="link-dialog" @click="handleEmpDetail(scope.scope, 'statusAndStaffIds')" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div> <div v-else>0</div>
</div> </div>
</GLTable> </GLTable>
...@@ -155,8 +154,8 @@ export default { ...@@ -155,8 +154,8 @@ export default {
goback() { goback() {
this.$router.push('/channel/index') this.$router.push('/channel/index')
}, },
handleEmpDetail(scope,status,day) { handleEmpDetail(scope, status, day) {
this.$refs.empDetailForm.init(scope,status,day) this.$refs.empDetailForm.init(scope, status, day)
}, },
detailChannelCode(id, codeUuid) { detailChannelCode(id, codeUuid) {
let param = { let param = {
......
...@@ -164,18 +164,11 @@ ...@@ -164,18 +164,11 @@
</div> </div>
</div> </div>
</div> </div>
<div <GLFooter v-if="(editStatus && !configType) || configType">
v-if="(editStatus && !configType) || configType"
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleSave" v-if="!configType">确定</el-button> <el-button type="primary" @click="handleSave" v-if="!configType">确定</el-button>
<el-button type="primary" @click="goback" v-if="configType">返回</el-button> <el-button type="primary" @click="goback" v-if="configType">返回</el-button>
<el-button @click="handleCancel" v-if="!configType">取消</el-button> <el-button @click="handleCancel" v-if="!configType">取消</el-button>
</div> </GLFooter>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp> <select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
</div> </div>
</template> </template>
...@@ -351,7 +344,10 @@ export default { ...@@ -351,7 +344,10 @@ export default {
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
.drainage-wrap { .drainage-wrap {
margin-bottom: 20px; margin-bottom: 16px;
&:nth-child(2) {
min-height: calc(100vh - 490px);
}
.drainage-title { .drainage-title {
padding-left: 20px; padding-left: 20px;
font-size: 16px; font-size: 16px;
......
...@@ -96,6 +96,10 @@ ...@@ -96,6 +96,10 @@
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" /> <img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ item.attContent }}</span> <span>{{ item.attContent }}</span>
</div> </div>
<div v-else-if="item.attType == 6">
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ JSON.parse(item.attContent).fileName }}</span>
</div>
<div v-else-if="item.attType == 7"> <div v-else-if="item.attType == 7">
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" /> <img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ item.attContent.marketingName }}</span> <span>{{ item.attContent.marketingName }}</span>
...@@ -149,7 +153,7 @@ export default { ...@@ -149,7 +153,7 @@ export default {
}, },
watch: { watch: {
'addForm.content': { 'addForm.content': {
handler: function () { handler: function() {
this.content = [] this.content = []
let str = this.addForm.content let str = this.addForm.content
let num = 70 let num = 70
...@@ -185,7 +189,7 @@ export default { ...@@ -185,7 +189,7 @@ export default {
deep: true deep: true
}, },
tagging: { tagging: {
handler: function () { handler: function() {
this.taggingLength = 0 this.taggingLength = 0
this.tagging.forEach(item => { this.tagging.forEach(item => {
this.taggingLength += item.labelList.length this.taggingLength += item.labelList.length
...@@ -217,9 +221,10 @@ export default { ...@@ -217,9 +221,10 @@ export default {
this.autoWelcome = res.autoWelcome ? true : false this.autoWelcome = res.autoWelcome ? true : false
const previewList = res.dracScrmWelcomeConfigDTOS.map(item => { const previewList = res.dracScrmWelcomeConfigDTOS.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
if (item.attType == 1) item.attContent = item.attContent.replaceAll('[@昵称]', '<span style="color:#5850FF">@昵称</span>') if (item.attType == 1) item.attContent = item.attContent.replaceAll('[@昵称]', '<span style="color:#5850FF">@昵称</span>').replaceAll(/\n/g, '<br>')
return item return item
}) })
console.log(previewList)
this.welcomeInfo = previewList this.welcomeInfo = previewList
const tagging = eval(res.tagging) const tagging = eval(res.tagging)
const taggingList = tagging.map(item => { const taggingList = tagging.map(item => {
...@@ -254,7 +259,7 @@ export default { ...@@ -254,7 +259,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main-welcome { .channel-main-welcome {
margin: 20px 0px 60px; margin: 20px 0px 16px;
.chanel-form-title { .chanel-form-title {
padding-left: 20px; padding-left: 20px;
font-size: 16px; font-size: 16px;
......
...@@ -25,6 +25,13 @@ ...@@ -25,6 +25,13 @@
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button> <el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div> </div>
</GLTable> </GLTable>
<GLDialog title="提示" :hasFooter="true" :content="messageContent" :visible.sync="dialogVisible" mode="small">
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="dialogVisible = false">
确定
</el-button>
</span>
</GLDialog>
</div> </div>
</div> </div>
</template> </template>
...@@ -36,7 +43,9 @@ export default { ...@@ -36,7 +43,9 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
messageContent: '',
tableSearchForm: {}, tableSearchForm: {},
dialogVisible: false,
tableData: [], tableData: [],
optionstatus: [ optionstatus: [
{ {
...@@ -88,7 +97,8 @@ export default { ...@@ -88,7 +97,8 @@ export default {
}, },
methods: { methods: {
handleDetail(scope) { handleDetail(scope) {
this.$alert(scope.content, { center: true }) this.dialogVisible = true
this.messageContent = scope.content
}, },
handleSearch() { handleSearch() {
this.listChannelCodeByPage() this.listChannelCodeByPage()
......
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
<el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch v-model="autoWelcome" :disabled="!editStatus" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
<div class="welcome-box" v-show="editStatus && autoWelcome"> <div class="welcome-box" v-show="editStatus && autoWelcome">
<welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> <GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div> </div>
<div class="welcome-box" v-show="!editStatus && autoWelcome"> <div class="welcome-box" v-show="!editStatus && autoWelcome">
<div class="welcome-box-contaner"> <div class="welcome-box-contaner">
...@@ -226,16 +226,10 @@ ...@@ -226,16 +226,10 @@
</div> </div>
</div> </div>
</div> </div>
<div <GLFooter>
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleSave">提交</el-button>
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
</div> <el-button type="primary" @click="handleSave">提交</el-button>
</GLFooter>
<div class="import-panel" v-if="importStatus"> <div class="import-panel" v-if="importStatus">
<div class="import-panel-box"> <div class="import-panel-box">
<div class="import-title">操作结果</div> <div class="import-title">操作结果</div>
...@@ -255,6 +249,7 @@ ...@@ -255,6 +249,7 @@
</div> </div>
</div> </div>
</div> </div>
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisible = false" type="warning" content="当前有内容信息未保存,是否继续返回?" :visible.sync="dialogVisible" mode="small"></GLDialog>
<select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp> <select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp>
<select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag> <select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag>
<screen-tag ref="screenTagForm" @tagScreened="tagScreened"></screen-tag> <screen-tag ref="screenTagForm" @tagScreened="tagScreened"></screen-tag>
...@@ -266,7 +261,7 @@ ...@@ -266,7 +261,7 @@
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import welcomeWords from '@/components/welcome/welcomeWords.vue' import word from '@/mixins/word'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import screenTag from '@/components/screenTag' import screenTag from '@/components/screenTag'
...@@ -289,14 +284,14 @@ const validateContent = (rule, value, callback) => { ...@@ -289,14 +284,14 @@ const validateContent = (rule, value, callback) => {
} }
} }
export default { export default {
mixins: [word],
name: 'config', name: 'config',
components: { components: {
selectEmp, selectEmp,
selectTag, selectTag,
screenTag, screenTag,
selectCrowd, selectCrowd,
messageModel, messageModel
welcomeWords
}, },
data() { data() {
return { return {
...@@ -304,7 +299,6 @@ export default { ...@@ -304,7 +299,6 @@ export default {
selectType: 1, selectType: 1,
loading: false, loading: false,
welcomeInfo: [], welcomeInfo: [],
eventBus: new Vue(),
taggingLength: 0, taggingLength: 0,
autoWelcome: true, autoWelcome: true,
imName: '', imName: '',
...@@ -329,7 +323,7 @@ export default { ...@@ -329,7 +323,7 @@ export default {
labeling: [], labeling: [],
crowding: [], crowding: [],
messageItem: {}, messageItem: {},
dialogVisible: true, dialogVisible: false,
value: false, value: false,
value1: false, value1: false,
dracImFollowStaffResponses: [], dracImFollowStaffResponses: [],
...@@ -478,16 +472,13 @@ export default { ...@@ -478,16 +472,13 @@ export default {
goback() { goback() {
this.importStatus = false this.importStatus = false
}, },
handleSure() {
this.$router.push('/market/index')
},
handleCancel() { handleCancel() {
console.log(this.saveStatus) console.log(this.saveStatus)
if (this.saveStatus || (this.$refs.welcome && this.$refs.welcome.previewList.length > 0 && this.editStatus)) { if (this.saveStatus || (this.$refs.welcome && this.$refs.welcome.previewList.length > 0 && this.editStatus)) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', { this.dialogVisible = true
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$router.push('/market/index')
})
} else { } else {
this.$router.push('/market/index') this.$router.push('/market/index')
} }
...@@ -887,13 +878,13 @@ export default { ...@@ -887,13 +878,13 @@ export default {
} }
} }
.drainage-wrap { .drainage-wrap {
margin-bottom: 20px; margin-bottom: 16px;
&:nth-child(2) { &:nth-child(2) {
margin-bottom: 20px; margin-bottom: 20px;
} }
&.drainage-bottom { &.drainage-bottom {
margin-bottom: 60px; margin-bottom: 16px;
} }
.drainage-title { .drainage-title {
padding-left: 20px; padding-left: 20px;
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<el-tab-pane label="客户列表" name="second"></el-tab-pane> <el-tab-pane label="客户列表" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
<component :is="activeName == 'first' ? configInfo : customList"></component> <component :is="activeName == 'first' ? configInfo : customList"></component>
<GLFooter> <!-- <GLFooter>
<el-button type="primary" @click="goback">返回</el-button> <el-button type="primary" @click="goback">返回</el-button>
</GLFooter> </GLFooter> -->
</div> </div>
</template> </template>
......
...@@ -24,6 +24,13 @@ ...@@ -24,6 +24,13 @@
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button> <el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div> </div>
</GLTable> </GLTable>
<GLDialog title="提示" :hasFooter="true" :content="messageContent" :visible.sync="dialogVisible" mode="small">
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="dialogVisible = false">
确定
</el-button>
</span>
</GLDialog>
</div> </div>
</template> </template>
...@@ -36,8 +43,10 @@ export default { ...@@ -36,8 +43,10 @@ export default {
}, },
data() { data() {
return { return {
messageContent: '',
totalCount: 0, totalCount: 0,
percentage: 0, percentage: 0,
dialogVisible: false,
optionstatus: [ optionstatus: [
{ {
value: '', value: '',
...@@ -138,7 +147,8 @@ export default { ...@@ -138,7 +147,8 @@ export default {
this.$refs.employeeRef.refreshTable() this.$refs.employeeRef.refreshTable()
}, },
handleDetail(scope) { handleDetail(scope) {
this.$alert(scope.content, { center: true }) this.dialogVisible = true
this.messageContent = scope.content
} }
}, },
mounted() { mounted() {
......
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
} }
} }
.store-panel { .store-panel {
margin: 20px auto; margin: 16px auto;
padding: 20px; padding: 20px;
display: flex; display: flex;
.store-panel-item { .store-panel-item {
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
} }
} }
.statistics-main { .statistics-main {
margin-top: 20px; margin-top: 16px;
.statistics-title { .statistics-title {
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" top="30vh"> <GLDialog @onOk="handleSure" @onCancel="handleCancel" title="提示" :visible.sync="dialogVisible" mode="small">
<div class="dialog-body"> <div class="dialog-body">
<div class="dialog-tips-icon"><i class="el-icon-warning"></i></div> <div class="dialog-tips-icon"><i class="el-icon-warning"></i></div>
<div class="dialog-tips-text">点击继续将开始上传数据文件</div> <div class="dialog-tips-text">点击继续将开始上传数据文件</div>
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
,是否继续吗? ,是否继续吗?
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <!-- <div slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel"> <el-button size="small" @click="handleCancel">
取 消 取 消
</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 class="loading-containner" v-if="processLoading"></div> <div class="loading-containner" v-if="processLoading"></div>
</div> </div>
</template> </template>
......
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
<el-switch :disabled="!editStatus" v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch :disabled="!editStatus" v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
<div class="welcome-box" v-show="editStatus && autoWelcome"> <div class="welcome-box" v-show="editStatus && autoWelcome">
<welcome-words :eventBus="eventBus" ref="welcome"></welcome-words> <GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div> </div>
<div class="welcome-box" v-show="!editStatus && autoWelcome"> <div class="welcome-box" v-show="!editStatus && autoWelcome">
<div class="welcome-box-contaner"> <div class="welcome-box-contaner">
...@@ -275,13 +275,14 @@ ...@@ -275,13 +275,14 @@
</div> </div>
</div> </div>
</div> </div>
<GLDialog title="提示" @onOk="handleSure" @onCancel="dialogVisibleTips = false" type="warning" content="当前有内容信息未保存,是否继续返回?" :visible.sync="dialogVisibleTips" mode="small"></GLDialog>
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import word from '@/mixins/word'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import welcomeWords from '@/components/welcome/welcomeWords.vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import messageModel from '../market/components/messageModel' import messageModel from '../market/components/messageModel'
...@@ -293,16 +294,17 @@ const validateTime = (rule, value, callback) => { ...@@ -293,16 +294,17 @@ const validateTime = (rule, value, callback) => {
} }
} }
export default { export default {
mixins: [word],
name: 'drainage', name: 'drainage',
components: { components: {
selectEmp, selectEmp,
selectTag, selectTag,
messageModel, messageModel
welcomeWords
}, },
data() { data() {
return { return {
welcomeInfo: [], welcomeInfo: [],
dialogVisibleTips: false,
eventBus: new Vue(), eventBus: new Vue(),
autoWelcome: true, autoWelcome: true,
editStatus: false, editStatus: false,
...@@ -441,17 +443,14 @@ export default { ...@@ -441,17 +443,14 @@ export default {
this.saveStatus = true this.saveStatus = true
} }
if (this.saveStatus) { if (this.saveStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', { this.dialogVisibleTips = true
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$router.go(-1)
})
} else { } else {
this.$router.go(-1) this.$router.go(-1)
} }
}, },
handleSure() {
this.$router.go(-1)
},
//开关 //开关
handleSwitch() { handleSwitch() {
let params = { let params = {
...@@ -598,7 +597,7 @@ export default { ...@@ -598,7 +597,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main-welcome { .channel-main-welcome {
margin: 20px 0px 60px; margin: 20px 0px 16px;
.chanel-form-title { .chanel-form-title {
padding-left: 20px; padding-left: 20px;
font-size: 16px; font-size: 16px;
......
...@@ -417,8 +417,8 @@ export default { ...@@ -417,8 +417,8 @@ export default {
} }
.squre-safe-panel { .squre-safe-panel {
padding: 40px; padding: 40px;
margin-top: 20px; margin-top: 10px;
// margin-bottom: 60px; margin-bottom: 16px;
/deep/ { /deep/ {
.el-carousel__indicators, .el-carousel__indicators,
.el-carousel__arrow { .el-carousel__arrow {
...@@ -509,7 +509,6 @@ export default { ...@@ -509,7 +509,6 @@ export default {
margin: 40px 0px; margin: 40px 0px;
height: 328px; height: 328px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 0px 20px 0px rgba(88, 80, 255, 0.1);
border-radius: 2px; border-radius: 2px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -482,7 +482,6 @@ export default { ...@@ -482,7 +482,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;
.square-num-item { .square-num-item {
width: 50%; width: 50%;
...@@ -516,7 +515,7 @@ export default { ...@@ -516,7 +515,7 @@ export default {
} }
} }
.coustom-box-container { .coustom-box-container {
margin-top: 20px; margin-top: 16px;
background: #ffffff; background: #ffffff;
.square-title { .square-title {
height: 55px; height: 55px;
...@@ -633,7 +632,7 @@ export default { ...@@ -633,7 +632,7 @@ export default {
} }
.square-tabel { .square-tabel {
padding: 20px; padding: 20px;
margin-top: 20px; margin-top: 16px;
} }
.table-btns a { .table-btns a {
color: #5850ff; color: #5850ff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!