|
|
@ -76,7 +76,9 @@ |
|
|
|
<el-button type="text" size="mini" @click="handleEdit(scope.row)" |
|
|
|
>编辑</el-button |
|
|
|
> |
|
|
|
<el-button type="text" size="mini">Tips维护</el-button> |
|
|
|
<el-button type="text" size="mini" @click="handleTips(scope.row)" |
|
|
|
>Tips维护</el-button |
|
|
|
> |
|
|
|
<el-button type="text" size="mini" @click="hanDel(scope.row)" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
@ -92,7 +94,7 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<!-- 新增表单 --> |
|
|
|
<el-dialog :title="dialog.title" :visible.sync="dialog.Visible" width="70%"> |
|
|
|
<el-dialog :title="dialog.title" :visible.sync="dialog.Visible" width="1000px"> |
|
|
|
<el-form |
|
|
|
ref="ruleForm" |
|
|
|
:model="ruleForm" |
|
|
@ -265,6 +267,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-upload |
|
|
|
v-if="type != 'view'" |
|
|
|
class="avatar-uploader" |
|
|
|
style="float:left;margin-left:60px" |
|
|
|
action |
|
|
@ -406,6 +409,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-upload |
|
|
|
v-if="type != 'view'" |
|
|
|
class="avatar-uploader" |
|
|
|
style="float:left;margin-left:60px" |
|
|
|
action |
|
|
@ -550,6 +554,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-upload |
|
|
|
v-if="type != 'view'" |
|
|
|
class="avatar-uploader" |
|
|
|
style="float:left;margin-left:60px" |
|
|
|
action |
|
|
@ -678,7 +683,12 @@ |
|
|
|
> |
|
|
|
<el-form> |
|
|
|
<el-form-item label="关联流程"> |
|
|
|
<el-select v-model="processId" clearable placeholder="请选择流程"> |
|
|
|
<el-select |
|
|
|
v-model="processId" |
|
|
|
clearable |
|
|
|
multiple |
|
|
|
placeholder="请选择流程" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in ruleForm.processesList" |
|
|
|
:key="item.value" |
|
|
@ -759,7 +769,7 @@ export default { |
|
|
|
imgData: [], |
|
|
|
musicData: [], |
|
|
|
videoData: [], |
|
|
|
processId: "", |
|
|
|
processId: [], |
|
|
|
process: { |
|
|
|
Visible: false |
|
|
|
}, |
|
|
@ -787,11 +797,14 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
ForChannel(e) { |
|
|
|
console.log(e); |
|
|
|
console.log(this.ruleForm.processesList); |
|
|
|
var a = e.split(","); |
|
|
|
var tmp = []; |
|
|
|
for (var i = 0; i < this.ruleForm.processesList.length; i++) { |
|
|
|
if (this.ruleForm.processesList[i].code == e) { |
|
|
|
return this.ruleForm.processesList[i].title; |
|
|
|
for (var s = 0; s < a.length; s++) { |
|
|
|
if (this.ruleForm.processesList[i].code == e[s]) { |
|
|
|
tmp.push(this.ruleForm.processesList[i].title); |
|
|
|
return tmp; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -825,6 +838,13 @@ export default { |
|
|
|
}; |
|
|
|
this.queryList(); |
|
|
|
}, |
|
|
|
//跳转Tips维护 |
|
|
|
handleTips(row) { |
|
|
|
this.$router.push({ |
|
|
|
name: "Tips/index", |
|
|
|
query: { scenarioId: row.id, type: "sceinfo" } |
|
|
|
}); |
|
|
|
}, |
|
|
|
//获取流程 |
|
|
|
async queryFindList() { |
|
|
|
try { |
|
|
@ -838,70 +858,89 @@ export default { |
|
|
|
//获取详情 |
|
|
|
async queryListDetail(id) { |
|
|
|
try { |
|
|
|
this.ruleForm = { |
|
|
|
studioName: "", |
|
|
|
title: "", |
|
|
|
labelName: "", |
|
|
|
imgUrl: "", |
|
|
|
cover: "", |
|
|
|
introduction: "", |
|
|
|
processesList: [], |
|
|
|
imgUrl: "", |
|
|
|
radioImg: [], |
|
|
|
radioMusic: [], |
|
|
|
radioVideo: [], |
|
|
|
resourcesList: [] |
|
|
|
}; |
|
|
|
let res = await queryJbDetail(id); |
|
|
|
console.log(res, "详情"); |
|
|
|
this.ruleForm = res.data; |
|
|
|
this.ruleForm.radioImg = []; |
|
|
|
this.ruleForm.radioMusic = []; |
|
|
|
this.ruleForm.radioVideo = []; |
|
|
|
res.data.resourcesList.map(n => { |
|
|
|
var a = [] |
|
|
|
var b = [] |
|
|
|
var c = [] |
|
|
|
var a = []; |
|
|
|
var b = []; |
|
|
|
var c = []; |
|
|
|
if (n.mediaType == 1 && n.sourceType == 2) { |
|
|
|
a.push(n) |
|
|
|
a.push(n); |
|
|
|
this.ruleForm.radioImg = a.map(n => { |
|
|
|
return { |
|
|
|
mediaType: n.mediaType, |
|
|
|
sourceType: n.sourceType, |
|
|
|
title: n.title, |
|
|
|
url: n.url, |
|
|
|
processId: n.processId.split(',') |
|
|
|
processId: n.processId.split(",") |
|
|
|
}; |
|
|
|
}); |
|
|
|
this.radioImg = n.sourceType; |
|
|
|
} else if (n.mediaType == 1 && n.sourceType == 1) { |
|
|
|
a.push(n); |
|
|
|
var tmp = [] |
|
|
|
this.imgData = a |
|
|
|
|
|
|
|
this.radioImg = n.sourceType; |
|
|
|
} |
|
|
|
if (n.mediaType == 2 && n.sourceType == 1) { |
|
|
|
b.push(n) |
|
|
|
this.musicData = b |
|
|
|
b.push(n); |
|
|
|
this.musicData = b; |
|
|
|
this.radioMusic = n.sourceType; |
|
|
|
} else if (n.mediaType == 2 && n.sourceType == 2) { |
|
|
|
console.log('进来了1') |
|
|
|
b.push(n) |
|
|
|
console.log("进来了1"); |
|
|
|
b.push(n); |
|
|
|
this.ruleForm.radioMusic = b.map(n => { |
|
|
|
return { |
|
|
|
mediaType: n.mediaType, |
|
|
|
sourceType: n.sourceType, |
|
|
|
title: n.title, |
|
|
|
url: n.url, |
|
|
|
processId: n.processId.split(',') |
|
|
|
processId: n.processId.split(",") |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.radioMusic = n.sourceType; |
|
|
|
} |
|
|
|
if (n.mediaType == 3 && n.sourceType == 1) { |
|
|
|
c.push(n) |
|
|
|
this.videoData = c |
|
|
|
c.push(n); |
|
|
|
this.videoData = c; |
|
|
|
this.radioVideo = n.sourceType; |
|
|
|
} else if (n.mediaType == 3 && n.sourceType == 2) { |
|
|
|
c.push(n) |
|
|
|
c.push(n); |
|
|
|
this.ruleForm.radioVideo = c.map(n => { |
|
|
|
return { |
|
|
|
mediaType: n.mediaType, |
|
|
|
sourceType: n.sourceType, |
|
|
|
title: n.title, |
|
|
|
url: n.url, |
|
|
|
processId: n.processId.split(',') |
|
|
|
processId: n.processId.split(",") |
|
|
|
}; |
|
|
|
}); |
|
|
|
this.radioVideo = n.sourceType; |
|
|
|
} |
|
|
|
}); |
|
|
|
console.log(this.ruleForm, "处理后详情"); |
|
|
|
console.log( |
|
|
|
this.ruleForm, |
|
|
|
this.musicData, |
|
|
|
this.imgData, |
|
|
|
this.videoData, |
|
|
|
"处理后详情" |
|
|
|
); |
|
|
|
} catch (err) { |
|
|
|
console.log(err); |
|
|
|
} |
|
|
@ -909,6 +948,12 @@ export default { |
|
|
|
// 新增 |
|
|
|
handleAdd() { |
|
|
|
this.ruleForm = { |
|
|
|
studioName: "", |
|
|
|
title: "", |
|
|
|
labelName: "", |
|
|
|
imgUrl: "", |
|
|
|
cover: "", |
|
|
|
introduction: "", |
|
|
|
processesList: [], |
|
|
|
imgUrl: "", |
|
|
|
radioImg: [], |
|
|
@ -916,6 +961,9 @@ export default { |
|
|
|
radioVideo: [], |
|
|
|
resourcesList: [] |
|
|
|
}; |
|
|
|
this.imgData = [] |
|
|
|
this.musicData = [] |
|
|
|
this.videoData = [] |
|
|
|
this.radioMusic = 1; |
|
|
|
this.radioVideo = 1; |
|
|
|
this.radioImg = 1; |
|
|
@ -981,20 +1029,20 @@ export default { |
|
|
|
this.$refs["ruleForm"].validate(async valid => { |
|
|
|
if (valid) { |
|
|
|
if (this.type == "add") { |
|
|
|
var res = await addJbInfo(this.ruleForm); |
|
|
|
var res = await addJbInfo(this.ruleForm); |
|
|
|
} else if (this.type == "edit") { |
|
|
|
var res = await updateJbInfo(this.ruleForm); |
|
|
|
var res = await updateJbInfo(this.ruleForm); |
|
|
|
} |
|
|
|
if (res.code == 200) { |
|
|
|
this.$message.success("新增成功"); |
|
|
|
this.dialog.Visible = false; |
|
|
|
this.queryList(); |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: res.msg, |
|
|
|
type: "error" |
|
|
|
}); |
|
|
|
} |
|
|
|
if (res.code == 200) { |
|
|
|
this.$message.success("新增成功"); |
|
|
|
this.dialog.Visible = false; |
|
|
|
this.queryList(); |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: res.msg, |
|
|
|
type: "error" |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} catch (err) { |
|
|
@ -1192,7 +1240,7 @@ export default { |
|
|
|
this.imgData.push({ |
|
|
|
url: res.data.wjUrl, |
|
|
|
processName: "", |
|
|
|
title: "" |
|
|
|
title: res.data.wjDx |
|
|
|
}); |
|
|
|
this.imgType = true; |
|
|
|
}); |
|
|
@ -1205,7 +1253,7 @@ export default { |
|
|
|
this.musicData.push({ |
|
|
|
url: res.data.wjUrl, |
|
|
|
processName: "", |
|
|
|
title: "" |
|
|
|
title: res.data.wjDx |
|
|
|
}); |
|
|
|
this.musicType = true; |
|
|
|
}); |
|
|
@ -1218,9 +1266,9 @@ export default { |
|
|
|
this.videoData.push({ |
|
|
|
url: res.data.wjUrl, |
|
|
|
processName: "", |
|
|
|
title: "" |
|
|
|
title: res.data.wjDx |
|
|
|
}); |
|
|
|
this.musicType = true; |
|
|
|
this.radioType = true; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 图片删除 |
|
|
@ -1255,7 +1303,7 @@ export default { |
|
|
|
if (type == "img") { |
|
|
|
this.imgIndex = i; |
|
|
|
} else if (type == "music") { |
|
|
|
this.musicIdnex = i; |
|
|
|
this.musicIndex = i; |
|
|
|
} else if (type == "video") { |
|
|
|
this.videoIndex = i; |
|
|
|
} |
|
|
@ -1268,30 +1316,49 @@ export default { |
|
|
|
this.process.Visible = false; |
|
|
|
if (this.typeUrl == "img") { |
|
|
|
this.imgType = false; |
|
|
|
this.imgData[this.imgIndex].processName = this.ForChannel( |
|
|
|
this.processId |
|
|
|
); |
|
|
|
this.imgData[this.imgIndex].processId = [this.processId]; |
|
|
|
var tmp = []; |
|
|
|
for (var i = 0; i < this.ruleForm.processesList.length; i++) { |
|
|
|
for (var s = 0; s < this.processId.length; s++) { |
|
|
|
if (this.ruleForm.processesList[i].code == this.processId[s]) { |
|
|
|
tmp.push(this.ruleForm.processesList[i].title); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.imgData[this.imgIndex].processName = tmp.join(","); |
|
|
|
this.imgData[this.imgIndex].processId = this.processId; |
|
|
|
this.imgData[this.imgIndex].mediaType = 1; |
|
|
|
this.imgData[this.imgIndex].sourceType = this.radioImg; |
|
|
|
console.log(this.imgData, "处理后img数据"); |
|
|
|
} |
|
|
|
if (this.typeUrl == "music") { |
|
|
|
this.musicType = false; |
|
|
|
this.musicData[this.imgIndex].processName = this.ForChannel( |
|
|
|
this.processId |
|
|
|
); |
|
|
|
this.musicData[this.musicIndex].processId = [this.processId]; |
|
|
|
var tmp = []; |
|
|
|
for (var i = 0; i < this.ruleForm.processesList.length; i++) { |
|
|
|
for (var s = 0; s < this.processId.length; s++) { |
|
|
|
if (this.ruleForm.processesList[i].code == this.processId[s]) { |
|
|
|
tmp.push(this.ruleForm.processesList[i].title); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.musicData[this.musicIndex].processName = tmp.join(","); |
|
|
|
this.musicData[this.musicIndex].processId = this.processId; |
|
|
|
this.musicData[this.musicIndex].mediaType = 2; |
|
|
|
this.musicData[this.musicIndex].sourceType = this.radioImg; |
|
|
|
this.musicData[this.musicIndex].sourceType = this.radioMusic; |
|
|
|
} |
|
|
|
if (this.typeUrl == "video") { |
|
|
|
this.videoType = false; |
|
|
|
this.videoData[this.videoIndex].processName = this.ForChannel( |
|
|
|
this.processId |
|
|
|
); |
|
|
|
this.videoData[this.videoIndex].processId = [this.processId]; |
|
|
|
var tmp = []; |
|
|
|
for (var i = 0; i < this.ruleForm.processesList.length; i++) { |
|
|
|
for (var s = 0; s < this.processId.length; s++) { |
|
|
|
if (this.ruleForm.processesList[i].code == this.processId[s]) { |
|
|
|
tmp.push(this.ruleForm.processesList[i].title); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.videoData[this.videoIndex].processName = tmp.join(","); |
|
|
|
this.videoData[this.videoIndex].processId = this.processId; |
|
|
|
this.videoData[this.videoIndex].mediaType = 3; |
|
|
|
this.videoData[this.videoIndex].sourceType = this.radioImg; |
|
|
|
this.videoData[this.videoIndex].sourceType = this.radioVideo; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|