sooyie-task 0.0.5 → 0.0.7

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,412 @@
1
+ import { defineComponent as Z, getCurrentInstance as tt, ref as C, onActivated as et, resolveComponent as r, resolveDirective as at, createElementBlock as I, openBlock as p, createElementVNode as c, createVNode as o, withCtx as a, withKeys as h, unref as s, Fragment as st, renderList as lt, createBlock as V, createTextVNode as _, toDisplayString as d, withDirectives as N, createCommentVNode as ot, isRef as E } from "vue";
2
+ import { useUserStore as U, clearEmpty as z, request as R, useTableHooks as nt } from "jmash-core";
3
+ import { useI18n as rt } from "vue-i18n";
4
+ import { D as m, C as L } from "./index-DvawPwK3.mjs";
5
+ import { t as ut } from "./index-BRMLJ2ar.mjs";
6
+ import { useRouter as dt } from "vue-router";
7
+ class it {
8
+ getKey() {
9
+ return {};
10
+ }
11
+ // 查询翻页信息任务实例
12
+ findPage(u) {
13
+ const k = U().user.tenant;
14
+ return z(u), u && (u.hasStatus = u.status !== void 0, u.hasSort = u.sort !== void 0), R({
15
+ url: "/v1/front/task/sooyie/task/page/" + k,
16
+ method: "get",
17
+ params: u
18
+ });
19
+ }
20
+ // 查询列表信息任务实例
21
+ findList(u) {
22
+ const k = U().user.tenant;
23
+ return z(u), R({
24
+ url: "/v1/front/task/sooyie/task/list/" + k,
25
+ method: "get",
26
+ params: u
27
+ });
28
+ }
29
+ }
30
+ const mt = new it(), pt = { class: "app-container" }, ct = { class: "search-container" }, kt = { key: 0 }, ft = { key: 1 }, vt = ["onClick"], St = /* @__PURE__ */ Z({
31
+ __name: "index",
32
+ setup(B) {
33
+ const { proxy: u } = tt(), { t: k } = rt();
34
+ m.OrgBizDict.useValues(), m.UserExtBizDict.useValues(), m.itemBizLayDict.useValues();
35
+ const n = C({}), P = dt(), {
36
+ tableHooks: i,
37
+ multipleTableRef: j,
38
+ queryFormRef: K,
39
+ listLoading: Q,
40
+ tableData: A,
41
+ total: w
42
+ } = nt(k, mt, n), f = C([]);
43
+ function Y(l) {
44
+ f.value.length === 0 && ut.getEnum({ className: L.TASKSORT_TYPE, type: 1 }).then((b) => {
45
+ f.value = b.data.values;
46
+ });
47
+ const e = f.value.find((b) => b.key === l);
48
+ return e ? e.value : "";
49
+ }
50
+ let v = C([
51
+ // 任务主题
52
+ {
53
+ label: "taskInst.taskName",
54
+ prop: "taskName",
55
+ minWidth: "150",
56
+ sortable: "custom",
57
+ isColumn: !0
58
+ },
59
+ // 任务类型
60
+ {
61
+ label: "taskInst.sort",
62
+ prop: "sort",
63
+ slotName: "sort",
64
+ columnType: "slot",
65
+ minWidth: "150",
66
+ sortable: "custom",
67
+ isColumn: !0
68
+ },
69
+ // 服务对象
70
+ {
71
+ label: "taskInst.customerTagId",
72
+ prop: "customerTagId",
73
+ slotName: "customerTagId",
74
+ columnType: "slot",
75
+ minWidth: "150",
76
+ sortable: "custom",
77
+ isColumn: !0
78
+ },
79
+ // 开始日期
80
+ {
81
+ label: "taskInst.startDate",
82
+ prop: "startDate",
83
+ width: "105",
84
+ sortable: "custom",
85
+ isColumn: !0
86
+ },
87
+ // 截止日期
88
+ {
89
+ label: "taskInst.endDate",
90
+ prop: "endDate",
91
+ width: "105",
92
+ sortable: "custom",
93
+ isColumn: !0
94
+ },
95
+ // 执行人员
96
+ {
97
+ label: "taskInst.userId",
98
+ prop: "userId",
99
+ slotName: "userId",
100
+ columnType: "slot",
101
+ width: "105",
102
+ sortable: "custom",
103
+ isColumn: !0
104
+ },
105
+ // 已读状态
106
+ {
107
+ label: "taskInst.readStatus",
108
+ prop: "readStatus",
109
+ slotName: "readStatus",
110
+ columnType: "slot",
111
+ width: "105",
112
+ sortable: "custom",
113
+ isColumn: !0
114
+ },
115
+ // 完成状态
116
+ {
117
+ label: "taskInst.status",
118
+ prop: "status",
119
+ slotName: "status",
120
+ columnType: "slot",
121
+ width: "105",
122
+ sortable: "custom",
123
+ isColumn: !0
124
+ },
125
+ // 完成进度
126
+ {
127
+ label: "taskInst.percent",
128
+ prop: "percent",
129
+ slotName: "percent",
130
+ columnType: "slot",
131
+ width: "105",
132
+ sortable: "custom",
133
+ isColumn: !0
134
+ },
135
+ // 完成时间
136
+ {
137
+ label: "taskInst.finishDate",
138
+ prop: "finishDate",
139
+ slotName: "finishDate",
140
+ columnType: "slot",
141
+ width: "160",
142
+ sortable: "custom",
143
+ isColumn: !0
144
+ },
145
+ {
146
+ label: "common.operate",
147
+ width: "60",
148
+ slotName: "operation",
149
+ columnType: "slot",
150
+ fixed: "right",
151
+ isColumn: !0
152
+ }
153
+ ]);
154
+ function x(l) {
155
+ P.push({
156
+ path: "/task/task-inst/info",
157
+ query: {
158
+ taskInstId: l.taskInstId,
159
+ taskSort: l.sort,
160
+ taskDefineId: l.taskDefineId
161
+ }
162
+ });
163
+ }
164
+ function H(l) {
165
+ i.selectionRows.value = l;
166
+ }
167
+ function O(l) {
168
+ i.handleSort(l.prop, l.order);
169
+ }
170
+ return et(() => {
171
+ i.getList();
172
+ }), (l, e) => {
173
+ const b = r("el-input"), y = r("el-form-item"), g = r("el-col"), F = r("el-option"), M = r("el-select"), T = r("jmash-select"), S = r("el-row"), D = r("el-button"), W = r("el-form"), q = r("jmash-column-select"), G = r("jmash-table"), J = r("jmash-pagination"), X = r("el-card"), $ = at("hasPerm");
174
+ return p(), I("div", pt, [
175
+ c("div", ct, [
176
+ o(W, {
177
+ ref_key: "queryFormRef",
178
+ ref: K,
179
+ model: n.value,
180
+ inline: !0
181
+ }, {
182
+ default: a(() => [
183
+ o(S, null, {
184
+ default: a(() => [
185
+ o(g, { span: 6 }, {
186
+ default: a(() => [
187
+ o(y, {
188
+ label: l.$t("taskInst.keyword"),
189
+ prop: "keyword"
190
+ }, {
191
+ default: a(() => [
192
+ o(b, {
193
+ modelValue: n.value.keyword,
194
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => n.value.keyword = t),
195
+ placeholder: l.$t("taskInst.keywordRequired"),
196
+ onKeyup: e[1] || (e[1] = h((t) => s(i).handleQuery(), ["enter"])),
197
+ class: "!w-[203px]"
198
+ }, null, 8, ["modelValue", "placeholder"])
199
+ ]),
200
+ _: 1
201
+ }, 8, ["label"])
202
+ ]),
203
+ _: 1
204
+ }),
205
+ o(g, { span: 6 }, {
206
+ default: a(() => [
207
+ o(y, {
208
+ label: l.$t("taskDefine.taskSort"),
209
+ prop: "sort"
210
+ }, {
211
+ default: a(() => [
212
+ o(M, {
213
+ modelValue: n.value.sort,
214
+ "onUpdate:modelValue": e[2] || (e[2] = (t) => n.value.sort = t),
215
+ data: f.value,
216
+ placeholder: l.$t("taskDefine.taskSort"),
217
+ onKeyup: e[3] || (e[3] = h((t) => s(i).handleQuery(), ["enter"])),
218
+ class: "!w-[203px]"
219
+ }, {
220
+ default: a(() => [
221
+ (p(!0), I(st, null, lt(f.value, (t) => (p(), V(F, {
222
+ key: t.key,
223
+ label: t.value,
224
+ value: t.key
225
+ }, null, 8, ["label", "value"]))), 128))
226
+ ]),
227
+ _: 1
228
+ }, 8, ["modelValue", "data", "placeholder"])
229
+ ]),
230
+ _: 1
231
+ }, 8, ["label"])
232
+ ]),
233
+ _: 1
234
+ }),
235
+ o(g, { span: 6 }, {
236
+ default: a(() => [
237
+ o(y, {
238
+ label: l.$t("taskInst.readStatus"),
239
+ prop: "readStatus"
240
+ }, {
241
+ default: a(() => [
242
+ o(T, {
243
+ modelValue: n.value.readStatus,
244
+ "onUpdate:modelValue": e[4] || (e[4] = (t) => n.value.readStatus = t),
245
+ data: s(m).readStatusDict.values,
246
+ placeholder: l.$t("taskInst.readStatus"),
247
+ onKeyup: e[5] || (e[5] = h((t) => s(i).handleQuery(), ["enter"])),
248
+ class: "!w-[203px]"
249
+ }, null, 8, ["modelValue", "data", "placeholder"])
250
+ ]),
251
+ _: 1
252
+ }, 8, ["label"])
253
+ ]),
254
+ _: 1
255
+ }),
256
+ o(g, { span: 6 }, {
257
+ default: a(() => [
258
+ o(y, {
259
+ label: l.$t("taskInst.status"),
260
+ prop: "status"
261
+ }, {
262
+ default: a(() => [
263
+ o(T, {
264
+ modelValue: n.value.status,
265
+ "onUpdate:modelValue": e[6] || (e[6] = (t) => n.value.status = t),
266
+ data: s(m).taskStatusEnum.values,
267
+ placeholder: l.$t("taskInst.statusRequired"),
268
+ onKeyup: e[7] || (e[7] = h((t) => s(i).handleQuery(), ["enter"])),
269
+ class: "!w-[203px]"
270
+ }, null, 8, ["modelValue", "data", "placeholder"])
271
+ ]),
272
+ _: 1
273
+ }, 8, ["label"])
274
+ ]),
275
+ _: 1
276
+ })
277
+ ]),
278
+ _: 1
279
+ }),
280
+ o(S),
281
+ o(y, { class: "search-btn" }, {
282
+ default: a(() => [
283
+ o(D, {
284
+ type: "primary",
285
+ onClick: e[8] || (e[8] = (t) => s(i).handleQuery())
286
+ }, {
287
+ default: a(() => [
288
+ _(d(l.$t("common.search")), 1)
289
+ ]),
290
+ _: 1
291
+ }),
292
+ o(D, {
293
+ onClick: e[9] || (e[9] = (t) => s(i).resetQuery())
294
+ }, {
295
+ default: a(() => [
296
+ _(d(l.$t("common.reset")), 1)
297
+ ]),
298
+ _: 1
299
+ })
300
+ ]),
301
+ _: 1
302
+ })
303
+ ]),
304
+ _: 1
305
+ }, 8, ["model"]),
306
+ e[16] || (e[16] = c("div", { class: "clear" }, null, -1))
307
+ ]),
308
+ o(X, {
309
+ shadow: "never",
310
+ class: "table-container"
311
+ }, {
312
+ header: a(() => [
313
+ o(S, null, {
314
+ default: a(() => [
315
+ o(g, {
316
+ span: 24,
317
+ class: "container-float"
318
+ }, {
319
+ default: a(() => [
320
+ N((p(), V(D, {
321
+ plain: "",
322
+ type: "primary",
323
+ onClick: e[10] || (e[10] = (t) => s(i).handleExport(s(k)("task.taskInst.name")))
324
+ }, {
325
+ default: a(() => [
326
+ _(d(l.$t("common.export")), 1)
327
+ ]),
328
+ _: 1
329
+ })), [
330
+ [$, ["task:task:export"]]
331
+ ]),
332
+ o(q, {
333
+ modelValue: s(v),
334
+ "onUpdate:modelValue": e[11] || (e[11] = (t) => E(v) ? v.value = t : v = t),
335
+ "label-name": "task/task"
336
+ }, null, 8, ["modelValue"])
337
+ ]),
338
+ _: 1
339
+ })
340
+ ]),
341
+ _: 1
342
+ })
343
+ ]),
344
+ footer: a(() => [
345
+ s(w) > 0 ? (p(), V(J, {
346
+ key: 0,
347
+ total: s(w),
348
+ "onUpdate:total": e[12] || (e[12] = (t) => E(w) ? w.value = t : null),
349
+ "current-page": n.value.curPage,
350
+ "onUpdate:currentPage": e[13] || (e[13] = (t) => n.value.curPage = t),
351
+ "page-size": n.value.pageSize,
352
+ "onUpdate:pageSize": e[14] || (e[14] = (t) => n.value.pageSize = t),
353
+ onPagination: e[15] || (e[15] = (t) => s(i).getList())
354
+ }, null, 8, ["total", "current-page", "page-size"])) : ot("", !0)
355
+ ]),
356
+ default: a(() => [
357
+ o(G, {
358
+ ref_key: "multipleTableRef",
359
+ ref: j,
360
+ "row-key": "taskInstId",
361
+ "list-loading": s(Q),
362
+ data: s(A),
363
+ "table-label": s(v),
364
+ onSelectionChange: H,
365
+ onSortChange: O
366
+ }, {
367
+ sort: a((t) => [
368
+ c("span", null, d(Y(t.data.row.sort)), 1)
369
+ ]),
370
+ customerTagId: a((t) => [
371
+ t.data.row.sort === s(L).CUSTOMER ? (p(), I("span", kt, d(s(m).OrgBizDict.getValue(t.data.row.annivCustomerId)), 1)) : (p(), I("span", ft, d(s(m).itemBizLayDict.getValue(t.data.row.annivCustomerId)), 1))
372
+ ]),
373
+ readStatus: a((t) => [
374
+ c("span", null, d(s(m).readStatusDict.getValue(t.data.row.readStatus)), 1)
375
+ ]),
376
+ status: a((t) => [
377
+ c("span", null, d(s(m).taskStatusEnum.getEnumValue(t.data.row.status)), 1)
378
+ ]),
379
+ percent: a((t) => [
380
+ c("span", null, d(t.data.row.percent) + "% ", 1)
381
+ ]),
382
+ finishDate: a((t) => [
383
+ _(d(s(u).$moment.formatDate(
384
+ t.data.row.finishDate,
385
+ "YYYY-MM-DD HH:mm:ss"
386
+ )), 1)
387
+ ]),
388
+ userId: a((t) => [
389
+ c("span", null, d(s(m).UserExtBizDict.getValue(t.data.row.userId)), 1)
390
+ ]),
391
+ operation: a((t) => [
392
+ N((p(), I("span", {
393
+ class: "el-button-color",
394
+ onClick: (bt) => x(t.data.row)
395
+ }, [
396
+ _(d(l.$t("common.view")), 1)
397
+ ], 8, vt)), [
398
+ [$, ["task:task:delete"]]
399
+ ])
400
+ ]),
401
+ _: 1
402
+ }, 8, ["list-loading", "data", "table-label"])
403
+ ]),
404
+ _: 1
405
+ })
406
+ ]);
407
+ };
408
+ }
409
+ });
410
+ export {
411
+ St as default
412
+ };
@@ -2,9 +2,9 @@ import { defineComponent as X, getCurrentInstance as Z, ref as C, reactive as N,
2
2
  import { useTableHooks as ne } from "jmash-core";
3
3
  import { useI18n as se } from "vue-i18n";
4
4
  import { b as re } from "./index-B_hFZVhb-C3Oi__-I.mjs";
5
- import { t as B } from "./index-CEvxhWYT.mjs";
5
+ import { t as B } from "./index-BRMLJ2ar.mjs";
6
6
  import { D as ie, C as ue } from "./index-DvawPwK3.mjs";
7
- import me from "./add-C2devcsq.mjs";
7
+ import me from "./add-BaHTXQnK.mjs";
8
8
  import { useRouter as de } from "vue-router";
9
9
  const pe = { class: "app-container" }, ce = { class: "search-container" }, fe = ["onClick"], ke = ["onClick"], Se = /* @__PURE__ */ X({
10
10
  __name: "index",
package/dist/index.mjs CHANGED
@@ -213,7 +213,7 @@ function bs(e) {
213
213
  let s = e.global.getLocaleMessage("en");
214
214
  s = pt(s, Os), e.global.setLocaleMessage("zh-cn", t), e.global.setLocaleMessage("en", s);
215
215
  }
216
- const Is = () => import("./edit-CRQkMd15.mjs"), xs = () => import("./info-BTSBObrr.mjs"), Ns = [
216
+ const Is = () => import("./edit-DR6TsOR1.mjs"), xs = () => import("./info-RcJkYBPy.mjs"), Ns = [
217
217
  {
218
218
  path: "/task",
219
219
  component: Ms,
@@ -2827,7 +2827,7 @@ const Pi = {
2827
2827
  }
2828
2828
  };
2829
2829
  }
2830
- }, Wi = /* @__PURE__ */ Object.assign({ "./views/task/task-define-rel/add.vue": () => import("./add-7_dK5ok_.mjs").then((e) => e.b), "./views/task/task-define-rel/index.vue": () => import("./index-DIHsBjkh.mjs"), "./views/task/task-define/add.vue": () => import("./add-C2devcsq.mjs"), "./views/task/task-define/edit.vue": () => import("./edit-CRQkMd15.mjs"), "./views/task/task-define/index.vue": () => import("./index-_jDuSfL7.mjs"), "./views/task/task-inst/edit.vue": () => import("./edit-Ci8Uch5Z.mjs"), "./views/task/task-inst/index.vue": () => import("./index-DtM5EnwJ.mjs"), "./views/task/task-inst/info.vue": () => import("./info-BTSBObrr.mjs"), "./views/task/task-inst/report-info.vue": () => import("./report-info-B0NXFFzR.mjs").then((e) => e.r), "./views/task/task-inst/report.vue": () => import("./report-Uf6UKzUn.mjs").then((e) => e.r), "./views/task/task-task/index.vue": () => import("./index-aDDSbb4h.mjs") }), Ci = {
2830
+ }, Wi = /* @__PURE__ */ Object.assign({ "./views/task/task-define-rel/add.vue": () => import("./add-7_dK5ok_.mjs").then((e) => e.b), "./views/task/task-define-rel/index.vue": () => import("./index-DIHsBjkh.mjs"), "./views/task/task-define/add.vue": () => import("./add-BaHTXQnK.mjs"), "./views/task/task-define/edit.vue": () => import("./edit-DR6TsOR1.mjs"), "./views/task/task-define/index.vue": () => import("./index-DnYkwumi.mjs"), "./views/task/task-inst/edit.vue": () => import("./edit-Ci8Uch5Z.mjs"), "./views/task/task-inst/index.vue": () => import("./index-DtM5EnwJ.mjs"), "./views/task/task-inst/info.vue": () => import("./info-RcJkYBPy.mjs"), "./views/task/task-inst/report-info.vue": () => import("./report-info-B0NXFFzR.mjs").then((e) => e.r), "./views/task/task-inst/report.vue": () => import("./report-Uf6UKzUn.mjs").then((e) => e.r), "./views/task/task-task/index.vue": () => import("./index-Cb72ljTZ.mjs") }), Ci = {
2831
2831
  install(e) {
2832
2832
  vs(Wi, 7), bs(Ys), ps(Ns), e.use(Pi);
2833
2833
  }