邹畅 3 years ago
parent
commit
0c226692e9
2 changed files with 127 additions and 45 deletions
  1. 160
      src/views/sce/sceInfo/index.vue
  2. 12
      src/views/sce/tips/index.vue

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

@ -94,7 +94,11 @@
/>
</div>
<!-- 新增表单 -->
<el-dialog :title="dialog.title" :visible.sync="dialog.Visible" width="1000px">
<el-dialog
:title="dialog.title"
:visible.sync="dialog.Visible"
width="1000px"
>
<el-form
ref="ruleForm"
:model="ruleForm"
@ -105,13 +109,25 @@
>
<h3 class="form-title">基本信息</h3>
<el-form-item label="剧本标题:" prop="title" style="width:45%">
<el-input :disabled='disabled' v-model="ruleForm.title" style="width:300px;" />
<el-input
:disabled="disabled"
v-model="ruleForm.title"
style="width:300px;"
/>
</el-form-item>
<el-form-item label="工作室:" prop="studioName" style="width:45%">
<el-input :disabled='disabled' v-model="ruleForm.studioName" style="width:300px;" />
<el-input
:disabled="disabled"
v-model="ruleForm.studioName"
style="width:300px;"
/>
</el-form-item>
<el-form-item label="标签:" prop="labelName" style="width:100%">
<el-input :disabled='disabled' v-model="ruleForm.labelName" style="width:300px;" />
<el-input
:disabled="disabled"
v-model="ruleForm.labelName"
style="width:300px;"
/>
</el-form-item>
<h3 class="form-title">剧本图片</h3>
<el-form-item label="封面" prop="cover">
@ -180,7 +196,10 @@
</el-table-column>
<el-table-column align="center" property="code" label="流程编号">
<template slot-scope="scope">
<el-input v-model="ruleForm.processesList[scope.$index].code" />
<el-input
@input="changCode"
v-model="ruleForm.processesList[scope.$index].code"
/>
</template>
</el-table-column>
<el-table-column align="center" property="introduction" label="简介">
@ -228,6 +247,7 @@
<div style="margin-top:15px;" v-if="type != 'view'">
<el-button
type="success"
:disabled='disabledButton'
style="height:36px;width:100px;margin-left:30px;color:#fff;background:#33DB99"
@click="handleAddK"
>新增</el-button
@ -235,7 +255,11 @@
</div>
<h3 class="form-title">剧本资源</h3>
<el-form-item label="图片" prop="imgUrls" style="width: 100%;">
<el-radio-group :disabled='disabled' v-model="radioImg" @change="changeImg">
<el-radio-group
:disabled="disabled"
v-model="radioImg"
@change="changeImg"
>
<el-radio :label="1">本地上传</el-radio>
<el-radio :label="2">网易云地址</el-radio>
</el-radio-group>
@ -258,9 +282,13 @@
</p>
</div>
<div class="sz_container" style="text-align:center">
<span>{{ item.processName }}</span>
<span>{{ item.processNames }}</span>
</div>
<div v-if="type != 'view'" class="sz_container" style="text-align:center">
<div
v-if="type != 'view'"
class="sz_container"
style="text-align:center"
>
<el-button size="mini" type="text" @click="setLc(item, i, 'img')"
>关联流程</el-button
>
@ -359,7 +387,7 @@
label="关联流程"
>
<template slot-scope="scope">
{{ mapForChannel(scope.row.processId) }}
{{ scope.row.processNames }}
</template>
</el-table-column>
</el-table>
@ -373,7 +401,11 @@
</div>
</el-form-item>
<el-form-item label="音频" prop="imgUrls" style="width: 100%;">
<el-radio-group :disabled='disabled' v-model="radioMusic" @change="changeMusic">
<el-radio-group
:disabled="disabled"
v-model="radioMusic"
@change="changeMusic"
>
<el-radio :label="1">本地上传</el-radio>
<el-radio :label="2">网易云地址</el-radio>
</el-radio-group>
@ -397,9 +429,13 @@
</p>
</div>
<div class="sz_container" style="text-align:center">
<span>{{ item.processName }}</span>
<span>{{ item.processNames }}</span>
</div>
<div v-if="type != 'view'" class="sz_container" style="text-align:center">
<div
v-if="type != 'view'"
class="sz_container"
style="text-align:center"
>
<el-button
size="mini"
type="text"
@ -504,7 +540,7 @@
label="关联流程"
>
<template slot-scope="scope">
{{ mapForChannel(scope.row.processId) }}
{{ scope.row.processNames }}
</template>
</el-table-column>
</el-table>
@ -518,7 +554,11 @@
</div>
</el-form-item>
<el-form-item label="视频" prop="imgUrls" style="width: 100%;">
<el-radio-group :disabled='disabled' v-model="radioVideo" @change="changeVideo">
<el-radio-group
:disabled="disabled"
v-model="radioVideo"
@change="changeVideo"
>
<el-radio :label="1">本地上传</el-radio>
<el-radio :label="2">网易云地址</el-radio>
</el-radio-group>
@ -542,9 +582,13 @@
</p>
</div>
<div class="sz_container" style="text-align:center">
<span>{{ item.processName }}</span>
<span>{{ item.processNames }}</span>
</div>
<div v-if="type != 'view'" class="sz_container" style="text-align:center">
<div
v-if="type != 'view'"
class="sz_container"
style="text-align:center"
>
<el-button
size="mini"
type="text"
@ -649,7 +693,7 @@
label="关联流程"
>
<template slot-scope="scope">
{{ mapForChannel(scope.row.processId) }}
{{ scope.row.processNames }}
</template>
</el-table-column>
</el-table>
@ -782,7 +826,8 @@ export default {
musicIdnex: "",
videoIndex: "",
dataList: {},
disabled:false
disabled: false,
disabledButton:false
};
},
mounted() {
@ -809,6 +854,32 @@ export default {
}
}
},
changCode() {
console.log(this.ruleForm.processesList, "输入的值");
if (this.ruleForm.processesList.length > 1) {
for (var i = 0; i < this.ruleForm.processesList.length; i++) {
let s = i + 1;
if (
s < this.ruleForm.processesList.length ||
s == this.ruleForm.processesList.length
) {
console.log(i, s);
if (
this.ruleForm.processesList[i].code ==
this.ruleForm.processesList[s].code
) {
this.$message({
message: "输入的流程编号有重复,请重新输入",
type: "error"
});
this.disabledButton = true
}else{
this.disabledButton = false
}
}
}
}
},
//
async queryList() {
this.loading = true;
@ -888,15 +959,16 @@ export default {
sourceType: n.sourceType,
title: n.title,
url: n.url,
processNames: n.processNames,
processId: n.processId.split(",")
};
});
this.radioImg = n.sourceType;
} else if (n.mediaType == 1 && n.sourceType == 1) {
a.push(n);
var tmp = []
this.imgData = a
var tmp = [];
this.imgData = a;
this.radioImg = n.sourceType;
}
if (n.mediaType == 2 && n.sourceType == 1) {
@ -912,6 +984,7 @@ export default {
sourceType: n.sourceType,
title: n.title,
url: n.url,
processNames: n.processNames,
processId: n.processId.split(",")
};
});
@ -929,6 +1002,7 @@ export default {
sourceType: n.sourceType,
title: n.title,
url: n.url,
processNames: n.processNames,
processId: n.processId.split(",")
};
});
@ -962,14 +1036,14 @@ export default {
radioVideo: [],
resourcesList: []
};
this.imgData = []
this.musicData = []
this.videoData = []
this.imgData = [];
this.musicData = [];
this.videoData = [];
this.radioMusic = 1;
this.radioVideo = 1;
this.radioImg = 1;
this.dialog.Visible = true;
this.disabled = false
this.disabled = false;
this.type = "add";
this.dialog.title = "新增剧本";
},
@ -1010,20 +1084,20 @@ export default {
let data = this.ruleForm.radioImg
.concat(this.ruleForm.radioMusic)
.concat(this.ruleForm.radioVideo);
let a = []
let b = this.ruleForm.processesList.map((n)=>{
if(n.title != ''){
a.push(n)
}
})
this.ruleForm.processesList = a.map((n)=>{
return{
title:n.title,
code:n.code,
introduction:n.introduction,
sort:n.sort
let a = [];
let b = this.ruleForm.processesList.map(n => {
if (n.title != "") {
a.push(n);
}
})
});
this.ruleForm.processesList = a.map(n => {
return {
title: n.title,
code: n.code,
introduction: n.introduction,
sort: n.sort
};
});
let list = [];
data.map(n => {
if (n.url != "") {
@ -1083,14 +1157,14 @@ export default {
this.queryListDetail(row.id);
this.dialog.Visible = true;
this.type = "edit";
this.disabled = false
this.disabled = false;
this.dialog.title = "编辑剧本";
},
//
handleView(row) {
this.queryListDetail(row.id);
this.type = "view";
this.disabled = true
this.disabled = true;
this.dialog.Visible = true;
},
//
@ -1257,7 +1331,7 @@ export default {
uploadFile(formdata).then(res => {
this.imgData.push({
url: res.data.wjUrl,
processName: "",
processNames: "",
title: res.data.wjDx
});
this.imgType = true;
@ -1270,7 +1344,7 @@ export default {
uploadFile(formdata).then(res => {
this.musicData.push({
url: res.data.wjUrl,
processName: "",
processNames: "",
title: res.data.wjDx
});
this.musicType = true;
@ -1283,7 +1357,7 @@ export default {
uploadFile(formdata).then(res => {
this.videoData.push({
url: res.data.wjUrl,
processName: "",
processNames: "",
title: res.data.wjDx
});
this.radioType = true;

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

@ -8,7 +8,7 @@
v-model="queryParams.query.scenarioId"
clearable
placeholder="请选择剧本标题"
@change="chageLc"
@change="queryLc"
@visible-change='foucsLc'
>
<el-option
@ -249,12 +249,20 @@ export default {
console.log(err);
}
},
queryLc(val){
this.data = {
scenarioId:val
}
delete this.queryParams.query.processId
this.queryFindList()
},
chageLc(val){
console.log(val)
this.data = {
scenarioId:val
}
this.form.processId = ''
delete this.form.processId
// this.form.processId =
this.queryFindList()
},
foucsLc(){

Loading…
Cancel
Save