1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-de9d7e78"],{3342:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"think"},[i("div",{staticClass:"topHeader"},[i("van-icon",{staticClass:"vanIcon",attrs:{name:"arrow-left"},on:{click:t.backtrack}}),i("span",[t._v("五想五不干")])],1),i("div",{class:[t.dataList.signature?"textContent":"textContent1"]},[i("div",{staticClass:"sample"},[i("van-cell",{attrs:{title:"项目名称",value:this.user.projectName}})],1),i("div",{staticClass:"pledge"},[i("p",[t._v(' 下面五个方面的内容需要您认真思考,并请在对相应项后画 " √ ",然后郑重的签上您的姓名。 ')]),i("van-collapse",{staticStyle:{margin:".1rem 0"},model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},t._l(t.data,(function(e,a){return i("van-collapse-item",{key:a,attrs:{title:e.title,name:a}},[i("van-checkbox-group",{model:{value:t.data[a].result,callback:function(e){t.$set(t.data[a],"result",e)},expression:"data[index].result"}},[i("van-cell-group",t._l(e.list,(function(e,n){return i("van-cell",{key:e,attrs:{clickable:"",title:e},on:{click:function(e){return t.toggle(a,n)}},scopedSlots:t._u([{key:"right-icon",fn:function(){return[i("van-checkbox",{ref:"checkboxes"+a,refInFor:!0,attrs:{name:e}})]},proxy:!0}],null,!0)})})),1)],1)],1)})),1),i("div",{staticStyle:{width:"100%",height:".1rem"}})],1),i("div",{staticClass:"photo"},[i("Photo",{attrs:{list:t.pictures},on:{getPhoto:t.getPhoto}}),i("div",{staticClass:"sign"},[i("div",{staticClass:"signImg"},[i("img",{directives:[{name:"show",rawName:"v-show",value:t.signImg,expression:"signImg"}],attrs:{src:t.signImg,alt:""}})]),i("div",{staticClass:"signBtn"},[i("p",{on:{click:t.delImg}},[i("van-icon",{staticStyle:{"margin-right":".03rem"},attrs:{name:"delete-o",size:"18"}}),i("span",{staticClass:"empty"},[t._v("清除")])],1),i("p",{on:{click:t.toSign}},[i("van-icon",{staticStyle:{"margin-right":".03rem"},attrs:{name:"edit",size:"18"}}),i("span",{staticClass:"empty"},[t._v("去签字")])],1)])])],1),i("van-button",{staticClass:"btn",attrs:{type:"info"},on:{click:t.add}},[t._v("提交")])],1),t.isSign?i("Signature",{on:{getSign:t.getSign}}):t._e()],1)},n=[],s=(i("4160"),i("d3b7"),i("ac1f"),i("3ca3"),i("466d"),i("1276"),i("5cc6"),i("9a8c"),i("a975"),i("735e"),i("c1ac"),i("d139"),i("3a7b"),i("d5d6"),i("82f8"),i("e91f"),i("60bd"),i("5f96"),i("3280"),i("3fcc"),i("ca91"),i("25a1"),i("cd26"),i("3c5d"),i("2954"),i("649e"),i("219c"),i("170b"),i("b39a"),i("72f7"),i("159b"),i("ddb0"),i("5530")),o=i("2f62"),c=i("c437e"),r=i("3324"),l=i("9cca"),u={name:"VueCli4VantIndex",data:function(){return{fileList:[],pictures:[],full:!0,signImg:"",signImgs:"",activeNames:[],isSign:!1,showPic:!1,dataList:[],pictureLists:[],images:[],data:[{result:[],title:"1.本次作业的安全风险是什么?",list:["坠落","摔倒","挤压","物体打击","机械伤害","灼伤烧伤","冻伤","淹溺","中毒","窒息","触电","噪音","腐蚀","放射","污染","泄露","高压","火灾","爆炸","其他","是否已经清楚?"]},{result:[],title:"2.本次作业的安全措施是什么?",list:["机械控制","隔离","减少沙尘暴人数时间或次数","个人防护","操作程序","应急准备","安全控制系统","方案","监督管理","其他","是否已经完善?"]},{result:[],title:"3.本次作业的安全工具是什么?",list:["个人防护用品(头,脸,眼,耳,手,躯干,腿,足,呼吸系统等)","消防器材","探测监测设备","通讯设备","其他","是否已经配备?"]},{result:[],title:"4.本次作业的安全环境怎么样?",list:["照明","高温低温","通风","噪音","障碍物","化学品,放射品","易燃易爆物质","限制空间","时间","气候","相关人员","其他","是否已经和适?"]},{result:[],title:"5.本次作业的安全技能是什么?",list:["经历","专业知识","培训","工作态度","沟通","是否已经具备?"]}]}},components:{Photo:c["a"],Signature:l["a"]},mounted:function(){this.getPreConstructionInspection()},computed:Object(s["a"])({},Object(o["b"])("login",["user"])),methods:{seePicture:function(t){this.images=[],this.images.push(t),this.showPic=!0},getPreConstructionInspection:function(){var t=this;Object(r["m"])({projectNo:this.user.projectNo,type:"1"}).then((function(e){var i=e.data;if(200===i.code){if(!i.data)return void(t.dataList.signature="");t.dataList=i.data,console.log(i.data,"222222"),t.data=i.data.preConstructionInspectionDetailDtoList,t.signImg=i.data.signature;var a=[];t.pictures=[],i.data.preConstructionAttachmentDtoList&&(i.data.preConstructionAttachmentDtoList.forEach((function(t,e){a.push(Object(r["l"])(t.attachment))})),Promise.all(a).then((function(e){console.log(e),e.forEach((function(e){t.pictures.push(e.data.data)}))})))}}))},getSign:function(t){this.signImg=t,this.isSign=!1},getPhoto:function(t){this.fileList=t.fileList},delImg:function(){this.signImg=""},toSign:function(){this.isSign=!0},backtrack:function(){this.$router.go(-1)},dataURLtoBlob:function(t){var e=t.split(","),i=e[0].match(/:(.*?);/)[1],a=window.atob(e[1]),n=a.length,s=new Uint8Array(n);while(n--)s[n]=a.charCodeAt(n);return new Blob([s],{type:i})},add:function(){var t=this;if(this.signImg){console.log(this.data,"11111");var e=[],i=new window.File([this.dataURLtoBlob(this.signImg)],"签字.jpg",{type:"jpg"}),a=new FormData;a.append("file",i),a.append("moduleName","construction"),this.fileList.forEach((function(i,a){var n=new window.File([t.dataURLtoBlob(i.content)],"附件".concat(a,".jpg"),{type:"jpg"});console.log(n);var s=new FormData;s.append("file",n),s.append("moduleName","construction"),e.push(Object(r["N"])(s))})),Object(r["N"])(a).then((function(i){var a=i.data;t.signImgs=a.msg,Promise.all(e).then((function(e){console.log(e),e.forEach((function(e,i){t.pictureLists.push({attachment:e.data.msg})})),Object(r["F"])({constructionStartId:t.dataList.constructionStartId||"",id:t.dataList.id||"",preConstructionInspectionDetailDtoList:t.data,projectNo:t.user.projectNo,signature:t.signImgs,preConstructionAttachmentDtoList:t.pictureLists}).then((function(e){var i=e.data;i.code&&(t.$notify({type:"success",message:"提交成功!",duration:1e3}),t.$router.go(-1))}))}))}))}else this.$notify({type:"warning",message:"请先签字!",duration:1e3})},toggle:function(t,e){this.$refs["checkboxes"+t][e].toggle(),console.log(this.data)}}},d=u,g=(i("91d1"),i("2877")),p=Object(g["a"])(d,a,n,!1,null,"51e81dfd",null);e["default"]=p.exports},8710:function(t,e,i){},"91d1":function(t,e,i){"use strict";var a=i("8710"),n=i.n(a);n.a}}]);
|