diff --git a/src/views/sce/sceInfo/index.vue b/src/views/sce/sceInfo/index.vue index 553260d..d4d7f5b 100644 --- a/src/views/sce/sceInfo/index.vue +++ b/src/views/sce/sceInfo/index.vue @@ -377,6 +377,7 @@ 网易云地址 --> + {{ item.processNames }} - - 关联流程 + 关联流程 + + 标题: + + + + + 删除音频 + + 标题: + + + 删除视频 + + 标题: + + - + + { + // let num = Math.floor(Math.random() * (max - min)) + min; + // console.log(num); + // if(item.code == num){ + // rand(1000,9999); + // } + // if(item.code != num){ + // return num; + // } + // }) + return Math.floor(Math.random() * (max - min)) + min; + } this.ruleForm.processesList.push({ title: "", - code: "", + code: rand(1000,9999), introduction: "", sort: "", type: "5" @@ -1668,6 +1712,7 @@ export default { }, //同步流程 tongbuliuchen(){ + try{ //删除图片 this.imgData.forEach((item,index)=>{ let imgProcessId=this.imgData[index].processId?this.imgData[index].processId.split(","):[] @@ -1680,8 +1725,7 @@ export default { console.log('else'); for(let x=0;x-1 ){ //如果table上的code在图片的关联数据上,就把图片的关联放到data中 - if(this.ruleForm.processesList[x].code.includes(imgProcessId[y]) ){ //如果table上的code在图片的关联数据上,就把图片的关联放到data中 + if(this.ruleForm.processesList[x].code.indexOf(imgProcessId[y])>-1 ){ //如果table上的code在图片的关联数据上,就把图片的关联放到data中 data.push(imgProcessId[y]) console.log(data); }; @@ -1689,7 +1733,6 @@ export default { name.push(this.ruleForm.processesList[x].title) console.log(name); } - // debugger } } this.imgData[index].processId=data.join(","); //把data上的数据变成字符串赋值到当前图片的下拉框上 @@ -1697,52 +1740,53 @@ export default { 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-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.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-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(",") - // } - // } - // }) + //删除音频 + 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-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.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-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(",") + } + } + }) + }catch(err){} }, // 开本流程删除 Del(index) { @@ -1861,14 +1905,19 @@ export default { this.$refs.video.data = this.ruleForm.radioVideo; } }, - // 上传资源蹄片 + // 上传资源图片 labeluploadimg({ file }) { + console.log(file); const formdata = new FormData(); formdata.append("file", file); formdata.append("type", "product"); this.loadingImg = true; + this.jinduShowImg = true; + this.jinduImgNum = 0; + this.radioImg = 1; uploadFile(formdata).then(res => { this.imgData.push({ + name:res.data.wjCsmc, url: res.data.wjUrl, processNames: "", title: res.data.wjDx, @@ -1877,10 +1926,30 @@ export default { }); this.imgType = true; this.loadingImg = false; + this.jinduImgNum = 100; + this.jinduShowImg = false; + clearInterval(this.videoTime); + this.videoTime = null; + this.successVideo('img'); }); + let videoJindu1 = setTimeout(() => { + this.jinduImgNum = 30; + }, 500); + let videoJindu2 = setTimeout(() => { + videoJindu1 + this.jinduImgNum = 80; + }, 1000); + this.videoTime = setTimeout(() => { + videoJindu2 + this.jinduImgNum = 99; + }, 1500); }, + //音频 labeluploadmusic({ file }) { + this.radioMusic = 1; this.loadingAudio = true; + this.jinduShowAudio = true; + this.jinduAudioNum = 0; const formdata = new FormData(); formdata.append("file", file); formdata.append("type", "product"); @@ -1894,10 +1963,31 @@ export default { }); this.loadingAudio = false; this.musicType = true; + this.jinduAudioNum = 100; + this.jinduShowAudio = false; + clearInterval(this.videoTime); + this.videoTime = null; + this.successVideo('audio'); }); + let videoJindu1 = setTimeout(() => { + this.jinduAudioNum = 30; + }, 500); + let videoJindu2 = setTimeout(() => { + videoJindu1 + this.jinduAudioNum = 80; + }, 1000); + this.videoTime = setTimeout(() => { + videoJindu2 + this.jinduAudioNum = 98; + }, 1500); }, + //视频 labeluploadvideo({ file }) { + this.videoTime this.loading = true; + this.radioVideo = 1; + this.jinduShowVideo = true; + this.jinduVideoNum = 0; const formdata = new FormData(); formdata.append("file", file); formdata.append("type", "product"); @@ -1911,8 +2001,51 @@ export default { }); this.loading = false; //取消加载 this.radioType = true; - this.findvideocover(res.data.wjUrl, file); + // this.jinduVideoNum = 100; + // this.jinduShowVideo = false; + clearInterval(this.videoTime); + this.videoTime = null; + this.successVideo('video'); + // this.findvideocover(res.data.wjUrl, file); }); + let videoJindu1 = setTimeout(() => { + this.jinduVideoNum = 30; + }, 500); + let videoJindu2 = setTimeout(() => { + videoJindu1 + this.jinduVideoNum = 80; + }, 1000); + this.videoTime = setTimeout(() => { + videoJindu2 + this.jinduVideoNum = 90; + }, 1500); + }, + successVideo(type){ + console.log('上传成功'); + switch (type) { + case 'img': + this.jinduImgNum = 100; + setTimeout(() => { + this.jinduShowImg = false; + }, 1200); + break; + case 'audio': + console.log('音频'); + this.jinduAudioNum = 100; + setTimeout(() => { + this.jinduShowAudio = false; + }, 1200); + break; + case 'video': + this.jinduVideoNum = 100; + setTimeout(() => { + this.jinduShowVideo = false; + }, 1200); + break; + } + // setTimeout(() => { + // this.jinduShowVideo = false; + // }, 800); }, delDataImg(item, index) { this.$confirm("此操作将永久删除图片,是否继续?", "提示", { @@ -1973,6 +2106,10 @@ export default { }); }); }, + changeTitle(item, i, type,e){ + console.log(item,i,type,e); + + }, //关联流程 setLc(item, i, type) { if (this.ruleForm.processesList.length == 0) { @@ -2058,6 +2195,7 @@ export default { this.imgData[this.imgIndex].processId = this.processId.join(','); this.imgData[this.imgIndex].mediaType = 1; this.imgData[this.imgIndex].sourceType = this.radioImg; + this.imgData[this.imgIndex].title = this.imgTitle; } if (this.typeUrl == "music") { this.musicType = false; @@ -2073,6 +2211,8 @@ export default { this.musicData[this.musicIndex].processId = this.processId.join(','); this.musicData[this.musicIndex].mediaType = 2; this.musicData[this.musicIndex].sourceType = this.radioMusic; + this.musicData[this.musicIndex].title = this.audioTitle; + } if (this.typeUrl == "video") { this.videoType = false; @@ -2088,6 +2228,7 @@ export default { this.videoData[this.videoIndex].processId = this.processId.join(','); this.videoData[this.videoIndex].mediaType = 3; this.videoData[this.videoIndex].sourceType = this.radioVideo; + this.videoData[this.videoIndex].title = this.videoTitle; } }, prevent(e) { diff --git a/src/views/sce/sceInfo/index1.vue b/src/views/sce/sceInfo/index1.vue new file mode 100644 index 0000000..0cfc558 --- /dev/null +++ b/src/views/sce/sceInfo/index1.vue @@ -0,0 +1,2443 @@ + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + 新建 + + + + + + + + + + + + 查看 + 编辑 + Tips维护 + 删除 + + + + + + + + + 基本信息 + + + + + + + + + + 剧本图片 + + + + + + + + + + + + + + + + + + + + + + + + 剧本简介 + + + + + + + 开本流程 + + + + + + + + + + + + + + + + + + + + + + + + + + 删除 + + + + + + + + + + + + + + + + + + + + 新增 + + 剧本资源 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 删除 + + + + + + + + + + {{ scope.row.processNames }} + + + + + 新增 + + + + + 本地上传 + 网易云地址 + + + + + + + + + + {{ item.processNames }} + + + 关联流程 + 删除音频 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 删除 + + + + + + + + + 11111111 + + + + + + + {{ scope.row.processNames }} + + + + + 新增 + + + + + + + + + + {{ item.processNames }} + + + 关联流程 + 删除视频 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 删除 + + + + + + + + + + {{ scope.row.processNames }} + + + + + 新增 + + + + + + 取 消 + 确 定 + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + + +
+ +