|
|
@ -421,6 +421,8 @@ |
|
|
|
list-type="picture-card" |
|
|
|
:show-file-list="false" |
|
|
|
:http-request="labeluploadimg" |
|
|
|
element-loading-text="正在上传..." |
|
|
|
v-loading="loadingImg" |
|
|
|
> |
|
|
|
<i class="el-icon-plus"></i> |
|
|
|
</el-upload> |
|
|
@ -947,7 +949,9 @@ export default { |
|
|
|
components: { Tinymce }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
liuChengLeixingType:'', |
|
|
|
loadingAudio: false, |
|
|
|
loadingImg:false, |
|
|
|
baseUrl, |
|
|
|
loading: true, |
|
|
|
queryParams: { |
|
|
@ -1664,68 +1668,80 @@ export default { |
|
|
|
}, |
|
|
|
//同步流程 |
|
|
|
tongbuliuchen(){ |
|
|
|
//删除图片 |
|
|
|
this.imgData.forEach((item,index)=>{ |
|
|
|
let imgprocessId=this.imgData[index].processId?this.imgData[index].processId.split(","):[] |
|
|
|
let data=[] |
|
|
|
let name=[] |
|
|
|
if(this.ruleForm.processesList.length<1){ |
|
|
|
this.imgData[index].processId=null |
|
|
|
this.imgData[index].processNames=null |
|
|
|
}else{ |
|
|
|
for(let x=0;x<this.ruleForm.processesList.length;x++){ |
|
|
|
for(let y=0;y<imgprocessId.length;y++){ |
|
|
|
if(this.ruleForm.processesList[x].code.indexOf(imgprocessId[y])>-1 ){ |
|
|
|
data.push(imgprocessId[y]) |
|
|
|
} |
|
|
|
if(this.ruleForm.processesList[x].code==imgprocessId[y]){ |
|
|
|
name.push(this.ruleForm.processesList[x].title) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
this.imgData[index].processId=data.join(",") |
|
|
|
this.imgData[index].processNames=name.join(",") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
//删除音频 |
|
|
|
this.musicData.forEach((item,index)=>{ |
|
|
|
let imgprocessId=this.musicData[index].processId?this.musicData[index].processId.split(","):[] |
|
|
|
let data=[] |
|
|
|
let name=[] |
|
|
|
for(let x=0;x<this.ruleForm.processesList.length;x++){ |
|
|
|
for(let y=0;y<imgprocessId.length;y++){ |
|
|
|
if(this.ruleForm.processesList[x].code.indexOf(imgprocessId[y])>-1 ){ |
|
|
|
data.push(imgprocessId[y]) |
|
|
|
} |
|
|
|
if(this.ruleForm.processesList[x].code==imgprocessId[y]){ |
|
|
|
name.push(this.ruleForm.processesList[x].title) |
|
|
|
} |
|
|
|
} |
|
|
|
this.musicData[index].processId=data.join(",") |
|
|
|
this.musicData[index].processNames=name.join(",") |
|
|
|
} |
|
|
|
}) |
|
|
|
//删除视频 |
|
|
|
this.videoData.forEach((item,index)=>{ |
|
|
|
let imgprocessId=this.videoData[index].processId?this.videoData[index].processId.split(","):[] |
|
|
|
let data=[] |
|
|
|
let name=[] |
|
|
|
for(let x=0;x<this.ruleForm.processesList.length;x++){ |
|
|
|
for(let y=0;y<imgprocessId.length;y++){ |
|
|
|
if(this.ruleForm.processesList[x].code.indexOf(imgprocessId[y])>-1 ){ |
|
|
|
data.push(imgprocessId[y]) |
|
|
|
} |
|
|
|
if(this.ruleForm.processesList[x].code==imgprocessId[y]){ |
|
|
|
name.push(this.ruleForm.processesList[x].title) |
|
|
|
//删除图片 |
|
|
|
this.imgData.forEach((item,index)=>{ |
|
|
|
let imgProcessId=this.imgData[index].processId?this.imgData[index].processId.split(","):[] |
|
|
|
let data=[] |
|
|
|
let name=[] |
|
|
|
if(this.ruleForm.processesList.length<1){ //this.ruleForm.processesList table上的数据 |
|
|
|
this.imgData[index].processId=null //this.imgData 图片的关联流程 |
|
|
|
this.imgData[index].processNames=null |
|
|
|
}else{ |
|
|
|
console.log('else'); |
|
|
|
for(let x=0;x<this.ruleForm.processesList.length;x++){ //遍历table有数据 |
|
|
|
for(let y=0;y<imgProcessId.length;y++){ //遍历图片关联流程数据 |
|
|
|
if(this.ruleForm.processesList[x].code.indexOf(imgProcessId[y])>-1 ){ //如果table上的code在图片的关联数据上,就把图片的关联放到data中 |
|
|
|
data.push(imgProcessId[y]) |
|
|
|
console.log(data); |
|
|
|
}; |
|
|
|
if(this.ruleForm.processesList[x].code==imgProcessId[y]){ //如果图片关联的数据中有table上的code,就把table上的title放到name上 |
|
|
|
name.push(this.ruleForm.processesList[x].title) |
|
|
|
console.log(name); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.imgData[index].processId=data.join(","); //把data上的数据变成字符串赋值到当前图片的下拉框上 |
|
|
|
this.imgData[index].processNames=name.join(',') |
|
|
|
console.log(this.imgData); |
|
|
|
} |
|
|
|
}) |
|
|
|
//删除音频 |
|
|
|
this.musicData.forEach((item,index)=>{ |
|
|
|
let musicProcessId=this.musicData[index].processId?this.musicData[index].processId.split(","):[] |
|
|
|
let data=[] |
|
|
|
let name=[] |
|
|
|
if(this.ruleForm.processesList.length<1){ |
|
|
|
this.musicData[index].processId=null |
|
|
|
this.musicData[index].processNames=null |
|
|
|
}else{ |
|
|
|
for(let x=0;x<this.ruleForm.processesList.length;x++){ |
|
|
|
for(let y=0;y<musicProcessId.length;y++){ |
|
|
|
if(this.ruleForm.processesList[x].code.indexOf(musicProcessId[y])>-1 ){ |
|
|
|
data.push(musicProcessId[y]) |
|
|
|
} |
|
|
|
if(this.ruleForm.processesList[x].code==musicProcessId[y]){ |
|
|
|
name.push(this.ruleForm.processesList[x].title) |
|
|
|
} |
|
|
|
} |
|
|
|
this.musicData[index].processId=data.join(",") |
|
|
|
this.musicData[index].processNames=name.join(",") |
|
|
|
} |
|
|
|
} |
|
|
|
this.videoData[index].processId=data.join(",") |
|
|
|
this.videoData[index].processNames=name.join(",") |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
//删除视频 |
|
|
|
this.videoData.forEach((item,index)=>{ |
|
|
|
let videoProcessId=this.videoData[index].processId?this.videoData[index].processId.split(","):[] |
|
|
|
let data=[] |
|
|
|
let name=[] |
|
|
|
if(this.ruleForm.processesList.length<1){ |
|
|
|
this.videoData[index].processId=null |
|
|
|
this.videoData[index].processNames=null |
|
|
|
}else{ |
|
|
|
for(let x=0;x<this.ruleForm.processesList.length;x++){ |
|
|
|
for(let y=0;y<videoProcessId.length;y++){ |
|
|
|
if(this.ruleForm.processesList[x].code.indexOf(videoProcessId[y])>-1 ){ |
|
|
|
data.push(videoProcessId[y]) |
|
|
|
} |
|
|
|
if(this.ruleForm.processesList[x].code==videoProcessId[y]){ |
|
|
|
name.push(this.ruleForm.processesList[x].title) |
|
|
|
} |
|
|
|
} |
|
|
|
this.videoData[index].processId=data.join(",") |
|
|
|
this.videoData[index].processNames=name.join(",") |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 开本流程删除 |
|
|
|
Del(index) { |
|
|
@ -1735,12 +1751,13 @@ export default { |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.ruleForm.processesList.splice(index, 1), |
|
|
|
console.log('点击删除'); |
|
|
|
this.ruleForm.processesList.splice(index, 1), |
|
|
|
this.tongbuliuchen(); |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "删除成功!" |
|
|
|
}); |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
@ -1848,6 +1865,7 @@ export default { |
|
|
|
const formdata = new FormData(); |
|
|
|
formdata.append("file", file); |
|
|
|
formdata.append("type", "product"); |
|
|
|
this.loadingImg = true; |
|
|
|
uploadFile(formdata).then(res => { |
|
|
|
this.imgData.push({ |
|
|
|
url: res.data.wjUrl, |
|
|
@ -1857,6 +1875,7 @@ export default { |
|
|
|
sourceType: 1 |
|
|
|
}); |
|
|
|
this.imgType = true; |
|
|
|
this.loadingImg = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
labeluploadmusic({ file }) { |
|
|
@ -1955,9 +1974,6 @@ export default { |
|
|
|
}, |
|
|
|
//关联流程 |
|
|
|
setLc(item, i, type) { |
|
|
|
console.log('item',item); |
|
|
|
console.log('i',i); |
|
|
|
console.log('type',type); |
|
|
|
if (this.ruleForm.processesList.length == 0) { |
|
|
|
this.$message({ |
|
|
|
message: "请新建流程", |
|
|
@ -1966,26 +1982,64 @@ export default { |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (type == "img") { |
|
|
|
this.imgIndex = i; |
|
|
|
try{ |
|
|
|
this.processId = this.imgData[i].processId.split(',') |
|
|
|
this.liuChengLeixingType = 'img' |
|
|
|
this.imgIndex = i; |
|
|
|
console.log('musicIndex',this.imgIndex); |
|
|
|
try{ |
|
|
|
if(this.imgData[i].processNames == ''){ |
|
|
|
this.processId = ""; |
|
|
|
}else{ |
|
|
|
// this.processId = this.imgData[i].processId.split(',') //数组 |
|
|
|
let processId = this.imgData[i].processId.split(',') //数组 |
|
|
|
//图片添加的时候下拉多选框回显 |
|
|
|
this.ruleForm.resourcesList.forEach(item=>{ |
|
|
|
if(item.processId == processId) { |
|
|
|
this.processId = processId; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}catch(err){} |
|
|
|
} else if (type == "music") { |
|
|
|
this.liuChengLeixingType = 'music' |
|
|
|
this.musicIndex = i; |
|
|
|
console.log('musicIndex',this.musicIndex); |
|
|
|
try{ |
|
|
|
this.processId = this.musicData[i].processId.split(',') |
|
|
|
if(this.musicData[i].processNames == ''){ |
|
|
|
this.processId = ""; |
|
|
|
}else{ |
|
|
|
// this.processId = this.musicData[i].processId.split(',') |
|
|
|
let processId = this.musicData[i].processId.split(',') |
|
|
|
//音频添加的时候下拉多选框回显 |
|
|
|
this.ruleForm.resourcesList.forEach(item=>{ |
|
|
|
if(item.processId == processId) { |
|
|
|
this.processId = processId; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}catch(err){} |
|
|
|
} else if (type == "video") { |
|
|
|
this.liuChengLeixingType = 'video' |
|
|
|
this.videoIndex = i; |
|
|
|
console.log('videoIndex',this.videoIndex); |
|
|
|
try{ |
|
|
|
this.processId = this.videoData[i].processId.split(',') |
|
|
|
if(this.videoData[i].processNames == ''){ |
|
|
|
this.processId = ""; |
|
|
|
}else{ |
|
|
|
// this.processId = this.videoData[i].processId.split(',') |
|
|
|
let processId = this.videoData[i].processId.split(',') |
|
|
|
//视频添加的时候下拉多选框回显 |
|
|
|
this.ruleForm.resourcesList.forEach(item=>{ |
|
|
|
if(item.processId == processId) { |
|
|
|
this.processId = processId; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}catch(err){} |
|
|
|
} |
|
|
|
this.list = item; |
|
|
|
this.typeUrl = type; |
|
|
|
// this.processId = ""; |
|
|
|
this.process.Visible = true; |
|
|
|
|
|
|
|
}, |
|
|
|
subMitLc() { |
|
|
|
this.process.Visible = false; |
|
|
@ -2000,7 +2054,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
this.imgData[this.imgIndex].processNames = tmp.join(","); |
|
|
|
this.imgData[this.imgIndex].processId = this.processId; |
|
|
|
this.imgData[this.imgIndex].processId = this.processId.join(','); |
|
|
|
this.imgData[this.imgIndex].mediaType = 1; |
|
|
|
this.imgData[this.imgIndex].sourceType = this.radioImg; |
|
|
|
} |
|
|
@ -2015,7 +2069,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
this.musicData[this.musicIndex].processNames = tmp.join(","); |
|
|
|
this.musicData[this.musicIndex].processId = this.processId; |
|
|
|
this.musicData[this.musicIndex].processId = this.processId.join(','); |
|
|
|
this.musicData[this.musicIndex].mediaType = 2; |
|
|
|
this.musicData[this.musicIndex].sourceType = this.radioMusic; |
|
|
|
} |
|
|
@ -2030,7 +2084,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
this.videoData[this.videoIndex].processNames = tmp.join(","); |
|
|
|
this.videoData[this.videoIndex].processId = this.processId; |
|
|
|
this.videoData[this.videoIndex].processId = this.processId.join(','); |
|
|
|
this.videoData[this.videoIndex].mediaType = 3; |
|
|
|
this.videoData[this.videoIndex].sourceType = this.radioVideo; |
|
|
|
} |
|
|
|