yahee-components 0.0.46 → 0.0.47

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 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";
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 B, Fragment as b, renderList as q, normalizeClass as W, toDisplayString as m, vModelText as X, createTextVNode as Z } from "vue";
2
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";
3
+ import { ElScrollbar as se, ElIcon as S, 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";
@@ -9,14 +9,14 @@ import "element-plus/theme-chalk/src/button.scss";
9
9
  import { useUpload as ne } from "../packages/components/hooks/useUpload.js";
10
10
  import { useFile as ae } from "../packages/components/hooks/useImg.js";
11
11
  import ie from "./operation-log-form.vue.js";
12
- import S from "./operation-log-content.vue.js";
12
+ import E from "./operation-log-content.vue.js";
13
13
  import le from "./operation-log-dialog.vue.js";
14
- import E from "../_virtual/dayjs.min.js";
14
+ import O from "../_virtual/dayjs.min.js";
15
15
  import { M2 as r } from "../utils/translate.js";
16
16
  import re from "../annex-upload/annex-upload.vue.js";
17
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 O, findGlobalNotes as ce } from "../packages/components/api/log/index.js";
19
+ import { insertGlobalnotes as U, findGlobalNotes as ce } from "../packages/components/api/log/index.js";
20
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"
@@ -32,8 +32,8 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
32
32
  topHeight: { default: 90 },
33
33
  ifShowDocument: { type: Boolean, default: !0 }
34
34
  },
35
- setup(U) {
36
- const c = U, { ifShowDocument: H } = G(c), g = d(!1), L = d(!1), _ = d(!1), I = d({}), l = R({
35
+ setup(H) {
36
+ const c = H, { ifShowDocument: L } = G(c), g = d(!1), I = d(!1), _ = d(!1), N = d({}), l = R({
37
37
  List: [],
38
38
  LoginId: 0
39
39
  }), h = d(""), v = d([]), o = {
@@ -60,17 +60,17 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
60
60
  })
61
61
  ), ce(e).then((t) => {
62
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 && (L.value = !0);
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
64
  }).finally(() => {
65
65
  g.value = !1;
66
66
  });
67
- }, N = () => {
67
+ }, w = () => {
68
68
  g.value || (g.value = !0, o.PageIndex += 1, y());
69
69
  }, P = (e) => {
70
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
71
  }, F = () => {
72
72
  v.value.length > 0 && C(v.value[0]).then(async () => {
73
- p.success(r("上传文件成功!")), o.PageIndex = 0, v.value = [], await y(), D();
73
+ p.success(r("上传文件成功!")), o.PageIndex = 0, v.value = [], await y(), M();
74
74
  });
75
75
  }, T = (e) => {
76
76
  C(e).then(() => {
@@ -78,15 +78,15 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
78
78
  });
79
79
  }, C = (e) => {
80
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), O(t);
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
82
  }, Y = () => {
83
83
  if (!h.value) {
84
84
  p.info(r("备注不能为空!"));
85
85
  return;
86
86
  }
87
87
  const e = new FormData();
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();
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
90
  });
