lyflowchart 1.0.137 → 1.0.152

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.
Files changed (68) hide show
  1. package/dist/ActionsConfig-BrfcGMc2.js +521 -0
  2. package/dist/{ApprovalEditorModal-19j5zbe2.js → ApprovalEditorModal-HuU6SRJe.js} +1 -1
  3. package/dist/{Cell_click_approve-BGDZUzTS.js → Cell_click_approve-DiMuUB1k.js} +22 -20
  4. package/dist/{MyProcess-FWGEwQcv.js → MyProcess-C6fgOFiw.js} +1 -1
  5. package/dist/{approval-BW2WjPxY.js → approval-1GfOMaS4.js} +3 -3
  6. package/dist/{approval-BaD4Bmw6.js → approval-BlbNEsGQ.js} +1 -1
  7. package/dist/{approvalHistory-B2gpQbFC.js → approvalHistory-D-5rRWNw.js} +1 -1
  8. package/dist/{approvalPageConfig-D0zPXOUf.js → approvalPageConfig-4VU81v-x.js} +13 -13
  9. package/dist/{columnTables-DLwtgcC7.js → columnTables-DFwoawLF.js} +76 -69
  10. package/dist/components/approval/ApprovalEditorModal.vue.d.ts +2 -0
  11. package/dist/components/approval/components/approvalPageConfig/ActionsConfig.vue.d.ts +481 -0
  12. package/dist/components/approval/components/approvalPageConfig/leftColumn.vue.d.ts +1210 -0
  13. package/dist/components/approval/components/approvalPageConfig/middleColumn.vue.d.ts +605 -0
  14. package/dist/components/approval/components/approvalPageConfig/tableConfig.vue.d.ts +605 -0
  15. package/dist/components/approval/core.vue.d.ts +2 -0
  16. package/dist/components/approval/typing.d.ts +1 -1
  17. package/dist/components/approval/useApprovalRecordActions.d.ts +3 -1
  18. package/dist/constants.d.ts +26 -0
  19. package/dist/{core-Cv0Erg9E.js → core-BkpI8NUK.js} +355 -314
  20. package/dist/{debugCode-Cm9-WiUG.js → debugCode-CQm5weGM.js} +1 -1
  21. package/dist/{default-VdDMlY4e.js → default-kv1XZD9P.js} +28 -21
  22. package/dist/{example_code-C_xF8RRG.js → example_code-DKjqP7KK.js} +6 -0
  23. package/dist/index.js +18 -16
  24. package/dist/{leftColumn-CsPjufue.js → leftColumn-OrLOxcyw.js} +2 -2
  25. package/dist/lyflowchart.css +1 -1
  26. package/dist/{middleColumn-C7M6-eVo.js → middleColumn-DUBZPkDG.js} +2 -2
  27. package/dist/{recordActions-BgFlNsGU.js → recordActions-3vqHADOf.js} +1 -1
  28. package/dist/{tableConfig-uLXue-BS.js → tableConfig-W9yGeZs-.js} +41 -41
  29. package/dist/{tableModal-BcYfVL02.js → tableModal-H0SGP8PM.js} +2 -2
  30. package/dist/{useApprovalRecordActions-BQ6MgV2L.js → useApprovalRecordActions-B82xPY8g.js} +63 -63
  31. package/dist/{utils-CLet2gLV.js → utils-B1lkML14.js} +5 -1
  32. package/dist/{viewer-Dv3kQsMf.js → viewer-C_OHXXRU.js} +915 -916
  33. package/package.json +1 -1
  34. package/dist/ActionsConfig-BuvSvRbv.js +0 -395
  35. package/dist/ActionsConfig-BuvSvRbv.js.map +0 -1
  36. package/dist/ApprovalEditorModal-19j5zbe2.js.map +0 -1
  37. package/dist/CancelModal-BUi3ieI8.js.map +0 -1
  38. package/dist/Cell_click_approve-BGDZUzTS.js.map +0 -1
  39. package/dist/JsonTags-BbWLqghI.js.map +0 -1
  40. package/dist/MyProcess-FWGEwQcv.js.map +0 -1
  41. package/dist/approval-BW2WjPxY.js.map +0 -1
  42. package/dist/approval-BaD4Bmw6.js.map +0 -1
  43. package/dist/approvalHistory-B2gpQbFC.js.map +0 -1
  44. package/dist/approvalHistoryViewModal-DgLpv2ot.js.map +0 -1
  45. package/dist/approvalPageConfig-D0zPXOUf.js.map +0 -1
  46. package/dist/approveLeftConfig-BOU_UgHp.js.map +0 -1
  47. package/dist/codeHistoryViewModal-BfSjIbEU.js.map +0 -1
  48. package/dist/columnTables-DLwtgcC7.js.map +0 -1
  49. package/dist/core-Cv0Erg9E.js.map +0 -1
  50. package/dist/dataStoreSettingHistoryViewModal-D_so-KLp.js.map +0 -1
  51. package/dist/debugCode-Cm9-WiUG.js.map +0 -1
  52. package/dist/debugCode-dD1YnQSD.js.map +0 -1
  53. package/dist/default-VdDMlY4e.js.map +0 -1
  54. package/dist/example_code-C_xF8RRG.js.map +0 -1
  55. package/dist/flowHistoryViewModal-D8DJP7Te.js.map +0 -1
  56. package/dist/index.js.map +0 -1
  57. package/dist/init-plugin-fQTSQzui.js.map +0 -1
  58. package/dist/leftColumn-CsPjufue.js.map +0 -1
  59. package/dist/middleColumn-C7M6-eVo.js.map +0 -1
  60. package/dist/recordActions-BgFlNsGU.js.map +0 -1
  61. package/dist/settingsState-CI81PG-i.js.map +0 -1
  62. package/dist/tableConfig-uLXue-BS.js.map +0 -1
  63. package/dist/tableModal-BcYfVL02.js.map +0 -1
  64. package/dist/useApprovalRecordActions-BQ6MgV2L.js.map +0 -1
  65. package/dist/utils-CLet2gLV.js.map +0 -1
  66. package/dist/v0001-OaBeBCXI.js.map +0 -1
  67. package/dist/viewer-Dv3kQsMf.js.map +0 -1
  68. package/dist/vue-print-next-HRweUmNi.js.map +0 -1
