|
|
@@ -56,7 +56,7 @@
|
|
|
<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">
|
|
|
+ <!-- <div v-if="item.contentType == 12">
|
|
|
<el-card class="box-card">
|
|
|
<el-form-item label="直播间" >
|
|
|
<el-select v-model="item.liveId"
|
|
|
@@ -85,10 +85,9 @@
|
|
|
<el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" disabled />
|
|
|
</el-form-item>
|
|
|
</el-card>
|
|
|
- </div>
|
|
|
+ </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"
|
|
|
@@ -224,10 +223,9 @@
|
|
|
placeholder="输入要转为语音的内容" style="width: 90%;margin-top: 10px;"
|
|
|
@input="handleInputVideoText(item.value,item)"/>
|
|
|
</div>
|
|
|
- <div v-if="item.contentType == 12">
|
|
|
- <!-- <div >-->
|
|
|
+ <!-- <div v-if="item.contentType == 12">
|
|
|
<el-card class="box-card">
|
|
|
- <el-form-item label="直播间" >
|
|
|
+ <el-form-item label="直播间3" >
|
|
|
<el-select v-model="item.liveId"
|
|
|
placeholder="请选择直播间" size="mini"
|
|
|
@change="liveChange(item)" >
|
|
|
@@ -254,7 +252,7 @@
|
|
|
<el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径" disabled />
|
|
|
</el-form-item>
|
|
|
</el-card>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div v-if="item.contentType == 8">
|
|
|
<el-button type="primary"
|
|
|
style="margin-bottom: 1%"
|
|
|
@@ -903,18 +901,38 @@ export default {
|
|
|
this.$refs["msgForm"].validate(valid => {
|
|
|
if (valid) {
|
|
|
|
|
|
+
|
|
|
+
|
|
|
if (this.msgForm.draftStrategy==1){
|
|
|
|
|
|
+ if(!!hasLiveSetting && (this.msgForm.courseId!=null && this.msgForm.courseId!='')){
|
|
|
+ return this.$message.error("直播间不能选取课程");
|
|
|
+ }
|
|
|
+ if(!!hasLiveSetting && (this.msgForm.videoId!=null && this.msgForm.videoId!='')){
|
|
|
+ return this.$message.error("直播间不能选取课节");
|
|
|
+ }
|
|
|
+
|
|
|
this.msgForm.setting=JSON.stringify(this.setting)
|
|
|
|
|
|
+ let jsonSetting = JSON.parse(this.msgForm.setting);
|
|
|
+ let hasLiveSetting = false;
|
|
|
+ console.log(jsonSetting)
|
|
|
+ for(let index=0;index < jsonSetting.length;index++){
|
|
|
+ if(!!jsonSetting[index] && jsonSetting[index].contentType == "12") {
|
|
|
+ if(!!hasLiveSetting){
|
|
|
+ return this.$message.error("发送直播间只能一次只能发送一条");
|
|
|
+ }
|
|
|
+ hasLiveSetting = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
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==='') && !hasLiveSetting){
|
|
|
return this.$message.error("课程不能为空")
|
|
|
}
|
|
|
|
|
|
- if (this.msgForm.videoId===null || this.msgForm.videoId===''){
|
|
|
+ if ((this.msgForm.videoId===null || this.msgForm.videoId==='') && !hasLiveSetting){
|
|
|
return this.$message.error("课节不能为空")
|
|
|
}
|
|
|
|
|
|
@@ -966,6 +984,9 @@ export default {
|
|
|
if (this.setting[i].contentType == 14 && (this.setting[i].luckyBagId == null || this.setting[i].luckyBagId === "")) {
|
|
|
return this.$message.error("福袋不能为空")
|
|
|
}
|
|
|
+ if(this.setting[i].contentType == 12 && (this.setting[i].liveId==null || this.setting[i].liveId == "")){
|
|
|
+ return this.$message.error("直播间不能为空");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|