yahee-components 0.0.75 → 0.0.81
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/annex-upload/annex-upload.vue.js +51 -154
- package/es/annex-upload/annex-upload.vue2.js +119 -2
- package/es/annex-upload/index.js +3 -3
- package/es/api/server.js +24 -19
- package/es/api/tool.js +31 -28
- package/es/border-wrap/border-wrap.vue.js +64 -95
- package/es/border-wrap/border-wrap.vue2.js +46 -2
- package/es/common-import/common-import.vue.js +369 -640
- package/es/common-import/common-import.vue2.js +328 -2
- package/es/common-import/index.js +3 -3
- package/es/common-import/props.js +4 -1
- package/es/complex-search/complex-search.vue.js +15 -15
- package/es/copy/copy.vue.js +37 -55
- package/es/copy/copy.vue2.js +34 -2
- package/es/copy/index.js +3 -3
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +114 -213
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +125 -2
- package/es/drop-down-condition/drop-down-condition.vue.js +113 -213
- package/es/drop-down-condition/drop-down-condition.vue2.js +127 -2
- package/es/echart-gauge/echart-gauge.vue.js +12 -140
- package/es/echart-gauge/echart-gauge.vue2.js +147 -2
- package/es/echart-gauge/index.js +3 -3
- package/es/image-upload/image-upload.vue.js +109 -170
- package/es/image-upload/image-upload.vue2.js +91 -2
- package/es/image-upload/index.js +3 -3
- package/es/input/index.js +3 -3
- package/es/input/input.vue.js +17 -38
- package/es/input/input.vue2.js +33 -2
- package/es/left-condition/index.js +3 -3
- package/es/left-condition/left-condition-sub.vue.js +32 -91
- package/es/left-condition/left-condition-sub.vue2.js +76 -2
- package/es/left-condition/left-condition.vue.js +70 -218
- package/es/left-condition/left-condition.vue2.js +160 -2
- package/es/left-condition-enum/index.js +3 -3
- package/es/left-condition-enum/left-condition-enum.vue.js +20 -49
- package/es/left-condition-enum/left-condition-enum.vue2.js +40 -2
- package/es/operation-log/operation-log-content.vue.js +71 -92
- package/es/operation-log/operation-log-content.vue2.js +39 -2
- package/es/operation-log/operation-log-dialog.vue.js +46 -68
- package/es/operation-log/operation-log-dialog.vue2.js +38 -2
- package/es/operation-log/operation-log-form.vue.js +108 -183
- package/es/operation-log/operation-log-form.vue2.js +104 -2
- package/es/operation-log/operation-log.vue.js +119 -228
- package/es/operation-log/operation-log.vue2.js +135 -2
- package/es/packages/components/api/log-server.js +6 -6
- package/es/packages/components/api/server.js +18 -20
- package/es/packages/components/api/tool.js +35 -32
- package/es/packages/components/api/upload-server.js +1 -1
- package/es/packages/components/hooks/useEcharts.js +19 -19
- package/es/packages/components/hooks/useImg.js +8 -8
- package/es/scale-screen/index.js +4 -4
- package/es/scale-screen/scale-screen.vue.js +19 -126
- package/es/scale-screen/scale-screen.vue2.js +125 -2
- package/es/utils/translate.js +21 -21
- package/package.json +46 -46
- package/readme.md +249 -249
- package/types/src/common-import/common-import.vue.d.ts +10 -0
- package/types/src/common-import/index.d.ts +25 -0
- package/types/src/common-import/props.d.ts +19 -0
- package/types/src/installs.d.ts +25 -0
- package/types/src/left-condition-enum/left-condition-enum.d.ts +3 -0
- package/es/packages/components/api/common/index.js +0 -7
|
@@ -1,238 +1,129 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import "element-plus/theme-chalk/src/badge.scss";
|
|
6
|
-
import "element-plus/theme-chalk/src/message.scss";
|
|
7
|
-
import "element-plus/theme-chalk/src/scrollbar.scss";
|
|
8
|
-
import "element-plus/theme-chalk/src/button.scss";
|
|
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 E from "./operation-log-content.vue.js";
|
|
13
|
-
import le from "./operation-log-dialog.vue.js";
|
|
14
|
-
import O from "../_virtual/dayjs.min.js";
|
|
15
|
-
import { M2 as r } from "../utils/translate.js";
|
|
16
|
-
import re from "../annex-upload/annex-upload.vue.js";
|
|
17
|
-
import de from "../node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js";
|
|
18
|
-
/* empty css */
|
|
19
|
-
import { insertGlobalnotes as U, 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 = {
|
|
1
|
+
import m from "./operation-log.vue2.js";
|
|
2
|
+
import { createElementBlock as l, openBlock as a, createVNode as n, withDirectives as g, createElementVNode as t, normalizeStyle as h, withCtx as s, createCommentVNode as f, Fragment as r, renderList as _, normalizeClass as x, toDisplayString as d, vModelText as y, createTextVNode as v } from "vue";
|
|
3
|
+
import L from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const C = { class: "yahee-operation-log" }, w = { class: "d-flex jc-end" }, D = { class: "content text-color-secondary" }, V = { class: "date fontSize-12 pull-right text-color-a4" }, k = { class: "name" }, b = { class: "name" }, I = { class: "d-flex" }, M = { class: "content text-color-secondary" }, S = { class: "date fontSize-12 text-color-a4" }, Y = {
|
|
21
5
|
key: 0,
|
|
22
6
|
class: "loading text-color-a4"
|
|
23
|
-
},
|
|
7
|
+
}, z = {
|
|
24
8
|
key: 1,
|
|
25
9
|
class: "no-more text-color-a4"
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
StartOn: o.StartOn,
|
|
56
|
-
EndOn: o.EndOn,
|
|
57
|
-
UserIds: o.UserIds,
|
|
58
|
-
Notes: o.Notes,
|
|
59
|
-
Mark: o.Mark
|
|
60
|
-
})
|
|
61
|
-
), ce(e).then((t) => {
|
|
62
|
-
var s;
|
|
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 && (I.value = !0);
|
|
64
|
-
}).finally(() => {
|
|
65
|
-
g.value = !1;
|
|
66
|
-
});
|
|
67
|
-
}, w = () => {
|
|
68
|
-
g.value || (g.value = !0, o.PageIndex += 1, y());
|
|
69
|
-
}, P = (e) => {
|
|
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();
|
|
71
|
-
}, F = () => {
|
|
72
|
-
v.value.length > 0 && C(v.value[0]).then(async () => {
|
|
73
|
-
p.success(r("上传文件成功!")), o.PageIndex = 0, v.value = [], await y(), M();
|
|
74
|
-
});
|
|
75
|
-
}, T = (e) => {
|
|
76
|
-
C(e).then(() => {
|
|
77
|
-
p.success(r("上传文件成功!")), _.value = !1, o.PageIndex = 0, y();
|
|
78
|
-
});
|
|
79
|
-
}, C = (e) => {
|
|
80
|
-
const t = new FormData();
|
|
81
|
-
return t.append("BusinessKey", c.businessKey), t.append("BusinessName", c.businessName), t.append("notes", e.fileUrl), t.append("ViewTitle", e.fileName), U(t);
|
|
82
|
-
}, Y = () => {
|
|
83
|
-
if (!h.value) {
|
|
84
|
-
p.info(r("备注不能为空!"));
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
const e = new FormData();
|
|
88
|
-
e.append("BusinessKey", c.businessKey), e.append("BusinessName", c.businessName), e.append("notes", h.value), e.append("ViewTitle", "备注"), U(e).then(async () => {
|
|
89
|
-
p.success(r("添加备注成功!")), o.PageIndex = 0, h.value = "", await y(), M();
|
|
90
|
-
});
|
|
91
|
-
}, z = (e) => {
|
|
92
|
-
if (e.clipboardData || e.originalEvent) {
|
|
93
|
-
if (e.clipboardData.items.length === 0) {
|
|
94
|
-
p.error(r("复制文件到剪切板失败,请点击按钮上传!"));
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
if (e.clipboardData.files.length > 0) {
|
|
98
|
-
_.value = !0;
|
|
99
|
-
for (let t = 0; t < e.clipboardData.files.length; t++) {
|
|
100
|
-
e.clipboardData.files[t].size / 1024 / 1024 < 100 || p.error(r("上传文件大小不能超过 100MB!"));
|
|
101
|
-
const { name: K } = e.clipboardData.files[t];
|
|
102
|
-
ne("115", e.clipboardData.files[t]).then(($) => {
|
|
103
|
-
N.value = {
|
|
104
|
-
fileName: K || "",
|
|
105
|
-
fileUrl: ae({ fileId: $[0] })
|
|
106
|
-
};
|
|
107
|
-
}).catch(() => {
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}, D = d(null), M = () => {
|
|
113
|
-
D.value.scrollTo({ top: 0, behavior: "smooth" });
|
|
114
|
-
}, V = d(0), k = d(null);
|
|
115
|
-
return A(() => {
|
|
116
|
-
var t;
|
|
117
|
-
const e = (t = document.getElementsByClassName("log-form")[0]) == null ? void 0 : t.clientHeight;
|
|
118
|
-
V.value = window.innerHeight - e - k.value.offsetHeight - c.topHeight, w();
|
|
119
|
-
}), (e, t) => (f(), u("div", ue, [
|
|
120
|
-
a(ie, {
|
|
121
|
-
ref: "logForm",
|
|
122
|
-
class: "text-right log-form",
|
|
123
|
-
"business-key": e.businessKey,
|
|
124
|
-
"business-name": e.businessName,
|
|
125
|
-
onFilterChange: P
|
|
126
|
-
}, null, 8, ["business-key", "business-name"]),
|
|
127
|
-
a(n(se), {
|
|
128
|
-
ref_key: "infiniteList",
|
|
129
|
-
ref: D,
|
|
130
|
-
class: "infinite-list-wrapper",
|
|
131
|
-
style: Q({ height: V.value + "px" })
|
|
132
|
-
}, {
|
|
133
|
-
default: x(() => [
|
|
134
|
-
(f(!0), u(b, null, q(l.List, (s) => (f(), u("div", {
|
|
135
|
-
key: s.Id,
|
|
136
|
-
class: W(l.LoginId == s.CreatedBy ? "list-item-right" : "list-item-left")
|
|
137
|
-
}, [
|
|
138
|
-
l.LoginId == s.CreatedBy ? (f(), u(b, { key: 0 }, [
|
|
139
|
-
i("div", null, [
|
|
140
|
-
i("div", fe, [
|
|
141
|
-
i("div", me, [
|
|
142
|
-
a(E, {
|
|
143
|
-
id: l.LoginId,
|
|
144
|
-
info: s,
|
|
145
|
-
"if-show-document": n(L)
|
|
146
|
-
}, null, 8, ["id", "info", "if-show-document"])
|
|
147
|
-
]),
|
|
148
|
-
a(n(S), {
|
|
149
|
-
color: "#f1f1f1",
|
|
150
|
-
size: "20"
|
|
151
|
-
}, {
|
|
152
|
-
default: x(() => [
|
|
153
|
-
a(n(ee))
|
|
154
|
-
]),
|
|
155
|
-
_: 1
|
|
156
|
-
})
|
|
10
|
+
}, E = ["placeholder"], N = { class: "d-flex text-right marginT10" };
|
|
11
|
+
function O(F, i, c, o, T, U) {
|
|
12
|
+
return a(), l("div", C, [
|
|
13
|
+
n(o.OperationLogForm, {
|
|
14
|
+
ref: "logForm",
|
|
15
|
+
class: "text-right log-form",
|
|
16
|
+
"business-key": c.businessKey,
|
|
17
|
+
"business-name": c.businessName,
|
|
18
|
+
onFilterChange: o.filterChange
|
|
19
|
+
}, null, 8, ["business-key", "business-name"]),
|
|
20
|
+
n(o.ElScrollbar, {
|
|
21
|
+
ref: "infiniteList",
|
|
22
|
+
class: "infinite-list-wrapper",
|
|
23
|
+
style: h({ height: o.boxHeight + "px" })
|
|
24
|
+
}, {
|
|
25
|
+
default: s(() => [
|
|
26
|
+
(a(!0), l(r, null, _(o.dataList.List, (e) => (a(), l("div", {
|
|
27
|
+
key: e.Id,
|
|
28
|
+
class: x(o.dataList.LoginId == e.CreatedBy ? "list-item-right" : "list-item-left")
|
|
29
|
+
}, [
|
|
30
|
+
o.dataList.LoginId == e.CreatedBy ? (a(), l(r, { key: 0 }, [
|
|
31
|
+
t("div", null, [
|
|
32
|
+
t("div", w, [
|
|
33
|
+
t("div", D, [
|
|
34
|
+
n(o.OperationLogContent, {
|
|
35
|
+
id: o.dataList.LoginId,
|
|
36
|
+
info: e,
|
|
37
|
+
"if-show-document": o.ifShowDocument
|
|
38
|
+
}, null, 8, ["id", "info", "if-show-document"])
|
|
157
39
|
]),
|
|
158
|
-
|
|
40
|
+
n(o.ElIcon, {
|
|
41
|
+
color: "#f1f1f1",
|
|
42
|
+
size: "20"
|
|
43
|
+
}, {
|
|
44
|
+
default: s(() => [
|
|
45
|
+
n(o.CaretRight)
|
|
46
|
+
]),
|
|
47
|
+
_: 1
|
|
48
|
+
})
|
|
159
49
|
]),
|
|
160
|
-
|
|
161
|
-
]
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
])
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
50
|
+
t("div", V, d(o.dayjs(e.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")), 1)
|
|
51
|
+
]),
|
|
52
|
+
t("div", k, d(e.CreatedName), 1)
|
|
53
|
+
], 64)) : (a(), l(r, { key: 1 }, [
|
|
54
|
+
t("div", b, d(e.CreatedName), 1),
|
|
55
|
+
t("div", null, [
|
|
56
|
+
t("div", I, [
|
|
57
|
+
n(o.ElIcon, {
|
|
58
|
+
color: "#ccc",
|
|
59
|
+
size: "20"
|
|
60
|
+
}, {
|
|
61
|
+
default: s(() => [
|
|
62
|
+
n(o.CaretLeft)
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}),
|
|
66
|
+
t("div", M, [
|
|
67
|
+
n(o.OperationLogContent, {
|
|
68
|
+
id: o.dataList.LoginId,
|
|
69
|
+
info: e,
|
|
70
|
+
"if-show-document": o.ifShowDocument
|
|
71
|
+
}, null, 8, ["id", "info", "if-show-document"])
|
|
72
|
+
])
|
|
73
|
+
]),
|
|
74
|
+
t("div", S, d(o.dayjs(e.CreatedOnStr).format("YYYY-MM-DD HH:mm:ss")), 1)
|
|
75
|
+
])
|
|
76
|
+
], 64))
|
|
77
|
+
], 2))), 128)),
|
|
78
|
+
n(o.InfiniteLoading, {
|
|
79
|
+
distance: 10,
|
|
80
|
+
onInfinite: o.load
|
|
81
|
+
}),
|
|
82
|
+
o.loading ? (a(), l("div", Y, d(o.M2("加载中...")), 1)) : f("", !0),
|
|
83
|
+
o.noMore ? (a(), l("div", z, d(o.M2("没有更多了!")), 1)) : f("", !0)
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}, 8, ["style"]),
|
|
87
|
+
g(t("textarea", {
|
|
88
|
+
ref: "logText",
|
|
89
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => o.textareaText = e),
|
|
90
|
+
class: "content-div",
|
|
91
|
+
placeholder: o.M2("可通过 Ctrl+V 直接上传图片/文件"),
|
|
92
|
+
contenteditable: "true",
|
|
93
|
+
onPaste: o.handlePaste
|
|
94
|
+
}, null, 40, E), [
|
|
95
|
+
[y, o.textareaText]
|
|
96
|
+
]),
|
|
97
|
+
t("div", N, [
|
|
98
|
+
n(o.YaheeAnnexUpload, {
|
|
99
|
+
modelValue: o.compAnalysisFile,
|
|
100
|
+
"onUpdate:modelValue": i[1] || (i[1] = (e) => o.compAnalysisFile = e),
|
|
101
|
+
"show-tips": !1,
|
|
102
|
+
"show-list": !1,
|
|
103
|
+
accept: ".gif,.jpg,.png,.doc,.docx,.pdf,.xls,.xlsx,.ppt,.txt",
|
|
104
|
+
onChange: o.change
|
|
105
|
+
}, null, 8, ["modelValue"]),
|
|
106
|
+
n(o.ElButton, {
|
|
107
|
+
type: "success",
|
|
108
|
+
size: "small",
|
|
109
|
+
class: "marginL6",
|
|
110
|
+
onClick: i[2] || (i[2] = (e) => o.sendEditQuill())
|
|
111
|
+
}, {
|
|
112
|
+
default: s(() => [
|
|
113
|
+
v(d(o.M2("添加备注")), 1)
|
|
192
114
|
]),
|
|
193
115
|
_: 1
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
]),
|
|
206
|
-
i("div", Ie, [
|
|
207
|
-
a(re, {
|
|
208
|
-
modelValue: v.value,
|
|
209
|
-
"onUpdate:modelValue": t[1] || (t[1] = (s) => v.value = s),
|
|
210
|
-
"show-tips": !1,
|
|
211
|
-
"show-list": !1,
|
|
212
|
-
accept: ".gif,.jpg,.png,.doc,.docx,.pdf,.xls,.xlsx,.ppt,.txt",
|
|
213
|
-
onChange: F
|
|
214
|
-
}, null, 8, ["modelValue"]),
|
|
215
|
-
a(n(oe), {
|
|
216
|
-
type: "success",
|
|
217
|
-
size: "small",
|
|
218
|
-
class: "marginL6",
|
|
219
|
-
onClick: t[2] || (t[2] = (s) => Y())
|
|
220
|
-
}, {
|
|
221
|
-
default: x(() => [
|
|
222
|
-
Z(m(n(r)("添加备注")), 1)
|
|
223
|
-
]),
|
|
224
|
-
_: 1
|
|
225
|
-
})
|
|
226
|
-
]),
|
|
227
|
-
a(le, {
|
|
228
|
-
modelValue: _.value,
|
|
229
|
-
"onUpdate:modelValue": t[3] || (t[3] = (s) => _.value = s),
|
|
230
|
-
"doc-info": N.value,
|
|
231
|
-
onConfirmUpload: T
|
|
232
|
-
}, null, 8, ["modelValue", "doc-info"])
|
|
233
|
-
]));
|
|
234
|
-
}
|
|
235
|
-
});
|
|
116
|
+
})
|
|
117
|
+
]),
|
|
118
|
+
n(o.OperationLogDialog, {
|
|
119
|
+
modelValue: o.showDialog,
|
|
120
|
+
"onUpdate:modelValue": i[3] || (i[3] = (e) => o.showDialog = e),
|
|
121
|
+
"doc-info": o.docInfo,
|
|
122
|
+
onConfirmUpload: o.confirmUpload
|
|
123
|
+
}, null, 8, ["modelValue", "doc-info"])
|
|
124
|
+
]);
|
|
125
|
+
}
|
|
126
|
+
const H = /* @__PURE__ */ L(m, [["render", O], ["__file", "D:/projects/frontend/common/common_componentsweb/packages/components/src/operation-log/operation-log.vue"]]);
|
|
236
127
|
export {
|
|
237
|
-
|
|
128
|
+
H as default
|
|
238
129
|
};
|
|
@@ -1,4 +1,137 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as _, toRefs as F, ref as o, reactive as H, onMounted as K } from "vue";
|
|
2
|
+
import { CaretLeft as T, CaretRight as V } from "@element-plus/icons-vue";
|
|
3
|
+
import { ElMessage as l, ElButton as k, ElIcon as q, ElScrollbar as j } from "element-plus";
|
|
4
|
+
import "element-plus/theme-chalk/src/base.scss";
|
|
5
|
+
import "element-plus/theme-chalk/src/badge.scss";
|
|
6
|
+
import "element-plus/theme-chalk/src/message.scss";
|
|
7
|
+
import "element-plus/theme-chalk/src/scrollbar.scss";
|
|
8
|
+
import "element-plus/theme-chalk/src/button.scss";
|
|
9
|
+
import { useUpload as A } from "../packages/components/hooks/useUpload.js";
|
|
10
|
+
import { useFile as R } from "../packages/components/hooks/useImg.js";
|
|
11
|
+
import Y from "./operation-log-form.vue.js";
|
|
12
|
+
import G from "./operation-log-content.vue.js";
|
|
13
|
+
import z from "./operation-log-dialog.vue.js";
|
|
14
|
+
import J from "../_virtual/dayjs.min.js";
|
|
15
|
+
import { M2 as s } from "../utils/translate.js";
|
|
16
|
+
import Q from "../annex-upload/annex-upload.vue.js";
|
|
17
|
+
import W from "../node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js";
|
|
18
|
+
/* empty css */
|
|
19
|
+
import { findGlobalNotes as X, insertGlobalnotes as N } from "../packages/components/api/log/index.js";
|
|
20
|
+
const be = /* @__PURE__ */ _({
|
|
21
|
+
name: "YaheeOperationLog",
|
|
22
|
+
__name: "operation-log",
|
|
23
|
+
props: {
|
|
24
|
+
businessKey: { type: String, required: !0, default: "" },
|
|
25
|
+
businessName: { type: String, required: !0, default: "" },
|
|
26
|
+
topHeight: { type: Number, required: !1, default: 90 },
|
|
27
|
+
ifShowDocument: { type: Boolean, required: !1, default: !0 }
|
|
28
|
+
},
|
|
29
|
+
setup(D, { expose: E }) {
|
|
30
|
+
E();
|
|
31
|
+
const a = D, { ifShowDocument: M } = F(a), u = o(!1), h = o(!1), c = o(!1), b = o({}), i = H({
|
|
32
|
+
List: [],
|
|
33
|
+
LoginId: 0
|
|
34
|
+
}), p = o(""), d = o([]), n = {
|
|
35
|
+
PageIndex: -1,
|
|
36
|
+
StartOn: "",
|
|
37
|
+
EndOn: "",
|
|
38
|
+
Notes: "",
|
|
39
|
+
Mark: null,
|
|
40
|
+
UserIds: []
|
|
41
|
+
}, r = () => {
|
|
42
|
+
u.value = !0;
|
|
43
|
+
const e = new FormData();
|
|
44
|
+
e.append(
|
|
45
|
+
"filter",
|
|
46
|
+
JSON.stringify({
|
|
47
|
+
BusinessKey: a.businessKey,
|
|
48
|
+
BusinessName: a.businessName,
|
|
49
|
+
PageIndex: n.PageIndex,
|
|
50
|
+
StartOn: n.StartOn,
|
|
51
|
+
EndOn: n.EndOn,
|
|
52
|
+
UserIds: n.UserIds,
|
|
53
|
+
Notes: n.Notes,
|
|
54
|
+
Mark: n.Mark
|
|
55
|
+
})
|
|
56
|
+
), X(e).then((t) => {
|
|
57
|
+
var g;
|
|
58
|
+
i.LoginId = t.LoginId, n.PageIndex === 0 ? i.List = t.List || [] : i.List = [...i.List || [], ...t.List || []], ((g = t == null ? void 0 : t.List) == null ? void 0 : g.length) === 0 && (h.value = !0);
|
|
59
|
+
}).finally(() => {
|
|
60
|
+
u.value = !1;
|
|
61
|
+
});
|
|
62
|
+
}, L = () => {
|
|
63
|
+
u.value || (u.value = !0, n.PageIndex += 1, r());
|
|
64
|
+
}, O = (e) => {
|
|
65
|
+
i.List = [], n.PageIndex = 0, n.StartOn = e.timeValue ? e.timeValue[0] : "", n.EndOn = e.timeValue ? e.timeValue[1] : "", n.UserIds = e.CreatedBy ? [e.CreatedBy] : [], n.Notes = e.search, n.Mark = e.Mark, r();
|
|
66
|
+
}, B = () => {
|
|
67
|
+
d.value.length > 0 && m(d.value[0]).then(async () => {
|
|
68
|
+
l.success(s("上传文件成功!")), n.PageIndex = 0, d.value = [], await r(), f();
|
|
69
|
+
});
|
|
70
|
+
}, S = (e) => {
|
|
71
|
+
m(e).then(() => {
|
|
72
|
+
l.success(s("上传文件成功!")), c.value = !1, n.PageIndex = 0, r();
|
|
73
|
+
});
|
|
74
|
+
}, m = (e) => {
|
|
75
|
+
const t = new FormData();
|
|
76
|
+
return t.append("BusinessKey", a.businessKey), t.append("BusinessName", a.businessName), t.append("notes", e.fileUrl), t.append("ViewTitle", e.fileName), N(t);
|
|
77
|
+
}, w = () => {
|
|
78
|
+
if (!p.value) {
|
|
79
|
+
l.info(s("备注不能为空!"));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const e = new FormData();
|
|
83
|
+
e.append("BusinessKey", a.businessKey), e.append("BusinessName", a.businessName), e.append("notes", p.value), e.append("ViewTitle", "备注"), N(e).then(async () => {
|
|
84
|
+
l.success(s("添加备注成功!")), n.PageIndex = 0, p.value = "", await r(), f();
|
|
85
|
+
});
|
|
86
|
+
}, P = (e) => {
|
|
87
|
+
if (e.clipboardData || e.originalEvent) {
|
|
88
|
+
if (e.clipboardData.items.length === 0) {
|
|
89
|
+
l.error(s("复制文件到剪切板失败,请点击按钮上传!"));
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (e.clipboardData.files.length > 0) {
|
|
93
|
+
c.value = !0;
|
|
94
|
+
for (let t = 0; t < e.clipboardData.files.length; t++) {
|
|
95
|
+
e.clipboardData.files[t].size / 1024 / 1024 < 100 || l.error(s("上传文件大小不能超过 100MB!"));
|
|
96
|
+
const { name: C } = e.clipboardData.files[t];
|
|
97
|
+
A("115", e.clipboardData.files[t]).then((U) => {
|
|
98
|
+
b.value = {
|
|
99
|
+
fileName: C || "",
|
|
100
|
+
fileUrl: R({ fileId: U[0] })
|
|
101
|
+
};
|
|
102
|
+
}).catch(() => {
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, y = o(null), f = () => {
|
|
108
|
+
y.value.scrollTo({ top: 0, behavior: "smooth" });
|
|
109
|
+
}, v = o(0), I = o(null);
|
|
110
|
+
K(() => {
|
|
111
|
+
var t;
|
|
112
|
+
const e = (t = document.getElementsByClassName("log-form")[0]) == null ? void 0 : t.clientHeight;
|
|
113
|
+
v.value = window.innerHeight - e - I.value.offsetHeight - a.topHeight, L();
|
|
114
|
+
});
|
|
115
|
+
const x = { props: a, ifShowDocument: M, loading: u, noMore: h, showDialog: c, docInfo: b, dataList: i, textareaText: p, compAnalysisFile: d, params: n, getLogMessage: r, load: L, filterChange: O, change: B, confirmUpload: S, uploadFile: m, sendEditQuill: w, handlePaste: P, infiniteList: y, scrollTop: f, boxHeight: v, logText: I, get CaretRight() {
|
|
116
|
+
return V;
|
|
117
|
+
}, get CaretLeft() {
|
|
118
|
+
return T;
|
|
119
|
+
}, get ElScrollbar() {
|
|
120
|
+
return j;
|
|
121
|
+
}, get ElIcon() {
|
|
122
|
+
return q;
|
|
123
|
+
}, get ElButton() {
|
|
124
|
+
return k;
|
|
125
|
+
}, OperationLogForm: Y, OperationLogContent: G, OperationLogDialog: z, get dayjs() {
|
|
126
|
+
return J;
|
|
127
|
+
}, get M2() {
|
|
128
|
+
return s;
|
|
129
|
+
}, YaheeAnnexUpload: Q, get InfiniteLoading() {
|
|
130
|
+
return W;
|
|
131
|
+
} };
|
|
132
|
+
return Object.defineProperty(x, "__isScriptSetup", { enumerable: !1, value: !0 }), x;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
2
135
|
export {
|
|
3
|
-
|
|
136
|
+
be as default
|
|
4
137
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js";
|
|
2
|
-
import { storage as
|
|
2
|
+
import { storage as o } from "../../../utils/storage.js";
|
|
3
3
|
import { ElMessageBox as r } from "element-plus";
|
|
4
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
5
5
|
import "element-plus/theme-chalk/src/message-box.scss";
|
|
@@ -7,19 +7,19 @@ import "element-plus/theme-chalk/src/button.scss";
|
|
|
7
7
|
import "element-plus/theme-chalk/src/input.scss";
|
|
8
8
|
import "element-plus/theme-chalk/src/overlay.scss";
|
|
9
9
|
import n from "../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js";
|
|
10
|
-
const c = "
|
|
10
|
+
const c = "http://qas-newerp.yahee.com.cn:8088/PMS/Latest/", s = n.create({
|
|
11
11
|
baseURL: c,
|
|
12
12
|
timeout: 3e4,
|
|
13
13
|
withCredentials: !0
|
|
14
14
|
});
|
|
15
15
|
s.interceptors.request.use(
|
|
16
16
|
(t) => {
|
|
17
|
-
const e =
|
|
17
|
+
const e = o.get("token");
|
|
18
18
|
return e && (t.headers.token = e), t;
|
|
19
19
|
},
|
|
20
20
|
(t) => Promise.reject(t)
|
|
21
21
|
);
|
|
22
|
-
const i =
|
|
22
|
+
const i = o.get("isTimeOutAlert");
|
|
23
23
|
s.interceptors.response.use(
|
|
24
24
|
(t) => t.status === 200 && t.data ? Promise.resolve(t.data) : t,
|
|
25
25
|
(t) => {
|
|
@@ -38,10 +38,10 @@ s.interceptors.response.use(
|
|
|
38
38
|
console.error(t.response.status, t.message);
|
|
39
39
|
break;
|
|
40
40
|
}
|
|
41
|
-
return t.code === "ECONNABORTED" && i && i === "0" && (r.alert("请求超时,请检查您的网络连接或稍后重试。"),
|
|
41
|
+
return t.code === "ECONNABORTED" && i && i === "0" && (r.alert("请求超时,请检查您的网络连接或稍后重试。"), o.set("isTimeOutAlert", "1")), Promise.reject(t);
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
|
-
const h = async (t, e,
|
|
44
|
+
const h = async (t, e, a) => s.get(t, { params: e, ...a }), O = async (t, e, a) => s.post(t, e, a), T = (t) => {
|
|
45
45
|
s.defaults.baseURL = t;
|
|
46
46
|
};
|
|
47
47
|
export {
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
import "../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js";
|
|
2
|
-
import { handleChangeRequestHeader as o, handleConfigureAuth as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
let
|
|
6
|
-
return
|
|
2
|
+
import { handleChangeRequestHeader as o, handleConfigureAuth as a, handleAuthError as u, handleGeneralError as i, handleNetworkError as l } from "./tool.js";
|
|
3
|
+
import s from "../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js";
|
|
4
|
+
s.interceptors.request.use((e) => {
|
|
5
|
+
let r = o(e);
|
|
6
|
+
return r = a(r), r;
|
|
7
7
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
(
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
s.defaults.withCredentials = !0;
|
|
9
|
+
s.interceptors.response.use(
|
|
10
|
+
(e) => {
|
|
11
|
+
if (e.status !== 200) return Promise.reject(e.data);
|
|
12
|
+
const { errno: r, status: t, msg: n } = e.data;
|
|
13
|
+
return r != null && r !== 0 && u(r), t != null && t !== 0 && n && i(t, n), e;
|
|
14
|
+
},
|
|
15
|
+
(e) => {
|
|
16
|
+
var r;
|
|
17
|
+
return (r = e.response) != null && r.status && l(e.response.status), Promise.reject(e.response);
|
|
13
18
|
}
|
|
14
19
|
);
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
s(a.data);
|
|
18
|
-
}).catch((a) => {
|
|
19
|
-
s(a);
|
|
20
|
-
});
|
|
21
|
-
}), p = (t) => {
|
|
22
|
-
r.defaults.baseURL = t;
|
|
20
|
+
const m = (e) => {
|
|
21
|
+
s.defaults.baseURL = e;
|
|
23
22
|
};
|
|
24
23
|
export {
|
|
25
|
-
|
|
26
|
-
p as setBaseUrl
|
|
24
|
+
m as setBaseUrl
|
|
27
25
|
};
|