xyvcard-itsm-flow 0.0.11 → 0.0.13

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,13 +1,13 @@
1
- import { defineComponent as X, mergeModels as Y, ref as m, useModel as Z, resolveComponent as d, createElementBlock as g, openBlock as b, Fragment as M, createVNode as e, withCtx as l, createElementVNode as o, createTextVNode as s, toDisplayString as r, unref as F, createBlock as S, createCommentVNode as B, renderList as ee } from "vue";
1
+ import { defineComponent as Y, mergeModels as Z, ref as m, useModel as ee, resolveComponent as d, createElementBlock as A, openBlock as b, Fragment as O, createVNode as e, withCtx as l, createElementVNode as n, createTextVNode as u, toDisplayString as r, unref as f, createBlock as $, createCommentVNode as h, renderList as le } from "vue";
2
2
  import "element-plus";
3
- import { D as k, i as A, C as le, u as ae, a as te } from "./index-C7wI2ALv.mjs";
3
+ import { D as k, i as V, C as w, u as ae, a as te } from "./index-CMpeLVvR.mjs";
4
4
  import { handlePreview as oe } from "jmash-core";
5
5
  import { useI18n as ne } from "vue-i18n";
6
6
  import { F as se } from "./FileSaver.min-5d27MsC6.mjs";
