@king-one/antdv 1.0.97 → 1.0.98
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/CHANGELOG.md +6 -0
- package/dist/es/components/pro-contract-view/apis/pro-contract-view.api.mjs +10 -0
- package/dist/es/components/pro-contract-view/hooks/use-contract-view.mjs +33 -18
- package/dist/es/components/pro-contract-view/src/pro-contract-view.vue2.mjs +110 -23
- package/dist/es/components/pro-contract-view/src/types.mjs +15 -4
- package/dist/es/components/pro-upload/src/gd-upload.mjs +65 -59
- package/dist/es/components/pro-upload/src/props.mjs +3 -0
- package/dist/lib/components/pro-contract-view/apis/pro-contract-view.api.js +1 -0
- package/dist/lib/components/pro-contract-view/hooks/use-contract-view.js +1 -1
- package/dist/lib/components/pro-contract-view/src/pro-contract-view.vue2.js +1 -1
- package/dist/lib/components/pro-contract-view/src/types.js +1 -1
- package/dist/lib/components/pro-upload/src/gd-upload.js +1 -1
- package/dist/lib/components/pro-upload/src/props.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/pro-contract-view.css +1 -1
- package/dist/theme-chalk/pro-modal.css +1 -1
- package/dist/types/components/pro-contract-view/apis/pro-contract-view.api.d.ts +7 -2
- package/dist/types/components/pro-contract-view/hooks/use-contract-view.d.ts +16 -9
- package/dist/types/components/pro-contract-view/index.d.ts +26 -8
- package/dist/types/components/pro-contract-view/src/pro-contract-view.vue.d.ts +26 -8
- package/dist/types/components/pro-contract-view/src/types.d.ts +17 -7
- package/dist/types/components/pro-upload/index.d.ts +8 -1
- package/dist/types/components/pro-upload/src/gd-upload.d.ts +8 -1
- package/dist/types/components/pro-upload/src/props.d.ts +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const i = {
|
|
2
|
+
getContractPrefix: (t) => globalThis.$http.get("/contract/uri/prefix", t),
|
|
3
|
+
getSignPrefix: (t) => globalThis.$http.get("/sign/uri/prefix", t),
|
|
4
|
+
getPreviewUrl: (t, e) => globalThis.$http.get(`${t}/redirect/contract-preview-url`, e),
|
|
5
|
+
getFileList: (t, e) => globalThis.$http.get(`${t}/contract/file/detail/list`, e),
|
|
6
|
+
getFilePreview: (t, e) => globalThis.$http.get(`${t}//file/preview`, e)
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
i as proContractViewApi
|
|
10
|
+
};
|
|
@@ -1,24 +1,39 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ref as o, reactive as p, onMounted as P } from "vue";
|
|
2
|
+
import { proContractViewApi as e } from "../apis/pro-contract-view.api.mjs";
|
|
3
|
+
function u({
|
|
4
|
+
contractId: r
|
|
5
5
|
}) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
const c = o([]), i = o([]), t = p({
|
|
7
|
+
contractPrefix: "",
|
|
8
|
+
signPrefix: "",
|
|
9
|
+
appToken: "",
|
|
10
|
+
userIdentity: ""
|
|
11
|
+
});
|
|
12
|
+
return P(async () => {
|
|
13
|
+
const { data: a } = await e.getContractPrefix(), { data: n } = await e.getSignPrefix();
|
|
14
|
+
if (a.contractUriPrefix && n.signUriPrefix) {
|
|
15
|
+
t.contractPrefix = a.contractUriPrefix, t.signPrefix = n.signUriPrefix;
|
|
16
|
+
const { data: s } = await e.getPreviewUrl(t.contractPrefix, {
|
|
17
|
+
params: {
|
|
18
|
+
contractId: r
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
t.userIdentity = s.userIdentity, t.appToken = s.appToken;
|
|
22
|
+
const { data: f } = await e.getFileList(t.signPrefix, {
|
|
23
|
+
headers: {
|
|
24
|
+
"SEAL-APP-TOKEN ": t.appToken,
|
|
25
|
+
userIdentity: t.userIdentity
|
|
26
|
+
},
|
|
27
|
+
params: { contractId: r }
|
|
28
|
+
});
|
|
29
|
+
i.value = f;
|
|
30
|
+
}
|
|
17
31
|
}), {
|
|
18
|
-
|
|
19
|
-
|
|
32
|
+
pageList: c,
|
|
33
|
+
viewStatus: t,
|
|
34
|
+
fileList: i
|
|
20
35
|
};
|
|
21
36
|
}
|
|
22
37
|
export {
|
|
23
|
-
|
|
38
|
+
u as useProContractView
|
|
24
39
|
};
|
|
@@ -1,35 +1,122 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Spin as
|
|
3
|
-
import { useNamespace as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as b, ref as u, computed as C, onMounted as V, watchEffect as z, unref as l, createElementBlock as g, openBlock as h, normalizeClass as d, createVNode as v, createCommentVNode as E, withCtx as H, createElementVNode as w, normalizeStyle as R } from "vue";
|
|
2
|
+
import { Spin as A } from "ant-design-vue";
|
|
3
|
+
import { useNamespace as B } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
import "../../index.mjs";
|
|
5
|
+
import { proContractViewApi as T } from "../apis/pro-contract-view.api.mjs";
|
|
6
|
+
import { ProContractViewProps as U } from "./types.mjs";
|
|
7
|
+
import { KScaleVirtualList as $ } from "../../scale-virtual-list/index.mjs";
|
|
8
|
+
const K = ["data-page-index"], M = ["src"], Q = /* @__PURE__ */ b({
|
|
6
9
|
__name: "pro-contract-view",
|
|
7
|
-
props:
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
|
|
10
|
+
props: U,
|
|
11
|
+
setup(x) {
|
|
12
|
+
const o = x, _ = u(null), c = u([]), y = {
|
|
13
|
+
itemHeight: (e) => c.value[e].size,
|
|
14
|
+
overscan: 3
|
|
15
|
+
}, p = u(!0), r = u(null), { b: N, e: m } = B("pro-contract-view"), k = C(() => [
|
|
16
|
+
N()
|
|
11
17
|
]);
|
|
12
|
-
|
|
13
|
-
if (
|
|
14
|
-
const e =
|
|
15
|
-
!
|
|
18
|
+
V(() => {
|
|
19
|
+
if (r.value) {
|
|
20
|
+
const e = r.value.parentElement;
|
|
21
|
+
!r.value.clientHeight && (e != null && e.clientHeight) && (r.value.style.height = `${e == null ? void 0 : e.clientHeight}px`);
|
|
16
22
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
23
|
+
}), z(() => {
|
|
24
|
+
const { signPrefix: e, userIdentity: a, appToken: t } = o.viewStatus;
|
|
25
|
+
e && a && t && o.pageList.length > 0 && o.fileId && F(o.pageList);
|
|
26
|
+
});
|
|
27
|
+
function F(e, a) {
|
|
28
|
+
const t = l(e), i = Math.max(...t.map((s) => s.width));
|
|
29
|
+
let n = 1;
|
|
30
|
+
a && (n = Number.parseFloat((a / i).toFixed(2))), c.value = t.map((s) => {
|
|
31
|
+
const S = Number.parseFloat((+s.width * n).toFixed(2)), f = Number.parseFloat((+s.height * n).toFixed(2));
|
|
32
|
+
return {
|
|
33
|
+
url: "",
|
|
34
|
+
loaded: !1,
|
|
35
|
+
width: S,
|
|
36
|
+
height: f,
|
|
37
|
+
size: f + 10,
|
|
38
|
+
pageNum: s.pageNum
|
|
39
|
+
};
|
|
40
|
+
}), p.value = !1;
|
|
41
|
+
}
|
|
42
|
+
function I(e) {
|
|
43
|
+
L(e.start, e.end);
|
|
44
|
+
}
|
|
45
|
+
async function L(e, a) {
|
|
46
|
+
let t = e;
|
|
47
|
+
for (; t <= a; ) {
|
|
48
|
+
const i = c.value[t];
|
|
49
|
+
if (!i)
|
|
50
|
+
return;
|
|
51
|
+
if (!i.loaded) {
|
|
52
|
+
i.loaded = !0;
|
|
53
|
+
const n = await P(t + 1);
|
|
54
|
+
i.url = n;
|
|
55
|
+
}
|
|
56
|
+
t++;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function P(e) {
|
|
60
|
+
const { viewStatus: a, fileId: t } = o;
|
|
61
|
+
return (await T.getFilePreview(a.signPrefix, {
|
|
62
|
+
headers: {
|
|
63
|
+
"SEAL-APP-TOKEN ": a.appToken,
|
|
64
|
+
userIdentity: a.userIdentity
|
|
65
|
+
},
|
|
66
|
+
params: {
|
|
67
|
+
fileId: t,
|
|
68
|
+
pageNum: e,
|
|
69
|
+
pageSize: 1,
|
|
70
|
+
absoluteEnable: !0
|
|
71
|
+
}
|
|
72
|
+
})).data.pages[e - 1].url;
|
|
73
|
+
}
|
|
74
|
+
return (e, a) => (h(), g(
|
|
21
75
|
"div",
|
|
22
76
|
{
|
|
23
77
|
ref_key: "containerRef",
|
|
24
|
-
ref:
|
|
25
|
-
class:
|
|
78
|
+
ref: r,
|
|
79
|
+
class: d(k.value)
|
|
26
80
|
},
|
|
27
81
|
[
|
|
28
|
-
l(
|
|
82
|
+
v(l(A), {
|
|
29
83
|
tip: "Loading...",
|
|
30
|
-
spinning:
|
|
84
|
+
spinning: p.value
|
|
31
85
|
}, null, 8, ["spinning"]),
|
|
32
|
-
|
|
86
|
+
p.value ? E("v-if", !0) : (h(), g(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
key: 0,
|
|
90
|
+
class: d(l(m)("content"))
|
|
91
|
+
},
|
|
92
|
+
[
|
|
93
|
+
v(l($), {
|
|
94
|
+
ref_key: "virtualListRef",
|
|
95
|
+
ref: _,
|
|
96
|
+
list: c.value,
|
|
97
|
+
option: y,
|
|
98
|
+
"onUpdate:state": I
|
|
99
|
+
}, {
|
|
100
|
+
default: H(({ index: t, item: i }) => [
|
|
101
|
+
w("div", {
|
|
102
|
+
"data-page-index": t + 1,
|
|
103
|
+
class: d(l(m)("content-item")),
|
|
104
|
+
style: R({ height: `${i.data.height}px`, width: `${i.data.width}px`, marginBottom: "10px" })
|
|
105
|
+
}, [
|
|
106
|
+
w("img", {
|
|
107
|
+
src: i.data.url,
|
|
108
|
+
width: "100%",
|
|
109
|
+
alt: ""
|
|
110
|
+
}, null, 8, M)
|
|
111
|
+
], 14, K)
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
/* STABLE */
|
|
115
|
+
}, 8, ["list"])
|
|
116
|
+
],
|
|
117
|
+
2
|
|
118
|
+
/* CLASS */
|
|
119
|
+
))
|
|
33
120
|
],
|
|
34
121
|
2
|
|
35
122
|
/* CLASS */
|
|
@@ -37,5 +124,5 @@ const h = { key: 0 }, N = /* @__PURE__ */ a({
|
|
|
37
124
|
}
|
|
38
125
|
});
|
|
39
126
|
export {
|
|
40
|
-
|
|
127
|
+
Q as default
|
|
41
128
|
};
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { definePropType as e } from "../../utils/install.mjs";
|
|
2
|
-
const
|
|
2
|
+
const r = {
|
|
3
|
+
viewStatus: {
|
|
4
|
+
type: e(Object),
|
|
5
|
+
required: !0
|
|
6
|
+
},
|
|
3
7
|
fileId: {
|
|
4
|
-
type:
|
|
8
|
+
type: String
|
|
5
9
|
},
|
|
6
|
-
|
|
10
|
+
pageList: {
|
|
7
11
|
type: e(Array),
|
|
8
12
|
default: () => []
|
|
9
13
|
}
|
|
14
|
+
// fileId: {
|
|
15
|
+
// type: definePropType<string>(String)
|
|
16
|
+
// },
|
|
17
|
+
// fileList: {
|
|
18
|
+
// type: definePropType<fileType[]>(Array),
|
|
19
|
+
// default: () => []
|
|
20
|
+
// }
|
|
10
21
|
};
|
|
11
22
|
export {
|
|
12
|
-
|
|
23
|
+
r as ProContractViewProps
|
|
13
24
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { message as
|
|
3
|
-
import { useNamespace as
|
|
4
|
-
import { KIcon as
|
|
5
|
-
import { UploadComponentProps as
|
|
6
|
-
import { getFileExtension as m, getUploadIcon as x, getBase64 as
|
|
1
|
+
import { defineComponent as W, ref as g, computed as z, watch as H, onMounted as I, createVNode as d, Fragment as h } from "vue";
|
|
2
|
+
import { message as y, Upload as R, Spin as D } from "ant-design-vue";
|
|
3
|
+
import { useNamespace as S } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
import { KIcon as $ } from "../../icon/index.mjs";
|
|
5
|
+
import { UploadComponentProps as j } from "./props.mjs";
|
|
6
|
+
import { getFileExtension as m, getUploadIcon as x, getBase64 as q } from "./utils/index.mjs";
|
|
7
7
|
import "./hooks/index.mjs";
|
|
8
|
-
import
|
|
9
|
-
import { useUpload as
|
|
10
|
-
const
|
|
8
|
+
import T from "./file-list.mjs";
|
|
9
|
+
import { useUpload as G } from "./hooks/useUpload.mjs";
|
|
10
|
+
const O = /* @__PURE__ */ W({
|
|
11
11
|
name: "GdUpload",
|
|
12
|
-
props:
|
|
12
|
+
props: j,
|
|
13
13
|
emits: {
|
|
14
14
|
"update:fileList": (e) => !0,
|
|
15
15
|
// 文件上传成功
|
|
@@ -18,125 +18,131 @@ const A = /* @__PURE__ */ F({
|
|
|
18
18
|
"upload-error": (e) => e
|
|
19
19
|
},
|
|
20
20
|
setup(e, {
|
|
21
|
-
emit:
|
|
22
|
-
expose:
|
|
21
|
+
emit: u,
|
|
22
|
+
expose: v
|
|
23
23
|
}) {
|
|
24
24
|
const {
|
|
25
|
-
b
|
|
26
|
-
} =
|
|
27
|
-
uploadFile:
|
|
25
|
+
b
|
|
26
|
+
} = S("pro-upload"), l = g([]), r = g(!1), {
|
|
27
|
+
uploadFile: U,
|
|
28
28
|
getFileDetails: N,
|
|
29
|
-
getImgUrl:
|
|
30
|
-
} =
|
|
29
|
+
getImgUrl: w
|
|
30
|
+
} = G(e.http), L = z(() => {
|
|
31
31
|
if (e.disabled || l.value.length === e.maxCount) return !0;
|
|
32
|
-
}),
|
|
32
|
+
}), C = async (i, t) => {
|
|
33
33
|
var s;
|
|
34
|
+
if (e.beforeUpload) {
|
|
35
|
+
const f = e.beforeUpload(i, t);
|
|
36
|
+
if (f instanceof Promise) {
|
|
37
|
+
if (await f === !1) return !1;
|
|
38
|
+
} else if (!f) return !1;
|
|
39
|
+
}
|
|
34
40
|
const {
|
|
35
|
-
name:
|
|
36
|
-
size:
|
|
37
|
-
} = i,
|
|
38
|
-
return e.accept && e.accept.length > 0 && !e.accept.includes(
|
|
39
|
-
},
|
|
41
|
+
name: n,
|
|
42
|
+
size: a
|
|
43
|
+
} = i, c = m(n), o = a / 1024 / 1024;
|
|
44
|
+
return e.accept && e.accept.length > 0 && !e.accept.includes(c) ? (y.warning(`只能上传${(s = e.accept) == null ? void 0 : s.join(".")}后缀的文件!`), !1) : o > e.maxSize ? (y.warning(`上传的文件不能大于${e.maxSize}M!`), !1) : !0;
|
|
45
|
+
}, F = async (i) => {
|
|
40
46
|
try {
|
|
41
47
|
const {
|
|
42
48
|
file: t
|
|
43
49
|
} = i;
|
|
44
50
|
r.value = !0;
|
|
45
|
-
const n = await
|
|
51
|
+
const n = await U({
|
|
46
52
|
business: e.business,
|
|
47
53
|
file: t
|
|
48
54
|
});
|
|
49
55
|
if (r.value = !1, !n) return;
|
|
50
|
-
const a = m(n.originName),
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
56
|
+
const a = m(n.originName), c = x(a);
|
|
57
|
+
if (c === "img") {
|
|
58
|
+
const s = await q(t);
|
|
53
59
|
l.value.push({
|
|
54
|
-
icon:
|
|
60
|
+
icon: s,
|
|
55
61
|
id: n.id,
|
|
56
|
-
type:
|
|
62
|
+
type: c,
|
|
57
63
|
spining: !1,
|
|
58
64
|
fileName: i.file.name
|
|
59
65
|
});
|
|
60
66
|
} else
|
|
61
67
|
l.value.push({
|
|
62
|
-
icon:
|
|
68
|
+
icon: c,
|
|
63
69
|
id: n.id,
|
|
64
|
-
type:
|
|
70
|
+
type: c,
|
|
65
71
|
spining: !1,
|
|
66
72
|
fileName: i.file.name
|
|
67
73
|
});
|
|
68
|
-
const
|
|
69
|
-
fileName:
|
|
70
|
-
type:
|
|
71
|
-
id:
|
|
74
|
+
const o = l.value.map((s) => ({
|
|
75
|
+
fileName: s.fileName,
|
|
76
|
+
type: s.type,
|
|
77
|
+
id: s.id
|
|
72
78
|
}));
|
|
73
|
-
|
|
79
|
+
u("update:fileList", o), u("upload-success", o);
|
|
74
80
|
} catch (t) {
|
|
75
|
-
r.value = !1,
|
|
81
|
+
r.value = !1, u("upload-error", t);
|
|
76
82
|
}
|
|
77
83
|
}, p = async (i) => {
|
|
78
84
|
const t = i == null ? void 0 : i.map((a) => a.id);
|
|
79
85
|
if ((t == null ? void 0 : t.length) === 0) return;
|
|
80
86
|
const n = await N(t);
|
|
81
87
|
for (const a of n.data) {
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
88
|
+
const c = m(a.originName), o = x(c);
|
|
89
|
+
if (o === "img") {
|
|
90
|
+
const s = await w([a.id]);
|
|
85
91
|
l.value.push({
|
|
86
92
|
id: a.id,
|
|
87
|
-
icon:
|
|
93
|
+
icon: s[a.id],
|
|
88
94
|
fileName: a.originName,
|
|
89
95
|
spining: !1,
|
|
90
|
-
type:
|
|
96
|
+
type: o
|
|
91
97
|
});
|
|
92
98
|
} else
|
|
93
99
|
l.value.push({
|
|
94
100
|
id: a.id,
|
|
95
|
-
icon:
|
|
101
|
+
icon: o,
|
|
96
102
|
fileName: a.originName,
|
|
97
103
|
spining: !1,
|
|
98
|
-
type:
|
|
104
|
+
type: o
|
|
99
105
|
});
|
|
100
106
|
}
|
|
101
107
|
};
|
|
102
|
-
return
|
|
108
|
+
return H(() => l.value, (i) => {
|
|
103
109
|
const t = i.map((n) => ({
|
|
104
110
|
fileName: n.fileName,
|
|
105
111
|
type: n.type,
|
|
106
112
|
id: n.id
|
|
107
113
|
}));
|
|
108
|
-
|
|
114
|
+
u("update:fileList", t), u("change", t);
|
|
109
115
|
}, {
|
|
110
116
|
deep: !0
|
|
111
|
-
}),
|
|
117
|
+
}), I(async () => {
|
|
112
118
|
p(e.fileList);
|
|
113
|
-
}),
|
|
119
|
+
}), v({
|
|
114
120
|
updateFileList: p
|
|
115
121
|
}), () => {
|
|
116
122
|
var i;
|
|
117
123
|
return d("div", {
|
|
118
|
-
class:
|
|
124
|
+
class: b(),
|
|
119
125
|
style: {
|
|
120
126
|
display: "flex",
|
|
121
127
|
flexWrap: "wrap",
|
|
122
128
|
alignContent: "space-between"
|
|
123
129
|
}
|
|
124
|
-
}, [d(
|
|
130
|
+
}, [d(T, {
|
|
125
131
|
http: e.http,
|
|
126
132
|
itemWidth: e.itemWidth,
|
|
127
133
|
itemHeight: e.itemHeight,
|
|
128
134
|
list: l.value,
|
|
129
135
|
"onUpdate:list": (t) => l.value = t
|
|
130
|
-
}, null, 8, ["http", "itemWidth", "itemHeight", "list", "onUpdate:list"]), l.value.length < (e.maxCount ?? 20) ? d(
|
|
136
|
+
}, null, 8, ["http", "itemWidth", "itemHeight", "list", "onUpdate:list"]), l.value.length < (e.maxCount ?? 20) ? d(R, {
|
|
131
137
|
accept: (i = e.accept) == null ? void 0 : i.join(","),
|
|
132
|
-
disabled:
|
|
133
|
-
customRequest:
|
|
134
|
-
beforeUpload:
|
|
138
|
+
disabled: L.value,
|
|
139
|
+
customRequest: F,
|
|
140
|
+
beforeUpload: C,
|
|
135
141
|
style: {
|
|
136
142
|
marginTop: "5px"
|
|
137
143
|
}
|
|
138
144
|
}, {
|
|
139
|
-
default: () => d(
|
|
145
|
+
default: () => d(D, {
|
|
140
146
|
spinning: r.value
|
|
141
147
|
}, {
|
|
142
148
|
default: () => [d("div", {
|
|
@@ -152,18 +158,18 @@ const A = /* @__PURE__ */ F({
|
|
|
152
158
|
justifyContent: "center",
|
|
153
159
|
borderRadius: "5px"
|
|
154
160
|
}
|
|
155
|
-
}, [d(
|
|
161
|
+
}, [d($, {
|
|
156
162
|
name: "upload-icon",
|
|
157
163
|
color: "#3296fa",
|
|
158
164
|
size: 32
|
|
159
165
|
}, null)], 4)]
|
|
160
166
|
}, 8, ["spinning"]),
|
|
161
|
-
itemRender: () => d(
|
|
167
|
+
itemRender: () => d(h, null, null),
|
|
162
168
|
_: 1
|
|
163
|
-
}, 8, ["accept", "disabled", "customRequest", "beforeUpload"]) : d(
|
|
169
|
+
}, 8, ["accept", "disabled", "customRequest", "beforeUpload"]) : d(h, null, null)], 2);
|
|
164
170
|
};
|
|
165
171
|
}
|
|
166
172
|
});
|
|
167
173
|
export {
|
|
168
|
-
|
|
174
|
+
O as default
|
|
169
175
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i={getContractPrefix:t=>globalThis.$http.get("/contract/uri/prefix",t),getSignPrefix:t=>globalThis.$http.get("/sign/uri/prefix",t),getPreviewUrl:(t,e)=>globalThis.$http.get(`${t}/redirect/contract-preview-url`,e),getFileList:(t,e)=>globalThis.$http.get(`${t}/contract/file/detail/list`,e),getFilePreview:(t,e)=>globalThis.$http.get(`${t}//file/preview`,e)};exports.proContractViewApi=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("../apis/pro-contract-view.api.js");function f({contractId:i}){const c=t.ref([]),a=t.ref([]),e=t.reactive({contractPrefix:"",signPrefix:"",appToken:"",userIdentity:""});return t.onMounted(async()=>{const{data:n}=await r.proContractViewApi.getContractPrefix(),{data:o}=await r.proContractViewApi.getSignPrefix();if(n.contractUriPrefix&&o.signUriPrefix){e.contractPrefix=n.contractUriPrefix,e.signPrefix=o.signUriPrefix;const{data:s}=await r.proContractViewApi.getPreviewUrl(e.contractPrefix,{params:{contractId:i}});e.userIdentity=s.userIdentity,e.appToken=s.appToken;const{data:p}=await r.proContractViewApi.getFileList(e.signPrefix,{headers:{"SEAL-APP-TOKEN ":e.appToken,userIdentity:e.userIdentity},params:{contractId:i}});a.value=p}}),{pageList:c,viewStatus:e,fileList:a}}exports.useProContractView=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),V=require("ant-design-vue"),k=require("../../../hooks/use-namespace/index.js");require("../../index.js");const C=require("../apis/pro-contract-view.api.js"),S=require("./types.js"),b=require("../../scale-virtual-list/index.js"),P=["data-page-index"],q=["src"],z=e.defineComponent({__name:"pro-contract-view",props:S.ProContractViewProps,setup(f){const o=f,g=e.ref(null),c=e.ref([]),m={itemHeight:t=>c.value[t].size,overscan:3},u=e.ref(!0),s=e.ref(null),{b:h,e:d}=k.useNamespace("pro-contract-view"),v=e.computed(()=>[h()]);e.onMounted(()=>{if(s.value){const t=s.value.parentElement;!s.value.clientHeight&&(t!=null&&t.clientHeight)&&(s.value.style.height=`${t==null?void 0:t.clientHeight}px`)}}),e.watchEffect(()=>{const{signPrefix:t,userIdentity:a,appToken:n}=o.viewStatus;t&&a&&n&&o.pageList.length>0&&o.fileId&&w(o.pageList)});function w(t,a){const n=e.unref(t),i=Math.max(...n.map(l=>l.width));let r=1;a&&(r=Number.parseFloat((a/i).toFixed(2))),c.value=n.map(l=>{const N=Number.parseFloat((+l.width*r).toFixed(2)),p=Number.parseFloat((+l.height*r).toFixed(2));return{url:"",loaded:!1,width:N,height:p,size:p+10,pageNum:l.pageNum}}),u.value=!1}function x(t){_(t.start,t.end)}async function _(t,a){let n=t;for(;n<=a;){const i=c.value[n];if(!i)return;if(!i.loaded){i.loaded=!0;const r=await y(n+1);i.url=r}n++}}async function y(t){const{viewStatus:a,fileId:n}=o;return(await C.proContractViewApi.getFilePreview(a.signPrefix,{headers:{"SEAL-APP-TOKEN ":a.appToken,userIdentity:a.userIdentity},params:{fileId:n,pageNum:t,pageSize:1,absoluteEnable:!0}})).data.pages[t-1].url}return(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:s,class:e.normalizeClass(v.value)},[e.createVNode(e.unref(V.Spin),{tip:"Loading...",spinning:u.value},null,8,["spinning"]),u.value?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(d)("content"))},[e.createVNode(e.unref(b.KScaleVirtualList),{ref_key:"virtualListRef",ref:g,list:c.value,option:m,"onUpdate:state":x},{default:e.withCtx(({index:n,item:i})=>[e.createElementVNode("div",{"data-page-index":n+1,class:e.normalizeClass(e.unref(d)("content-item")),style:e.normalizeStyle({height:`${i.data.height}px`,width:`${i.data.width}px`,marginBottom:"10px"})},[e.createElementVNode("img",{src:i.data.url,width:"100%",alt:""},null,8,q)],14,P)]),_:1},8,["list"])],2))],2))}});exports.default=z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../utils/install.js"),t={
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../utils/install.js"),t={viewStatus:{type:e.definePropType(Object),required:!0},fileId:{type:String},pageList:{type:e.definePropType(Array),default:()=>[]}};exports.ProContractViewProps=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),p=require("ant-design-vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),p=require("ant-design-vue"),w=require("../../../hooks/use-namespace/index.js"),V=require("../../icon/index.js"),F=require("./props.js"),d=require("./utils/index.js");require("./hooks/index.js");const L=require("./file-list.js"),$=require("./hooks/useUpload.js"),C=i.defineComponent({name:"GdUpload",props:F.UploadComponentProps,emits:{"update:fileList":e=>!0,"upload-success":e=>e,change:e=>e,"upload-error":e=>e},setup(e,{emit:r,expose:h}){const{b:x}=w.useNamespace("pro-upload"),l=i.ref([]),f=i.ref(!1),{uploadFile:y,getFileDetails:v,getImgUrl:N}=$.useUpload(e.http),b=i.computed(()=>{if(e.disabled||l.value.length===e.maxCount)return!0}),U=async(a,t)=>{var o;if(e.beforeUpload){const m=e.beforeUpload(a,t);if(m instanceof Promise){if(await m===!1)return!1}else if(!m)return!1}const{name:s,size:n}=a,c=d.getFileExtension(s),u=n/1024/1024;return e.accept&&e.accept.length>0&&!e.accept.includes(c)?(p.message.warning(`只能上传${(o=e.accept)==null?void 0:o.join(".")}后缀的文件!`),!1):u>e.maxSize?(p.message.warning(`上传的文件不能大于${e.maxSize}M!`),!1):!0},q=async a=>{try{const{file:t}=a;f.value=!0;const s=await y({business:e.business,file:t});if(f.value=!1,!s)return;const n=d.getFileExtension(s.originName),c=d.getUploadIcon(n);if(c==="img"){const o=await d.getBase64(t);l.value.push({icon:o,id:s.id,type:c,spining:!1,fileName:a.file.name})}else l.value.push({icon:c,id:s.id,type:c,spining:!1,fileName:a.file.name});const u=l.value.map(o=>({fileName:o.fileName,type:o.type,id:o.id}));r("update:fileList",u),r("upload-success",u)}catch(t){f.value=!1,r("upload-error",t)}},g=async a=>{const t=a==null?void 0:a.map(n=>n.id);if((t==null?void 0:t.length)===0)return;const s=await v(t);for(const n of s.data){const c=d.getFileExtension(n.originName),u=d.getUploadIcon(c);if(u==="img"){const o=await N([n.id]);l.value.push({id:n.id,icon:o[n.id],fileName:n.originName,spining:!1,type:u})}else l.value.push({id:n.id,icon:u,fileName:n.originName,spining:!1,type:u})}};return i.watch(()=>l.value,a=>{const t=a.map(s=>({fileName:s.fileName,type:s.type,id:s.id}));r("update:fileList",t),r("change",t)},{deep:!0}),i.onMounted(async()=>{g(e.fileList)}),h({updateFileList:g}),()=>{var a;return i.createVNode("div",{class:x(),style:{display:"flex",flexWrap:"wrap",alignContent:"space-between"}},[i.createVNode(L.default,{http:e.http,itemWidth:e.itemWidth,itemHeight:e.itemHeight,list:l.value,"onUpdate:list":t=>l.value=t},null,8,["http","itemWidth","itemHeight","list","onUpdate:list"]),l.value.length<(e.maxCount??20)?i.createVNode(p.Upload,{accept:(a=e.accept)==null?void 0:a.join(","),disabled:b.value,customRequest:q,beforeUpload:U,style:{marginTop:"5px"}},{default:()=>i.createVNode(p.Spin,{spinning:f.value},{default:()=>[i.createVNode("div",{style:{width:`${e.itemWidth}px`,height:`${e.itemHeight}px`,minWidth:"80px",minHeight:"80px",cursor:"pointer",border:"1px dashed #3296fa",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"5px"}},[i.createVNode(V.KIcon,{name:"upload-icon",color:"#3296fa",size:32},null)],4)]},8,["spinning"]),itemRender:()=>i.createVNode(i.Fragment,null,null),_:1},8,["accept","disabled","customRequest","beforeUpload"]):i.createVNode(i.Fragment,null,null)],2)}}});exports.default=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={uploadName:{type:String},business:{type:String,required:!0},proxyPrefix:{type:String},fileList:{type:Array,required:!0,default:()=>[]},accept:{type:Array},disabled:{type:Boolean,default:!1},maxSize:{type:Number,default:10},maxCount:{type:Number,default:6},http:{type:[Object,Function],required:!0},itemWidth:{type:Number,default:80},itemHeight:{type:Number,default:80}};exports.UploadComponentProps=e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={uploadName:{type:String},beforeUpload:{type:Function},business:{type:String,required:!0},proxyPrefix:{type:String},fileList:{type:Array,required:!0,default:()=>[]},accept:{type:Array},disabled:{type:Boolean,default:!1},maxSize:{type:Number,default:10},maxCount:{type:Number,default:6},http:{type:[Object,Function],required:!0},itemWidth:{type:Number,default:80},itemHeight:{type:Number,default:80}};exports.UploadComponentProps=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=
|
|
1
|
+
@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=20063) format("woff2"),url(fonts/iconfont.woff?t=96544) format("woff"),url(fonts/iconfont.ttf?t=80451) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-upload-icon:before{content:"\e617"}.icon-king-title-icon:before{content:"\e680"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-virtual-list-container{margin:0 auto;position:relative}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto;position:absolute;left:50%}.king-pro-title{border-bottom:1px solid #ccc;font-weight:500;display:flex;align-items:center}.king-pro-title .icon{margin-right:10px}.king-pro-title--unborder{border:none}.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-virtual-list-container{margin:0 auto;position:relative}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto;position:absolute;left:50%}.king-pro-title{border-bottom:1px solid #ccc;font-weight:500;display:flex;align-items:center}.king-pro-title .icon{margin-right:10px}.king-pro-title--unborder{border:none}.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:80vh;overflow:auto}.king-pro-modal .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}.king-pro-modal .ant-modal-title{flex:1}.king-pro-modal .pro-modal-title{cursor:move;width:100%}.king-pro-area-select{width:100%}@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=1692) format("woff2"),url(fonts/iconfont.woff?t=46574) format("woff"),url(fonts/iconfont.ttf?t=74836) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-upload-icon:before{content:"\e617"}.icon-king-title-icon:before{content:"\e680"}.king-cover-scrollbar{height:100%;width:100%;overflow:hidden;position:relative}.king-cover-scrollbar .king-cover-scrollbar-container{height:100%;width:100%;overflow:scroll;scrollbar-width:none}.king-cover-scrollbar .king-cover-scrollbar-rail{width:5px;top:2px;bottom:2px;position:absolute}.king-cover-scrollbar .king-cover-scrollbar-rail__scrollbar--vertical{position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-pro-contract-view{position:relative;display:flex}.king-pro-contract-view .king-pro-contract-view__content{flex:1}.king-pro-contract-view .king-pro-contract-view__content-item{border:1px solid #f0f0f0;position:relative;box-shadow:0 2px 10px 0 rgba(0,0,0,.1)}.king-pro-contract-view>.ant-spin{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.king-pro-contract-view{position:relative;border:1px solid
|
|
1
|
+
.king-pro-contract-view{position:relative;display:flex}.king-pro-contract-view .king-pro-contract-view__content{flex:1}.king-pro-contract-view .king-pro-contract-view__content-item{border:1px solid #f0f0f0;position:relative;box-shadow:0 2px 10px 0 rgba(0,0,0,.1)}.king-pro-contract-view>.ant-spin{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:
|
|
1
|
+
.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:80vh;overflow:auto}.king-pro-modal .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}.king-pro-modal .ant-modal-title{flex:1}.king-pro-modal .pro-modal-title{cursor:move;width:100%}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
export declare const proContractViewApi: {
|
|
3
|
+
getContractPrefix: (config?: AxiosRequestConfig) => Promise<any>;
|
|
4
|
+
getSignPrefix: (config?: AxiosRequestConfig) => Promise<any>;
|
|
5
|
+
getPreviewUrl: (preFix: string, config: AxiosRequestConfig) => Promise<any>;
|
|
6
|
+
getFileList: (preFix: string, config: AxiosRequestConfig) => Promise<any>;
|
|
7
|
+
getFilePreview: (signPreFix: string, config: AxiosRequestConfig) => Promise<any>;
|
|
3
8
|
};
|
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
interface paramsType {
|
|
3
3
|
contractId: string;
|
|
4
|
-
prefix?: string;
|
|
5
4
|
header?: Recordable<any>;
|
|
6
5
|
}
|
|
7
|
-
export declare function useProContractView({ contractId
|
|
8
|
-
|
|
6
|
+
export declare function useProContractView({ contractId }: paramsType): {
|
|
7
|
+
pageList: Ref<{
|
|
9
8
|
url: string;
|
|
10
9
|
loaded: boolean;
|
|
11
|
-
width:
|
|
12
|
-
height:
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
13
12
|
pageNum: number;
|
|
13
|
+
size?: number | undefined;
|
|
14
14
|
}[]>;
|
|
15
|
+
viewStatus: {
|
|
16
|
+
contractPrefix: string;
|
|
17
|
+
signPrefix: string;
|
|
18
|
+
appToken: string;
|
|
19
|
+
userIdentity: string;
|
|
20
|
+
};
|
|
15
21
|
fileList: Ref<{
|
|
16
|
-
|
|
22
|
+
fileId: string;
|
|
17
23
|
fileName: string;
|
|
18
24
|
total: number;
|
|
19
|
-
|
|
25
|
+
pageInfoVoList: {
|
|
20
26
|
url: string;
|
|
21
27
|
loaded: boolean;
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
24
30
|
pageNum: number;
|
|
31
|
+
size?: number | undefined;
|
|
25
32
|
}[];
|
|
26
33
|
}[]>;
|
|
27
34
|
};
|
|
@@ -1,25 +1,43 @@
|
|
|
1
1
|
import { SFCWithInstall } from '../utils/install';
|
|
2
2
|
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
|
-
import {
|
|
3
|
+
import { pageType } from './src/types';
|
|
4
4
|
export type { ContractViewProps } from './src/types';
|
|
5
5
|
export * from './hooks/use-contract-view';
|
|
6
6
|
export declare const KProContractView: SFCWithInstall<DefineComponent<{
|
|
7
|
+
readonly viewStatus: {
|
|
8
|
+
readonly type: PropType<{
|
|
9
|
+
contractPrefix: string;
|
|
10
|
+
signPrefix: string;
|
|
11
|
+
userIdentity: string;
|
|
12
|
+
appToken: string;
|
|
13
|
+
}>;
|
|
14
|
+
readonly required: true;
|
|
15
|
+
};
|
|
7
16
|
readonly fileId: {
|
|
8
|
-
readonly type:
|
|
17
|
+
readonly type: StringConstructor;
|
|
9
18
|
};
|
|
10
|
-
readonly
|
|
11
|
-
readonly type: PropType<
|
|
19
|
+
readonly pageList: {
|
|
20
|
+
readonly type: PropType< pageType[]>;
|
|
12
21
|
readonly default: () => never[];
|
|
13
22
|
};
|
|
14
23
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
24
|
+
readonly viewStatus: {
|
|
25
|
+
readonly type: PropType<{
|
|
26
|
+
contractPrefix: string;
|
|
27
|
+
signPrefix: string;
|
|
28
|
+
userIdentity: string;
|
|
29
|
+
appToken: string;
|
|
30
|
+
}>;
|
|
31
|
+
readonly required: true;
|
|
32
|
+
};
|
|
15
33
|
readonly fileId: {
|
|
16
|
-
readonly type:
|
|
34
|
+
readonly type: StringConstructor;
|
|
17
35
|
};
|
|
18
|
-
readonly
|
|
19
|
-
readonly type: PropType<
|
|
36
|
+
readonly pageList: {
|
|
37
|
+
readonly type: PropType< pageType[]>;
|
|
20
38
|
readonly default: () => never[];
|
|
21
39
|
};
|
|
22
40
|
}>>, {
|
|
23
|
-
readonly
|
|
41
|
+
readonly pageList: pageType[];
|
|
24
42
|
}, {}>>;
|
|
25
43
|
export default KProContractView;
|
|
@@ -1,22 +1,40 @@
|
|
|
1
|
+
import { pageType } from './types';
|
|
1
2
|
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
-
import { fileType } from './types';
|
|
3
3
|
declare const _default: DefineComponent<{
|
|
4
|
+
readonly viewStatus: {
|
|
5
|
+
readonly type: PropType<{
|
|
6
|
+
contractPrefix: string;
|
|
7
|
+
signPrefix: string;
|
|
8
|
+
userIdentity: string;
|
|
9
|
+
appToken: string;
|
|
10
|
+
}>;
|
|
11
|
+
readonly required: true;
|
|
12
|
+
};
|
|
4
13
|
readonly fileId: {
|
|
5
|
-
readonly type:
|
|
14
|
+
readonly type: StringConstructor;
|
|
6
15
|
};
|
|
7
|
-
readonly
|
|
8
|
-
readonly type: PropType<
|
|
16
|
+
readonly pageList: {
|
|
17
|
+
readonly type: PropType<pageType[]>;
|
|
9
18
|
readonly default: () => never[];
|
|
10
19
|
};
|
|
11
20
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
21
|
+
readonly viewStatus: {
|
|
22
|
+
readonly type: PropType<{
|
|
23
|
+
contractPrefix: string;
|
|
24
|
+
signPrefix: string;
|
|
25
|
+
userIdentity: string;
|
|
26
|
+
appToken: string;
|
|
27
|
+
}>;
|
|
28
|
+
readonly required: true;
|
|
29
|
+
};
|
|
12
30
|
readonly fileId: {
|
|
13
|
-
readonly type:
|
|
31
|
+
readonly type: StringConstructor;
|
|
14
32
|
};
|
|
15
|
-
readonly
|
|
16
|
-
readonly type: PropType<
|
|
33
|
+
readonly pageList: {
|
|
34
|
+
readonly type: PropType<pageType[]>;
|
|
17
35
|
readonly default: () => never[];
|
|
18
36
|
};
|
|
19
37
|
}>>, {
|
|
20
|
-
readonly
|
|
38
|
+
readonly pageList: pageType[];
|
|
21
39
|
}, {}>;
|
|
22
40
|
export default _default;
|
|
@@ -1,24 +1,34 @@
|
|
|
1
1
|
import { ExtractPublicPropTypes, PropType } from 'vue';
|
|
2
2
|
export declare const ProContractViewProps: {
|
|
3
|
+
readonly viewStatus: {
|
|
4
|
+
readonly type: PropType<{
|
|
5
|
+
contractPrefix: string;
|
|
6
|
+
signPrefix: string;
|
|
7
|
+
userIdentity: string;
|
|
8
|
+
appToken: string;
|
|
9
|
+
}>;
|
|
10
|
+
readonly required: true;
|
|
11
|
+
};
|
|
3
12
|
readonly fileId: {
|
|
4
|
-
readonly type:
|
|
13
|
+
readonly type: StringConstructor;
|
|
5
14
|
};
|
|
6
|
-
readonly
|
|
7
|
-
readonly type: PropType<
|
|
15
|
+
readonly pageList: {
|
|
16
|
+
readonly type: PropType<pageType[]>;
|
|
8
17
|
readonly default: () => never[];
|
|
9
18
|
};
|
|
10
19
|
};
|
|
11
20
|
export interface pageType {
|
|
12
21
|
url: string;
|
|
13
22
|
loaded: boolean;
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
16
25
|
pageNum: number;
|
|
26
|
+
size?: number;
|
|
17
27
|
}
|
|
18
28
|
export interface fileType {
|
|
19
|
-
|
|
29
|
+
fileId: string;
|
|
20
30
|
fileName: string;
|
|
21
31
|
total: number;
|
|
22
|
-
|
|
32
|
+
pageInfoVoList: pageType[];
|
|
23
33
|
}
|
|
24
34
|
export type ContractViewProps = ExtractPublicPropTypes<typeof ProContractViewProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useUpload } from './src/hooks/useUpload';
|
|
2
2
|
import { SFCWithInstall } from '../utils/install';
|
|
3
3
|
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
4
|
+
import { UploadProps } from 'ant-design-vue';
|
|
4
5
|
import { UploadPropsType, FileListType } from './src/types';
|
|
5
6
|
export * from './src/types';
|
|
6
7
|
export { useUpload };
|
|
@@ -8,6 +9,9 @@ export declare const KProUpload: SFCWithInstall<DefineComponent<{
|
|
|
8
9
|
uploadName: {
|
|
9
10
|
type: StringConstructor;
|
|
10
11
|
};
|
|
12
|
+
beforeUpload: {
|
|
13
|
+
type: PropType< UploadProps["beforeUpload"]>;
|
|
14
|
+
};
|
|
11
15
|
business: {
|
|
12
16
|
type: StringConstructor;
|
|
13
17
|
required: boolean;
|
|
@@ -56,6 +60,9 @@ export declare const KProUpload: SFCWithInstall<DefineComponent<{
|
|
|
56
60
|
uploadName: {
|
|
57
61
|
type: StringConstructor;
|
|
58
62
|
};
|
|
63
|
+
beforeUpload: {
|
|
64
|
+
type: PropType< UploadProps["beforeUpload"]>;
|
|
65
|
+
};
|
|
59
66
|
business: {
|
|
60
67
|
type: StringConstructor;
|
|
61
68
|
required: boolean;
|
|
@@ -105,7 +112,7 @@ export declare const KProUpload: SFCWithInstall<DefineComponent<{
|
|
|
105
112
|
itemHeight: number | undefined;
|
|
106
113
|
disabled: boolean;
|
|
107
114
|
fileList: object[];
|
|
108
|
-
maxSize: number | undefined;
|
|
109
115
|
maxCount: number;
|
|
116
|
+
maxSize: number | undefined;
|
|
110
117
|
}, {}>>;
|
|
111
118
|
export default KProUpload;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { UploadProps } from 'ant-design-vue';
|
|
1
2
|
import { FileListType, UploadPropsType } from './types';
|
|
2
3
|
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
4
|
declare const _default: DefineComponent<{
|
|
4
5
|
uploadName: {
|
|
5
6
|
type: StringConstructor;
|
|
6
7
|
};
|
|
8
|
+
beforeUpload: {
|
|
9
|
+
type: PropType<UploadProps["beforeUpload"]>;
|
|
10
|
+
};
|
|
7
11
|
business: {
|
|
8
12
|
type: StringConstructor;
|
|
9
13
|
required: boolean;
|
|
@@ -52,6 +56,9 @@ declare const _default: DefineComponent<{
|
|
|
52
56
|
uploadName: {
|
|
53
57
|
type: StringConstructor;
|
|
54
58
|
};
|
|
59
|
+
beforeUpload: {
|
|
60
|
+
type: PropType<UploadProps["beforeUpload"]>;
|
|
61
|
+
};
|
|
55
62
|
business: {
|
|
56
63
|
type: StringConstructor;
|
|
57
64
|
required: boolean;
|
|
@@ -101,7 +108,7 @@ declare const _default: DefineComponent<{
|
|
|
101
108
|
itemHeight: number | undefined;
|
|
102
109
|
disabled: boolean;
|
|
103
110
|
fileList: object[];
|
|
104
|
-
maxSize: number | undefined;
|
|
105
111
|
maxCount: number;
|
|
112
|
+
maxSize: number | undefined;
|
|
106
113
|
}, {}>;
|
|
107
114
|
export default _default;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { UploadProps } from 'ant-design-vue/es/upload';
|
|
2
3
|
import { UploadPropsType } from './types';
|
|
3
4
|
export declare const UploadComponentProps: {
|
|
4
5
|
uploadName: {
|
|
5
6
|
type: StringConstructor;
|
|
6
7
|
};
|
|
8
|
+
beforeUpload: {
|
|
9
|
+
type: PropType<UploadProps["beforeUpload"]>;
|
|
10
|
+
};
|
|
7
11
|
business: {
|
|
8
12
|
type: StringConstructor;
|
|
9
13
|
required: boolean;
|