Commit 500e4fd9 by wuwx Committed by 杨北旺

弹窗

1 parent 954b834b
...@@ -147,4 +147,26 @@ const getSopInfoDetailApi = params => { ...@@ -147,4 +147,26 @@ const getSopInfoDetailApi = params => {
}) })
} }
export default { getCustomerByTagListApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi } // 获取素材组列表
const getGroupListApi = params => {
params.method = 'marketing.api.material.group.list'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材列表
const getMaterialListApi = params => {
params.method = 'marketing.api.material.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCustomerByTagListApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi }
...@@ -45,16 +45,15 @@ ...@@ -45,16 +45,15 @@
<el-input type="textarea" :rows="9" maxlength="280" show-word-limit v-model="editForm.eventContent" @input="textInput" style="-webkit-user-modify: read-write-plaintext-only !important; width: 656px;" placeholder="请输入营销文案"></el-input> <el-input type="textarea" :rows="9" maxlength="280" show-word-limit v-model="editForm.eventContent" @input="textInput" style="-webkit-user-modify: read-write-plaintext-only !important; width: 656px;" placeholder="请输入营销文案"></el-input>
<div v-for="(itm, index) in previewList" :key="itm.id"> <div v-for="(itm, index) in previewList" :key="itm.id">
<div class="welcome-file" v-if="itm.attType != 1"> <div class="welcome-file" v-if="itm.attType != 1">
<template v-if="itm.attType == 2"> <!-- <template v-if="itm.attType == 2">
<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/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/sop/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-if="itm.attType == 7">
<img src="@/assets/sop/icon-applet.png" alt /> <img src="@/assets/sop/icon-applet.png" alt />
<span :title="itm.attContent.objectName">{{ itm.attContent.objectName }}</span> <span :title="itm.attContent.objectName">{{ itm.attContent.objectName }}</span>
</template> </template>
...@@ -73,7 +72,7 @@ ...@@ -73,7 +72,7 @@
<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 == 'activity' || item.type == 'coupon'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link> <el-link style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
...@@ -90,6 +89,8 @@ ...@@ -90,6 +89,8 @@
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
</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>
<nickname-model v-if="isNicknameVisible" :isNicknameVisible.sync="isNicknameVisible" @handleNicknameConfirm="handleNicknameConfirm" @handleNicknameClose="handleNicknameClose"></nickname-model>
<!-- <MessageModel ref="message" @selectItem="selectMessage"></MessageModel> --> <!-- <MessageModel ref="message" @selectItem="selectMessage"></MessageModel> -->
</div> </div>
</template> </template>
...@@ -105,6 +106,8 @@ const ATT_TYPE = { ...@@ -105,6 +106,8 @@ const ATT_TYPE = {
ACTIVITY: 7 ACTIVITY: 7
} }
import ActivityModel from './components/activityModel' import ActivityModel from './components/activityModel'
import materialModel from './components/materialModel'
import nicknameModel from './components/nicknameModel'
import * as moment from 'moment' import * as moment from 'moment'
export default { export default {
name: 'editGift', name: 'editGift',
...@@ -114,6 +117,8 @@ export default { ...@@ -114,6 +117,8 @@ export default {
footerLeft: '0', footerLeft: '0',
footerWidth: '0', footerWidth: '0',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
isMaterialVisible: false,
isNicknameVisible: false,
// routeInfo: { // routeInfo: {
// // add-新增;edit-编辑;look-查看 // // add-新增;edit-编辑;look-查看
// addOrEdit: 'add', // addOrEdit: 'add',
...@@ -153,6 +158,12 @@ export default { ...@@ -153,6 +158,12 @@ export default {
// limitSize: 10 // limitSize: 10
// }, // },
{ {
id: 1,
name: '素材',
type: 'material',
funName: 'material'
},
{
id: 3, id: 3,
name: '活动', name: '活动',
type: 'activity', type: 'activity',
...@@ -163,13 +174,13 @@ export default { ...@@ -163,13 +174,13 @@ export default {
name: '优惠券', name: '优惠券',
type: 'coupon', type: 'coupon',
funName: 'coupon' funName: 'coupon'
},
{
id: 5,
name: '朋友圈模板',
type: 'nickname',
funName: 'nickname'
} }
// {
// id: 5,
// name: '模板',
// type: 'nickname',
// funName: 'message'
// }
], ],
editRule: { editRule: {
sopName: [{ required: true, message: '请输入sop名字', trigger: 'change' }], sopName: [{ required: true, message: '请输入sop名字', trigger: 'change' }],
...@@ -368,7 +379,9 @@ export default { ...@@ -368,7 +379,9 @@ export default {
}, },
components: { components: {
ActivityModel ActivityModel,
materialModel,
nicknameModel
}, },
watch: { watch: {
...@@ -450,14 +463,38 @@ export default { ...@@ -450,14 +463,38 @@ export default {
this.recoveryEndTime() this.recoveryEndTime()
}, },
// 素材
handleMaterialConfirm() {
this.handleMaterialClose()
},
handleMaterialClose() {
this.isMaterialVisible = !this.isMaterialVisible
},
// 朋友圈模板
handleNicknameConfirm() {
this.handleMaterialClose()
},
handleNicknameClose() {
this.isNicknameVisible = !this.isNicknameVisible
},
// 营销内容 // 营销内容
handleFun(name) { handleFun(name) {
// if (name == 'nickname') { // if (name == 'nickname') {
// this.$refs.textContent.addTag('@昵称') // this.$refs.textContent.addTag('@昵称')
// } else // } else
if (name == 'material') {
this.handleMaterialClose()
}
if (name == 'activity' || name == 'coupon') { if (name == 'activity' || name == 'coupon') {
this.$refs.activity.init(name == 'coupon' ? '2' : '3') this.$refs.activity.init(name == 'coupon' ? '2' : '3')
} }
if (name == 'nickname') {
this.handleNicknameClose()
}
// else if (name == 'message') { // else if (name == 'message') {
// this.$refs.message.init() // this.$refs.message.init()
// } // }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!