7
- import { E as L } from "./el-message-So7u3ZRi.mjs";
8
- const _e = /* @__PURE__ */ X({
7
+ import { E as S } from "./el-message-DweX1k3E.mjs";
8
+ const _e = /* @__PURE__ */ Y({
9
9
  __name: "index",
10
- props: /* @__PURE__ */ Y({
10
+ props: /* @__PURE__ */ Z({
11
11
  task: {
12
12
  type: Object,
13
13
  default: () => {
@@ -18,83 +18,85 @@ const _e = /* @__PURE__ */ X({
18
18
  modelModifiers: {}
19
19
  }),
20
20
  emits: ["update:modelValue"],
21
- setup($, { expose: O }) {
22
- const { t: w } = ne(), U = () => {
23
- A.exportFilePdf({ acceptanceId: V.value.acceptanceId }).then((a) => {
24
- const u = new Blob([a.data], {
21
+ setup(I, { expose: j }) {
22
+ const { t: y } = ne(), K = () => {
23
+ V.exportFilePdf({ acceptanceId: D.value.acceptanceId }).then((a) => {
24
+ const o = new Blob([a.data], {
25
25
  type: "application/octet-stream"
26
26
  });
27
- se.saveAs(u, w("itsmFlowAcceptance.name") + ".pdf");
27
+ se.saveAs(o, y("itsmFlowAcceptance.name") + ".pdf");
28
28
  });
29
29
  };
30
30
  k.orgIdBizDict.useValues();
31
- const _ = $, V = m({
31
+ const _ = I, D = m({
32
32
  acceptanceId: _.task.businessKey
33
- }), c = m({}), f = Z($, "modelValue"), I = m(), j = m({}), y = m(!1), h = m(), p = m([]), D = m();
33
+ }), c = m({}), v = ee(I, "modelValue"), E = m(), P = m({}), N = m(!1), M = m(), p = m([]), B = m();
34
34
  function q() {
35
- y.value = !0, h.value.clearFileList();
35
+ N.value = !0, M.value.clearFileList();
36
36
  }
37
- function K(a) {
37
+ function U(a) {
38
38
  p == null || p.value.splice(a, 1);
39
39
  }
40
- function P(a) {
41
- const u = {
40
+ function z(a) {
41
+ const o = {
42
42
  fileName: a.name,
43
43
  fileId: a.response.fileId
44
44
  };
45
- p == null || p.value.push(u), p.value = [...new Set(p.value)], D.value = {
45
+ p == null || p.value.push(o), p.value = [...new Set(p.value)], B.value = {
46
46
  requestId: Math.random() * 10 + "",
47
47
  taskId: _.task.id,
48
48
  name: a.name,
49
49
  type: a.response.contentType,
50
50
  url: a.response.fileSrc
51
- }, z();
51
+ }, R();
52
52
  }
53
- function z() {
54
- te.uploadFile(D.value).then(() => {
55
- L.success(w("common.uploadSuccess"));
53
+ function R() {
54
+ te.uploadFile(B.value).then(() => {
55
+ S.success(y("common.uploadSuccess"));
56
56
  }).catch(() => {
57
- L.error(w("common.uploadError"));
57
+ S.error(y("common.uploadError"));
58
58
  });
59
59
  }
60
- function R() {
61
- A.findFilesList({ actionId: _.task.businessKey }).then(({ data: a }) => {
62
- c.value.files = a.results;
60
+ function T() {
61
+ V.findFilesList({ actionId: _.task.businessKey }).then(({ data: a }) => {
62
+ a.results.forEach((o) => {
63
+ o.filePath = o.fileSrc;
64
+ }), c.value.files = a.results;
63
65
  });
64
66
  }
65
- _.task.businessKey && T(), O({
66
- changeModel: () => W()
67
+ _.task.businessKey && W(), j({
68
+ changeModel: () => x()
67
69
  });
68
- function T() {
69
- A.findById({ acceptanceId: V.value.acceptanceId }).then(({ data: a }) => {
70
+ function W() {
71
+ V.findById({ acceptanceId: D.value.acceptanceId }).then(({ data: a }) => {
70
72
  c.value = Object.assign(c.value, a);
71
- }), R();
73
+ }), T();
72
74
  }
73
- function W() {
74
- return f.value && (f.value.selectActions = [
75
+ function x() {
76
+ return v.value && (v.value.selectActions = [
75
77
  { key: "true", value: "同意" },
76
78
  { key: "false", value: "不同意" }
77
- ], f.value.varName = "approved", f.value.module = "", f.value.module = le.MODULE_ITSMFLOW), new Promise((a, u) => {
79
+ ], v.value.varName = "approved", v.value.module = "", v.value.module = w.MODULE_ITSMFLOW), new Promise((a, o) => {
78
80
  var t;
79
- (t = I.value) == null || t.validate((n) => {
80
- n ? (f.value && (f.value.comment = ""), a(!0)) : u(!1);
81
+ (t = E.value) == null || t.validate((s) => {
82
+ s ? (v.value && (v.value.comment = ""), a(!0)) : o(!1);
81
83
  });
82
84
  });
83
85
  }
84
- return (a, u) => {
85
- const t = d("el-col"), n = d("el-form-item"), i = d("el-row"), E = d("el-table-column"), N = d("el-button"), x = d("el-table"), G = d("CircleClose"), H = d("el-icon"), J = d("el-form"), Q = d("jmash-multi-upload");
86
- return b(), g(M, null, [
86
+ return (a, o) => {
87
+ const t = d("el-col"), s = d("el-form-item"), i = d("el-row"), L = d("el-table-column"), g = d("el-button"), G = d("el-table"), H = d("CircleClose"), J = d("el-icon"), Q = d("el-form"), X = d("jmash-multi-upload");
88
+ return b(), A(O, null, [
87
89
  e(t, { span: 24 }, {
88
- default: l(() => u[1] || (u[1] = [
89
- o("div", { class: "title" }, "山西云时代技术有限公司大数据中心分公司项目验收书", -1)
90
+ default: l(() => o[1] || (o[1] = [
91
+ n("div", { class: "title" }, "山西云时代技术有限公司大数据中心分公司项目验收书", -1)
90
92
  ])),
91
93
  _: 1,
92
94
  __: [1]
93
95
  }),
94
- e(J, {
96
+ e(Q, {
95
97
  ref_key: "taskFormRef",
96
- ref: I,
97
- model: j.value,
98
+ ref: E,
99
+ model: P.value,
98
100
  "label-width": "150px",
99
101
  class: "custom-table-form"
100
102
  }, {
@@ -103,12 +105,12 @@ const _e = /* @__PURE__ */ X({
103
105
  default: l(() => [
104
106
  e(t, { span: 24 }, {
105
107
  default: l(() => [
106
- e(n, {
108
+ e(s, {
107
109
  label: a.$t("itsmFlowAcceptance.contractName"),
108
110
  prop: "contractName"
109
111
  }, {
110
112
  default: l(() => [
111
- s(r(c.value.contractName), 1)
113
+ u(r(c.value.contractName), 1)
112
114
  ]),
113
115
  _: 1
114
116
  }, 8, ["label"])
@@ -122,12 +124,12 @@ const _e = /* @__PURE__ */ X({
122
124
  default: l(() => [
123
125
  e(t, { span: 24 }, {
124
126
  default: l(() => [
125
- e(n, {
127
+ e(s, {
126
128
  label: a.$t("itsmFlowAcceptance.contractNo"),
127
129
  prop: "contractNo"
128
130
  }, {
129
131
  default: l(() => [
130
- s(r(c.value.contractNo), 1)
132
+ u(r(c.value.contractNo), 1)
131
133
  ]),
132
134
  _: 1
133
135
  }, 8, ["label"])
@@ -141,12 +143,12 @@ const _e = /* @__PURE__ */ X({
141
143
  default: l(() => [
142
144
  e(t, { span: 24 }, {
143
145
  default: l(() => [
144
- e(n, {
146
+ e(s, {
145
147
  label: a.$t("itsmFlowAcceptance.orderId"),
146
148
  prop: "orderNo"
147
149
  }, {
148
150
  default: l(() => [
149
- s(r(c.value.orderNo), 1)
151
+ u(r(c.value.orderNo), 1)
150
152
  ]),
151
153
  _: 1
152
154
  }, 8, ["label"])
@@ -160,12 +162,12 @@ const _e = /* @__PURE__ */ X({
160
162
  default: l(() => [
161
163
  e(t, { span: 24 }, {
162
164
  default: l(() => [
163
- e(n, {
165
+ e(s, {
164
166
  label: a.$t("itsmFlowAcceptance.entrustName"),
165
167
  prop: "entrustName"
166
168
  }, {
167
169
  default: l(() => [
168
- s(r(F(k).projectNameDict.getDictValue(c.value.entrustName)), 1)
170
+ u(r(f(k).projectNameDict.getDictValue(c.value.entrustName)), 1)
169
171
  ]),
170
172
  _: 1
171
173
  }, 8, ["label"])
@@ -179,12 +181,12 @@ const _e = /* @__PURE__ */ X({
179
181
  default: l(() => [
180
182
  e(t, { span: 12 }, {
181
183
  default: l(() => [
182
- e(n, {
184
+ e(s, {
183
185
  label: a.$t("itsmFlowAcceptance.serviceOrg"),
184
186
  prop: "serviceOrg"
185
187
  }, {
186
188
  default: l(() => [
187
- s(r(F(k).orgIdBizDict.getValue(c.value.serviceOrg)), 1)
189
+ u(r(f(k).orgIdBizDict.getValue(c.value.serviceOrg)), 1)
188
190
  ]),
189
191
  _: 1
190
192
  }, 8, ["label"])
@@ -193,12 +195,12 @@ const _e = /* @__PURE__ */ X({
193
195
  }),
194
196
  e(t, { span: 12 }, {
195
197
  default: l(() => [
196
- e(n, {
198
+ e(s, {
197
199
  label: a.$t("itsmFlowAcceptance.stage"),
198
200
  prop: "stage"
199
201
  }, {
200
202
  default: l(() => [
201
- s(r(c.value.stage), 1)
203
+ u(r(c.value.stage), 1)
202
204
  ]),
203
205
  _: 1
204
206
  }, 8, ["label"])
@@ -207,12 +209,12 @@ const _e = /* @__PURE__ */ X({
207
209
  }),
208
210
  e(t, { span: 12 }, {
209
211
  default: l(() => [
210
- e(n, {
212
+ e(s, {
211
213
  label: a.$t("itsmFlowAcceptance.headman"),
212
214
  prop: "headmanName"
213
215
  }, {
214
216
  default: l(() => [
215
- s(r(c.value.headmanName), 1)
217
+ u(r(c.value.headmanName), 1)
216
218
  ]),
217
219
  _: 1
218
220
  }, 8, ["label"])
@@ -221,12 +223,12 @@ const _e = /* @__PURE__ */ X({
221
223
  }),
222
224
  e(t, { span: 12 }, {
223
225
  default: l(() => [
224
- e(n, {
226
+ e(s, {
225
227
  label: a.$t("itsmFlowAcceptance.members"),
226
228
  prop: "membersName"
227
229
  }, {
228
230
  default: l(() => [
229
- s(r(c.value.membersName), 1)
231
+ u(r(c.value.membersName), 1)
230
232
  ]),
231
233
  _: 1
232
234
  }, 8, ["label"])
@@ -240,34 +242,34 @@ const _e = /* @__PURE__ */ X({
240
242
  default: l(() => [
241
243
  e(t, { span: 24 }, {
242
244
  default: l(() => [
243
- e(n, {
245
+ e(s, {
244
246
  label: a.$t("itsmFlowAcceptance.files"),
245
247
  prop: "files"
246
248
  }, {
247
249
  default: l(() => [
248
- e(x, {
250
+ e(G, {
249
251
  data: c.value.files,
250
252
  border: ""
251
253
  }, {
252
254
  default: l(() => [
253
- e(E, {
255
+ e(L, {
254
256
  prop: "fileName",
255
257
  label: "附件名称"
256
258
  }),
257
- e(E, {
259
+ e(L, {
258
260
  prop: "",
259
261
  label: "操作",
260
262
  width: "100"
261
263
  }, {
262
- default: l((v) => [
263
- e(N, {
264
+ default: l((F) => [
265
+ e(g, {
264
266
  type: "primary",
265
267
  link: "",
266
268
  size: "small",
267
- onClick: (C) => F(oe)(v.row)
269
+ onClick: (C) => f(oe)(F.row)
268
270
  }, {
269
- default: l(() => u[2] || (u[2] = [
270
- s(" 查看 ")
271
+ default: l(() => o[2] || (o[2] = [
272
+ u(" 查看 ")
271
273
  ])),
272
274
  _: 2,
273
275
  __: [2]
@@ -291,12 +293,12 @@ const _e = /* @__PURE__ */ X({
291
293
  default: l(() => [
292
294
  e(t, { span: 24 }, {
293
295
  default: l(() => [
294
- e(n, {
296
+ e(s, {
295
297
  label: a.$t("itsmFlowAcceptance.serviceContent"),
296
298
  prop: "serviceContent"
297
299
  }, {
298
300
  default: l(() => [
299
- s(r(c.value.serviceContent), 1)
301
+ u(r(c.value.serviceContent), 1)
300
302
  ]),
301
303
  _: 1
302
304
  }, 8, ["label"])
@@ -308,14 +310,36 @@ const _e = /* @__PURE__ */ X({
308
310
  }),
309
311
  e(i, null, {
310
312
  default: l(() => [
311
- e(t, { span: 24 }, {
313
+ _.task.taskDefinitionKey !== f(w).node.sign ? (b(), $(t, {
314
+ key: 0,
315
+ span: 24
316
+ }, {
312
317
  default: l(() => [
313
- e(n, {
318
+ e(s, {
314
319
  label: a.$t("itsmFlowAcceptance.result"),
315
320
  prop: "result"
316
321
  }, {
317
322
  default: l(() => [
318
- s(r(F(k).isValuesDict.getValue(c.value.result)), 1)
323
+ u(r(f(k).isValuesDict.getValue(c.value.result)), 1)
324
+ ]),
325
+ _: 1
326
+ }, 8, ["label"])
327
+ ]),
328
+ _: 1
329
+ })) : h("", !0)
330
+ ]),
331
+ _: 1
332
+ }),
333
+ e(i, null, {
334
+ default: l(() => [
335
+ e(t, { span: 24 }, {
336
+ default: l(() => [
337
+ e(s, {
338
+ label: a.$t("itsmFlowAcceptance.acceptanceNo"),
339
+ prop: "acceptanceNo"
340
+ }, {
341
+ default: l(() => [
342
+ u(r(c.value.acceptanceNo), 1)
319
343
  ]),
320
344
  _: 1
321
345
  }, 8, ["label"])
@@ -329,12 +353,12 @@ const _e = /* @__PURE__ */ X({
329
353
  default: l(() => [
330
354
  e(t, { span: 24 }, {
331
355
  default: l(() => [
332
- e(n, {
356
+ e(s, {
333
357
  label: a.$t("itsmFlowAcceptance.evaluate"),
334
358
  prop: "evaluate"
335
359
  }, {
336
360
  default: l(() => [
337
- s(r(c.value.evaluate), 1)
361
+ u(r(c.value.evaluate), 1)
338
362
  ]),
339
363
  _: 1
340
364
  }, 8, ["label"])
@@ -347,18 +371,18 @@ const _e = /* @__PURE__ */ X({
347
371
  e(i, { class: "bordered-row" }, {
348
372
  default: l(() => [
349
373
  e(t, { span: 12 }, {
350
- default: l(() => u[3] || (u[3] = [
351
- o("div", { class: "content-box" }, [
352
- o("div", { class: "content-box-top" }, [
353
- o("div", null, "甲方单位(盖章)"),
354
- o("div", null, "负责人(签字):"),
355
- o("div", null, "或授权代理人(签字):")
374
+ default: l(() => o[3] || (o[3] = [
375
+ n("div", { class: "content-box" }, [
376
+ n("div", { class: "content-box-top" }, [
377
+ n("div", null, "甲方单位(盖章)"),
378
+ n("div", null, "负责人(签字):"),
379
+ n("div", null, "或授权代理人(签字):")
356
380
  ]),
357
- o("div", { class: "content-box-bottom" }, [
358
- s(" 日期: "),
359
- o("span", null, "年"),
360
- o("span", null, "月"),
361
- o("span", null, "日")
381
+ n("div", { class: "content-box-bottom" }, [
382
+ u(" 日期: "),
383
+ n("span", null, "年"),
384
+ n("span", null, "月"),
385
+ n("span", null, "日")
362
386
  ])
363
387
  ], -1)
364
388
  ])),
@@ -369,18 +393,18 @@ const _e = /* @__PURE__ */ X({
369
393
  span: 12,
370
394
  class: "with-divider"
371
395
  }, {
372
- default: l(() => u[4] || (u[4] = [
373
- o("div", { class: "content-box" }, [
374
- o("div", { class: "content-box-top" }, [
375
- o("div", null, "服务人员所属单位(盖章)"),
376
- o("div", null, "法定代表人(签字):"),
377
- o("div", null, "或授权代理人(签字):")
396
+ default: l(() => o[4] || (o[4] = [
397
+ n("div", { class: "content-box" }, [
398
+ n("div", { class: "content-box-top" }, [
399
+ n("div", null, "服务人员所属单位(盖章)"),
400
+ n("div", null, "法定代表人(签字):"),
401
+ n("div", null, "或授权代理人(签字):")
378
402
  ]),
379
- o("div", { class: "content-box-bottom" }, [
380
- s(" 日期: "),
381
- o("span", null, "年"),
382
- o("span", null, "月"),
383
- o("span", null, "日")
403
+ n("div", { class: "content-box-bottom" }, [
404
+ u(" 日期: "),
405
+ n("span", null, "年"),
406
+ n("span", null, "月"),
407
+ n("span", null, "日")
384
408
  ])
385
409
  ], -1)
386
410
  ])),
@@ -392,42 +416,42 @@ const _e = /* @__PURE__ */ X({
392
416
  }),
393
417
  e(i, null, {
394
418
  default: l(() => [
395
- _.task.taskDefinitionKey === "UploadScanFile" ? (b(), S(t, {
419
+ _.task.taskDefinitionKey === f(w).node.upload ? (b(), $(t, {
396
420
  key: 0,
397
421
  span: 12
398
422
  }, {
399
423
  default: l(() => [
400
- e(n, {
424
+ e(s, {
401
425
  label: a.$t("itsmFlowEntrust.scannedCopy")
402
426
  }, {
403
427
  default: l(() => [
404
- e(N, {
428
+ e(g, {
405
429
  type: "primary",
406
- icon: F(ae),
430
+ icon: f(ae),
407
431
  onClick: q
408
432
  }, {
409
433
  default: l(() => [
410
- s(r(a.$t("common.uploadFiles")), 1)
434
+ u(r(a.$t("common.uploadFiles")), 1)
411
435
  ]),
412
436
  _: 1
413
437
  }, 8, ["icon"])
414
438
  ]),
415
439
  _: 1
416
440
  }, 8, ["label"]),
417
- e(n, null, {
441
+ e(s, null, {
418
442
  default: l(() => [
419
- (b(!0), g(M, null, ee(p.value, (v, C) => (b(), g("div", {
443
+ (b(!0), A(O, null, le(p.value, (F, C) => (b(), A("div", {
420
444
  key: C,
421
445
  class: "files-list"
422
446
  }, [
423
- s(r(v.fileName) + " ", 1),
424
- e(H, {
447
+ u(r(F.fileName) + " ", 1),
448
+ e(J, {
425
449
  size: "16",
426
450
  class: "icon-right",
427
- onClick: (ue) => K(C)
451
+ onClick: (ue) => U(C)
428
452
  }, {
429
453
  default: l(() => [
430
- e(G)
454
+ e(H)
431
455
  ]),
432
456
  _: 2
433
457
  }, 1032, ["onClick"])
@@ -437,23 +461,23 @@ const _e = /* @__PURE__ */ X({
437
461
  })
438
462
  ]),
439
463
  _: 1
440
- })) : B("", !0),
441
- _.task.taskDefinitionKey === "UploadScanFile" ? (b(), S(t, {
464
+ })) : h("", !0),
465
+ _.task.taskDefinitionKey === f(w).node.upload ? (b(), $(t, {
442
466
  key: 1,
443
467
  span: 12
444
468
  }, {
445
469
  default: l(() => [
446
- e(n, {
470
+ e(s, {
447
471
  label: a.$t("itsmFlowEntrust.export")
448
472
  }, {
449
473
  default: l(() => [
450
- e(N, {
474
+ e(g, {
451
475
  plain: "",
452
476
  type: "primary",
453
- onClick: U
477
+ onClick: K
454
478
  }, {
455
479
  default: l(() => [
456
- s(r(a.$t("itsmFlowEntrust.export")), 1)
480
+ u(r(a.$t("itsmFlowEntrust.export")), 1)
457
481
  ]),
458
482
  _: 1
459
483
  })
@@ -462,19 +486,19 @@ const _e = /* @__PURE__ */ X({
462
486
  }, 8, ["label"])
463
487
  ]),
464
488
  _: 1
465
- })) : B("", !0)
489
+ })) : h("", !0)
466
490
  ]),
467
491
  _: 1
468
492
  })
469
493
  ]),
470
494
  _: 1
471
495
  }, 8, ["model"]),
472
- e(Q, {
496
+ e(X, {
473
497
  ref_key: "uploadRef",
474
- ref: h,
475
- modelValue: y.value,
476
- "onUpdate:modelValue": u[0] || (u[0] = (v) => y.value = v),
477
- onUploadFileList: P
498
+ ref: M,
499
+ modelValue: N.value,
500
+ "onUpdate:modelValue": o[0] || (o[0] = (F) => N.value = F),
501
+ onUploadFileList: z
478
502
  }, null, 8, ["modelValue"])
479
503
  ], 64);
480
504
  };