"use strict";(self["webpackChunkscproject"]=self["webpackChunkscproject"]||[]).push([[163],{11057:function(t,e,s){s.d(e,{Z:function(){return p}});var r=function(){var t=this,e=t._self._c;return e("button",{staticClass:"info_btn",attrs:{disabled:t.progress.show},on:{click:function(e){return t.addImg(e)}}},[t._v(" "+t._s(t.navName)+" "),e("input",{staticStyle:{display:"none"},attrs:{type:"file",accept:t.acc,capture:"camera"},on:{change:function(e){return t.beforeUpload(e)}}})])},a=[],o=(s(34267),s(24613)),i={components:{},props:["navName","accept","progress"],data(){return{inputShow:!0,acc:""}},watch:{accept:{immediate:!0,deep:!0,handler(t,e){this.getAccept()}}},methods:{addImg(t){var e=t.currentTarget||t;e.getElementsByTagName("input")[0].click(),t.target.value=""},beforeUpload(t){console.log(t);var e=t.target.files[0],s={accessKeyId:"AKIATLPEDU37QV5CHLMH",secretAccessKey:"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"};window.AWS.config.update(s),window.AWS.config.region="cn-northwest-1";var r=new window.AWS.S3({params:{Bucket:"ccrb"}}),a=this;if(a.progress&&(a.progress.show=!0),a.progress&&(a.progress.value=0),e){var i={Key:e.name.split(".")[0]+(new Date).getTime()+"."+e.name.split(".")[e.name.split(".").length-1],ContentType:e.type,Body:e,"Access-Control-Allow-Credentials":"*",ACL:"public-read"},n={partSize:2147483648,queueSize:2,leavePartsOnError:!0};r.upload(i,n).on("httpUploadProgress",(function(t){a.progress&&(a.progress.value=Math.round(t.loaded/t.total*100))})).send((function(t,s){if(a.inputShow=!0,t)a.$message.error("上传失败");else{let t=e.size,r="B";t>1e9?(t=t/1024/1024/1024,r="G"):t>1e6?(t=t/1024/1024,r="MB"):t>1e3&&(t/=1024,r="KB"),t=Math.floor(t),a.$emit("getFile",{fileName:e.name,size:`${t}${r}`,uploadTime:(0,o.YZ)(),url:s.Location})}}))}},getAccept(){this.accept?this.acc=this.accept:this.acc="*"}},created(){this.getAccept()}},n=i,l=s(43736),c=(0,l.Z)(n,r,a,!1,null,"1b79ea74",null),p=c.exports},31093:function(t,e,s){s.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"pdf"},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isloading,expression:"isloading"}],staticClass:"loading"},[e("span",[t._v("pdf可能会加载时间有点长,请耐心等待...")])]),e("iframe",{ref:"viframe",staticStyle:{width:"100%",height:"99%",border:"none"},attrs:{src:"https://cloud.cocorobo.cn/pdf.js/web/viewer.html?file="+t.pdfUrl}})])},a=[],o={name:"Pdfvuer",components:{},props:{pdfUrl:{type:String,default:"https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/0629%E5%AE%9E%E6%97%B6%E8%AF%BE%E5%A0%82%E6%A8%A1%E6%8B%9F%E6%BC%94%E7%A4%BA%E8%AF%BE%E4%BB%B61656920880446.pdf"},ppage:{type:Number,default:1}},data(){return{page:1,numPages:0,pdfData:void 0,inputPage:1,isloading:!1,scale:"page-width"}},mounted(){this.isloading=!1,this.$refs.viframe.onload=function(){this.isloading=!1},console.log(this.isloading)},beforeDestroy(){},watch:{pdfUrl:function(t){this.isloading=!1,this.$refs.viframe.onload=function(){this.isloading=!1}}},methods:{getPdf(){this.pdfData=pdfvuer.createLoadingTask({url:this.pdfUrl,cMapUrl:"https://cdn.jsdelivr.net/npm/pdfjs-dist@2.16.105/cmaps/",cMapPacked:!0}),this.pdfData.then((t=>{this.isloading=!1,this.numPages=t.numPages})).catch((t=>{console.log(t)}))},prePage(){let t=this.page;t=t>1?t-1:1,this.page=t},nextPage(){let t=this.page;t=t{let e=0;t.data[1].forEach((t=>{t["actualuse"]=JSON.parse(t["actualuse"]);for(let s in t["actualuse"])t["actualuse"][s]&&(e=1*t["actualuse"][s]+e)})),console.log(e);let s=t.data[0];s[0].course_student=JSON.parse(s[0].course_student),s[0].course_teacher=JSON.parse(s[0].course_teacher),s[0].multiSelectProject=JSON.parse(s[0].multiSelectProject),s[0].ClosingstatementData?s[0].ClosingstatementData=JSON.parse(s[0].ClosingstatementData):s[0].ClosingstatementData={brief:"",business:"",competitionAccessory:"",conversionAccessory:"",exchangeAccessory:"",firmAccessory:"",innovate:"",plan:"",realityResult:[],resultAccessory:[],socialValue:[],talentsAccessory:[],targetPlan:[],taskAccessory:[],technology:[]},s[0].money=JSON.parse(s[0].money),this.myArrayProp=s,this.myArrayProp[0].actualuse=e,console.log(this.myArrayProp)})).catch((t=>{console.log(t)}))},getFile(t){console.log(t),this.progress7.show=!1,this.myArrayProp[0]["ClosingstatementData"].resultAccessory.push(t)},deleteFile(t,e){t.splice(e,1)},getfirmAccessory(t){this.progress1.show=!1,this.myArrayProp[0]["ClosingstatementData"].firmAccessory.push(t)},deletefirmAccessory(t){this.myArrayProp[0]["ClosingstatementData"].firmAccessory.splice(t,1)},getcompetitionAccessory(t){this.progress2.show=!1,this.myArrayProp[0]["ClosingstatementData"].competitionAccessory.push(t)},deletecompetitionAccessory(t){this.myArrayProp[0].competitionAccessory.splice(t,1)},getexchangeAccessory(t){this.progress3.show=!1,this.myArrayProp[0]["ClosingstatementData"].exchangeAccessory.push(t)},deleteexchangeAccessory(t){this.myArrayProp[0]["ClosingstatementData"].exchangeAccessory.splice(t,1)},getconversionAccessory(t){this.progress4.show=!1,this.myArrayProp[0]["ClosingstatementData"].conversionAccessory.push(t)},deleteconversionAccessory(t){console.log(t),this.myArrayProp[0]["ClosingstatementData"].conversionAccessory.splice(t,1)},gettalentsAccessory(t){this.progress5.show=!1,this.myArrayProp[0]["ClosingstatementData"].talentsAccessory.push(t)},deletetalentsAccessory(t){this.myArrayProp[0]["ClosingstatementData"].talentsAccessory.splice(t,1)},gettaskAccessory(t){this.progress6.show=!1,this.myArrayProp[0]["ClosingstatementData"].taskAccessory.push(t)},deletetaskAccessory(t){this.myArrayProp[0]["ClosingstatementData"].taskAccessory.splice(t,1)},ProgressFormattaskAccessory(t){return 100==t?"100%":`${t}%`},ProgressFormattalentsAccessory(t){return 100==t?"100%":`${t}%`},ProgressFormatconversionAccessory(t){return 100==t?"100%":`${t}%`},ProgressFormatexchangeAccessory(t){return 100==t?"100%":`${t}%`},ProgressFormatcompetitionAccessory(t){return 100==t?"100%":`${t}%`},ProgressFormatfirmAccessory(t){return 100==t?"100%":`${t}%`},ProgressFormatresultAccessory(t){return 100==t?"100%":`${t}%`},lookFile(t){if(this.videoDetail={},-1==this.vedio.indexOf(t.split(".")[t.split(".").length-1].toLocaleUpperCase())){if(-1==this.word.indexOf(t.split(".")[t.split(".").length-1].toLocaleUpperCase())&&-1==this.pdf.indexOf(t.split(".")[t.split(".").length-1].toLocaleUpperCase())&&-1==this.image.indexOf(t.split(".")[t.split(".").length-1].toLocaleUpperCase()))return void this.downFile(t);if(this.showFileUrl="",this.showFile=!0,this.showFileUrl=t,"undefined"==typeof t)return{type:"",name:""};let e=t.split(".");const s=e[e.length-1];return this.canonical.Image.test(t)?(this.Wordss={type:s,name:"图片"},console.log(this.Wordss)):this.canonical.File.test(t)?(this.Wordss={type:s,name:"文档"},console.log(this.Wordss)):this.Wordss={type:s,name:s}}this.playerOptions.sources[0].src=t,this.videoDetail=this.playerOptions,this.showFile=!0},onPlayerPlay(){},downFile(t){var e={accessKeyId:"AKIATLPEDU37QV5CHLMH",secretAccessKey:"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"};window.AWS.config.update(e),window.AWS.config.region="cn-northwest-1";let s=t,r="";r=-1!=s.indexOf("https://view.officeapps.live.com/op/view.aspx?src=")?s.split("https://view.officeapps.live.com/op/view.aspx?src=")[1]:s;var a=new window.AWS.S3({params:{Bucket:"ccrb"}});let o=decodeURIComponent(r.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]);var i={Bucket:"ccrb",Key:o};a.getObject(i,(function(t,e){if(t)console.log(t,t.stack);else{let t=window.URL.createObjectURL(new Blob([e.Body])),s=document.createElement("a");s.name=o,s.href=t,s.download=o,s.click(),console.log(e)}}))}},mounted(){this.getData()}},p=c,d=s(43736),m=(0,d.Z)(p,r,a,!1,null,"2672b79b",null),u=m.exports}}]); //# sourceMappingURL=163.775a0ad9.js.map