Commit 15d6a5f4 by 前端

fixed

1 parent eee15d58
......@@ -98,6 +98,7 @@
<!-- <div class="tips-error" v-if="staffStatus">请选择专员</div> -->
</div>
</div>
<GLEditor :boxHeight="300" ref="welcome" :btnList="btnList"></GLEditor>
</el-form>
</GLDialog>
<GLDialog title="导入数据失败" :hasFooter="true" mode="small" :visible.sync="importVisible">
......@@ -148,7 +149,110 @@ export default {
ImportResult: {},
taskName: '',
url: '',
fileName: ''
fileName: '',
btnList: [
{
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
name: '图片',
funcName: '',
type: 'img',
uploadApi: this.$apis.common.pictureUpload
},
{
name: '昵称',
type: 'nickName',
funName: 'nickName'
},
{
name: '兑换码',
type: 'code',
funName: 'code'
},
{
name: '活动',
type: 'activity',
funName: 'activity',
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid'
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
activityStatus: 2,
currentPage: 1
}
},
{
itemName: '无忧服务',
itemValue: 6,
itemType: 'merchant',
getInterfaceApi: this.$apis.welcomeword.merchant,
merchantOpen: {
merchantOpenApi: this.$apis.welcomeword.merchantOpen,
params: {
merchantId: this.$globalState.session.merchantId
}
},
params: {
merchantId: this.$globalState.session.merchantId
}
}
]
},
{
name: '素材',
type: 'material',
funName: 'material',
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi
// videoNo: true
// pdfNo: true
},
{
name: '模板',
type: 'message',
funName: 'message',
getSearchApi: this.$apis.welcomeword.createdNameList,
templateApi: this.$apis.welcomeword.templatePage,
templateUpdateApi: this.$apis.welcomeword.templateUpdate,
templateSaveApi: this.$apis.welcomeword.templateSave,
templateDetailApi: this.$apis.welcomeword.templateDetail
}
]
}
},
methods: {
......@@ -246,8 +350,18 @@ export default {
this.$message.error('请选择专员')
return
}
const previewList = this.$refs.welcome.previewList ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : []
const attachmentList = previewList.map(item => {
if (item.attType == 1) {
item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称')
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
this.loading = true
this.$apis.aiCard.createTask({ url, fileName, taskName, staffId }).then(res => {
this.$apis.aiCard.createTask({ url, fileName, taskName, staffId, attachmentList }).then(res => {
if (res) {
this.dialogVisible = false
this.$refs.AiForm.handleSeach()
......
......@@ -94,11 +94,16 @@ export default {
// // limitTime: 2,//限制视频时长
// uploadApi: this.$apis.common.pictureUpload
// },
// {
// name: '昵称',
// type: 'nickname',
// funName: 'nickname'
// },
{
name: '昵称',
type: 'nickname',
funName: 'nickname'
},
{
name: '兑换码',
type: 'code',
funName: 'code'
},
{
name: '活动',
type: 'activity',
......@@ -229,6 +234,9 @@ export default {
const attachmentList = previewList.map(item => {
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
} else if (item.attType == 1) {
item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称')
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
}
return item
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!