yahee-components 0.0.6 → 0.0.8
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,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { ElConfigProvider as
|
|
1
|
+
import { defineComponent as Q, toRefs as W, ref as n, openBlock as r, createBlock as p, unref as e, withCtx as o, createElementVNode as b, createVNode as t, withKeys as X, createElementBlock as v, Fragment as E, renderList as k, createTextVNode as i, toDisplayString as m, createCommentVNode as w } from "vue";
|
|
2
|
+
import h from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
|
|
3
|
+
import { ElConfigProvider as Y, ElInput as x, ElSelect as F, ElOption as B, ElIcon as j, ElCheckbox as G, ElLink as J, ElDialog as Z, ElButton as P, ElForm as $, ElRow as T, ElFormItem as _, ElMessage as ee } from "element-plus";
|
|
4
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
5
5
|
import "element-plus/theme-chalk/src/input.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/checkbox.scss";
|
|
@@ -20,75 +20,78 @@ import "element-plus/theme-chalk/src/link.scss";
|
|
|
20
20
|
import "element-plus/theme-chalk/src/config-provider.scss";
|
|
21
21
|
import "element-plus/theme-chalk/src/badge.scss";
|
|
22
22
|
import "element-plus/theme-chalk/src/message.scss";
|
|
23
|
-
import { Search as
|
|
24
|
-
import
|
|
25
|
-
const
|
|
23
|
+
import { Search as le } from "@element-plus/icons-vue";
|
|
24
|
+
import ae from "../node_modules/.pnpm/element-plus@2.8.3_vue@3.5.4_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js";
|
|
25
|
+
const oe = { class: "yahee-comporehensive-search" }, te = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "search-type-checkbox"
|
|
28
|
-
},
|
|
28
|
+
}, re = { class: "dialog-footer" }, Te = /* @__PURE__ */ Q({
|
|
29
29
|
name: "YaheeComprehensiveSearch",
|
|
30
30
|
__name: "comprehensive-search",
|
|
31
31
|
props: {
|
|
32
|
-
dealSearch: { type: Function, default:
|
|
33
|
-
confirmSearch: { type: Function, default:
|
|
34
|
-
pasteFormat: { type: Function, default:
|
|
35
|
-
isInSearchChange: { type: Function, default:
|
|
32
|
+
dealSearch: { type: Function, default: h.noop },
|
|
33
|
+
confirmSearch: { type: Function, default: h.noop },
|
|
34
|
+
pasteFormat: { type: Function, default: h.noop },
|
|
35
|
+
isInSearchChange: { type: Function, default: h.noop },
|
|
36
36
|
defaultSearch: { default: "" },
|
|
37
37
|
options: { default: () => [] },
|
|
38
38
|
placeholderText: { default: "" },
|
|
39
39
|
showPatchSearch: { type: Boolean, default: !1 },
|
|
40
40
|
showPatchCheckbox: { type: Boolean }
|
|
41
41
|
},
|
|
42
|
-
setup(
|
|
43
|
-
const
|
|
44
|
-
dealSearch:
|
|
42
|
+
setup(I) {
|
|
43
|
+
const U = ae, L = I, {
|
|
44
|
+
dealSearch: y,
|
|
45
45
|
defaultSearch: z,
|
|
46
|
-
pasteFormat:
|
|
46
|
+
pasteFormat: C,
|
|
47
47
|
confirmSearch: N,
|
|
48
48
|
isInSearchChange: R,
|
|
49
|
-
options:
|
|
49
|
+
options: g,
|
|
50
50
|
showPatchSearch: D,
|
|
51
51
|
showPatchCheckbox: q
|
|
52
|
-
} =
|
|
52
|
+
} = W(L), d = n(z.value), s = n(""), S = n(!1), H = n(!1), c = n(!1), u = n({ searchType: "WHOLE_SEARCH", searchContent: "" }), K = {
|
|
53
53
|
selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
|
|
54
54
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
55
55
|
};
|
|
56
56
|
function O() {
|
|
57
|
-
|
|
57
|
+
c.value = !0;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
59
|
+
function V() {
|
|
60
|
+
c.value = !1;
|
|
61
61
|
}
|
|
62
62
|
const f = () => {
|
|
63
|
-
if (!
|
|
64
|
-
|
|
63
|
+
if (!s.value) {
|
|
64
|
+
ee.warning("请输入搜索关键字");
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
y.value(d.value, s.value);
|
|
68
|
+
}, A = () => {
|
|
69
|
+
y.value(d.value, s.value);
|
|
68
70
|
};
|
|
69
|
-
return (
|
|
71
|
+
return (M, l) => (r(), p(e(Y), { locale: e(U) }, {
|
|
70
72
|
default: o(() => [
|
|
71
|
-
|
|
72
|
-
t(e(
|
|
73
|
-
modelValue:
|
|
74
|
-
"onUpdate:modelValue": l[1] || (l[1] = (a) =>
|
|
75
|
-
placeholder:
|
|
73
|
+
b("div", oe, [
|
|
74
|
+
t(e(x), {
|
|
75
|
+
modelValue: s.value,
|
|
76
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => s.value = a),
|
|
77
|
+
placeholder: M.placeholderText,
|
|
76
78
|
class: "input-with-select",
|
|
77
79
|
clearable: "",
|
|
78
80
|
maxlength: "30",
|
|
79
81
|
onChange: f,
|
|
80
|
-
onKeyup:
|
|
81
|
-
onPaste: e(
|
|
82
|
+
onKeyup: X(f, ["enter"]),
|
|
83
|
+
onPaste: e(C),
|
|
84
|
+
onClear: A
|
|
82
85
|
}, {
|
|
83
86
|
prepend: o(() => [
|
|
84
|
-
t(e(
|
|
85
|
-
modelValue:
|
|
86
|
-
"onUpdate:modelValue": l[0] || (l[0] = (a) =>
|
|
87
|
+
t(e(F), {
|
|
88
|
+
modelValue: d.value,
|
|
89
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => d.value = a),
|
|
87
90
|
size: "small",
|
|
88
91
|
class: "custom-select"
|
|
89
92
|
}, {
|
|
90
93
|
default: o(() => [
|
|
91
|
-
(r(!0), v(
|
|
94
|
+
(r(!0), v(E, null, k(e(g), (a) => (r(), p(e(B), {
|
|
92
95
|
key: a.label,
|
|
93
96
|
label: a.label,
|
|
94
97
|
value: a.value
|
|
@@ -98,7 +101,7 @@ const ae = { class: "yahee-comporehensive-search" }, oe = {
|
|
|
98
101
|
}, 8, ["modelValue"])
|
|
99
102
|
]),
|
|
100
103
|
append: o(() => [
|
|
101
|
-
t(e(
|
|
104
|
+
t(e(j), {
|
|
102
105
|
size: "12",
|
|
103
106
|
color: "#3366cc",
|
|
104
107
|
style: { cursor: "pointer" },
|
|
@@ -106,84 +109,84 @@ const ae = { class: "yahee-comporehensive-search" }, oe = {
|
|
|
106
109
|
onClick: f
|
|
107
110
|
}, {
|
|
108
111
|
default: o(() => [
|
|
109
|
-
t(e(
|
|
112
|
+
t(e(le))
|
|
110
113
|
]),
|
|
111
114
|
_: 1
|
|
112
115
|
})
|
|
113
116
|
]),
|
|
114
117
|
_: 1
|
|
115
118
|
}, 8, ["modelValue", "placeholder", "onPaste"]),
|
|
116
|
-
e(q) ? (r(), v("div",
|
|
117
|
-
t(e(
|
|
118
|
-
modelValue:
|
|
119
|
-
"onUpdate:modelValue": l[2] || (l[2] = (a) =>
|
|
119
|
+
e(q) ? (r(), v("div", te, [
|
|
120
|
+
t(e(G), {
|
|
121
|
+
modelValue: S.value,
|
|
122
|
+
"onUpdate:modelValue": l[2] || (l[2] = (a) => S.value = a),
|
|
120
123
|
onChange: e(R)
|
|
121
124
|
}, {
|
|
122
125
|
default: o(() => l[6] || (l[6] = [
|
|
123
|
-
|
|
126
|
+
i(m("在筛选条件内查询"))
|
|
124
127
|
])),
|
|
125
128
|
_: 1
|
|
126
129
|
}, 8, ["modelValue", "onChange"]),
|
|
127
|
-
e(D) ? (r(),
|
|
130
|
+
e(D) ? (r(), p(e(J), {
|
|
128
131
|
key: 0,
|
|
129
132
|
type: "primary",
|
|
130
133
|
onClick: O
|
|
131
134
|
}, {
|
|
132
135
|
default: o(() => l[7] || (l[7] = [
|
|
133
|
-
|
|
136
|
+
i(m("批量查询"))
|
|
134
137
|
])),
|
|
135
138
|
_: 1
|
|
136
|
-
})) :
|
|
137
|
-
])) :
|
|
139
|
+
})) : w("", !0)
|
|
140
|
+
])) : w("", !0)
|
|
138
141
|
]),
|
|
139
|
-
t(e(
|
|
140
|
-
modelValue:
|
|
141
|
-
"onUpdate:modelValue": l[5] || (l[5] = (a) =>
|
|
142
|
+
t(e(Z), {
|
|
143
|
+
modelValue: c.value,
|
|
144
|
+
"onUpdate:modelValue": l[5] || (l[5] = (a) => c.value = a),
|
|
142
145
|
title: "批量查询",
|
|
143
146
|
width: "30%",
|
|
144
|
-
"before-close":
|
|
147
|
+
"before-close": V,
|
|
145
148
|
"append-to-body": !0,
|
|
146
149
|
draggable: ""
|
|
147
150
|
}, {
|
|
148
151
|
footer: o(() => [
|
|
149
|
-
|
|
150
|
-
t(e(
|
|
152
|
+
b("div", re, [
|
|
153
|
+
t(e(P), {
|
|
151
154
|
type: "primary",
|
|
152
155
|
loading: H.value,
|
|
153
156
|
onClick: e(N)
|
|
154
157
|
}, {
|
|
155
158
|
default: o(() => l[8] || (l[8] = [
|
|
156
|
-
|
|
159
|
+
i(m("确认"))
|
|
157
160
|
])),
|
|
158
161
|
_: 1
|
|
159
162
|
}, 8, ["loading", "onClick"]),
|
|
160
|
-
t(e(
|
|
163
|
+
t(e(P), { onClick: V }, {
|
|
161
164
|
default: o(() => l[9] || (l[9] = [
|
|
162
|
-
|
|
165
|
+
i(m("关闭"))
|
|
163
166
|
])),
|
|
164
167
|
_: 1
|
|
165
168
|
})
|
|
166
169
|
])
|
|
167
170
|
]),
|
|
168
171
|
default: o(() => [
|
|
169
|
-
t(e(
|
|
172
|
+
t(e($), {
|
|
170
173
|
ref: "batchSearchFormRef",
|
|
171
|
-
model:
|
|
174
|
+
model: u.value,
|
|
172
175
|
rules: K
|
|
173
176
|
}, {
|
|
174
177
|
default: o(() => [
|
|
175
|
-
t(e(
|
|
178
|
+
t(e(T), { class: "row-class" }, {
|
|
176
179
|
default: o(() => [
|
|
177
|
-
t(e(
|
|
180
|
+
t(e(_), { prop: "searchType" }, {
|
|
178
181
|
default: o(() => [
|
|
179
|
-
t(e(
|
|
180
|
-
modelValue:
|
|
181
|
-
"onUpdate:modelValue": l[3] || (l[3] = (a) =>
|
|
182
|
+
t(e(F), {
|
|
183
|
+
modelValue: u.value.searchType,
|
|
184
|
+
"onUpdate:modelValue": l[3] || (l[3] = (a) => u.value.searchType = a),
|
|
182
185
|
size: "small",
|
|
183
186
|
class: "custom-select"
|
|
184
187
|
}, {
|
|
185
188
|
default: o(() => [
|
|
186
|
-
(r(!0), v(
|
|
189
|
+
(r(!0), v(E, null, k(e(g), (a) => (r(), p(e(B), {
|
|
187
190
|
key: a.label,
|
|
188
191
|
label: a.label,
|
|
189
192
|
value: a.value
|
|
@@ -197,20 +200,20 @@ const ae = { class: "yahee-comporehensive-search" }, oe = {
|
|
|
197
200
|
]),
|
|
198
201
|
_: 1
|
|
199
202
|
}),
|
|
200
|
-
t(e(
|
|
203
|
+
t(e(T), { class: "row-class" }, {
|
|
201
204
|
default: o(() => [
|
|
202
|
-
t(e(
|
|
205
|
+
t(e(_), {
|
|
203
206
|
prop: "searchContent",
|
|
204
207
|
style: { width: "100%" }
|
|
205
208
|
}, {
|
|
206
209
|
default: o(() => [
|
|
207
|
-
t(e(
|
|
208
|
-
modelValue:
|
|
209
|
-
"onUpdate:modelValue": l[4] || (l[4] = (a) =>
|
|
210
|
+
t(e(x), {
|
|
211
|
+
modelValue: u.value.searchContent,
|
|
212
|
+
"onUpdate:modelValue": l[4] || (l[4] = (a) => u.value.searchContent = a),
|
|
210
213
|
placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
|
|
211
214
|
type: "textarea",
|
|
212
215
|
rows: 5,
|
|
213
|
-
onPaste: e(
|
|
216
|
+
onPaste: e(C)
|
|
214
217
|
}, null, 8, ["modelValue", "onPaste"])
|
|
215
218
|
]),
|
|
216
219
|
_: 1
|
|
@@ -230,5 +233,5 @@ const ae = { class: "yahee-comporehensive-search" }, oe = {
|
|
|
230
233
|
}
|
|
231
234
|
});
|
|
232
235
|
export {
|
|
233
|
-
|
|
236
|
+
Te as default
|
|
234
237
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as R, ref as d, reactive as $, onMounted as K, openBlock as c, createElementBlock as u, createVNode as s, unref as n, normalizeStyle as A, withCtx as x, Fragment as
|
|
1
|
+
import { defineComponent as R, ref as d, reactive as $, onMounted as K, openBlock as c, createElementBlock as u, createVNode as s, unref as n, normalizeStyle as A, withCtx as x, Fragment as y, renderList as G, normalizeClass as J, createElementVNode as l, toDisplayString as p, createCommentVNode as w, withDirectives as Q, 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 { RemarkApi as L } from "../packages/components/api/remarkApi.js";
|
|
4
|
-
import { ElScrollbar as ee, ElIcon as
|
|
4
|
+
import { ElScrollbar as ee, ElIcon as B, ElButton as te, ElMessage as f } from "element-plus";
|
|
5
5
|
import "element-plus/theme-chalk/src/base.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/badge.scss";
|
|
7
7
|
import "element-plus/theme-chalk/src/message.scss";
|
|
@@ -23,14 +23,14 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
23
23
|
}, _e = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "no-more text-color-a4"
|
|
26
|
-
}, xe = ["placeholder"],
|
|
27
|
-
name: "
|
|
26
|
+
}, xe = ["placeholder"], Ie = { class: "d-flex text-right marginT10" }, Ye = /* @__PURE__ */ R({
|
|
27
|
+
name: "YaheeOperationLog",
|
|
28
28
|
__name: "operation-log",
|
|
29
29
|
props: {
|
|
30
30
|
projectId: { default: "" }
|
|
31
31
|
},
|
|
32
32
|
setup(P) {
|
|
33
|
-
const
|
|
33
|
+
const I = P, m = d(!1), C = d(!1), _ = d(!1), D = d({}), i = $({
|
|
34
34
|
List: [],
|
|
35
35
|
LoginId: ""
|
|
36
36
|
}), g = d(""), v = d([]), a = {
|
|
@@ -46,7 +46,7 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
46
46
|
e.append(
|
|
47
47
|
"filter",
|
|
48
48
|
JSON.stringify({
|
|
49
|
-
BusinessKey:
|
|
49
|
+
BusinessKey: I.projectId,
|
|
50
50
|
BusinessName: "PRODUCT_DEV",
|
|
51
51
|
PageIndex: a.PageIndex,
|
|
52
52
|
StartOn: a.StartOn,
|
|
@@ -75,14 +75,14 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
75
75
|
});
|
|
76
76
|
}, M = (e) => {
|
|
77
77
|
const t = new FormData();
|
|
78
|
-
return t.append("BusinessKey",
|
|
78
|
+
return t.append("BusinessKey", I.projectId), t.append("BusinessName", "PRODUCT_DEV"), t.append("notes", e.fileUrl), t.append("ViewTitle", e.fileName), L.insertglobalnotes(t);
|
|
79
79
|
}, j = () => {
|
|
80
80
|
if (!g.value) {
|
|
81
81
|
f.info(r("备注不能为空!"));
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
const e = new FormData();
|
|
85
|
-
e.append("BusinessKey",
|
|
85
|
+
e.append("BusinessKey", I.projectId), e.append("BusinessName", "PRODUCT_DEV"), e.append("notes", g.value), e.append("ViewTitle", "备注"), L.insertglobalnotes(e).then(async () => {
|
|
86
86
|
f.success(r("添加备注成功!")), a.PageIndex = 0, g.value = "", await h(), k();
|
|
87
87
|
});
|
|
88
88
|
}, Y = (e) => {
|
|
@@ -108,10 +108,10 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
108
108
|
}
|
|
109
109
|
}, N = d(null), k = () => {
|
|
110
110
|
N.value.scrollTo({ top: 0, behavior: "smooth" });
|
|
111
|
-
}, E = d(0),
|
|
111
|
+
}, E = d(0), O = d(null);
|
|
112
112
|
return K(() => {
|
|
113
113
|
const e = document.getElementsByClassName("log-form")[0].clientHeight;
|
|
114
|
-
E.value = window.innerHeight - e -
|
|
114
|
+
E.value = window.innerHeight - e - O.value.offsetHeight - 90, V();
|
|
115
115
|
}), (e, t) => (c(), u("div", re, [
|
|
116
116
|
s(ne, {
|
|
117
117
|
ref: "logForm",
|
|
@@ -126,11 +126,11 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
126
126
|
style: A({ height: E.value + "px" })
|
|
127
127
|
}, {
|
|
128
128
|
default: x(() => [
|
|
129
|
-
(c(!0), u(
|
|
129
|
+
(c(!0), u(y, null, G(i.List, (o) => (c(), u("div", {
|
|
130
130
|
key: o.Id,
|
|
131
131
|
class: J(i.LoginId == o.CreatedBy ? "list-item-right" : "list-item-left")
|
|
132
132
|
}, [
|
|
133
|
-
i.LoginId == o.CreatedBy ? (c(), u(
|
|
133
|
+
i.LoginId == o.CreatedBy ? (c(), u(y, { key: 0 }, [
|
|
134
134
|
l("div", null, [
|
|
135
135
|
l("div", de, [
|
|
136
136
|
l("div", ce, [
|
|
@@ -139,7 +139,7 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
139
139
|
info: o
|
|
140
140
|
}, null, 8, ["id", "info"])
|
|
141
141
|
]),
|
|
142
|
-
s(n(
|
|
142
|
+
s(n(B), {
|
|
143
143
|
color: "#f1f1f1",
|
|
144
144
|
size: "20"
|
|
145
145
|
}, {
|
|
@@ -152,11 +152,11 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
152
152
|
l("div", ue, p(n(b)(o.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")), 1)
|
|
153
153
|
]),
|
|
154
154
|
l("div", pe, p(o.CreatedName), 1)
|
|
155
|
-
], 64)) : (c(), u(
|
|
155
|
+
], 64)) : (c(), u(y, { key: 1 }, [
|
|
156
156
|
l("div", fe, p(o.CreatedName), 1),
|
|
157
157
|
l("div", null, [
|
|
158
158
|
l("div", me, [
|
|
159
|
-
s(n(
|
|
159
|
+
s(n(B), {
|
|
160
160
|
color: "#ccc",
|
|
161
161
|
size: "20"
|
|
162
162
|
}, {
|
|
@@ -180,14 +180,14 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
180
180
|
distance: 10,
|
|
181
181
|
onInfinite: V
|
|
182
182
|
}),
|
|
183
|
-
m.value ? (c(), u("div", he, p(n(r)("加载中...")), 1)) :
|
|
184
|
-
C.value ? (c(), u("div", _e, p(n(r)("没有更多了!")), 1)) :
|
|
183
|
+
m.value ? (c(), u("div", he, p(n(r)("加载中...")), 1)) : w("", !0),
|
|
184
|
+
C.value ? (c(), u("div", _e, p(n(r)("没有更多了!")), 1)) : w("", !0)
|
|
185
185
|
]),
|
|
186
186
|
_: 1
|
|
187
187
|
}, 8, ["style"]),
|
|
188
188
|
Q(l("textarea", {
|
|
189
189
|
ref_key: "logText",
|
|
190
|
-
ref:
|
|
190
|
+
ref: O,
|
|
191
191
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => g.value = o),
|
|
192
192
|
class: "content-div",
|
|
193
193
|
placeholder: n(r)("可通过 Ctrl+V 直接上传图片/文件"),
|
|
@@ -196,7 +196,7 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
196
196
|
}, null, 40, xe), [
|
|
197
197
|
[q, g.value]
|
|
198
198
|
]),
|
|
199
|
-
l("div",
|
|
199
|
+
l("div", Ie, [
|
|
200
200
|
s(le, {
|
|
201
201
|
modelValue: v.value,
|
|
202
202
|
"onUpdate:modelValue": t[1] || (t[1] = (o) => v.value = o),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),c=require("../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"),r=require("element-plus");require("element-plus/theme-chalk/src/base.scss");require("element-plus/theme-chalk/src/input.scss");require("element-plus/theme-chalk/src/checkbox.scss");require("element-plus/theme-chalk/src/tag.scss");require("element-plus/theme-chalk/src/option.scss");require("element-plus/theme-chalk/src/option-group.scss");require("element-plus/theme-chalk/src/scrollbar.scss");require("element-plus/theme-chalk/src/popper.scss");require("element-plus/theme-chalk/src/select.scss");require("element-plus/theme-chalk/src/dialog.scss");require("element-plus/theme-chalk/src/overlay.scss");require("element-plus/theme-chalk/src/form.scss");require("element-plus/theme-chalk/src/form-item.scss");require("element-plus/theme-chalk/src/row.scss");require("element-plus/theme-chalk/src/button.scss");require("element-plus/theme-chalk/src/link.scss");require("element-plus/theme-chalk/src/config-provider.scss");require("element-plus/theme-chalk/src/badge.scss");require("element-plus/theme-chalk/src/message.scss");const B=require("@element-plus/icons-vue"),b=require("../node_modules/.pnpm/element-plus@2.8.3_vue@3.5.4_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js"),F={class:"yahee-comporehensive-search"},T={key:0,class:"search-type-checkbox"},P={class:"dialog-footer"},I=e.defineComponent({name:"YaheeComprehensiveSearch",__name:"comprehensive-search",props:{dealSearch:{type:Function,default:c.noop},confirmSearch:{type:Function,default:c.noop},pasteFormat:{type:Function,default:c.noop},isInSearchChange:{type:Function,default:c.noop},defaultSearch:{default:""},options:{default:()=>[]},placeholderText:{default:""},showPatchSearch:{type:Boolean,default:!1},showPatchCheckbox:{type:Boolean}},setup(m){const C=b,V=m,{dealSearch:d,defaultSearch:v,pasteFormat:i,confirmSearch:w,isInSearchChange:y,options:h,showPatchSearch:x,showPatchCheckbox:g}=e.toRefs(V),n=e.ref(v.value),a=e.ref(""),f=e.ref(!1),k=e.ref(!1),u=e.ref(!1),o=e.ref({searchType:"WHOLE_SEARCH",searchContent:""}),E={selectedSearchType:[{required:!0,message:"请输入查询类型",trigger:"blur"}],searchContent:[{required:!0,message:"请输入查询内容",trigger:"blur"}]};function S(){u.value=!0}function p(){u.value=!1}const s=()=>{if(!a.value){r.ElMessage.warning("请输入搜索关键字");return}d.value(n.value,a.value)},q=()=>{d.value(n.value,a.value)};return(N,t)=>(e.openBlock(),e.createBlock(e.unref(r.ElConfigProvider),{locale:e.unref(C)},{default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createVNode(e.unref(r.ElInput),{modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=l=>a.value=l),placeholder:N.placeholderText,class:"input-with-select",clearable:"",maxlength:"30",onChange:s,onKeyup:e.withKeys(s,["enter"]),onPaste:e.unref(i),onClear:q},{prepend:e.withCtx(()=>[e.createVNode(e.unref(r.ElSelect),{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=l=>n.value=l),size:"small",class:"custom-select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(h),l=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:l.label,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),append:e.withCtx(()=>[e.createVNode(e.unref(r.ElIcon),{size:"12",color:"#3366cc",style:{cursor:"pointer"},class:"icon-cusor",onClick:s},{default:e.withCtx(()=>[e.createVNode(e.unref(B.Search))]),_:1})]),_:1},8,["modelValue","placeholder","onPaste"]),e.unref(g)?(e.openBlock(),e.createElementBlock("div",T,[e.createVNode(e.unref(r.ElCheckbox),{modelValue:f.value,"onUpdate:modelValue":t[2]||(t[2]=l=>f.value=l),onChange:e.unref(y)},{default:e.withCtx(()=>t[6]||(t[6]=[e.createTextVNode(e.toDisplayString("在筛选条件内查询"))])),_:1},8,["modelValue","onChange"]),e.unref(x)?(e.openBlock(),e.createBlock(e.unref(r.ElLink),{key:0,type:"primary",onClick:S},{default:e.withCtx(()=>t[7]||(t[7]=[e.createTextVNode(e.toDisplayString("批量查询"))])),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(r.ElDialog),{modelValue:u.value,"onUpdate:modelValue":t[5]||(t[5]=l=>u.value=l),title:"批量查询",width:"30%","before-close":p,"append-to-body":!0,draggable:""},{footer:e.withCtx(()=>[e.createElementVNode("div",P,[e.createVNode(e.unref(r.ElButton),{type:"primary",loading:k.value,onClick:e.unref(w)},{default:e.withCtx(()=>t[8]||(t[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1},8,["loading","onClick"]),e.createVNode(e.unref(r.ElButton),{onClick:p},{default:e.withCtx(()=>t[9]||(t[9]=[e.createTextVNode(e.toDisplayString("关闭"))])),_:1})])]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElForm),{ref:"batchSearchFormRef",model:o.value,rules:E},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElRow),{class:"row-class"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElFormItem),{prop:"searchType"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElSelect),{modelValue:o.value.searchType,"onUpdate:modelValue":t[3]||(t[3]=l=>o.value.searchType=l),size:"small",class:"custom-select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(h),l=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:l.label,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e.createVNode(e.unref(r.ElRow),{class:"row-class"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElFormItem),{prop:"searchContent",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:o.value.searchContent,"onUpdate:modelValue":t[4]||(t[4]=l=>o.value.searchContent=l),placeholder:"请输入批量查询内容,从EXCEL复制可自动替换为`,`",type:"textarea",rows:5,onPaste:e.unref(i)},null,8,["modelValue","onPaste"])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])]),_:1},8,["locale"]))}});module.exports=I;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),y=require("@element-plus/icons-vue"),g=require("../packages/components/api/remarkApi.js"),s=require("element-plus");require("element-plus/theme-chalk/src/base.scss");require("element-plus/theme-chalk/src/badge.scss");require("element-plus/theme-chalk/src/message.scss");require("element-plus/theme-chalk/src/scrollbar.scss");require("element-plus/theme-chalk/src/button.scss");const U=require("../packages/components/hooks/useUpload.js"),O=require("../packages/components/hooks/useImg.js"),P=require("./operation-log-form.vue.js"),I=require("./operation-log-content.vue.js"),b=require("./operation-log-dialog.vue.js"),M=require("../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js"),r=require("../utils/translate.js"),F=require("../annex-upload/annex-upload.vue.js"),T=require("../node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js");;/* empty css */const j={class:"yahee-operation-log"},H={class:"d-flex jc-end"},Y={class:"content text-color-secondary"},z={class:"date fontSize-12 pull-right text-color-a4"},R={class:"name"},A={class:"name"},K={class:"d-flex"},G={class:"content text-color-secondary"},J={class:"date fontSize-12 text-color-a4"},Q={key:0,class:"loading text-color-a4"},$={key:1,class:"no-more text-color-a4"},W=["placeholder"],X={class:"d-flex text-right marginT10"},Z=e.defineComponent({name:"YaheeOperationLog",__name:"operation-log",props:{projectId:{default:""}},setup(k){const f=k,i=e.ref(!1),m=e.ref(!1),p=e.ref(!1),v=e.ref({}),l=e.reactive({List:[],LoginId:""}),c=e.ref(""),d=e.ref([]),a={PageIndex:-1,StartOn:"",EndOn:"",Notes:"",Mark:null,UserIds:[]},u=()=>{i.value=!0;const t=new FormData;t.append("filter",JSON.stringify({BusinessKey:f.projectId,BusinessName:"PRODUCT_DEV",PageIndex:a.PageIndex,StartOn:a.StartOn,EndOn:a.EndOn,UserIds:a.UserIds,Notes:a.Notes,Mark:a.Mark})),g.RemarkApi.findGlobalNotes(t).then(n=>{var o;l.LoginId=n.LoginId,a.PageIndex===0?l.List=n.List||[]:l.List=[...l.List||[],...n.List||[]],((o=n==null?void 0:n.List)==null?void 0:o.length)===0&&(m.value=!0)}).finally(()=>{i.value=!1})},_=()=>{i.value||(i.value=!0,a.PageIndex+=1,u())},D=t=>{l.List=[],a.PageIndex=0,a.StartOn=t.timeValue?t.timeValue[0]:"",a.EndOn=t.timeValue?t.timeValue[1]:"",a.UserIds=t.CreatedBy?[t.CreatedBy]:[],a.Notes=t.search,a.Mark=t.Mark,u()},L=()=>{d.value.length>0&&h(d.value[0]).then(async()=>{s.ElMessage.success(r.M2("上传文件成功!")),a.PageIndex=0,d.value=[],await u(),N()})},C=t=>{h(t).then(()=>{s.ElMessage.success(r.M2("上传文件成功!")),p.value=!1,a.PageIndex=0,u()})},h=t=>{const n=new FormData;return n.append("BusinessKey",f.projectId),n.append("BusinessName","PRODUCT_DEV"),n.append("notes",t.fileUrl),n.append("ViewTitle",t.fileName),g.RemarkApi.insertglobalnotes(n)},B=()=>{if(!c.value){s.ElMessage.info(r.M2("备注不能为空!"));return}const t=new FormData;t.append("BusinessKey",f.projectId),t.append("BusinessName","PRODUCT_DEV"),t.append("notes",c.value),t.append("ViewTitle","备注"),g.RemarkApi.insertglobalnotes(t).then(async()=>{s.ElMessage.success(r.M2("添加备注成功!")),a.PageIndex=0,c.value="",await u(),N()})},q=t=>{if(t.clipboardData||t.originalEvent){if(t.clipboardData.items.length===0){s.ElMessage.error(r.M2("复制文件到剪切板失败,请点击按钮上传!"));return}if(t.clipboardData.files.length>0){p.value=!0;for(let n=0;n<t.clipboardData.files.length;n++){t.clipboardData.files[n].size/1024/1024<100||s.ElMessage.error(r.M2("上传文件大小不能超过 100MB!"));const{name:w}=t.clipboardData.files[n];U.useUpload("115",t.clipboardData.files[n]).then(S=>{v.value={fileName:w||"",fileUrl:O.useFile({fileId:S[0]})}}).catch(()=>{})}}}},V=e.ref(null),N=()=>{V.value.scrollTo({top:0,behavior:"smooth"})},x=e.ref(0),E=e.ref(null);return e.onMounted(()=>{const t=document.getElementsByClassName("log-form")[0].clientHeight;x.value=window.innerHeight-t-E.value.offsetHeight-90,_()}),(t,n)=>(e.openBlock(),e.createElementBlock("div",j,[e.createVNode(P,{ref:"logForm",class:"text-right log-form","project-id":t.projectId,onFilterChange:D},null,8,["project-id"]),e.createVNode(e.unref(s.ElScrollbar),{ref_key:"infiniteList",ref:V,class:"infinite-list-wrapper",style:e.normalizeStyle({height:x.value+"px"})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.List,o=>(e.openBlock(),e.createElementBlock("div",{key:o.Id,class:e.normalizeClass(l.LoginId==o.CreatedBy?"list-item-right":"list-item-left")},[l.LoginId==o.CreatedBy?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",null,[e.createElementVNode("div",H,[e.createElementVNode("div",Y,[e.createVNode(I,{id:l.LoginId,info:o},null,8,["id","info"])]),e.createVNode(e.unref(s.ElIcon),{color:"#f1f1f1",size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(y.CaretRight))]),_:1})]),e.createElementVNode("div",z,e.toDisplayString(e.unref(M)(o.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")),1)]),e.createElementVNode("div",R,e.toDisplayString(o.CreatedName),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",A,e.toDisplayString(o.CreatedName),1),e.createElementVNode("div",null,[e.createElementVNode("div",K,[e.createVNode(e.unref(s.ElIcon),{color:"#ccc",size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(y.CaretLeft))]),_:1}),e.createElementVNode("div",G,[e.createVNode(I,{id:l.LoginId,info:o},null,8,["id","info"])])]),e.createElementVNode("div",J,e.toDisplayString(e.unref(M)(o.CreatedOnStr).format("YYYY-MM-DD HH:mm:ss")),1)])],64))],2))),128)),e.createVNode(e.unref(T),{distance:10,onInfinite:_}),i.value?(e.openBlock(),e.createElementBlock("div",Q,e.toDisplayString(e.unref(r.M2)("加载中...")),1)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("div",$,e.toDisplayString(e.unref(r.M2)("没有更多了!")),1)):e.createCommentVNode("",!0)]),_:1},8,["style"]),e.withDirectives(e.createElementVNode("textarea",{ref_key:"logText",ref:E,"onUpdate:modelValue":n[0]||(n[0]=o=>c.value=o),class:"content-div",placeholder:e.unref(r.M2)("可通过 Ctrl+V 直接上传图片/文件"),contenteditable:"true",onPaste:q},null,40,W),[[e.vModelText,c.value]]),e.createElementVNode("div",X,[e.createVNode(F,{modelValue:d.value,"onUpdate:modelValue":n[1]||(n[1]=o=>d.value=o),"show-tips":!1,"show-list":!1,accept:".gif,.jpg,.png,.doc,.docx,.pdf,.xls,.xlsx,.ppt,.txt",onChange:L},null,8,["modelValue"]),e.createVNode(e.unref(s.ElButton),{type:"success",size:"small",class:"marginL6",onClick:n[2]||(n[2]=o=>B())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r.M2)("添加备注")),1)]),_:1})]),e.createVNode(b,{modelValue:p.value,"onUpdate:modelValue":n[3]||(n[3]=o=>p.value=o),"doc-info":v.value,onConfirmUpload:C},null,8,["modelValue","doc-info"])]))}});module.exports=Z;
|