Commit 90a3d1d0 by yangming

new

1 parent 6e72223e
<template>
<div class="ly-emotion" >
<slot></slot>
</div>
</template>
<script>
export default {
name: 'ly-emotion',
mounted () {
const name = this.$el.innerHTML
const list = ['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴', '睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过', '酷', '冷汗', '抓狂', '吐', '偷笑', '可爱', '白眼', '傲慢', '饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂', '疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见', '擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠', '鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀', '西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰', '凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀', '足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强', '弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你', 'NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈', '磕头', '回头', '跳绳', '挥手', '激动', '街舞', '献吻', '左太极', '右太极']
let index = list.indexOf(name)
let imgHTML = `<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/${index}.gif">`
this.$nextTick(() => {
this.$el.innerHTML = imgHTML
})
},
}
</script>
<style scoped>
.ly-emotion {
display: inline-block
}
.ly-static-emotion {
width: 24px;
height: 24px;
display: inline-block;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<div class="emotion-box" :style="{ height: height + 'px' }">
<div class="emotion-box-line" v-for="(line, i) in list" :key="i">
<emotion class="emotion-item" v-for="(item, i) in line" :key="i" @click.native="clickHandler(item)">{{ item }}</emotion>
</div>
</div>
</div>
</template>
<script>
import Emotion from './Emotion'
export default {
props: {
height: {
type: Number,
default: 200
}
},
data() {
return {
list: [
['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴'],
['睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过'][('酷', '冷汗', '抓狂', '吐', '偷笑', '可爱', '白眼', '傲慢')],
['饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂'],
['疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见'],
['擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠'],
['鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀'],
['西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰'],
['凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀'],
['足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强'],
['弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你'],
['NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈'],
['磕头', '回头', '跳绳', '挥手', '激动', '街舞', '左太极', '右太极']
]
}
},
methods: {
clickHandler(i) {
let emotion = `${i}`
this.$emit('emotion', emotion)
}
},
components: {
Emotion
}
}
</script>
<style scoped lang="scss">
.emotion-box {
z-index: 2004;
background-color: #fff;
border-radius: 2px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
width: 300px;
box-sizing: border-box;
padding: 5px;
overflow: hidden;
overflow-y: auto;
}
.emotion-box-line {
display: flex;
}
.emotion-item {
flex: 1;
text-align: center;
cursor: pointer;
/deep/ {
img {
width: 24px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -173,6 +173,12 @@ export default { ...@@ -173,6 +173,12 @@ export default {
node.target = 'blank' node.target = 'blank'
this.insertNode(node) this.insertNode(node)
}, },
addImg(url) {
// 创建a标签
let node = document.createElement('img')
node.src = url
this.insertNode(node)
},
insertNode(node) { insertNode(node) {
// 在内容中插入标签 // 在内容中插入标签
// 删掉选中的内容(如有) // 删掉选中的内容(如有)
...@@ -186,7 +192,16 @@ export default { ...@@ -186,7 +192,16 @@ export default {
} else { } else {
this.updateData(target.innerHTML) this.updateData(target.innerHTML)
} }
this.currentText = target.innerText let htm = target.innerHTML
const list = ['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴', '睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过', '酷', '冷汗', '抓狂', '吐', '偷笑', '可爱', '白眼', '傲慢', '饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂', '疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见', '擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠', '鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀', '西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰', '凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀', '足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强', '弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你', 'NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈', '磕头', '回头', '跳绳', '挥手', '激动', '街舞', '献吻', '左太极', '右太极']
const cutImg = htm.replaceAll('<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/','')
const replaceImg = cutImg.replace(/(\d).gif">/g,function(str){
let s = list[str.split('.')[0]]
return `[${s}]`
})
let Textnode = document.createElement('div')
Textnode.innerHTML = replaceImg
this.currentText = Textnode.innerText
this.$emit('updateText', this.currentText) this.$emit('updateText', this.currentText)
}, },
placeCaretAtEnd(el) { placeCaretAtEnd(el) {
...@@ -209,7 +224,18 @@ export default { ...@@ -209,7 +224,18 @@ export default {
handleInput(target) { handleInput(target) {
// 即时更新数据 // 即时更新数据
this.updateData(target.innerHTML) this.updateData(target.innerHTML)
this.currentText = target.innerText let htm = target.innerHTML
console.log(htm)
const list = ['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴', '睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过', '酷', '冷汗', '抓狂', '吐', '偷笑', '可爱', '白眼', '傲慢', '饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂', '疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见', '擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠', '鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀', '西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰', '凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀', '足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强', '弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你', 'NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈', '磕头', '回头', '跳绳', '挥手', '激动', '街舞', '献吻', '左太极', '右太极']
const cutImg = htm.replaceAll('<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/','')
console.log(cutImg)
const replaceImg = cutImg.replace(/(\d).gif">/g,function(str){
let s = list[str.split('.')[0]]
return `[${s}]`
})
let Textnode = document.createElement('div')
Textnode.innerHTML = replaceImg
this.currentText = Textnode.innerText
this.$emit('updateText', this.currentText) this.$emit('updateText', this.currentText)
}, },
handleDelete(e) { handleDelete(e) {
...@@ -241,7 +267,6 @@ export default { ...@@ -241,7 +267,6 @@ export default {
} else { } else {
this.currentTagId = null this.currentTagId = null
} }
}, },
getGuid() { getGuid() {
// 生成随机ID // 生成随机ID
...@@ -284,6 +309,10 @@ export default { ...@@ -284,6 +309,10 @@ export default {
cursor: default; cursor: default;
-webkit-user-modify: read-only !important; -webkit-user-modify: read-only !important;
} }
img {
width: 24px;
height: 24px;
}
.active { .active {
background: #dcdfe6; background: #dcdfe6;
} }
......
...@@ -45,17 +45,21 @@ ...@@ -45,17 +45,21 @@
<div class="btn-group"> <div class="btn-group">
<div class="add-btn" v-for="item in btnList" :key="item.id"> <div class="add-btn" v-for="item in btnList" :key="item.id">
<!-- <i class="el-icon-circle-plus-outline"></i> --> <!-- <i class="el-icon-circle-plus-outline"></i> -->
<img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" alt /> <img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" />
<span>{{ item.name }}</span> <img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" v-else alt />
<span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span>
<span v-else>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" /> <input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" /> <input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<el-link v-else style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link> <el-link v-else-if="item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
<div v-show="emotionStatus" class="emotion-panel"><emotion class="emotion-panel-box" @emotion="handleEmotion" :height="280"></emotion></div>
<div class="tips-text"> <div class="tips-text">
<img src="@/assets/img/guestCustom/tips.png" class="tips-icon" alt /> <img src="@/assets/img/guestCustom/tips.png" class="tips-icon" alt />
<span>如在企业微信管理后台已为所选员工设置了欢迎语,则此处设置的将不生效。</span> <span @click="selectEmotion">如在企业微信管理后台已为所选员工设置了欢迎语,则此处设置的将不生效。</span>
</div> </div>
</div> </div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel> <ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel>
...@@ -73,26 +77,29 @@ const ATT_TYPE = { ...@@ -73,26 +77,29 @@ const ATT_TYPE = {
} }
// import E from 'wangeditor' // import E from 'wangeditor'
import ActivityModel from './activityModel' import ActivityModel from './activityModel'
import Emotion from './emotionWords'
import wTextarea from './tag-textarea' import wTextarea from './tag-textarea'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
export default { export default {
name: 'WelcomeWords', name: 'WelcomeWords',
components: { components: {
ActivityModel, ActivityModel,
Emotion,
wTextarea wTextarea
}, },
props: { eventBus: Object }, props: { eventBus: Object },
data() { data() {
return { return {
loading: false, loading: false,
emotionStatus: false,
btnList: [ btnList: [
// { {
// id: 1, id: 1,
// name: '表情', name: '表情',
// funcName: '', funcName: '',
// type: 'expression', type: 'expression',
// limitSize: 10 limitSize: 10
// }, },
{ {
id: 2, id: 2,
name: '图片', name: '图片',
...@@ -140,6 +147,121 @@ export default { ...@@ -140,6 +147,121 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
}, },
methods: { methods: {
selectEmotion() {
this.emotionStatus = !this.emotionStatus
},
handleEmotion(i) {
this.emotionStatus = false
const list = [
'微笑',
'撇嘴',
'色',
'发呆',
'得意',
'流泪',
'害羞',
'闭嘴',
'睡',
'大哭',
'尴尬',
'发怒',
'调皮',
'呲牙',
'惊讶',
'难过',
'酷',
'冷汗',
'抓狂',
'吐',
'偷笑',
'可爱',
'白眼',
'傲慢',
'饥饿',
'困',
'惊恐',
'流汗',
'憨笑',
'大兵',
'奋斗',
'咒骂',
'疑问',
'嘘',
'晕',
'折磨',
'衰',
'骷髅',
'敲打',
'再见',
'擦汗',
'抠鼻',
'鼓掌',
'糗大了',
'坏笑',
'左哼哼',
'右哼哼',
'哈欠',
'鄙视',
'委屈',
'快哭了',
'阴险',
'亲亲',
'吓',
'可怜',
'菜刀',
'西瓜',
'啤酒',
'篮球',
'乒乓',
'咖啡',
'饭',
'猪头',
'玫瑰',
'凋谢',
'示爱',
'爱心',
'心碎',
'蛋糕',
'闪电',
'炸弹',
'刀',
'足球',
'瓢虫',
'便便',
'月亮',
'太阳',
'礼物',
'拥抱',
'强',
'弱',
'握手',
'胜利',
'抱拳',
'勾引',
'拳头',
'差劲',
'爱你',
'NO',
'OK',
'爱情',
'飞吻',
'跳跳',
'发抖',
'怄火',
'转圈',
'磕头',
'回头',
'跳绳',
'挥手',
'激动',
'街舞',
'献吻',
'左太极',
'右太极'
]
let index = list.indexOf(i)
this.$refs.textContent.addImg(`https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/${index}.gif`)
},
updateText(val) { updateText(val) {
this.textInput(val) this.textInput(val)
}, },
...@@ -303,9 +425,121 @@ export default { ...@@ -303,9 +425,121 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
const obj = val.find(item => item.attType == 1) const obj = val.find(item => item.attType == 1)
let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>') let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>')
const htm = attContent.replace(/\[[\u4E00-\u9FA5]{1,3}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = [
'微笑',
'撇嘴',
'色',
'发呆',
'得意',
'流泪',
'害羞',
'闭嘴',
'睡',
'大哭',
'尴尬',
'发怒',
'调皮',
'呲牙',
'惊讶',
'难过',
'酷',
'冷汗',
'抓狂',
'吐',
'偷笑',
'可爱',
'白眼',
'傲慢',
'饥饿',
'困',
'惊恐',
'流汗',
'憨笑',
'大兵',
'奋斗',
'咒骂',
'疑问',
'嘘',
'晕',
'折磨',
'衰',
'骷髅',
'敲打',
'再见',
'擦汗',
'抠鼻',
'鼓掌',
'糗大了',
'坏笑',
'左哼哼',
'右哼哼',
'哈欠',
'鄙视',
'委屈',
'快哭了',
'阴险',
'亲亲',
'吓',
'可怜',
'菜刀',
'西瓜',
'啤酒',
'篮球',
'乒乓',
'咖啡',
'饭',
'猪头',
'玫瑰',
'凋谢',
'示爱',
'爱心',
'心碎',
'蛋糕',
'闪电',
'炸弹',
'刀',
'足球',
'瓢虫',
'便便',
'月亮',
'太阳',
'礼物',
'拥抱',
'强',
'弱',
'握手',
'胜利',
'抱拳',
'勾引',
'拳头',
'差劲',
'爱你',
'NO',
'OK',
'爱情',
'飞吻',
'跳跳',
'发抖',
'怄火',
'转圈',
'磕头',
'回头',
'跳绳',
'挥手',
'激动',
'街舞',
'献吻',
'左太极',
'右太极'
]
let index = list.indexOf(word)
return `<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/${index}.gif">`
})
document.querySelector('.w-textarea_input').focus() document.querySelector('.w-textarea_input').focus()
setTimeout(() => { setTimeout(() => {
document.querySelector('.w-textarea_input').innerHTML = attContent document.querySelector('.w-textarea_input').innerHTML = htm
}, 100) }, 100)
} }
} }
...@@ -315,6 +549,14 @@ export default { ...@@ -315,6 +549,14 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.welcome-box { .welcome-box {
} }
.emotion-panel {
position: relative;
height: 0px;
&-box {
position: absolute;
top: -320px;
}
}
.content-bg { .content-bg {
background-color: #f7f7f7; background-color: #f7f7f7;
} }
......
...@@ -2,8 +2,7 @@ import Vue from 'vue' ...@@ -2,8 +2,7 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLTable} from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLTable,GLButton} from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLButton from 'glsx-components/src/packages/Button'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-show="index < 4"> <div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-show="index < 4">
<div class="accountType-row" > <div class="accountType-row">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ index == 3 && scope.scope.staffInfo.length > 3 ? '...(' + scope.scope.staffInfo.length + ')' : item.staffName }} {{ index == 3 && scope.scope.staffInfo.length > 3 ? '...(' + scope.scope.staffInfo.length + ')' : item.staffName }}
</div> </div>
...@@ -51,22 +51,20 @@ ...@@ -51,22 +51,20 @@
<div slot="tagging" slot-scope="scope" class="tag-panel"> <div slot="tagging" slot-scope="scope" class="tag-panel">
<el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3"> <el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3">
<div :title="item.name" class="accountType-row accountType-row-tag" v-for="(item, index) in scope.scope.taggingList" :key="index"> <div :title="item.name" class="accountType-row accountType-row-tag" v-for="(item, index) in scope.scope.taggingList" :key="index">
{{ item ? item.name : '' }} {{ item.name.length > 8 ? item.name.substring(0, 8)+'...' : item.name }}
</div> </div>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<div v-for="(item, index) in scope.scope.taggingList" :key="index" v-show="index < 4"> <div v-for="(item, index) in scope.scope.taggingList" :key="index" v-show="index < 4">
<div :title="item.name" class="accountType-row accountType-row-tag"> {{ index == 3 && scope.scope.taggingList.length > 3 ? '...('+scope.scope.taggingList.length+')' : item ? item.name : '' }}</div> <div :title="item.name" class="accountType-row accountType-row-tag">{{ index == 3 && scope.scope.taggingList.length > 3 ? '...(' + scope.scope.taggingList.length + ')' : item.name.length > 8 ? item.name.substring(0, 8)+'...' : item.name }}</div>
</div> </div>
</div> </div>
</el-popover> </el-popover>
<template v-if="scope.scope.taggingList && scope.scope.taggingList.length <= 3 && scope.scope.taggingList.length > 0"> <template v-if="scope.scope.taggingList && scope.scope.taggingList.length <= 3 && scope.scope.taggingList.length > 0">
<div v-for="(item, index) in scope.scope.taggingList" :key="index"> <div v-for="(item, index) in scope.scope.taggingList" :key="index">
<div :title="item.name" class="accountType-row accountType-row-tag">{{ item ? item.name : '' }}</div> <div :title="item.name" class="accountType-row accountType-row-tag">{{ item.name.length > 8 ? item.name.substring(0, 8)+'...' : item.name }}</div>
</div> </div>
</template> </template>
<div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)"> <div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">--</div>
--
</div>
</div> </div>
<div slot="codeRemark" slot-scope="scope"> <div slot="codeRemark" slot-scope="scope">
<div class="codeName">{{ scope.scope.codeName }}</div> <div class="codeName">{{ scope.scope.codeName }}</div>
...@@ -247,7 +245,7 @@ export default { ...@@ -247,7 +245,7 @@ export default {
} }
.form-panel { .form-panel {
padding: 20px; padding: 20px;
/deep/ .el-popover{ /deep/ .el-popover {
max-width: 1000px; max-width: 1000px;
} }
} }
......
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
</div> </div>
</div> </div>
<div class="config-title"> <div class="config-title">
<span v-if="!editStatus && !configType" @click="editStatus = true"> <el-button type="primary" icon="el-icon-edit-outline" size="small" v-if="!editStatus && !configType" @click="editStatus = true">编辑配置</el-button>
<label>编辑配置</label>
<i class="el-icon-edit-outline"></i>
</span>
</div> </div>
<div class="config-market" v-if="configType"> <div class="config-market" v-if="configType">
<div class="config-market-item checked"> <div class="config-market-item checked">
...@@ -304,7 +301,7 @@ export default { ...@@ -304,7 +301,7 @@ export default {
if (res) { if (res) {
this.configItem = res this.configItem = res
this.addValue = res.delFlag == 0 ? true : false this.addValue = res.delFlag == 0 ? true : false
this.staffIds = res.staffIds?eval(res.staffIds):[] this.staffIds = res.staffIds ? eval(res.staffIds) : []
} }
}) })
}, },
...@@ -326,12 +323,18 @@ export default { ...@@ -326,12 +323,18 @@ export default {
this.findConfig(1) this.findConfig(1)
this.configType = false this.configType = false
} }
}
}, },
mounted() { resize() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}
},
mounted() {
this.resize()
this.init() this.init()
window.addEventListener('resize', () => {
this.resize()
})
} }
} }
</script> </script>
...@@ -454,6 +457,7 @@ export default { ...@@ -454,6 +457,7 @@ export default {
color: #5850ff; color: #5850ff;
line-height: 40px; line-height: 40px;
height: 40px; height: 40px;
margin: 8px 0px;
span { span {
cursor: pointer; cursor: pointer;
} }
......
<template> <template>
<div class="square-main"> <div class="square-main">
<div class="square-main-header"> <div class="square-main-header">
<el-button type="primary" size="small" @click="addConfig"> <GLButton type="primary" size="small" @click="addConfig" fn="新增营销">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
新增营销 新增营销
</el-button> </GLButton>
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label> <label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
<el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。"> <el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</el-form> </el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">营销配置</el-button> <GLButton type="text" @click="handleDetail(scope.scope)" fn="智能营销配置">营销配置</GLButton>
</div> </div>
</GLTable> </GLTable>
</div> </div>
......
...@@ -172,7 +172,7 @@ export default { ...@@ -172,7 +172,7 @@ export default {
} }
.store-item-s { .store-item-s {
width: 33.33%; width: 33.33%;
padding: 30px 20px; padding: 30px 15px;
.store-item-title { .store-item-title {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
......
...@@ -10,10 +10,7 @@ ...@@ -10,10 +10,7 @@
</div> </div>
</div> </div>
<div class="config-title"> <div class="config-title">
<span v-if="!editStatus" @click="editStatus = true"> <el-button type="primary" icon="el-icon-edit-outline" size="small" v-if="!editStatus" @click="editStatus = true">编辑配置</el-button>
<label>编辑配置</label>
<i class="el-icon-edit-outline"></i>
</span>
</div> </div>
<div class="config-market"> <div class="config-market">
<div class="config-market-item checked"> <div class="config-market-item checked">
...@@ -454,7 +451,7 @@ export default { ...@@ -454,7 +451,7 @@ export default {
console.log(item.attContent) console.log(item.attContent)
item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称') item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称')
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]') item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
} else if (item.attType == 7) { } else if (item.attType == 7 && item.attContent) {
item.attContent = JSON.stringify(item.attContent) item.attContent = JSON.stringify(item.attContent)
} }
return item return item
...@@ -483,7 +480,7 @@ export default { ...@@ -483,7 +480,7 @@ export default {
this.editStatus = false this.editStatus = false
this.$apis.marketing.findConfig({ configType: 3 }).then(res => { this.$apis.marketing.findConfig({ configType: 3 }).then(res => {
if (res) { if (res) {
if(!res.staffIds) { if (!res.staffIds) {
this.addForm.id = res.id this.addForm.id = res.id
this.addForm.content = '' this.addForm.content = ''
return return
...@@ -528,12 +525,18 @@ export default { ...@@ -528,12 +525,18 @@ export default {
} }
} }
}) })
}
}, },
mounted() { resize() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}
},
mounted() {
this.resize()
this.findConfig() this.findConfig()
window.addEventListener('resize', () => {
this.resize()
})
} }
} }
</script> </script>
...@@ -905,6 +908,7 @@ export default { ...@@ -905,6 +908,7 @@ export default {
color: #5850ff; color: #5850ff;
line-height: 40px; line-height: 40px;
height: 40px; height: 40px;
margin: 8px 0px;
span { span {
cursor: pointer; cursor: pointer;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!