91
91
  }, z = (e) => {
92
92
  if (e.clipboardData || e.originalEvent) {
@@ -100,7 +100,7 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
100
100
  e.clipboardData.files[t].size / 1024 / 1024 < 100 || p.error(r("上传文件大小不能超过 100MB!"));
101
101
  const { name: K } = e.clipboardData.files[t];
102
102
  ne("115", e.clipboardData.files[t]).then(($) => {
103
- I.value = {
103
+ N.value = {
104
104
  fileName: K || "",
105
105
  fileUrl: ae({ fileId: $[0] })
106
106
  };
@@ -109,13 +109,13 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
109
109
  }
110
110
  }
111
111
  }
112
- }, w = d(null), D = () => {
113
- w.value.scrollTo({ top: 0, behavior: "smooth" });
114
- }, M = d(0), V = d(null);
112
+ }, D = d(null), M = () => {
113
+ D.value.scrollTo({ top: 0, behavior: "smooth" });
114
+ }, V = d(0), k = d(null);
115
115
  return A(() => {
116
116
  var t;
117
117
  const e = (t = document.getElementsByClassName("log-form")[0]) == null ? void 0 : t.clientHeight;
118
- M.value = window.innerHeight - e - V.value.offsetHeight - c.topHeight, N();
118
+ V.value = window.innerHeight - e - k.value.offsetHeight - c.topHeight, w();
119
119
  }), (e, t) => (f(), u("div", ue, [
120
120
  a(ie, {
121
121
  ref: "logForm",
@@ -126,9 +126,9 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
126
126
  }, null, 8, ["business-key", "business-name"]),
127
127
  a(n(se), {
128
128
  ref_key: "infiniteList",
129
- ref: w,
129
+ ref: D,
130
130
  class: "infinite-list-wrapper",
131
- style: Q({ height: M.value + "px" })
131
+ style: Q({ height: V.value + "px" })
132
132
  }, {
133
133
  default: x(() => [
134
134
  (f(!0), u(b, null, q(l.List, (s) => (f(), u("div", {
@@ -139,12 +139,13 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
139
139
  i("div", null, [
140
140
  i("div", fe, [
141
141
  i("div", me, [
142
- a(S, {
142
+ a(E, {
143
143
  id: l.LoginId,
144
- info: s
145
- }, null, 8, ["id", "info"])
144
+ info: s,
145
+ "if-show-document": n(L)
146
+ }, null, 8, ["id", "info", "if-show-document"])
146
147
  ]),
147
- a(n(B), {
148
+ a(n(S), {
148
149
  color: "#f1f1f1",
149
150
  size: "20"
150
151
  }, {
@@ -154,14 +155,14 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
154
155
  _: 1
155
156
  })
156
157
  ]),
157
- i("div", pe, m(n(E)(s.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")), 1)
158
+ i("div", pe, m(n(O)(s.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")), 1)
158
159
  ]),
159
160
  i("div", ge, m(s.CreatedName), 1)
160
161
  ], 64)) : (f(), u(b, { key: 1 }, [
161
162
  i("div", he, m(s.CreatedName), 1),
162
163
  i("div", null, [
163
164
  i("div", ve, [
164
- a(n(B), {
165
+ a(n(S), {
165
166
  color: "#ccc",
166
167
  size: "20"
167
168
  }, {
@@ -171,29 +172,29 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
171
172
  _: 1
172
173
  }),
173
174
  i("div", ye, [
174
- a(S, {
175
+ a(E, {
175
176
  id: l.LoginId,
176
177
  info: s,
177
- "if-show-document": n(H)
178
+ "if-show-document": n(L)
178
179
  }, null, 8, ["id", "info", "if-show-document"])
179
180
  ])
180
181
  ]),
181
- i("div", _e, m(n(E)(s.CreatedOnStr).format("YYYY-MM-DD HH:mm:ss")), 1)
182
+ i("div", _e, m(n(O)(s.CreatedOnStr).format("YYYY-MM-DD HH:mm:ss")), 1)
182
183
  ])
183
184
  ], 64))
184
185
  ], 2))), 128)),
185
186
  a(n(de), {
186
187
  distance: 10,
187
- onInfinite: N
188
+ onInfinite: w
188
189
  }),
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)
190
+ g.value ? (f(), u("div", xe, m(n(r)("加载中...")), 1)) : B("", !0),
191
+ I.value ? (f(), u("div", be, m(n(r)("没有更多了!")), 1)) : B("", !0)
191
192
  ]),
192
193
  _: 1
193
194
  }, 8, ["style"]),
194
195
  J(i("textarea", {
195
196
  ref_key: "logText",
196
- ref: V,
197
+ ref: k,
197
198
  "onUpdate:modelValue": t[0] || (t[0] = (s) => h.value = s),
198
199
  class: "content-div",
199
200
  placeholder: n(r)("可通过 Ctrl+V 直接上传图片/文件"),
@@ -226,7 +227,7 @@ const ue = { class: "yahee-operation-log" }, fe = { class: "d-flex jc-end" }, me
226
227
  a(le, {
227
228
  modelValue: _.value,
228
229
  "onUpdate:modelValue": t[3] || (t[3] = (s) => _.value = s),
229
- "doc-info": I.value,
230
+ "doc-info": N.value,
230
231
  onConfirmUpload: T
231
232
  }, null, 8, ["modelValue", "doc-info"])
232
233
  ]));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.46",
4
+ "version": "0.0.47",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",