epic-designer-gold 1.0.2 → 1.0.4
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/attributeView-CPrGnVQ8.js +106 -0
- package/dist/attributeView-DEg9mFCt.cjs +1 -0
- package/dist/axios-BAhOY32t.cjs +6 -0
- package/dist/{js.cookie-oHpRFPCO.js → axios-BFVeUxau.js} +942 -737
- package/dist/col-BNNn9Yx8.cjs +1 -0
- package/dist/{col-Dy6oYMf5.js → col-u5YiB-UK.js} +8 -8
- package/dist/index-B8V7odtp.cjs +1 -0
- package/dist/index-BEXliJtJ.cjs +1 -0
- package/dist/index-BN_dXDiO.cjs +1 -0
- package/dist/index-BPRzjSrH.cjs +10 -0
- package/dist/index-BPmq8lmK.js +72 -0
- package/dist/index-BY9j66Gp.js +4 -0
- package/dist/{index-DNeYX6HK.js → index-BiXYEiWV.js} +1 -1
- package/dist/index-BoVrWUpL.js +271 -0
- package/dist/{index-DLMH0OSJ.js → index-BstMY1Nn.js} +1 -1
- package/dist/index-Bsv8EECz.js +71 -0
- package/dist/index-C2Sx6r6b.cjs +1 -0
- package/dist/index-C5-ZZLug.cjs +1 -0
- package/dist/index-C6C5D9M8.js +602 -0
- package/dist/index-CIwV58Ko.js +1359 -0
- package/dist/index-CgisEnmm.cjs +1 -0
- package/dist/index-CtkdvWFN.cjs +1 -0
- package/dist/{index-DkyxbMHi.js → index-Cwgv4MbW.js} +24 -24
- package/dist/{index-CYDtBJTI.cjs → index-D3Uft3bJ.cjs} +1 -1
- package/dist/{index-BKDRMrcc.js → index-D7z34DMU.js} +28 -47
- package/dist/index-DAhVvQNH.cjs +1 -0
- package/dist/index-DO5DuUPL.js +581 -0
- package/dist/index-DddOVmF6.cjs +1 -0
- package/dist/index-DdsHIglg.js +104 -0
- package/dist/index-Dru9G2MF.js +195 -0
- package/dist/index-KGGnmoAO.cjs +1 -0
- package/dist/{index-XUQ1VGQg.js → index-Sin3ac_7.js} +1 -1
- package/dist/{index-DJxuHxdI.js → index-dUOJH8fj.js} +24 -24
- package/dist/index-dcjty1Ho.cjs +1 -0
- package/dist/{index-Dyo12Kua.cjs → index-g1W7IHK_.cjs} +1 -1
- package/dist/index-ykB9CsYG.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +35 -35
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/lang/en-US.d.ts +246 -0
- package/dist/locale/lang/zh-cn.d.ts +246 -0
- package/dist/modal-BLOgN3us.cjs +1 -0
- package/dist/modal-UFu4bD6x.js +57 -0
- package/dist/{outline-CNayBNNC.js → outline-CG-aHThT.js} +2 -2
- package/dist/outline-Coy4TGIa.cjs +1 -0
- package/dist/row-BWnbt6dh.cjs +1 -0
- package/dist/{row-qOviQw5w.js → row-DAy14ve9.js} +4 -4
- package/dist/sign-BlMhTkWG.cjs +1 -0
- package/dist/sign-C0z0Ygs4.js +219 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-BLVqzqPV.js → styleView-CkbdwQhA.js} +34 -33
- package/dist/styleView-D0W-N4vW.cjs +1 -0
- package/dist/tree.vue_vue_type_script_setup_true_lang-KKt_Qgqv.cjs +1 -0
- package/dist/{tree.vue_vue_type_script_setup_true_lang-BntCm43E.js → tree.vue_vue_type_script_setup_true_lang-RWHCYpkY.js} +1 -1
- package/dist/ui/antd/date-picker/datePicker.d.ts +2 -2
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +553 -542
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +1 -1
- package/dist/uploadFile-Bh5GyGFd.js +77 -0
- package/dist/uploadFile-CmKFRZMw.cjs +1 -0
- package/dist/{uploadImage-742IA7ei.js → uploadImage-CbVsUivh.js} +34 -33
- package/dist/uploadImage-CcMA6CyX.cjs +1 -0
- package/dist/uploadImage-DENhzttU.cjs +1 -0
- package/dist/{uploadImage-CnNnAISs.js → uploadImage-qHq6JX83.js} +17 -20
- package/package.json +1 -1
- package/dist/attributeView-B-IswSw7.js +0 -105
- package/dist/attributeView-CQBVIMGW.cjs +0 -1
- package/dist/col-RWuL5Zuz.cjs +0 -1
- package/dist/index-0GtpyUBx.js +0 -64
- package/dist/index-B4ido7VJ.cjs +0 -1
- package/dist/index-BGvqo4s7.js +0 -104
- package/dist/index-BMtRXkSh.cjs +0 -1
- package/dist/index-BSLudrcT.cjs +0 -1
- package/dist/index-BXO8Zj1H.cjs +0 -1
- package/dist/index-B_9x_cPH.js +0 -1633
- package/dist/index-B_TFfRwe.js +0 -194
- package/dist/index-C3_E7xcD.js +0 -270
- package/dist/index-C3a1hfUC.cjs +0 -10
- package/dist/index-CucdgcqX.cjs +0 -1
- package/dist/index-CvEzOhT_.cjs +0 -1
- package/dist/index-DEPx91yu.cjs +0 -1
- package/dist/index-DKVv0PbJ.js +0 -56
- package/dist/index-DSzJgAzW.cjs +0 -1
- package/dist/index-Dz1OM1dD.cjs +0 -1
- package/dist/index-HNPgHrkl.cjs +0 -1
- package/dist/index-JhxJizMR.js +0 -601
- package/dist/index-aBofZ4Mk.js +0 -4
- package/dist/index-sKJ91s0r.cjs +0 -1
- package/dist/js.cookie-BH1G_HRi.cjs +0 -6
- package/dist/modal-BPJM1Muh.js +0 -59
- package/dist/modal-_fid8E1T.cjs +0 -1
- package/dist/outline-6Qt3qlWm.cjs +0 -1
- package/dist/row-Bm8OjIsU.cjs +0 -1
- package/dist/sign--js815Se.cjs +0 -1
- package/dist/sign-CO47QOTw.js +0 -218
- package/dist/styleView-C1zTBeyd.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-BjjL_VlR.cjs +0 -1
- package/dist/uploadFile-CYDDVa_x.js +0 -76
- package/dist/uploadFile-eWBMdZ9d.cjs +0 -1
- package/dist/uploadImage-BQhv5ymq.cjs +0 -1
- package/dist/uploadImage-BXcN2FA_.cjs +0 -1
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { inject as K, watch as Q, nextTick as A, ref as s, onMounted as Z, onUnmounted as ee, openBlock as S, createElementBlock as _, toDisplayString as P, unref as i, createVNode as k, withCtx as T, createElementVNode as d, createTextVNode as W } from "vue";
|
|
2
|
+
import { p as R, e as te } from "./axios-BFVeUxau.js";
|
|
3
|
+
import { ElMessageBox as j, ElMessage as C } from "element-plus";
|
|
4
|
+
import { u as ae, a as oe } from "./index-DO5DuUPL.js";
|
|
5
|
+
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const le = { class: "sign-main" }, se = ["src"], ce = {
|
|
7
|
+
class: "sign",
|
|
8
|
+
style: {
|
|
9
|
+
height: "100%",
|
|
10
|
+
width: "100%"
|
|
11
|
+
}
|
|
12
|
+
}, ue = ["id"], ie = { class: "btn" }, re = { class: "btns" }, me = {
|
|
13
|
+
__name: "sign",
|
|
14
|
+
props: {
|
|
15
|
+
componentSchema: {
|
|
16
|
+
type: Object,
|
|
17
|
+
require: !0,
|
|
18
|
+
default: () => ({})
|
|
19
|
+
},
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ""
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: ["update:modelValue"],
|
|
26
|
+
setup(E, { expose: U, emit: X }) {
|
|
27
|
+
const { t: n } = ae(), B = R.getComponent("button"), Y = R.getComponent("Dialog"), I = X, o = E, v = K("disabled", { value: !1 });
|
|
28
|
+
Q(
|
|
29
|
+
() => o.componentSchema,
|
|
30
|
+
() => {
|
|
31
|
+
A(() => {
|
|
32
|
+
g.value = o.modelValue;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
{ deep: !0, immediate: !0 }
|
|
36
|
+
);
|
|
37
|
+
const l = s(null), r = s(null), a = s(), z = s("");
|
|
38
|
+
function F() {
|
|
39
|
+
var t, e, u, y;
|
|
40
|
+
if (r.value && ((t = r.value) != null && t.clientHeight) && ((e = r.value) != null && e.clientWidth)) {
|
|
41
|
+
if (l.value = document.getElementById(`canvas${o.componentSchema.field}`), l.value.height = ((u = r.value) == null ? void 0 : u.clientHeight) || 600, l.value.width = (y = r.value) == null ? void 0 : y.clientWidth, a.value = l.value.getContext("2d"), o.modelValue) {
|
|
42
|
+
let p = new Image();
|
|
43
|
+
p.src = o.modelValue, p.setAttribute("crossOrigin", "anonymous"), p.onload = () => {
|
|
44
|
+
a.value.fillStyle = a.value.createPattern(p, "repeat"), a.value.fillRect(0, 0, 1e3, 550);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
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), z.value = l.value.getBoundingClientRect();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const f = s(""), h = s(""), N = s(""), H = s(""), c = s([]), w = s(!1);
|
|
51
|
+
function L(t) {
|
|
52
|
+
if (v.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled)
|
|
53
|
+
return;
|
|
54
|
+
t = t || event, t.preventDefault();
|
|
55
|
+
let e = {
|
|
56
|
+
x: t.offsetX,
|
|
57
|
+
y: t.offsetY
|
|
58
|
+
};
|
|
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;
|
|
60
|
+
}
|
|
61
|
+
function O(t) {
|
|
62
|
+
if (!(v.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled) && (t = t || event, t.preventDefault(), w.value)) {
|
|
63
|
+
let e = {
|
|
64
|
+
x: t.offsetX,
|
|
65
|
+
y: t.offsetY
|
|
66
|
+
};
|
|
67
|
+
N.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);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function $(t) {
|
|
71
|
+
if (v.value || o.componentSchema.componentProps.readonly || o.componentSchema.componentProps.disabled)
|
|
72
|
+
return;
|
|
73
|
+
t = t || event, t.preventDefault();
|
|
74
|
+
let e = {
|
|
75
|
+
x: t.offsetX,
|
|
76
|
+
y: t.offsetY
|
|
77
|
+
};
|
|
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;
|
|
79
|
+
}
|
|
80
|
+
function V() {
|
|
81
|
+
j.confirm(n("rewriteWillClearCanvas"), n("warning"), {
|
|
82
|
+
confirmButtonText: n("confirm"),
|
|
83
|
+
cancelButtonText: n("cancel"),
|
|
84
|
+
type: "warning"
|
|
85
|
+
}).then(() => {
|
|
86
|
+
a.value.clearRect(0, 0, l.value.width, l.value.height), c.value = [], C({
|
|
87
|
+
type: "info",
|
|
88
|
+
message: n("clearSuccess")
|
|
89
|
+
});
|
|
90
|
+
}).catch(() => {
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const g = s("");
|
|
94
|
+
async function x() {
|
|
95
|
+
let t = await q(l.value.toDataURL("image/png"));
|
|
96
|
+
g.value = t, I("update:modelValue", t);
|
|
97
|
+
}
|
|
98
|
+
async function q(t) {
|
|
99
|
+
try {
|
|
100
|
+
let e = atob(t.split(",")[1]), u = new ArrayBuffer(e.length), y = new Uint8Array(u);
|
|
101
|
+
for (let b = 0; b < e.length; b++)
|
|
102
|
+
y[b] = e.charCodeAt(b);
|
|
103
|
+
let p = new Blob([u], { type: "image/png" }), M = new FormData();
|
|
104
|
+
M.append("file", p, Date.now() + "png");
|
|
105
|
+
let J = await te({
|
|
106
|
+
method: "post",
|
|
107
|
+
url: "https://ess-ds.com/prod-api/center-file/file/upload",
|
|
108
|
+
data: M,
|
|
109
|
+
headers: {
|
|
110
|
+
"Content-Type": "multipart/form-data",
|
|
111
|
+
Authorization: "Bearer " + oe.get("Admin-Token")
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
return C({
|
|
115
|
+
type: "success",
|
|
116
|
+
message: n("uploadSuccess")
|
|
117
|
+
}), J.data.data.url;
|
|
118
|
+
} catch {
|
|
119
|
+
C({
|
|
120
|
+
type: "warning",
|
|
121
|
+
message: n("uploadFailed")
|
|
122
|
+
}), m.value = !1;
|
|
123
|
+
} finally {
|
|
124
|
+
m.value = !1;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const m = s(!1);
|
|
128
|
+
function G() {
|
|
129
|
+
j.confirm(n("confirmAbandonSignature"), n("warning"), {
|
|
130
|
+
confirmButtonText: n("confirm"),
|
|
131
|
+
cancelButtonText: n("cancel"),
|
|
132
|
+
type: "warning"
|
|
133
|
+
}).then(() => {
|
|
134
|
+
a.value.clearRect(0, 0, l.value.width, l.value.height), c.value = [], m.value = !1;
|
|
135
|
+
}).catch(() => !1);
|
|
136
|
+
}
|
|
137
|
+
function D() {
|
|
138
|
+
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(() => {
|
|
139
|
+
F();
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
return Z(() => {
|
|
143
|
+
}), ee(() => {
|
|
144
|
+
}), U({
|
|
145
|
+
surewrite: x
|
|
146
|
+
}), (t, e) => (S(), _("div", le, [
|
|
147
|
+
g.value ? (S(), _("img", {
|
|
148
|
+
key: 1,
|
|
149
|
+
class: "sign-board",
|
|
150
|
+
src: g.value,
|
|
151
|
+
alt: "",
|
|
152
|
+
onClick: D
|
|
153
|
+
}, null, 8, se)) : (S(), _("div", {
|
|
154
|
+
key: 0,
|
|
155
|
+
class: "sign-board",
|
|
156
|
+
onClick: D
|
|
157
|
+
}, P(i(n)("signaturePad")), 1)),
|
|
158
|
+
k(i(Y), {
|
|
159
|
+
modelValue: m.value,
|
|
160
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => m.value = u),
|
|
161
|
+
title: i(n)("signaturePad"),
|
|
162
|
+
class: "w-860px",
|
|
163
|
+
width: "860px",
|
|
164
|
+
style: { height: "600px" },
|
|
165
|
+
"before-close": G,
|
|
166
|
+
draggable: !1,
|
|
167
|
+
modal: ""
|
|
168
|
+
}, {
|
|
169
|
+
default: T(() => [
|
|
170
|
+
d("div", ce, [
|
|
171
|
+
d("div", {
|
|
172
|
+
class: "canvas",
|
|
173
|
+
ref_key: "canvasWrap",
|
|
174
|
+
ref: r
|
|
175
|
+
}, [
|
|
176
|
+
d("canvas", {
|
|
177
|
+
id: `canvas${o.componentSchema.field}`,
|
|
178
|
+
onMousedown: L,
|
|
179
|
+
onMousemove: O,
|
|
180
|
+
onMouseup: $
|
|
181
|
+
}, null, 40, ue)
|
|
182
|
+
], 512),
|
|
183
|
+
d("div", ie, [
|
|
184
|
+
e[1] || (e[1] = d("div", { class: "remark" }, null, -1)),
|
|
185
|
+
d("div", re, [
|
|
186
|
+
k(i(B), {
|
|
187
|
+
type: "info",
|
|
188
|
+
size: "mini",
|
|
189
|
+
onClick: V,
|
|
190
|
+
onTouch: V
|
|
191
|
+
}, {
|
|
192
|
+
default: T(() => [
|
|
193
|
+
W(P(i(n)("rewrite")), 1)
|
|
194
|
+
]),
|
|
195
|
+
_: 1
|
|
196
|
+
}),
|
|
197
|
+
k(i(B), {
|
|
198
|
+
type: "primary",
|
|
199
|
+
size: "mini",
|
|
200
|
+
onClick: x,
|
|
201
|
+
onTouch: x
|
|
202
|
+
}, {
|
|
203
|
+
default: T(() => [
|
|
204
|
+
W(P(i(n)("confirm")), 1)
|
|
205
|
+
]),
|
|
206
|
+
_: 1
|
|
207
|
+
})
|
|
208
|
+
])
|
|
209
|
+
])
|
|
210
|
+
])
|
|
211
|
+
]),
|
|
212
|
+
_: 1
|
|
213
|
+
}, 8, ["modelValue", "title"])
|
|
214
|
+
]));
|
|
215
|
+
}
|
|
216
|
+
}, ge = /* @__PURE__ */ ne(me, [["__scopeId", "data-v-b0e855ca"]]);
|
|
217
|
+
export {
|
|
218
|
+
ge as default
|
|
219
|
+
};
|