|
|
@@ -11,290 +11,372 @@
|
|
|
</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%" >
|
|
|
- <div v-if="item.contentType == 10">
|
|
|
- <!-- <div >-->
|
|
|
- <el-card class="box-card">
|
|
|
- <el-form-item label="直播间" >
|
|
|
- <el-select v-model="item.liveId"
|
|
|
- placeholder="请选择直播间" size="mini"
|
|
|
- @change="liveChange(item)" >
|
|
|
- <el-option
|
|
|
- v-for="dict in liveList"
|
|
|
- :key="dict.liveId"
|
|
|
- :label="dict.liveName"
|
|
|
- :value="dict.liveId"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="标题" prop="miniprogramTitle">
|
|
|
- <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字节" :rows="2" maxlength="64"
|
|
|
- type="textarea" />
|
|
|
- </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='wx503cf8ab31f83dd4' " disabled />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="page路径" prop="miniprogramPage" v-show="false" label-width="100px" style="margin-left: -30px">
|
|
|
- <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" disabled />
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
+ <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>
|
|
|
+ <div v-if="item.contentType == 12">
|
|
|
+ <el-card class="box-card">
|
|
|
+ <el-form-item label="直播间" >
|
|
|
+ <el-select v-model="item.liveId"
|
|
|
+ placeholder="请选择直播间" size="mini"
|
|
|
+ @change="liveChange(item)" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in liveList"
|
|
|
+ :key="dict.liveId"
|
|
|
+ :label="dict.liveName"
|
|
|
+ :value="dict.liveId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="标题" prop="miniprogramTitle">
|
|
|
+ <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字节" :rows="2" maxlength="64"
|
|
|
+ type="textarea" />
|
|
|
+ </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='wx503cf8ab31f83dd4' " disabled />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="page路径" prop="miniprogramPage" v-show="false" label-width="100px" style="margin-left: -30px">
|
|
|
+ <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ <el-form-item label="内容" style="margin-bottom: 2%" >
|
|
|
+ <div v-if="item.contentType == 12">
|
|
|
+ <!-- <div >-->
|
|
|
+ <el-card class="box-card">
|
|
|
+ <el-form-item label="直播间" >
|
|
|
+ <el-select v-model="item.liveId"
|
|
|
+ placeholder="请选择直播间" size="mini"
|
|
|
+ @change="liveChange(item)" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in liveList"
|
|
|
+ :key="dict.liveId"
|
|
|
+ :label="dict.liveName"
|
|
|
+ :value="dict.liveId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="标题" prop="miniprogramTitle">
|
|
|
+ <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字节" :rows="2" maxlength="64"
|
|
|
+ type="textarea" />
|
|
|
+ </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='wx503cf8ab31f83dd4' " disabled />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="page路径" prop="miniprogramPage" v-show="false" label-width="100px" style="margin-left: -30px">
|
|
|
+ <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ <el-input
|
|
|
+ v-if="item.contentType == 1 || item.contentType == 15|| item.contentType == 13"
|
|
|
+ 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 || item.contentType == 15|| item.contentType == 13"
|
|
|
+ type="primary"
|
|
|
+ @click="toggleSalesCall(index)"
|
|
|
+ style="margin-top: 10px;"
|
|
|
+ >
|
|
|
+ {{ item.isSalesCallAdded ? '移除#销售称呼#' : '添加#销售称呼#' }}
|
|
|
+ </el-link>
|
|
|
+ <el-link
|
|
|
+ v-if="item.contentType == 1 || item.contentType == 15|| item.contentType == 13"
|
|
|
+ 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 || item.contentType == 16">
|
|
|
<el-input
|
|
|
- v-if="item.contentType == 1 || item.contentType == 11|| item.contentType == 13"
|
|
|
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 || item.contentType == 11|| item.contentType == 13"
|
|
|
- type="primary"
|
|
|
- @click="toggleSalesCall(index)"
|
|
|
- style="margin-top: 10px;"
|
|
|
- >
|
|
|
- {{ item.isSalesCallAdded ? '移除#销售称呼#' : '添加#销售称呼#' }}
|
|
|
- </el-link>
|
|
|
- <el-link
|
|
|
- v-if="item.contentType == 1 || item.contentType == 11|| item.contentType == 13"
|
|
|
- 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>
|
|
|
+ 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 == 12">
|
|
|
+ <!-- <div >-->
|
|
|
+ <el-card class="box-card">
|
|
|
+ <el-form-item label="直播间" >
|
|
|
+ <el-select v-model="item.liveId"
|
|
|
+ placeholder="请选择直播间" size="mini"
|
|
|
+ @change="liveChange(item)" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in liveList"
|
|
|
+ :key="dict.liveId"
|
|
|
+ :label="dict.liveName"
|
|
|
+ :value="dict.liveId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="标题" prop="miniprogramTitle">
|
|
|
+ <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字节" :rows="2" maxlength="64"
|
|
|
+ type="textarea" />
|
|
|
+ </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='wx503cf8ab31f83dd4' " disabled />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="page路径" prop="miniprogramPage" v-show="false" label-width="100px" style="margin-left: -30px">
|
|
|
+ <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ </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>
|
|
|
|
|
|
- </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 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 v-model="item.luckyBagId"
|
|
|
+ placeholder="请选择福袋" size="mini"
|
|
|
+ @change="getLuckyBagStatus(item)" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in luckyBagList"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.name"
|
|
|
+ :value="dict.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- </div>
|
|
|
- <div v-if="item.contentType == 7 || item.contentType == 12">
|
|
|
- <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>
|
|
|
-
|
|
|
-
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="添加短链" v-if="item.contentType == 1 || item.contentType == 11" >
|
|
|
- <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'
|
|
|
+ <el-form-item label="福袋状态" >
|
|
|
+ <el-tag :type="item.luckyBagDataStatus == 1 ? 'success' : 'danger'">
|
|
|
+ {{ item.luckyBagDataStatus == 1 ? '启用' : '禁用' }}
|
|
|
+ </el-tag>
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="添加短链" v-if="item.contentType == 1 || item.contentType == 15" >
|
|
|
+ <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>
|
|
|
+ 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>
|
|
|
@@ -308,6 +390,7 @@ import ImageUpload from "@/views/qw/sop/ImageUpload.vue";
|
|
|
import {courseList, videoList} from "@/api/qw/sop";
|
|
|
import userVideo from "@/views/qw/userVideo/userVideo";
|
|
|
import {listToLiveNoEnd} from "@/api/live/live";
|
|
|
+import {listReward} from "@/api/qw/luckyBag";
|
|
|
|
|
|
|
|
|
export default {
|
|
|
@@ -315,6 +398,14 @@ export default {
|
|
|
components: {ImageUpload,userVideo},
|
|
|
data() {
|
|
|
return {
|
|
|
+ queryParams1: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ dataStatus: '1',
|
|
|
+ name: null,
|
|
|
+ type: null
|
|
|
+ },
|
|
|
+ luckyBagList: [],
|
|
|
projectFrom:process.env.VUE_APP_PROJECT_FROM,
|
|
|
videoNumOptions: {
|
|
|
title: '选择视频号',
|
|
|
@@ -425,8 +516,21 @@ export default {
|
|
|
listToLiveNoEnd().then(response => {
|
|
|
this.liveList = response.rows;
|
|
|
})
|
|
|
+ listReward(this.queryParams1).then(response => {
|
|
|
+ this.luckyBagList = response.rows;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
+ getLuckyBagStatus(content) {
|
|
|
+ const selectedLuckyBag = this.luckyBagList.find(item => item.id === content.luckyBagId);
|
|
|
+ if (selectedLuckyBag) {
|
|
|
+ content.luckyBagDataStatus = selectedLuckyBag.dataStatus; // 自动填充标题
|
|
|
+ } else {
|
|
|
+ // 若未找到对应直播间,清空标题和封面(可选)
|
|
|
+ content.luckyBagDataStatus = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
liveChange(content) {
|
|
|
// content.liveId 是选中的直播间 ID(liveId)
|
|
|
const selectedLive = this.liveList.find(live => live.liveId === content.liveId);
|
|
|
@@ -793,52 +897,19 @@ export default {
|
|
|
this.single = selection.length!==1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
-// 修改后的方法:在原有的基础上增加一条消息
|
|
|
- processContentType13(settings) {
|
|
|
- const result = [];
|
|
|
- settings.forEach(item => {
|
|
|
- // 如果 contentType 是 13 且 value 不为空,则额外添加一条 contentType 为 1 的消息
|
|
|
- if (item.contentType == 13 && item.value && item.value.trim() !== '') {
|
|
|
- // 按换行符分割内容,取第一部分
|
|
|
- const contentParts = item.value.split('\n')
|
|
|
- .map(part => part.trim())
|
|
|
- .filter(part => part !== '');
|
|
|
-
|
|
|
- if (contentParts != null && contentParts.length > 0) {
|
|
|
- // 创建一条额外的消息,使用第一部分内容
|
|
|
- const additionalMessage = {
|
|
|
- ...item,
|
|
|
- contentType: 1, // 改为文本类型
|
|
|
- value: contentParts[0]
|
|
|
- };
|
|
|
- result.push(additionalMessage);
|
|
|
- }
|
|
|
- }
|
|
|
- if (item.contentType == 10) {
|
|
|
- item.miniprogramAppid = 'wx4d225cc86cc7885d'
|
|
|
- }
|
|
|
- result.push(item);
|
|
|
- });
|
|
|
|
|
|
- return result;
|
|
|
- },
|
|
|
submitMsgForm(){
|
|
|
|
|
|
this.$refs["msgForm"].validate(valid => {
|
|
|
if (valid) {
|
|
|
+
|
|
|
if (this.msgForm.draftStrategy==1){
|
|
|
|
|
|
- // 处理 contentType 13 的拆分逻辑
|
|
|
- const processedSetting = this.processContentType13(this.setting);
|
|
|
this.msgForm.setting=JSON.stringify(this.setting)
|
|
|
|
|
|
- if (processedSetting.length <= 0) {
|
|
|
+ if (this.setting.length <= 0) {
|
|
|
return this.$message.error("请添加规则")
|
|
|
}
|
|
|
-
|
|
|
- // if (this.setting.length <= 0) {
|
|
|
- // return this.$message.error("请添加规则")
|
|
|
- // }
|
|
|
if (this.msgForm.courseId===null || this.msgForm.courseId===''){
|
|
|
return this.$message.error("课程不能为空")
|
|
|
}
|
|
|
@@ -851,97 +922,50 @@ export default {
|
|
|
return this.$message.error("消息类型不能为空")
|
|
|
}
|
|
|
|
|
|
- for (let i = 0; i < processedSetting.length; i++) {
|
|
|
- const item = processedSetting[i];
|
|
|
- if (item.contentType == 1 && (item.value == null || item.value == "")) {
|
|
|
+ for (let i = 0; i < this.setting.length; i++) {
|
|
|
+ if (this.setting[i].contentType == 1 && (this.setting[i].value == null || this.setting[i].value == "")) {
|
|
|
return this.$message.error("内容不能为空")
|
|
|
}
|
|
|
- if (item.contentType == 2 && (item.imgUrl == null || item.imgUrl == "")) {
|
|
|
+ if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
|
|
|
return this.$message.error("图片不能为空")
|
|
|
}
|
|
|
- if ((item.contentType == 3 || item.contentType == 9) && (item.linkTitle == null || item.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 ((item.contentType == 3 || item.contentType == 9) && (item.linkDescribe == null || item.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 ((item.contentType == 3 || item.contentType == 9) && (item.linkImageUrl == null || item.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 ((item.contentType == 3 || item.contentType == 9) && item.type == 1 && (item.linkUrl == null || item.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 (item.contentType == 4 && (item.miniprogramTitle == null || item.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 (item.contentType == 4 && (item.miniprogramPicUrl == null || item.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("小程序封面地址不能为空")
|
|
|
}
|
|
|
- if (item.contentType == 5 && (item.fileUrl == null || item.fileUrl == "")) {
|
|
|
+
|
|
|
+ if (this.setting[i].contentType == 10 && (this.setting[i].miniprogramPage == null || this.setting[i].miniprogramPage == "")) {
|
|
|
+ return this.$message.error("小程序page地址不能为空")
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.setting[i].contentType == 5 && (this.setting[i].fileUrl == null || this.setting[i].fileUrl == "")) {
|
|
|
return this.$message.error("文件不能为空")
|
|
|
}
|
|
|
- if (item.contentType == 6 && (item.videoUrl == null || item.videoUrl == "")) {
|
|
|
+ if (this.setting[i].contentType == 6 && (this.setting[i].videoUrl == null || this.setting[i].videoUrl == "")) {
|
|
|
return this.$message.error("视频不能为空")
|
|
|
}
|
|
|
- if ((item.contentType == 7 || item.contentType == 12) && (item.value == null || item.value == "")) {
|
|
|
+ if ((this.setting[i].contentType == 7 || this.setting[i].contentType == 16) && (this.setting[i].value == null || this.setting[i].value == "")) {
|
|
|
return this.$message.error("语音不能为空")
|
|
|
}
|
|
|
- if (item.contentType == 10 && (item.liveId == null || item.liveId == "")) {
|
|
|
- this.$message.error("直播间不能为空")
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (item.contentType == 10 && (item.miniprogramTitle == null || item.miniprogramTitle == "")) {
|
|
|
- this.$message.error("标题不能为空")
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (item.contentType == 10 && (item.miniprogramPicUrl == null || item.miniprogramPicUrl == "")) {
|
|
|
- this.$message.error("封面不能为空")
|
|
|
- return false;
|
|
|
- }
|
|
|
// 添加对福袋的验证
|
|
|
if (item.contentType == 14 && (item.luckyBagId == null || item.luckyBagId === "")) {
|
|
|
return this.$message.error("福袋不能为空")
|
|
|
}
|
|
|
-
|
|
|
- // if (this.setting[i].contentType == 1 && (this.setting[i].value == null || this.setting[i].value == "")) {
|
|
|
- // return this.$message.error("内容不能为空")
|
|
|
- // }
|
|
|
- // 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 == "")) {
|
|
|
- // return this.$message.error("链接标题不能为空")
|
|
|
- // }
|
|
|
- // 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 == "")) {
|
|
|
- // 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 == "")) {
|
|
|
- // return this.$message.error("链接地址不能为空")
|
|
|
- // }
|
|
|
- //
|
|
|
- // 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 == "")) {
|
|
|
- // return this.$message.error("小程序封面地址不能为空")
|
|
|
- // }
|
|
|
- //
|
|
|
- // if (this.setting[i].contentType == 10 && (this.setting[i].miniprogramPage == null || this.setting[i].miniprogramPage == "")) {
|
|
|
- // return this.$message.error("小程序page地址不能为空")
|
|
|
- // }
|
|
|
- //
|
|
|
- // if (this.setting[i].contentType == 5 && (this.setting[i].fileUrl == null || this.setting[i].fileUrl == "")) {
|
|
|
- // return this.$message.error("文件不能为空")
|
|
|
- // }
|
|
|
- // if (this.setting[i].contentType == 6 && (this.setting[i].videoUrl == null || this.setting[i].videoUrl == "")) {
|
|
|
- // return this.$message.error("视频不能为空")
|
|
|
- // }
|
|
|
- // if (this.setting[i].contentType == 7 && (this.setting[i].value == null || this.setting[i].value == "")) {
|
|
|
- // return this.$message.error("语音不能为空")
|
|
|
- // }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -959,11 +983,10 @@ export default {
|
|
|
sendMsgSopType(this.msgForm).then(response => {
|
|
|
this.msgSuccess("一键群发成功");
|
|
|
loading.close();
|
|
|
- this.setting = [{ contentType: '1', value: '' }];
|
|
|
+ this.setting=[];
|
|
|
this.resetSendMsgSop();
|
|
|
}).finally(()=>{
|
|
|
loading.close();
|
|
|
- this.msgError("发送失败:" + (error.message || '未知错误'));
|
|
|
});
|
|
|
|
|
|
}
|