iedc-go/example/tpt/wx/js/chunk-58eed18d.9c4c3636.js
2022-03-12 23:52:42 +08:00

2 lines
8.6 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-58eed18d"],{"18e9":function(t,e,n){"use strict";n.r(e);var i=n("f2bf"),c=function(t){return Object(i["C"])("data-v-625882c6"),t=t(),Object(i["A"])(),t},o={class:"Matters"},l={class:"matterCon"},u={class:"navslist"},a=c((function(){return Object(i["i"])("div",{class:"navli",style:{color:"#fff"}},"文件上传",-1)})),s=c((function(){return Object(i["i"])("div",{class:"navli"},"填报完成",-1)})),r={class:"mmhead"},b=c((function(){return Object(i["i"])("div",{class:"nng"},"根据你填报的内容需要准备以下证明文件进行上传",-1)})),f={key:0},d={key:0,class:"upgroup"},j={class:"upname"},O=Object(i["j"])("没有相关文件"),h={class:"nextbtn"},m=Object(i["j"])("预览"),p={class:"block",style:{margin:"20px","margin-top":"40px"}},v=c((function(){return Object(i["i"])("h1",{style:{"font-size":"2em","text-align":"center","margin-bottom":"10px"}},"填报预览",-1)})),g={style:{"margin-bottom":"2px"}},k={key:0,style:{display:"contents"}},q={style:{"margin-left":"10px"}},w={key:0},y=c((function(){return Object(i["i"])("p",{style:{height:"60px"}},null,-1)})),_=c((function(){return Object(i["i"])("p",{"data-v-0f72c6c6":"",style:{height:"30px",color:"red"}}," 提交后数据将无法修改,请再次确认! ",-1)})),N=Object(i["j"])("确认填报");function C(t,e,n,c,C,z){var x=Object(i["G"])("van-nav-bar"),U=Object(i["G"])("van-checkbox"),I=Object(i["G"])("van-uploader"),P=Object(i["G"])("van-cell-group"),R=Object(i["G"])("van-button"),L=Object(i["G"])("van-sticky"),G=Object(i["G"])("van-image"),K=Object(i["G"])("van-icon"),V=Object(i["G"])("van-overlay");return Object(i["z"])(),Object(i["h"])("div",o,[Object(i["k"])(x,{title:"调研填报","left-arrow":"",onClickLeft:z.onClickLeft},null,8,["onClickLeft"]),Object(i["i"])("div",l,[Object(i["i"])("div",u,[Object(i["i"])("div",{class:"navli",style:{color:"#fff"},onClick:e[0]||(e[0]=function(){return z.onClickLeft&&z.onClickLeft.apply(z,arguments)})},"基础填报"),a,s]),Object(i["i"])("div",r,[b,(Object(i["z"])(!0),Object(i["h"])(i["a"],null,Object(i["F"])(C.questionUpload.question_data,(function(t,e){return Object(i["z"])(),Object(i["h"])(i["a"],{key:e},[null!=t.fileNum&&t.fileNum>0&&"否"!=t.value?(Object(i["z"])(),Object(i["h"])("p",f,Object(i["K"])(z.getNum(t))+"."+Object(i["K"])(t.fileRemarks),1)):Object(i["g"])("",!0)],64)})),128))]),Object(i["k"])(P,{ontset:""},{default:Object(i["P"])((function(){return[(Object(i["z"])(!0),Object(i["h"])(i["a"],null,Object(i["F"])(C.questionUpload.question_data,(function(t,e){return Object(i["z"])(),Object(i["h"])(i["a"],{key:e},[null!=t.fileNum&&t.fileNum>0&&"否"!=t.value?(Object(i["z"])(),Object(i["h"])("div",d,[Object(i["i"])("div",j,Object(i["K"])(t.fileRemarks)+"(最少"+Object(i["K"])(t.fileNum)+"张)",1),Object(i["i"])("div",null,[Object(i["k"])(U,{modelValue:t.fileNot,"onUpdate:modelValue":function(e){return t.fileNot=e},shape:"square",onClick:function(e){return z.clickFileNot(t)},style:{"margin-bottom":"10px"}},{default:Object(i["P"])((function(){return[O]})),_:2},1032,["modelValue","onUpdate:modelValue","onClick"])]),null==t.fileNot||0==t.fileNot?(Object(i["z"])(),Object(i["f"])(I,{key:0,modelValue:t.files,"onUpdate:modelValue":function(e){return t.files=e},"after-read":z.afterRead,"upload-icon":"plus"},null,8,["modelValue","onUpdate:modelValue","after-read"])):Object(i["g"])("",!0)])):Object(i["g"])("",!0)],64)})),128))]})),_:1}),Object(i["k"])(L,{"offset-bottom":0,position:"bottom","z-index":"1"},{default:Object(i["P"])((function(){return[Object(i["i"])("div",h,[Object(i["k"])(R,{type:"primary",onClick:z.clickNext,block:"",round:"",size:"large",color:"#2f58e4"},{default:Object(i["P"])((function(){return[m]})),_:1},8,["onClick"])])]})),_:1})]),Object(i["k"])(V,{show:C.showPreview,"lock-scroll":!1},{default:Object(i["P"])((function(){return[Object(i["i"])("div",{class:"wrapper",onClick:e[1]||(e[1]=Object(i["R"])((function(){}),["stop"])),style:{background:"white",width:"90vw","max-height":"80vh",margin:"10vh 5vw","overflow-y":"auto",display:"block",position:"absolute","-webkit-overflow-scrolling":"touch"}},[Object(i["i"])("div",p,[v,(Object(i["z"])(!0),Object(i["h"])(i["a"],null,Object(i["F"])(C.question.question_data,(function(t,e){return Object(i["z"])(),Object(i["h"])(i["a"],{key:e},[Object(i["i"])("p",g,[Object(i["j"])(Object(i["K"])(e+1)+"、"+Object(i["K"])(t.label),1),null!=t.unit&&""!=t.unit?(Object(i["z"])(),Object(i["h"])("span",k,"(单位:"+Object(i["K"])(t.unit)+")",1)):Object(i["g"])("",!0)]),Object(i["i"])("p",q,"你填报的内容是:"+Object(i["K"])(t.value),1),0!=t.fileNum&&"否"!=t.value?(Object(i["z"])(),Object(i["h"])("p",w,[(Object(i["z"])(!0),Object(i["h"])(i["a"],null,Object(i["F"])(t.files,(function(t){return Object(i["z"])(),Object(i["f"])(G,{key:t,width:"100",onClick:function(e){return z.previewImg(t.url)},height:"100",src:z.setImg(t.url),style:{"margin-left":"15px"}},null,8,["onClick","src"])})),128))])):Object(i["g"])("",!0)],64)})),128)),y,_,Object(i["k"])(R,{type:"primary",onClick:z.clickSumbit,size:"large",style:{position:"absolute","margin-left":"-5.2vw",width:"90vw"}},{default:Object(i["P"])((function(){return[N]})),_:1},8,["onClick"])])]),Object(i["k"])(K,{name:"cross",onClick:e[2]||(e[2]=function(t){return C.showPreview=!1}),style:{right:"6vw",top:"11vh",position:"absolute"}})]})),_:1},8,["show"])])}n("4662");var z=n("28a2"),x=(n("e17f"),n("2241")),U=(n("e9c4"),n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861"),n("c1fb")),I=n("c1df"),P=n.n(I),R={name:"MattersCon",setup:function(){var t=Object(i["E"])(""),e=Object(i["E"])(!1),n=["装备制造1","装备制造2","装备制造3","装备制造4","装备制造5"],c=Object(i["E"])("1");return{result:t,columns:n,showPicker:e,checked:c}},data:function(){return{showPreview:!1,loading:!1,finished:!1,refreshing:!1,num:0,question:{question_data:[]},questionUpload:{question_data:[]}}},mounted:function(){this.num=0,this.question=Object(U["b"])("question");var t=Object(U["b"])("questionData");if(null==t){t=Object(U["b"])("question");for(var e=0;e<t.question_data.length;e++)if(null!=t.question_data[e].files)for(var n=0;n<t.question_data[e].files.length;n++)t.question_data[e].files[n].url=this.setImg(t.question_data[e].files[n].url)}this.questionUpload=t},watch:{questionData:{handler:function(){Object(U["b"])("questionData",this.questionData)},deep:!0}},methods:{clickFileNot:function(t){1!=t.fileNot||Object(x["a"])({message:"“"+t.label+"”项填报内容将自动设置为否,请确认。"})},previewImg:function(t){Object(z["a"])([this.setImg(t)])},afterRead:function(t){this.cutImageBase64(t.file,1e3,.8,(function(e){Object(U["d"])("app/user/upload",{file:e}).then((function(e){t.realUrl=e.result}))}))},getNum:function(t){return null!=t.fileNum&&t.fileNum>0&&null==t.num&&(console.log(t),this.num++,t.num=this.num),t.num},clickSumbit:function(){var t=this;Object(U["d"])("app/question/update",{id:this.question.id,status:2,question_data:JSON.stringify(this.question.question_data)}).then((function(){t.$router.push({path:"/matterFinish"})}))},clickNext:function(){for(var t=0;t<this.questionUpload.question_data.length;t++){var e=this.questionUpload.question_data[t];if(1==e.fileNot&&(e.value="否"),null!=e.fileNum&&0!=e.fileNum&&"否"!=e.value){if(null==e.files)return void Object(x["a"])({message:"你还没有上传“"+e.fileRemarks+"”项文件内容"});if(e.files.length<e.fileNum)return void Object(x["a"])({message:"“"+e.fileRemarks+"”项文件内容,上传文件数量不够"});null==this.question.question_data[t].files&&(this.question.question_data[t].files=[]);for(var n=0;n<e.files.length;n++)null!=e.files[n].realUrl&&(this.question.question_data[t].files[n]={url:e.files[n].realUrl})}}Object(U["b"])("question",this.question),this.showPreview=!0},getTime:function(t){return P()(1e3*t).format("YYYY-MM-DD HH:mm:ss")},setImg:function(t){return null==t||""==t?"./img/logo.png":U["a"]+t},onClickLeft:function(){var t=this;Object(U["b"])("question",this.question),Object(U["d"])("app/question/update",{id:this.question.id,status:1,question_data:JSON.stringify(this.question.question_data)}).then((function(){t.$router.push({path:"/matterCon"})}))},cutImageBase64:function(t,e,n,i){var c,o=window.URL||window.webkitURL,l=o.createObjectURL(t),u=new Image;u.src=l,u.onload=function(){var t=this,o=t.width,l=t.height,u=o/l;o=e||o,l=o/u;var a=document.createElement("canvas"),s=a.getContext("2d");a.setAttribute("width",o),a.setAttribute("height",l),s.drawImage(t,0,0,o,l),c=a.toDataURL("image/jpeg",n||.8),i(c)}}}},L=(n("b19e"),n("d959")),G=n.n(L);const K=G()(R,[["render",C],["__scopeId","data-v-625882c6"]]);e["default"]=K},"1cf0":function(t,e,n){},b19e:function(t,e,n){"use strict";n("1cf0")}}]);
//# sourceMappingURL=chunk-58eed18d.9c4c3636.js.map