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,41 +1,41 @@
1
- import { defineComponent as Z, mergeModels as x, ref as c, reactive as R, watch as ee, useModel as te, resolveComponent as d, createElementBlock as k, openBlock as p, Fragment as v, createVNode as t, withCtx as o, unref as s, renderList as T, createBlock as ae, createTextVNode as D, toDisplayString as g, createElementVNode as le } from "vue";
2
- import { ElMessage as w } from "element-plus";
3
- import { useI18n as oe } from "vue-i18n";
4
- import { u as ne } from "./index-DaJ5KrbS.mjs";
5
- import { t as se } from "./index-DrhTfMmI.mjs";
6
- import { D as _, a as de } from "./index-kbwxFttn.mjs";
7
- import "jmash-core";
8
- const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
1
+ import { defineComponent as x, mergeModels as ee, ref as D, reactive as R, watch as te, useModel as le, resolveComponent as r, createElementBlock as g, openBlock as p, Fragment as v, createVNode as t, withCtx as o, unref as s, renderList as T, createBlock as ae, createTextVNode as c, toDisplayString as _, createElementVNode as oe } from "vue";
2
+ import { ElMessage as C } from "element-plus";
3
+ import { useI18n as ne } from "vue-i18n";
4
+ import { u as se } from "./index-DaJ5KrbS.mjs";
5
+ import { t as re } from "./index-DrhTfMmI.mjs";
6
+ import { D as V, a as de } from "./index-BUfsHvCP.mjs";
7
+ import { handlePreview as ie } from "jmash-core";
8
+ const ue = { class: "dialog-footer" }, _e = /* @__PURE__ */ x({
9
9
  __name: "add",
10
10
  props: {
11
11
  modelValue: { type: Boolean },
12
12
  modelModifiers: {}
13
13
  },
14
- emits: /* @__PURE__ */ x(["refresh"], ["update:modelValue"]),
14
+ emits: /* @__PURE__ */ ee(["refresh"], ["update:modelValue"]),
15
15
  setup(Y, { emit: M }) {
16
- const { t: i } = oe();
17
- _.taskInspectTypeDict.useValues();
18
- const C = c(), V = c([]);
19
- let a = R({
16
+ const { t: i } = ne();
17
+ V.taskInspectTypeDict.useValues();
18
+ const w = D(), b = D([]);
19
+ let l = R({
20
20
  requestId: Math.random() * 10 + "",
21
21
  updateMask: "",
22
22
  fileInfo: [],
23
23
  overdueStatus: !1
24
24
  });
25
- ee(
26
- () => a.taskSort,
25
+ te(
26
+ () => l.taskSort,
27
27
  (e) => {
28
- e ? de.findList({ inspectType: e }).then((l) => {
29
- V.value = l.data.results, a.actionId = "";
30
- }) : (V.value = [], a.actionId = "");
28
+ e ? de.findList({ inspectType: e }).then((a) => {
29
+ b.value = a.data.results, l.actionId = "";
30
+ }) : (b.value = [], l.actionId = "");
31
31
  },
32
32
  { immediate: !0 }
33
33
  );
34
34
  const U = (e) => {
35
- e && a.endDate && new Date(e) > new Date(a.endDate) && (a.endDate = "", w.warning(i("taskDefine.startDateLaterThanEndDate")));
35
+ e && l.endDate && new Date(e) > new Date(l.endDate) && (l.endDate = "", C.warning(i("taskDefine.startDateLaterThanEndDate")));
36
36
  }, F = (e) => {
37
- e && a.startDate && new Date(e) < new Date(a.startDate) && w.warning(i("taskDefine.endDateEarlierThanStartDate"));
38
- }, E = (e) => a.startDate ? e.getTime() < new Date(a.startDate).getTime() : !1, P = R({
37
+ e && l.startDate && new Date(e) < new Date(l.startDate) && C.warning(i("taskDefine.endDateEarlierThanStartDate"));
38
+ }, E = (e) => l.startDate ? e.getTime() < new Date(l.startDate).getTime() : !1, P = R({
39
39
  taskTitle: [
40
40
  {
41
41
  required: !0,
@@ -85,59 +85,61 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
85
85
  trigger: "change"
86
86
  }
87
87
  ]
88
- }), f = te(Y, "modelValue"), j = M, b = c(!1), I = c();
88
+ }), m = le(Y, "modelValue"), j = M, h = D(!1), I = D();
89
89
  function L() {
90
- b.value = !0, I.value.clearFileList();
90
+ h.value = !0, I.value.clearFileList();
91
91
  }
92
92
  function N(e) {
93
- const l = {
93
+ console.log("file", e);
94
+ const a = {
94
95
  fileName: e.name,
95
- fileId: e.response.fileId
96
+ fileId: e.response.fileId,
97
+ fileSrc: e.response.fileSrc
96
98
  };
97
- a.fileInfo || (a.fileInfo = []), a.fileInfo.push(l);
99
+ l.fileInfo || (l.fileInfo = []), l.fileInfo.push(a);
98
100
  }
99
101
  function B(e) {
100
- var l;
101
- (l = a.fileInfo) == null || l.splice(e, 1);
102
+ var a;
103
+ (a = l.fileInfo) == null || a.splice(e, 1);
102
104
  }
103
105
  const z = async () => {
104
106
  var e;
105
- await ((e = C.value) == null ? void 0 : e.validate((l) => {
106
- l && se.create(a).then((m) => {
107
- console.log(m), m.status === 200 && (w({
107
+ await ((e = w.value) == null ? void 0 : e.validate((a) => {
108
+ a && re.create(l).then((f) => {
109
+ console.log(f), f.status === 200 && (C({
108
110
  message: i("common.submitSuccess"),
109
111
  type: "success"
110
- }), f.value && (f.value = !1), j("refresh", m.status === 200));
112
+ }), m.value && (m.value = !1), j("refresh", f.status === 200));
111
113
  });
112
114
  }));
113
115
  };
114
116
  function q() {
115
- f.value && (f.value = !1);
117
+ m.value && (m.value = !1);
116
118
  }
117
- return (e, l) => {
118
- const m = d("el-input"), r = d("el-form-item"), u = d("el-col"), $ = d("jmash-select"), y = d("el-date-picker"), A = d("jmash-enum-radio"), G = d("el-option"), H = d("el-select"), h = d("el-button"), J = d("CircleClose"), K = d("el-icon"), O = d("el-row"), Q = d("el-form"), W = d("el-dialog"), X = d("jmash-multi-upload");
119
- return p(), k(v, null, [
119
+ return (e, a) => {
120
+ const f = r("el-input"), d = r("el-form-item"), u = r("el-col"), $ = r("jmash-select"), y = r("el-date-picker"), A = r("jmash-enum-radio"), G = r("el-option"), H = r("el-select"), k = r("el-button"), J = r("CircleClose"), K = r("el-icon"), O = r("el-row"), Q = r("el-form"), W = r("el-dialog"), X = r("jmash-multi-upload");
121
+ return p(), g(v, null, [
120
122
  t(W, {
121
- modelValue: f.value,
122
- "onUpdate:modelValue": l[9] || (l[9] = (n) => f.value = n),
123
+ modelValue: m.value,
124
+ "onUpdate:modelValue": a[9] || (a[9] = (n) => m.value = n),
123
125
  "close-on-click-modal": !1,
124
126
  "close-on-press-escape": !1,
125
127
  onClose: q
126
128
  }, {
127
129
  footer: o(() => [
128
- le("div", re, [
129
- t(h, { onClick: q }, {
130
+ oe("div", ue, [
131
+ t(k, { onClick: q }, {
130
132
  default: o(() => [
131
- D(g(e.$t("common.cancel")), 1)
133
+ c(_(e.$t("common.cancel")), 1)
132
134
  ]),
133
135
  _: 1
134
136
  }),
135
- t(h, {
137
+ t(k, {
136
138
  type: "primary",
137
139
  onClick: z
138
140
  }, {
139
141
  default: o(() => [
140
- D(g(e.$t("common.confirm")), 1)
142
+ c(_(e.$t("common.confirm")), 1)
141
143
  ]),
142
144
  _: 1
143
145
  })
@@ -146,8 +148,8 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
146
148
  default: o(() => [
147
149
  t(Q, {
148
150
  ref_key: "taskDefineFormRef",
149
- ref: C,
150
- model: s(a),
151
+ ref: w,
152
+ model: s(l),
151
153
  "label-width": "120px",
152
154
  rules: P
153
155
  }, {
@@ -156,14 +158,14 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
156
158
  default: o(() => [
157
159
  t(u, { span: 12 }, {
158
160
  default: o(() => [
159
- t(r, {
161
+ t(d, {
160
162
  label: e.$t("taskDefine.taskTitle"),
161
163
  prop: "taskTitle"
162
164
  }, {
163
165
  default: o(() => [
164
- t(m, {
165
- modelValue: s(a).taskTitle,
166
- "onUpdate:modelValue": l[0] || (l[0] = (n) => s(a).taskTitle = n),
166
+ t(f, {
167
+ modelValue: s(l).taskTitle,
168
+ "onUpdate:modelValue": a[0] || (a[0] = (n) => s(l).taskTitle = n),
167
169
  placeholder: e.$t("taskDefine.taskTitleRequired"),
168
170
  maxlength: "127",
169
171
  "show-word-limit": "",
@@ -177,15 +179,15 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
177
179
  }),
178
180
  t(u, { span: 12 }, {
179
181
  default: o(() => [
180
- t(r, {
182
+ t(d, {
181
183
  label: e.$t("taskDefine.taskSort"),
182
184
  prop: "taskSort"
183
185
  }, {
184
186
  default: o(() => [
185
187
  t($, {
186
- modelValue: s(a).taskSort,
187
- "onUpdate:modelValue": l[1] || (l[1] = (n) => s(a).taskSort = n),
188
- data: s(_).taskSortTypeEnum.values,
188
+ modelValue: s(l).taskSort,
189
+ "onUpdate:modelValue": a[1] || (a[1] = (n) => s(l).taskSort = n),
190
+ data: s(V).taskSortTypeEnum.values,
189
191
  placeholder: e.$t("taskDefine.taskSort"),
190
192
  class: "w-full",
191
193
  clearable: ""
@@ -198,14 +200,14 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
198
200
  }),
199
201
  t(u, { span: 12 }, {
200
202
  default: o(() => [
201
- t(r, {
203
+ t(d, {
202
204
  label: e.$t("taskDefine.startDate"),
203
205
  prop: "startDate"
204
206
  }, {
205
207
  default: o(() => [
206
208
  t(y, {
207
- modelValue: s(a).startDate,
208
- "onUpdate:modelValue": l[2] || (l[2] = (n) => s(a).startDate = n),
209
+ modelValue: s(l).startDate,
210
+ "onUpdate:modelValue": a[2] || (a[2] = (n) => s(l).startDate = n),
209
211
  type: "date",
210
212
  placeholder: e.$t("taskDefine.startDateRequired"),
211
213
  format: "YYYY-MM-DD",
@@ -221,14 +223,14 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
221
223
  }),
222
224
  t(u, { span: 12 }, {
223
225
  default: o(() => [
224
- t(r, {
226
+ t(d, {
225
227
  label: e.$t("taskDefine.endDate"),
226
228
  prop: "endDate"
227
229
  }, {
228
230
  default: o(() => [
229
231
  t(y, {
230
- modelValue: s(a).endDate,
231
- "onUpdate:modelValue": l[3] || (l[3] = (n) => s(a).endDate = n),
232
+ modelValue: s(l).endDate,
233
+ "onUpdate:modelValue": a[3] || (a[3] = (n) => s(l).endDate = n),
232
234
  type: "date",
233
235
  placeholder: e.$t("taskDefine.endDateRequired"),
234
236
  format: "YYYY-MM-DD",
@@ -245,15 +247,15 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
245
247
  }),
246
248
  t(u, { span: 12 }, {
247
249
  default: o(() => [
248
- t(r, {
250
+ t(d, {
249
251
  label: e.$t("taskDefine.taskPeriod"),
250
252
  prop: "taskPeriod"
251
253
  }, {
252
254
  default: o(() => [
253
255
  t($, {
254
- modelValue: s(a).taskPeriod,
255
- "onUpdate:modelValue": l[4] || (l[4] = (n) => s(a).taskPeriod = n),
256
- data: s(_).taskPeriodEnum.values,
256
+ modelValue: s(l).taskPeriod,
257
+ "onUpdate:modelValue": a[4] || (a[4] = (n) => s(l).taskPeriod = n),
258
+ data: s(V).taskPeriodEnum.values,
257
259
  placeholder: e.$t("taskDefine.taskPeriodRequired"),
258
260
  "show-word-limit": "",
259
261
  clearable: "",
@@ -267,14 +269,14 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
267
269
  }),
268
270
  t(u, { span: 12 }, {
269
271
  default: o(() => [
270
- t(r, {
272
+ t(d, {
271
273
  label: e.$t("taskDefine.taskCount"),
272
274
  prop: "taskCount"
273
275
  }, {
274
276
  default: o(() => [
275
- t(m, {
276
- modelValue: s(a).taskCount,
277
- "onUpdate:modelValue": l[5] || (l[5] = (n) => s(a).taskCount = n),
277
+ t(f, {
278
+ modelValue: s(l).taskCount,
279
+ "onUpdate:modelValue": a[5] || (a[5] = (n) => s(l).taskCount = n),
278
280
  placeholder: e.$t("taskDefine.taskCountRequired"),
279
281
  maxlength: "5",
280
282
  "show-word-limit": "",
@@ -288,15 +290,15 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
288
290
  }),
289
291
  t(u, { span: 12 }, {
290
292
  default: o(() => [
291
- t(r, {
293
+ t(d, {
292
294
  label: e.$t("taskDefine.overdueStatus"),
293
295
  prop: "overdueStatus"
294
296
  }, {
295
297
  default: o(() => [
296
298
  t(A, {
297
- modelValue: s(a).overdueStatus,
298
- "onUpdate:modelValue": l[6] || (l[6] = (n) => s(a).overdueStatus = n),
299
- data: s(_).overdueStatusDict.values
299
+ modelValue: s(l).overdueStatus,
300
+ "onUpdate:modelValue": a[6] || (a[6] = (n) => s(l).overdueStatus = n),
301
+ data: s(V).overdueStatusDict.values
300
302
  }, null, 8, ["modelValue", "data"])
301
303
  ]),
302
304
  _: 1
@@ -306,20 +308,20 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
306
308
  }),
307
309
  t(u, { span: 12 }, {
308
310
  default: o(() => [
309
- t(r, {
311
+ t(d, {
310
312
  label: e.$t("taskDefine.actionId"),
311
313
  prop: "actionId"
312
314
  }, {
313
315
  default: o(() => [
314
316
  t(H, {
315
- modelValue: s(a).actionId,
316
- "onUpdate:modelValue": l[7] || (l[7] = (n) => s(a).actionId = n),
317
+ modelValue: s(l).actionId,
318
+ "onUpdate:modelValue": a[7] || (a[7] = (n) => s(l).actionId = n),
317
319
  placeholder: e.$t("taskDefine.actionIdRequired"),
318
320
  clearable: "",
319
321
  class: "w-full"
320
322
  }, {
321
323
  default: o(() => [
322
- (p(!0), k(v, null, T(V.value, (n) => (p(), ae(G, {
324
+ (p(!0), g(v, null, T(b.value, (n) => (p(), ae(G, {
323
325
  key: n.inspectId,
324
326
  label: n.inspectName,
325
327
  value: n.inspectId
@@ -335,14 +337,14 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
335
337
  }),
336
338
  t(u, { span: 24 }, {
337
339
  default: o(() => [
338
- t(r, {
340
+ t(d, {
339
341
  label: e.$t("taskDefine.note"),
340
342
  prop: "note"
341
343
  }, {
342
344
  default: o(() => [
343
- t(m, {
344
- modelValue: s(a).note,
345
- "onUpdate:modelValue": l[8] || (l[8] = (n) => s(a).note = n),
345
+ t(f, {
346
+ modelValue: s(l).note,
347
+ "onUpdate:modelValue": a[8] || (a[8] = (n) => s(l).note = n),
346
348
  placeholder: e.$t("taskDefine.noteRequired"),
347
349
  "show-word-limit": "",
348
350
  clearable: "",
@@ -356,40 +358,51 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
356
358
  }),
357
359
  t(u, { span: 24 }, {
358
360
  default: o(() => [
359
- t(r, {
361
+ t(d, {
360
362
  label: e.$t("taskDefine.files"),
361
363
  prop: "fileInfo"
362
364
  }, {
363
365
  default: o(() => [
364
- t(h, {
366
+ t(k, {
365
367
  type: "primary",
366
- icon: s(ne),
368
+ icon: s(se),
367
369
  onClick: L
368
370
  }, {
369
371
  default: o(() => [
370
- D(g(e.$t("common.uploadFiles")), 1)
372
+ c(_(e.$t("common.uploadFiles")), 1)
371
373
  ]),
372
374
  _: 1
373
375
  }, 8, ["icon"])
374
376
  ]),
375
377
  _: 1
376
378
  }, 8, ["label"]),
377
- t(r, null, {
379
+ t(d, null, {
378
380
  default: o(() => [
379
- (p(!0), k(v, null, T(s(a).fileInfo, (n, S) => (p(), k("div", {
381
+ (p(!0), g(v, null, T(s(l).fileInfo, (n, S) => (p(), g("div", {
380
382
  key: S,
381
383
  class: "files-list"
382
384
  }, [
383
- D(g(n.fileName) + " ", 1),
385
+ c(_(n.fileName) + " ", 1),
384
386
  t(K, {
385
387
  size: "16",
386
388
  class: "icon-right",
387
- onClick: (ie) => B(S)
389
+ onClick: (Z) => B(S)
388
390
  }, {
389
391
  default: o(() => [
390
392
  t(J)
391
393
  ]),
392
394
  _: 1
395
+ }, 8, ["onClick"]),
396
+ t(k, {
397
+ type: "primary",
398
+ link: "",
399
+ size: "small",
400
+ onClick: (Z) => s(ie)(n.fileSrc)
401
+ }, {
402
+ default: o(() => [...a[11] || (a[11] = [
403
+ c(" 查看 ", -1)
404
+ ])]),
405
+ _: 1
393
406
  }, 8, ["onClick"])
394
407
  ]))), 128))
395
408
  ]),
@@ -410,8 +423,8 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
410
423
  t(X, {
411
424
  ref_key: "uploadRef",
412
425
  ref: I,
413
- modelValue: b.value,
414
- "onUpdate:modelValue": l[10] || (l[10] = (n) => b.value = n),
426
+ modelValue: h.value,
427
+ "onUpdate:modelValue": a[10] || (a[10] = (n) => h.value = n),
415
428
  onUploadFileList: N
416
429
  }, null, 8, ["modelValue"])
417
430
  ], 64);
@@ -419,5 +432,5 @@ const re = { class: "dialog-footer" }, ge = /* @__PURE__ */ Z({
419
432
  }
420
433
  });
421
434
  export {
422
- ge as _
435
+ _e as _
423
436
  };
@@ -2,7 +2,7 @@ import { defineComponent as H, mergeModels as F, ref as f, reactive as M, useMod
2
2
  import { ElMessage as W } from "element-plus";
3
3
  import { useI18n as X } from "vue-i18n";
4
4
  import { u as Z } from "./index-DaJ5KrbS.mjs";
5
- import { D as x } from "./index-kbwxFttn.mjs";
5
+ import { D as x } from "./index-BUfsHvCP.mjs";
6
6
  import { t as ee } from "./index-BYV5ylFn.mjs";
7
7
  import "jmash-core";
8
8
  import { _ as le } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
@@ -4,9 +4,9 @@ import { useRoute as te, useRouter as ae } from "vue-router";
4
4
  import { useI18n as le } from "vue-i18n";
5
5
  import { routerUtil as oe } from "jmash-core";
6
6
  import { t as I } from "./index-DrhTfMmI.mjs";
7
- import { D as m } from "./index-kbwxFttn.mjs";
7
+ import { D as m } from "./index-BUfsHvCP.mjs";
8
8
  import { u as ne } from "./index-DaJ5KrbS.mjs";
9
- import { _ as se } from "./index.vue_vue_type_script_setup_true_lang-BRBaBhUl.mjs";
9
+ import { _ as se } from "./index.vue_vue_type_script_setup_true_lang-9dzewzjH.mjs";
10
10
  import { E as q } from "./el-message-CajLrSgM.mjs";
11
11
  const re = { class: "app-container" }, Ve = /* @__PURE__ */ W({
12
12
  __name: "edit",