|
|
@@ -1,287 +1,243 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-dialog :title="sendMsgOpen.title" :visible.sync="sendMsgOpen.open" width="1000px" append-to-body>
|
|
|
- <el-alert
|
|
|
- type="error"
|
|
|
- :closable="false"
|
|
|
- show-icon>
|
|
|
+ <el-dialog :title="sendMsgOpen.title" :visible.sync="sendMsgOpen.open" width="1000px" append-to-body>
|
|
|
+ <el-alert type="error" :closable="false" show-icon>
|
|
|
<template #title>
|
|
|
- <span style="font-size: 25px; line-height: 1.5;">
|
|
|
- 此功能用于给 选中的 营期 内【所有的】客户发送 消息
|
|
|
- </span>
|
|
|
+ <span style="font-size: 25px; line-height: 1.5;">
|
|
|
+ 此功能用于给 选中的 营期 内【所有的】客户发送 消息
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-alert>
|
|
|
- <el-form ref="msgForm" :model="msgForm" :rules="msgRules" label-width="100px">
|
|
|
- <el-form-item label="策略" prop="draftStrategy">
|
|
|
- <el-radio-group v-model="msgForm.draftStrategy">
|
|
|
- <el-radio :label="1">正常群发</el-radio>
|
|
|
- <el-radio :label="2">清除草稿</el-radio>
|
|
|
- <el-radio :label="3">发送草稿</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="选择课程" v-if="msgForm.draftStrategy==1" >
|
|
|
- <el-select v-model="msgForm.courseId" placeholder="请选择课程" style=" margin-right: 10px;" size="mini" @change="courseChange()">
|
|
|
- <el-option
|
|
|
- v-for="dict in courseList"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="parseInt(dict.dictValue)"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- <el-select v-model="msgForm.videoId" placeholder="请选择小节" size="mini" style=" margin-right: 10px;" @change="videoIdChange()" >
|
|
|
- <el-option
|
|
|
- v-for="dict in videoList"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="parseInt(dict.dictValue)"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- <el-select v-model="msgForm.courseType" placeholder="请选择消息类型" size="mini" style=" margin-right: 10px;">
|
|
|
- <el-option
|
|
|
- v-for="dict in sysFsSopWatchStatus"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="parseInt(dict.dictValue)"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="规则" prop="setting" v-if="msgForm.draftStrategy==1" >
|
|
|
- <div v-for="(item, index) in setting" :key="index" style="background-color: #fdfdfd; border: 1px solid #e6e6e6; margin-bottom: 20px;">
|
|
|
- <el-row>
|
|
|
- <el-col :span="22">
|
|
|
- <el-form :model="item" label-width="70px">
|
|
|
- <el-form-item label="内容类别" style="margin: 2%">
|
|
|
- <el-radio-group v-model="item.contentType">
|
|
|
- <el-radio :label="item.dictValue" v-for="item in sysQwSopAiContentType" @change="handleContentTypeChange()">{{item.dictLabel}}</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="内容" style="margin-bottom: 2%" >
|
|
|
- <el-input
|
|
|
- v-if="item.contentType == 1"
|
|
|
- v-model="item.value"
|
|
|
- type="textarea"
|
|
|
- :rows="3"
|
|
|
- placeholder="内容"
|
|
|
- style="width: 90%; margin-top: 10px;"
|
|
|
- @keydown.native="handleKeydown($event, index)"
|
|
|
- :ref="`textarea-${index}`"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- <el-link
|
|
|
- v-if="item.contentType == 1"
|
|
|
- type="primary"
|
|
|
- @click="toggleSalesCall(index)"
|
|
|
- style="margin-top: 10px;"
|
|
|
- >
|
|
|
- {{ item.isSalesCallAdded ? '移除#销售称呼#' : '添加#销售称呼#' }}
|
|
|
- </el-link>
|
|
|
- <el-link
|
|
|
- v-if="item.contentType == 1"
|
|
|
- type="primary"
|
|
|
- @click="toggleSalesCallCustomer(index)"
|
|
|
- style="margin-top: 10px;margin-left: 2%"
|
|
|
- >
|
|
|
- {{ item.isSalesCallCustomerAdded ? '移除#客户称呼#' : '添加#客户称呼#' }}
|
|
|
- </el-link>
|
|
|
-
|
|
|
-
|
|
|
- <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150" :height="150" />
|
|
|
-
|
|
|
- <div v-if="item.contentType == 3 || item.contentType ==9 ">
|
|
|
- <el-card class="box-card">
|
|
|
- <el-form-item label="链接标题:" label-width="100px">
|
|
|
- <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="链接描述:" label-width="100px" >
|
|
|
- <el-input type="textarea" :rows="3" v-model="item.linkDescribe" placeholder="请输入链接描述" style="width: 90%;margin-top: 1%;"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="链接封面:" label-width="100px">
|
|
|
- <ImageUpload v-model="item.linkImageUrl" type="image" :num="1" :file-size="2" :width="150" :height="150" style="margin-top: 1%;" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="链接地址:" label-width="100px" >
|
|
|
- <el-tag type="warning" v-model="item.isBindUrl=1">选择的课程小节 即为卡片链接地址</el-tag>
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
- <div v-if="item.contentType == 4 || item.contentType == 10 ">
|
|
|
- <el-card class="box-card">
|
|
|
- <el-form-item label="标题" prop="miniprogramTitle">
|
|
|
- <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="封面" prop="miniprogramPicUrl">
|
|
|
- <ImageUpload v-model="item.miniprogramPicUrl" type="image" :num="10" :width="150" :height="150" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="appid" prop="miniprogramAppid" v-show="false" >
|
|
|
- <el-input v-model="item.miniprogramAppid='wx73f85f8d62769119' " disabled />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="page路径" prop="miniprogramPage" v-show="item.contentType == 10" label-width="100px" style="margin-left: -30px" >
|
|
|
- <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" type="textarea" :rows="3" />
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
- <div v-if="item.contentType == 5 ">
|
|
|
-
|
|
|
- <el-form-item label="上传文件:" prop="fileUrl" label-width="100px">
|
|
|
- <el-upload
|
|
|
- v-model="item.fileUrl"
|
|
|
- class="avatar-uploader"
|
|
|
- :action="uploadUrl"
|
|
|
- :show-file-list="false"
|
|
|
- :on-success="(res, file) => handleAvatarSuccessFile(res, file, item)"
|
|
|
- :before-upload="beforeAvatarUploadFile">
|
|
|
- <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
- <el-link v-if="item.fileUrl" type="primary" :href="downloadUrl(item.fileUrl)" download>
|
|
|
- {{item.fileUrl}}
|
|
|
- </el-link>
|
|
|
+ <el-form ref="msgForm" :model="msgForm" :rules="msgRules" label-width="100px">
|
|
|
+ <el-form-item label="策略" prop="draftStrategy">
|
|
|
+ <el-radio-group v-model="msgForm.draftStrategy">
|
|
|
+ <el-radio :label="1">正常群发</el-radio>
|
|
|
+ <el-radio :label="2">清除草稿</el-radio>
|
|
|
+ <el-radio :label="3">发送草稿</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="选择课程" v-if="msgForm.draftStrategy == 1">
|
|
|
+ <el-select v-model="msgForm.courseId" placeholder="请选择课程" style=" margin-right: 10px;" size="mini"
|
|
|
+ @change="courseChange()">
|
|
|
+ <el-option v-for="dict in courseList" :key="dict.dictValue" :label="dict.dictLabel"
|
|
|
+ :value="parseInt(dict.dictValue)" />
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="msgForm.videoId" placeholder="请选择小节" size="mini" style=" margin-right: 10px;"
|
|
|
+ @change="videoIdChange()">
|
|
|
+ <el-option v-for="dict in videoList" :key="dict.dictValue" :label="dict.dictLabel"
|
|
|
+ :value="parseInt(dict.dictValue)" />
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="msgForm.courseType" placeholder="请选择消息类型" size="mini" style=" margin-right: 10px;">
|
|
|
+ <el-option v-for="dict in sysFsSopWatchStatus" :key="dict.dictValue" :label="dict.dictLabel"
|
|
|
+ :value="parseInt(dict.dictValue)" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="规则" prop="setting" v-if="msgForm.draftStrategy == 1">
|
|
|
+ <div v-for="(item, index) in setting" :key="index"
|
|
|
+ style="background-color: #fdfdfd; border: 1px solid #e6e6e6; margin-bottom: 20px;">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="22">
|
|
|
+ <el-form :model="item" label-width="70px">
|
|
|
+ <el-form-item label="内容类别" style="margin: 2%">
|
|
|
+ <el-radio-group v-model="item.contentType">
|
|
|
+ <el-radio :label="item.dictValue" v-for="item in sysQwSopAiContentType"
|
|
|
+ @change="handleContentTypeChange()">{{ item.dictLabel }}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="内容" style="margin-bottom: 2%">
|
|
|
+ <el-input v-if="item.contentType == 1" v-model="item.value" type="textarea" :rows="3"
|
|
|
+ placeholder="内容" style="width: 90%; margin-top: 10px;"
|
|
|
+ @keydown.native="handleKeydown($event, index)" :ref="`textarea-${index}`">
|
|
|
+ </el-input>
|
|
|
+ <el-link v-if="item.contentType == 1" type="primary" @click="toggleSalesCall(index)"
|
|
|
+ style="margin-top: 10px;">
|
|
|
+ {{ item.isSalesCallAdded ? '移除#销售称呼#' : '添加#销售称呼#' }}
|
|
|
+ </el-link>
|
|
|
+ <el-link v-if="item.contentType == 1" type="primary" @click="toggleSalesCallCustomer(index)"
|
|
|
+ style="margin-top: 10px;margin-left: 2%">
|
|
|
+ {{ item.isSalesCallCustomerAdded ? '移除#客户称呼#' : '添加#客户称呼#' }}
|
|
|
+ </el-link>
|
|
|
+
|
|
|
+
|
|
|
+ <ImageUpload v-if="item.contentType == 2" v-model="item.imgUrl" type="image" :num="1" :width="150"
|
|
|
+ :height="150" />
|
|
|
+
|
|
|
+ <div v-if="item.contentType == 3 || item.contentType == 9">
|
|
|
+ <el-card class="box-card">
|
|
|
+ <el-form-item label="链接标题:" label-width="100px">
|
|
|
+ <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="链接描述:" label-width="100px">
|
|
|
+ <el-input type="textarea" :rows="3" v-model="item.linkDescribe" placeholder="请输入链接描述"
|
|
|
+ style="width: 90%;margin-top: 1%;" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="链接封面:" label-width="100px">
|
|
|
+ <ImageUpload v-model="item.linkImageUrl" type="image" :num="1" :file-size="2" :width="150"
|
|
|
+ :height="150" style="margin-top: 1%;" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="链接地址:" label-width="100px">
|
|
|
+ <el-tag type="warning" v-model="item.isBindUrl = 1">选择的课程小节 即为卡片链接地址</el-tag>
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ <div v-if="item.contentType == 4 || item.contentType == 10">
|
|
|
+ <el-card class="box-card">
|
|
|
+ <el-form-item label="标题" prop="miniprogramTitle">
|
|
|
+ <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="封面" prop="miniprogramPicUrl">
|
|
|
+ <ImageUpload v-model="item.miniprogramPicUrl" type="image" :num="10" :width="150"
|
|
|
+ :height="150" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="appid" prop="miniprogramAppid" v-show="false">
|
|
|
+ <el-input v-model="item.miniprogramAppid = 'wx73f85f8d62769119'" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="page路径" prop="miniprogramPage" v-show="item.contentType == 10"
|
|
|
+ label-width="100px" style="margin-left: -30px">
|
|
|
+ <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" type="textarea"
|
|
|
+ :rows="3" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ <div v-if="item.contentType == 5">
|
|
|
+
|
|
|
+ <el-form-item label="上传文件:" prop="fileUrl" label-width="100px">
|
|
|
+ <el-upload v-model="item.fileUrl" class="avatar-uploader" :action="uploadUrl"
|
|
|
+ :show-file-list="false" :on-success="(res, file) => handleAvatarSuccessFile(res, file, item)"
|
|
|
+ :before-upload="beforeAvatarUploadFile">
|
|
|
+ <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
+ </el-upload>
|
|
|
+ <el-link v-if="item.fileUrl" type="primary" :href="downloadUrl(item.fileUrl)" download>
|
|
|
+ {{ item.fileUrl }}
|
|
|
+ </el-link>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-if="item.contentType == 6">
|
|
|
+ <el-form-item label="上传视频:" prop="videoUrl" label-width="100px">
|
|
|
+ <el-upload v-model="item.videoUrl" class="avatar-uploader" :action="uploadUrl"
|
|
|
+ :show-file-list="false" :on-success="(res, file) => handleAvatarSuccessVideo(res, file, item)"
|
|
|
+ :before-upload="beforeAvatarUploadVideo">
|
|
|
+ <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
+ </el-upload>
|
|
|
+ <video v-if="item.videoUrl" :src="item.videoUrl" controls style="width: 200px;height: 100px">
|
|
|
+ </video>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div v-if="item.contentType == 7">
|
|
|
+ <el-input v-model="item.value" type="textarea" :rows="3" maxlength="66" show-word-limit
|
|
|
+ placeholder="输入要转为语音的内容" style="width: 90%;margin-top: 10px;"
|
|
|
+ @input="handleInputVideoText(item.value, item)" />
|
|
|
+ </div>
|
|
|
+ <div v-if="item.contentType == 8">
|
|
|
+ <el-button type="primary" style="margin-bottom: 1%" @click="hanldeSelectVideoNum(setting, index)">
|
|
|
+ 选择视频号
|
|
|
+ </el-button>
|
|
|
+ <el-card class="box-card" v-if="item.coverUrl">
|
|
|
+ <el-form-item label="封面标题:" label-width="100px">
|
|
|
+ <el-input v-model="item.nickname" style="width: 90%;margin-bottom: 1%" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="头像:" label-width="100px">
|
|
|
+ <el-image v-if="item.avatar != null" :src="item.avatar" :preview-src-list="[item.avatar]"
|
|
|
+ :style="{ width: '50px', height: '50px' }"></el-image>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="封面:" label-width="100px">
|
|
|
+ <el-image v-if="item.coverUrl != null" :src="item.coverUrl"
|
|
|
+ :preview-src-list="[item.coverUrl]" :style="{ width: '200px', height: '200px' }"></el-image>
|
|
|
|
|
|
- </div>
|
|
|
-
|
|
|
- <div v-if="item.contentType == 6 ">
|
|
|
- <el-form-item label="上传视频:" prop="videoUrl" label-width="100px">
|
|
|
- <el-upload
|
|
|
- v-model="item.videoUrl"
|
|
|
- class="avatar-uploader"
|
|
|
- :action="uploadUrl"
|
|
|
- :show-file-list="false"
|
|
|
- :on-success="(res, file) => handleAvatarSuccessVideo(res, file, item)"
|
|
|
- :before-upload="beforeAvatarUploadVideo">
|
|
|
- <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- </el-upload>
|
|
|
- <video v-if="item.videoUrl"
|
|
|
- :src="item.videoUrl"
|
|
|
- controls style="width: 200px;height: 100px">
|
|
|
- </video>
|
|
|
</el-form-item>
|
|
|
- </div>
|
|
|
- <div v-if="item.contentType == 7 ">
|
|
|
- <el-input
|
|
|
- v-model="item.value"
|
|
|
- type="textarea" :rows="3" maxlength="66" show-word-limit
|
|
|
- placeholder="输入要转为语音的内容" style="width: 90%;margin-top: 10px;"
|
|
|
- @input="handleInputVideoText(item.value,item)"/>
|
|
|
- </div>
|
|
|
- <div v-if="item.contentType == 8">
|
|
|
- <el-button type="primary"
|
|
|
- style="margin-bottom: 1%"
|
|
|
- @click="hanldeSelectVideoNum(setting,index)">
|
|
|
- 选择视频号
|
|
|
- </el-button>
|
|
|
- <el-card class="box-card" v-if="item.coverUrl">
|
|
|
- <el-form-item label="封面标题:" label-width="100px">
|
|
|
- <el-input v-model="item.nickname"
|
|
|
- style="width: 90%;margin-bottom: 1%" disabled/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="头像:" label-width="100px">
|
|
|
- <el-image
|
|
|
- v-if="item.avatar != null"
|
|
|
- :src="item.avatar"
|
|
|
- :preview-src-list="[item.avatar]"
|
|
|
- :style="{ width: '50px', height: '50px' }"
|
|
|
- ></el-image>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="封面:" label-width="100px">
|
|
|
- <el-image
|
|
|
- v-if="item.coverUrl != null"
|
|
|
- :src="item.coverUrl"
|
|
|
- :preview-src-list="[item.coverUrl]"
|
|
|
- :style="{ width: '200px', height: '200px' }"
|
|
|
- ></el-image>
|
|
|
-
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="简介:" label-width="100px">
|
|
|
- <el-input type="textarea" :rows="3"
|
|
|
- v-model="item.desc"
|
|
|
- style="width: 90%;margin-top: 1%;" disabled/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="视频地址:" label-width="100px"
|
|
|
- style="margin-top: 1%">
|
|
|
- <el-input v-model="item.url"
|
|
|
- style="width: 90%;" disabled/>
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
- <div v-if="item.contentType == 21">
|
|
|
- <el-card class="box-card">
|
|
|
- <el-form-item label="短信模板" >
|
|
|
- <el-select v-model="item.smsTemplateId"
|
|
|
- placeholder="请选择短信模板" size="mini"
|
|
|
- @change="getSmsTemplateInfo(item)" >
|
|
|
- <el-option
|
|
|
- v-for="template in smsTemplateList"
|
|
|
- :key="template.tempId"
|
|
|
- :label="template.title"
|
|
|
- :value="template.tempId"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="内容预览" v-if="item.smsTemplateContent">
|
|
|
- <div style="color: #666; font-size: 12px; padding: 8px; border: 1px solid #eee; border-radius: 4px; background-color: #f9f9f9; max-height: 100px; overflow-y: auto;">
|
|
|
- {{ item.smsTemplateContent }}
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="添加短链" v-if="item.contentType == 1 " >
|
|
|
- <el-tooltip content="请先根据课程选定课程小节之后再添加" effect="dark" :disabled="!!msgForm.videoId">
|
|
|
- <el-switch
|
|
|
- v-model="item.isBindUrl"
|
|
|
- :disabled="!msgForm.videoId"
|
|
|
- active-color="#13ce66"
|
|
|
- inactive-color="#DCDFE6"
|
|
|
- active-value="1"
|
|
|
- inactive-value="2">
|
|
|
- </el-switch>
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
- <span v-if="item.isBindUrl == '1'" style="margin-left: 10px; color: #13ce66">添加URL</span>
|
|
|
- <span v-if="item.isBindUrl == '2'" style="margin-left: 10px; color: #b1b4ba">不加URL</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="课节过期时间" v-if="item.isBindUrl == '1'
|
|
|
- && item.contentType != 2
|
|
|
- && item.contentType != 5
|
|
|
- && item.contentType != 6
|
|
|
- && item.contentType != 8"
|
|
|
- style="margin-top: 1%" label-width="100px">
|
|
|
- <el-row>
|
|
|
- <el-input-number v-model="item.expiresDays" :min="1" :max="100" ></el-input-number>
|
|
|
- (天)
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <span class="tip">填写0或不填时,默认为系统配置的默认时间</span>
|
|
|
- </el-row>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1" :offset="1">
|
|
|
- <i class="el-icon-delete" @click="delSetList(index)" style="margin-top: 20px;" v-if="setting.length>1"></i>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- <el-link type="primary" class="el-icon-plus" :underline="false" @click='addSetList()' >添加内容</el-link>
|
|
|
-
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="发送时间" prop="sendTime" v-if="msgForm.draftStrategy==1" >
|
|
|
- <el-time-picker
|
|
|
- class="custom-input"
|
|
|
- v-model="msgForm.sendTime"
|
|
|
- value-format="HH:mm"
|
|
|
- format="HH:mm"
|
|
|
- placeholder="时间"
|
|
|
- style="width: 100px;height: 20px;">
|
|
|
- </el-time-picker>
|
|
|
- <span class="tip" style="margin-left: 2%"> 不填时,默认为系统当前时间(立即发送)</span>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitMsgForm">确 定</el-button>
|
|
|
- <el-button @click="cancelMsgForm">取 消</el-button>
|
|
|
- </div>
|
|
|
+ <el-form-item label="简介:" label-width="100px">
|
|
|
+ <el-input type="textarea" :rows="3" v-model="item.desc" style="width: 90%;margin-top: 1%;"
|
|
|
+ disabled />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="视频地址:" label-width="100px" style="margin-top: 1%">
|
|
|
+ <el-input v-model="item.url" style="width: 90%;" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ <div v-if="item.contentType == 14">
|
|
|
+ <el-card class="box-card">
|
|
|
+ <el-form-item label="红包名称">
|
|
|
+ <el-select :disabled="formType == 3" v-model="item.redPacketId" placeholder="请选择红包"
|
|
|
+ size="mini" @change="getRedPacketStatus(item)">
|
|
|
+ <el-option v-for="dict in packetList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="福袋状态">
|
|
|
+ <el-tag :disabled="formType == 3" :type="item.status == 1 ? 'success' : 'danger'">
|
|
|
+ {{ item.status == 1 ? '启用' : '禁用' }}
|
|
|
+ </el-tag>
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ <div v-if="item.contentType == 21">
|
|
|
+ <el-card class="box-card">
|
|
|
+ <el-form-item label="短信模板">
|
|
|
+ <el-select v-model="item.smsTemplateId" placeholder="请选择短信模板" size="mini"
|
|
|
+ @change="getSmsTemplateInfo(item)">
|
|
|
+ <el-option v-for="template in smsTemplateList" :key="template.tempId"
|
|
|
+ :label="template.title" :value="template.tempId" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="内容预览" v-if="item.smsTemplateContent">
|
|
|
+ <div
|
|
|
+ style="color: #666; font-size: 12px; padding: 8px; border: 1px solid #eee; border-radius: 4px; background-color: #f9f9f9; max-height: 100px; overflow-y: auto;">
|
|
|
+ {{ item.smsTemplateContent }}
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="添加短链" v-if="item.contentType == 1">
|
|
|
+ <el-tooltip content="请先根据课程选定课程小节之后再添加" effect="dark" :disabled="!!msgForm.videoId">
|
|
|
+ <el-switch v-model="item.isBindUrl" :disabled="!msgForm.videoId" active-color="#13ce66"
|
|
|
+ inactive-color="#DCDFE6" active-value="1" inactive-value="2">
|
|
|
+ </el-switch>
|
|
|
+ </el-tooltip>
|
|
|
+
|
|
|
+ <span v-if="item.isBindUrl == '1'" style="margin-left: 10px; color: #13ce66">添加URL</span>
|
|
|
+ <span v-if="item.isBindUrl == '2'" style="margin-left: 10px; color: #b1b4ba">不加URL</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课节过期时间" v-if="item.isBindUrl == '1'
|
|
|
+ && item.contentType != 2
|
|
|
+ && item.contentType != 5
|
|
|
+ && item.contentType != 6
|
|
|
+ && item.contentType != 8" style="margin-top: 1%"
|
|
|
+ label-width="100px">
|
|
|
+ <el-row>
|
|
|
+ <el-input-number v-model="item.expiresDays" :min="1" :max="100"></el-input-number>
|
|
|
+ (天)
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <span class="tip">填写0或不填时,默认为系统配置的默认时间</span>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1" :offset="1">
|
|
|
+ <i class="el-icon-delete" @click="delSetList(index)" style="margin-top: 20px;"
|
|
|
+ v-if="setting.length > 1"></i>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <el-link type="primary" class="el-icon-plus" :underline="false" @click='addSetList()'>添加内容</el-link>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="发送时间" prop="sendTime" v-if="msgForm.draftStrategy == 1">
|
|
|
+ <el-time-picker class="custom-input" v-model="msgForm.sendTime" value-format="HH:mm" format="HH:mm"
|
|
|
+ placeholder="时间" style="width: 100px;height: 20px;">
|
|
|
+ </el-time-picker>
|
|
|
+ <span class="tip" style="margin-left: 2%"> 不填时,默认为系统当前时间(立即发送)</span>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitMsgForm">确 定</el-button>
|
|
|
+ <el-button @click="cancelMsgForm">取 消</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
<el-dialog :title="videoNumOptions.title" :visible.sync="videoNumOptions.open" width="1500px" append-to-body>
|
|
|
<userVideo ref="QwUserVideo" @videoResult="qwUserVideoResult"></userVideo>
|
|
|
@@ -290,17 +246,24 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { sendMsgSopType,} from "../../../api/qw/sopUserLogsInfo";
|
|
|
+import { sendMsgSopType, } from "../../../api/qw/sopUserLogsInfo";
|
|
|
import ImageUpload from "@/views/qw/sop/ImageUpload.vue";
|
|
|
-import {courseList, videoList} from "@/api/qw/sop";
|
|
|
+import { courseList, videoList } from "@/api/qw/sop";
|
|
|
import userVideo from "@/views/qw/userVideo/userVideo";
|
|
|
import { getSmsTempList } from "@/api/company/companySmsTemp";
|
|
|
+import { listPacket } from "@/api/qw/packet";
|
|
|
|
|
|
export default {
|
|
|
name: "sendMsgOpenTool",
|
|
|
- components: {ImageUpload,userVideo},
|
|
|
+ components: { ImageUpload, userVideo },
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ },
|
|
|
+ packetList:[],
|
|
|
videoNumOptions: {
|
|
|
title: '选择视频号',
|
|
|
open: false,
|
|
|
@@ -308,9 +271,9 @@ export default {
|
|
|
contentIndex: null,
|
|
|
},
|
|
|
//上传语音的遮罩层
|
|
|
- voiceLoading :false,
|
|
|
- uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
|
|
|
- uploadUrlByVoice:process.env.VUE_APP_BASE_API+"/common/uploadOSSByHOOKVoice",
|
|
|
+ voiceLoading: false,
|
|
|
+ uploadUrl: process.env.VUE_APP_BASE_API + "/common/uploadOSS",
|
|
|
+ uploadUrlByVoice: process.env.VUE_APP_BASE_API + "/common/uploadOSSByHOOKVoice",
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 导出遮罩层
|
|
|
@@ -328,25 +291,25 @@ export default {
|
|
|
// sopUserLogsInfo表格数据
|
|
|
sopUserLogsInfoList: [],
|
|
|
sysFsSopWatchStatus: [],
|
|
|
- isSalesCallAdded:false,
|
|
|
- isSalesCallCustomerAdded:false,
|
|
|
- tagList:[],
|
|
|
- selectTags:[],
|
|
|
+ isSalesCallAdded: false,
|
|
|
+ isSalesCallCustomerAdded: false,
|
|
|
+ tagList: [],
|
|
|
+ selectTags: [],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
- updateOpen:false,
|
|
|
+ updateOpen: false,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- tagIds:null,
|
|
|
- remark:null,
|
|
|
+ tagIds: null,
|
|
|
+ remark: null,
|
|
|
sopId: null,
|
|
|
userLogsId: null,
|
|
|
- userIdParam:null,
|
|
|
- startTimeParam:null,
|
|
|
+ userIdParam: null,
|
|
|
+ startTimeParam: null,
|
|
|
externalContactId: null,
|
|
|
qwUserId: null,
|
|
|
corpId: null,
|
|
|
@@ -356,47 +319,48 @@ export default {
|
|
|
createTime: null,
|
|
|
},
|
|
|
|
|
|
- courseList:[],
|
|
|
- videoList:[],
|
|
|
+ courseList: [],
|
|
|
+ videoList: [],
|
|
|
//插件版
|
|
|
- sysQwSopAiContentType:[],
|
|
|
+ sysQwSopAiContentType: [],
|
|
|
|
|
|
- sendMsgOpen:{
|
|
|
- title:'一键批量群发',
|
|
|
- open:false,
|
|
|
- ids:null,
|
|
|
+ sendMsgOpen: {
|
|
|
+ title: '一键批量群发',
|
|
|
+ open: false,
|
|
|
+ ids: null,
|
|
|
},
|
|
|
|
|
|
smsTemplateList: [],
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
- setting:[{contentType:'1', value: '',}],
|
|
|
- msgForm:{
|
|
|
- videoId:null,
|
|
|
- courseId:null,
|
|
|
- courseType:null,
|
|
|
- userIdParam:null,
|
|
|
- setting:null,
|
|
|
- ids:null,
|
|
|
- type:null,
|
|
|
- corpId:null,
|
|
|
+ setting: [{ contentType: '1', value: '', }],
|
|
|
+ msgForm: {
|
|
|
+ videoId: null,
|
|
|
+ courseId: null,
|
|
|
+ courseType: null,
|
|
|
+ userIdParam: null,
|
|
|
+ setting: null,
|
|
|
+ ids: null,
|
|
|
+ type: null,
|
|
|
+ corpId: null,
|
|
|
sopId: null,
|
|
|
startTime: null,
|
|
|
sendTime: null,
|
|
|
- draftStrategy:1,
|
|
|
+ draftStrategy: 1,
|
|
|
},
|
|
|
// 表单校验
|
|
|
rules: {},
|
|
|
- batchRules:{
|
|
|
+ batchRules: {
|
|
|
paramTime: [
|
|
|
{ required: true, message: '选择的时间不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
},
|
|
|
- msgRules:{},
|
|
|
+ msgRules: {},
|
|
|
};
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
+ this.getRedPacketList();
|
|
|
this.getDicts("sys_qwSopAi_contentType").then(response => {
|
|
|
this.sysQwSopAiContentType = response.data;
|
|
|
});
|
|
|
@@ -410,6 +374,21 @@ export default {
|
|
|
this.loadSmsTemplates();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getRedPacketStatus(content){
|
|
|
+ const selectedRedPacket = this.packetList.find(item => item.id === content.redPacketId);
|
|
|
+ if (selectedRedPacket) {
|
|
|
+ content.status = selectedRedPacket.status; // 自动填充标题
|
|
|
+ } else {
|
|
|
+ // 若未找到对应直播间,清空标题和封面(可选)
|
|
|
+ content.status = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 查询授权手机号红包配置列表 */
|
|
|
+ getRedPacketList() {
|
|
|
+ listPacket(this.queryParams).then(response => {
|
|
|
+ this.packetList = response.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
// 获取短信模板信息(类似福袋的处理方式)
|
|
|
getSmsTemplateInfo(content) {
|
|
|
@@ -476,26 +455,26 @@ export default {
|
|
|
this.videoNumOptions.open = false;
|
|
|
|
|
|
},
|
|
|
- oneClickGroupSending(val,type,corpId){
|
|
|
+ oneClickGroupSending(val, type, corpId) {
|
|
|
|
|
|
- this.sendMsgOpen.open= true;
|
|
|
+ this.sendMsgOpen.open = true;
|
|
|
this.msgForm.ids = val;
|
|
|
this.msgForm.type = type;
|
|
|
this.msgForm.corpId = corpId;
|
|
|
|
|
|
},
|
|
|
courseChange() {
|
|
|
- if (this.msgForm.courseId != null ) {
|
|
|
+ if (this.msgForm.courseId != null) {
|
|
|
const selectedCourse = this.courseList.find(course => parseInt(course.dictValue) === this.msgForm.courseId);
|
|
|
for (let i = 0; i < this.setting.length; i++) {
|
|
|
//响应式直接给链接的标题/封面上值
|
|
|
if (selectedCourse && this.msgForm.courseId != null) {
|
|
|
- if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
|
|
|
+ if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9) {
|
|
|
this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
|
|
|
this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
|
|
|
}
|
|
|
|
|
|
- if ( this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ){
|
|
|
+ if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10) {
|
|
|
this.$set(this.setting[i], 'miniprogramPicUrl', selectedCourse.dictImgUrl);
|
|
|
}
|
|
|
}
|
|
|
@@ -504,23 +483,23 @@ export default {
|
|
|
|
|
|
}
|
|
|
videoList(this.msgForm.courseId).then(response => {
|
|
|
- this.videoList=response.list;
|
|
|
+ this.videoList = response.list;
|
|
|
});
|
|
|
},
|
|
|
|
|
|
videoIdChange() {
|
|
|
- if (this.msgForm.videoId != null ) {
|
|
|
+ if (this.msgForm.videoId != null) {
|
|
|
// 查找选中的课节对应的 label
|
|
|
const selectedVideo = this.videoList.find(course => parseInt(course.dictValue) === this.msgForm.videoId);
|
|
|
|
|
|
for (let i = 0; i < this.setting.length; i++) {
|
|
|
//响应式直接给链接的描述上值
|
|
|
if (selectedVideo && this.msgForm.videoId != null) {
|
|
|
- if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
|
|
|
+ if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9) {
|
|
|
this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
|
|
|
}
|
|
|
|
|
|
- if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ){
|
|
|
+ if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10) {
|
|
|
this.$set(this.setting[i], 'miniprogramTitle', selectedVideo.dictLabel);
|
|
|
}
|
|
|
|
|
|
@@ -537,7 +516,7 @@ export default {
|
|
|
this.msgError(res.msg);
|
|
|
}
|
|
|
},
|
|
|
- beforeAvatarUploadFile(file){
|
|
|
+ beforeAvatarUploadFile(file) {
|
|
|
const isLt1M = file.size / 1024 / 1024 < 10;
|
|
|
if (!isLt1M) {
|
|
|
this.$message.error('上传大小不能超过 10MB!');
|
|
|
@@ -551,16 +530,16 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleAvatarSuccessVideo(res, file, item) {
|
|
|
- if(res.code==200){
|
|
|
+ if (res.code == 200) {
|
|
|
// 使用 $set 确保响应式更新
|
|
|
this.$set(item, 'videoUrl', res.url);
|
|
|
}
|
|
|
- else{
|
|
|
+ else {
|
|
|
this.msgError(res.msg);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- beforeAvatarUploadVideo(file){
|
|
|
+ beforeAvatarUploadVideo(file) {
|
|
|
const isLt30M = file.size / 1024 / 1024 < 10;
|
|
|
const isMP4 = file.type === 'video/mp4';
|
|
|
|
|
|
@@ -577,7 +556,7 @@ export default {
|
|
|
return true;
|
|
|
},
|
|
|
|
|
|
- handleInputVideoText(value,content){
|
|
|
+ handleInputVideoText(value, content) {
|
|
|
// 允许的字符:中文、英文(大小写)、数字和指定标点符号(,。!?)
|
|
|
const regex = /^[\u4e00-\u9fa5,。!?,!?]+$/;
|
|
|
|
|
|
@@ -594,12 +573,12 @@ export default {
|
|
|
this.videoNumOptions.open = true;
|
|
|
},
|
|
|
|
|
|
- delSetList(index){
|
|
|
- this.setting.splice(index,1)
|
|
|
+ delSetList(index) {
|
|
|
+ this.setting.splice(index, 1)
|
|
|
},
|
|
|
- addSetList(){
|
|
|
+ addSetList() {
|
|
|
const newSetting = {
|
|
|
- contentType:'1',
|
|
|
+ contentType: '1',
|
|
|
value: '',
|
|
|
};
|
|
|
// 将新设置项添加到 content.setting 数组中
|
|
|
@@ -731,17 +710,17 @@ export default {
|
|
|
handleContentTypeChange() {
|
|
|
|
|
|
//如果是链接的才上
|
|
|
- if (this.msgForm.courseId != null ) {
|
|
|
+ if (this.msgForm.courseId != null) {
|
|
|
const selectedCourse = this.courseList.find(course => parseInt(course.dictValue) === this.msgForm.courseId);
|
|
|
for (let i = 0; i < this.setting.length; i++) {
|
|
|
//响应式直接给链接的标题/封面上值
|
|
|
- if (selectedCourse && this.msgForm.courseId != null) {
|
|
|
+ if (selectedCourse && this.msgForm.courseId != null) {
|
|
|
|
|
|
- if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
|
|
|
+ if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9) {
|
|
|
this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
|
|
|
this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
|
|
|
}
|
|
|
- if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ){
|
|
|
+ if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10) {
|
|
|
this.$set(this.setting[i], 'miniprogramPicUrl', selectedCourse.dictImgUrl);
|
|
|
}
|
|
|
|
|
|
@@ -751,18 +730,18 @@ export default {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- if (this.msgForm.videoId != null ) {
|
|
|
+ if (this.msgForm.videoId != null) {
|
|
|
// 查找选中的课节对应的 label
|
|
|
const selectedVideo = this.videoList.find(course => parseInt(course.dictValue) === this.msgForm.videoId);
|
|
|
|
|
|
for (let i = 0; i < this.setting.length; i++) {
|
|
|
//响应式直接给链接的描述上值
|
|
|
- if (selectedVideo && this.msgForm.videoId != null) {
|
|
|
+ if (selectedVideo && this.msgForm.videoId != null) {
|
|
|
|
|
|
- if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
|
|
|
+ if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9) {
|
|
|
this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
|
|
|
}
|
|
|
- if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10){
|
|
|
+ if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10) {
|
|
|
this.$set(this.setting[i], 'miniprogramTitle', selectedVideo.dictLabel);
|
|
|
}
|
|
|
|
|
|
@@ -775,43 +754,43 @@ export default {
|
|
|
|
|
|
resetSendMsgSop() {
|
|
|
this.msgForm = {
|
|
|
- videoId:null,
|
|
|
- courseId:null,
|
|
|
- courseType:null,
|
|
|
- setting:null,
|
|
|
- sendTime:null,
|
|
|
- draftStrategy:1,
|
|
|
+ videoId: null,
|
|
|
+ courseId: null,
|
|
|
+ courseType: null,
|
|
|
+ setting: null,
|
|
|
+ sendTime: null,
|
|
|
+ draftStrategy: 1,
|
|
|
};
|
|
|
this.resetForm("msgForm");
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
+ this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
|
|
|
- submitMsgForm(){
|
|
|
+ submitMsgForm() {
|
|
|
|
|
|
this.$refs["msgForm"].validate(valid => {
|
|
|
if (valid) {
|
|
|
|
|
|
- if (this.msgForm.draftStrategy==1){
|
|
|
+ if (this.msgForm.draftStrategy == 1) {
|
|
|
|
|
|
- this.msgForm.setting=JSON.stringify(this.setting)
|
|
|
+ this.msgForm.setting = JSON.stringify(this.setting)
|
|
|
|
|
|
if (this.setting.length <= 0) {
|
|
|
return this.$message.error("请添加规则")
|
|
|
}
|
|
|
- if (this.msgForm.courseId===null || this.msgForm.courseId===''){
|
|
|
+ if (this.msgForm.courseId === null || this.msgForm.courseId === '') {
|
|
|
return this.$message.error("课程不能为空")
|
|
|
}
|
|
|
|
|
|
- if (this.msgForm.videoId===null || this.msgForm.videoId===''){
|
|
|
+ if (this.msgForm.videoId === null || this.msgForm.videoId === '') {
|
|
|
return this.$message.error("课节不能为空")
|
|
|
}
|
|
|
|
|
|
- if (this.msgForm.courseType===null || this.msgForm.courseType===''){
|
|
|
+ if (this.msgForm.courseType === null || this.msgForm.courseType === '') {
|
|
|
return this.$message.error("消息类型不能为空")
|
|
|
}
|
|
|
|
|
|
@@ -822,23 +801,23 @@ export default {
|
|
|
if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
|
|
|
return this.$message.error("图片不能为空")
|
|
|
}
|
|
|
- if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
|
|
|
+ if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
|
|
|
return this.$message.error("链接标题不能为空")
|
|
|
}
|
|
|
- if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
|
|
|
+ if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
|
|
|
return this.$message.error("链接描述不能为空")
|
|
|
}
|
|
|
- if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
|
|
|
+ if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
|
|
|
return this.$message.error("链接图片不能为空")
|
|
|
}
|
|
|
- if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
|
|
|
+ if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
|
|
|
return this.$message.error("链接地址不能为空")
|
|
|
}
|
|
|
|
|
|
- if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ) && (this.setting[i].miniprogramTitle == null || this.setting[i].miniprogramTitle == "")) {
|
|
|
+ if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10) && (this.setting[i].miniprogramTitle == null || this.setting[i].miniprogramTitle == "")) {
|
|
|
return this.$message.error("小程序消息标题不能为空")
|
|
|
}
|
|
|
- if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10 ) && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
|
|
|
+ if ((this.setting[i].contentType == 4 || this.setting[i].contentType == 10) && (this.setting[i].miniprogramPicUrl == null || this.setting[i].miniprogramPicUrl == "")) {
|
|
|
return this.$message.error("小程序封面地址不能为空")
|
|
|
}
|
|
|
|
|
|
@@ -859,7 +838,7 @@ export default {
|
|
|
// 短信模板验证
|
|
|
if (this.setting[i].contentType == 21 && (this.setting[i].smsTemplateId == null || this.setting[i].smsTemplateId === "")) {
|
|
|
return this.$message.error("短信模板不能为空")
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
// 根据选中的短信模板ID查找对应的模板信息
|
|
|
const selectedTemplate = this.smsTemplateList.find(template => template.tempId === this.setting[i].smsTemplateId);
|
|
|
if (selectedTemplate) {
|
|
|
@@ -872,7 +851,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- this.msgForm.setting=JSON.stringify(this.setting)
|
|
|
+ this.msgForm.setting = JSON.stringify(this.setting)
|
|
|
|
|
|
this.sendMsgOpen.open = false;
|
|
|
|
|
|
@@ -886,16 +865,16 @@ export default {
|
|
|
sendMsgSopType(this.msgForm).then(response => {
|
|
|
this.msgSuccess("一键群发成功");
|
|
|
loading.close();
|
|
|
- this.setting=[];
|
|
|
+ this.setting = [];
|
|
|
this.resetSendMsgSop();
|
|
|
- }).finally(()=>{
|
|
|
+ }).finally(() => {
|
|
|
loading.close();
|
|
|
});
|
|
|
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- cancelMsgForm(){
|
|
|
+ cancelMsgForm() {
|
|
|
this.sendMsgOpen.open = false;
|
|
|
this.resetSendMsgSop();
|
|
|
},
|