hotime/example/tpt/wx/js/chunk-5389ba05.9a35d00e.js
2022-03-03 21:23:57 +08:00

2 lines
8.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5389ba05"],{"18e9":function(t,e,n){"use strict";n.r(e);var i=n("f2bf"),u=function(t){return Object(i["C"])("data-v-142d7d03"),t=t(),Object(i["A"])(),t},a={class:"Matters"},c={class:"matterCon"},o={class:"navslist"},l=u((function(){return Object(i["i"])("div",{class:"navli",style:{color:"#fff"}},"文件上传",-1)})),s=u((function(){return Object(i["i"])("div",{class:"navli"},"填报完成",-1)})),r={class:"mmhead"},b=u((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=u((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=Object(i["j"])("确认填报");function _(t,e,n,u,_,N){var C=Object(i["G"])("van-nav-bar"),z=Object(i["G"])("van-checkbox"),U=Object(i["G"])("van-uploader"),x=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"),I=Object(i["G"])("van-overlay");return Object(i["z"])(),Object(i["h"])("div",a,[Object(i["k"])(C,{title:"调研填报","left-arrow":"",onClickLeft:N.onClickLeft},null,8,["onClickLeft"]),Object(i["i"])("div",c,[Object(i["i"])("div",o,[Object(i["i"])("div",{class:"navli",style:{color:"#fff"},onClick:e[0]||(e[0]=function(){return N.onClickLeft&&N.onClickLeft.apply(N,arguments)})},"基础填报"),l,s]),Object(i["i"])("div",r,[b,(Object(i["z"])(!0),Object(i["h"])(i["a"],null,Object(i["F"])(_.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"])(N.getNum(t))+"."+Object(i["K"])(t.fileRemarks),1)):Object(i["g"])("",!0)],64)})),128))]),Object(i["k"])(x,{ontset:""},{default:Object(i["P"])((function(){return[(Object(i["z"])(!0),Object(i["h"])(i["a"],null,Object(i["F"])(_.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"])(z,{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"])(U,{key:0,modelValue:t.files,"onUpdate:modelValue":function(e){return t.files=e},"after-read":N.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:N.clickNext,block:"",round:"",size:"large",color:"#2f58e4"},{default:Object(i["P"])((function(){return[m]})),_:1},8,["onClick"])])]})),_:1})]),Object(i["k"])(I,{show:_.showPreview},{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",height:"80vh",margin:"10vh 5vw","overflow-y":"auto",display:"block",position:"absolute"}},[Object(i["i"])("div",p,[v,(Object(i["z"])(!0),Object(i["h"])(i["a"],null,Object(i["F"])(_.questionUpload.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 N.previewImg(t.url)},height:"100",src:t.url,style:{"margin-left":"15px"}},null,8,["onClick","src"])})),128))])):Object(i["g"])("",!0)],64)})),128))]),Object(i["k"])(P,{type:"primary",onClick:N.clickSumbit,size:"large",style:{position:"absolute"}},{default:Object(i["P"])((function(){return[y]})),_:1},8,["onClick"])]),Object(i["k"])(G,{name:"cross",onClick:e[2]||(e[2]=function(t){return _.showPreview=!1}),style:{right:"6vw",top:"11vh",position:"absolute"}})]})),_:1},8,["show"])])}n("e17f");var N=n("2241"),C=(n("4662"),n("28a2")),z=(n("e9c4"),n("ac1f"),n("5319"),n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861"),n("c1fb")),U=n("c1df"),x=n.n(U),P={name:"MattersCon",setup:function(){var t=Object(i["E"])(""),e=Object(i["E"])(!1),n=["装备制造1","装备制造2","装备制造3","装备制造4","装备制造5"],u=Object(i["E"])("1");return{result:t,columns:n,showPicker:e,checked:u}},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(z["b"])("question");var t=Object(z["b"])("questionData");null==t&&(t=Object(z["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=z["a"]+t.question_data[e].files[n].url;this.questionUpload=t},watch:{questionData:{handler:function(){Object(z["b"])("questionData",this.questionData)},deep:!0}},methods:{previewImg:function(t){Object(C["a"])([this.setImg(t)])},afterRead:function(t){this.cutImageBase64(t.file,1e3,.8,(function(e){Object(z["d"])("app/user/upload",{file:e}).then((function(e){t.url=z["a"]+e.result,t.file=null,t.content=null,t.message=null,t.status}))}))},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(z["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(N["a"])({message:"你还没有上传“"+e.fileRemarks+"”项文件内容"});if(e.files.length<e.fileNum)return void Object(N["a"])({message:"“"+e.fileRemarks+"”项文件内容,上传文件数量不够"});this.question.question_data[t].files=[];for(var n=0;n<e.files.length;n++)this.question.question_data[t].files.push({url:e.files[n].url.replace(z["a"],"")})}}Object(z["b"])("question",this.question),this.showPreview=!0},getTime:function(t){return x()(1e3*t).format("YYYY-MM-DD HH:mm:ss")},setImg:function(t){return null==t||""==t?"./img/logo.png":z["a"]+"/"+t},onClickLeft:function(){var t=this;Object(z["b"])("question",this.question),Object(z["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 u,a=window.URL||window.webkitURL,c=a.createObjectURL(t),o=new Image;o.src=c,o.onload=function(){var t=this,a=t.width,c=t.height,o=a/c;a=e||a,c=a/o;var l=document.createElement("canvas"),s=l.getContext("2d");l.setAttribute("width",a),l.setAttribute("height",c),s.drawImage(t,0,0,a,c),u=l.toDataURL("image/jpeg",n||.8),i(u)}}}},R=(n("5257"),n("d959")),L=n.n(R);const G=L()(P,[["render",_],["__scopeId","data-v-142d7d03"]]);e["default"]=G},5257:function(t,e,n){"use strict";n("6e1b")},"6e1b":function(t,e,n){}}]);
//# sourceMappingURL=chunk-5389ba05.9a35d00e.js.map