sooyie-task 0.0.13 → 0.0.15

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,312 +0,0 @@
1
- import { defineComponent as O, getCurrentInstance as X, ref as C, reactive as $, onActivated as Z, resolveComponent as s, resolveDirective as N, createElementBlock as D, openBlock as m, createElementVNode as g, createVNode as n, createBlock as _, createCommentVNode as P, withCtx as o, withKeys as ee, unref as l, createTextVNode as d, toDisplayString as r, withDirectives as b, isRef as R } from "vue";
2
- import { useTableHooks as te } from "jmash-core";
3
- import { useI18n as oe } from "vue-i18n";
4
- import { S as ae } from "./index-CsfOvnt4-CYkGp1YO.mjs";
5
- import { t as le } from "./index-DrhTfMmI.mjs";
6
- import { D as S } from "./index-kbwxFttn.mjs";
7
- import { _ as ne } from "./add.vue_vue_type_script_setup_true_lang-DTf6YjPZ.mjs";
8
- import { useRouter as se } from "vue-router";
9
- const re = { class: "app-container" }, ie = { class: "search-container" }, ue = ["onClick"], me = ["onClick"], he = /* @__PURE__ */ O({
10
- __name: "index",
11
- setup(de) {
12
- const { t: v } = oe(), j = se(), { proxy: B } = X(), u = C({}), {
13
- tableHooks: i,
14
- multipleTableRef: E,
15
- queryFormRef: I,
16
- listLoading: U,
17
- tableData: z,
18
- total: f
19
- } = te(v, le, u);
20
- let c = C([
21
- // 任务主题
22
- {
23
- label: "taskDefine.taskTitle",
24
- prop: "taskTitle",
25
- width: "170",
26
- sortable: "custom",
27
- isColumn: !0
28
- },
29
- // 任务类型
30
- {
31
- label: "taskDefine.taskSort",
32
- prop: "taskSort",
33
- slotName: "taskSort",
34
- columnType: "slot",
35
- width: "105",
36
- sortable: "custom",
37
- isColumn: !0
38
- },
39
- // 执行频次
40
- {
41
- label: "taskDefine.taskCount",
42
- prop: "taskCount",
43
- slotName: "taskCount",
44
- columnType: "slot",
45
- width: "105",
46
- sortable: "custom",
47
- isColumn: !0
48
- },
49
- // 开始日期
50
- {
51
- label: "taskDefine.startDate",
52
- prop: "startDate",
53
- width: "105",
54
- sortable: "custom",
55
- isColumn: !0
56
- },
57
- // 截止日期
58
- {
59
- label: "taskDefine.endDate",
60
- prop: "endDate",
61
- width: "105",
62
- sortable: "custom",
63
- isColumn: !0
64
- },
65
- // 任务描述
66
- {
67
- label: "taskDefine.note",
68
- prop: "note",
69
- minWidth: "150",
70
- sortable: "custom",
71
- isColumn: !0
72
- },
73
- // 创建人
74
- {
75
- label: "taskDefine.createBy",
76
- prop: "createBy",
77
- slotName: "createBy",
78
- columnType: "slot",
79
- width: "105",
80
- sortable: "custom",
81
- isColumn: !0
82
- },
83
- // 创建时间
84
- {
85
- label: "taskDefine.createTime",
86
- prop: "createTime",
87
- slotName: "createTime",
88
- columnType: "slot",
89
- width: "160",
90
- sortable: "custom",
91
- isColumn: !0
92
- },
93
- {
94
- label: "common.operate",
95
- width: "100",
96
- slotName: "operation",
97
- columnType: "slot",
98
- fixed: "right",
99
- isColumn: !0
100
- }
101
- ]);
102
- const p = C({
103
- title: v("common.edit"),
104
- visible: !1
105
- });
106
- function L(a) {
107
- j.push({
108
- path: "/task/task-define/edit",
109
- query: { taskDefineId: a.taskDefineId, taskSort: a.taskSort }
110
- });
111
- }
112
- let w = $({});
113
- function q() {
114
- w = $({}), p.value.title = v("common.add"), p.value.visible = !0;
115
- }
116
- function H(a) {
117
- i.selectionRows.value = a;
118
- }
119
- function Y(a) {
120
- i.handleSort(a.prop, a.order);
121
- }
122
- function A(a) {
123
- a && i.getList();
124
- }
125
- return Z(() => {
126
- i.getList();
127
- }), (a, t) => {
128
- const K = s("jmash-select"), T = s("el-form-item"), k = s("el-col"), y = s("el-button"), V = s("el-row"), Q = s("el-form"), x = s("jmash-column-select"), F = s("jmash-table"), M = s("jmash-pagination"), W = s("el-card"), h = N("hasPerm"), G = N("loading");
129
- return m(), D("div", re, [
130
- g("div", ie, [
131
- n(Q, {
132
- ref_key: "queryFormRef",
133
- ref: I,
134
- model: u.value,
135
- inline: !0
136
- }, {
137
- default: o(() => [
138
- n(V, null, {
139
- default: o(() => [
140
- n(k, { span: 6 }, {
141
- default: o(() => [
142
- n(T, {
143
- label: a.$t("taskDefine.taskSort"),
144
- prop: "taskSort"
145
- }, {
146
- default: o(() => [
147
- n(K, {
148
- modelValue: u.value.taskSort,
149
- "onUpdate:modelValue": t[0] || (t[0] = (e) => u.value.taskSort = e),
150
- data: l(S).taskSortTypeEnum.values,
151
- placeholder: a.$t("taskDefine.taskSort"),
152
- onKeyup: t[1] || (t[1] = ee((e) => l(i).handleQuery(), ["enter"])),
153
- class: "!w-[203px]"
154
- }, null, 8, ["modelValue", "data", "placeholder"])
155
- ]),
156
- _: 1
157
- }, 8, ["label"])
158
- ]),
159
- _: 1
160
- }),
161
- n(k, { span: 18 }, {
162
- default: o(() => [
163
- n(T, { class: "search-btn" }, {
164
- default: o(() => [
165
- n(y, {
166
- type: "primary",
167
- onClick: t[2] || (t[2] = (e) => l(i).handleQuery())
168
- }, {
169
- default: o(() => [
170
- d(r(a.$t("common.search")), 1)
171
- ]),
172
- _: 1
173
- }),
174
- n(y, {
175
- onClick: t[3] || (t[3] = (e) => l(i).resetQuery())
176
- }, {
177
- default: o(() => [
178
- d(r(a.$t("common.reset")), 1)
179
- ]),
180
- _: 1
181
- })
182
- ]),
183
- _: 1
184
- })
185
- ]),
186
- _: 1
187
- })
188
- ]),
189
- _: 1
190
- })
191
- ]),
192
- _: 1
193
- }, 8, ["model"])
194
- ]),
195
- n(W, {
196
- shadow: "never",
197
- class: "table-container"
198
- }, {
199
- header: o(() => [
200
- n(V, null, {
201
- default: o(() => [
202
- n(k, { span: 17 }, {
203
- default: o(() => [
204
- b((m(), _(y, {
205
- type: "primary",
206
- onClick: q
207
- }, {
208
- default: o(() => [
209
- d(r(a.$t("common.add")), 1)
210
- ]),
211
- _: 1
212
- })), [
213
- [h, ["task:task_define:add"]]
214
- ])
215
- ]),
216
- _: 1
217
- }),
218
- n(k, {
219
- span: 7,
220
- class: "container-float"
221
- }, {
222
- default: o(() => [
223
- n(x, {
224
- modelValue: l(c),
225
- "onUpdate:modelValue": t[4] || (t[4] = (e) => R(c) ? c.value = e : c = e),
226
- "label-name": "task/task-define"
227
- }, null, 8, ["modelValue"])
228
- ]),
229
- _: 1
230
- })
231
- ]),
232
- _: 1
233
- })
234
- ]),
235
- footer: o(() => [
236
- l(f) > 0 ? (m(), _(M, {
237
- key: 0,
238
- total: l(f),
239
- "onUpdate:total": t[5] || (t[5] = (e) => R(f) ? f.value = e : null),
240
- "current-page": u.value.curPage,
241
- "onUpdate:currentPage": t[6] || (t[6] = (e) => u.value.curPage = e),
242
- "page-size": u.value.pageSize,
243
- "onUpdate:pageSize": t[7] || (t[7] = (e) => u.value.pageSize = e),
244
- onPagination: t[8] || (t[8] = (e) => l(i).getList())
245
- }, null, 8, ["total", "current-page", "page-size"])) : P("", !0)
246
- ]),
247
- default: o(() => [
248
- b((m(), _(F, {
249
- ref_key: "multipleTableRef",
250
- ref: E,
251
- "row-key": "taskDefineId",
252
- data: l(z),
253
- "table-label": l(c),
254
- onSelectionChange: H,
255
- onSortChange: Y
256
- }, {
257
- taskSort: o((e) => [
258
- g("span", null, r(l(S).taskSortTypeEnum.getEnumValue(e.data.row.taskSort)), 1)
259
- ]),
260
- taskCount: o((e) => [
261
- g("span", null, r(e.data.row.taskCount) + "次/" + r(l(S).taskPeriodEnum.getEnumValue(e.data.row.taskPeriod)), 1)
262
- ]),
263
- createBy: o((e) => [
264
- d(r(l(ae).userInfo(e.data.row.createBy).realName), 1)
265
- ]),
266
- createTime: o((e) => [
267
- d(r(l(B).$moment.formatDate(
268
- e.data.row.createTime,
269
- "YYYY-MM-DD HH:mm:ss"
270
- )), 1)
271
- ]),
272
- operation: o((e) => [
273
- b((m(), D("span", {
274
- class: "el-button-color",
275
- onClick: (J) => L(e.data.row)
276
- }, [
277
- d(r(a.$t("common.edit")), 1)
278
- ], 8, ue)), [
279
- [h, ["task:task_define:update"]]
280
- ]),
281
- b((m(), D("span", {
282
- class: "el-button-color",
283
- onClick: (J) => l(i).deleteRecord(e.data.row)
284
- }, [
285
- d(r(a.$t("common.delete")), 1)
286
- ], 8, me)), [
287
- [h, ["task:task_define:delete"]]
288
- ])
289
- ]),
290
- _: 1
291
- }, 8, ["data", "table-label"])), [
292
- [G, l(U)]
293
- ])
294
- ]),
295
- _: 1
296
- }),
297
- p.value.visible ? (m(), _(ne, {
298
- key: 0,
299
- modelValue: p.value.visible,
300
- "onUpdate:modelValue": t[9] || (t[9] = (e) => p.value.visible = e),
301
- title: p.value.title,
302
- "entity-key": l(w),
303
- onRefresh: A,
304
- width: "900px"
305
- }, null, 8, ["modelValue", "title", "entity-key"])) : P("", !0)
306
- ]);
307
- };
308
- }
309
- });
310
- export {
311
- he as default
312
- };