xyvcard-itsmsys 0.0.1 → 0.0.2

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,527 +0,0 @@
1
- import { defineComponent as C, mergeModels as G, ref as P, reactive as w, useModel as j, resolveComponent as i, openBlock as E, createBlock as F, withCtx as o, createElementVNode as K, createVNode as e, createTextVNode as $, toDisplayString as I, unref as r } from "vue";
2
- import { ElMessage as M } from "element-plus";
3
- import { useI18n as O } from "vue-i18n";
4
- import { sysGovApi as g } from "./index.mjs";
5
- import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
- const _ = { class: "dialog-footer" }, D = /* @__PURE__ */ C({
7
- __name: "edit",
8
- props: /* @__PURE__ */ G({
9
- entityKey: {
10
- type: Object,
11
- default: () => {
12
- }
13
- }
14
- }, {
15
- modelValue: { type: Boolean },
16
- modelModifiers: {}
17
- }),
18
- emits: /* @__PURE__ */ G(["refresh"], ["update:modelValue"]),
19
- setup(c, { emit: N }) {
20
- const { t: m } = O(), f = P();
21
- let a = w({
22
- requestId: Math.random() * 10 + "",
23
- updateMask: ""
24
- });
25
- const U = w({
26
- orgId: [
27
- {
28
- required: !0,
29
- message: m("sysGov.orgId"),
30
- trigger: "change"
31
- }
32
- ],
33
- orgName: [
34
- {
35
- required: !0,
36
- message: m("sysGov.orgName"),
37
- trigger: "change"
38
- }
39
- ],
40
- shortName: [
41
- {
42
- required: !0,
43
- message: m("sysGov.shortName"),
44
- trigger: "change"
45
- }
46
- ],
47
- orgType: [
48
- {
49
- required: !0,
50
- message: m("sysGov.orgType"),
51
- trigger: "change"
52
- }
53
- ],
54
- address: [
55
- {
56
- required: !0,
57
- message: m("sysGov.address"),
58
- trigger: "change"
59
- }
60
- ],
61
- geoLongitude: [
62
- {
63
- required: !0,
64
- message: m("sysGov.geoLongitude"),
65
- trigger: "change"
66
- }
67
- ],
68
- geoLatitude: [
69
- {
70
- required: !0,
71
- message: m("sysGov.geoLatitude"),
72
- trigger: "change"
73
- }
74
- ],
75
- contactPerson: [
76
- {
77
- required: !0,
78
- message: m("sysGov.contactPerson"),
79
- trigger: "change"
80
- }
81
- ],
82
- contactPersonPosi: [
83
- {
84
- required: !0,
85
- message: m("sysGov.contactPersonPosi"),
86
- trigger: "change"
87
- }
88
- ],
89
- contactPersonMobile: [
90
- {
91
- required: !0,
92
- message: m("sysGov.contactPersonMobile"),
93
- trigger: "change"
94
- }
95
- ],
96
- contactPersonTel: [
97
- {
98
- required: !0,
99
- message: m("sysGov.contactPersonTel"),
100
- trigger: "change"
101
- }
102
- ],
103
- status: [
104
- {
105
- required: !0,
106
- message: m("sysGov.status"),
107
- trigger: "change"
108
- }
109
- ],
110
- parentId: [
111
- {
112
- required: !0,
113
- message: m("sysGov.parentId"),
114
- trigger: "change"
115
- }
116
- ]
117
- }), p = j(c, "modelValue"), y = c, b = N, T = Object.keys(y.entityKey), h = P(T.length >= 1);
118
- h.value && g.findById(y.entityKey).then(({ data: l }) => {
119
- Object.assign(a, l);
120
- });
121
- const q = async () => {
122
- var l;
123
- await ((l = f.value) == null ? void 0 : l.validate((t) => {
124
- t && (h.value ? g.update(a).then((d) => {
125
- console.log(d), d.status === 200 && (M({
126
- message: m("common.submitSuccess"),
127
- type: "success"
128
- }), p.value && (p.value = !1), b("refresh", d.status === 200));
129
- }) : g.create(a).then((d) => {
130
- console.log(d), d.status === 200 && (M({
131
- message: m("common.submitSuccess"),
132
- type: "success"
133
- }), p.value && (p.value = !1), b("refresh", d.status === 200));
134
- }));
135
- }));
136
- };
137
- function v() {
138
- p.value && (p.value = !1);
139
- }
140
- return (l, t) => {
141
- const d = i("el-input"), n = i("el-form-item"), u = i("el-col"), L = i("el-row"), B = i("el-form"), V = i("el-button"), k = i("el-dialog");
142
- return E(), F(k, {
143
- modelValue: p.value,
144
- "onUpdate:modelValue": t[16] || (t[16] = (s) => p.value = s),
145
- onClose: v
146
- }, {
147
- footer: o(() => [
148
- K("div", _, [
149
- e(V, { onClick: v }, {
150
- default: o(() => [
151
- $(I(l.$t("common.cancel")), 1)
152
- ]),
153
- _: 1
154
- }),
155
- e(V, {
156
- type: "primary",
157
- onClick: q
158
- }, {
159
- default: o(() => [
160
- $(I(l.$t("common.confirm")), 1)
161
- ]),
162
- _: 1
163
- })
164
- ])
165
- ]),
166
- default: o(() => [
167
- e(B, {
168
- ref_key: "sysGovFormRef",
169
- ref: f,
170
- model: r(a),
171
- "label-width": "120px",
172
- rules: U
173
- }, {
174
- default: o(() => [
175
- e(L, null, {
176
- default: o(() => [
177
- e(u, { span: 12 }, {
178
- default: o(() => [
179
- e(n, {
180
- label: l.$t("sysGov.orgId"),
181
- prop: "orgId"
182
- }, {
183
- default: o(() => [
184
- e(d, {
185
- modelValue: r(a).orgId,
186
- "onUpdate:modelValue": t[0] || (t[0] = (s) => r(a).orgId = s),
187
- placeholder: l.$t("sysGov.orgId"),
188
- maxlength: "8",
189
- "show-word-limit": "",
190
- clearable: ""
191
- }, null, 8, ["modelValue", "placeholder"])
192
- ]),
193
- _: 1
194
- }, 8, ["label"])
195
- ]),
196
- _: 1
197
- }),
198
- e(u, { span: 12 }, {
199
- default: o(() => [
200
- e(n, {
201
- label: l.$t("sysGov.orgName"),
202
- prop: "orgName"
203
- }, {
204
- default: o(() => [
205
- e(d, {
206
- modelValue: r(a).orgName,
207
- "onUpdate:modelValue": t[1] || (t[1] = (s) => r(a).orgName = s),
208
- placeholder: l.$t("sysGov.orgName"),
209
- maxlength: "50",
210
- "show-word-limit": "",
211
- clearable: ""
212
- }, null, 8, ["modelValue", "placeholder"])
213
- ]),
214
- _: 1
215
- }, 8, ["label"])
216
- ]),
217
- _: 1
218
- }),
219
- e(u, { span: 12 }, {
220
- default: o(() => [
221
- e(n, {
222
- label: l.$t("sysGov.shortName"),
223
- prop: "shortName"
224
- }, {
225
- default: o(() => [
226
- e(d, {
227
- modelValue: r(a).shortName,
228
- "onUpdate:modelValue": t[2] || (t[2] = (s) => r(a).shortName = s),
229
- placeholder: l.$t("sysGov.shortName"),
230
- maxlength: "30",
231
- "show-word-limit": "",
232
- clearable: ""
233
- }, null, 8, ["modelValue", "placeholder"])
234
- ]),
235
- _: 1
236
- }, 8, ["label"])
237
- ]),
238
- _: 1
239
- }),
240
- e(u, { span: 12 }, {
241
- default: o(() => [
242
- e(n, {
243
- label: l.$t("sysGov.orgType"),
244
- prop: "orgType"
245
- }, {
246
- default: o(() => [
247
- e(d, {
248
- modelValue: r(a).orgType,
249
- "onUpdate:modelValue": t[3] || (t[3] = (s) => r(a).orgType = s),
250
- placeholder: l.$t("sysGov.orgType"),
251
- maxlength: "15",
252
- "show-word-limit": "",
253
- clearable: ""
254
- }, null, 8, ["modelValue", "placeholder"])
255
- ]),
256
- _: 1
257
- }, 8, ["label"])
258
- ]),
259
- _: 1
260
- }),
261
- e(u, { span: 12 }, {
262
- default: o(() => [
263
- e(n, {
264
- label: l.$t("sysGov.address"),
265
- prop: "address"
266
- }, {
267
- default: o(() => [
268
- e(d, {
269
- modelValue: r(a).address,
270
- "onUpdate:modelValue": t[4] || (t[4] = (s) => r(a).address = s),
271
- placeholder: l.$t("sysGov.address"),
272
- maxlength: "127",
273
- "show-word-limit": "",
274
- clearable: ""
275
- }, null, 8, ["modelValue", "placeholder"])
276
- ]),
277
- _: 1
278
- }, 8, ["label"])
279
- ]),
280
- _: 1
281
- }),
282
- e(u, { span: 12 }, {
283
- default: o(() => [
284
- e(n, {
285
- label: l.$t("sysGov.geoLongitude"),
286
- prop: "geoLongitude"
287
- }, {
288
- default: o(() => [
289
- e(d, {
290
- modelValue: r(a).geoLongitude,
291
- "onUpdate:modelValue": t[5] || (t[5] = (s) => r(a).geoLongitude = s),
292
- placeholder: l.$t("sysGov.geoLongitude"),
293
- maxlength: "30",
294
- "show-word-limit": "",
295
- clearable: ""
296
- }, null, 8, ["modelValue", "placeholder"])
297
- ]),
298
- _: 1
299
- }, 8, ["label"])
300
- ]),
301
- _: 1
302
- }),
303
- e(u, { span: 12 }, {
304
- default: o(() => [
305
- e(n, {
306
- label: l.$t("sysGov.geoLatitude"),
307
- prop: "geoLatitude"
308
- }, {
309
- default: o(() => [
310
- e(d, {
311
- modelValue: r(a).geoLatitude,
312
- "onUpdate:modelValue": t[6] || (t[6] = (s) => r(a).geoLatitude = s),
313
- placeholder: l.$t("sysGov.geoLatitude"),
314
- maxlength: "30",
315
- "show-word-limit": "",
316
- clearable: ""
317
- }, null, 8, ["modelValue", "placeholder"])
318
- ]),
319
- _: 1
320
- }, 8, ["label"])
321
- ]),
322
- _: 1
323
- }),
324
- e(u, { span: 12 }, {
325
- default: o(() => [
326
- e(n, {
327
- label: l.$t("sysGov.contactPerson"),
328
- prop: "contactPerson"
329
- }, {
330
- default: o(() => [
331
- e(d, {
332
- modelValue: r(a).contactPerson,
333
- "onUpdate:modelValue": t[7] || (t[7] = (s) => r(a).contactPerson = s),
334
- placeholder: l.$t("sysGov.contactPerson"),
335
- maxlength: "30",
336
- "show-word-limit": "",
337
- clearable: ""
338
- }, null, 8, ["modelValue", "placeholder"])
339
- ]),
340
- _: 1
341
- }, 8, ["label"])
342
- ]),
343
- _: 1
344
- }),
345
- e(u, { span: 12 }, {
346
- default: o(() => [
347
- e(n, {
348
- label: l.$t("sysGov.contactPersonPosi"),
349
- prop: "contactPersonPosi"
350
- }, {
351
- default: o(() => [
352
- e(d, {
353
- modelValue: r(a).contactPersonPosi,
354
- "onUpdate:modelValue": t[8] || (t[8] = (s) => r(a).contactPersonPosi = s),
355
- placeholder: l.$t("sysGov.contactPersonPosi"),
356
- maxlength: "50",
357
- "show-word-limit": "",
358
- clearable: ""
359
- }, null, 8, ["modelValue", "placeholder"])
360
- ]),
361
- _: 1
362
- }, 8, ["label"])
363
- ]),
364
- _: 1
365
- }),
366
- e(u, { span: 12 }, {
367
- default: o(() => [
368
- e(n, {
369
- label: l.$t("sysGov.contactPersonMobile"),
370
- prop: "contactPersonMobile"
371
- }, {
372
- default: o(() => [
373
- e(d, {
374
- modelValue: r(a).contactPersonMobile,
375
- "onUpdate:modelValue": t[9] || (t[9] = (s) => r(a).contactPersonMobile = s),
376
- placeholder: l.$t("sysGov.contactPersonMobile"),
377
- maxlength: "127",
378
- "show-word-limit": "",
379
- clearable: ""
380
- }, null, 8, ["modelValue", "placeholder"])
381
- ]),
382
- _: 1
383
- }, 8, ["label"])
384
- ]),
385
- _: 1
386
- }),
387
- e(u, { span: 12 }, {
388
- default: o(() => [
389
- e(n, {
390
- label: l.$t("sysGov.contactPersonMobileIns"),
391
- prop: "contactPersonMobileIns"
392
- }, {
393
- default: o(() => [
394
- e(d, {
395
- modelValue: r(a).contactPersonMobileIns,
396
- "onUpdate:modelValue": t[10] || (t[10] = (s) => r(a).contactPersonMobileIns = s),
397
- placeholder: l.$t("sysGov.contactPersonMobileIns"),
398
- maxlength: "15",
399
- "show-word-limit": "",
400
- clearable: ""
401
- }, null, 8, ["modelValue", "placeholder"])
402
- ]),
403
- _: 1
404
- }, 8, ["label"])
405
- ]),
406
- _: 1
407
- }),
408
- e(u, { span: 12 }, {
409
- default: o(() => [
410
- e(n, {
411
- label: l.$t("sysGov.contactPersonTel"),
412
- prop: "contactPersonTel"
413
- }, {
414
- default: o(() => [
415
- e(d, {
416
- modelValue: r(a).contactPersonTel,
417
- "onUpdate:modelValue": t[11] || (t[11] = (s) => r(a).contactPersonTel = s),
418
- placeholder: l.$t("sysGov.contactPersonTel"),
419
- maxlength: "15",
420
- "show-word-limit": "",
421
- clearable: ""
422
- }, null, 8, ["modelValue", "placeholder"])
423
- ]),
424
- _: 1
425
- }, 8, ["label"])
426
- ]),
427
- _: 1
428
- }),
429
- e(u, { span: 12 }, {
430
- default: o(() => [
431
- e(n, {
432
- label: l.$t("sysGov.status"),
433
- prop: "status"
434
- }, {
435
- default: o(() => [
436
- e(d, {
437
- modelValue: r(a).status,
438
- "onUpdate:modelValue": t[12] || (t[12] = (s) => r(a).status = s),
439
- placeholder: l.$t("sysGov.status"),
440
- maxlength: "1",
441
- "show-word-limit": "",
442
- clearable: ""
443
- }, null, 8, ["modelValue", "placeholder"])
444
- ]),
445
- _: 1
446
- }, 8, ["label"])
447
- ]),
448
- _: 1
449
- }),
450
- e(u, { span: 12 }, {
451
- default: o(() => [
452
- e(n, {
453
- label: l.$t("sysGov.parentId"),
454
- prop: "parentId"
455
- }, {
456
- default: o(() => [
457
- e(d, {
458
- modelValue: r(a).parentId,
459
- "onUpdate:modelValue": t[13] || (t[13] = (s) => r(a).parentId = s),
460
- placeholder: l.$t("sysGov.parentId"),
461
- maxlength: "8",
462
- "show-word-limit": "",
463
- clearable: ""
464
- }, null, 8, ["modelValue", "placeholder"])
465
- ]),
466
- _: 1
467
- }, 8, ["label"])
468
- ]),
469
- _: 1
470
- }),
471
- e(u, { span: 12 }, {
472
- default: o(() => [
473
- e(n, {
474
- label: l.$t("sysGov.depth"),
475
- prop: "depth"
476
- }, {
477
- default: o(() => [
478
- e(d, {
479
- modelValue: r(a).depth,
480
- "onUpdate:modelValue": t[14] || (t[14] = (s) => r(a).depth = s),
481
- placeholder: l.$t("sysGov.depth"),
482
- maxlength: "5",
483
- "show-word-limit": "",
484
- clearable: ""
485
- }, null, 8, ["modelValue", "placeholder"])
486
- ]),
487
- _: 1
488
- }, 8, ["label"])
489
- ]),
490
- _: 1
491
- }),
492
- e(u, { span: 12 }, {
493
- default: o(() => [
494
- e(n, {
495
- label: l.$t("sysGov.orderBy"),
496
- prop: "orderBy"
497
- }, {
498
- default: o(() => [
499
- e(d, {
500
- modelValue: r(a).orderBy,
501
- "onUpdate:modelValue": t[15] || (t[15] = (s) => r(a).orderBy = s),
502
- placeholder: l.$t("sysGov.orderBy"),
503
- maxlength: "5",
504
- "show-word-limit": "",
505
- clearable: ""
506
- }, null, 8, ["modelValue", "placeholder"])
507
- ]),
508
- _: 1
509
- }, 8, ["label"])
510
- ]),
511
- _: 1
512
- })
513
- ]),
514
- _: 1
515
- })
516
- ]),
517
- _: 1
518
- }, 8, ["model", "rules"])
519
- ]),
520
- _: 1
521
- }, 8, ["modelValue"]);
522
- };
523
- }
524
- }), Q = /* @__PURE__ */ S(D, [["__scopeId", "data-v-a7fd2233"]]);
525
- export {
526
- Q as default
527
- };
@@ -1,83 +0,0 @@
1
- import { useUserStore as e, clearEmpty as n, request as r } from "jmash-core";
2
- class m {
3
- getKey(t) {
4
- return {
5
- orgId: t.orgId
6
- };
7
- }
8
- // 查询翻页信息机构信息
9
- findPage(t) {
10
- const s = e().user.tenant;
11
- return t && (t.hasStatus = t.status != null, t.hasOrgType = t.orgType != null), n(t), r({
12
- url: "/v1/itsmsys/sys_org/page/" + s,
13
- method: "get",
14
- params: t
15
- });
16
- }
17
- // 查询列表信息机构信息
18
- findList(t) {
19
- const s = e().user.tenant;
20
- return n(t), r({
21
- url: "/v1/itsmsys/sys_org/list/" + s,
22
- method: "get",
23
- params: t
24
- });
25
- }
26
- // 查询机构信息
27
- findById(t) {
28
- const s = e().user.tenant;
29
- return n(t), r({
30
- url: "/v1/itsmsys/sys_org/id/" + s + "/" + t.orgId,
31
- method: "get"
32
- });
33
- }
34
- // 创建实体机构信息
35
- create(t) {
36
- return t.tenant = e().user.tenant, n(t), r({
37
- url: "/v1/itsmsys/sys_org",
38
- method: "post",
39
- data: t
40
- });
41
- }
42
- // 修改实体机构信息
43
- update(t) {
44
- return t.tenant = e().user.tenant, n(t), r({
45
- url: "/v1/itsmsys/sys_org",
46
- method: "patch",
47
- data: t
48
- });
49
- }
50
- // 启用/禁用
51
- enable(t, s) {
52
- const a = { ...t };
53
- return a.tenant = e().user.tenant, a.enable = s, n(a), r({
54
- url: "/v1/itsmsys/sys_org/enable",
55
- method: "put",
56
- data: a
57
- });
58
- }
59
- // 删除机构信息
60
- delete(t) {
61
- return t.tenant = e().user.tenant, n(t), r({
62
- url: "/v1/itsmsys/sys_org/id",
63
- method: "delete",
64
- params: t
65
- });
66
- }
67
- // 批量删除机构信息
68
- batchDelete(t) {
69
- const s = t.map((o) => o.orgId), a = {
70
- tenant: e().user.tenant,
71
- orgId: s
72
- };
73
- return n(a), r({
74
- url: "/v1/itsmsys/sys_org/batch",
75
- method: "put",
76
- data: a
77
- });
78
- }
79
- }
80
- const i = new m();
81
- export {
82
- i as s
83
- };