|
@@ -266,6 +266,28 @@
|
|
|
:value="parseInt(dict.dictValue)"
|
|
:value="parseInt(dict.dictValue)"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
+
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="选择直播间">
|
|
|
|
|
+ <el-select v-model="msgForm.liveId"
|
|
|
|
|
+ placeholder="请选择直播间" size="mini"
|
|
|
|
|
+ style=" margin-right: 10px;"
|
|
|
|
|
+ @change="liveChangemsgForm(msgForm.liveId)" clearable >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in liveList"
|
|
|
|
|
+ :key="dict.liveId"
|
|
|
|
|
+ :label="dict.liveName"
|
|
|
|
|
+ :value="dict.liveId"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <!-- <el-select v-model="msgForm.liveMsgType" placeholder="请选择直播间消息类型" size="mini" style=" margin-right: 10px;" clearable>
|
|
|
|
|
+ <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>
|
|
|
<el-form-item label="规则" prop="setting" >
|
|
<el-form-item label="规则" prop="setting" >
|
|
|
<div v-for="(item, index) in setting" :key="index" style="background-color: #fdfdfd; border: 1px solid #e6e6e6; margin-bottom: 20px;">
|
|
<div v-for="(item, index) in setting" :key="index" style="background-color: #fdfdfd; border: 1px solid #e6e6e6; margin-bottom: 20px;">
|
|
@@ -390,7 +412,7 @@
|
|
|
<el-form-item label="直播间" >
|
|
<el-form-item label="直播间" >
|
|
|
<el-select v-model="item.liveId"
|
|
<el-select v-model="item.liveId"
|
|
|
placeholder="请选择直播间" size="mini"
|
|
placeholder="请选择直播间" size="mini"
|
|
|
- @change="liveChange(item)" >
|
|
|
|
|
|
|
+ @change="liveChange(item)" :disabled="liveDisabled()" >
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="dict in liveList"
|
|
v-for="dict in liveList"
|
|
|
:key="dict.liveId"
|
|
:key="dict.liveId"
|
|
@@ -401,11 +423,11 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="标题" prop="miniprogramTitle">
|
|
<el-form-item label="标题" prop="miniprogramTitle">
|
|
|
- <el-input v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字节" :rows="2" maxlength="64"
|
|
|
|
|
|
|
+ <el-input :disabled="liveDisabled()" v-model="item.miniprogramTitle" placeholder="请输入小程序消息标题,最长为64字节" :rows="2" maxlength="64"
|
|
|
type="textarea" />
|
|
type="textarea" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="封面" prop="miniprogramPicUrl">
|
|
<el-form-item label="封面" prop="miniprogramPicUrl">
|
|
|
- <ImageUpload v-model="item.miniprogramPicUrl" type="image" :num="10" :width="150" :height="150" />
|
|
|
|
|
|
|
+ <ImageUpload :disabled="liveDisabled()" v-model="item.miniprogramPicUrl" type="image" :num="10" :width="150" :height="150" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="appid" prop="miniprogramAppid" v-show="false">
|
|
<el-form-item label="appid" prop="miniprogramAppid" v-show="false">
|
|
|
<el-input v-model="item.miniprogramAppid='wx503cf8ab31f83dd4' " disabled />
|
|
<el-input v-model="item.miniprogramAppid='wx503cf8ab31f83dd4' " disabled />
|
|
@@ -715,6 +737,8 @@ export default {
|
|
|
updateLogsInfoFrom:{},
|
|
updateLogsInfoFrom:{},
|
|
|
setting:[{contentType:'1', value: '',}],
|
|
setting:[{contentType:'1', value: '',}],
|
|
|
msgForm:{
|
|
msgForm:{
|
|
|
|
|
+ liveId:null,
|
|
|
|
|
+ // liveMsgType:null,
|
|
|
videoId:null,
|
|
videoId:null,
|
|
|
courseId:null,
|
|
courseId:null,
|
|
|
courseType:null,
|
|
courseType:null,
|
|
@@ -1297,6 +1321,8 @@ export default {
|
|
|
|
|
|
|
|
resetSendMsgSop() {
|
|
resetSendMsgSop() {
|
|
|
this.msgForm = {
|
|
this.msgForm = {
|
|
|
|
|
+ liveId:null,
|
|
|
|
|
+ // liveMsgType:null,
|
|
|
videoId:null,
|
|
videoId:null,
|
|
|
courseId:null,
|
|
courseId:null,
|
|
|
courseType:null,
|
|
courseType:null,
|
|
@@ -1374,14 +1400,31 @@ export default {
|
|
|
this.msgForm.corpId=this.queryParams.corpIdParam;
|
|
this.msgForm.corpId=this.queryParams.corpIdParam;
|
|
|
this.msgForm.filterMode=this.queryParams.filterMode;
|
|
this.msgForm.filterMode=this.queryParams.filterMode;
|
|
|
|
|
|
|
|
|
|
+ let hasLiveSetting = false;
|
|
|
|
|
+ let jsonSetting = JSON.parse(this.msgForm.setting);
|
|
|
|
|
+ for(let index=0;index < jsonSetting.length;index++){
|
|
|
|
|
+ if(!!jsonSetting[index] && jsonSetting[index].contentType == "12") {
|
|
|
|
|
+ if(!!hasLiveSetting){
|
|
|
|
|
+ return this.$message.error("发送直播间只能一次只能发送一条");
|
|
|
|
|
+ }
|
|
|
|
|
+ hasLiveSetting = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ 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("直播间不能选取课节");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (this.setting.length <= 0) {
|
|
if (this.setting.length <= 0) {
|
|
|
return this.$message.error("请添加规则")
|
|
return this.$message.error("请添加规则")
|
|
|
}
|
|
}
|
|
|
- if (this.msgForm.courseId===null || this.msgForm.courseId===''){
|
|
|
|
|
|
|
+ if ((this.msgForm.courseId===null || this.msgForm.courseId==='')&& !hasLiveSetting && this.msgForm.liveId===null){
|
|
|
return this.$message.error("课程不能为空")
|
|
return this.$message.error("课程不能为空")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (this.msgForm.videoId===null || this.msgForm.videoId===''){
|
|
|
|
|
|
|
+ if ((this.msgForm.videoId===null || this.msgForm.videoId==='') && !hasLiveSetting && this.msgForm.liveId===null){
|
|
|
return this.$message.error("课节不能为空")
|
|
return this.$message.error("课节不能为空")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1544,6 +1587,19 @@ export default {
|
|
|
this.videoNumOptions.open = false;
|
|
this.videoNumOptions.open = false;
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ liveChangemsgForm(liveId){
|
|
|
|
|
+ console.log(liveId);
|
|
|
|
|
+ console.log(this.setting);
|
|
|
|
|
+ if(!!liveId){
|
|
|
|
|
+ for(let i =0;i<this.setting.length;i++){
|
|
|
|
|
+ this.$set(this.setting[i], 'liveId', liveId);
|
|
|
|
|
+ this.liveChange(this.setting[i]);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ liveDisabled(){
|
|
|
|
|
+ return !!this.msgForm && !!this.msgForm.liveId ;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|