lyflowchart 1.0.177 → 1.0.181
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.
- package/dist/{ApprovalEditorModal-BQlPQaZG.js → ApprovalEditorModal-BWOHJ_Cg.js} +1 -1
- package/dist/CancelModal-DF7_m2Va.js +183 -0
- package/dist/{Cell_click_approve-CU3QChtr.js → Cell_click_approve-wVEkE0DE.js} +2 -2
- package/dist/{approval-DBP4eU5h.js → approval-ksqh4H9S.js} +1 -1
- package/dist/{core-IDB064AQ.js → core-Ba3X7LpD.js} +1 -1
- package/dist/index.js +3 -3
- package/dist/lyflowchart.css +1 -1
- package/package.json +1 -1
- package/dist/CancelModal-dBy0HE4N.js +0 -143
package/package.json
CHANGED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { b as e, o as t } from "./init-plugin-CpYzRii0.js";
|
|
2
|
-
import { computed as n, createBlock as r, createCommentVNode as i, createVNode as a, defineComponent as o, mergeModels as s, openBlock as c, reactive as l, ref as u, resolveComponent as d, useModel as f, watch as p, withCtx as m } from "vue";
|
|
3
|
-
import { message as h } from "ant-design-vue";
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region src/components/approval/components/CancelModal.vue
|
|
6
|
-
var g = /* @__PURE__ */ e(/* @__PURE__ */ o({
|
|
7
|
-
name: "ApprovalCancelModal",
|
|
8
|
-
__name: "CancelModal",
|
|
9
|
-
props: /* @__PURE__ */ s({
|
|
10
|
-
id: { default: null },
|
|
11
|
-
eventBus: { default: null }
|
|
12
|
-
}, {
|
|
13
|
-
cancelModalShow: {},
|
|
14
|
-
cancelModalShowModifiers: {}
|
|
15
|
-
}),
|
|
16
|
-
emits: /* @__PURE__ */ s(["done"], ["update:cancelModalShow"]),
|
|
17
|
-
setup(e, { emit: o }) {
|
|
18
|
-
let s = e, g = o, _ = f(e, "cancelModalShow"), v = l({ bz: "" }), y = u(null), b = u(!1), x = n(() => Array.isArray(s.id) ? s.id.length : +!!s.id), S = n(() => x.value - w.value.length), C = n(() => x.value ? Math.round(S.value / x.value * 100) : 0), w = u([]), T = u([]), E = u(!1), D = [{
|
|
19
|
-
title: "流水号",
|
|
20
|
-
dataIndex: "number",
|
|
21
|
-
width: 180,
|
|
22
|
-
ellipsis: !0,
|
|
23
|
-
customRender: ({ text: e, record: t }) => e || `#${t.id}`
|
|
24
|
-
}, {
|
|
25
|
-
title: "流程主题",
|
|
26
|
-
dataIndex: "context",
|
|
27
|
-
ellipsis: !0,
|
|
28
|
-
customRender: ({ text: e }) => e || "(无流程主题)"
|
|
29
|
-
}], O = 0;
|
|
30
|
-
p([() => s.id, _], async ([e, n]) => {
|
|
31
|
-
if (!n) return;
|
|
32
|
-
let r = Array.isArray(e) ? [...e] : e ? [e] : [];
|
|
33
|
-
w.value = r;
|
|
34
|
-
let i = ++O;
|
|
35
|
-
T.value = [], E.value = !0;
|
|
36
|
-
try {
|
|
37
|
-
let e = (await t({
|
|
38
|
-
current: 1,
|
|
39
|
-
pageSize: r.length,
|
|
40
|
-
conditions: [[{
|
|
41
|
-
class_name: "int",
|
|
42
|
-
field_name: "id",
|
|
43
|
-
format: "input",
|
|
44
|
-
operator: "in",
|
|
45
|
-
value: r
|
|
46
|
-
}]],
|
|
47
|
-
column_fields: [
|
|
48
|
-
"id",
|
|
49
|
-
"number",
|
|
50
|
-
"context"
|
|
51
|
-
]
|
|
52
|
-
}, "/approve/query_approve_record_list"))?.data || [], n = new Map(e.map((e) => [e.id, e])), a = r.map((e) => n.get(e)).filter(Boolean);
|
|
53
|
-
i === O && (T.value = a, E.value = !1);
|
|
54
|
-
} catch (e) {
|
|
55
|
-
console.error("CancelModal 查询审批记录内容失败", e), i === O && (E.value = !1);
|
|
56
|
-
}
|
|
57
|
-
}, { immediate: !0 });
|
|
58
|
-
let k = async () => {
|
|
59
|
-
if (!w.value.length) {
|
|
60
|
-
h.error("未获取到要作废的审批记录");
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
await y.value.validate(), b.value = !0;
|
|
64
|
-
try {
|
|
65
|
-
for (let e of [...w.value]) await t({
|
|
66
|
-
approve_record_id: e,
|
|
67
|
-
bz: v.bz
|
|
68
|
-
}, "/approve/cancel_agree_approve_record"), w.value.shift();
|
|
69
|
-
} catch {
|
|
70
|
-
return;
|
|
71
|
-
} finally {
|
|
72
|
-
b.value = !1;
|
|
73
|
-
}
|
|
74
|
-
s.eventBus?.emit("reload_table"), g("done"), h.success(x.value > 1 ? `删除成功(共 ${x.value} 条)` : "作废成功"), _.value = !1;
|
|
75
|
-
};
|
|
76
|
-
return (e, t) => {
|
|
77
|
-
let n = d("a-alert"), o = d("a-progress"), s = d("a-spin"), l = d("a-table"), u = d("a-textarea"), f = d("a-form-item"), p = d("a-form"), h = d("a-modal");
|
|
78
|
-
return c(), r(h, {
|
|
79
|
-
open: _.value,
|
|
80
|
-
"onUpdate:open": t[1] ||= (e) => _.value = e,
|
|
81
|
-
title: "删除审批记录",
|
|
82
|
-
"confirm-loading": b.value,
|
|
83
|
-
onOk: k
|
|
84
|
-
}, {
|
|
85
|
-
default: m(() => [
|
|
86
|
-
a(n, {
|
|
87
|
-
type: "warning",
|
|
88
|
-
"show-icon": "",
|
|
89
|
-
message: x.value > 1 ? `请确认是否删除以下 ${x.value} 条审批数据` : "请确认是否删除以下审批数据",
|
|
90
|
-
style: { "margin-bottom": "12px" }
|
|
91
|
-
}, null, 8, ["message"]),
|
|
92
|
-
x.value > 1 && (b.value || S.value > 0) ? (c(), r(o, {
|
|
93
|
-
key: 0,
|
|
94
|
-
percent: C.value,
|
|
95
|
-
format: () => `${S.value}/${x.value}`,
|
|
96
|
-
size: "small",
|
|
97
|
-
style: { "margin-bottom": "12px" }
|
|
98
|
-
}, null, 8, ["percent", "format"])) : i("", !0),
|
|
99
|
-
E.value ? (c(), r(s, {
|
|
100
|
-
key: 1,
|
|
101
|
-
size: "small",
|
|
102
|
-
style: {
|
|
103
|
-
display: "block",
|
|
104
|
-
"margin-bottom": "12px"
|
|
105
|
-
}
|
|
106
|
-
})) : T.value.length ? (c(), r(l, {
|
|
107
|
-
key: 2,
|
|
108
|
-
class: "record-table",
|
|
109
|
-
"row-key": "id",
|
|
110
|
-
size: "small",
|
|
111
|
-
columns: D,
|
|
112
|
-
"data-source": T.value,
|
|
113
|
-
pagination: !1,
|
|
114
|
-
scroll: { y: 180 },
|
|
115
|
-
style: { "margin-bottom": "12px" }
|
|
116
|
-
}, null, 8, ["data-source"])) : i("", !0),
|
|
117
|
-
a(p, {
|
|
118
|
-
model: v,
|
|
119
|
-
ref_key: "formRef",
|
|
120
|
-
ref: y
|
|
121
|
-
}, {
|
|
122
|
-
default: m(() => [a(f, {
|
|
123
|
-
name: "bz",
|
|
124
|
-
rules: [{ required: !0 }],
|
|
125
|
-
label: "删除原因"
|
|
126
|
-
}, {
|
|
127
|
-
default: m(() => [a(u, {
|
|
128
|
-
placeholder: "请输入删除原因",
|
|
129
|
-
value: v.bz,
|
|
130
|
-
"onUpdate:value": t[0] ||= (e) => v.bz = e
|
|
131
|
-
}, null, 8, ["value"])]),
|
|
132
|
-
_: 1
|
|
133
|
-
})]),
|
|
134
|
-
_: 1
|
|
135
|
-
}, 8, ["model"])
|
|
136
|
-
]),
|
|
137
|
-
_: 1
|
|
138
|
-
}, 8, ["open", "confirm-loading"]);
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
}), [["__scopeId", "data-v-933830f2"]]);
|
|
142
|
-
//#endregion
|
|
143
|
-
export { g as t };
|