yahee-components 0.0.44 → 0.0.46
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/es/complex-search/complex-search.vue.js +61 -53
- package/es/operation-log/operation-log-content.vue.js +59 -55
- package/es/operation-log/operation-log.vue.js +86 -84
- package/es/utils/const.js +0 -1
- package/package.json +1 -1
- package/types/src/installs.d.ts +1 -0
- package/types/src/operation-log/index.d.ts +1 -0
- package/types/src/operation-log/operation-log-content.vue.d.ts +9 -0
- package/types/src/operation-log/operation-log.d.ts +2 -1
- package/types/src/operation-log/operation-log.vue.d.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as te, mergeDefaults as oe, toRefs as re, ref as
|
|
1
|
+
import { defineComponent as te, mergeDefaults as oe, toRefs as re, ref as d, createBlock as c, openBlock as r, unref as l, withCtx as t, createElementVNode as x, createVNode as o, withKeys as se, createSlots as ue, createElementBlock as y, Fragment as b, renderList as g, createCommentVNode as z, createTextVNode as C, toDisplayString as V } from "vue";
|
|
2
2
|
import F from "../_virtual/lodash.js";
|
|
3
|
-
import { defaultComplexSearchProps as
|
|
3
|
+
import { defaultComplexSearchProps as ne } from "./props.js";
|
|
4
4
|
import { ElConfigProvider as ie, ElInput as G, ElIcon as de, ElSelect as k, ElOption as S, ElCheckbox as ce, ElLink as me, ElDialog as pe, ElForm as he, ElRow as D, ElFormItem as L, ElButton as N } from "element-plus";
|
|
5
5
|
import "element-plus/theme-chalk/src/base.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/input.scss";
|
|
@@ -35,10 +35,10 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
35
35
|
normalOptions: {},
|
|
36
36
|
showSelect: { type: Boolean },
|
|
37
37
|
searchItem: {}
|
|
38
|
-
},
|
|
38
|
+
}, ne()),
|
|
39
39
|
emits: ["filterChangeGrandson"],
|
|
40
40
|
setup(R, { emit: W }) {
|
|
41
|
-
const q = ve,
|
|
41
|
+
const q = ve, p = W, X = R, {
|
|
42
42
|
defaultSearch: Y,
|
|
43
43
|
pasteFormat: T,
|
|
44
44
|
options: B,
|
|
@@ -49,7 +49,7 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
49
49
|
normalOptions: J,
|
|
50
50
|
showSelect: O,
|
|
51
51
|
searchItem: n
|
|
52
|
-
} = re(X),
|
|
52
|
+
} = re(X), s = d(Y.value || "integrated"), h = d(""), f = d(!1), w = d(!1), v = d(!1), U = d(null), u = d({ searchType: "integrated", searchContent: "" }), M = {
|
|
53
53
|
selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
|
|
54
54
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
55
55
|
}, I = [
|
|
@@ -58,51 +58,59 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
58
58
|
label: "综合搜索"
|
|
59
59
|
}
|
|
60
60
|
], Q = () => {
|
|
61
|
-
|
|
61
|
+
v.value = !0;
|
|
62
62
|
}, K = () => {
|
|
63
|
-
|
|
63
|
+
v.value = !1;
|
|
64
64
|
}, Z = () => {
|
|
65
|
-
|
|
65
|
+
f.value || (delete n.value.putSearch, p("filterChangeGrandson", n.value, s.value));
|
|
66
66
|
}, $ = () => n.value, E = () => {
|
|
67
|
-
|
|
68
|
-
}, ee = (
|
|
69
|
-
const e = { ...
|
|
70
|
-
return F.map(P.value, (
|
|
67
|
+
h.value ? le() : p("filterChangeGrandson", $(), s.value);
|
|
68
|
+
}, ee = (m, a) => {
|
|
69
|
+
const e = { ...m };
|
|
70
|
+
return F.map(P.value, (i) => i.key).includes(a.filterKey) ? P.value.forEach((i) => delete e[i.key]) : delete e[a.filterKey], e;
|
|
71
71
|
};
|
|
72
|
-
function _(
|
|
73
|
-
F.forEach(
|
|
72
|
+
function _(m) {
|
|
73
|
+
F.forEach(m, (a) => {
|
|
74
74
|
ee(n.value, a);
|
|
75
|
-
const { checkedValues: e, filterKey:
|
|
76
|
-
F.isEmpty(e) || (J.value.includes(
|
|
77
|
-
}),
|
|
75
|
+
const { checkedValues: e, filterKey: i } = a;
|
|
76
|
+
F.isEmpty(e) || (J.value.includes(i) ? n.value[i] = e[0] : n.value[i] = e);
|
|
77
|
+
}), p("filterChangeGrandson", n.value, s.value);
|
|
78
78
|
}
|
|
79
79
|
const le = () => {
|
|
80
|
-
|
|
80
|
+
f.value ? _([
|
|
81
81
|
{
|
|
82
82
|
filterKey: "putSearch",
|
|
83
|
-
checkedValues:
|
|
83
|
+
checkedValues: h.value
|
|
84
84
|
}
|
|
85
|
-
]) :
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
]) : p(
|
|
86
|
+
"filterChangeGrandson",
|
|
87
|
+
{
|
|
88
|
+
putSearch: h.value
|
|
89
|
+
},
|
|
90
|
+
s.value
|
|
91
|
+
);
|
|
88
92
|
}, ae = () => {
|
|
89
|
-
U.value.validate((
|
|
90
|
-
|
|
93
|
+
U.value.validate((m) => {
|
|
94
|
+
m && (w.value = !0, f.value ? _([
|
|
91
95
|
{
|
|
92
96
|
filterKey: "putSearch",
|
|
93
|
-
checkedValues:
|
|
97
|
+
checkedValues: u.value.searchContent
|
|
94
98
|
}
|
|
95
|
-
]) :
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
]) : p(
|
|
100
|
+
"filterChangeGrandson",
|
|
101
|
+
{
|
|
102
|
+
putSearch: u.value.searchContent
|
|
103
|
+
},
|
|
104
|
+
s.value
|
|
105
|
+
), v.value = !1, w.value = !1);
|
|
98
106
|
});
|
|
99
107
|
};
|
|
100
|
-
return (
|
|
108
|
+
return (m, a) => (r(), c(l(ie), { locale: l(q) }, {
|
|
101
109
|
default: t(() => [
|
|
102
110
|
x("div", ye, [
|
|
103
111
|
o(l(G), {
|
|
104
|
-
modelValue:
|
|
105
|
-
"onUpdate:modelValue": a[2] || (a[2] = (e) =>
|
|
112
|
+
modelValue: h.value,
|
|
113
|
+
"onUpdate:modelValue": a[2] || (a[2] = (e) => h.value = e),
|
|
106
114
|
placeholder: l(H),
|
|
107
115
|
class: "input-with-select",
|
|
108
116
|
clearable: "",
|
|
@@ -110,7 +118,7 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
110
118
|
onChange: E,
|
|
111
119
|
onKeyup: se(E, ["enter"]),
|
|
112
120
|
onPaste: l(T)
|
|
113
|
-
},
|
|
121
|
+
}, ue({
|
|
114
122
|
append: t(() => [
|
|
115
123
|
o(l(de), {
|
|
116
124
|
size: "12",
|
|
@@ -131,13 +139,13 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
131
139
|
name: "prepend",
|
|
132
140
|
fn: t(() => [
|
|
133
141
|
o(l(k), {
|
|
134
|
-
modelValue:
|
|
135
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) =>
|
|
142
|
+
modelValue: s.value,
|
|
143
|
+
"onUpdate:modelValue": a[0] || (a[0] = (e) => s.value = e),
|
|
136
144
|
size: "small",
|
|
137
145
|
class: "custom-select"
|
|
138
146
|
}, {
|
|
139
147
|
default: t(() => [
|
|
140
|
-
(r(!0), y(b, null, g(l(B), (e) => (r(),
|
|
148
|
+
(r(!0), y(b, null, g(l(B), (e) => (r(), c(l(S), {
|
|
141
149
|
key: e.label,
|
|
142
150
|
label: e.label,
|
|
143
151
|
value: e.value
|
|
@@ -151,8 +159,8 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
151
159
|
name: "prepend",
|
|
152
160
|
fn: t(() => [
|
|
153
161
|
o(l(k), {
|
|
154
|
-
modelValue:
|
|
155
|
-
"onUpdate:modelValue": a[1] || (a[1] = (e) =>
|
|
162
|
+
modelValue: s.value,
|
|
163
|
+
"onUpdate:modelValue": a[1] || (a[1] = (e) => s.value = e),
|
|
156
164
|
size: "small",
|
|
157
165
|
class: "custom-select",
|
|
158
166
|
disabled: ""
|
|
@@ -171,10 +179,10 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
171
179
|
}
|
|
172
180
|
]), 1032, ["modelValue", "placeholder", "onPaste"]),
|
|
173
181
|
x("div", be, [
|
|
174
|
-
l(A) ? (r(),
|
|
182
|
+
l(A) ? (r(), c(l(ce), {
|
|
175
183
|
key: 0,
|
|
176
|
-
modelValue:
|
|
177
|
-
"onUpdate:modelValue": a[3] || (a[3] = (e) =>
|
|
184
|
+
modelValue: f.value,
|
|
185
|
+
"onUpdate:modelValue": a[3] || (a[3] = (e) => f.value = e),
|
|
178
186
|
onChange: Z
|
|
179
187
|
}, {
|
|
180
188
|
default: t(() => a[8] || (a[8] = [
|
|
@@ -182,7 +190,7 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
182
190
|
])),
|
|
183
191
|
_: 1
|
|
184
192
|
}, 8, ["modelValue"])) : z("", !0),
|
|
185
|
-
l(j) ? (r(),
|
|
193
|
+
l(j) ? (r(), c(l(me), {
|
|
186
194
|
key: 1,
|
|
187
195
|
type: "primary",
|
|
188
196
|
onClick: Q
|
|
@@ -195,8 +203,8 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
195
203
|
])
|
|
196
204
|
]),
|
|
197
205
|
o(l(pe), {
|
|
198
|
-
modelValue:
|
|
199
|
-
"onUpdate:modelValue": a[7] || (a[7] = (e) =>
|
|
206
|
+
modelValue: v.value,
|
|
207
|
+
"onUpdate:modelValue": a[7] || (a[7] = (e) => v.value = e),
|
|
200
208
|
title: "批量查询",
|
|
201
209
|
width: "30%",
|
|
202
210
|
"before-close": K,
|
|
@@ -227,7 +235,7 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
227
235
|
o(l(he), {
|
|
228
236
|
ref_key: "batchSearchFormRef",
|
|
229
237
|
ref: U,
|
|
230
|
-
model:
|
|
238
|
+
model: u.value,
|
|
231
239
|
rules: M
|
|
232
240
|
}, {
|
|
233
241
|
default: t(() => [
|
|
@@ -235,25 +243,25 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
235
243
|
default: t(() => [
|
|
236
244
|
o(l(L), { prop: "searchType" }, {
|
|
237
245
|
default: t(() => [
|
|
238
|
-
l(O) ? (r(),
|
|
246
|
+
l(O) ? (r(), c(l(k), {
|
|
239
247
|
key: 0,
|
|
240
|
-
modelValue:
|
|
241
|
-
"onUpdate:modelValue": a[4] || (a[4] = (e) =>
|
|
248
|
+
modelValue: u.value.searchType,
|
|
249
|
+
"onUpdate:modelValue": a[4] || (a[4] = (e) => u.value.searchType = e),
|
|
242
250
|
size: "small",
|
|
243
251
|
style: { width: "95px", "background-color": "white" }
|
|
244
252
|
}, {
|
|
245
253
|
default: t(() => [
|
|
246
|
-
(r(!0), y(b, null, g(l(B), (e) => (r(),
|
|
254
|
+
(r(!0), y(b, null, g(l(B), (e) => (r(), c(l(S), {
|
|
247
255
|
key: e.label,
|
|
248
256
|
label: e.label,
|
|
249
257
|
value: e.value
|
|
250
258
|
}, null, 8, ["label", "value"]))), 128))
|
|
251
259
|
]),
|
|
252
260
|
_: 1
|
|
253
|
-
}, 8, ["modelValue"])) : (r(),
|
|
261
|
+
}, 8, ["modelValue"])) : (r(), c(l(k), {
|
|
254
262
|
key: 1,
|
|
255
|
-
modelValue:
|
|
256
|
-
"onUpdate:modelValue": a[5] || (a[5] = (e) =>
|
|
263
|
+
modelValue: u.value.searchType,
|
|
264
|
+
"onUpdate:modelValue": a[5] || (a[5] = (e) => u.value.searchType = e),
|
|
257
265
|
size: "small",
|
|
258
266
|
style: { width: "95px", "background-color": "white" },
|
|
259
267
|
disabled: ""
|
|
@@ -281,8 +289,8 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
|
|
|
281
289
|
}, {
|
|
282
290
|
default: t(() => [
|
|
283
291
|
o(l(G), {
|
|
284
|
-
modelValue:
|
|
285
|
-
"onUpdate:modelValue": a[6] || (a[6] = (e) =>
|
|
292
|
+
modelValue: u.value.searchContent,
|
|
293
|
+
"onUpdate:modelValue": a[6] || (a[6] = (e) => u.value.searchContent = e),
|
|
286
294
|
placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
|
|
287
295
|
type: "textarea",
|
|
288
296
|
rows: 5,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as h, computed as
|
|
1
|
+
import { defineComponent as h, computed as f, createElementBlock as n, openBlock as i, createElementVNode as t, normalizeClass as u, toDisplayString as s, createVNode as a, unref as o, createBlock as m, createCommentVNode as N, withCtx as g } from "vue";
|
|
2
2
|
import c from "../packages/components/hooks/useImgPath.js";
|
|
3
|
-
import { ElImage as
|
|
3
|
+
import { ElImage as k, ElIcon as v } from "element-plus";
|
|
4
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
5
5
|
import "element-plus/theme-chalk/src/image.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/image-viewer.scss";
|
|
7
|
-
import { Document as
|
|
8
|
-
const
|
|
7
|
+
import { Document as y } from "@element-plus/icons-vue";
|
|
8
|
+
const x = { key: 0 }, T = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "d-flex ai-end"
|
|
11
|
-
},
|
|
11
|
+
}, b = ["src"], w = ["href"], B = {
|
|
12
12
|
key: 2,
|
|
13
13
|
class: "d-flex ai-end"
|
|
14
|
-
},
|
|
14
|
+
}, C = ["src"], W = ["href"], D = {
|
|
15
15
|
key: 3,
|
|
16
16
|
class: "d-flex ai-end"
|
|
17
|
-
},
|
|
17
|
+
}, E = ["src"], H = ["href"], L = {
|
|
18
18
|
key: 4,
|
|
19
19
|
class: "d-flex ai-end"
|
|
20
|
-
},
|
|
20
|
+
}, M = ["src"], z = ["href"], I = {
|
|
21
21
|
key: 5,
|
|
22
22
|
class: "d-flex ai-end"
|
|
23
|
-
},
|
|
23
|
+
}, S = ["innerHTML"], V = ["innerHTML"], Q = /* @__PURE__ */ h({
|
|
24
24
|
__name: "operation-log-content",
|
|
25
25
|
props: {
|
|
26
26
|
info: {
|
|
@@ -31,70 +31,74 @@ const v = { key: 0 }, x = {
|
|
|
31
31
|
id: {
|
|
32
32
|
type: Number,
|
|
33
33
|
default: 0
|
|
34
|
+
},
|
|
35
|
+
ifShowDocument: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
34
38
|
}
|
|
35
39
|
},
|
|
36
|
-
setup(
|
|
37
|
-
const l =
|
|
38
|
-
return (
|
|
39
|
-
|
|
40
|
-
class: u(["fontsize-15 paddingB10 text-color-primary",
|
|
40
|
+
setup(e) {
|
|
41
|
+
const l = e, d = f(() => l.info.Notes.replace(/\n/g, "<br/>")), r = f(() => l.info.Notes.includes("http") ? l.info.Title.split(".")[0] : l.info.Title);
|
|
42
|
+
return (j, O) => (i(), n("div", null, [
|
|
43
|
+
t("div", {
|
|
44
|
+
class: u(["fontsize-15 paddingB10 text-color-primary", e.id == e.info.CreatedBy ? "d-flex" : ""])
|
|
41
45
|
}, s(r.value), 3),
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
e.info.Notes.includes(".jpg") && e.info.Notes.startsWith("http") ? (i(), n("div", x, [
|
|
47
|
+
a(o(k), {
|
|
44
48
|
class: "img",
|
|
45
|
-
src:
|
|
46
|
-
"preview-src-list": [
|
|
49
|
+
src: e.info.Notes,
|
|
50
|
+
"preview-src-list": [e.info.Notes]
|
|
47
51
|
}, null, 8, ["src", "preview-src-list"])
|
|
48
|
-
])) :
|
|
49
|
-
|
|
52
|
+
])) : e.info.Notes.includes(".word") && e.info.Notes.startsWith("http") ? (i(), n("div", T, [
|
|
53
|
+
t("img", {
|
|
50
54
|
src: o(c)("file-word.png")
|
|
51
|
-
}, null, 8,
|
|
52
|
-
|
|
53
|
-
href:
|
|
55
|
+
}, null, 8, b),
|
|
56
|
+
t("a", {
|
|
57
|
+
href: e.info.Notes,
|
|
54
58
|
target: "_blank"
|
|
55
|
-
}, s(
|
|
56
|
-
])) :
|
|
57
|
-
|
|
59
|
+
}, s(e.info.Title), 9, w)
|
|
60
|
+
])) : e.info.Notes.includes(".pdf") && e.info.Notes.startsWith("http") ? (i(), n("div", B, [
|
|
61
|
+
t("img", {
|
|
58
62
|
src: o(c)("pdf.png")
|
|
59
|
-
}, null, 8,
|
|
60
|
-
|
|
61
|
-
href:
|
|
63
|
+
}, null, 8, C),
|
|
64
|
+
t("a", {
|
|
65
|
+
href: e.info.Notes,
|
|
62
66
|
target: "_blank"
|
|
63
|
-
}, s(
|
|
64
|
-
])) :
|
|
65
|
-
|
|
67
|
+
}, s(e.info.Title), 9, W)
|
|
68
|
+
])) : e.info.Notes.includes(".ppt") && e.info.Notes.startsWith("http") ? (i(), n("div", D, [
|
|
69
|
+
t("img", {
|
|
66
70
|
src: o(c)("ppt.png")
|
|
67
|
-
}, null, 8,
|
|
68
|
-
|
|
69
|
-
href:
|
|
71
|
+
}, null, 8, E),
|
|
72
|
+
t("a", {
|
|
73
|
+
href: e.info.Notes,
|
|
70
74
|
target: "_blank"
|
|
71
|
-
}, s(
|
|
72
|
-
])) :
|
|
73
|
-
|
|
75
|
+
}, s(e.info.Title), 9, H)
|
|
76
|
+
])) : e.info.Notes.includes(".xls") && e.info.Notes.startsWith("http") ? (i(), n("div", L, [
|
|
77
|
+
t("img", {
|
|
74
78
|
src: o(c)("excel.png")
|
|
75
|
-
}, null, 8,
|
|
76
|
-
|
|
77
|
-
href:
|
|
79
|
+
}, null, 8, M),
|
|
80
|
+
t("a", {
|
|
81
|
+
href: e.info.Notes,
|
|
78
82
|
target: "_blank"
|
|
79
|
-
}, s(
|
|
80
|
-
])) :
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
}, s(e.info.Title), 9, z)
|
|
84
|
+
])) : e.info.Notes.includes("http") ? (i(), n("div", I, [
|
|
85
|
+
e.ifShowDocument ? (i(), m(o(v), {
|
|
86
|
+
key: 0,
|
|
87
|
+
size: "40"
|
|
88
|
+
}, {
|
|
89
|
+
default: g(() => [
|
|
90
|
+
a(o(y))
|
|
84
91
|
]),
|
|
85
92
|
_: 1
|
|
86
|
-
}),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
target: "_blank"
|
|
90
|
-
}, s(t.info.Title), 9, H)
|
|
91
|
-
])) : (n(), i("div", {
|
|
93
|
+
})) : N("", !0),
|
|
94
|
+
t("div", { innerHTML: d.value }, null, 8, S)
|
|
95
|
+
])) : (i(), n("div", {
|
|
92
96
|
key: 6,
|
|
93
|
-
innerHTML:
|
|
94
|
-
}, null, 8,
|
|
97
|
+
innerHTML: d.value
|
|
98
|
+
}, null, 8, V))
|
|
95
99
|
]));
|
|
96
100
|
}
|
|
97
101
|
});
|
|
98
102
|
export {
|
|
99
|
-
|
|
103
|
+
Q as default
|
|
100
104
|
};
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CaretRight as
|
|
3
|
-
import { ElScrollbar as
|
|
1
|
+
import { defineComponent as j, toRefs as G, ref as d, reactive as R, onMounted as A, createElementBlock as u, openBlock as f, createVNode as a, withDirectives as J, createElementVNode as i, unref as n, normalizeStyle as Q, withCtx as x, createCommentVNode as k, Fragment as b, renderList as q, normalizeClass as W, toDisplayString as m, vModelText as X, createTextVNode as Z } from "vue";
|
|
2
|
+
import { CaretRight as ee, CaretLeft as te } from "@element-plus/icons-vue";
|
|
3
|
+
import { ElScrollbar as se, ElIcon as B, ElButton as oe, ElMessage as p } from "element-plus";
|
|
4
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
5
5
|
import "element-plus/theme-chalk/src/badge.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/message.scss";
|
|
7
7
|
import "element-plus/theme-chalk/src/scrollbar.scss";
|
|
8
8
|
import "element-plus/theme-chalk/src/button.scss";
|
|
9
|
-
import { useUpload as
|
|
10
|
-
import { useFile as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
9
|
+
import { useUpload as ne } from "../packages/components/hooks/useUpload.js";
|
|
10
|
+
import { useFile as ae } from "../packages/components/hooks/useImg.js";
|
|
11
|
+
import ie from "./operation-log-form.vue.js";
|
|
12
|
+
import S from "./operation-log-content.vue.js";
|
|
13
|
+
import le from "./operation-log-dialog.vue.js";
|
|
14
|
+
import E from "../_virtual/dayjs.min.js";
|
|
15
15
|
import { M2 as r } from "../utils/translate.js";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
16
|
+
import re from "../annex-upload/annex-upload.vue.js";
|
|
17
|
+
import de from "../packages/components/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js";
|
|
18
18
|
/* empty css */
|
|
19
|
-
import { insertGlobalnotes as
|
|
20
|
-
const
|
|
19
|
+
import { insertGlobalnotes as O, findGlobalNotes as ce } from "../packages/components/api/log/index.js";
|
|
20
|
+
const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me = { class: "content text-color-secondary" }, pe = { class: "date fontSize-12 pull-right text-color-a4" }, ge = { class: "name" }, he = { class: "name" }, ve = { class: "d-flex" }, ye = { class: "content text-color-secondary" }, _e = { class: "date fontSize-12 text-color-a4" }, xe = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "loading text-color-a4"
|
|
23
|
-
},
|
|
23
|
+
}, be = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "no-more text-color-a4"
|
|
26
|
-
},
|
|
26
|
+
}, Le = ["placeholder"], Ie = { class: "d-flex text-right marginT10" }, $e = /* @__PURE__ */ j({
|
|
27
27
|
name: "YaheeOperationLog",
|
|
28
28
|
__name: "operation-log",
|
|
29
29
|
props: {
|
|
30
30
|
businessKey: { default: "" },
|
|
31
31
|
businessName: { default: "" },
|
|
32
|
-
topHeight: { default: 90 }
|
|
32
|
+
topHeight: { default: 90 },
|
|
33
|
+
ifShowDocument: { type: Boolean, default: !0 }
|
|
33
34
|
},
|
|
34
35
|
setup(U) {
|
|
35
|
-
const c = U, g = d(!1), L = d(!1), _ = d(!1), I = d({}), l =
|
|
36
|
+
const c = U, { ifShowDocument: H } = G(c), g = d(!1), L = d(!1), _ = d(!1), I = d({}), l = R({
|
|
36
37
|
List: [],
|
|
37
38
|
LoginId: 0
|
|
38
|
-
}),
|
|
39
|
+
}), h = d(""), v = d([]), o = {
|
|
39
40
|
PageIndex: -1,
|
|
40
41
|
StartOn: "",
|
|
41
42
|
EndOn: "",
|
|
@@ -57,7 +58,7 @@ const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue
|
|
|
57
58
|
Notes: o.Notes,
|
|
58
59
|
Mark: o.Mark
|
|
59
60
|
})
|
|
60
|
-
),
|
|
61
|
+
), ce(e).then((t) => {
|
|
61
62
|
var s;
|
|
62
63
|
l.LoginId = t.LoginId, o.PageIndex === 0 ? l.List = t.List || [] : l.List = [...l.List || [], ...t.List || []], ((s = t == null ? void 0 : t.List) == null ? void 0 : s.length) === 0 && (L.value = !0);
|
|
63
64
|
}).finally(() => {
|
|
@@ -65,29 +66,29 @@ const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue
|
|
|
65
66
|
});
|
|
66
67
|
}, N = () => {
|
|
67
68
|
g.value || (g.value = !0, o.PageIndex += 1, y());
|
|
68
|
-
},
|
|
69
|
+
}, P = (e) => {
|
|
69
70
|
l.List = [], o.PageIndex = 0, o.StartOn = e.timeValue ? e.timeValue[0] : "", o.EndOn = e.timeValue ? e.timeValue[1] : "", o.UserIds = e.CreatedBy ? [e.CreatedBy] : [], o.Notes = e.search, o.Mark = e.Mark, y();
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
p.success(r("上传文件成功!")), o.PageIndex = 0,
|
|
71
|
+
}, F = () => {
|
|
72
|
+
v.value.length > 0 && C(v.value[0]).then(async () => {
|
|
73
|
+
p.success(r("上传文件成功!")), o.PageIndex = 0, v.value = [], await y(), D();
|
|
73
74
|
});
|
|
74
|
-
},
|
|
75
|
+
}, T = (e) => {
|
|
75
76
|
C(e).then(() => {
|
|
76
77
|
p.success(r("上传文件成功!")), _.value = !1, o.PageIndex = 0, y();
|
|
77
78
|
});
|
|
78
79
|
}, C = (e) => {
|
|
79
80
|
const t = new FormData();
|
|
80
|
-
return t.append("BusinessKey", c.businessKey), t.append("BusinessName", c.businessName), t.append("notes", e.fileUrl), t.append("ViewTitle", e.fileName),
|
|
81
|
-
},
|
|
82
|
-
if (!
|
|
81
|
+
return t.append("BusinessKey", c.businessKey), t.append("BusinessName", c.businessName), t.append("notes", e.fileUrl), t.append("ViewTitle", e.fileName), O(t);
|
|
82
|
+
}, Y = () => {
|
|
83
|
+
if (!h.value) {
|
|
83
84
|
p.info(r("备注不能为空!"));
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
86
87
|
const e = new FormData();
|
|
87
|
-
e.append("BusinessKey", c.businessKey), e.append("BusinessName", c.businessName), e.append("notes",
|
|
88
|
-
p.success(r("添加备注成功!")), o.PageIndex = 0,
|
|
88
|
+
e.append("BusinessKey", c.businessKey), e.append("BusinessName", c.businessName), e.append("notes", h.value), e.append("ViewTitle", "备注"), O(e).then(async () => {
|
|
89
|
+
p.success(r("添加备注成功!")), o.PageIndex = 0, h.value = "", await y(), D();
|
|
89
90
|
});
|
|
90
|
-
},
|
|
91
|
+
}, z = (e) => {
|
|
91
92
|
if (e.clipboardData || e.originalEvent) {
|
|
92
93
|
if (e.clipboardData.items.length === 0) {
|
|
93
94
|
p.error(r("复制文件到剪切板失败,请点击按钮上传!"));
|
|
@@ -97,139 +98,140 @@ const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue
|
|
|
97
98
|
_.value = !0;
|
|
98
99
|
for (let t = 0; t < e.clipboardData.files.length; t++) {
|
|
99
100
|
e.clipboardData.files[t].size / 1024 / 1024 < 100 || p.error(r("上传文件大小不能超过 100MB!"));
|
|
100
|
-
const { name:
|
|
101
|
-
|
|
101
|
+
const { name: K } = e.clipboardData.files[t];
|
|
102
|
+
ne("115", e.clipboardData.files[t]).then(($) => {
|
|
102
103
|
I.value = {
|
|
103
|
-
fileName:
|
|
104
|
-
fileUrl:
|
|
104
|
+
fileName: K || "",
|
|
105
|
+
fileUrl: ae({ fileId: $[0] })
|
|
105
106
|
};
|
|
106
107
|
}).catch(() => {
|
|
107
108
|
});
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
return
|
|
112
|
+
}, w = d(null), D = () => {
|
|
113
|
+
w.value.scrollTo({ top: 0, behavior: "smooth" });
|
|
114
|
+
}, M = d(0), V = d(null);
|
|
115
|
+
return A(() => {
|
|
115
116
|
var t;
|
|
116
117
|
const e = (t = document.getElementsByClassName("log-form")[0]) == null ? void 0 : t.clientHeight;
|
|
117
|
-
|
|
118
|
-
}), (e, t) => (f(), u("div",
|
|
119
|
-
|
|
118
|
+
M.value = window.innerHeight - e - V.value.offsetHeight - c.topHeight, N();
|
|
119
|
+
}), (e, t) => (f(), u("div", ue, [
|
|
120
|
+
a(ie, {
|
|
120
121
|
ref: "logForm",
|
|
121
122
|
class: "text-right log-form",
|
|
122
123
|
"business-key": e.businessKey,
|
|
123
124
|
"business-name": e.businessName,
|
|
124
|
-
onFilterChange:
|
|
125
|
+
onFilterChange: P
|
|
125
126
|
}, null, 8, ["business-key", "business-name"]),
|
|
126
|
-
n(
|
|
127
|
+
a(n(se), {
|
|
127
128
|
ref_key: "infiniteList",
|
|
128
|
-
ref:
|
|
129
|
+
ref: w,
|
|
129
130
|
class: "infinite-list-wrapper",
|
|
130
|
-
style:
|
|
131
|
+
style: Q({ height: M.value + "px" })
|
|
131
132
|
}, {
|
|
132
133
|
default: x(() => [
|
|
133
|
-
(f(!0), u(b, null,
|
|
134
|
+
(f(!0), u(b, null, q(l.List, (s) => (f(), u("div", {
|
|
134
135
|
key: s.Id,
|
|
135
|
-
class:
|
|
136
|
+
class: W(l.LoginId == s.CreatedBy ? "list-item-right" : "list-item-left")
|
|
136
137
|
}, [
|
|
137
138
|
l.LoginId == s.CreatedBy ? (f(), u(b, { key: 0 }, [
|
|
138
139
|
i("div", null, [
|
|
139
|
-
i("div",
|
|
140
|
-
i("div",
|
|
141
|
-
|
|
140
|
+
i("div", fe, [
|
|
141
|
+
i("div", me, [
|
|
142
|
+
a(S, {
|
|
142
143
|
id: l.LoginId,
|
|
143
144
|
info: s
|
|
144
145
|
}, null, 8, ["id", "info"])
|
|
145
146
|
]),
|
|
146
|
-
n(
|
|
147
|
+
a(n(B), {
|
|
147
148
|
color: "#f1f1f1",
|
|
148
149
|
size: "20"
|
|
149
150
|
}, {
|
|
150
151
|
default: x(() => [
|
|
151
|
-
n(
|
|
152
|
+
a(n(ee))
|
|
152
153
|
]),
|
|
153
154
|
_: 1
|
|
154
155
|
})
|
|
155
156
|
]),
|
|
156
|
-
i("div",
|
|
157
|
+
i("div", pe, m(n(E)(s.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")), 1)
|
|
157
158
|
]),
|
|
158
|
-
i("div",
|
|
159
|
+
i("div", ge, m(s.CreatedName), 1)
|
|
159
160
|
], 64)) : (f(), u(b, { key: 1 }, [
|
|
160
|
-
i("div",
|
|
161
|
+
i("div", he, m(s.CreatedName), 1),
|
|
161
162
|
i("div", null, [
|
|
162
|
-
i("div",
|
|
163
|
-
n(
|
|
163
|
+
i("div", ve, [
|
|
164
|
+
a(n(B), {
|
|
164
165
|
color: "#ccc",
|
|
165
166
|
size: "20"
|
|
166
167
|
}, {
|
|
167
168
|
default: x(() => [
|
|
168
|
-
n(
|
|
169
|
+
a(n(te))
|
|
169
170
|
]),
|
|
170
171
|
_: 1
|
|
171
172
|
}),
|
|
172
|
-
i("div",
|
|
173
|
-
|
|
173
|
+
i("div", ye, [
|
|
174
|
+
a(S, {
|
|
174
175
|
id: l.LoginId,
|
|
175
|
-
info: s
|
|
176
|
-
|
|
176
|
+
info: s,
|
|
177
|
+
"if-show-document": n(H)
|
|
178
|
+
}, null, 8, ["id", "info", "if-show-document"])
|
|
177
179
|
])
|
|
178
180
|
]),
|
|
179
|
-
i("div",
|
|
181
|
+
i("div", _e, m(n(E)(s.CreatedOnStr).format("YYYY-MM-DD HH:mm:ss")), 1)
|
|
180
182
|
])
|
|
181
183
|
], 64))
|
|
182
184
|
], 2))), 128)),
|
|
183
|
-
n(
|
|
185
|
+
a(n(de), {
|
|
184
186
|
distance: 10,
|
|
185
187
|
onInfinite: N
|
|
186
188
|
}),
|
|
187
|
-
g.value ? (f(), u("div",
|
|
188
|
-
L.value ? (f(), u("div",
|
|
189
|
+
g.value ? (f(), u("div", xe, m(n(r)("加载中...")), 1)) : k("", !0),
|
|
190
|
+
L.value ? (f(), u("div", be, m(n(r)("没有更多了!")), 1)) : k("", !0)
|
|
189
191
|
]),
|
|
190
192
|
_: 1
|
|
191
193
|
}, 8, ["style"]),
|
|
192
|
-
|
|
194
|
+
J(i("textarea", {
|
|
193
195
|
ref_key: "logText",
|
|
194
|
-
ref:
|
|
195
|
-
"onUpdate:modelValue": t[0] || (t[0] = (s) =>
|
|
196
|
+
ref: V,
|
|
197
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => h.value = s),
|
|
196
198
|
class: "content-div",
|
|
197
|
-
placeholder:
|
|
199
|
+
placeholder: n(r)("可通过 Ctrl+V 直接上传图片/文件"),
|
|
198
200
|
contenteditable: "true",
|
|
199
|
-
onPaste:
|
|
200
|
-
}, null, 40,
|
|
201
|
-
[
|
|
201
|
+
onPaste: z
|
|
202
|
+
}, null, 40, Le), [
|
|
203
|
+
[X, h.value]
|
|
202
204
|
]),
|
|
203
|
-
i("div",
|
|
204
|
-
|
|
205
|
-
modelValue:
|
|
206
|
-
"onUpdate:modelValue": t[1] || (t[1] = (s) =>
|
|
205
|
+
i("div", Ie, [
|
|
206
|
+
a(re, {
|
|
207
|
+
modelValue: v.value,
|
|
208
|
+
"onUpdate:modelValue": t[1] || (t[1] = (s) => v.value = s),
|
|
207
209
|
"show-tips": !1,
|
|
208
210
|
"show-list": !1,
|
|
209
211
|
accept: ".gif,.jpg,.png,.doc,.docx,.pdf,.xls,.xlsx,.ppt,.txt",
|
|
210
|
-
onChange:
|
|
212
|
+
onChange: F
|
|
211
213
|
}, null, 8, ["modelValue"]),
|
|
212
|
-
n(
|
|
214
|
+
a(n(oe), {
|
|
213
215
|
type: "success",
|
|
214
216
|
size: "small",
|
|
215
217
|
class: "marginL6",
|
|
216
|
-
onClick: t[2] || (t[2] = (s) =>
|
|
218
|
+
onClick: t[2] || (t[2] = (s) => Y())
|
|
217
219
|
}, {
|
|
218
220
|
default: x(() => [
|
|
219
|
-
|
|
221
|
+
Z(m(n(r)("添加备注")), 1)
|
|
220
222
|
]),
|
|
221
223
|
_: 1
|
|
222
224
|
})
|
|
223
225
|
]),
|
|
224
|
-
|
|
226
|
+
a(le, {
|
|
225
227
|
modelValue: _.value,
|
|
226
228
|
"onUpdate:modelValue": t[3] || (t[3] = (s) => _.value = s),
|
|
227
229
|
"doc-info": I.value,
|
|
228
|
-
onConfirmUpload:
|
|
230
|
+
onConfirmUpload: T
|
|
229
231
|
}, null, 8, ["modelValue", "doc-info"])
|
|
230
232
|
]));
|
|
231
233
|
}
|
|
232
234
|
});
|
|
233
235
|
export {
|
|
234
|
-
|
|
236
|
+
$e as default
|
|
235
237
|
};
|
package/es/utils/const.js
CHANGED
package/package.json
CHANGED
package/types/src/installs.d.ts
CHANGED
|
@@ -145,6 +145,7 @@ declare const _default: (( SFCWithInstall<DefineComponent<InputProps, {
|
|
|
145
145
|
})> & Record<string, any>) | ( SFCWithInstall<DefineComponent<OperationLogProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< OperationLogProps> & Readonly<{}>, {
|
|
146
146
|
businessKey: string;
|
|
147
147
|
businessName: string;
|
|
148
|
+
ifShowDocument: boolean;
|
|
148
149
|
topHeight: number;
|
|
149
150
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>> & Record<string, any>) | ( SFCWithInstall<{
|
|
150
151
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< AnnexUploadProps> & Readonly<{
|
|
@@ -4,6 +4,7 @@ import { OperationLogProps } from './operation-log';
|
|
|
4
4
|
export declare const YaheeOperationLog: SFCWithInstall<DefineComponent<OperationLogProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< OperationLogProps> & Readonly<{}>, {
|
|
5
5
|
businessKey: string;
|
|
6
6
|
businessName: string;
|
|
7
|
+
ifShowDocument: boolean;
|
|
7
8
|
topHeight: number;
|
|
8
9
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>> & Record<string, any>;
|
|
9
10
|
export default YaheeOperationLog;
|
|
@@ -8,6 +8,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
8
8
|
type: NumberConstructor;
|
|
9
9
|
default: number;
|
|
10
10
|
};
|
|
11
|
+
ifShowDocument: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
11
15
|
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
12
16
|
info: {
|
|
13
17
|
type: ObjectConstructor;
|
|
@@ -17,8 +21,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
17
21
|
type: NumberConstructor;
|
|
18
22
|
default: number;
|
|
19
23
|
};
|
|
24
|
+
ifShowDocument: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
20
28
|
}>> & Readonly<{}>, {
|
|
21
29
|
id: number;
|
|
22
30
|
info: Record<string, any>;
|
|
31
|
+
ifShowDocument: boolean;
|
|
23
32
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
24
33
|
export default _default;
|
|
@@ -3,6 +3,7 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
3
3
|
declare const _default: DefineComponent<OperationLogProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<OperationLogProps> & Readonly<{}>, {
|
|
4
4
|
businessKey: string;
|
|
5
5
|
businessName: string;
|
|
6
|
+
ifShowDocument: boolean;
|
|
6
7
|
topHeight: number;
|
|
7
8
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
8
9
|
export default _default;
|