iedc-go/example/tpt/wx/js/chunk-322f48b7.80b37f0d.js
2022-03-12 23:52:42 +08:00

2 lines
8.3 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-322f48b7"],{"18e9":function(t,e,n){"use strict";n.r(e);var i=n("f2bf"),c=function(t){return Object(i["C"])("data-v-0f72c6c6"),t=t(),Object(i["A"])(),t},a={class:"Matters"},u={class:"matterCon"},o={class:"navslist"},l=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)})),_=Object(i["j"])("确认填报");function N(t,e,n,c,N,C){var z=Object(i["G"])("van-nav-bar"),U=Object(i["G"])("van-checkbox"),x=Object(i["G"])("van-uploader"),I=Object(i["G"])("van-cell-group"),P=Object(i["G"])("van-button"),R=Object(i["G"])("van-sticky"),L=Object(i["G"])("van-image"),G=Object(i["G"])("van-icon"),K=Object(i["G"])("van-overlay");return Object(i["z"])(),Object(i["h"])("div",a,[Object(i["k"])(z,{title:"调研填报","left-arrow":"",onClickLeft:C.onClickLeft},null,8,["onClickLeft"]),Object(i["i"])("div",u,[Object(i["i"])("div",o,[Object(i["i"])("div",{class:"navli",style:{color:"#fff"},onClick:e[0]||(e[0]=function(){return C.onClickLeft&&C.onClickLeft.apply(C,arguments)})},"基础填报"),l,s]),Object(i["i"])("div",r,[b,(Object(i["z"])(!0),Object(i["h"])(i["a"],null,Object(i["F"])(N.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"])(C.getNum(t))+"."+Object(i["K"])(t.fileRemarks),1)):Object(i["g"])("",!0)],64)})),128))]),Object(i["k"])(I,{ontset:""},{default:Object(i["P"])((function(){return[(Object(i["z"])(!0),Object(i["h"])(i["a"],null,Object(i["F"])(N.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",style:{"margin-bottom":"10px"}},{default:Object(i["P"])((function(){return[O]})),_:2},1032,["modelValue","onUpdate:modelValue"])]),null==t.fileNot||0==t.fileNot?(Object(i["z"])(),Object(i["f"])(x,{key:0,modelValue:t.files,"onUpdate:modelValue":function(e){return t.files=e},"after-read":C.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"])(R,{"offset-bottom":0,position:"bottom","z-index":"1"},{default:Object(i["P"])((function(){return[Object(i["i"])("div",h,[Object(i["k"])(P,{type:"primary",onClick:C.clickNext,block:"",round:"",size:"large",color:"#2f58e4"},{default:Object(i["P"])((function(){return[m]})),_:1},8,["onClick"])])]})),_:1})]),Object(i["k"])(K,{show:N.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"])(N.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"])(L,{key:t,width:"100",onClick:function(e){return C.previewImg(t.url)},height:"100",src:C.setImg(t.url),style:{"margin-left":"15px"}},null,8,["onClick","src"])})),128))])):Object(i["g"])("",!0)],64)})),128)),y,Object(i["k"])(P,{type:"primary",onClick:C.clickSumbit,size:"large",style:{position:"absolute","margin-left":"-5.2vw",width:"90vw"}},{default:Object(i["P"])((function(){return[_]})),_:1},8,["onClick"])])]),Object(i["k"])(G,{name:"cross",onClick:e[2]||(e[2]=function(t){return N.showPreview=!1}),style:{right:"6vw",top:"11vh",position:"absolute"}})]})),_:1},8,["show"])])}n("e17f");var C=n("2241"),z=(n("4662"),n("28a2")),U=(n("e9c4"),n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861"),n("c1fb")),x=n("c1df"),I=n.n(x),P={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:{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(C["a"])({message:"你还没有上传“"+e.fileRemarks+"”项文件内容"});if(e.files.length<e.fileNum)return void Object(C["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 I()(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,a=window.URL||window.webkitURL,u=a.createObjectURL(t),o=new Image;o.src=u,o.onload=function(){var t=this,a=t.width,u=t.height,o=a/u;a=e||a,u=a/o;var l=document.createElement("canvas"),s=l.getContext("2d");l.setAttribute("width",a),l.setAttribute("height",u),s.drawImage(t,0,0,a,u),c=l.toDataURL("image/jpeg",n||.8),i(c)}}}},R=(n("caaa"),n("d959")),L=n.n(R);const G=L()(P,[["render",N],["__scopeId","data-v-0f72c6c6"]]);e["default"]=G},"3f40":function(t,e,n){},caaa:function(t,e,n){"use strict";n("3f40")}}]);
//# sourceMappingURL=chunk-322f48b7.80b37f0d.js.map