Commit cf2141e5 by chenwq Committed by 杨北旺

编辑sop-添加事件

1 parent 0ee7ecaf
...@@ -196,10 +196,11 @@ export default { ...@@ -196,10 +196,11 @@ export default {
}, },
merchantOpen() { merchantOpen() {
this.$apis.customerTransform.merchantOpen({ merchantId: this.$globalState.session.merchantId }).then(res => { this.$apis.customerTransform.merchantOpen({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.openFlag = res.openFlag this.openFlag = res ? res.openFlag : ''
}) })
}, },
init() { init(activeName = '3') {
this.activeName = activeName
this.merchantOpen() this.merchantOpen()
this.couponMenu = false this.couponMenu = false
this.activityMenu = false this.activityMenu = false
...@@ -211,7 +212,7 @@ export default { ...@@ -211,7 +212,7 @@ export default {
return return
} }
item.children.forEach(itm => { item.children.forEach(itm => {
console.log(itm.path) // console.log(itm.path)
if (itm.path == '/couponManage/index') { if (itm.path == '/couponManage/index') {
this.couponMenu = true this.couponMenu = true
} }
......
...@@ -47,33 +47,33 @@ ...@@ -47,33 +47,33 @@
<div class="welcome-file" v-if="itm.attType != 1"> <div class="welcome-file" v-if="itm.attType != 1">
<template v-if="itm.attType == 2"> <template v-if="itm.attType == 2">
<i v-show="index == previewList.length - 1 && loading" class="el-icon-loading"></i> <i v-show="index == previewList.length - 1 && loading" class="el-icon-loading"></i>
<img v-show="!loading" src="@/assets/guestCustom/icon-img.png" alt /> <!-- <img v-show="!loading" src="@/assets/sop/icon-img.png" alt /> -->
<span :title="itm.attContent">{{ itm.attContent }}</span> <span :title="itm.attContent">{{ itm.attContent }}</span>
</template> </template>
<!-- <template v-else-if="itm.attType == 3"> <!-- <template v-else-if="itm.attType == 3">
<img src="@/assets/guestCustom/icon-img.png" alt /> <img src="@/assets/sop/icon-img.png" alt />
<span :title="itm.attContent">{{ itm.attContent }}</span> <span :title="itm.attContent">{{ itm.attContent }}</span>
</template> --> </template> -->
<template v-else-if="itm.attType == 7"> <template v-else-if="itm.attType == 7">
<img src="@/assets/guestCustom/icon-applet.png" alt /> <img src="@/assets/sop/icon-applet.png" alt />
<span :title="itm.attContent.marketingName">{{ itm.attContent.marketingName }}</span> <span :title="itm.attContent.marketingName">{{ itm.attContent.marketingName }}</span>
</template> </template>
<template v-else-if="itm.attType == 5"> <!-- <template v-else-if="itm.attType == 5">
<img src="@/assets/guestCustom/icon-applet.png" alt /> <img src="@/assets/sop/icon-applet.png" alt />
<span :title="itm.attContent.title">{{ itm.attContent.title }}</span> <span :title="itm.attContent.title">{{ itm.attContent.title }}</span>
</template> </template> -->
<i class="el-icon-circle-close" @click="close(index)"></i> <i class="el-icon-circle-close" @click="close(index)"></i>
</div> </div>
</div> </div>
<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">
<!-- <img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" /> --> <!-- <img :src="require(`@/assets/sop/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" /> -->
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" alt /> <img :src="require(`@/assets/sop/add-${item.type}.png`)" alt />
<!-- <span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span> --> <!-- <span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span> -->
<span>{{ item.name }}</span> <span>{{ 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-if="item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link> <el-link v-if="item.type == 'nickname' || item.type == 'activity' || item.type == 'coupon'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
...@@ -136,32 +136,38 @@ export default { ...@@ -136,32 +136,38 @@ export default {
// 营销内容 // 营销内容
previewList: [], previewList: [],
btnList: [ btnList: [
// {
// id: 1,
// name: '表情',
// funcName: '',
// type: 'expression',
// limitSize: 10
// },
// {
// id: 2,
// name: '图片',
// funcName: '',
// type: 'img',
// limitSize: 10
// },
{ {
id: 1, id: 3,
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
id: 2,
name: '图片',
funcName: '',
type: 'img',
limitSize: 10
},
{
id: 4,
name: '活动', name: '活动',
type: 'acivity', type: 'activity',
funName: 'activity' funName: 'activity'
}, },
{ {
id: 5, id: 4,
name: '模板', name: '优惠券',
type: 'nickname', type: 'coupon',
funName: 'message' funName: 'coupon'
} }
// {
// id: 5,
// name: '模板',
// type: 'nickname',
// funName: 'message'
// }
], ],
editRule: { editRule: {
sopName: [{ required: true, message: '请输入sop名字', trigger: 'change' }], sopName: [{ required: true, message: '请输入sop名字', trigger: 'change' }],
...@@ -422,13 +428,15 @@ export default { ...@@ -422,13 +428,15 @@ export default {
// 营销内容 // 营销内容
handleFun(name) { handleFun(name) {
if (name == 'nickname') { // if (name == 'nickname') {
this.$refs.textContent.addTag('@昵称') // this.$refs.textContent.addTag('@昵称')
} else if (name == 'activity') { // } else
this.$refs.activity.init() if (name == 'activity' || name == 'coupon') {
} else if (name == 'message') { this.$refs.activity.init(name == 'coupon' ? '2' : '3')
this.$refs.message.init()
} }
// else if (name == 'message') {
// this.$refs.message.init()
// }
}, },
close(index) { close(index) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!