邹畅 3 years ago
parent
commit
5ad810311e
2 changed files with 96 additions and 39 deletions
  1. 134
      src/views/sce/sceInfo/index.vue
  2. 1
      src/views/sce/tips/index.vue

134
src/views/sce/sceInfo/index.vue

@ -177,7 +177,7 @@
</el-form-item> </el-form-item>
<h3 class="form-title">开本流程</h3> <h3 class="form-title">开本流程</h3>
<el-table <el-table
v-if="type != 'view'"
v-if="type == 'add' || type == 'edit'"
:header-cell-style="{ background: '#eee', color: '#606266' }" :header-cell-style="{ background: '#eee', color: '#606266' }"
:data="ruleForm.processesList" :data="ruleForm.processesList"
border border
@ -244,7 +244,7 @@
<el-table-column align="center" property="sort" label="排序"> <el-table-column align="center" property="sort" label="排序">
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top:15px;" v-if="type != 'view'">
<div style="margin-top:15px;" v-if="type == 'add' || type == 'edit'">
<el-button <el-button
type="success" type="success"
:disabled="disabledButton" :disabled="disabledButton"
@ -285,7 +285,7 @@
<span>{{ item.processNames }}</span> <span>{{ item.processNames }}</span>
</div> </div>
<div <div
v-if="type != 'view'"
v-if="type == 'add' || type == 'edit'"
class="sz_container" class="sz_container"
style="text-align:center" style="text-align:center"
> >
@ -295,7 +295,7 @@
</div> </div>
</div> </div>
<el-upload <el-upload
v-if="type != 'view'"
v-if="type == 'add' || type == 'edit'"
class="avatar-uploader" class="avatar-uploader"
style="float:left;margin-left:60px" style="float:left;margin-left:60px"
action action
@ -315,7 +315,8 @@
class="urlTable" class="urlTable"
> >
<el-table <el-table
v-if="type != 'view'"
ref='img'
v-if="type == 'add' || type == 'edit'"
:data="ruleForm.radioImg" :data="ruleForm.radioImg"
border border
style="width: 80%;margin-left:100px;" style="width: 80%;margin-left:100px;"
@ -391,7 +392,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top:15px;" v-if="type != 'view'">
<div style="margin-top:15px;" v-if="type == 'add' || type == 'edit'">
<el-button <el-button
type="success" type="success"
style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99" style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99"
@ -432,7 +433,7 @@
<span>{{ item.processNames }}</span> <span>{{ item.processNames }}</span>
</div> </div>
<div <div
v-if="type != 'view'"
v-if="type == 'add' || type == 'edit'"
class="sz_container" class="sz_container"
style="text-align:center" style="text-align:center"
> >
@ -445,7 +446,7 @@
</div> </div>
</div> </div>
<el-upload <el-upload
v-if="type != 'view'"
v-if="type == 'add' || type == 'edit'"
class="avatar-uploader" class="avatar-uploader"
style="float:left;margin-left:60px" style="float:left;margin-left:60px"
action action
@ -465,7 +466,8 @@
class="urlTable" class="urlTable"
> >
<el-table <el-table
v-if="type != 'view'"
ref='music'
v-if="type == 'add' || type == 'edit'"
:data="ruleForm.radioMusic" :data="ruleForm.radioMusic"
border border
style="width: 80%;margin-left:100px;" style="width: 80%;margin-left:100px;"
@ -532,7 +534,13 @@
label="序号" label="序号"
width="50" width="50"
/> />
<el-table-column align="center" property="title" label="资源标题" />
<el-table-column align="center" property="title" label="资源标题">
<template>
<div>
11111111
</div>
</template>
</el-table-column>
<el-table-column align="center" property="url" label="资源URL" /> <el-table-column align="center" property="url" label="资源URL" />
<el-table-column <el-table-column
align="center" align="center"
@ -544,7 +552,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top:15px;" v-if="type != 'view'">
<div style="margin-top:15px;" v-if="type == 'add' || type == 'edit'">
<el-button <el-button
type="success" type="success"
style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99" style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99"
@ -585,7 +593,7 @@
<span>{{ item.processNames }}</span> <span>{{ item.processNames }}</span>
</div> </div>
<div <div
v-if="type != 'view'"
v-if="type == 'add' || type == 'edit'"
class="sz_container" class="sz_container"
style="text-align:center" style="text-align:center"
> >
@ -598,7 +606,7 @@
</div> </div>
</div> </div>
<el-upload <el-upload
v-if="type != 'view'"
v-if="type == 'add' || type == 'edit'"
class="avatar-uploader" class="avatar-uploader"
style="float:left;margin-left:60px" style="float:left;margin-left:60px"
action action
@ -618,7 +626,8 @@
class="urlTable" class="urlTable"
> >
<el-table <el-table
v-if="type != 'view'"
ref='video'
v-if="type == 'add' || type == 'edit'"
:data="ruleForm.radioVideo" :data="ruleForm.radioVideo"
border border
style="width: 80%;margin-left:100px;" style="width: 80%;margin-left:100px;"
@ -697,7 +706,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div v-if="type != 'view'" style="margin-top:15px;">
<div v-if="type == 'add' || type == 'edit'" style="margin-top:15px;">
<el-button <el-button
type="success" type="success"
style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99" style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99"
@ -712,8 +721,11 @@
</el-form-item> --> </el-form-item> -->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialog.Visible = false"> </el-button>
<el-button v-if="type != 'view'" type="primary" @click="subMit"
<el-button @click="subEsc"> </el-button>
<el-button
v-if="type == 'add' || type == 'edit'"
type="primary"
@click="subMit"
> </el-button > </el-button
> >
</span> </span>
@ -944,6 +956,12 @@ export default {
radioVideo: [], radioVideo: [],
resourcesList: [] resourcesList: []
}; };
this.imgData = [];
this.musicData = [];
this.videoData = [];
this.radioMusic = 1;
this.radioVideo = 1;
this.radioImg = 1;
let res = await queryJbDetail(id); let res = await queryJbDetail(id);
console.log(res, "详情"); console.log(res, "详情");
this.ruleForm = res.data; this.ruleForm = res.data;
@ -963,19 +981,21 @@ export default {
processId: n.processId.split(",") 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); a.push(n);
var tmp = []; var tmp = [];
this.imgData = a; this.imgData = a;
this.radioImg = n.sourceType;
this.radioImg = 1;
} }
if (n.mediaType == 2 && n.sourceType == 1) { if (n.mediaType == 2 && n.sourceType == 1) {
b.push(n); b.push(n);
this.musicData = b; 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"); console.log("进来了1");
b.push(n); b.push(n);
this.ruleForm.radioMusic = b.map(n => { this.ruleForm.radioMusic = b.map(n => {
@ -988,13 +1008,14 @@ export default {
processId: n.processId.split(",") processId: n.processId.split(",")
}; };
}); });
this.radioMusic = n.sourceType;
this.radioMusic = 2;
} }
if (n.mediaType == 3 && n.sourceType == 1) { if (n.mediaType == 3 && n.sourceType == 1) {
c.push(n); c.push(n);
this.videoData = c; 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); c.push(n);
this.ruleForm.radioVideo = c.map(n => { this.ruleForm.radioVideo = c.map(n => {
return { return {
@ -1006,16 +1027,22 @@ export default {
processId: n.processId.split(",") 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) { } catch (err) {
console.log(err); console.log(err);
} }
@ -1042,10 +1069,12 @@ export default {
this.radioMusic = 1; this.radioMusic = 1;
this.radioVideo = 1; this.radioVideo = 1;
this.radioImg = 1; this.radioImg = 1;
this.dialog.Visible = true;
this.disabled = false; this.disabled = false;
this.type = "add"; this.type = "add";
this.dialog.title = "新增剧本"; this.dialog.title = "新增剧本";
setTimeout(()=>{
this.dialog.Visible = true;
},500)
}, },
async subMit() { async subMit() {
console.log(this.imgType, this.musicType, this.videoType); console.log(this.imgType, this.musicType, this.videoType);
@ -1156,6 +1185,26 @@ export default {
console.log(err); 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) { dealRdata(attchments, keyname) {
//attchments: //attchments:
let list = [...attchments]; let list = [...attchments];
@ -1172,17 +1221,21 @@ export default {
// //
handleEdit(row) { handleEdit(row) {
this.queryListDetail(row.id); this.queryListDetail(row.id);
this.dialog.Visible = true;
this.type = "edit"; this.type = "edit";
this.disabled = false; this.disabled = false;
this.dialog.title = "编辑剧本"; this.dialog.title = "编辑剧本";
setTimeout(()=>{
this.dialog.Visible = true;
},500)
}, },
// //
handleView(row) { handleView(row) {
this.queryListDetail(row.id); this.queryListDetail(row.id);
this.type = "view"; this.type = "view";
this.disabled = true; this.disabled = true;
this.dialog.Visible = true;
setTimeout(()=>{
this.dialog.Visible = true;
},500)
}, },
// //
async hanDel(row) { async hanDel(row) {
@ -1321,6 +1374,7 @@ export default {
mediaType: 1, mediaType: 1,
sourceType: this.radioImg sourceType: this.radioImg
}); });
this.$refs.img.data = this.ruleForm.radioImg
}, },
handleAddMusic() { handleAddMusic() {
this.ruleForm.radioMusic.push({ this.ruleForm.radioMusic.push({
@ -1330,6 +1384,7 @@ export default {
mediaType: 2, mediaType: 2,
sourceType: this.radioMusic sourceType: this.radioMusic
}); });
this.$refs.music.data = this.ruleForm.radioMusic
}, },
handleAddVideo() { handleAddVideo() {
this.ruleForm.radioVideo.push({ this.ruleForm.radioVideo.push({
@ -1339,6 +1394,7 @@ export default {
mediaType: 3, mediaType: 3,
sourceType: this.radioVideo sourceType: this.radioVideo
}); });
this.$refs.video.data = this.ruleForm.radioVideo
}, },
// //
labeluploadimg({ file }) { 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].processId = this.processId;
this.imgData[this.imgIndex].mediaType = 1; this.imgData[this.imgIndex].mediaType = 1;
this.imgData[this.imgIndex].sourceType = this.radioImg; 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].processId = this.processId;
this.musicData[this.musicIndex].mediaType = 2; this.musicData[this.musicIndex].mediaType = 2;
this.musicData[this.musicIndex].sourceType = this.radioMusic; 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].processId = this.processId;
this.videoData[this.videoIndex].mediaType = 3; this.videoData[this.videoIndex].mediaType = 3;
this.videoData[this.videoIndex].sourceType = this.radioVideo; this.videoData[this.videoIndex].sourceType = this.radioVideo;

1
src/views/sce/tips/index.vue

@ -309,6 +309,7 @@ export default {
this.dialog.title = "新增"; this.dialog.title = "新增";
this.type = "add"; this.type = "add";
this.form = {}; this.form = {};
this.lcData = []
this.disabled = false; this.disabled = false;
this.dialog.Visible = true; this.dialog.Visible = true;
}, },

Loading…
Cancel
Save