|
@@ -1219,8 +1219,18 @@ export default {
|
|
if (this.setting[index].content.length > 0 && this.form.sendType == 1) {
|
|
if (this.setting[index].content.length > 0 && this.form.sendType == 1) {
|
|
return this.$message.error("因为企微接口限制,企微模板一天只能设置一条消息~")
|
|
return this.$message.error("因为企微接口限制,企微模板一天只能设置一条消息~")
|
|
} else {
|
|
} else {
|
|
- this.setting[index].content.push({type: this.defaultContentType, contentType: 1, setting: [{contentType: '1', value: "",}]})
|
|
|
|
- this.videoList.push([])
|
|
|
|
|
|
+ const sourceContent = this.setting[index].content[0];
|
|
|
|
+ const newContent = {
|
|
|
|
+ type: this.defaultContentType,
|
|
|
|
+ contentType: 1,
|
|
|
|
+ setting: [{contentType: '1', value: ""}],
|
|
|
|
+ // 复制课程相关字段,如 courseId、videoId,根据实际数据结构补充
|
|
|
|
+ courseId: sourceContent.courseId,
|
|
|
|
+ videoId: sourceContent.videoId,
|
|
|
|
+ courseType: sourceContent.courseType
|
|
|
|
+ };
|
|
|
|
+ this.setting[index].content.push(newContent);
|
|
|
|
+ this.videoList.push([]);
|
|
this.addTag.push({
|
|
this.addTag.push({
|
|
addTag: [],
|
|
addTag: [],
|
|
inputVisible: false,
|
|
inputVisible: false,
|
|
@@ -1228,9 +1238,12 @@ export default {
|
|
delTag: [],
|
|
delTag: [],
|
|
delTagVisible: false,
|
|
delTagVisible: false,
|
|
delTagValue: ''
|
|
delTagValue: ''
|
|
- })
|
|
|
|
|
|
+ });
|
|
|
|
+ // 如果有视频列表关联,也可同步处理 videoList,根据 courseId 重新请求或复制已有视频数据
|
|
|
|
+ if (sourceContent.courseId) {
|
|
|
|
+ this.courseUpdate(newContent, index, this.setting[index].content.length - 1);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
delContent(index, contentIndex) {
|
|
delContent(index, contentIndex) {
|
|
this.setting[index].content.splice(contentIndex, 1)
|
|
this.setting[index].content.splice(contentIndex, 1)
|