xyvcard-itsm-flow 0.0.12 → 0.0.14

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