nbb-component-ui 1.4.8 → 1.5.0

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/dist/index.es.js CHANGED
@@ -1,86 +1,649 @@
1
- import { defineComponent as y, ref as n, watch as k, resolveComponent as w, openBlock as C, createBlock as b, withCtx as q, createTextVNode as x } from "vue";
2
- import { ElMessage as i } from "element-plus";
3
- const P = (s) => _().get({
1
+ import { defineComponent as dt, resolveComponent as Z, openBlock as I, createElementBlock as U, createElementVNode as Y, toDisplayString as m, unref as K, createCommentVNode as P, createVNode as R, withCtx as J, Fragment as ht, renderList as Mt, createBlock as lt, createTextVNode as tt, ref as X, watch as wt } from "vue";
2
+ import { ElMessage as ct } from "element-plus";
3
+ const Dt = (a) => yt().get({
4
4
  url: "/system/bpm/process-instance/get-approval-detail",
5
5
  params: {
6
- processInstanceId: s
6
+ processInstanceId: a
7
7
  }
8
- }), T = (s) => _().get({
8
+ }), bt = (a) => yt().get({
9
9
  url: "/system/bpm/task/list-by-process-instance-id",
10
10
  params: {
11
- processInstanceId: s
11
+ processInstanceId: a
12
12
  }
13
- }), F = /* @__PURE__ */ y({
13
+ });
14
+ var pt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
15
+ function $t(a) {
16
+ return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
17
+ }
18
+ var gt = { exports: {} };
19
+ (function(a, d) {
20
+ (function(l, v) {
21
+ a.exports = v();
22
+ })(pt, function() {
23
+ var l = 1e3, v = 6e4, g = 36e5, H = "millisecond", D = "second", y = "minute", f = "hour", x = "day", j = "week", b = "month", T = "quarter", r = "year", p = "date", o = "Invalid Date", k = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, N = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, L = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(i) {
24
+ var n = ["th", "st", "nd", "rd"], t = i % 100;
25
+ return "[" + i + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
26
+ } }, O = function(i, n, t) {
27
+ var s = String(i);
28
+ return !s || s.length >= n ? i : "" + Array(n + 1 - s.length).join(t) + i;
29
+ }, z = { s: O, z: function(i) {
30
+ var n = -i.utcOffset(), t = Math.abs(n), s = Math.floor(t / 60), e = t % 60;
31
+ return (n <= 0 ? "+" : "-") + O(s, 2, "0") + ":" + O(e, 2, "0");
32
+ }, m: function i(n, t) {
33
+ if (n.date() < t.date())
34
+ return -i(t, n);
35
+ var s = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(s, b), c = t - e < 0, u = n.clone().add(s + (c ? -1 : 1), b);
36
+ return +(-(s + (t - e) / (c ? e - u : u - e)) || 0);
37
+ }, a: function(i) {
38
+ return i < 0 ? Math.ceil(i) || 0 : Math.floor(i);
39
+ }, p: function(i) {
40
+ return { M: b, y: r, w: j, d: x, D: p, h: f, m: y, s: D, ms: H, Q: T }[i] || String(i || "").toLowerCase().replace(/s$/, "");
41
+ }, u: function(i) {
42
+ return i === void 0;
43
+ } }, q = "en", W = {};
44
+ W[q] = L;
45
+ var G = "$isDayjsObject", et = function(i) {
46
+ return i instanceof rt || !(!i || !i[G]);
47
+ }, A = function i(n, t, s) {
48
+ var e;
49
+ if (!n)
50
+ return q;
51
+ if (typeof n == "string") {
52
+ var c = n.toLowerCase();
53
+ W[c] && (e = c), t && (W[c] = t, e = c);
54
+ var u = n.split("-");
55
+ if (!e && u.length > 1)
56
+ return i(u[0]);
57
+ } else {
58
+ var $ = n.name;
59
+ W[$] = n, e = $;
60
+ }
61
+ return !s && e && (q = e), e || !s && q;
62
+ }, M = function(i, n) {
63
+ if (et(i))
64
+ return i.clone();
65
+ var t = typeof n == "object" ? n : {};
66
+ return t.date = i, t.args = arguments, new rt(t);
67
+ }, h = z;
68
+ h.l = A, h.i = et, h.w = function(i, n) {
69
+ return M(i, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
70
+ };
71
+ var rt = function() {
72
+ function i(t) {
73
+ this.$L = A(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[G] = !0;
74
+ }
75
+ var n = i.prototype;
76
+ return n.parse = function(t) {
77
+ this.$d = function(s) {
78
+ var e = s.date, c = s.utc;
79
+ if (e === null)
80
+ return /* @__PURE__ */ new Date(NaN);
81
+ if (h.u(e))
82
+ return /* @__PURE__ */ new Date();
83
+ if (e instanceof Date)
84
+ return new Date(e);
85
+ if (typeof e == "string" && !/Z$/i.test(e)) {
86
+ var u = e.match(k);
87
+ if (u) {
88
+ var $ = u[2] - 1 || 0, _ = (u[7] || "0").substring(0, 3);
89
+ return c ? new Date(Date.UTC(u[1], $, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, _)) : new Date(u[1], $, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, _);
90
+ }
91
+ }
92
+ return new Date(e);
93
+ }(t), this.init();
94
+ }, n.init = function() {
95
+ var t = this.$d;
96
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
97
+ }, n.$utils = function() {
98
+ return h;
99
+ }, n.isValid = function() {
100
+ return this.$d.toString() !== o;
101
+ }, n.isSame = function(t, s) {
102
+ var e = M(t);
103
+ return this.startOf(s) <= e && e <= this.endOf(s);
104
+ }, n.isAfter = function(t, s) {
105
+ return M(t) < this.startOf(s);
106
+ }, n.isBefore = function(t, s) {
107
+ return this.endOf(s) < M(t);
108
+ }, n.$g = function(t, s, e) {
109
+ return h.u(t) ? this[s] : this.set(e, t);
110
+ }, n.unix = function() {
111
+ return Math.floor(this.valueOf() / 1e3);
112
+ }, n.valueOf = function() {
113
+ return this.$d.getTime();
114
+ }, n.startOf = function(t, s) {
115
+ var e = this, c = !!h.u(s) || s, u = h.p(t), $ = function(V, C) {
116
+ var E = h.w(e.$u ? Date.UTC(e.$y, C, V) : new Date(e.$y, C, V), e);
117
+ return c ? E : E.endOf(x);
118
+ }, _ = function(V, C) {
119
+ return h.w(e.toDate()[V].apply(e.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(C)), e);
120
+ }, w = this.$W, S = this.$M, F = this.$D, Q = "set" + (this.$u ? "UTC" : "");
121
+ switch (u) {
122
+ case r:
123
+ return c ? $(1, 0) : $(31, 11);
124
+ case b:
125
+ return c ? $(1, S) : $(0, S + 1);
126
+ case j:
127
+ var B = this.$locale().weekStart || 0, nt = (w < B ? w + 7 : w) - B;
128
+ return $(c ? F - nt : F + (6 - nt), S);
129
+ case x:
130
+ case p:
131
+ return _(Q + "Hours", 0);
132
+ case f:
133
+ return _(Q + "Minutes", 1);
134
+ case y:
135
+ return _(Q + "Seconds", 2);
136
+ case D:
137
+ return _(Q + "Milliseconds", 3);
138
+ default:
139
+ return this.clone();
140
+ }
141
+ }, n.endOf = function(t) {
142
+ return this.startOf(t, !1);
143
+ }, n.$set = function(t, s) {
144
+ var e, c = h.p(t), u = "set" + (this.$u ? "UTC" : ""), $ = (e = {}, e[x] = u + "Date", e[p] = u + "Date", e[b] = u + "Month", e[r] = u + "FullYear", e[f] = u + "Hours", e[y] = u + "Minutes", e[D] = u + "Seconds", e[H] = u + "Milliseconds", e)[c], _ = c === x ? this.$D + (s - this.$W) : s;
145
+ if (c === b || c === r) {
146
+ var w = this.clone().set(p, 1);
147
+ w.$d[$](_), w.init(), this.$d = w.set(p, Math.min(this.$D, w.daysInMonth())).$d;
148
+ } else
149
+ $ && this.$d[$](_);
150
+ return this.init(), this;
151
+ }, n.set = function(t, s) {
152
+ return this.clone().$set(t, s);
153
+ }, n.get = function(t) {
154
+ return this[h.p(t)]();
155
+ }, n.add = function(t, s) {
156
+ var e, c = this;
157
+ t = Number(t);
158
+ var u = h.p(s), $ = function(S) {
159
+ var F = M(c);
160
+ return h.w(F.date(F.date() + Math.round(S * t)), c);
161
+ };
162
+ if (u === b)
163
+ return this.set(b, this.$M + t);
164
+ if (u === r)
165
+ return this.set(r, this.$y + t);
166
+ if (u === x)
167
+ return $(1);
168
+ if (u === j)
169
+ return $(7);
170
+ var _ = (e = {}, e[y] = v, e[f] = g, e[D] = l, e)[u] || 1, w = this.$d.getTime() + t * _;
171
+ return h.w(w, this);
172
+ }, n.subtract = function(t, s) {
173
+ return this.add(-1 * t, s);
174
+ }, n.format = function(t) {
175
+ var s = this, e = this.$locale();
176
+ if (!this.isValid())
177
+ return e.invalidDate || o;
178
+ var c = t || "YYYY-MM-DDTHH:mm:ssZ", u = h.z(this), $ = this.$H, _ = this.$m, w = this.$M, S = e.weekdays, F = e.months, Q = e.meridiem, B = function(C, E, st, ot) {
179
+ return C && (C[E] || C(s, c)) || st[E].slice(0, ot);
180
+ }, nt = function(C) {
181
+ return h.s($ % 12 || 12, C, "0");
182
+ }, V = Q || function(C, E, st) {
183
+ var ot = C < 12 ? "AM" : "PM";
184
+ return st ? ot.toLowerCase() : ot;
185
+ };
186
+ return c.replace(N, function(C, E) {
187
+ return E || function(st) {
188
+ switch (st) {
189
+ case "YY":
190
+ return String(s.$y).slice(-2);
191
+ case "YYYY":
192
+ return h.s(s.$y, 4, "0");
193
+ case "M":
194
+ return w + 1;
195
+ case "MM":
196
+ return h.s(w + 1, 2, "0");
197
+ case "MMM":
198
+ return B(e.monthsShort, w, F, 3);
199
+ case "MMMM":
200
+ return B(F, w);
201
+ case "D":
202
+ return s.$D;
203
+ case "DD":
204
+ return h.s(s.$D, 2, "0");
205
+ case "d":
206
+ return String(s.$W);
207
+ case "dd":
208
+ return B(e.weekdaysMin, s.$W, S, 2);
209
+ case "ddd":
210
+ return B(e.weekdaysShort, s.$W, S, 3);
211
+ case "dddd":
212
+ return S[s.$W];
213
+ case "H":
214
+ return String($);
215
+ case "HH":
216
+ return h.s($, 2, "0");
217
+ case "h":
218
+ return nt(1);
219
+ case "hh":
220
+ return nt(2);
221
+ case "a":
222
+ return V($, _, !0);
223
+ case "A":
224
+ return V($, _, !1);
225
+ case "m":
226
+ return String(_);
227
+ case "mm":
228
+ return h.s(_, 2, "0");
229
+ case "s":
230
+ return String(s.$s);
231
+ case "ss":
232
+ return h.s(s.$s, 2, "0");
233
+ case "SSS":
234
+ return h.s(s.$ms, 3, "0");
235
+ case "Z":
236
+ return u;
237
+ }
238
+ return null;
239
+ }(C) || u.replace(":", "");
240
+ });
241
+ }, n.utcOffset = function() {
242
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
243
+ }, n.diff = function(t, s, e) {
244
+ var c, u = this, $ = h.p(s), _ = M(t), w = (_.utcOffset() - this.utcOffset()) * v, S = this - _, F = function() {
245
+ return h.m(u, _);
246
+ };
247
+ switch ($) {
248
+ case r:
249
+ c = F() / 12;
250
+ break;
251
+ case b:
252
+ c = F();
253
+ break;
254
+ case T:
255
+ c = F() / 3;
256
+ break;
257
+ case j:
258
+ c = (S - w) / 6048e5;
259
+ break;
260
+ case x:
261
+ c = (S - w) / 864e5;
262
+ break;
263
+ case f:
264
+ c = S / g;
265
+ break;
266
+ case y:
267
+ c = S / v;
268
+ break;
269
+ case D:
270
+ c = S / l;
271
+ break;
272
+ default:
273
+ c = S;
274
+ }
275
+ return e ? c : h.a(c);
276
+ }, n.daysInMonth = function() {
277
+ return this.endOf(b).$D;
278
+ }, n.$locale = function() {
279
+ return W[this.$L];
280
+ }, n.locale = function(t, s) {
281
+ if (!t)
282
+ return this.$L;
283
+ var e = this.clone(), c = A(t, s, !0);
284
+ return c && (e.$L = c), e;
285
+ }, n.clone = function() {
286
+ return h.w(this.$d, this);
287
+ }, n.toDate = function() {
288
+ return new Date(this.valueOf());
289
+ }, n.toJSON = function() {
290
+ return this.isValid() ? this.toISOString() : null;
291
+ }, n.toISOString = function() {
292
+ return this.$d.toISOString();
293
+ }, n.toString = function() {
294
+ return this.$d.toUTCString();
295
+ }, i;
296
+ }(), ut = rt.prototype;
297
+ return M.prototype = ut, [["$ms", H], ["$s", D], ["$m", y], ["$H", f], ["$W", x], ["$M", b], ["$y", r], ["$D", p]].forEach(function(i) {
298
+ ut[i[1]] = function(n) {
299
+ return this.$g(n, i[0], i[1]);
300
+ };
301
+ }), M.extend = function(i, n) {
302
+ return i.$i || (i(n, rt, M), i.$i = !0), M;
303
+ }, M.locale = A, M.isDayjs = et, M.unix = function(i) {
304
+ return M(1e3 * i);
305
+ }, M.en = W[q], M.Ls = W, M.p = {}, M;
306
+ });
307
+ })(gt);
308
+ var Tt = gt.exports;
309
+ const mt = /* @__PURE__ */ $t(Tt);
310
+ var vt = { exports: {} };
311
+ (function(a, d) {
312
+ (function(l, v) {
313
+ a.exports = v();
314
+ })(pt, function() {
315
+ var l = "minute", v = /[+-]\d\d(?::?\d\d)?/g, g = /([+-]|\d\d)/g;
316
+ return function(H, D, y) {
317
+ var f = D.prototype;
318
+ y.utc = function(o) {
319
+ var k = { date: o, utc: !0, args: arguments };
320
+ return new D(k);
321
+ }, f.utc = function(o) {
322
+ var k = y(this.toDate(), { locale: this.$L, utc: !0 });
323
+ return o ? k.add(this.utcOffset(), l) : k;
324
+ }, f.local = function() {
325
+ return y(this.toDate(), { locale: this.$L, utc: !1 });
326
+ };
327
+ var x = f.parse;
328
+ f.parse = function(o) {
329
+ o.utc && (this.$u = !0), this.$utils().u(o.$offset) || (this.$offset = o.$offset), x.call(this, o);
330
+ };
331
+ var j = f.init;
332
+ f.init = function() {
333
+ if (this.$u) {
334
+ var o = this.$d;
335
+ this.$y = o.getUTCFullYear(), this.$M = o.getUTCMonth(), this.$D = o.getUTCDate(), this.$W = o.getUTCDay(), this.$H = o.getUTCHours(), this.$m = o.getUTCMinutes(), this.$s = o.getUTCSeconds(), this.$ms = o.getUTCMilliseconds();
336
+ } else
337
+ j.call(this);
338
+ };
339
+ var b = f.utcOffset;
340
+ f.utcOffset = function(o, k) {
341
+ var N = this.$utils().u;
342
+ if (N(o))
343
+ return this.$u ? 0 : N(this.$offset) ? b.call(this) : this.$offset;
344
+ if (typeof o == "string" && (o = function(q) {
345
+ q === void 0 && (q = "");
346
+ var W = q.match(v);
347
+ if (!W)
348
+ return null;
349
+ var G = ("" + W[0]).match(g) || ["-", 0, 0], et = G[0], A = 60 * +G[1] + +G[2];
350
+ return A === 0 ? 0 : et === "+" ? A : -A;
351
+ }(o), o === null))
352
+ return this;
353
+ var L = Math.abs(o) <= 16 ? 60 * o : o;
354
+ if (L === 0)
355
+ return this.utc(k);
356
+ var O = this.clone();
357
+ if (k)
358
+ return O.$offset = L, O.$u = !1, O;
359
+ var z = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
360
+ return (O = this.local().add(L + z, l)).$offset = L, O.$x.$localOffset = z, O;
361
+ };
362
+ var T = f.format;
363
+ f.format = function(o) {
364
+ var k = o || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
365
+ return T.call(this, k);
366
+ }, f.valueOf = function() {
367
+ var o = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
368
+ return this.$d.valueOf() - 6e4 * o;
369
+ }, f.isUTC = function() {
370
+ return !!this.$u;
371
+ }, f.toISOString = function() {
372
+ return this.toDate().toISOString();
373
+ }, f.toString = function() {
374
+ return this.toDate().toUTCString();
375
+ };
376
+ var r = f.toDate;
377
+ f.toDate = function(o) {
378
+ return o === "s" && this.$offset ? y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : r.call(this);
379
+ };
380
+ var p = f.diff;
381
+ f.diff = function(o, k, N) {
382
+ if (o && this.$u === o.$u)
383
+ return p.call(this, o, k, N);
384
+ var L = this.local(), O = y(o).local();
385
+ return p.call(L, O, k, N);
386
+ };
387
+ };
388
+ });
389
+ })(vt);
390
+ var kt = vt.exports;
391
+ const St = /* @__PURE__ */ $t(kt);
392
+ mt.extend(St);
393
+ function Ot() {
394
+ let a = (/* @__PURE__ */ new Date()).getTimezoneOffset();
395
+ const d = Math.abs(Math.floor(a / 60)), l = a < 0 ? "+" : "-";
396
+ return a = Math.abs(a % 60), l + d.toString().padStart(2, "0") + a.toString().padStart(2, "0");
397
+ }
398
+ function at(a, d, l) {
399
+ return a ? (d === void 0 && (d = "YYYY-MM-DD HH:mm:ss"), l || (l = Ot()), mt.utc(a).utcOffset(l).format(d)) : "";
400
+ }
401
+ const It = {
402
+ cn: {
403
+ seconds: "秒",
404
+ minutes: "分钟",
405
+ hours: "小时",
406
+ days: "天"
407
+ },
408
+ en: {
409
+ seconds: "s",
410
+ minutes: "m",
411
+ hours: "h",
412
+ days: "d"
413
+ }
414
+ };
415
+ function ft(a, d = "cn") {
416
+ const l = It[d], v = Math.floor(a / (24 * 60 * 60 * 1e3)), g = Math.floor(a / (60 * 60 * 1e3) - v * 24), H = Math.floor(a / (60 * 1e3) - v * 24 * 60 - g * 60), D = Math.floor(a / 1e3 - v * 24 * 60 * 60 - g * 60 * 60 - H * 60);
417
+ return v > 0 ? v + l.days + g + l.hours + H + l.minutes : g > 0 ? g + l.hours + H + l.minutes : H > 0 ? H + l.minutes : D > 0 ? D + l.seconds : 0 + l.seconds;
418
+ }
419
+ const xt = { class: "scroll-area" }, Ct = { class: "flow-header flex justify-between" }, Yt = { class: "text-18px font-bold" }, Ht = {
420
+ class: "text-14px font-bold",
421
+ style: { color: "#005aae" }
422
+ }, Ut = { class: "flex items-center" }, Ft = { class: "flow-start" }, Lt = { key: 0 }, Pt = { class: "mt-30px block" }, jt = ["src"], Nt = { style: { "font-weight": "700" } }, Wt = {
423
+ key: 0,
424
+ style: { "margin-right": "30px", "font-weight": "normal" }
425
+ }, qt = {
426
+ key: 1,
427
+ style: { "margin-right": "30px", "font-weight": "normal" }
428
+ }, At = {
429
+ key: 0,
430
+ style: { "font-weight": "normal" }
431
+ }, Et = {
432
+ key: 1,
433
+ style: { "font-weight": "normal", color: "#8a909c" }
434
+ }, zt = {
435
+ key: 2,
436
+ style: { "font-weight": "normal" }
437
+ }, Bt = {
438
+ key: 3,
439
+ style: { "font-weight": "normal", color: "#8a909c" }
440
+ }, Vt = {
441
+ key: 4,
442
+ style: { "margin-left": "30px", "font-weight": "normal" }
443
+ }, Zt = {
444
+ key: 5,
445
+ style: { "font-weight": "normal", color: "#8a909c" }
446
+ }, Jt = { key: 2 }, Rt = /* @__PURE__ */ dt({
447
+ name: "BpmProcessInstanceTaskList",
448
+ __name: "CmcFlowList",
449
+ props: {
450
+ processInstance: {},
451
+ tasks: {}
452
+ },
453
+ setup(a) {
454
+ const d = (g) => g, l = {
455
+ 1: "svg-icon:approvalPending",
456
+ // 审批中
457
+ 2: "svg-icon:approvalPass",
458
+ // 通过
459
+ 3: "svg-icon:approvalRejected",
460
+ // 拒绝
461
+ 4: "svg-icon:approvalCanceled"
462
+ // 取消
463
+ }, v = (g) => [0, 1, 6, 7].includes(g.status) ? "primary" : g.status === 2 ? "success" : g.status === 3 ? "danger" : g.status === 4 ? "info" : g.status === 5 ? "warning" : "";
464
+ return (g, H) => {
465
+ var T;
466
+ const D = Z("Icon"), y = Z("dict-tag"), f = Z("el-tag"), x = Z("el-card"), j = Z("el-timeline-item"), b = Z("el-timeline");
467
+ return I(), U("div", xt, [
468
+ Y("div", Ct, [
469
+ Y("div", Yt, [
470
+ Y("span", null, m(d("processFlow.flow")), 1),
471
+ Y("span", null, m(a.processInstance.id), 1)
472
+ ]),
473
+ Y("div", Ht, [
474
+ Y("span", null, m(a.processInstance.name), 1)
475
+ ])
476
+ ]),
477
+ Y("div", Ut, [
478
+ Y("div", Ft, [
479
+ Y("p", null, m(d("processFlow.startTime")) + m(K(at)(a.processInstance.startTime)), 1),
480
+ Y("p", null, m(d("processFlow.endTime")) + m(K(at)(a.processInstance.endTime)), 1),
481
+ a.processInstance.durationInMillis ? (I(), U("p", Lt, m(d("processFlow.duration")) + m(K(ft)((T = a.processInstance) == null ? void 0 : T.durationInMillis)), 1)) : P("", !0)
482
+ ]),
483
+ R(D, {
484
+ size: 100,
485
+ icon: l[a.processInstance.status] || "svg-icon:approvalPending"
486
+ }, null, 8, ["icon"])
487
+ ]),
488
+ Y("div", Pt, [
489
+ R(b, null, {
490
+ default: J(() => [
491
+ (I(!0), U(ht, null, Mt(a.tasks, (r, p) => (I(), lt(j, {
492
+ key: p,
493
+ type: v(r) || "info"
494
+ }, {
495
+ dot: J(() => {
496
+ var o;
497
+ return [
498
+ Y("img", {
499
+ src: ((o = r == null ? void 0 : r.assigneeUser) == null ? void 0 : o.avatar) || "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
500
+ class: "avatar-wrap"
501
+ }, null, 8, jt)
502
+ ];
503
+ }),
504
+ default: J(() => [
505
+ Y("p", Nt, [
506
+ tt(m(r.name) + " ", 1),
507
+ r.status ? (I(), lt(y, {
508
+ key: 0,
509
+ type: "bpm_task_status",
510
+ value: r.status || ""
511
+ }, null, 8, ["value"])) : P("", !0)
512
+ ]),
513
+ R(x, { "body-style": { padding: "10px" } }, {
514
+ default: J(() => {
515
+ var o, k, N, L;
516
+ return [
517
+ p === 0 ? (I(), U("label", Wt, [
518
+ tt(m(((o = r.assigneeUser) == null ? void 0 : o.nickname) || ((k = r.ownerUser) == null ? void 0 : k.nickname)) + " ", 1),
519
+ R(f, {
520
+ size: "small",
521
+ type: "info",
522
+ style: { "vertical-align": "1px" }
523
+ }, {
524
+ default: J(() => {
525
+ var O, z;
526
+ return [
527
+ tt(m((z = (O = a.processInstance) == null ? void 0 : O.startUser) == null ? void 0 : z.deptName), 1)
528
+ ];
529
+ }),
530
+ _: 1
531
+ })
532
+ ])) : P("", !0),
533
+ r.assigneeUser ? (I(), U("label", qt, [
534
+ tt(m(d("processFlow.approver")) + m(((N = r.assigneeUser) == null ? void 0 : N.nickname) || ((L = r.ownerUser) == null ? void 0 : L.nickname)) + " ", 1),
535
+ R(f, {
536
+ size: "small",
537
+ type: "info",
538
+ style: { "vertical-align": "1px" }
539
+ }, {
540
+ default: J(() => [
541
+ tt(m(r.assigneeUser.deptName), 1)
542
+ ]),
543
+ _: 2
544
+ }, 1024)
545
+ ])) : P("", !0),
546
+ Y("div", null, [
547
+ r.createTime && !r.endTime ? (I(), U("label", At, m(d("processFlow.createTime")), 1)) : P("", !0),
548
+ r.createTime && !r.endTime ? (I(), U("label", Et, m(K(at)(r == null ? void 0 : r.createTime, "MM-DD HH:mm")), 1)) : P("", !0),
549
+ r.endTime ? (I(), U("label", zt, m(d("processFlow.approvalTime")), 1)) : P("", !0),
550
+ r.endTime ? (I(), U("label", Bt, m(K(at)(r == null ? void 0 : r.endTime, "MM-DD HH:mm")), 1)) : P("", !0),
551
+ r.durationInMillis ? (I(), U("label", Vt, m(d("processFlow.duration")), 1)) : P("", !0),
552
+ r.durationInMillis ? (I(), U("label", Zt, m(K(ft)(r == null ? void 0 : r.durationInMillis)), 1)) : P("", !0)
553
+ ]),
554
+ r.reason ? (I(), U("div", Jt, m(d("processFlow.approvalSuggestion")) + m(r.reason), 1)) : P("", !0)
555
+ ];
556
+ }),
557
+ _: 2
558
+ }, 1024)
559
+ ]),
560
+ _: 2
561
+ }, 1032, ["type"]))), 128))
562
+ ]),
563
+ _: 1
564
+ })
565
+ ])
566
+ ]);
567
+ };
568
+ }
569
+ });
570
+ const _t = (a, d) => {
571
+ const l = a.__vccOpts || a;
572
+ for (const [v, g] of d)
573
+ l[v] = g;
574
+ return l;
575
+ }, Gt = /* @__PURE__ */ _t(Rt, [["__scopeId", "data-v-f8ad04ec"]]), Qt = /* @__PURE__ */ dt({
14
576
  __name: "CmcProcessFlow",
15
577
  props: {
16
578
  processInstanceId: {},
17
579
  request: {}
18
580
  },
19
- setup(s) {
20
- const t = s, r = n(!1), p = n({}), u = n({}), m = n(""), f = n([]), a = n(""), v = (o) => {
21
- a.value = o, d(), g();
22
- }, d = async () => {
23
- var o, c;
581
+ setup(a) {
582
+ const d = a, l = X(!1), v = X({}), g = X({}), H = X(""), D = X([]), y = X(""), f = (T) => {
583
+ y.value = T, x(), j();
584
+ }, x = async () => {
585
+ var T, r;
24
586
  try {
25
- r.value = !0;
26
- const e = await P(a.value);
27
- if (!e) {
28
- i.error("查询不到审批详情信息!");
587
+ l.value = !0;
588
+ const p = await Dt(y.value);
589
+ if (!p) {
590
+ ct.error("查询不到审批详情信息!");
29
591
  return;
30
592
  }
31
- if (!e.processDefinition || !e.processInstance) {
32
- i.error("查询不到流程信息!");
593
+ if (!p.processDefinition || !p.processInstance) {
594
+ ct.error("查询不到流程信息!");
33
595
  return;
34
596
  }
35
- p.value = e == null ? void 0 : e.processInstance, m.value = (c = (o = e == null ? void 0 : e.processInstance) == null ? void 0 : o.formVariables) == null ? void 0 : c.applicationPrefix, u.value = e == null ? void 0 : e.todoTask;
597
+ v.value = p == null ? void 0 : p.processInstance, H.value = (r = (T = p == null ? void 0 : p.processInstance) == null ? void 0 : T.formVariables) == null ? void 0 : r.applicationPrefix, g.value = p == null ? void 0 : p.todoTask;
36
598
  } finally {
37
- r.value = !1;
599
+ l.value = !1;
38
600
  }
39
- }, g = async () => {
40
- f.value = await T(a.value);
601
+ }, j = async () => {
602
+ D.value = await bt(y.value);
41
603
  };
42
- k(
43
- () => t.processInstanceId,
44
- (o) => {
45
- o && o !== a.value && v(o);
604
+ wt(
605
+ () => d.processInstanceId,
606
+ (T) => {
607
+ T && T !== y.value && f(T);
46
608
  },
47
609
  { immediate: !0, deep: !0 }
48
610
  );
49
- const I = () => {
50
- i.success("aaa!");
611
+ const b = () => {
612
+ ct.success("aaa!");
51
613
  };
52
- return (o, c) => {
53
- const e = w("el-button");
54
- return C(), b(e, { onClick: I }, {
55
- default: q(() => [...c[0] || (c[0] = [
56
- x("测试按钮3", -1)
57
- ])]),
58
- _: 1
59
- });
614
+ return (T, r) => {
615
+ const p = Z("el-button");
616
+ return I(), U(ht, null, [
617
+ R(p, { onClick: b }, {
618
+ default: J(() => [...r[0] || (r[0] = [
619
+ tt("测试按钮3", -1)
620
+ ])]),
621
+ _: 1
622
+ }),
623
+ R(Gt, {
624
+ "process-instance": v.value,
625
+ tasks: D.value
626
+ }, null, 8, ["process-instance", "tasks"])
627
+ ], 64);
60
628
  };
61
629
  }
62
630
  });
63
- const h = (s, t) => {
64
- const r = s.__vccOpts || s;
65
- for (const [p, u] of t)
66
- r[p] = u;
67
- return r;
68
- }, B = /* @__PURE__ */ h(F, [["__scopeId", "data-v-caaead34"]]);
69
- let l = null;
70
- const L = {
71
- install(s, t) {
72
- if (console.log("插件install执行,options:", t), !(t != null && t.request))
631
+ const Kt = /* @__PURE__ */ _t(Qt, [["__scopeId", "data-v-c28ed26a"]]);
632
+ let it = null;
633
+ const ee = {
634
+ install(a, d) {
635
+ if (console.log("插件install执行,options:", d), !(d != null && d.request))
73
636
  throw new Error("请在 app.use(NbbComponentUi) 时传入 { request }");
74
- l = t.request, s.component("CmcProcessFlow", B);
637
+ it = d.request, a.component("CmcProcessFlow", Kt);
75
638
  }
76
639
  };
77
- function _() {
78
- if (console.log("getRequest", l), !l)
640
+ function yt() {
641
+ if (console.log("getRequest", it), !it)
79
642
  throw new Error("没有_request对象");
80
- return l;
643
+ return it;
81
644
  }
82
645
  export {
83
- B as CmcProcessFlow,
84
- L as default,
85
- _ as getRequest
646
+ Kt as CmcProcessFlow,
647
+ ee as default,
648
+ yt as getRequest
86
649
  };