@@ -0,0 +1,521 @@
1
+ import { v as e } from "./init-plugin-fQTSQzui.js";
2
+ import { S as t, o as n } from "./utils-B1lkML14.js";
3
+ import { t as r } from "./example_code-DKjqP7KK.js";
4
+ import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, ref as h, renderList as g, resolveComponent as _, shallowRef as v, toDisplayString as y, toRaw as b, withCtx as x, withModifiers as S } from "vue";
5
+ import { CopyOutlined as C, DeleteOutlined as w, DownOutlined as T, HolderOutlined as E, NodeCollapseOutlined as D, NodeExpandOutlined as O, RightOutlined as k } from "@ant-design/icons-vue";
6
+ import { Collapse as A, CollapsePanel as j, Modal as M } from "ant-design-vue";
7
+ import { cloneDeep as N } from "lodash";
8
+ //#region src/components/approval/components/approvalPageConfig/JsonText.vue?vue&type=script&lang.ts
9
+ var P = f({
10
+ name: "JsonTags",
11
+ props: {
12
+ value: {
13
+ type: Object,
14
+ required: !0
15
+ },
16
+ placeholder: {
17
+ type: String,
18
+ required: !1
19
+ },
20
+ rows: {
21
+ type: Number,
22
+ default: 3
23
+ }
24
+ },
25
+ emits: ["update:value"],
26
+ setup(e, { emit: t }) {
27
+ return {
28
+ _value: a(() => typeof e.value == "string" ? e.value : JSON.stringify(e.value)),
29
+ handleChange: (e) => {
30
+ let n = null;
31
+ try {
32
+ n = JSON.parse(e);
33
+ } catch {
34
+ n = e;
35
+ }
36
+ t("update:value", n);
37
+ },
38
+ valueType: a(() => typeof e.value)
39
+ };
40
+ }
41
+ });
42
+ //#endregion
43
+ //#region src/components/approval/components/approvalPageConfig/JsonText.vue
44
+ function F(e, t, n, r, a, o) {
45
+ let s = _("a-textarea"), l = _("a-tag");
46
+ return m(), c(i, null, [d(s, {
47
+ value: e._value,
48
+ placeholder: e.placeholder,
49
+ rows: e.rows,
50
+ "onUpdate:value": e.handleChange
51
+ }, null, 8, [
52
+ "value",
53
+ "placeholder",
54
+ "rows",
55
+ "onUpdate:value"
56
+ ]), d(l, null, {
57
+ default: x(() => [u(y(e.valueType), 1)]),
58
+ _: 1
59
+ })], 64);
60
+ }
61
+ var I = /* @__PURE__ */ e(P, [["render", F], ["__scopeId", "data-v-43e40d82"]]), L = "click", R = f({
62
+ name: "CodeEditorWraper",
63
+ components: {},
64
+ props: {
65
+ value: {
66
+ type: String,
67
+ default: ""
68
+ },
69
+ editType: {
70
+ type: String,
71
+ default: ""
72
+ },
73
+ action: {
74
+ type: String,
75
+ default: ""
76
+ }
77
+ },
78
+ emits: ["update:value"],
79
+ setup(e, { emit: t }) {
80
+ let n = h(!1), i = h("");
81
+ return {
82
+ update: (e) => {
83
+ t("update:value", e);
84
+ },
85
+ isCodeVisible: n,
86
+ exampleCode: i,
87
+ filterExampleCodeList: a(() => r.filter((t) => e.editType === L ? t.types.includes(L) && t.actions.includes(e.action || null) : t.types.includes(e.editType))),
88
+ handleAppendCode: () => {
89
+ i.value && t("update:value", `${e.value || ""}\n${i.value}`);
90
+ },
91
+ handleReplaceCode: () => {
92
+ i.value && (e.value ? M.confirm({
93
+ title: "提示",
94
+ content: "是否确认要替换现有代码",
95
+ onOk() {
96
+ t("update:value", i.value);
97
+ },
98
+ onCancel() {}
99
+ }) : t("update:value", i.value));
100
+ }
101
+ };
102
+ }
103
+ }), z = { key: 0 };
104
+ function B(e, t, n, r, a, f) {
105
+ let p = _("a-button"), h = _("a-tooltip"), v = _("a-select-option"), b = _("a-select"), S = _("a-col"), C = _("a-button-group"), w = _("a-row"), T = _("a-form-item"), E = _("a-form"), D = _("code-editor");
106
+ return m(), c("div", null, [l("div", null, [d(p, {
107
+ type: "link",
108
+ onClick: t[0] ||= (t) => e.isCodeVisible = !e.isCodeVisible
109
+ }, {
110
+ default: x(() => [u(y(e.isCodeVisible ? "隐藏代码" : "显示代码"), 1)]),
111
+ _: 1
112
+ })]), e.isCodeVisible ? (m(), c("div", z, [d(E, null, {
113
+ default: x(() => [d(T, { label: "示例代码" }, {
114
+ default: x(() => [d(w, { gutter: 10 }, {
115
+ default: x(() => [d(S, { span: 20 }, {
116
+ default: x(() => [d(b, {
117
+ value: e.exampleCode,
118
+ "onUpdate:value": t[1] ||= (t) => e.exampleCode = t,
119
+ "show-search": ""
120
+ }, {
121
+ default: x(() => [(m(!0), c(i, null, g(e.filterExampleCodeList, (e) => (m(), o(v, {
122
+ value: e.value,
123
+ key: e.value
124
+ }, {
125
+ default: x(() => [d(h, {
126
+ overlayClassName: "debug-code-code-view",
127
+ color: "blue"
128
+ }, {
129
+ title: x(() => [l("pre", null, y(e.value), 1)]),
130
+ default: x(() => [u(" " + y(e.label), 1)]),
131
+ _: 2
132
+ }, 1024)]),
133
+ _: 2
134
+ }, 1032, ["value"]))), 128))]),
135
+ _: 1
136
+ }, 8, ["value"])]),
137
+ _: 1
138
+ }), d(S, { span: 4 }, {
139
+ default: x(() => [d(C, null, {
140
+ default: x(() => [d(p, {
141
+ type: "primary",
142
+ onClick: e.handleAppendCode
143
+ }, {
144
+ default: x(() => [...t[2] ||= [u(" 附加 ", -1)]]),
145
+ _: 1
146
+ }, 8, ["onClick"]), d(p, {
147
+ type: "primary",
148
+ onClick: e.handleReplaceCode
149
+ }, {
150
+ default: x(() => [...t[3] ||= [u(" 替换 ", -1)]]),
151
+ _: 1
152
+ }, 8, ["onClick"])]),
153
+ _: 1
154
+ })]),
155
+ _: 1
156
+ })]),
157
+ _: 1
158
+ })]),
159
+ _: 1
160
+ })]),
161
+ _: 1
162
+ }), d(D, {
163
+ editorValue: e.value,
164
+ "onUpdate:editorValue": e.update,
165
+ mode: "javascript",
166
+ lineWrapping: !0
167
+ }, null, 8, ["editorValue", "onUpdate:editorValue"])])) : s("", !0)]);
168
+ }
169
+ var V = /* @__PURE__ */ e(R, [["render", B]]), H = "async function run(params) {\n console.log(JSON.stringify(params));\n // try {\n // const res = await self.callHost('getApiData')({}, '/test/');\n // } catch (e) {\n // console.error('call error', JSON.stringify(e));\n // }\n return { name: 'test' };\n}\n", U = new Map(n.map((e) => [e.value, e.label])), W = f({
170
+ name: "ActionsConfig",
171
+ components: {
172
+ JsonText: I,
173
+ CodeEditorWraper: V,
174
+ CopyOutlined: C,
175
+ DeleteOutlined: w,
176
+ DownOutlined: T,
177
+ HolderOutlined: E,
178
+ NodeCollapseOutlined: D,
179
+ NodeExpandOutlined: O,
180
+ RightOutlined: k,
181
+ ACollapse: A,
182
+ ACollapsePanel: j
183
+ },
184
+ props: { dataSource: {
185
+ type: Object,
186
+ required: !0
187
+ } },
188
+ emits: ["update:dataSource"],
189
+ setup(e, { emit: r }) {
190
+ let i = v(/* @__PURE__ */ new Map()), o = (e) => i.value.get(b(e)) === !0, s = (e) => !o(e), c = (e) => {
191
+ let t = new Map(i.value);
192
+ t.set(b(e), !o(e)), i.value = t;
193
+ }, l = ["p"], u = [], d = {}, f = a(() => e.dataSource.every((e) => s(e))), p = () => {
194
+ let t = f.value, n = /* @__PURE__ */ new Map();
195
+ for (let r of e.dataSource) n.set(b(r), t);
196
+ i.value = n;
197
+ }, m = h(-1), g = h(-1), _ = () => {
198
+ m.value = -1, g.value = -1;
199
+ }, y = (e, t) => {
200
+ m.value = e, g.value = -1;
201
+ let n = t.dataTransfer;
202
+ if (!n) return;
203
+ n.effectAllowed = "move", n.setData("text/plain", String(e));
204
+ let r = t.currentTarget?.closest(".button-config-item")?.querySelector(".ant-collapse-header");
205
+ r && n.setDragImage(r, 12, 12);
206
+ }, x = (e, t) => {
207
+ m.value !== -1 && (t.preventDefault(), g.value = e);
208
+ }, S = (t) => {
209
+ let n = m.value;
210
+ if (_(), n === -1 || n === t) return;
211
+ let [r] = e.dataSource.splice(n, 1);
212
+ r && e.dataSource.splice(t, 0, r);
213
+ }, C = () => {
214
+ let t = e.dataSource || [], n = 0;
215
+ for (let e of t) {
216
+ let t = /^按钮(\d+)$/.exec(e.label || "");
217
+ t && (n = Math.max(n, Number(t[1])));
218
+ }
219
+ r("update:dataSource", [...t, {
220
+ label: `按钮${n + 1}`,
221
+ type: "primary",
222
+ action: "process",
223
+ danger: !1,
224
+ settings: {},
225
+ code: H
226
+ }]);
227
+ }, w = (e, t) => {
228
+ e.showCode = {
229
+ ...e.showCode || { code: "async function run({ context, settings }) {\n console.log('context', JSON.stringify(context));\n console.log('settings', JSON.stringify(settings));\n const { tables, formModel } = context;\n // const table = tables['approve-approve_record'];\n // const { searchConditions, selectedRowKeys, selectedRecord, datasource } = table;\n\n // try {\n // const res = await self.callHost('getApiData')({}, '/test/');\n // } catch (e) {\n // console.error('call error', JSON.stringify(e));\n // }\n return true;\n}\n" },
230
+ enable: t
231
+ };
232
+ }, T = (e, t) => {
233
+ e.disableCode = {
234
+ ...e.showCode || { code: "async function run({ context, settings }) {\n console.log('context', JSON.stringify(context));\n console.log('settings', JSON.stringify(settings));\n const { tables, formModel } = context;\n // const table = tables['approve-approve_record'];\n // const { searchConditions, selectedRowKeys, selectedRecord, datasource } = table;\n\n // try {\n // const res = await self.callHost('getApiData')({}, '/test/');\n // } catch (e) {\n // console.error('call error', JSON.stringify(e));\n // }\n return true;\n}\n" },
235
+ enable: t
236
+ };
237
+ }, E = (n) => {
238
+ let r = e.dataSource[n];
239
+ if (!r) return;
240
+ let i = N(r);
241
+ t([i]), e.dataSource.splice(n + 1, 0, i);
242
+ }, D = (t) => {
243
+ e.dataSource.splice(t, 1);
244
+ }, O = [
245
+ "primary",
246
+ "default",
247
+ "dashed",
248
+ "link",
249
+ "text"
250
+ ], k = (e) => e ? U.get(e) || e : "";
251
+ return {
252
+ addButton: C,
253
+ copyButton: E,
254
+ removeButton: D,
255
+ typeList: O,
256
+ actionTypes: n,
257
+ actionLabel: k,
258
+ actionShortLabel: (e) => k(e),
259
+ showCodeEnableChange: w,
260
+ disableCodeEnableChange: T,
261
+ isCollapsed: s,
262
+ toggleCollapse: c,
263
+ allCollapsed: f,
264
+ toggleAll: p,
265
+ PANEL_ACTIVE_KEYS: l,
266
+ PANEL_NO_ACTIVE_KEYS: u,
267
+ NO_OPEN_ANIMATION: d,
268
+ dragIndex: m,
269
+ dragOverIndex: g,
270
+ handleDragStart: y,
271
+ handleDragOver: x,
272
+ handleDrop: S,
273
+ handleDragEnd: _
274
+ };
275
+ }
276
+ }), G = { class: "list-toolbar" }, K = ["onDragover", "onDrop"], q = { class: "item-header" }, J = ["onDragstart"], Y = ["onClick"], X = { class: "item-index" }, Z = { class: "item-actions" }, Q = { class: "config-body" };
277
+ function $(e, t, n, r, a, f) {
278
+ let h = _("node-expand-outlined"), v = _("node-collapse-outlined"), b = _("a-button"), C = _("holder-outlined"), w = _("down-outlined"), T = _("right-outlined"), E = _("a-tag"), D = _("copy-outlined"), O = _("delete-outlined"), k = _("a-input"), A = _("a-col"), j = _("a-switch"), M = _("a-select-option"), N = _("a-select"), P = _("a-row"), F = _("json-text"), I = _("code-editor-wraper"), L = _("a-collapse-panel"), R = _("a-collapse");
279
+ return m(), c("div", null, [
280
+ l("div", G, [d(b, {
281
+ type: "text",
282
+ size: "small",
283
+ class: "toggle-all-btn",
284
+ title: e.allCollapsed ? "全部展开" : "全部收起",
285
+ onClick: e.toggleAll
286
+ }, {
287
+ default: x(() => [e.allCollapsed ? (m(), o(h, { key: 0 })) : (m(), o(v, { key: 1 }))]),
288
+ _: 1
289
+ }, 8, ["title", "onClick"])]),
290
+ (m(!0), c(i, null, g(e.dataSource, (n, r) => (m(), c("div", {
291
+ key: r,
292
+ class: p(["button-config-item", {
293
+ "is-dragging": e.dragIndex === r,
294
+ "drag-over-above": e.dragOverIndex === r && e.dragIndex > r,
295
+ "drag-over-below": e.dragOverIndex === r && e.dragIndex < r
296
+ }]),
297
+ onDragover: (t) => e.handleDragOver(r, t),
298
+ onDrop: S((t) => e.handleDrop(r), ["prevent"]),
299
+ onDragend: t[1] ||= (...t) => e.handleDragEnd && e.handleDragEnd(...t)
300
+ }, [d(R, {
301
+ "active-key": e.isCollapsed(n) ? e.PANEL_NO_ACTIVE_KEYS : e.PANEL_ACTIVE_KEYS,
302
+ "destroy-inactive-panel": !0,
303
+ "open-animation": e.NO_OPEN_ANIMATION,
304
+ onChange: (t) => e.toggleCollapse(n)
305
+ }, {
306
+ default: x(() => [d(L, {
307
+ key: "p",
308
+ "show-arrow": !1
309
+ }, {
310
+ header: x(() => [l("span", q, [
311
+ l("span", {
312
+ class: "drag-handle",
313
+ draggable: "true",
314
+ title: "按住拖拽排序",
315
+ onDragstart: (t) => e.handleDragStart(r, t),
316
+ onClick: t[0] ||= S(() => {}, ["stop"])
317
+ }, [d(C)], 40, J),
318
+ l("span", {
319
+ class: "item-toggle",
320
+ onClick: S((t) => e.toggleCollapse(n), ["stop"])
321
+ }, [
322
+ e.isCollapsed(n) ? (m(), o(T, { key: 1 })) : (m(), o(w, { key: 0 })),
323
+ l("span", X, "(" + y(r + 1) + ")", 1),
324
+ l("span", { class: p(["item-title", { "is-empty": !n.label }]) }, y(n.label || "未命名按钮"), 3),
325
+ e.actionShortLabel(n.action) ? (m(), o(E, {
326
+ key: 2,
327
+ color: "green",
328
+ title: e.actionLabel(n.action)
329
+ }, {
330
+ default: x(() => [u(y(e.actionShortLabel(n.action)), 1)]),
331
+ _: 2
332
+ }, 1032, ["title"])) : s("", !0)
333
+ ], 8, Y),
334
+ l("span", Z, [d(D, {
335
+ class: "copy-icon",
336
+ title: "复制",
337
+ onClick: S((t) => e.copyButton(r), ["stop"])
338
+ }, null, 8, ["onClick"]), d(O, {
339
+ class: "delete-icon",
340
+ title: "删除",
341
+ onClick: S((t) => e.removeButton(r), ["stop"])
342
+ }, null, 8, ["onClick"])])
343
+ ])]),
344
+ default: x(() => [l("div", Q, [
345
+ d(P, {
346
+ gutter: 16,
347
+ align: "top"
348
+ }, {
349
+ default: x(() => [
350
+ d(A, { span: 5 }, {
351
+ default: x(() => [t[2] ||= l("label", null, "名称", -1), d(k, {
352
+ value: n.label,
353
+ "onUpdate:value": (e) => n.label = e
354
+ }, null, 8, ["value", "onUpdate:value"])]),
355
+ _: 2
356
+ }, 1024),
357
+ d(A, { span: 3 }, {
358
+ default: x(() => [t[3] ||= l("label", null, "下拉菜单", -1), l("div", null, [d(j, {
359
+ checked: n.is_dropdown,
360
+ "onUpdate:checked": (e) => n.is_dropdown = e
361
+ }, null, 8, ["checked", "onUpdate:checked"])])]),
362
+ _: 2
363
+ }, 1024),
364
+ n.is_dropdown ? (m(), o(A, {
365
+ key: 1,
366
+ span: 5
367
+ }, {
368
+ default: x(() => [t[6] ||= l("label", null, "组名", -1), d(k, {
369
+ value: n.group_name,
370
+ "onUpdate:value": (e) => n.group_name = e
371
+ }, null, 8, ["value", "onUpdate:value"])]),
372
+ _: 2
373
+ }, 1024)) : (m(), c(i, { key: 0 }, [d(A, { span: 3 }, {
374
+ default: x(() => [t[4] ||= l("label", null, "危险按钮", -1), l("div", null, [d(j, {
375
+ checked: n.danger,
376
+ "onUpdate:checked": (e) => n.danger = e
377
+ }, null, 8, ["checked", "onUpdate:checked"])])]),
378
+ _: 2
379
+ }, 1024), d(A, { span: 5 }, {
380
+ default: x(() => [t[5] ||= l("label", null, "显示类型", -1), d(N, {
381
+ value: n.type,
382
+ "onUpdate:value": (e) => n.type = e,
383
+ class: "w-full"
384
+ }, {
385
+ default: x(() => [(m(!0), c(i, null, g(e.typeList, (e, t) => (m(), o(M, {
386
+ value: e,
387
+ key: t
388
+ }, {
389
+ default: x(() => [d(b, {
390
+ size: "small",
391
+ type: e,
392
+ danger: n.danger
393
+ }, {
394
+ default: x(() => [u(y(e), 1)]),
395
+ _: 2
396
+ }, 1032, ["type", "danger"])]),
397
+ _: 2
398
+ }, 1032, ["value"]))), 128))]),
399
+ _: 2
400
+ }, 1032, ["value", "onUpdate:value"])]),
401
+ _: 2
402
+ }, 1024)], 64))
403
+ ]),
404
+ _: 2
405
+ }, 1024),
406
+ d(P, { gutter: 16 }, {
407
+ default: x(() => [d(A, { span: 24 }, {
408
+ default: x(() => [t[7] ||= l("label", null, "操作类型", -1), d(N, {
409
+ value: n.action,
410
+ "onUpdate:value": (e) => n.action = e,
411
+ class: "w-full",
412
+ options: e.actionTypes
413
+ }, null, 8, [
414
+ "value",
415
+ "onUpdate:value",
416
+ "options"
417
+ ])]),
418
+ _: 2
419
+ }, 1024)]),
420
+ _: 2
421
+ }, 1024),
422
+ d(P, {
423
+ gutter: 16,
424
+ class: "mt-4"
425
+ }, {
426
+ default: x(() => [d(A, { span: 24 }, {
427
+ default: x(() => [t[8] ||= l("label", null, "配置", -1), d(F, {
428
+ value: n.settings,
429
+ "onUpdate:value": (e) => n.settings = e,
430
+ rows: 3
431
+ }, null, 8, ["value", "onUpdate:value"])]),
432
+ _: 2
433
+ }, 1024)]),
434
+ _: 2
435
+ }, 1024),
436
+ d(P, {
437
+ gutter: 16,
438
+ class: "mt-4"
439
+ }, {
440
+ default: x(() => [d(A, { span: 24 }, {
441
+ default: x(() => [t[9] ||= l("label", null, "点击事件代码", -1), d(I, {
442
+ value: n.code,
443
+ "onUpdate:value": (e) => n.code = e,
444
+ "edit-type": "click",
445
+ action: n.action
446
+ }, null, 8, [
447
+ "value",
448
+ "onUpdate:value",
449
+ "action"
450
+ ])]),
451
+ _: 2
452
+ }, 1024)]),
453
+ _: 2
454
+ }, 1024),
455
+ d(P, {
456
+ gutter: 16,
457
+ class: "mt-4"
458
+ }, {
459
+ default: x(() => [d(A, { span: 2 }, {
460
+ default: x(() => [t[10] ||= l("label", null, "显示控制", -1), d(j, {
461
+ checked: n.showCode?.enable,
462
+ onChange: (t) => e.showCodeEnableChange(n, t)
463
+ }, null, 8, ["checked", "onChange"])]),
464
+ _: 2
465
+ }, 1024), n.showCode?.enable ? (m(), o(A, {
466
+ key: 0,
467
+ span: 22
468
+ }, {
469
+ default: x(() => [t[11] ||= l("label", null, "显示控制代码", -1), d(I, {
470
+ value: n.showCode.code,
471
+ "onUpdate:value": (e) => n.showCode.code = e,
472
+ "edit-type": "show"
473
+ }, null, 8, ["value", "onUpdate:value"])]),
474
+ _: 2
475
+ }, 1024)) : s("", !0)]),
476
+ _: 2
477
+ }, 1024),
478
+ d(P, {
479
+ gutter: 16,
480
+ class: "mt-4"
481
+ }, {
482
+ default: x(() => [d(A, { span: 2 }, {
483
+ default: x(() => [t[12] ||= l("label", null, "禁用控制", -1), d(j, {
484
+ checked: n.disableCode?.enable,
485
+ onChange: (t) => e.disableCodeEnableChange(n, t)
486
+ }, null, 8, ["checked", "onChange"])]),
487
+ _: 2
488
+ }, 1024), n.disableCode?.enable ? (m(), o(A, {
489
+ key: 0,
490
+ span: 22
491
+ }, {
492
+ default: x(() => [t[13] ||= l("label", null, "禁用制代码", -1), d(I, {
493
+ value: n.disableCode.code,
494
+ "onUpdate:value": (e) => n.disableCode.code = e,
495
+ "edit-type": "disable"
496
+ }, null, 8, ["value", "onUpdate:value"])]),
497
+ _: 2
498
+ }, 1024)) : s("", !0)]),
499
+ _: 2
500
+ }, 1024)
501
+ ])]),
502
+ _: 2
503
+ }, 1024)]),
504
+ _: 2
505
+ }, 1032, [
506
+ "active-key",
507
+ "open-animation",
508
+ "onChange"
509
+ ])], 42, K))), 128)),
510
+ d(b, {
511
+ type: "link",
512
+ onClick: e.addButton
513
+ }, {
514
+ default: x(() => [...t[14] ||= [u(" 添加按钮 ", -1)]]),
515
+ _: 1
516
+ }, 8, ["onClick"])
517
+ ]);
518
+ }
519
+ var ee = /* @__PURE__ */ e(W, [["render", $], ["__scopeId", "data-v-4419c204"]]);
520
+ //#endregion
521
+ export { I as n, ee as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./core-Cv0Erg9E.js";
1
+ import { t as e } from "./core-BkpI8NUK.js";
2
2
  import { createBlock as t, createCommentVNode as n, defineComponent as r, mergeModels as i, openBlock as a, resolveComponent as o, useModel as s, withCtx as c } from "vue";
3
3
  //#endregion
4
4
  //#region src/components/approval/ApprovalEditorModal.vue
@@ -1,5 +1,5 @@
1
1
  import { _ as e, c as t, o as n } from "./init-plugin-fQTSQzui.js";
2
- import { n as r, r as i } from "./useApprovalRecordActions-BQ6MgV2L.js";
2
+ import { n as r, r as i } from "./useApprovalRecordActions-B82xPY8g.js";
3
3
  import { t as a } from "./CancelModal-BUi3ieI8.js";
4
4
  import { Fragment as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineAsyncComponent as p, defineComponent as m, isRef as h, mergeProps as g, openBlock as _, reactive as v, ref as y, resolveComponent as b, toDisplayString as x, unref as S, withCtx as C } from "vue";
5
5
  import { Modal as w, message as T } from "ant-design-vue";
@@ -22,20 +22,22 @@ var E = { style: {
22
22
  getPrintElement: () => F.value,
23
23
  printTitle: "审批信息",
24
24
  onChange: () => {
25
- I.value?.reload(), q();
25
+ I.value?.reload(), J();
26
26
  }
27
- }), W = p(() => import("./ApprovalEditorModal-19j5zbe2.js")), G = async () => {
27
+ }), W = async (e) => {
28
+ await R(e), (B.value || H.value) && (k.value = !1);
29
+ }, G = p(() => import("./ApprovalEditorModal-HuU6SRJe.js")), K = async () => {
28
30
  k.value = !0;
29
31
  let e = await n({
30
32
  org_id: O?.id,
31
33
  approve_record_id: D.cmpObj.record.id
32
34
  }, "/approve/get_approve_record_info");
33
35
  e?.current_task?.id && (P.value = e.current_task.id);
34
- }, K = () => {
35
- k.value = !1;
36
36
  }, q = () => {
37
+ k.value = !1;
38
+ }, J = () => {
37
39
  D.cmpObj?.eventBus && D.cmpObj.eventBus.emit("reinit"), D.cmpObj?.event_obj && D.cmpObj.event_obj.emit("refresh");
38
- }, J = (e) => {
40
+ }, Y = (e) => {
39
41
  A.value = !0, w.confirm({
40
42
  title: "提示",
41
43
  content: "是否确认要发起审批",
@@ -44,7 +46,7 @@ var E = { style: {
44
46
  org_id: O?.id,
45
47
  approve_record_id: e.id
46
48
  }, "/approve/commit_approve_record").then(() => {
47
- T.success("操作成功"), q();
49
+ T.success("操作成功"), J();
48
50
  }).finally(() => {
49
51
  A.value = !1;
50
52
  });
@@ -53,7 +55,7 @@ var E = { style: {
53
55
  A.value = !1;
54
56
  }
55
57
  });
56
- }, Y = (e) => {
58
+ }, X = (e) => {
57
59
  j.value = !0, w.confirm({
58
60
  title: "提示",
59
61
  content: "是否确认要撤销审批",
@@ -62,7 +64,7 @@ var E = { style: {
62
64
  org_id: O?.id,
63
65
  approve_record_id: e.id
64
66
  }, "/approve/cancel_approve_record").then(() => {
65
- T.success("操作成功"), q();
67
+ T.success("操作成功"), J();
66
68
  }).finally(() => {
67
69
  j.value = !1;
68
70
  });
@@ -71,7 +73,7 @@ var E = { style: {
71
73
  j.value = !1;
72
74
  }
73
75
  });
74
- }, X = (e) => {
76
+ }, Z = (e) => {
75
77
  let r = v({});
76
78
  e == "refuse" ? (r.comment = [{
77
79
  required: !0,
@@ -109,7 +111,7 @@ var E = { style: {
109
111
  comment: t.comment,
110
112
  approval_result: e
111
113
  }, "/lyapprove/claim_and_complete_task").then(() => {
112
- T.success(e == "refuse" ? "审批拒绝" : "审批通过"), q(), r(null);
114
+ T.success(e == "refuse" ? "审批拒绝" : "审批通过"), J(), r(null);
113
115
  }).finally(() => {
114
116
  M.value = !1, N.value = !1;
115
117
  });
@@ -130,7 +132,7 @@ var E = { style: {
130
132
  width: "100%"
131
133
  },
132
134
  type: "link",
133
- onClick: t[0] ||= (e) => G()
135
+ onClick: t[0] ||= (e) => K()
134
136
  }, {
135
137
  default: C(() => [u("span", E, x(m.cmpObj.text), 1)]),
136
138
  _: 1
@@ -141,14 +143,14 @@ var E = { style: {
141
143
  open: k.value,
142
144
  width: 1120,
143
145
  title: "审批信息",
144
- onClose: K
146
+ onClose: q
145
147
  }, {
146
148
  extra: C(() => [
147
149
  m.cmpObj.record.process_status === "init" || m.cmpObj.record.result_status === "reject" ? (_(), s(n, {
148
150
  key: 0,
149
151
  loading: A.value,
150
152
  type: "primary",
151
- onClick: t[1] ||= (e) => J(m.cmpObj.record)
153
+ onClick: t[1] ||= (e) => Y(m.cmpObj.record)
152
154
  }, {
153
155
  default: C(() => [...t[10] ||= [d(" 提交 ", -1)]]),
154
156
  _: 1
@@ -159,7 +161,7 @@ var E = { style: {
159
161
  danger: "",
160
162
  style: { "margin-left": "10px" },
161
163
  type: "primary",
162
- onClick: t[2] ||= (e) => Y(m.cmpObj.record)
164
+ onClick: t[2] ||= (e) => X(m.cmpObj.record)
163
165
  }, {
164
166
  default: C(() => [...t[11] ||= [d(" 撤销 ", -1)]]),
165
167
  _: 1
@@ -169,7 +171,7 @@ var E = { style: {
169
171
  loading: M.value,
170
172
  style: { "margin-left": "10px" },
171
173
  type: "primary",
172
- onClick: t[3] ||= (e) => X("agree")
174
+ onClick: t[3] ||= (e) => Z("agree")
173
175
  }, {
174
176
  default: C(() => [...t[12] ||= [d(" 审批通过 ", -1)]]),
175
177
  _: 1
@@ -180,7 +182,7 @@ var E = { style: {
180
182
  style: { "margin-left": "10px" },
181
183
  danger: "",
182
184
  type: "primary",
183
- onClick: t[4] ||= (e) => X("refuse")
185
+ onClick: t[4] ||= (e) => Z("refuse")
184
186
  }, {
185
187
  default: C(() => [...t[13] ||= [d(" 审批拒绝 ", -1)]]),
186
188
  _: 1
@@ -190,7 +192,7 @@ var E = { style: {
190
192
  loading: S(z),
191
193
  style: { "margin-left": "10px" },
192
194
  type: "primary",
193
- onClick: t[5] ||= (e) => S(R)("edit_approve")
195
+ onClick: t[5] ||= (e) => W("edit_approve")
194
196
  }, {
195
197
  default: C(() => [...t[14] ||= [d(" 修改 ", -1)]]),
196
198
  _: 1
@@ -201,7 +203,7 @@ var E = { style: {
201
203
  danger: "",
202
204
  style: { "margin-left": "10px" },
203
205
  type: "primary",
204
- onClick: t[6] ||= (e) => S(R)("cancel_agree_approve")
206
+ onClick: t[6] ||= (e) => W("cancel_agree_approve")
205
207
  }, {
206
208
  default: C(() => [...t[15] ||= [d(" 删除 ", -1)]]),
207
209
  _: 1
@@ -227,7 +229,7 @@ var E = { style: {
227
229
  }, null, 8, ["record"])], 512)]),
228
230
  _: 1
229
231
  }, 8, ["open"]),
230
- S(B) ? (_(), s(S(W), g({
232
+ S(B) ? (_(), s(S(G), g({
231
233
  key: 0,
232
234
  open: S(B),
233
235
  "onUpdate:open": t[8] ||= (e) => h(B) ? B.value = e : null
@@ -1,4 +1,4 @@
1
- import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Cn as s, Ct as c, D as l, Dn as u, Dt as d, E as f, En as p, Et as m, F as h, Ft as g, G as _, Gt as v, H as y, Ht as b, I as x, It as S, J as C, Jt as w, K as T, Kt as ee, L as te, Lt as E, M as D, Mt as ne, N as re, Nt as O, O as ie, Ot as k, P as ae, Pt as oe, Q as se, Qt as ce, R as le, Rt as ue, S as de, Sn as fe, St as A, T as pe, Tn as me, Tt as he, U as ge, Ut as j, V as _e, Vt as ve, W as ye, Wt as be, X as xe, Xt as Se, Y as Ce, Yt as we, Z as Te, Zt as M, _ as Ee, _n as De, _t as Oe, a as ke, an as Ae, at as N, b as je, bn as Me, bt as Ne, c as Pe, cn as P, ct as F, d as Fe, dn as Ie, dt as I, en as Le, et as Re, f as ze, fn as Be, ft as Ve, g as L, gn as He, gt as Ue, h as We, hn as Ge, ht as Ke, i as qe, in as Je, it as Ye, j as Xe, jt as Ze, k as Qe, kn as $e, kt as R, l as et, ln as tt, lt as nt, m as rt, mn as it, mt as at, n as ot, nn as st, nt as ct, o as lt, on as ut, ot as dt, p as ft, pn as pt, pt as mt, q as z, qt as B, r as ht, rn as gt, rt as _t, s as vt, sn as yt, st as bt, tn as V, tt as H, u as U, un as xt, ut as St, v as Ct, vn as wt, vt as Tt, w as W, wn as Et, wt as Dt, x as Ot, xn as kt, xt as At, y as jt, yn as Mt, yt as Nt, z as Pt, zt as Ft } from "./viewer-Dv3kQsMf.js";
1
+ import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Cn as s, Ct as c, D as l, Dn as u, Dt as d, E as f, En as p, Et as m, F as h, Ft as g, G as _, Gt as v, H as y, Ht as b, I as x, It as S, J as C, Jt as w, K as T, Kt as ee, L as te, Lt as E, M as D, Mt as ne, N as re, Nt as O, O as ie, Ot as k, P as ae, Pt as oe, Q as se, Qt as ce, R as le, Rt as ue, S as de, Sn as fe, St as A, T as pe, Tn as me, Tt as he, U as ge, Ut as j, V as _e, Vt as ve, W as ye, Wt as be, X as xe, Xt as Se, Y as Ce, Yt as we, Z as Te, Zt as M, _ as Ee, _n as De, _t as Oe, a as ke, an as Ae, at as N, b as je, bn as Me, bt as Ne, c as Pe, cn as P, ct as F, d as Fe, dn as Ie, dt as I, en as Le, et as Re, f as ze, fn as Be, ft as Ve, g as L, gn as He, gt as Ue, h as We, hn as Ge, ht as Ke, i as qe, in as Je, it as Ye, j as Xe, jt as Ze, k as Qe, kn as $e, kt as R, l as et, ln as tt, lt as nt, m as rt, mn as it, mt as at, n as ot, nn as st, nt as ct, o as lt, on as ut, ot as dt, p as ft, pn as pt, pt as mt, q as z, qt as B, r as ht, rn as gt, rt as _t, s as vt, sn as yt, st as bt, tn as V, tt as H, u as U, un as xt, ut as St, v as Ct, vn as wt, vt as Tt, w as W, wn as Et, wt as Dt, x as Ot, xn as kt, xt as At, y as jt, yn as Mt, yt as Nt, z as Pt, zt as Ft } from "./viewer-C_OHXXRU.js";
2
2
  import { _ as It, g as Lt, v as Rt } from "./init-plugin-fQTSQzui.js";
3
3
  import { Fragment as zt, computed as Bt, createBlock as G, createCommentVNode as Vt, createElementBlock as K, createElementVNode as Ht, createTextVNode as q, createVNode as J, defineComponent as Ut, inject as Wt, nextTick as Gt, normalizeClass as Kt, normalizeStyle as qt, onMounted as Jt, openBlock as Y, provide as Yt, reactive as Xt, ref as X, renderList as Zt, resolveComponent as Z, toDisplayString as Qt, vShow as $t, watch as en, withCtx as Q, withDirectives as tn, withKeys as nn } from "vue";
4
4
  import { CodeOutlined as rn, PlusOutlined as an, QuestionCircleOutlined as on, RedoOutlined as sn, SearchOutlined as cn, SyncOutlined as ln, TeamOutlined as un, UploadOutlined as dn, UserOutlined as fn } from "@ant-design/icons-vue";