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
<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
......@@ -173,6 +173,12 @@ export default {
node.target = 'blank'
this.insertNode(node)
},
addImg(url) {
// 创建a标签
let node = document.createElement('img')
node.src = url
this.insertNode(node)
},
insertNode(node) {
// 在内容中插入标签
// 删掉选中的内容(如有)
......@@ -186,7 +192,16 @@ export default {
} else {
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)
},
placeCaretAtEnd(el) {
......@@ -209,7 +224,18 @@ export default {
handleInput(target) {
// 即时更新数据
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)
},
handleDelete(e) {
......@@ -241,7 +267,6 @@ export default {
} else {
this.currentTagId = null
}
},
getGuid() {
// 生成随机ID
......@@ -284,6 +309,10 @@ export default {
cursor: default;
-webkit-user-modify: read-only !important;
}
img {
width: 24px;
height: 24px;
}
.active {
background: #dcdfe6;
}
......
......@@ -45,17 +45,21 @@
<div class="btn-group">
<div class="add-btn" v-for="item in btnList" :key="item.id">
<!-- <i class="el-icon-circle-plus-outline"></i> -->
<img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" alt />
<span>{{ item.name }}</span>
<img :src="require(`@/assets/img/guestCustom/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" />
<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-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 v-show="emotionStatus" class="emotion-panel"><emotion class="emotion-panel-box" @emotion="handleEmotion" :height="280"></emotion></div>
<div class="tips-text">
<img src="@/assets/img/guestCustom/tips.png" class="tips-icon" alt />
<span>如在企业微信管理后台已为所选员工设置了欢迎语,则此处设置的将不生效。</span>
<span @click="selectEmotion">如在企业微信管理后台已为所选员工设置了欢迎语,则此处设置的将不生效。</span>
</div>
</div>
<ActivityModel ref="activity" @selectActivity="selectActivity"></ActivityModel>
......@@ -73,26 +77,29 @@ const ATT_TYPE = {
}
// import E from 'wangeditor'
import ActivityModel from './activityModel'
import Emotion from './emotionWords'
import wTextarea from './tag-textarea'
import { utils } from 'glsx-common'
export default {
name: 'WelcomeWords',
components: {
ActivityModel,
Emotion,
wTextarea
},
props: { eventBus: Object },
data() {
return {
loading: false,
emotionStatus: false,
btnList: [
// {
// id: 1,
// name: '表情',
// funcName: '',
// type: 'expression',
// limitSize: 10
// },
{
id: 1,
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
id: 2,
name: '图片',
......@@ -140,6 +147,121 @@ export default {
this.eventBus.$emit('update', this.previewList)
},
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) {
this.textInput(val)
},
......@@ -303,9 +425,121 @@ export default {
this.eventBus.$emit('update', this.previewList)
const obj = val.find(item => item.attType == 1)
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()
setTimeout(() => {
document.querySelector('.w-textarea_input').innerHTML = attContent
document.querySelector('.w-textarea_input').innerHTML = htm
}, 100)
}
}
......@@ -315,6 +549,14 @@ export default {
<style lang="scss" scoped>
.welcome-box {
}
.emotion-panel {
position: relative;
height: 0px;
&-box {
position: absolute;
top: -320px;
}
}
.content-bg {
background-color: #f7f7f7;
}
......
......@@ -2,8 +2,7 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLTable} from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLButton from 'glsx-components/src/packages/Button'
import { GLTable,GLButton} from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
......
......@@ -25,48 +25,46 @@
<div slot="staffInfo" slot-scope="scope">
<el-popover trigger="hover" placement="top" v-if="scope.scope.staffInfo.length > 3">
<div class="accountType-row" v-for="(item, index) in scope.scope.staffInfo" :key="index">
<i class="el-icon-user-solid"></i>
<i class="el-icon-user-solid"></i>
{{ item.staffName }}
</div>
<div slot="reference" class="name-wrapper">
<div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-show="index < 4">
<div class="accountType-row" >
<i class="el-icon-user-solid"></i>
{{ index == 3 && scope.scope.staffInfo.length > 3 ? '...(' + scope.scope.staffInfo.length + ')' : item.staffName }}
</div>
<div class="accountType-row">
<i class="el-icon-user-solid"></i>
{{ index == 3 && scope.scope.staffInfo.length > 3 ? '...(' + scope.scope.staffInfo.length + ')' : item.staffName }}
</div>
</div>
</div>
</el-popover>
<div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-else>
<div class="accountType-row">
<i class="el-icon-user-solid"></i>
{{ item.staffName }}
</div>
<div class="accountType-row">
<i class="el-icon-user-solid"></i>
{{ item.staffName }}
</div>
</div>
</div>
<div slot="qrCode" slot-scope="scope">
<img :src="scope.scope.qrCode" style="width: 80px; height: 80px" />
<div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div>
</div>
<div slot="tagging" slot-scope="scope" class="tag-panel">
<div slot="tagging" slot-scope="scope" class="tag-panel">
<el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3">
<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 slot="reference" class="name-wrapper">
<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>
</el-popover>
<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 :title="item.name" class="accountType-row accountType-row-tag">{{ item ? item.name : '' }}</div>
<div v-for="(item, index) in scope.scope.taggingList" :key="index">
<div :title="item.name" class="accountType-row accountType-row-tag">{{ item.name.length > 8 ? item.name.substring(0, 8)+'...' : item.name }}</div>
</div>
</template>
<div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">
--
</div>
<div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">--</div>
</div>
<div slot="codeRemark" slot-scope="scope">
<div class="codeName">{{ scope.scope.codeName }}</div>
......@@ -247,7 +245,7 @@ export default {
}
.form-panel {
padding: 20px;
/deep/ .el-popover{
/deep/ .el-popover {
max-width: 1000px;
}
}
......@@ -352,7 +350,7 @@ export default {
margin-right: 5px;
&-tag {
display: inline-block;
border: 1px solid #e8e8ea;
border: 1px solid #e8e8ea;
background: #fafbfe;
text-align: center;
font-size: 14px;
......
......@@ -13,10 +13,7 @@
</div>
</div>
<div class="config-title">
<span v-if="!editStatus && !configType" @click="editStatus = true">
<label>编辑配置</label>
<i class="el-icon-edit-outline"></i>
</span>
<el-button type="primary" icon="el-icon-edit-outline" size="small" v-if="!editStatus && !configType" @click="editStatus = true">编辑配置</el-button>
</div>
<div class="config-market" v-if="configType">
<div class="config-market-item checked">
......@@ -304,7 +301,7 @@ export default {
if (res) {
this.configItem = res
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 {
this.findConfig(1)
this.configType = false
}
},
resize() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.resize()
this.init()
window.addEventListener('resize', () => {
this.resize()
})
}
}
</script>
......@@ -454,6 +457,7 @@ export default {
color: #5850ff;
line-height: 40px;
height: 40px;
margin: 8px 0px;
span {
cursor: pointer;
}
......
<template>
<div class="square-main">
<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>
新增营销
</el-button>
</GLButton>
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
<el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
......@@ -31,7 +31,7 @@
</el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<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>
</GLTable>
</div>
......
......@@ -172,7 +172,7 @@ export default {
}
.store-item-s {
width: 33.33%;
padding: 30px 20px;
padding: 30px 15px;
.store-item-title {
font-size: 20px;
font-weight: 600;
......
......@@ -10,10 +10,7 @@
</div>
</div>
<div class="config-title">
<span v-if="!editStatus" @click="editStatus = true">
<label>编辑配置</label>
<i class="el-icon-edit-outline"></i>
</span>
<el-button type="primary" icon="el-icon-edit-outline" size="small" v-if="!editStatus" @click="editStatus = true">编辑配置</el-button>
</div>
<div class="config-market">
<div class="config-market-item checked">
......@@ -79,7 +76,7 @@
<el-form ref="configForm" label-position="left" label-width="100px" :model="addForm" :rules="addRules" class="code-body-form">
<el-form-item label="推送时间:">系统将在「开始营销时间」之后启动智系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信发送。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</el-form-item>
<el-form-item size="small" label="营销时间" prop="time">
<el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
<el-time-picker is-range :disabled="!editStatus" value-format="HH:mm" format="HH:mm" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item>
<el-form-item label="短信内容" prop="content">
<el-input :disabled="!editStatus" type="textarea" v-model="addForm.content" rows="5" maxlength="280" show-word-limit></el-input>
......@@ -454,7 +451,7 @@ export default {
console.log(item.attContent)
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)
}
return item
......@@ -483,7 +480,7 @@ export default {
this.editStatus = false
this.$apis.marketing.findConfig({ configType: 3 }).then(res => {
if (res) {
if(!res.staffIds) {
if (!res.staffIds) {
this.addForm.id = res.id
this.addForm.content = ''
return
......@@ -528,12 +525,18 @@ export default {
}
}
})
},
resize() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.resize()
this.findConfig()
window.addEventListener('resize', () => {
this.resize()
})
}
}
</script>
......@@ -905,6 +908,7 @@ export default {
color: #5850ff;
line-height: 40px;
height: 40px;
margin: 8px 0px;
span {
cursor: pointer;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!