yahee-components 0.0.41 → 0.0.42
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, ref as d, reactive as j, onMounted as G, createElementBlock as c, openBlock as u, createVNode as n, withDirectives as A, createElementVNode as
|
|
1
|
+
import { defineComponent as $, ref as d, reactive as j, onMounted as G, createElementBlock as c, openBlock as u, createVNode as n, withDirectives as A, createElementVNode as i, unref as o, normalizeStyle as J, withCtx as x, createCommentVNode as w, Fragment as b, renderList as Q, normalizeClass as R, toDisplayString as f, vModelText as q, createTextVNode as W } from "vue";
|
|
2
2
|
import { CaretRight as X, CaretLeft as Z } from "@element-plus/icons-vue";
|
|
3
3
|
import { ElScrollbar as ee, ElIcon as B, ElButton as te, ElMessage as p } from "element-plus";
|
|
4
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
@@ -7,23 +7,23 @@ 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
9
|
import { useUpload as se } from "../packages/components/hooks/useUpload.js";
|
|
10
|
-
import { useFile as
|
|
11
|
-
import
|
|
10
|
+
import { useFile as ae } from "../packages/components/hooks/useImg.js";
|
|
11
|
+
import oe from "./operation-log-form.vue.js";
|
|
12
12
|
import E from "./operation-log-content.vue.js";
|
|
13
13
|
import ne from "./operation-log-dialog.vue.js";
|
|
14
14
|
import O from "../_virtual/dayjs.min.js";
|
|
15
15
|
import { M2 as r } from "../utils/translate.js";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
16
|
+
import ie from "../annex-upload/annex-upload.vue.js";
|
|
17
|
+
import le from "../packages/components/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js";
|
|
18
18
|
/* empty css */
|
|
19
19
|
import { insertGlobalnotes as S, findGlobalNotes as re } from "../packages/components/api/log/index.js";
|
|
20
|
-
const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue = { class: "content text-color-secondary" }, fe = { class: "date fontSize-12 pull-right text-color-a4" }, me = { class: "name" }, pe = { class: "name" }, ge = { class: "d-flex" }, ve = { class: "content text-color-secondary" }, he = { class: "date fontSize-12 text-color-a4" },
|
|
20
|
+
const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue = { class: "content text-color-secondary" }, fe = { class: "date fontSize-12 pull-right text-color-a4" }, me = { class: "name" }, pe = { class: "name" }, ge = { class: "d-flex" }, ve = { class: "content text-color-secondary" }, he = { class: "date fontSize-12 text-color-a4" }, ye = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "loading text-color-a4"
|
|
23
|
-
},
|
|
23
|
+
}, _e = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "no-more text-color-a4"
|
|
26
|
-
},
|
|
26
|
+
}, xe = ["placeholder"], be = { class: "d-flex text-right marginT10" }, ze = /* @__PURE__ */ $({
|
|
27
27
|
name: "YaheeOperationLog",
|
|
28
28
|
__name: "operation-log",
|
|
29
29
|
props: {
|
|
@@ -31,17 +31,17 @@ const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue
|
|
|
31
31
|
businessName: { default: "" }
|
|
32
32
|
},
|
|
33
33
|
setup(U) {
|
|
34
|
-
const m = U, g = d(!1),
|
|
34
|
+
const m = U, g = d(!1), L = d(!1), _ = d(!1), I = d({}), l = j({
|
|
35
35
|
List: [],
|
|
36
36
|
LoginId: 0
|
|
37
|
-
}), v = d(""), h = d([]),
|
|
37
|
+
}), v = d(""), h = d([]), a = {
|
|
38
38
|
PageIndex: -1,
|
|
39
39
|
StartOn: "",
|
|
40
40
|
EndOn: "",
|
|
41
41
|
Notes: "",
|
|
42
42
|
Mark: null,
|
|
43
43
|
UserIds: []
|
|
44
|
-
},
|
|
44
|
+
}, y = () => {
|
|
45
45
|
g.value = !0;
|
|
46
46
|
const e = new FormData();
|
|
47
47
|
e.append(
|
|
@@ -49,30 +49,30 @@ const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue
|
|
|
49
49
|
JSON.stringify({
|
|
50
50
|
BusinessKey: m.businessKey,
|
|
51
51
|
BusinessName: m.businessName,
|
|
52
|
-
PageIndex:
|
|
53
|
-
StartOn:
|
|
54
|
-
EndOn:
|
|
55
|
-
UserIds:
|
|
56
|
-
Notes:
|
|
57
|
-
Mark:
|
|
52
|
+
PageIndex: a.PageIndex,
|
|
53
|
+
StartOn: a.StartOn,
|
|
54
|
+
EndOn: a.EndOn,
|
|
55
|
+
UserIds: a.UserIds,
|
|
56
|
+
Notes: a.Notes,
|
|
57
|
+
Mark: a.Mark
|
|
58
58
|
})
|
|
59
59
|
), re(e).then((t) => {
|
|
60
60
|
var s;
|
|
61
|
-
|
|
61
|
+
l.LoginId = t.LoginId, a.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);
|
|
62
62
|
}).finally(() => {
|
|
63
63
|
g.value = !1;
|
|
64
64
|
});
|
|
65
65
|
}, N = () => {
|
|
66
|
-
g.value || (g.value = !0,
|
|
66
|
+
g.value || (g.value = !0, a.PageIndex += 1, y());
|
|
67
67
|
}, P = (e) => {
|
|
68
|
-
|
|
68
|
+
l.List = [], a.PageIndex = 0, a.StartOn = e.timeValue ? e.timeValue[0] : "", a.EndOn = e.timeValue ? e.timeValue[1] : "", a.UserIds = e.CreatedBy ? [e.CreatedBy] : [], a.Notes = e.search, a.Mark = e.Mark, y();
|
|
69
69
|
}, F = () => {
|
|
70
70
|
h.value.length > 0 && C(h.value[0]).then(async () => {
|
|
71
|
-
p.success(r("上传文件成功!")),
|
|
71
|
+
p.success(r("上传文件成功!")), a.PageIndex = 0, h.value = [], await y(), V();
|
|
72
72
|
});
|
|
73
73
|
}, T = (e) => {
|
|
74
74
|
C(e).then(() => {
|
|
75
|
-
p.success(r("上传文件成功!")),
|
|
75
|
+
p.success(r("上传文件成功!")), _.value = !1, a.PageIndex = 0, y();
|
|
76
76
|
});
|
|
77
77
|
}, C = (e) => {
|
|
78
78
|
const t = new FormData();
|
|
@@ -84,7 +84,7 @@ const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue
|
|
|
84
84
|
}
|
|
85
85
|
const e = new FormData();
|
|
86
86
|
e.append("BusinessKey", m.businessKey), e.append("BusinessName", m.businessName), e.append("notes", v.value), e.append("ViewTitle", "备注"), S(e).then(async () => {
|
|
87
|
-
p.success(r("添加备注成功!")),
|
|
87
|
+
p.success(r("添加备注成功!")), a.PageIndex = 0, v.value = "", await y(), V();
|
|
88
88
|
});
|
|
89
89
|
}, H = (e) => {
|
|
90
90
|
if (e.clipboardData || e.originalEvent) {
|
|
@@ -93,14 +93,14 @@ const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue
|
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
if (e.clipboardData.files.length > 0) {
|
|
96
|
-
|
|
96
|
+
_.value = !0;
|
|
97
97
|
for (let t = 0; t < e.clipboardData.files.length; t++) {
|
|
98
98
|
e.clipboardData.files[t].size / 1024 / 1024 < 100 || p.error(r("上传文件大小不能超过 100MB!"));
|
|
99
99
|
const { name: z } = e.clipboardData.files[t];
|
|
100
100
|
se("115", e.clipboardData.files[t]).then((K) => {
|
|
101
|
-
|
|
101
|
+
I.value = {
|
|
102
102
|
fileName: z || "",
|
|
103
|
-
fileUrl:
|
|
103
|
+
fileUrl: ae({ fileId: K[0] })
|
|
104
104
|
};
|
|
105
105
|
}).catch(() => {
|
|
106
106
|
});
|
|
@@ -115,91 +115,92 @@ const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue
|
|
|
115
115
|
const e = (t = document.getElementsByClassName("log-form")[0]) == null ? void 0 : t.clientHeight;
|
|
116
116
|
k.value = window.innerHeight - e - D.value.offsetHeight - 90, N();
|
|
117
117
|
}), (e, t) => (u(), c("div", de, [
|
|
118
|
-
n(
|
|
118
|
+
n(oe, {
|
|
119
119
|
ref: "logForm",
|
|
120
120
|
class: "text-right log-form",
|
|
121
121
|
"business-key": e.businessKey,
|
|
122
|
+
"business-name": e.businessName,
|
|
122
123
|
onFilterChange: P
|
|
123
|
-
}, null, 8, ["business-key"]),
|
|
124
|
-
n(
|
|
124
|
+
}, null, 8, ["business-key", "business-name"]),
|
|
125
|
+
n(o(ee), {
|
|
125
126
|
ref_key: "infiniteList",
|
|
126
127
|
ref: M,
|
|
127
128
|
class: "infinite-list-wrapper",
|
|
128
129
|
style: J({ height: k.value + "px" })
|
|
129
130
|
}, {
|
|
130
|
-
default:
|
|
131
|
-
(u(!0), c(
|
|
131
|
+
default: x(() => [
|
|
132
|
+
(u(!0), c(b, null, Q(l.List, (s) => (u(), c("div", {
|
|
132
133
|
key: s.Id,
|
|
133
|
-
class: R(
|
|
134
|
+
class: R(l.LoginId == s.CreatedBy ? "list-item-right" : "list-item-left")
|
|
134
135
|
}, [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
l.LoginId == s.CreatedBy ? (u(), c(b, { key: 0 }, [
|
|
137
|
+
i("div", null, [
|
|
138
|
+
i("div", ce, [
|
|
139
|
+
i("div", ue, [
|
|
139
140
|
n(E, {
|
|
140
|
-
id:
|
|
141
|
+
id: l.LoginId,
|
|
141
142
|
info: s
|
|
142
143
|
}, null, 8, ["id", "info"])
|
|
143
144
|
]),
|
|
144
|
-
n(
|
|
145
|
+
n(o(B), {
|
|
145
146
|
color: "#f1f1f1",
|
|
146
147
|
size: "20"
|
|
147
148
|
}, {
|
|
148
|
-
default:
|
|
149
|
-
n(
|
|
149
|
+
default: x(() => [
|
|
150
|
+
n(o(X))
|
|
150
151
|
]),
|
|
151
152
|
_: 1
|
|
152
153
|
})
|
|
153
154
|
]),
|
|
154
|
-
|
|
155
|
+
i("div", fe, f(o(O)(s.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")), 1)
|
|
155
156
|
]),
|
|
156
|
-
|
|
157
|
-
], 64)) : (u(), c(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
n(
|
|
157
|
+
i("div", me, f(s.CreatedName), 1)
|
|
158
|
+
], 64)) : (u(), c(b, { key: 1 }, [
|
|
159
|
+
i("div", pe, f(s.CreatedName), 1),
|
|
160
|
+
i("div", null, [
|
|
161
|
+
i("div", ge, [
|
|
162
|
+
n(o(B), {
|
|
162
163
|
color: "#ccc",
|
|
163
164
|
size: "20"
|
|
164
165
|
}, {
|
|
165
|
-
default:
|
|
166
|
-
n(
|
|
166
|
+
default: x(() => [
|
|
167
|
+
n(o(Z))
|
|
167
168
|
]),
|
|
168
169
|
_: 1
|
|
169
170
|
}),
|
|
170
|
-
|
|
171
|
+
i("div", ve, [
|
|
171
172
|
n(E, {
|
|
172
|
-
id:
|
|
173
|
+
id: l.LoginId,
|
|
173
174
|
info: s
|
|
174
175
|
}, null, 8, ["id", "info"])
|
|
175
176
|
])
|
|
176
177
|
]),
|
|
177
|
-
|
|
178
|
+
i("div", he, f(o(O)(s.CreatedOnStr).format("YYYY-MM-DD HH:mm:ss")), 1)
|
|
178
179
|
])
|
|
179
180
|
], 64))
|
|
180
181
|
], 2))), 128)),
|
|
181
|
-
n(
|
|
182
|
+
n(o(le), {
|
|
182
183
|
distance: 10,
|
|
183
184
|
onInfinite: N
|
|
184
185
|
}),
|
|
185
|
-
g.value ? (u(), c("div",
|
|
186
|
-
|
|
186
|
+
g.value ? (u(), c("div", ye, f(o(r)("加载中...")), 1)) : w("", !0),
|
|
187
|
+
L.value ? (u(), c("div", _e, f(o(r)("没有更多了!")), 1)) : w("", !0)
|
|
187
188
|
]),
|
|
188
189
|
_: 1
|
|
189
190
|
}, 8, ["style"]),
|
|
190
|
-
A(
|
|
191
|
+
A(i("textarea", {
|
|
191
192
|
ref_key: "logText",
|
|
192
193
|
ref: D,
|
|
193
194
|
"onUpdate:modelValue": t[0] || (t[0] = (s) => v.value = s),
|
|
194
195
|
class: "content-div",
|
|
195
|
-
placeholder:
|
|
196
|
+
placeholder: o(r)("可通过 Ctrl+V 直接上传图片/文件"),
|
|
196
197
|
contenteditable: "true",
|
|
197
198
|
onPaste: H
|
|
198
|
-
}, null, 40,
|
|
199
|
+
}, null, 40, xe), [
|
|
199
200
|
[q, v.value]
|
|
200
201
|
]),
|
|
201
|
-
|
|
202
|
-
n(
|
|
202
|
+
i("div", be, [
|
|
203
|
+
n(ie, {
|
|
203
204
|
modelValue: h.value,
|
|
204
205
|
"onUpdate:modelValue": t[1] || (t[1] = (s) => h.value = s),
|
|
205
206
|
"show-tips": !1,
|
|
@@ -207,22 +208,22 @@ const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue
|
|
|
207
208
|
accept: ".gif,.jpg,.png,.doc,.docx,.pdf,.xls,.xlsx,.ppt,.txt",
|
|
208
209
|
onChange: F
|
|
209
210
|
}, null, 8, ["modelValue"]),
|
|
210
|
-
n(
|
|
211
|
+
n(o(te), {
|
|
211
212
|
type: "success",
|
|
212
213
|
size: "small",
|
|
213
214
|
class: "marginL6",
|
|
214
215
|
onClick: t[2] || (t[2] = (s) => Y())
|
|
215
216
|
}, {
|
|
216
|
-
default:
|
|
217
|
-
W(f(
|
|
217
|
+
default: x(() => [
|
|
218
|
+
W(f(o(r)("添加备注")), 1)
|
|
218
219
|
]),
|
|
219
220
|
_: 1
|
|
220
221
|
})
|
|
221
222
|
]),
|
|
222
223
|
n(ne, {
|
|
223
|
-
modelValue:
|
|
224
|
-
"onUpdate:modelValue": t[3] || (t[3] = (s) =>
|
|
225
|
-
"doc-info":
|
|
224
|
+
modelValue: _.value,
|
|
225
|
+
"onUpdate:modelValue": t[3] || (t[3] = (s) => _.value = s),
|
|
226
|
+
"doc-info": I.value,
|
|
226
227
|
onConfirmUpload: T
|
|
227
228
|
}, null, 8, ["modelValue", "doc-info"])
|
|
228
229
|
]));
|