yahee-components 0.0.41 → 0.0.43

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 l, unref as a, normalizeStyle as J, withCtx as y, createCommentVNode as w, Fragment as L, renderList as Q, normalizeClass as R, toDisplayString as f, vModelText as q, createTextVNode as W } from "vue";
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 oe } from "../packages/components/hooks/useImg.js";
11
- import ae from "./operation-log-form.vue.js";
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 le from "../annex-upload/annex-upload.vue.js";
17
- import ie from "../packages/components/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js";
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" }, _e = {
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
- }, xe = {
23
+ }, _e = {
24
24
  key: 1,
25
25
  class: "no-more text-color-a4"
26
- }, ye = ["placeholder"], Le = { class: "d-flex text-right marginT10" }, ze = /* @__PURE__ */ $({
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), I = d(!1), x = d(!1), b = d({}), i = j({
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([]), o = {
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: o.PageIndex,
53
- StartOn: o.StartOn,
54
- EndOn: o.EndOn,
55
- UserIds: o.UserIds,
56
- Notes: o.Notes,
57
- Mark: o.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
- i.LoginId = t.LoginId, o.PageIndex === 0 ? i.List = t.List || [] : i.List = [...i.List || [], ...t.List || []], ((s = t == null ? void 0 : t.List) == null ? void 0 : s.length) === 0 && (I.value = !0);
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, o.PageIndex += 1, _());
66
+ g.value || (g.value = !0, a.PageIndex += 1, y());
67
67
  }, P = (e) => {
68
- i.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, _();
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("上传文件成功!")), o.PageIndex = 0, h.value = [], await _(), V();
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("上传文件成功!")), x.value = !1, o.PageIndex = 0, _();
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("添加备注成功!")), o.PageIndex = 0, v.value = "", await _(), V();
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
- x.value = !0;
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
- b.value = {
101
+ I.value = {
102
102
  fileName: z || "",
103
- fileUrl: oe({ fileId: K[0] })
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(ae, {
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(a(ee), {
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: y(() => [
131
- (u(!0), c(L, null, Q(i.List, (s) => (u(), c("div", {
131
+ default: x(() => [
132
+ (u(!0), c(b, null, Q(l.List, (s) => (u(), c("div", {
132
133
  key: s.Id,
133
- class: R(i.LoginId == s.CreatedBy ? "list-item-right" : "list-item-left")
134
+ class: R(l.LoginId == s.CreatedBy ? "list-item-right" : "list-item-left")
134
135
  }, [
135
- i.LoginId == s.CreatedBy ? (u(), c(L, { key: 0 }, [
136
- l("div", null, [
137
- l("div", ce, [
138
- l("div", ue, [
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: i.LoginId,
141
+ id: l.LoginId,
141
142
  info: s
142
143
  }, null, 8, ["id", "info"])
143
144
  ]),
144
- n(a(B), {
145
+ n(o(B), {
145
146
  color: "#f1f1f1",
146
147
  size: "20"
147
148
  }, {
148
- default: y(() => [
149
- n(a(X))
149
+ default: x(() => [
150
+ n(o(X))
150
151
  ]),
151
152
  _: 1
152
153
  })
153
154
  ]),
154
- l("div", fe, f(a(O)(s.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")), 1)
155
+ i("div", fe, f(o(O)(s.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")), 1)
155
156
  ]),
156
- l("div", me, f(s.CreatedName), 1)
157
- ], 64)) : (u(), c(L, { key: 1 }, [
158
- l("div", pe, f(s.CreatedName), 1),
159
- l("div", null, [
160
- l("div", ge, [
161
- n(a(B), {
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: y(() => [
166
- n(a(Z))
166
+ default: x(() => [
167
+ n(o(Z))
167
168
  ]),
168
169
  _: 1
169
170
  }),
170
- l("div", ve, [
171
+ i("div", ve, [
171
172
  n(E, {
172
- id: i.LoginId,
173
+ id: l.LoginId,
173
174
  info: s
174
175
  }, null, 8, ["id", "info"])
175
176
  ])
176
177
  ]),
177
- l("div", he, f(a(O)(s.CreatedOnStr).format("YYYY-MM-DD HH:mm:ss")), 1)
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(a(ie), {
182
+ n(o(le), {
182
183
  distance: 10,
183
184
  onInfinite: N
184
185
  }),
185
- g.value ? (u(), c("div", _e, f(a(r)("加载中...")), 1)) : w("", !0),
186
- I.value ? (u(), c("div", xe, f(a(r)("没有更多了!")), 1)) : w("", !0)
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(l("textarea", {
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: a(r)("可通过 Ctrl+V 直接上传图片/文件"),
196
+ placeholder: o(r)("可通过 Ctrl+V 直接上传图片/文件"),
196
197
  contenteditable: "true",
197
198
  onPaste: H
198
- }, null, 40, ye), [
199
+ }, null, 40, xe), [
199
200
  [q, v.value]
200
201
  ]),
201
- l("div", Le, [
202
- n(le, {
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(a(te), {
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: y(() => [
217
- W(f(a(r)("添加备注")), 1)
217
+ default: x(() => [
218
+ W(f(o(r)("添加备注")), 1)
218
219
  ]),
219
220
  _: 1
220
221
  })
221
222
  ]),
222
223
  n(ne, {
223
- modelValue: x.value,
224
- "onUpdate:modelValue": t[3] || (t[3] = (s) => x.value = s),
225
- "doc-info": b.value,
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
  ]));
@@ -96,6 +96,7 @@
96
96
  border: 1px solid #ccc;
97
97
  padding: 10px;
98
98
  box-sizing: border-box;
99
+ outline: none;
99
100
  }
100
101
  .yahee-operation-log .titleRemarks {
101
102
  font-size: 14px;
package/es/style.css CHANGED
@@ -325,6 +325,7 @@
325
325
  border: 1px solid #ccc;
326
326
  padding: 10px;
327
327
  box-sizing: border-box;
328
+ outline: none;
328
329
  }
329
330
  .yahee-operation-log .titleRemarks {
330
331
  font-size: 14px;
@@ -96,6 +96,7 @@
96
96
  border: 1px solid #ccc;
97
97
  padding: 10px;
98
98
  box-sizing: border-box;
99
+ outline: none;
99
100
  }
100
101
  .yahee-operation-log .titleRemarks {
101
102
  font-size: 14px;
package/lib/style.css CHANGED
@@ -325,6 +325,7 @@
325
325
  border: 1px solid #ccc;
326
326
  padding: 10px;
327
327
  box-sizing: border-box;
328
+ outline: none;
328
329
  }
329
330
  .yahee-operation-log .titleRemarks {
330
331
  font-size: 14px;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.41",
4
+ "version": "0.0.43",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",