epic-designer-gold 1.0.34 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-3k1IXN1T.js → _plugin-vue_export-helper-8DRKdUfJ.js} +30 -24
- package/dist/{index-DlWUR7vt.cjs → _plugin-vue_export-helper-NUO0U1Az.cjs} +3 -3
- package/dist/{attributeView-cV9JcdL1.cjs → attributeView-BTH9azyB.cjs} +1 -1
- package/dist/{attributeView-tdOSR9MO.js → attributeView-CDem_ES8.js} +1 -1
- package/dist/form-DDcaeFok.js +233 -0
- package/dist/form-sr_OUKVG.cjs +1 -0
- package/dist/{index-9Mn4Y5ul.js → index-7Z6k5ElN.js} +1 -1
- package/dist/{index-DM3RLWza.js → index-B-CXu5E4.js} +1 -1
- package/dist/{index-CQSYlqUB.js → index-B2L9CYN8.js} +1 -1
- package/dist/{index-DmY8tL_f.cjs → index-B9Wg0OhT.cjs} +1 -1
- package/dist/{index-CsW4QbS7.cjs → index-BEh2QNCv.cjs} +1 -1
- package/dist/index-BU-UAvHC.cjs +1 -0
- package/dist/{index-BEyLpsim.js → index-BcqJCHqF.js} +2 -2
- package/dist/{index-Cv3nKoEL.js → index-BtHv1yZo.js} +2 -2
- package/dist/{index-BUITcTmI.cjs → index-C9azM5P0.cjs} +1 -1
- package/dist/{index-BozsQqds.cjs → index-CGSKdgpe.cjs} +1 -1
- package/dist/{index-C4dEBxvF.js → index-CTeq7qi8.js} +1 -1
- package/dist/index-CXkyECv6.cjs +10 -0
- package/dist/{index-DKt-n7Pv.cjs → index-C_yxhoSP.cjs} +1 -1
- package/dist/{index-C8ReU6Xc.js → index-CjRCetGY.js} +252 -254
- package/dist/{index--gqcMvxJ.cjs → index-DCixZvy_.cjs} +1 -1
- package/dist/{index-C4CkFEzv.cjs → index-DV6zVc1G.cjs} +1 -1
- package/dist/{index-tkciUDvZ.js → index-DWNK2WbN.js} +2 -2
- package/dist/{index-C9q_Wa8V.cjs → index-DYItQsu1.cjs} +1 -1
- package/dist/{index-BRDkOUYS.cjs → index-Dgm8C1cw.cjs} +1 -1
- package/dist/{index-p8GEir2h.js → index-DhC_pgAC.js} +1 -1
- package/dist/{index-CRsrNl6B.cjs → index-Dk-o3v2v.cjs} +1 -1
- package/dist/{index-BDF5_G5f.cjs → index-Dz2rmUzG.cjs} +1 -1
- package/dist/{index-BMXnkqXx.js → index-Dz39c928.js} +1 -1
- package/dist/{index-B9pkOv4t.js → index-PJBBvGIL.js} +1 -1
- package/dist/{index-BKdKkCt6.cjs → index-U1_FTPaZ.cjs} +1 -1
- package/dist/{index-C_vstFad.js → index-Zf435cWW.js} +2 -2
- package/dist/{index-Do-zTF8W.js → index-aPG4tpxN.js} +1 -1
- package/dist/index-edBSFxZI.js +4 -0
- package/dist/{index-DFhtJ9Co.cjs → index-i1OdHmT9.cjs} +1 -1
- package/dist/{index-jRFvV869.js → index-q9yvq5KO.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/ocrUpload-BoJVjq3M.cjs +1 -0
- package/dist/{ocrUpload-Cxxs1GtD.js → ocrUpload-DFAe83gW.js} +36 -34
- package/dist/{selectPage-oM1OpHbJ.js → selectPage-Cu2yuxd6.js} +6 -7
- package/dist/selectPage-DZQ1Sbs4.cjs +1 -0
- package/dist/sign-BWCF3Rru.cjs +1 -0
- package/dist/{sign-Cz5OCE1C.js → sign-D5uFYJi9.js} +22 -23
- package/dist/style.css +1 -1
- package/dist/{styleView-CTqq3Ctg.cjs → styleView-BgS1xwp3.cjs} +1 -1
- package/dist/{styleView-BreyVWSd.js → styleView-NkYOpZPH.js} +1 -1
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +4 -4
- package/package.json +1 -1
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/form-CUbklubB.cjs +0 -1
- package/dist/form-DGbjgAvD.js +0 -208
- package/dist/index-CYD9fvY1.js +0 -4
- package/dist/index-DJDwPJHn.cjs +0 -10
- package/dist/index-eAXbC_rr.cjs +0 -1
- package/dist/ocrUpload-CMskfGHX.cjs +0 -1
- package/dist/selectPage-H4G0pWhK.cjs +0 -1
- package/dist/sign-Cusu4oCD.cjs +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { defineComponent as Q, ref as u, watch as _, createBlock as x, openBlock as O, unref as F, withCtx as X, createElementBlock as Y, Fragment as ee, renderList as ae, nextTick as te } from "vue";
|
|
2
|
-
import { a as q } from "./
|
|
2
|
+
import { a as q, _ as le } from "./_plugin-vue_export-helper-8DRKdUfJ.js";
|
|
3
3
|
import { a as b } from "./index-B1s67XDZ.js";
|
|
4
|
-
import { ElSelect as
|
|
5
|
-
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import { ElSelect as oe, ElOption as ne } from "element-plus";
|
|
6
5
|
const re = /* @__PURE__ */ Q({
|
|
7
6
|
__name: "selectPage",
|
|
8
7
|
props: {
|
|
@@ -147,7 +146,7 @@ const re = /* @__PURE__ */ Q({
|
|
|
147
146
|
if (!e || m.value || f.value) return;
|
|
148
147
|
e.scrollTop + e.clientHeight >= e.scrollHeight - 10 && (c.value++, y());
|
|
149
148
|
}
|
|
150
|
-
return (e, t) => (O(), x(F(
|
|
149
|
+
return (e, t) => (O(), x(F(oe), {
|
|
151
150
|
modelValue: v.value,
|
|
152
151
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => v.value = l),
|
|
153
152
|
filterable: "",
|
|
@@ -162,7 +161,7 @@ const re = /* @__PURE__ */ Q({
|
|
|
162
161
|
style: { width: "100%" }
|
|
163
162
|
}, {
|
|
164
163
|
default: X(() => [
|
|
165
|
-
(O(!0), Y(ee, null, ae(r.value, (l) => (O(), x(F(
|
|
164
|
+
(O(!0), Y(ee, null, ae(r.value, (l) => (O(), x(F(ne), {
|
|
166
165
|
key: l.value,
|
|
167
166
|
label: l.label,
|
|
168
167
|
value: l.value
|
|
@@ -171,7 +170,7 @@ const re = /* @__PURE__ */ Q({
|
|
|
171
170
|
_: 1
|
|
172
171
|
}, 8, ["modelValue", "placeholder"]));
|
|
173
172
|
}
|
|
174
|
-
}),
|
|
173
|
+
}), ve = /* @__PURE__ */ le(re, [["__scopeId", "data-v-849e6326"]]);
|
|
175
174
|
export {
|
|
176
|
-
|
|
175
|
+
ve as default
|
|
177
176
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),_=require("./_plugin-vue_export-helper-NUO0U1Az.cjs"),b=require("./index-BoL2PSBk.cjs"),z=require("element-plus"),Z=a.defineComponent({__name:"selectPage",props:{modelValue:[String,Number],placeholder:String,requestFn:{type:Function,default:()=>{}},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},pageSize:{type:Number,default:20},defaultData:{type:Object,default:()=>{}},componentSchema:{type:Object,default:()=>{}},sourceDateUrl:{type:String,default:""}},emits:["update:modelValue","update:modelValueLabel"],setup(O,{emit:A}){const B=`paginated-select-dropdown-${Math.random().toString(36).slice(2,8)}`,t=O,T=A,v=a.ref(t.modelValue);a.watch(()=>t.modelValue,e=>{v.value=e}),a.watch(v,e=>{T("update:modelValue",e);let l=u.value.find(o=>o.value===e);T("update:modelValueLabel",{label:l.label||t.defaultData.label,value:l.value||t.defaultData.value})});const u=a.ref(t.defaultData&&Object.keys(t.defaultData).length?[t.defaultData]:[]),p=a.ref(!1),f=a.ref(0),c=a.ref(1),k=a.ref(""),m=a.ref(!1),d=a.ref(null),h=a.ref(null);function q(){u.value=[],f.value=0,c.value=1,m.value=!1}function N(e=window.location.href){const l={},o=e.split("?")[1];return o&&o.split("&").forEach(r=>{const[i,g]=r.split("=");i&&(l[i]=decodeURIComponent(g||""))}),l}async function y(){var l,o,r,i,g,E,x,C,K,L;if(p.value||m.value)return;const e=N(n.value.url);p.value=!0;try{const s=await _.axios({url:n.value.url.split("?")[0],method:n.value.method,data:n.value.body?JSON.parse(n.value.body):{},params:n.value.params?{...e,...JSON.parse(n.value.params),[`${(o=(l=t==null?void 0:t.componentSchema)==null?void 0:l.componentProps)==null?void 0:o.pageKey}`]:c.value,[`${(i=(r=t==null?void 0:t.componentSchema)==null?void 0:r.componentProps)==null?void 0:i.searchKey}`]:k.value}:{...e},headers:{...JSON.parse(n.value.headers),Authorization:"Bearer "+b.api.get("Admin-Token"),lang:b.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});if(n.value&&n.value.dataPath){const J=((g=n.value)==null?void 0:g.dataPath.split(".")).reduce((P,D)=>P[D],s.data),U=(E=n.value)==null?void 0:E.dataPath.split(".");U.pop();const R=U.reduce((P,D)=>P[D],s.data);let j=S(J,n.value.dataKey,n.value.dataValue);c.value===1?u.value=j:u.value=u.value.concat(j),f.value=R[(C=(x=t==null?void 0:t.componentSchema)==null?void 0:x.componentProps)==null?void 0:C.pageTotalKey]}else{let V=S(s.data,n.value.dataKey,n.value.dataValue);c.value===1?u.value=V:u.value=u.value.concat(V),f.value=s.data[(L=(K=t==null?void 0:t.componentSchema)==null?void 0:K.componentProps)==null?void 0:L.pageTotalKey]}u.value.length>=f.value&&(m.value=!0)}catch(s){console.error("fetch error:",s)}finally{p.value=!1}}const n=a.ref();function S(e,l,o){return e&&Object.prototype.toString.call(e)==="[object Array]"?e.map(r=>r.children&&r.children.length?{label:r[l],value:r[o]+"",children:S(r.children,l,o)}:{label:r[l],value:r[o]+""}):[]}async function F(){var l,o;let e=await _.axios({url:t.sourceDateUrl,method:"get",params:{id:(o=(l=t==null?void 0:t.componentSchema)==null?void 0:l.componentProps)==null?void 0:o.dynamicId},headers:{Authorization:"Bearer "+b.api.get("Admin-Token"),lang:b.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});e.data.code===200&&(n.value=e.data.data)}a.watch(()=>t.sourceDateUrl,()=>{t.sourceDateUrl&&F()},{immediate:!0});function I(e){k.value=e,c.value=1,q(),y()}function M(e){e?(q(),y(),a.nextTick(()=>setTimeout($,0))):H()}function $(){const e=document.querySelector(`.${B} .el-select-dropdown__wrap`);e?(d.value=e,e.addEventListener("scroll",w)):(h.value=new MutationObserver(()=>{const l=document.querySelector(".paginated-select-dropdown .el-select-dropdown__wrap");l&&(d.value=l,l.addEventListener("scroll",w),h.value.disconnect())}),h.value.observe(document.body,{childList:!0,subtree:!0}))}function H(){var e;d.value&&d.value.removeEventListener("scroll",w),(e=h.value)==null||e.disconnect()}function w(){const e=d.value;if(!e||p.value||m.value)return;e.scrollTop+e.clientHeight>=e.scrollHeight-10&&(c.value++,y())}return(e,l)=>(a.openBlock(),a.createBlock(a.unref(z.ElSelect),{modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=o=>v.value=o),filterable:"",remote:"",clearable:"",placeholder:O.placeholder,"remote-method":I,loading:!1,teleported:!0,onVisibleChange:M,"popper-class":B,style:{width:"100%"}},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,o=>(a.openBlock(),a.createBlock(a.unref(z.ElOption),{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]))}}),W=_._export_sfc(Z,[["__scopeId","data-v-849e6326"]]);exports.default=W;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./pluginManager-C8aQylGX.cjs"),p=require("element-plus"),T=require("./_plugin-vue_export-helper-NUO0U1Az.cjs"),w=require("./index-BoL2PSBk.cjs"),Y={class:"sign-main"},F=["src"],O={class:"sign",style:{height:"100%",width:"100%"}},H=["id"],L={class:"btn"},$={class:"btns"},Z={__name:"sign",props:{componentSchema:{type:Object,require:!0,default:()=>({})},modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(B,{expose:C,emit:D}){const{t:l}=w.useLocale(),S=k.pluginManager.getComponent("button"),E=k.pluginManager.getComponent("Dialog"),M=D,o=B,d=e.inject("disabled",{value:!1});e.watch(()=>o.componentSchema,()=>{e.nextTick(()=>{h.value=o.modelValue})},{deep:!0,immediate:!0});const s=e.ref(null),i=e.ref(null),a=e.ref(),N=e.ref("");function A(){var n,t,u,g;if(i.value&&((n=i.value)!=null&&n.clientHeight)&&((t=i.value)!=null&&t.clientWidth)){if(s.value=document.getElementById(`canvas${o.componentSchema.field}`),s.value.height=((u=i.value)==null?void 0:u.clientHeight)||600,s.value.width=(g=i.value)==null?void 0:g.clientWidth,a.value=s.value.getContext("2d"),o.modelValue){let m=new Image;m.src=o.modelValue,m.setAttribute("crossOrigin","anonymous"),m.onload=()=>{a.value.fillStyle=a.value.createPattern(m,"repeat"),a.value.fillRect(0,0,1e3,550)}}a.value.lineWidth=o.componentSchema.componentProps.lineWidth||4,o.componentSchema&&o.componentSchema.componentProps&&o.componentSchema.componentProps.style&&o.componentSchema.componentProps.style.color&&(a.value.strokeStyle=o.componentSchema.componentProps.style.color),N.value=s.value.getBoundingClientRect()}}const f=e.ref(""),v=e.ref(""),W=e.ref(""),j=e.ref(""),c=e.ref([]),x=e.ref(!1);function q(n){if(d.value||o.componentSchema.componentProps.readonly||o.componentSchema.componentProps.disabled)return;n=n||event,n.preventDefault();let t={x:n.offsetX,y:n.offsetY};f.value=t.x,v.value=t.y,a.value.beginPath(),a.value.moveTo(t.x,t.y),a.value.lineTo(t.x,t.y),a.value.stroke(),a.value.closePath(),c.value.push(t),x.value=!0}function R(n){if(!(d.value||o.componentSchema.componentProps.readonly||o.componentSchema.componentProps.disabled)&&(n=n||event,n.preventDefault(),x.value)){let t={x:n.offsetX,y:n.offsetY};W.value=t.x,j.value=t.y,a.value.beginPath(),a.value.moveTo(f.value,v.value),a.value.lineTo(t.x,t.y),a.value.stroke(),a.value.closePath(),f.value=t.x,v.value=t.y,c.value.push(t)}}function z(n){if(d.value||o.componentSchema.componentProps.readonly||o.componentSchema.componentProps.disabled)return;n=n||event,n.preventDefault();let t={x:n.offsetX,y:n.offsetY};a.value.beginPath(),a.value.moveTo(f.value,v.value),a.value.lineTo(t.x,t.y),a.value.stroke(),a.value.closePath(),c.value.push(t),c.value.push({x:-1,y:-1}),x.value=!1}function P(){p.ElMessageBox.confirm(l("rewriteWillClearCanvas"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{a.value.clearRect(0,0,s.value.width,s.value.height),c.value=[],p.ElMessage({type:"info",message:l("clearSuccess")})}).catch(()=>{})}const h=e.ref("");async function b(){let n=await I(s.value.toDataURL("image/png"));h.value=n,M("update:modelValue",n)}async function I(n){try{let t=atob(n.split(",")[1]),u=new ArrayBuffer(t.length),g=new Uint8Array(u);for(let y=0;y<t.length;y++)g[y]=t.charCodeAt(y);let m=new Blob([u],{type:"image/png"}),V=new FormData;V.append("file",m,Date.now()+"png");let X=await T.axios({method:"post",url:"https://ess-ds.com/prod-api/center-file/file/upload",data:V,headers:{"Content-Type":"multipart/form-data",Authorization:"Bearer "+w.api.get("Admin-Token"),lang:w.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});return p.ElMessage({type:"success",message:l("uploadSuccess")}),X.data.data.url}catch{p.ElMessage({type:"warning",message:l("uploadFailed")}),r.value=!1}finally{r.value=!1}}const r=e.ref(!1);function U(){p.ElMessageBox.confirm(l("confirmAbandonSignature"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{a.value.clearRect(0,0,s.value.width,s.value.height),c.value=[],r.value=!1}).catch(()=>!1)}function _(){d.value||o.componentSchema.componentProps.readonly||o.componentSchema.componentProps.disabled||(r.value=!0,a.value&&(a.value.clearRect(0,0,s.value.width,s.value.height),c.value=[]),e.nextTick(()=>{A()}))}return e.onMounted(()=>{}),e.onUnmounted(()=>{}),C({surewrite:b}),(n,t)=>(e.openBlock(),e.createElementBlock("div",Y,[h.value?(e.openBlock(),e.createElementBlock("img",{key:1,class:"sign-board",src:h.value,alt:"",onClick:_},null,8,F)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"sign-board",onClick:_},e.toDisplayString(e.unref(l)("signaturePad")),1)),e.createVNode(e.unref(E),{modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=u=>r.value=u),title:e.unref(l)("signaturePad"),class:"w-860px",width:"860px",style:{height:"600px"},"before-close":U,draggable:!1,modal:""},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createElementVNode("div",{class:"canvas",ref_key:"canvasWrap",ref:i},[e.createElementVNode("canvas",{id:`canvas${o.componentSchema.field}`,onMousedown:q,onMousemove:R,onMouseup:z},null,40,H)],512),e.createElementVNode("div",L,[t[1]||(t[1]=e.createElementVNode("div",{class:"remark"},null,-1)),e.createElementVNode("div",$,[e.createVNode(e.unref(S),{type:"info",size:"mini",onClick:P,onTouch:P},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("rewrite")),1)]),_:1}),e.createVNode(e.unref(S),{type:"primary",size:"mini",onClick:b,onTouch:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("confirm")),1)]),_:1})])])])]),_:1},8,["modelValue","title"])]))}},G=T._export_sfc(Z,[["__scopeId","data-v-f8f7b654"]]);exports.default=G;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { inject as K, watch as Q, nextTick as A, ref as s, onMounted as ee, onUnmounted as te, createElementBlock as S, openBlock as _, createVNode as P, toDisplayString as T, unref as u, withCtx as k, createElementVNode as d, createTextVNode as W } from "vue";
|
|
2
2
|
import { p as R } from "./pluginManager-B0y107-1.js";
|
|
3
3
|
import { ElMessageBox as j, ElMessage as C } from "element-plus";
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
|
|
7
|
-
const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
4
|
+
import { _ as ae, a as oe } from "./_plugin-vue_export-helper-8DRKdUfJ.js";
|
|
5
|
+
import { u as ne, a as z } from "./index-B1s67XDZ.js";
|
|
6
|
+
const le = { class: "sign-main" }, se = ["src"], ce = {
|
|
8
7
|
class: "sign",
|
|
9
8
|
style: {
|
|
10
9
|
height: "100%",
|
|
11
10
|
width: "100%"
|
|
12
11
|
}
|
|
13
|
-
},
|
|
12
|
+
}, ie = ["id"], ue = { class: "btn" }, re = { class: "btns" }, me = {
|
|
14
13
|
__name: "sign",
|
|
15
14
|
props: {
|
|
16
15
|
componentSchema: {
|
|
@@ -25,7 +24,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
25
24
|
},
|
|
26
25
|
emits: ["update:modelValue"],
|
|
27
26
|
setup(E, { expose: I, emit: U }) {
|
|
28
|
-
const { t: n } =
|
|
27
|
+
const { t: n } = ne(), B = R.getComponent("button"), X = R.getComponent("Dialog"), Y = U, o = E, v = K("disabled", { value: !1 });
|
|
29
28
|
Q(
|
|
30
29
|
() => o.componentSchema,
|
|
31
30
|
() => {
|
|
@@ -37,9 +36,9 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
37
36
|
);
|
|
38
37
|
const l = s(null), r = s(null), a = s(), F = s("");
|
|
39
38
|
function N() {
|
|
40
|
-
var t, e,
|
|
39
|
+
var t, e, i, y;
|
|
41
40
|
if (r.value && ((t = r.value) != null && t.clientHeight) && ((e = r.value) != null && e.clientWidth)) {
|
|
42
|
-
if (l.value = document.getElementById(`canvas${o.componentSchema.field}`), l.value.height = ((
|
|
41
|
+
if (l.value = document.getElementById(`canvas${o.componentSchema.field}`), l.value.height = ((i = r.value) == null ? void 0 : i.clientHeight) || 600, l.value.width = (y = r.value) == null ? void 0 : y.clientWidth, a.value = l.value.getContext("2d"), o.modelValue) {
|
|
43
42
|
let p = new Image();
|
|
44
43
|
p.src = o.modelValue, p.setAttribute("crossOrigin", "anonymous"), p.onload = () => {
|
|
45
44
|
a.value.fillStyle = a.value.createPattern(p, "repeat"), a.value.fillRect(0, 0, 1e3, 550);
|
|
@@ -48,7 +47,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
48
47
|
a.value.lineWidth = o.componentSchema.componentProps.lineWidth || 4, o.componentSchema && o.componentSchema.componentProps && o.componentSchema.componentProps.style && o.componentSchema.componentProps.style.color && (a.value.strokeStyle = o.componentSchema.componentProps.style.color), F.value = l.value.getBoundingClientRect();
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
const f = s(""), h = s(""), O = s(""), H = s(""),
|
|
50
|
+
const f = s(""), h = s(""), O = s(""), H = s(""), c = s([]), w = s(!1);
|
|
52
51
|
function L(t) {
|
|
53
52
|
if (v.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled)
|
|
54
53
|
return;
|
|
@@ -57,7 +56,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
57
56
|
x: t.offsetX,
|
|
58
57
|
y: t.offsetY
|
|
59
58
|
};
|
|
60
|
-
f.value = e.x, h.value = e.y, a.value.beginPath(), a.value.moveTo(e.x, e.y), a.value.lineTo(e.x, e.y), a.value.stroke(), a.value.closePath(),
|
|
59
|
+
f.value = e.x, h.value = e.y, a.value.beginPath(), a.value.moveTo(e.x, e.y), a.value.lineTo(e.x, e.y), a.value.stroke(), a.value.closePath(), c.value.push(e), w.value = !0;
|
|
61
60
|
}
|
|
62
61
|
function $(t) {
|
|
63
62
|
if (!(v.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled) && (t = t || event, t.preventDefault(), w.value)) {
|
|
@@ -65,7 +64,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
65
64
|
x: t.offsetX,
|
|
66
65
|
y: t.offsetY
|
|
67
66
|
};
|
|
68
|
-
O.value = e.x, H.value = e.y, a.value.beginPath(), a.value.moveTo(f.value, h.value), a.value.lineTo(e.x, e.y), a.value.stroke(), a.value.closePath(), f.value = e.x, h.value = e.y,
|
|
67
|
+
O.value = e.x, H.value = e.y, a.value.beginPath(), a.value.moveTo(f.value, h.value), a.value.lineTo(e.x, e.y), a.value.stroke(), a.value.closePath(), f.value = e.x, h.value = e.y, c.value.push(e);
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
function q(t) {
|
|
@@ -76,7 +75,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
76
75
|
x: t.offsetX,
|
|
77
76
|
y: t.offsetY
|
|
78
77
|
};
|
|
79
|
-
a.value.beginPath(), a.value.moveTo(f.value, h.value), a.value.lineTo(e.x, e.y), a.value.stroke(), a.value.closePath(),
|
|
78
|
+
a.value.beginPath(), a.value.moveTo(f.value, h.value), a.value.lineTo(e.x, e.y), a.value.stroke(), a.value.closePath(), c.value.push(e), c.value.push({ x: -1, y: -1 }), w.value = !1;
|
|
80
79
|
}
|
|
81
80
|
function D() {
|
|
82
81
|
j.confirm(n("rewriteWillClearCanvas"), n("warning"), {
|
|
@@ -84,7 +83,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
84
83
|
cancelButtonText: n("cancel"),
|
|
85
84
|
type: "warning"
|
|
86
85
|
}).then(() => {
|
|
87
|
-
a.value.clearRect(0, 0, l.value.width, l.value.height),
|
|
86
|
+
a.value.clearRect(0, 0, l.value.width, l.value.height), c.value = [], C({
|
|
88
87
|
type: "info",
|
|
89
88
|
message: n("clearSuccess")
|
|
90
89
|
});
|
|
@@ -98,12 +97,12 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
98
97
|
}
|
|
99
98
|
async function Z(t) {
|
|
100
99
|
try {
|
|
101
|
-
let e = atob(t.split(",")[1]),
|
|
100
|
+
let e = atob(t.split(",")[1]), i = new ArrayBuffer(e.length), y = new Uint8Array(i);
|
|
102
101
|
for (let b = 0; b < e.length; b++)
|
|
103
102
|
y[b] = e.charCodeAt(b);
|
|
104
|
-
let p = new Blob([
|
|
103
|
+
let p = new Blob([i], { type: "image/png" }), M = new FormData();
|
|
105
104
|
M.append("file", p, Date.now() + "png");
|
|
106
|
-
let J = await
|
|
105
|
+
let J = await oe({
|
|
107
106
|
method: "post",
|
|
108
107
|
url: "https://ess-ds.com/prod-api/center-file/file/upload",
|
|
109
108
|
data: M,
|
|
@@ -136,11 +135,11 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
136
135
|
cancelButtonText: n("cancel"),
|
|
137
136
|
type: "warning"
|
|
138
137
|
}).then(() => {
|
|
139
|
-
a.value.clearRect(0, 0, l.value.width, l.value.height),
|
|
138
|
+
a.value.clearRect(0, 0, l.value.width, l.value.height), c.value = [], m.value = !1;
|
|
140
139
|
}).catch(() => !1);
|
|
141
140
|
}
|
|
142
141
|
function V() {
|
|
143
|
-
v.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled || (m.value = !0, a.value && (a.value.clearRect(0, 0, l.value.width, l.value.height),
|
|
142
|
+
v.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled || (m.value = !0, a.value && (a.value.clearRect(0, 0, l.value.width, l.value.height), c.value = []), A(() => {
|
|
144
143
|
N();
|
|
145
144
|
}));
|
|
146
145
|
}
|
|
@@ -162,7 +161,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
162
161
|
}, T(u(n)("signaturePad")), 1)),
|
|
163
162
|
P(u(X), {
|
|
164
163
|
modelValue: m.value,
|
|
165
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
164
|
+
"onUpdate:modelValue": e[0] || (e[0] = (i) => m.value = i),
|
|
166
165
|
title: u(n)("signaturePad"),
|
|
167
166
|
class: "w-860px",
|
|
168
167
|
width: "860px",
|
|
@@ -172,7 +171,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
172
171
|
modal: ""
|
|
173
172
|
}, {
|
|
174
173
|
default: k(() => [
|
|
175
|
-
d("div",
|
|
174
|
+
d("div", ce, [
|
|
176
175
|
d("div", {
|
|
177
176
|
class: "canvas",
|
|
178
177
|
ref_key: "canvasWrap",
|
|
@@ -183,7 +182,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
183
182
|
onMousedown: L,
|
|
184
183
|
onMousemove: $,
|
|
185
184
|
onMouseup: q
|
|
186
|
-
}, null, 40,
|
|
185
|
+
}, null, 40, ie)
|
|
187
186
|
], 512),
|
|
188
187
|
d("div", ue, [
|
|
189
188
|
e[1] || (e[1] = d("div", { class: "remark" }, null, -1)),
|
|
@@ -218,7 +217,7 @@ const le = { class: "sign-main" }, se = ["src"], ie = {
|
|
|
218
217
|
}, 8, ["modelValue", "title"])
|
|
219
218
|
]));
|
|
220
219
|
}
|
|
221
|
-
},
|
|
220
|
+
}, ge = /* @__PURE__ */ ae(me, [["__scopeId", "data-v-f8f7b654"]]);
|
|
222
221
|
export {
|
|
223
|
-
|
|
222
|
+
ge as default
|
|
224
223
|
};
|