sooyie-task 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.
@@ -0,0 +1,512 @@
1
+ import { defineComponent as ee, getCurrentInstance as te, ref as V, onActivated as ae, resolveComponent as r, resolveDirective as oe, createElementBlock as y, openBlock as p, createElementVNode as c, createVNode as l, withCtx as a, withKeys as _, unref as o, Fragment as se, renderList as le, createBlock as T, createTextVNode as I, toDisplayString as i, withDirectives as E, createCommentVNode as ne, isRef as N } from "vue";
2
+ import { RedirectPage as re, Layout as D, LoginPage as ue, ProfilePage as ie, DashboardPage as de, Error401Page as me, Error404Page as pe, routerRef as ce, useUserStore as R, clearEmpty as L, request as U, useTableHooks as ke } from "jmash-core";
3
+ import { useI18n as fe } from "vue-i18n";
4
+ import { D as m, C as z } from "./index-DvawPwK3.mjs";
5
+ import { createRouter as he, createWebHistory as be } from "vue-router";
6
+ import { t as ve } from "./index-CEvxhWYT.mjs";
7
+ const ge = () => import("./edit-CRQkMd15.mjs"), ye = () => import("./info-Dls9Zhvf.mjs"), Ie = [
8
+ {
9
+ path: "/task",
10
+ component: D,
11
+ name: "task",
12
+ meta: {
13
+ hidden: !0
14
+ },
15
+ children: [
16
+ {
17
+ path: "/task/task-define/edit",
18
+ component: ge,
19
+ name: "taskEdit",
20
+ meta: {
21
+ hidden: !1,
22
+ title: "编辑"
23
+ }
24
+ },
25
+ {
26
+ path: "/task/task-inst/info",
27
+ component: ye,
28
+ name: "taskDetail",
29
+ meta: {
30
+ hidden: !1,
31
+ title: "任务详情"
32
+ }
33
+ }
34
+ ]
35
+ }
36
+ ], we = [
37
+ {
38
+ path: "/redirect",
39
+ component: D,
40
+ meta: { hidden: !0 },
41
+ children: [
42
+ {
43
+ path: "/redirect/:path(.*)",
44
+ component: re
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ path: "/login",
50
+ component: ue,
51
+ meta: { hidden: !0 }
52
+ },
53
+ {
54
+ path: "/my",
55
+ component: D,
56
+ meta: { hidden: !0 },
57
+ redirect: "noredirect",
58
+ children: [
59
+ {
60
+ path: "profile",
61
+ component: ie,
62
+ name: "Profile",
63
+ meta: { title: "个人中心", icon: "user" }
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ path: "/",
69
+ name: "/",
70
+ component: D,
71
+ redirect: "/dashboard",
72
+ children: [
73
+ {
74
+ path: "/dashboard",
75
+ component: de,
76
+ name: "Dashboard",
77
+ // 用于 keep-alive, 必须与SFC自动推导或者显示声明的组件name一致
78
+ // https://cn.vuejs.org/guide/built-ins/keep-alive.html#include-exclude
79
+ meta: {
80
+ title: "Dashboard",
81
+ icon: "homepage",
82
+ affix: !0,
83
+ keepAlive: !0,
84
+ alwaysShow: !1
85
+ }
86
+ },
87
+ {
88
+ path: "401",
89
+ component: me,
90
+ meta: { hidden: !0 }
91
+ },
92
+ {
93
+ path: "404",
94
+ component: pe,
95
+ meta: { hidden: !0 }
96
+ }
97
+ ]
98
+ },
99
+ ...Ie
100
+ ], B = he({
101
+ history: be(void 0),
102
+ routes: we,
103
+ // 刷新时,滚动条位置还原
104
+ scrollBehavior: () => ({ left: 0, top: 0 })
105
+ });
106
+ ce.value = B;
107
+ class _e {
108
+ getKey() {
109
+ return {};
110
+ }
111
+ // 查询翻页信息任务实例
112
+ findPage(u) {
113
+ const k = R().user.tenant;
114
+ return L(u), u && (u.hasStatus = u.status !== void 0, u.hasSort = u.sort !== void 0), U({
115
+ url: "/v1/front/task/sooyie/task/page/" + k,
116
+ method: "get",
117
+ params: u
118
+ });
119
+ }
120
+ // 查询列表信息任务实例
121
+ findList(u) {
122
+ const k = R().user.tenant;
123
+ return L(u), U({
124
+ url: "/v1/front/task/sooyie/task/list/" + k,
125
+ method: "get",
126
+ params: u
127
+ });
128
+ }
129
+ }
130
+ const De = new _e(), Se = { class: "app-container" }, Ce = { class: "search-container" }, Ve = { key: 0 }, Te = { key: 1 }, $e = ["onClick"], Be = /* @__PURE__ */ ee({
131
+ __name: "index",
132
+ setup(j) {
133
+ const { proxy: u } = te(), { t: k } = fe();
134
+ m.OrgBizDict.useValues(), m.UserExtBizDict.useValues(), m.itemBizLayDict.useValues();
135
+ const n = V({}), {
136
+ tableHooks: d,
137
+ multipleTableRef: K,
138
+ queryFormRef: A,
139
+ listLoading: Q,
140
+ tableData: x,
141
+ total: w
142
+ } = ke(k, De, n), f = V([]);
143
+ function H(s) {
144
+ f.value.length === 0 && ve.getEnum({ className: z.TASKSORT_TYPE, type: 1 }).then((b) => {
145
+ f.value = b.data.values;
146
+ });
147
+ const t = f.value.find((b) => b.key === s);
148
+ return t ? t.value : "";
149
+ }
150
+ let h = V([
151
+ // 任务主题
152
+ {
153
+ label: "taskInst.taskName",
154
+ prop: "taskName",
155
+ minWidth: "150",
156
+ sortable: "custom",
157
+ isColumn: !0
158
+ },
159
+ // 任务类型
160
+ {
161
+ label: "taskInst.sort",
162
+ prop: "sort",
163
+ slotName: "sort",
164
+ columnType: "slot",
165
+ minWidth: "150",
166
+ sortable: "custom",
167
+ isColumn: !0
168
+ },
169
+ // 服务对象
170
+ {
171
+ label: "taskInst.customerTagId",
172
+ prop: "customerTagId",
173
+ slotName: "customerTagId",
174
+ columnType: "slot",
175
+ minWidth: "150",
176
+ sortable: "custom",
177
+ isColumn: !0
178
+ },
179
+ // 开始日期
180
+ {
181
+ label: "taskInst.startDate",
182
+ prop: "startDate",
183
+ width: "105",
184
+ sortable: "custom",
185
+ isColumn: !0
186
+ },
187
+ // 截止日期
188
+ {
189
+ label: "taskInst.endDate",
190
+ prop: "endDate",
191
+ width: "105",
192
+ sortable: "custom",
193
+ isColumn: !0
194
+ },
195
+ // 执行人员
196
+ {
197
+ label: "taskInst.userId",
198
+ prop: "userId",
199
+ slotName: "userId",
200
+ columnType: "slot",
201
+ width: "105",
202
+ sortable: "custom",
203
+ isColumn: !0
204
+ },
205
+ // 已读状态
206
+ {
207
+ label: "taskInst.readStatus",
208
+ prop: "readStatus",
209
+ slotName: "readStatus",
210
+ columnType: "slot",
211
+ width: "105",
212
+ sortable: "custom",
213
+ isColumn: !0
214
+ },
215
+ // 完成状态
216
+ {
217
+ label: "taskInst.status",
218
+ prop: "status",
219
+ slotName: "status",
220
+ columnType: "slot",
221
+ width: "105",
222
+ sortable: "custom",
223
+ isColumn: !0
224
+ },
225
+ // 完成进度
226
+ {
227
+ label: "taskInst.percent",
228
+ prop: "percent",
229
+ slotName: "percent",
230
+ columnType: "slot",
231
+ width: "105",
232
+ sortable: "custom",
233
+ isColumn: !0
234
+ },
235
+ // 完成时间
236
+ {
237
+ label: "taskInst.finishDate",
238
+ prop: "finishDate",
239
+ slotName: "finishDate",
240
+ columnType: "slot",
241
+ width: "160",
242
+ sortable: "custom",
243
+ isColumn: !0
244
+ },
245
+ {
246
+ label: "common.operate",
247
+ width: "60",
248
+ slotName: "operation",
249
+ columnType: "slot",
250
+ fixed: "right",
251
+ isColumn: !0
252
+ }
253
+ ]);
254
+ function Y(s) {
255
+ B.push({
256
+ path: "/task/task-inst/info",
257
+ query: {
258
+ taskInstId: s.taskInstId,
259
+ taskSort: s.sort,
260
+ taskDefineId: s.taskDefineId
261
+ }
262
+ });
263
+ }
264
+ function O(s) {
265
+ d.selectionRows.value = s;
266
+ }
267
+ function W(s) {
268
+ d.handleSort(s.prop, s.order);
269
+ }
270
+ return ae(() => {
271
+ d.getList();
272
+ }), (s, t) => {
273
+ const b = r("el-input"), v = r("el-form-item"), g = r("el-col"), F = r("el-option"), M = r("el-select"), $ = r("jmash-select"), S = r("el-row"), C = r("el-button"), q = r("el-form"), G = r("jmash-column-select"), J = r("jmash-table"), X = r("jmash-pagination"), Z = r("el-card"), P = oe("hasPerm");
274
+ return p(), y("div", Se, [
275
+ c("div", Ce, [
276
+ l(q, {
277
+ ref_key: "queryFormRef",
278
+ ref: A,
279
+ model: n.value,
280
+ inline: !0
281
+ }, {
282
+ default: a(() => [
283
+ l(S, null, {
284
+ default: a(() => [
285
+ l(g, { span: 6 }, {
286
+ default: a(() => [
287
+ l(v, {
288
+ label: s.$t("taskInst.keyword"),
289
+ prop: "keyword"
290
+ }, {
291
+ default: a(() => [
292
+ l(b, {
293
+ modelValue: n.value.keyword,
294
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => n.value.keyword = e),
295
+ placeholder: s.$t("taskInst.keywordRequired"),
296
+ onKeyup: t[1] || (t[1] = _((e) => o(d).handleQuery(), ["enter"])),
297
+ class: "!w-[203px]"
298
+ }, null, 8, ["modelValue", "placeholder"])
299
+ ]),
300
+ _: 1
301
+ }, 8, ["label"])
302
+ ]),
303
+ _: 1
304
+ }),
305
+ l(g, { span: 6 }, {
306
+ default: a(() => [
307
+ l(v, {
308
+ label: s.$t("taskDefine.taskSort"),
309
+ prop: "sort"
310
+ }, {
311
+ default: a(() => [
312
+ l(M, {
313
+ modelValue: n.value.sort,
314
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => n.value.sort = e),
315
+ data: f.value,
316
+ placeholder: s.$t("taskDefine.taskSort"),
317
+ onKeyup: t[3] || (t[3] = _((e) => o(d).handleQuery(), ["enter"])),
318
+ class: "!w-[203px]"
319
+ }, {
320
+ default: a(() => [
321
+ (p(!0), y(se, null, le(f.value, (e) => (p(), T(F, {
322
+ key: e.key,
323
+ label: e.value,
324
+ value: e.key
325
+ }, null, 8, ["label", "value"]))), 128))
326
+ ]),
327
+ _: 1
328
+ }, 8, ["modelValue", "data", "placeholder"])
329
+ ]),
330
+ _: 1
331
+ }, 8, ["label"])
332
+ ]),
333
+ _: 1
334
+ }),
335
+ l(g, { span: 6 }, {
336
+ default: a(() => [
337
+ l(v, {
338
+ label: s.$t("taskInst.readStatus"),
339
+ prop: "readStatus"
340
+ }, {
341
+ default: a(() => [
342
+ l($, {
343
+ modelValue: n.value.readStatus,
344
+ "onUpdate:modelValue": t[4] || (t[4] = (e) => n.value.readStatus = e),
345
+ data: o(m).readStatusDict.values,
346
+ placeholder: s.$t("taskInst.readStatus"),
347
+ onKeyup: t[5] || (t[5] = _((e) => o(d).handleQuery(), ["enter"])),
348
+ class: "!w-[203px]"
349
+ }, null, 8, ["modelValue", "data", "placeholder"])
350
+ ]),
351
+ _: 1
352
+ }, 8, ["label"])
353
+ ]),
354
+ _: 1
355
+ }),
356
+ l(g, { span: 6 }, {
357
+ default: a(() => [
358
+ l(v, {
359
+ label: s.$t("taskInst.status"),
360
+ prop: "status"
361
+ }, {
362
+ default: a(() => [
363
+ l($, {
364
+ modelValue: n.value.status,
365
+ "onUpdate:modelValue": t[6] || (t[6] = (e) => n.value.status = e),
366
+ data: o(m).taskStatusEnum.values,
367
+ placeholder: s.$t("taskInst.statusRequired"),
368
+ onKeyup: t[7] || (t[7] = _((e) => o(d).handleQuery(), ["enter"])),
369
+ class: "!w-[203px]"
370
+ }, null, 8, ["modelValue", "data", "placeholder"])
371
+ ]),
372
+ _: 1
373
+ }, 8, ["label"])
374
+ ]),
375
+ _: 1
376
+ })
377
+ ]),
378
+ _: 1
379
+ }),
380
+ l(S),
381
+ l(v, { class: "search-btn" }, {
382
+ default: a(() => [
383
+ l(C, {
384
+ type: "primary",
385
+ onClick: t[8] || (t[8] = (e) => o(d).handleQuery())
386
+ }, {
387
+ default: a(() => [
388
+ I(i(s.$t("common.search")), 1)
389
+ ]),
390
+ _: 1
391
+ }),
392
+ l(C, {
393
+ onClick: t[9] || (t[9] = (e) => o(d).resetQuery())
394
+ }, {
395
+ default: a(() => [
396
+ I(i(s.$t("common.reset")), 1)
397
+ ]),
398
+ _: 1
399
+ })
400
+ ]),
401
+ _: 1
402
+ })
403
+ ]),
404
+ _: 1
405
+ }, 8, ["model"]),
406
+ t[16] || (t[16] = c("div", { class: "clear" }, null, -1))
407
+ ]),
408
+ l(Z, {
409
+ shadow: "never",
410
+ class: "table-container"
411
+ }, {
412
+ header: a(() => [
413
+ l(S, null, {
414
+ default: a(() => [
415
+ l(g, {
416
+ span: 24,
417
+ class: "container-float"
418
+ }, {
419
+ default: a(() => [
420
+ E((p(), T(C, {
421
+ plain: "",
422
+ type: "primary",
423
+ onClick: t[10] || (t[10] = (e) => o(d).handleExport(o(k)("task.taskInst.name")))
424
+ }, {
425
+ default: a(() => [
426
+ I(i(s.$t("common.export")), 1)
427
+ ]),
428
+ _: 1
429
+ })), [
430
+ [P, ["task:task:export"]]
431
+ ]),
432
+ l(G, {
433
+ modelValue: o(h),
434
+ "onUpdate:modelValue": t[11] || (t[11] = (e) => N(h) ? h.value = e : h = e),
435
+ "label-name": "task/task"
436
+ }, null, 8, ["modelValue"])
437
+ ]),
438
+ _: 1
439
+ })
440
+ ]),
441
+ _: 1
442
+ })
443
+ ]),
444
+ footer: a(() => [
445
+ o(w) > 0 ? (p(), T(X, {
446
+ key: 0,
447
+ total: o(w),
448
+ "onUpdate:total": t[12] || (t[12] = (e) => N(w) ? w.value = e : null),
449
+ "current-page": n.value.curPage,
450
+ "onUpdate:currentPage": t[13] || (t[13] = (e) => n.value.curPage = e),
451
+ "page-size": n.value.pageSize,
452
+ "onUpdate:pageSize": t[14] || (t[14] = (e) => n.value.pageSize = e),
453
+ onPagination: t[15] || (t[15] = (e) => o(d).getList())
454
+ }, null, 8, ["total", "current-page", "page-size"])) : ne("", !0)
455
+ ]),
456
+ default: a(() => [
457
+ l(J, {
458
+ ref_key: "multipleTableRef",
459
+ ref: K,
460
+ "row-key": "taskInstId",
461
+ "list-loading": o(Q),
462
+ data: o(x),
463
+ "table-label": o(h),
464
+ onSelectionChange: O,
465
+ onSortChange: W
466
+ }, {
467
+ sort: a((e) => [
468
+ c("span", null, i(H(e.data.row.sort)), 1)
469
+ ]),
470
+ customerTagId: a((e) => [
471
+ e.data.row.sort === o(z).CUSTOMER ? (p(), y("span", Ve, i(o(m).OrgBizDict.getValue(e.data.row.annivCustomerId)), 1)) : (p(), y("span", Te, i(o(m).itemBizLayDict.getValue(e.data.row.annivCustomerId)), 1))
472
+ ]),
473
+ readStatus: a((e) => [
474
+ c("span", null, i(o(m).readStatusDict.getValue(e.data.row.readStatus)), 1)
475
+ ]),
476
+ status: a((e) => [
477
+ c("span", null, i(o(m).taskStatusEnum.getEnumValue(e.data.row.status)), 1)
478
+ ]),
479
+ percent: a((e) => [
480
+ c("span", null, i(e.data.row.percent) + "% ", 1)
481
+ ]),
482
+ finishDate: a((e) => [
483
+ I(i(o(u).$moment.formatDate(
484
+ e.data.row.finishDate,
485
+ "YYYY-MM-DD HH:mm:ss"
486
+ )), 1)
487
+ ]),
488
+ userId: a((e) => [
489
+ c("span", null, i(o(m).UserExtBizDict.getValue(e.data.row.userId)), 1)
490
+ ]),
491
+ operation: a((e) => [
492
+ E((p(), y("span", {
493
+ class: "el-button-color",
494
+ onClick: (Pe) => Y(e.data.row)
495
+ }, [
496
+ I(i(s.$t("common.view")), 1)
497
+ ], 8, $e)), [
498
+ [P, ["task:task:delete"]]
499
+ ])
500
+ ]),
501
+ _: 1
502
+ }, 8, ["list-loading", "data", "table-label"])
503
+ ]),
504
+ _: 1
505
+ })
506
+ ]);
507
+ };
508
+ }
509
+ });
510
+ export {
511
+ Be as default
512
+ };