+
-->
@@ -944,6 +956,12 @@ export default {
radioVideo: [],
resourcesList: []
};
+ this.imgData = [];
+ this.musicData = [];
+ this.videoData = [];
+ this.radioMusic = 1;
+ this.radioVideo = 1;
+ this.radioImg = 1;
let res = await queryJbDetail(id);
console.log(res, "详情");
this.ruleForm = res.data;
@@ -963,19 +981,21 @@ export default {
processId: n.processId.split(",")
};
});
- this.radioImg = n.sourceType;
- } else if (n.mediaType == 1 && n.sourceType == 1) {
+ this.radioImg = 2;
+ }
+ if (n.mediaType == 1 && n.sourceType == 1) {
a.push(n);
var tmp = [];
this.imgData = a;
- this.radioImg = n.sourceType;
+ this.radioImg = 1;
}
if (n.mediaType == 2 && n.sourceType == 1) {
b.push(n);
this.musicData = b;
- this.radioMusic = n.sourceType;
- } else if (n.mediaType == 2 && n.sourceType == 2) {
+ this.radioMusic = 1;
+ }
+ if (n.mediaType == 2 && n.sourceType == 2) {
console.log("进来了1");
b.push(n);
this.ruleForm.radioMusic = b.map(n => {
@@ -988,13 +1008,14 @@ export default {
processId: n.processId.split(",")
};
});
- this.radioMusic = n.sourceType;
+ this.radioMusic = 2;
}
if (n.mediaType == 3 && n.sourceType == 1) {
c.push(n);
this.videoData = c;
- this.radioVideo = n.sourceType;
- } else if (n.mediaType == 3 && n.sourceType == 2) {
+ this.radioVideo = 1;
+ }
+ if (n.mediaType == 3 && n.sourceType == 2) {
c.push(n);
this.ruleForm.radioVideo = c.map(n => {
return {
@@ -1006,16 +1027,22 @@ export default {
processId: n.processId.split(",")
};
});
- this.radioVideo = n.sourceType;
+ this.radioVideo = 2;
}
});
- console.log(
- this.ruleForm,
- this.musicData,
- this.imgData,
- this.videoData,
- "处理后详情"
- );
+ console.log(this.ruleForm);
+ if (this.ruleForm.radioImg == undefined) {
+ this.$set(this.radioImg,'radioImg',[])
+ }
+ if (this.ruleForm.radioMusic == undefined) {
+ // this.ruleForm.radioMusic = [];
+ this.$set(this.ruleForm,'radioMusic',[])
+ }
+ if (this.ruleForm.radioVideo == undefined) {
+ this.$set(this.ruleForm,'radioVideo',[])
+ }
+
+ console.log(this.ruleForm, "处理后详情");
} catch (err) {
console.log(err);
}
@@ -1042,10 +1069,12 @@ export default {
this.radioMusic = 1;
this.radioVideo = 1;
this.radioImg = 1;
- this.dialog.Visible = true;
this.disabled = false;
this.type = "add";
this.dialog.title = "新增剧本";
+ setTimeout(()=>{
+ this.dialog.Visible = true;
+ },500)
},
async subMit() {
console.log(this.imgType, this.musicType, this.videoType);
@@ -1156,6 +1185,26 @@ export default {
console.log(err);
}
},
+ subEsc() {
+ this.ruleForm = {
+ studioName: "",
+ title: "",
+ labelName: "",
+ imgUrl: "",
+ cover: "",
+ introduction: "",
+ processesList: [],
+ imgUrl: "",
+ radioImg: [],
+ radioMusic: [],
+ radioVideo: [],
+ resourcesList: []
+ };
+ this.radioImg = 1;
+ this.radioMusic = 1;
+ this.radioVideo = 1;
+ this.dialog.Visible = false;
+ },
dealRdata(attchments, keyname) {
//attchments:数组,键值
let list = [...attchments];
@@ -1172,17 +1221,21 @@ export default {
// 编辑
handleEdit(row) {
this.queryListDetail(row.id);
- this.dialog.Visible = true;
this.type = "edit";
this.disabled = false;
this.dialog.title = "编辑剧本";
+ setTimeout(()=>{
+ this.dialog.Visible = true;
+ },500)
},
// 查看
handleView(row) {
this.queryListDetail(row.id);
this.type = "view";
this.disabled = true;
- this.dialog.Visible = true;
+ setTimeout(()=>{
+ this.dialog.Visible = true;
+ },500)
},
// 删除
async hanDel(row) {
@@ -1321,6 +1374,7 @@ export default {
mediaType: 1,
sourceType: this.radioImg
});
+ this.$refs.img.data = this.ruleForm.radioImg
},
handleAddMusic() {
this.ruleForm.radioMusic.push({
@@ -1330,6 +1384,7 @@ export default {
mediaType: 2,
sourceType: this.radioMusic
});
+ this.$refs.music.data = this.ruleForm.radioMusic
},
handleAddVideo() {
this.ruleForm.radioVideo.push({
@@ -1339,6 +1394,7 @@ export default {
mediaType: 3,
sourceType: this.radioVideo
});
+ this.$refs.video.data = this.ruleForm.radioVideo
},
// 上传资源蹄片
labeluploadimg({ file }) {
@@ -1433,7 +1489,7 @@ export default {
}
}
}
- this.imgData[this.imgIndex].processName = tmp.join(",");
+ this.imgData[this.imgIndex].processNames = tmp.join(",");
this.imgData[this.imgIndex].processId = this.processId;
this.imgData[this.imgIndex].mediaType = 1;
this.imgData[this.imgIndex].sourceType = this.radioImg;
@@ -1449,7 +1505,7 @@ export default {
}
}
}
- this.musicData[this.musicIndex].processName = tmp.join(",");
+ this.musicData[this.musicIndex].processNames = tmp.join(",");
this.musicData[this.musicIndex].processId = this.processId;
this.musicData[this.musicIndex].mediaType = 2;
this.musicData[this.musicIndex].sourceType = this.radioMusic;
@@ -1464,7 +1520,7 @@ export default {
}
}
}
- this.videoData[this.videoIndex].processName = tmp.join(",");
+ this.videoData[this.videoIndex].processNames = tmp.join(",");
this.videoData[this.videoIndex].processId = this.processId;
this.videoData[this.videoIndex].mediaType = 3;
this.videoData[this.videoIndex].sourceType = this.radioVideo;
diff --git a/src/views/sce/tips/index.vue b/src/views/sce/tips/index.vue
index 8934e97..e68faff 100644
--- a/src/views/sce/tips/index.vue
+++ b/src/views/sce/tips/index.vue
@@ -309,6 +309,7 @@ export default {
this.dialog.title = "新增";
this.type = "add";
this.form = {};
+ this.lcData = []
this.disabled = false;
this.dialog.Visible = true;
},