chunk-36ccf8bb.0c0901bf.js 9.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-36ccf8bb"],{6109:function(t,e,n){"use strict";var a=n("f062"),i=n.n(a);i.a},7110:function(t,e,n){},"9cca":function(t,e,n){"use strict";var a,i,s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"box"},[n("div",{staticClass:"canvaspanel"},[n("div",{staticClass:"buttongroup"},[n("div",{staticClass:"left",on:{click:t.reset}},[n("van-icon",{staticStyle:{"margin-right":".03rem"},attrs:{name:"delete-o",size:"18"}}),n("span",{staticClass:"empty"},[t._v("清除")])],1),n("div",{staticClass:"right",on:{click:t.save}},[n("van-icon",{staticStyle:{"margin-right":".03rem"},attrs:{name:"certificate",size:"18"}}),n("span",{staticClass:"empty"},[t._v("确认")])],1)]),n("div",{staticClass:"canvasborder"},[n("canvas",{attrs:{id:"canvas"},on:{touchstart:t.touchStart,touchmove:t.touchMove,touchend:t.touchEnd}})]),n("div",{staticStyle:{margin:"0.1rem auto",width:"1rem"}},[n("van-icon",{attrs:{name:"arrow-up",size:"20"},on:{click:function(e){t.$parent.isSign=!1}}})],1)])])},o=[],c=(n("d3b7"),n("e7e5"),n("d399")),r=function(t){return document.querySelector(t)},d={width:0,height:0,lineWidth:5,strokeStyle:"#000000",lineCap:"round",lineJoin:"round"},l={offsetX:0,offsetY:0},u={name:"esign",components:{},data:function(){return{}},mounted:function(){this.drawingBoardInit()},methods:{handleReset:function(){},confirm:function(){var t=this;this.$refs.esign.generate().then((function(e){var n=t.rotateBase64(e);t.$emit("getSign",n),console.log(e)})).catch((function(t){c["a"].fail("请签名")}))},drawingBoardInit:function(){var t=r(".canvasborder").getBoundingClientRect(),e=t.width,n=t.height,s=t.left,o=t.top;d.width=e,d.height=n,l.offsetX=s,l.offsetY=o,a=r("#canvas"),a.width=d.width,a.height=d.height,i=a.getContext("2d"),i.fillStyle="transparent",i.fillRect(0,0,d.width,d.height)},touchStart:function(t){t.preventDefault();var e=t.changedTouches[0],n=e.clientX,a=e.clientY;i.beginPath(),i.lineWidth=d.lineWidth,i.strokeStyle=d.strokeStyle,i.lineCap=d.lineCap,i.lineJoin=d.lineJoin,i.moveTo(n-l.offsetX,a-l.offsetY)},touchMove:function(t){var e=t.changedTouches[0],n=e.clientX,a=e.clientY;i.lineTo(n-l.offsetX,a-l.offsetY),i.stroke()},touchEnd:function(){i.closePath(),window.removeEventListener("mousemove",this.draw)},reset:function(){i.clearRect(0,0,d.width,d.height)},save:function(){var t=this;return new Promise((function(e,n){t.isCanvasBlank(a)||t.rotateBase64(a.toDataURL("image/png")).then((function(n){var a=n;t.$emit("getSign",a),e(a)}))}))},isCanvasBlank:function(t){var e=document.createElement("canvas");return e.width=d.width,e.height=d.height,t.toDataURL()===e.toDataURL()},rotateBase64:function(t){return new Promise((function(e){var n=new Image;n.src=t;var a=document.createElement("canvas"),i=a.getContext("2d"),s={sx:0,sy:0,ex:0,ey:0};n.onload=function(){var t=n.width,o=n.height,c=o;a.width=2*c,a.height=2*c,s.sx=c,s.sy=c-t,s.ex=c+o,s.ey=c+t,i.translate(c,c),i.rotate(Math.PI/2*3),i.drawImage(n,0,0);for(var r=i.getImageData(s.sx,s.sy,s.ex,s.ey),d=0;d<r.data.length;d+=4)0===r.data[d+3]&&(r.data[d]=255,r.data[d+1]=255,r.data[d+2]=255,r.data[d+3]=255);a.width=o,a.height=t,i.putImageData(r,0,0),e(a.toDataURL("image/png"))}}))}}},g=u,h=(n("6109"),n("2877")),v=Object(h["a"])(g,s,o,!1,null,"4bde2af5",null);e["a"]=v.exports},ec05:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"layout"},[n("div",{staticClass:"topHeader"},[n("van-icon",{staticClass:"vanIcon",attrs:{name:"arrow-left"},on:{click:t.backtrack}}),n("span",[t._v("承包商工时表")])],1),n("div",{class:[t.obj.contractor?"textContent":"textContent1"]},[t.obj.constructionAttebdabceLogDtoList?n("div",{staticClass:"reject"},[n("p",[t._v("未通过原因:"+t._s(t.obj.constructionAttebdabceLogDtoList.arrivalRemarks))]),n("p",[t._v("驳回人:"+t._s(t.obj.constructionAttebdabceLogDtoList.approveUser))]),n("p",[t._v("驳回时间:"+t._s(t.obj.constructionAttebdabceLogDtoList.approveTime))])]):t._e(),n("div",{staticClass:"text"},[n("van-cell-group",[n("van-cell",{attrs:{title:"承包商",value:t.obj.constructionUnit}}),n("van-cell",{attrs:{title:"项目名称",value:t.obj.projectName}}),n("div",{staticClass:"type"},[n("p",[t._v("项目状态")]),n("p",[n("span",[t._v(t._s("5"===t.obj.state?"暂停中":"施工中"))]),n("span",{staticClass:"hit",on:{click:t.hit}},[t._v(t._s("5"===t.obj.state?"点击恢复":"点击暂停"))])])])],1),n("div",{staticClass:"table"},[n("p",[t._v("考勤详情")]),n("ul",[t._m(0),t._l(t.obj.constructionAttebdabceDetailList,(function(e,a){return n("li",{key:a},[n("span",[t._v(t._s(a+1))]),n("span",[t._v(t._s(e.attendanceYear))]),n("span",[t._v(t._s(e.attendanceMonth))]),n("span",{on:{click:function(n){return t.seeCheck(e)}}},[t._v("查看")])])}))],2)]),n("div",{staticClass:"photo"},[n("p",[t._v("承包商代表签字")]),n("div",{staticClass:"sign"},[n("div",{staticClass:"signImg"},[n("img",{directives:[{name:"show",rawName:"v-show",value:t.signImg,expression:"signImg"}],attrs:{src:t.signImg,alt:""}})]),t.obj.contractor?t._e():n("div",{staticClass:"signBtn"},[n("p",{on:{click:t.delImg}},[n("van-icon",{staticStyle:{"margin-right":".03rem"},attrs:{name:"delete-o",size:"18"}}),n("span",{staticClass:"empty"},[t._v("清除")])],1),n("p",{on:{click:t.toSign}},[n("van-icon",{staticStyle:{"margin-right":".03rem"},attrs:{name:"edit",size:"18"}}),n("span",{staticClass:"empty"},[t._v("去签字")])],1)])]),t.obj.contractorTime?n("p",{staticClass:"signDate"},[t._v(" 签字日期:"+t._s(t.obj.contractorTime)+" ")]):t._e()]),t.obj.contractor?n("div",{staticClass:"photo"},[n("p",[t._v("平台负责人/监督签字")]),t.obj.constructionPictureList.length?n("div",{staticClass:"sign"},t._l(t.obj.constructionPictureList,(function(t,e){return n("div",{key:e,staticClass:"signImg",staticStyle:{"margin-top":".1rem"}},[n("img",{directives:[{name:"show",rawName:"v-show",value:t.url,expression:"item.url"}],attrs:{src:t.url,alt:""}})])})),0):n("div",{staticClass:"sign"},[n("div",{staticClass:"signImg"})])]):t._e(),t.obj.contractor?n("div",{staticClass:"photo"},[n("p",[t._v("总监签字区")]),n("div",{staticClass:"sign"},[n("div",{staticClass:"signImg"},[n("img",{directives:[{name:"show",rawName:"v-show",value:t.obj.majordomoSign,expression:"obj.majordomoSign"}],attrs:{src:t.obj.majordomoSign,alt:""}})])])]):t._e()],1),t.isSign?n("Signature",{on:{getSign:t.getSign}}):t._e()],1),t.obj.contractor?t._e():n("van-button",{staticClass:"btn",attrs:{type:"info"},on:{click:t.add}},[t._v("提交")])],1)},i=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",[n("span",[t._v("序号")]),n("span",[t._v("年度")]),n("span",[t._v("月份")]),n("span",[t._v("操作")])])}],s=(n("d3b7"),n("ac1f"),n("466d"),n("1276"),n("5cc6"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("170b"),n("b39a"),n("72f7"),n("5530")),o=n("9cca"),c=n("2f62"),r=n("3324"),d={name:"VueCli4VantChecking",data:function(){return{a:"张志国考勤不准确,请核实",name:"李晓亮",time:"2023-03-20 14:01:24",type:!0,signImg:"",signImg1:"",isSign:!1,obj:{},isCheck:!1}},computed:Object(s["a"])({},Object(c["b"])("login",["user"])),components:{Signature:o["a"]},mounted:function(){console.log(this.$router,"参数"),this.getConstructionAttebdabce()},methods:{getConstructionAttebdabce:function(){var t=this;Object(r["g"])({constructionStartId:this.user.id}).then((function(e){var n=e.data;200===n.code&&(console.log(n),t.signImg=n.data.contractor,t.obj=n.data)}))},add:function(){var t=this;if(this.signImg)if("5"===this.obj.state)this.$notify({type:"warning",message:"项目暂停中不允许提交!",duration:1e3});else{var e=new window.File([this.dataURLtoBlob(this.signImg)],"签字.jpg",{type:"jpg"}),n=new FormData;n.append("file",e),n.append("moduleName","construction"),Object(r["N"])(n).then((function(e){var n=e.data;t.signImg1=n.msg,Object(r["K"])({constructionAttebdabceId:t.obj.constructionAttebdabceId,contractor:t.signImg1}).then((function(e){var n=e.data;200===n.code&&(t.$notify({type:"success",message:"提交成功!",duration:1e3}),t.$router.go(-1))})).catch((function(e){t.$notify({type:"danger",message:e.response.data.msg,duration:1e3})}))}))}else this.$notify({type:"warning",message:"请签字!",duration:1e3})},dataURLtoBlob:function(t){var e=t.split(","),n=e[0].match(/:(.*?);/)[1],a=window.atob(e[1]),i=a.length,s=new Uint8Array(i);while(i--)s[i]=a.charCodeAt(i);return new Blob([s],{type:n})},backtrack:function(){this.$router.go(-1)},seeCheck:function(t){this.$router.push({name:"editCheck",query:{item:t,constructionAttebdabceId:this.obj.constructionAttebdabceId,type:this.obj.contractor?1:0}})},closeCheck:function(t){this.isCheck=t},hit:function(){var t=this,e="5"===this.obj.state?2:1;Object(r["J"])({constructionAttebdabceId:this.obj.constructionAttebdabceId,type:e}).then((function(e){var n=e.data;200===n.code&&t.getConstructionAttebdabce()})).catch((function(){t.$notify({type:"danger",message:"操作失败!",duration:1e3})}))},getSign:function(t){this.signImg=t,this.isSign=!1},delImg:function(){this.signImg=""},toSign:function(){this.isSign=!0}}},l=d,u=(n("f482"),n("2877")),g=Object(u["a"])(l,a,i,!1,null,"1714118b",null);e["default"]=g.exports},f062:function(t,e,n){},f482:function(t,e,n){"use strict";var a=n("7110"),i=n.n(a);i.a}}]);