xyvcard-itsmsys 0.0.26 → 0.0.27

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,17 +1,18 @@
1
- import { defineComponent as ne, ref as R, onActivated as le, resolveComponent as s, resolveDirective as I, createElementBlock as k, openBlock as c, createElementVNode as se, createVNode as n, withCtx as l, withKeys as G, unref as _, createTextVNode as u, toDisplayString as d, withDirectives as b, createBlock as T, isRef as ae } from "vue";
2
- import { useTableHooks as re } from "jmash-core";
3
- import { ElMessageBox as j, ElMessage as P } from "element-plus";
4
- import { useI18n as me } from "vue-i18n";
5
- import { C as ie, D as ce } from "./index-dIcRC4jE.mjs";
6
- import { sysOrgApi as p } from "./index.mjs";
7
- import { useRouter as ue } from "vue-router";
8
- const de = { class: "app-container" }, pe = { class: "search-container" }, fe = ["onClick"], ye = ["onClick"], _e = ["onClick"], Te = /* @__PURE__ */ ne({
1
+ import { defineComponent as ae, getCurrentInstance as se, ref as N, onActivated as re, resolveComponent as a, resolveDirective as I, createElementBlock as k, openBlock as u, createElementVNode as me, createVNode as n, withCtx as l, withKeys as G, unref as b, createTextVNode as d, toDisplayString as p, withDirectives as v, createBlock as T, isRef as ie } from "vue";
2
+ import { useTableHooks as ce } from "jmash-core";
3
+ import { ElMessageBox as Y, ElMessage as V } from "element-plus";
4
+ import { useI18n as ue } from "vue-i18n";
5
+ import { C as de, D as pe } from "./index-dIcRC4jE.mjs";
6
+ import { sysOrgApi as f } from "./index.mjs";
7
+ import { useRouter as fe } from "vue-router";
8
+ const ye = { class: "app-container" }, _e = { class: "search-container" }, be = ["onClick"], ve = ["onClick"], he = ["onClick"], De = /* @__PURE__ */ ae({
9
9
  __name: "index",
10
- setup(be) {
11
- const { t: a } = me(), $ = ue(), f = R({
12
- orgType: ie.orgType.hall
13
- }), { tableHooks: r, multipleTableRef: V, queryFormRef: B, listLoading: M, tableData: S } = re(a, p, f);
14
- let v = R([
10
+ setup(ge) {
11
+ const { t: s } = ue(), $ = fe(), { proxy: j } = se(), m = N({
12
+ orgType: de.orgType.hall,
13
+ annual: j.$moment.formatDate(/* @__PURE__ */ new Date(), "YYYY")
14
+ }), { tableHooks: r, multipleTableRef: P, queryFormRef: D, listLoading: M, tableData: S } = ce(s, f, m);
15
+ let h = N([
15
16
  {
16
17
  label: "sysGov.orgName",
17
18
  prop: "orgName",
@@ -86,35 +87,35 @@ const de = { class: "app-container" }, pe = { class: "search-container" }, fe =
86
87
  query: { entityKey: e.orgId }
87
88
  });
88
89
  }
89
- function O(e) {
90
+ function U(e) {
90
91
  $.push({
91
92
  path: "/rawitsmsys/itsm-sys-gov/govInfo",
92
93
  query: { orgId: e.orgId }
93
94
  });
94
95
  }
95
- function U(e) {
96
+ function O(e) {
96
97
  r.selectionRows.value = e;
97
98
  }
98
99
  function A(e) {
99
100
  r.handleSort(e.prop, e.order);
100
101
  }
101
- function D(e, t) {
102
- if (typeof p.move > "u")
102
+ function B(e, t) {
103
+ if (typeof f.move > "u")
103
104
  return;
104
- const y = p.getKey(e);
105
- p.move(y, t).then((i) => {
105
+ const y = f.getKey(e);
106
+ f.move(y, t).then((i) => {
106
107
  !i || typeof i != "object" || i.status === 200 && r.findList();
107
108
  });
108
109
  }
109
110
  function F(e) {
110
- j.confirm(a("common.confirmDelete"), a("common.delete"), {
111
- cancelButtonText: a("common.cancel"),
112
- confirmButtonText: a("common.confirm"),
111
+ Y.confirm(s("common.confirmDelete"), s("common.delete"), {
112
+ cancelButtonText: s("common.cancel"),
113
+ confirmButtonText: s("common.confirm"),
113
114
  type: "warning"
114
115
  }).then(() => {
115
- p.delete(e).then((t) => {
116
- t.status === 200 && (P({
117
- message: a("common.deleteSuccess"),
116
+ f.delete(e).then((t) => {
117
+ t.status === 200 && (V({
118
+ message: s("common.deleteSuccess"),
118
119
  type: "success"
119
120
  }), r.findList());
120
121
  });
@@ -122,26 +123,26 @@ const de = { class: "app-container" }, pe = { class: "search-container" }, fe =
122
123
  }
123
124
  function z() {
124
125
  if (r.selectionRows.value.length === 0) {
125
- P({
126
- message: a("common.chooseDelete"),
126
+ V({
127
+ message: s("common.chooseDelete"),
127
128
  type: "warning"
128
129
  });
129
130
  return;
130
131
  }
131
132
  const e = r.selectionRows.value.map(
132
- (t) => p.getKey(t)
133
+ (t) => f.getKey(t)
133
134
  );
134
- j.confirm(a("common.confirmBatchDelete"), a("common.delete"), {
135
- cancelButtonText: a("common.cancel"),
136
- confirmButtonText: a("common.confirm"),
135
+ Y.confirm(s("common.confirmBatchDelete"), s("common.delete"), {
136
+ cancelButtonText: s("common.cancel"),
137
+ confirmButtonText: s("common.confirm"),
137
138
  type: "warning"
138
139
  }).then(() => {
139
- p.batchDelete(e).then((t) => {
140
+ f.batchDelete(e).then((t) => {
140
141
  var y;
141
- t.status === 200 && (P({
142
- message: a("common.successDelete") + t.data + a("common.stripData"),
142
+ t.status === 200 && (V({
143
+ message: s("common.successDelete") + t.data + s("common.stripData"),
143
144
  type: "success"
144
- }), r.findList(), (y = V.value) == null || y.clearSelection());
145
+ }), r.findList(), (y = P.value) == null || y.clearSelection());
145
146
  });
146
147
  });
147
148
  }
@@ -149,35 +150,58 @@ const de = { class: "app-container" }, pe = { class: "search-container" }, fe =
149
150
  r.findList();
150
151
  }
151
152
  function H() {
152
- B.value.resetFields(), w();
153
+ D.value.resetFields(), w();
153
154
  }
154
- return le(() => {
155
+ return re(() => {
155
156
  r.findList();
156
157
  }), (e, t) => {
157
- const y = s("el-input"), i = s("el-form-item"), h = s("el-col"), Q = s("jmash-select"), C = s("el-button"), E = s("el-row"), x = s("el-form"), W = s("jmash-column-select"), J = s("jmash-mobileIns-component"), X = s("Bottom"), N = s("el-icon"), Y = s("Top"), Z = s("el-switch"), ee = s("jmash-table"), oe = s("el-card"), g = I("hasPerm"), te = I("loading");
158
- return c(), k("div", de, [
159
- se("div", pe, [
160
- n(x, {
158
+ const y = a("el-date-picker"), i = a("el-form-item"), _ = a("el-col"), Q = a("el-input"), x = a("jmash-select"), C = a("el-button"), R = a("el-row"), W = a("el-form"), J = a("jmash-column-select"), X = a("jmash-mobileIns-component"), Z = a("Bottom"), E = a("el-icon"), ee = a("Top"), oe = a("el-switch"), te = a("jmash-table"), ne = a("el-card"), g = I("hasPerm"), le = I("loading");
159
+ return u(), k("div", ye, [
160
+ me("div", _e, [
161
+ n(W, {
161
162
  ref_key: "queryFormRef",
162
- ref: B,
163
- model: f.value,
163
+ ref: D,
164
+ model: m.value,
164
165
  inline: !0
165
166
  }, {
166
167
  default: l(() => [
167
- n(E, null, {
168
+ n(R, null, {
168
169
  default: l(() => [
169
- n(h, { span: 6 }, {
170
+ n(_, { span: 6 }, {
171
+ default: l(() => [
172
+ n(i, {
173
+ label: e.$t("sysGov.annual"),
174
+ prop: "annual"
175
+ }, {
176
+ default: l(() => [
177
+ n(y, {
178
+ modelValue: m.value.annual,
179
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => m.value.annual = o),
180
+ type: "year",
181
+ placeholder: e.$t("sysGov.annualRequired"),
182
+ format: "YYYY",
183
+ "value-format": "YYYY",
184
+ clearable: !1,
185
+ class: "!w-[203px]"
186
+ }, null, 8, ["modelValue", "placeholder"])
187
+ ]),
188
+ _: 1
189
+ }, 8, ["label"])
190
+ ]),
191
+ _: 1
192
+ }),
193
+ n(_, { span: 6 }, {
170
194
  default: l(() => [
171
195
  n(i, {
172
196
  label: e.$t("sysGov.orgName"),
173
197
  prop: "likeOrgName"
174
198
  }, {
175
199
  default: l(() => [
176
- n(y, {
177
- modelValue: f.value.likeOrgName,
178
- "onUpdate:modelValue": t[0] || (t[0] = (o) => f.value.likeOrgName = o),
200
+ n(Q, {
201
+ modelValue: m.value.likeOrgName,
202
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => m.value.likeOrgName = o),
179
203
  placeholder: e.$t("sysGov.orgNameRequired"),
180
- onKeyup: t[1] || (t[1] = G((o) => w(), ["enter"])),
204
+ onKeyup: t[2] || (t[2] = G((o) => w(), ["enter"])),
181
205
  class: "!w-[203px]",
182
206
  clearable: ""
183
207
  }, null, 8, ["modelValue", "placeholder"])
@@ -187,20 +211,20 @@ const de = { class: "app-container" }, pe = { class: "search-container" }, fe =
187
211
  ]),
188
212
  _: 1
189
213
  }),
190
- n(h, { span: 6 }, {
214
+ n(_, { span: 6 }, {
191
215
  default: l(() => [
192
216
  n(i, {
193
217
  label: e.$t("sysGov.status"),
194
218
  prop: "status"
195
219
  }, {
196
220
  default: l(() => [
197
- n(Q, {
198
- modelValue: f.value.status,
199
- "onUpdate:modelValue": t[2] || (t[2] = (o) => f.value.status = o),
221
+ n(x, {
222
+ modelValue: m.value.status,
223
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => m.value.status = o),
200
224
  placeholder: e.$t("sysGov.statusRequired"),
201
- data: _(ce).hasStatusDict.values,
225
+ data: b(pe).hasStatusDict.values,
202
226
  clearable: "",
203
- onKeyup: t[3] || (t[3] = G((o) => w(), ["enter"]))
227
+ onKeyup: t[4] || (t[4] = G((o) => w(), ["enter"]))
204
228
  }, null, 8, ["modelValue", "placeholder", "data"])
205
229
  ]),
206
230
  _: 1
@@ -208,24 +232,24 @@ const de = { class: "app-container" }, pe = { class: "search-container" }, fe =
208
232
  ]),
209
233
  _: 1
210
234
  }),
211
- n(h, { span: 12 }, {
235
+ n(_, { span: 6 }, {
212
236
  default: l(() => [
213
237
  n(i, { class: "search-btn" }, {
214
238
  default: l(() => [
215
239
  n(C, {
216
240
  type: "primary",
217
- onClick: t[4] || (t[4] = (o) => w())
241
+ onClick: t[5] || (t[5] = (o) => w())
218
242
  }, {
219
243
  default: l(() => [
220
- u(d(e.$t("common.search")), 1)
244
+ d(p(e.$t("common.search")), 1)
221
245
  ]),
222
246
  _: 1
223
247
  }),
224
248
  n(C, {
225
- onClick: t[5] || (t[5] = (o) => H())
249
+ onClick: t[6] || (t[6] = (o) => H())
226
250
  }, {
227
251
  default: l(() => [
228
- u(d(e.$t("common.reset")), 1)
252
+ d(p(e.$t("common.reset")), 1)
229
253
  ]),
230
254
  _: 1
231
255
  })
@@ -242,32 +266,32 @@ const de = { class: "app-container" }, pe = { class: "search-container" }, fe =
242
266
  _: 1
243
267
  }, 8, ["model"])
244
268
  ]),
245
- n(oe, {
269
+ n(ne, {
246
270
  shadow: "never",
247
271
  class: "table-container"
248
272
  }, {
249
273
  header: l(() => [
250
- n(E, null, {
274
+ n(R, null, {
251
275
  default: l(() => [
252
- n(h, { span: 17 }, {
276
+ n(_, { span: 17 }, {
253
277
  default: l(() => [
254
- b((c(), T(C, {
278
+ v((u(), T(C, {
255
279
  type: "primary",
256
280
  onClick: L
257
281
  }, {
258
282
  default: l(() => [
259
- u(d(e.$t("common.add")), 1)
283
+ d(p(e.$t("common.add")), 1)
260
284
  ]),
261
285
  _: 1
262
286
  })), [
263
287
  [g, ["itsmsys:sys_org_gov:add"]]
264
288
  ]),
265
- b((c(), T(C, {
289
+ v((u(), T(C, {
266
290
  type: "primary",
267
- onClick: t[6] || (t[6] = (o) => z())
291
+ onClick: t[7] || (t[7] = (o) => z())
268
292
  }, {
269
293
  default: l(() => [
270
- u(d(e.$t("common.batchDelete")), 1)
294
+ d(p(e.$t("common.batchDelete")), 1)
271
295
  ]),
272
296
  _: 1
273
297
  })), [
@@ -276,14 +300,14 @@ const de = { class: "app-container" }, pe = { class: "search-container" }, fe =
276
300
  ]),
277
301
  _: 1
278
302
  }),
279
- n(h, {
303
+ n(_, {
280
304
  span: 7,
281
305
  class: "container-float"
282
306
  }, {
283
307
  default: l(() => [
284
- n(W, {
285
- modelValue: _(v),
286
- "onUpdate:modelValue": t[7] || (t[7] = (o) => ae(v) ? v.value = o : v = o),
308
+ n(J, {
309
+ modelValue: b(h),
310
+ "onUpdate:modelValue": t[8] || (t[8] = (o) => ie(h) ? h.value = o : h = o),
287
311
  "label-name": "itsmsys/itsm-sys-org"
288
312
  }, null, 8, ["modelValue"])
289
313
  ]),
@@ -294,79 +318,79 @@ const de = { class: "app-container" }, pe = { class: "search-container" }, fe =
294
318
  })
295
319
  ]),
296
320
  default: l(() => [
297
- b((c(), T(ee, {
321
+ v((u(), T(te, {
298
322
  ref_key: "multipleTableRef",
299
- ref: V,
323
+ ref: P,
300
324
  "row-key": "orgId",
301
- data: _(S),
302
- "table-label": _(v),
303
- onSelectionChange: U,
325
+ data: b(S),
326
+ "table-label": b(h),
327
+ onSelectionChange: O,
304
328
  onSortChange: A
305
329
  }, {
306
330
  contactPersonMobile: l((o) => [
307
- n(J, {
331
+ n(X, {
308
332
  mobilePhoneIns: o.data.row.contactPersonMobileIns,
309
333
  mobilePhone: o.data.row.contactPersonMobile,
310
334
  mobileEncrypt: o.data.row.mobileEncrypt,
311
- onToggleEncrypt: (m) => q(o.data.row)
335
+ onToggleEncrypt: (c) => q(o.data.row)
312
336
  }, null, 8, ["mobilePhoneIns", "mobilePhone", "mobileEncrypt", "onToggleEncrypt"])
313
337
  ]),
314
338
  orderBy: l((o) => [
315
- n(N, {
339
+ n(E, {
316
340
  size: "16",
317
- onClick: (m) => D(o.data.row, !1)
341
+ onClick: (c) => B(o.data.row, !1)
318
342
  }, {
319
343
  default: l(() => [
320
- n(X)
344
+ n(Z)
321
345
  ]),
322
346
  _: 1
323
347
  }, 8, ["onClick"]),
324
- n(N, {
348
+ n(E, {
325
349
  size: "16",
326
- onClick: (m) => D(o.data.row, !0)
350
+ onClick: (c) => B(o.data.row, !0)
327
351
  }, {
328
352
  default: l(() => [
329
- n(Y)
353
+ n(ee)
330
354
  ]),
331
355
  _: 1
332
356
  }, 8, ["onClick"])
333
357
  ]),
334
358
  status: l((o) => [
335
- n(Z, {
359
+ n(oe, {
336
360
  modelValue: o.data.row.status,
337
- "onUpdate:modelValue": (m) => o.data.row.status = m,
338
- onChange: (m) => _(r).enableRecord(o.data.row, o.data.row.status)
361
+ "onUpdate:modelValue": (c) => o.data.row.status = c,
362
+ onChange: (c) => b(r).enableRecord(o.data.row, o.data.row.status)
339
363
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
340
364
  ]),
341
365
  operation: l((o) => [
342
- b((c(), k("span", {
366
+ v((u(), k("span", {
343
367
  class: "el-button-color",
344
- onClick: (m) => K(o.data.row)
368
+ onClick: (c) => K(o.data.row)
345
369
  }, [
346
- u(d(e.$t("common.edit")), 1)
347
- ], 8, fe)), [
370
+ d(p(e.$t("common.edit")), 1)
371
+ ], 8, be)), [
348
372
  [g, ["itsmsys:sys_org_gov:update"]]
349
373
  ]),
350
- b((c(), k("span", {
374
+ v((u(), k("span", {
351
375
  class: "el-button-color",
352
- onClick: (m) => F(o.data.row)
376
+ onClick: (c) => F(o.data.row)
353
377
  }, [
354
- u(d(e.$t("common.delete")), 1)
355
- ], 8, ye)), [
378
+ d(p(e.$t("common.delete")), 1)
379
+ ], 8, ve)), [
356
380
  [g, ["itsmsys:sys_org_gov:delete"]]
357
381
  ]),
358
- b((c(), k("span", {
382
+ v((u(), k("span", {
359
383
  class: "el-button-color",
360
- onClick: (m) => O(o.data.row)
384
+ onClick: (c) => U(o.data.row)
361
385
  }, [
362
- u(d(e.$t("common.view")), 1)
363
- ], 8, _e)), [
386
+ d(p(e.$t("common.view")), 1)
387
+ ], 8, he)), [
364
388
  [g, ["itsmsys:sys_org_gov:view"]]
365
389
  ])
366
390
  ]),
367
391
  _: 1
368
392
  }, 8, ["data", "table-label"])), [
369
- [te, _(M)]
393
+ [le, b(M)]
370
394
  ])
371
395
  ]),
372
396
  _: 1
@@ -376,5 +400,5 @@ const de = { class: "app-container" }, pe = { class: "search-container" }, fe =
376
400
  }
377
401
  });
378
402
  export {
379
- Te as default
403
+ De as default
380
404
  };