(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-331b"],{"+N42":function(e,t,n){"use strict";var o=n("G6b2");n.n(o).a},"+r4D":function(e,t,n){"use strict";var o=0,l=!1,s={props:{clearCom:{type:Boolean,default:!1},model:{type:String,default:"add"}},watch:{clearCom:function(e,t){this.clearAll()}},data:function(){return{textId:""}},activated:function(){},components:{},computed:{},mounted:function(){},methods:{initData:function(e){var t=document.querySelector(".componentIDCard").cloneNode(!0);document.querySelector("#can"+e.doc_page).appendChild(t),t.style.left=e.pos_x*this.$parent.scale+"px",t.style.top=e.pos_y*this.$parent.scale+"px",t.style.width=e.width*this.$parent.scale+"px",t.style.height=e.height*this.$parent.scale+"px",t.style.display="flex",t.classList.add("text_mark4"),"add"==this.model&&(t.onmouseenter=this.TextMouseenter,t.onmouseleave=this.TextMouseleave,t.onclick=this.textClick,t.onmousedown=this.moveTo),t.setAttribute("page",e.doc_page),t.setAttribute("textId",e.id),1==e.is_require?t.childNodes[0].childNodes[0].style.display="inline-block":t.childNodes[0].childNodes[0].style.display="none",t.childNodes[0].childNodes[1].innerText=e.form_name,t.childNodes[2].onblur=this.TextBlur,"add"==this.model?(t.childNodes[1].innerText=e.form_value,t.childNodes[3].onclick=this.TextDeleteIt):(t.childNodes[2].value=e.form_value,t.childNodes[2].onfocus=this.TextFocus)},TextFocus:function(e){e.currentTarget.parentNode.childNodes[0].style.display="flex"},TextBlur:function(e){e.currentTarget.value=e.currentTarget.value.replace(/\s+/g,""),"inline-block"==e.currentTarget.parentNode.childNodes[0].childNodes[0].style.display&&""==e.currentTarget.value?(e.currentTarget.parentNode.classList.add("needFill"),e.currentTarget.parentNode.childNodes[3].style.display="flex"):(e.currentTarget.parentNode.classList.remove("needFill"),e.currentTarget.parentNode.childNodes[3].style.display="none")},signText:function(e){var t=this,n=e.currentTarget.cloneNode(!0),o=0;document.querySelector("#app").clientWidth>1026&&(o=document.querySelector(".el-scrollbar__view").clientWidth),document.onmousemove=function(e){document.querySelector("#pageContent").appendChild(n),n.style.left=t.$parent.getPos(e).x-parseInt(n.clientWidth/2)-o+"px",n.style.top=t.$parent.getPos(e).y-95+"px",n.className="componentIDCard text_mark4"},document.onmouseup=function(e){var l=t.$parent.getPos(e).x+t.$parent.$refs.pdfBox.scrollLeft-parseInt(n.clientWidth/2)-document.querySelector(".pdf-box").offsetLeft-o,s=t.$parent.getPos(e).y+t.$parent.scrollTop-parseInt(n.clientHeight/2)-130;l<0?l=0:l>document.querySelector(".pdf-box").clientWidth-n.clientWidth*t.$parent.scale&&(l=document.querySelector(".pdf-box").clientWidth-n.clientWidth*t.$parent.scale),s<0?s=0:s>document.querySelector(".pdf-box").clientHeight-28*t.$parent.scale&&(s=document.querySelector(".pdf-box").clientHeight-28*t.$parent.scale);var i=0;s>t.$parent.pdfHeight*t.$parent.page_num?(s-=t.$parent.pdfHeight*t.$parent.page_num,i=t.$parent.page_num+1):(s-=t.$parent.pdfHeight*(t.$parent.page_num-1),i=t.$parent.page_num),s-=10*(i-1),n.style.left=l+"px",n.style.top=s+"px",n.style.height=28*t.$parent.scale+"px",n.style.width=n.clientWidth*t.$parent.scale+"px",document.querySelector("#pageContent").removeChild(n),document.querySelector("#can"+i).appendChild(n),document.onmousemove=null,document.onmouseup=null,n.childNodes[1].innerText="身份证号",n.onclick=t.textClick,n.onmousedown=t.moveTo,n.onmouseenter=t.TextMouseenter,n.onmouseleave=t.TextMouseleave,n.childNodes[3].onclick=t.TextDeleteIt,n.setAttribute("page",i)}},TextWidthChange:function(e){var t=this,n=e.currentTarget.parentNode,o=e.clientX,l=n.offsetWidth;return document.onmousemove=function(e){n.style.width=l+(e.clientX-o)+"px",n.offsetWidth<=70&&(n.style.width="70px"),n.offsetWidth+n.offsetLeft>=t.$parent.pdfWidth&&(n.style.width=t.$parent.pdfWidth-n.offsetLeft+"px")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null},e.stopPropagation(),e.preventDefault(),!1},TextDeleteIt:function(e){return this.hidden(),this.deleteText(e.currentTarget.parentNode),e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode),e.stopPropagation(),e.preventDefault(),!1},deleteText:function(e){var t=this;this.textId=e.getAttribute("textId"),this.textId&&setTimeout(function(){var e=1==t.$route.query.fromCreate?"plugin.yun-sign.frontend.contract.delete-form":"plugin.yun-sign.frontend.template.delete-template-form";$http.post(e,{id:t.textId}).then(function(e){1===e.result||t.$message.error(e.msg)}).catch(function(e){console.log(e)})},500)},textClick:function(e){return this.clearAll(),e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[3].style.display="block",e.currentTarget.classList.add("choose4"),e.currentTarget.onmouseleave=null,this.$parent.$refs.uIDCardSet&&this.$parent.$refs.uIDCardSet.initData(),l&&(l=!1),e.stopPropagation(),e.preventDefault(),!1},TextMouseenter:function(e){e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[3].style.display="block"},TextMouseleave:function(e){e.currentTarget.childNodes[0].style.display="none",e.currentTarget.childNodes[3].style.display="none"},moveTo:function(e){var t=this;o=(new Date).getTime();var n=e.currentTarget,s=e.clientX-n.offsetLeft,i=e.clientY-n.offsetTop;this.textClick(e),document.onmousemove=function(e){var o=e.clientX-s,l=e.clientY-i;o<=0?o=0:o>=document.querySelector(".pdf-box").clientWidth-n.clientWidth&&(o=document.querySelector(".pdf-box").clientWidth-n.clientWidth),l<=0?l=0:l>=t.pdfHeight-n.clientHeight&&(l=t.pdfHeight-n.clientHeight),n.style.left=o+"px",n.style.top=l+"px"},document.onmouseup=function(e){(new Date).getTime()-o<400&&(l=!0),document.onmousemove=null,document.onmouseup=null}},clearAll:function(){for(var e=0;e1026&&(o=document.querySelector(".el-scrollbar__view").clientWidth),document.onmousemove=function(e){document.querySelector("#pageContent").appendChild(n),n.style.left=t.$parent.getPos(e).x-parseInt(n.clientWidth/2)-o+"px",n.style.top=t.$parent.getPos(e).y-95+"px",n.className="componentTimeData text_mark6"},document.onmouseup=function(e){var l=t.$parent.getPos(e).x+t.$parent.$refs.pdfBox.scrollLeft-parseInt(n.clientWidth/2)-document.querySelector(".pdf-box").offsetLeft-o,s=t.$parent.getPos(e).y+t.$parent.scrollTop-parseInt(n.clientHeight/2)-130;l<0?l=0:l>document.querySelector(".pdf-box").clientWidth-n.clientWidth*t.$parent.scale&&(l=document.querySelector(".pdf-box").clientWidth-n.clientWidth*t.$parent.scale),s<0?s=0:s>document.querySelector(".pdf-box").clientHeight-28*t.$parent.scale&&(s=document.querySelector(".pdf-box").clientHeight-28*t.$parent.scale);var i=0;s>t.$parent.pdfHeight*t.$parent.page_num?(s-=t.$parent.pdfHeight*t.$parent.page_num,i=t.$parent.page_num+1):(s-=t.$parent.pdfHeight*(t.$parent.page_num-1),i=t.$parent.page_num),s-=10*(i-1),n.style.left=l+"px",n.style.top=s+"px",n.style.height=28*t.$parent.scale+"px",n.style.width=n.clientWidth*t.$parent.scale+"px",document.querySelector("#pageContent").removeChild(n),document.querySelector("#can"+i).appendChild(n),document.onmousemove=null,document.onmouseup=null,n.childNodes[1].innerText="日期:yyyy-mm-dd",n.onclick=t.textClick,n.onmousedown=t.moveTo,n.onmouseenter=t.TextMouseenter,n.onmouseleave=t.TextMouseleave,n.childNodes[3].onclick=t.TextDeleteIt,n.setAttribute("page",i),n.setAttribute("date_type",0)}},TextWidthChange:function(e){var t=this,n=e.currentTarget.parentNode,o=e.clientX,l=n.offsetWidth;return document.onmousemove=function(e){n.style.width=l+(e.clientX-o)+"px",n.offsetWidth<=70&&(n.style.width="70px"),n.offsetWidth+n.offsetLeft>=t.$parent.pdfWidth&&(n.style.width=t.$parent.pdfWidth-n.offsetLeft+"px")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null},e.stopPropagation(),e.preventDefault(),!1},TextDeleteIt:function(e){return this.hidden(),this.deleteText(e.currentTarget.parentNode),e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode),e.stopPropagation(),e.preventDefault(),!1},deleteText:function(e){var t=this;this.textId=e.getAttribute("textId"),this.textId&&setTimeout(function(){var e=1==t.$route.query.fromCreate?"plugin.yun-sign.frontend.contract.delete-form":"plugin.yun-sign.frontend.template.delete-template-form";$http.post(e,{id:t.textId}).then(function(e){1===e.result||t.$message.error(e.msg)}).catch(function(e){console.log(e)})},500)},textClick:function(e){return this.clearAll(),e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[3].style.display="block",e.currentTarget.classList.add("choose6"),e.currentTarget.onmouseleave=null,this.$parent.$refs.utimeDataSet&&this.$parent.$refs.utimeDataSet.initData(),l&&(l=!1),e.stopPropagation(),e.preventDefault(),!1},TextMouseenter:function(e){e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[3].style.display="block"},TextMouseleave:function(e){e.currentTarget.childNodes[0].style.display="none",e.currentTarget.childNodes[3].style.display="none"},moveTo:function(e){var t=this;o=(new Date).getTime();var n=e.currentTarget,s=e.clientX-n.offsetLeft,i=e.clientY-n.offsetTop;this.textClick(e),document.onmousemove=function(e){var o=e.clientX-s,l=e.clientY-i;o<=0?o=0:o>=document.querySelector(".pdf-box").clientWidth-n.clientWidth&&(o=document.querySelector(".pdf-box").clientWidth-n.clientWidth),l<=0?l=0:l>=t.pdfHeight-n.clientHeight&&(l=t.pdfHeight-n.clientHeight),n.style.left=o+"px",n.style.top=l+"px"},document.onmouseup=function(e){(new Date).getTime()-o<400&&(l=!0),document.onmousemove=null,document.onmouseup=null}},clearAll:function(){for(var e=0;e1026&&(o=document.querySelector(".el-scrollbar__view").clientWidth),document.onmousemove=function(e){document.querySelector("#pageContent").appendChild(n),n.style.left=t.$parent.getPos(e).x-parseInt(n.clientWidth/2)-o+"px",n.style.top=t.$parent.getPos(e).y-95+"px",n.className="componentArea text_mark"},document.onmouseup=function(e){var l=t.$parent.getPos(e).x+t.$parent.$refs.pdfBox.scrollLeft-parseInt(n.clientWidth/2)-document.querySelector(".pdf-box").offsetLeft-o,s=t.$parent.getPos(e).y+t.$parent.scrollTop-parseInt(n.clientHeight/2)-130;l<0?l=0:l>document.querySelector(".pdf-box").clientWidth-n.clientWidth*t.$parent.scale&&(l=document.querySelector(".pdf-box").clientWidth-n.clientWidth*t.$parent.scale),s<0?s=0:s>document.querySelector(".pdf-box").clientHeight-28*t.$parent.scale&&(s=document.querySelector(".pdf-box").clientHeight-28*t.$parent.scale);var i=0;s>t.$parent.pdfHeight*t.$parent.page_num?(s-=t.$parent.pdfHeight*t.$parent.page_num,i=t.$parent.page_num+1):(s-=t.$parent.pdfHeight*(t.$parent.page_num-1),i=t.$parent.page_num),s-=10*(i-1),n.style.left=l+"px",n.style.top=s+"px",n.style.height=28*t.$parent.scale+"px",n.style.width=n.clientWidth*t.$parent.scale+"px",document.querySelector("#pageContent").removeChild(n),document.querySelector("#can"+i).appendChild(n),document.onmousemove=null,document.onmouseup=null,n.childNodes[1].innerText="文本",n.onclick=t.textClick,n.onmousedown=t.moveTo,n.onmouseenter=t.TextMouseenter,n.onmouseleave=t.TextMouseleave,n.childNodes[3].onclick=t.TextDeleteIt,n.childNodes[4].onmousedown=t.TextWidthChange,n.setAttribute("page",i)}},TextWidthChange:function(e){var t=this,n=e.currentTarget.parentNode,o=e.clientX,l=n.offsetWidth;return document.onmousemove=function(e){n.style.width=l+(e.clientX-o)+"px",n.offsetWidth<=70&&(n.style.width="70px"),n.offsetWidth+n.offsetLeft>=t.$parent.pdfWidth&&(n.style.width=t.$parent.pdfWidth-n.offsetLeft+"px")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null},e.stopPropagation(),e.preventDefault(),!1},TextDeleteIt:function(e){return this.hidden(),this.deleteText(e.currentTarget.parentNode),e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode),e.stopPropagation(),e.preventDefault(),!1},deleteText:function(e){var t=this;this.textId=e.getAttribute("textId"),this.textId&&setTimeout(function(){var e=1==t.$route.query.fromCreate?"plugin.yun-sign.frontend.contract.delete-form":"plugin.yun-sign.frontend.template.delete-template-form";$http.post(e,{id:t.textId}).then(function(e){1===e.result||t.$message.error(e.msg)}).catch(function(e){console.log(e)})},500)},textClick:function(e){return this.clearAll(),e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[3].style.display="block",e.currentTarget.childNodes[4].style.display="block",e.currentTarget.classList.add("choose"),e.currentTarget.onmouseleave=null,this.$parent.$refs.dtextSet&&this.$parent.$refs.dtextSet.initData(),s&&(s=!1),e.stopPropagation(),e.preventDefault(),!1},TextMouseenter:function(e){e.currentTarget.childNodes[0].style.display="flex"},TextMouseleave:function(e){e.currentTarget.childNodes[0].style.display="none"},moveTo:function(e){var t=this;l=(new Date).getTime();var n=e.currentTarget,o=e.clientX-n.offsetLeft,i=e.clientY-n.offsetTop;this.textClick(e),document.onmousemove=function(e){var l=e.clientX-o,s=e.clientY-i;l<=0?l=0:l>=document.querySelector(".pdf-box").clientWidth-n.clientWidth&&(l=document.querySelector(".pdf-box").clientWidth-n.clientWidth),s<=0?s=0:s>=t.pdfHeight-n.clientHeight&&(s=t.pdfHeight-n.clientHeight),n.style.left=l+"px",n.style.top=s+"px"},document.onmouseup=function(e){(new Date).getTime()-l<400&&(s=!0),document.onmousemove=null,document.onmouseup=null}},clearAll:function(){for(var e=0;e1026&&(o=document.querySelector(".el-scrollbar__view").clientWidth),document.onmousemove=function(e){document.querySelector("#pageContent").appendChild(n),n.style.display="flex",n.style.left=t.$parent.getPos(e).x-parseInt(n.clientWidth/2)-o+"px",n.style.top=t.$parent.getPos(e).y-100+"px",n.className="componentSign text_mark2"},document.onmouseup=function(e){var l=t.$parent.getPos(e).x+t.$parent.$refs.pdfBox.scrollLeft-parseInt(n.clientWidth/2)-document.querySelector(".pdf-box").offsetLeft-o,s=t.$parent.getPos(e).y+t.$parent.scrollTop-parseInt(n.clientHeight/2)-100;l<0?l=0:l>document.querySelector(".pdf-box").clientWidth-100*t.$parent.scale&&(l=document.querySelector(".pdf-box").clientWidth-100*t.$parent.scale),s<0?s=0:s>document.querySelector(".pdf-box").clientHeight-100*t.$parent.scale&&(s=document.querySelector(".pdf-box").clientHeight-100*t.$parent.scale);var i=0;s>t.$parent.pdfHeight*t.$parent.page_num?(s-=t.$parent.pdfHeight*t.$parent.page_num,i=t.$parent.page_num+1):(s-=t.$parent.pdfHeight*(t.$parent.page_num-1),i=t.$parent.page_num),s-=10*(i-1),n.style.left=l+"px",n.style.top=s+"px",n.style.height=100*t.$parent.scale+"px",n.style.width=100*t.$parent.scale+"px",n.style.position="absolute",document.querySelector("#pageContent").removeChild(n),document.querySelector("#can"+i).appendChild(n),document.onmousemove=null,document.onmouseup=null,n.onclick=t.sealClick,n.onmousedown=t.sealMoveTo,n.onmouseenter=t.sealMouseenter,n.onmouseleave=t.sealMouseleave,n.childNodes[2].onclick=t.sealDeleteIt,n.setAttribute("page",i),n.setAttribute("role_id",1),n.setAttribute("date_type",0)}},sealDeleteIt:function(e){return this.hidden(),this.deleteText(e.currentTarget.parentNode),e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode),e.stopPropagation(),e.preventDefault(),!1},deleteText:function(e){var t=this;this.textId=e.getAttribute("textId"),this.textId&&setTimeout(function(){var e=1==t.$route.query.fromCreate?"plugin.yun-sign.frontend.contract.delete-form":"plugin.yun-sign.frontend.template.delete-template-form";$http.post(e,{id:t.textId}).then(function(e){1===e.result||t.$message.error(e.msg)}).catch(function(e){console.log(e)})},500)},sealClick:function(e){return this.clearAll(),e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[2].style.display="block",e.currentTarget.classList.add("choose2"),e.currentTarget.onmouseleave=null,0!=Number(document.querySelector(".choose2").getAttribute("date_type"))&&(e.currentTarget.childNodes[3].style.display="flex"),this.$parent.$refs.signSet&&this.$parent.$refs.signSet.initData(),l&&(l=!1),e.stopPropagation(),e.preventDefault(),!1},sealMouseenter:function(e){e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[2].style.display="block"},sealMouseleave:function(e){e.currentTarget.childNodes[0].style.display="none",e.currentTarget.childNodes[2].style.display="none",e.currentTarget.childNodes[3].style.display="none"},sealMoveTo:function(e){var t=this;o=(new Date).getTime();var n=e.currentTarget,s=e.clientX-n.offsetLeft,i=e.clientY-n.offsetTop;this.sealClick(e),document.onmousemove=function(e){var o=e.clientX-s,l=e.clientY-i;o<=0?o=0:o>=document.querySelector(".pdf-box").clientWidth-n.clientWidth&&(o=document.querySelector(".pdf-box").clientWidth-n.clientWidth),l<=0?l=0:l>=t.pdfHeight-n.clientHeight&&(l=t.pdfHeight-n.clientHeight),n.style.left=o+"px",n.style.top=l+"px"},document.onmouseup=function(e){(new Date).getTime()-o<400&&(l=!0),document.onmousemove=null,document.onmouseup=null}},clearAll:function(){for(var e=0;e1026&&(o=document.querySelector(".el-scrollbar__view").clientWidth),document.onmousemove=function(e){document.querySelector("#pageContent").appendChild(n),n.style.display="flex",n.style.left=t.$parent.getPos(e).x-parseInt(n.clientWidth/2)-o+"px",n.style.top=t.$parent.getPos(e).y-100+"px",n.className="componentDrag text_mark3"},document.onmouseup=function(e){var o=(t.$parent.getPos(e).x,t.$parent.$refs.pdfBox.scrollLeft,parseInt(n.clientWidth/2),document.querySelector(".pdf-box").offsetLeft),l=t.$parent.getPos(e).y+t.$parent.scrollTop-parseInt(n.clientHeight/2)-100;o=document.querySelector(".pdf-box").clientWidth-50*t.$parent.scale,l<0?l=0:l>document.querySelector(".pdf-box").clientHeight-100*t.$parent.scale&&(l=document.querySelector(".pdf-box").clientHeight-100*t.$parent.scale);var s=0;l>t.$parent.pdfHeight*t.$parent.page_num?(l-=t.$parent.pdfHeight*t.$parent.page_num,s=t.$parent.page_num+1):(l-=t.$parent.pdfHeight*(t.$parent.page_num-1),s=t.$parent.page_num),l-=10*(s-1),n.style.left=o+"px",n.style.top=l+"px",n.style.height=100*t.$parent.scale+"px",n.style.width=50*t.$parent.scale+"px",n.style.position="absolute",document.querySelector("#pageContent").removeChild(n),document.querySelector("#can"+s).appendChild(n),document.onmousemove=null,document.onmouseup=null,n.onclick=t.sealClick,n.onmousedown=t.sealMoveTo,n.onmouseenter=t.sealMouseenter,n.onmouseleave=t.sealMouseleave,n.childNodes[2].onclick=t.sealDeleteIt,n.setAttribute("page",s),n.setAttribute("role_id",1)}},sealDeleteIt:function(e){return this.hidden(),this.deleteText(e.currentTarget.parentNode),e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode),e.stopPropagation(),e.preventDefault(),!1},deleteText:function(e){var t=this;this.textId=e.getAttribute("textId"),this.textId&&setTimeout(function(){var e=1==t.$route.query.fromCreate?"plugin.yun-sign.frontend.contract.delete-form":"plugin.yun-sign.frontend.template.delete-template-form";$http.post(e,{id:t.textId}).then(function(e){1===e.result||t.$message.error(e.msg)}).catch(function(e){console.log(e)})},500)},sealClick:function(e){return this.clearAll(),e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[2].style.display="block",e.currentTarget.classList.add("choose3"),e.currentTarget.onmouseleave=null,this.$parent.$refs.dpagingSealSet&&this.$parent.$refs.dpagingSealSet.initData(),l&&(l=!1),e.stopPropagation(),e.preventDefault(),!1},sealMouseenter:function(e){e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[2].style.display="block"},sealMouseleave:function(e){e.currentTarget.childNodes[0].style.display="none",e.currentTarget.childNodes[2].style.display="none"},sealMoveTo:function(e){var t=this;o=(new Date).getTime();var n=e.currentTarget,s=(e.clientX,n.offsetLeft,e.clientY-n.offsetTop);this.sealClick(e),document.onmousemove=function(e){var o=e.clientX,l=e.clientY-s;o=document.querySelector(".pdf-box").clientWidth-n.clientWidth,l<=0?l=0:l>=t.pdfHeight-n.clientHeight&&(l=t.pdfHeight-n.clientHeight),n.style.left=o+"px",n.style.top=l+"px"},document.onmouseup=function(e){(new Date).getTime()-o<400&&(l=!0),document.onmousemove=null,document.onmouseup=null}},clearAll:function(){for(var e=0;e1026&&(o=document.querySelector(".el-scrollbar__view").clientWidth),document.onmousemove=function(e){document.querySelector("#pageContent").appendChild(n),n.style.left=t.$parent.getPos(e).x-parseInt(n.clientWidth/2)-o+"px",n.style.top=t.$parent.getPos(e).y-95+"px",n.className="componentNumberInp text_mark5"},document.onmouseup=function(e){var l=t.$parent.getPos(e).x+t.$parent.$refs.pdfBox.scrollLeft-parseInt(n.clientWidth/2)-document.querySelector(".pdf-box").offsetLeft-o,s=t.$parent.getPos(e).y+t.$parent.scrollTop-parseInt(n.clientHeight/2)-130;l<0?l=0:l>document.querySelector(".pdf-box").clientWidth-n.clientWidth*t.$parent.scale&&(l=document.querySelector(".pdf-box").clientWidth-n.clientWidth*t.$parent.scale),s<0?s=0:s>document.querySelector(".pdf-box").clientHeight-28*t.$parent.scale&&(s=document.querySelector(".pdf-box").clientHeight-28*t.$parent.scale);var i=0;s>t.$parent.pdfHeight*t.$parent.page_num?(s-=t.$parent.pdfHeight*t.$parent.page_num,i=t.$parent.page_num+1):(s-=t.$parent.pdfHeight*(t.$parent.page_num-1),i=t.$parent.page_num),s-=10*(i-1),n.style.left=l+"px",n.style.top=s+"px",n.style.height=28*t.$parent.scale+"px",n.style.width=n.clientWidth*t.$parent.scale+"px",document.querySelector("#pageContent").removeChild(n),document.querySelector("#can"+i).appendChild(n),document.onmousemove=null,document.onmouseup=null,n.childNodes[1].innerText="数字",n.onclick=t.textClick,n.onmousedown=t.moveTo,n.onmouseenter=t.TextMouseenter,n.onmouseleave=t.TextMouseleave,n.childNodes[3].onclick=t.TextDeleteIt,n.setAttribute("page",i),n.setAttribute("number_type",0)}},TextWidthChange:function(e){var t=this,n=e.currentTarget.parentNode,o=e.clientX,l=n.offsetWidth;return document.onmousemove=function(e){n.style.width=l+(e.clientX-o)+"px",n.offsetWidth<=70&&(n.style.width="70px"),n.offsetWidth+n.offsetLeft>=t.$parent.pdfWidth&&(n.style.width=t.$parent.pdfWidth-n.offsetLeft+"px")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null},e.stopPropagation(),e.preventDefault(),!1},TextDeleteIt:function(e){return this.hidden(),this.deleteText(e.currentTarget.parentNode),e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode),e.stopPropagation(),e.preventDefault(),!1},deleteText:function(e){var t=this;this.textId=e.getAttribute("textId"),this.textId&&setTimeout(function(){var e=1==t.$route.query.fromCreate?"plugin.yun-sign.frontend.contract.delete-form":"plugin.yun-sign.frontend.template.delete-template-form";$http.post(e,{id:t.textId}).then(function(e){1===e.result||t.$message.error(e.msg)}).catch(function(e){console.log(e)})},500)},textClick:function(e){return this.clearAll(),e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[3].style.display="block",e.currentTarget.classList.add("choose5"),e.currentTarget.onmouseleave=null,this.$parent.$refs.unumberInpSet&&this.$parent.$refs.unumberInpSet.initData(),l&&(l=!1),e.stopPropagation(),e.preventDefault(),!1},TextMouseenter:function(e){e.currentTarget.childNodes[0].style.display="flex",e.currentTarget.childNodes[3].style.display="block"},TextMouseleave:function(e){e.currentTarget.childNodes[0].style.display="none",e.currentTarget.childNodes[3].style.display="none"},moveTo:function(e){var t=this;o=(new Date).getTime();var n=e.currentTarget,s=e.clientX-n.offsetLeft,i=e.clientY-n.offsetTop;this.textClick(e),document.onmousemove=function(e){var o=e.clientX-s,l=e.clientY-i;o<=0?o=0:o>=document.querySelector(".pdf-box").clientWidth-n.clientWidth&&(o=document.querySelector(".pdf-box").clientWidth-n.clientWidth),l<=0?l=0:l>=t.pdfHeight-n.clientHeight&&(l=t.pdfHeight-n.clientHeight),n.style.left=o+"px",n.style.top=l+"px"},document.onmouseup=function(e){(new Date).getTime()-o<400&&(l=!0),document.onmousemove=null,document.onmouseup=null}},clearAll:function(){for(var e=0;e