nbb-component-ui 1.2.6 → 1.2.8
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/index.es.js
CHANGED
|
@@ -1,238 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElMessage as
|
|
3
|
-
|
|
4
|
-
const j = (t) => ({
|
|
5
|
-
getApprovalDetail: async (n) => await t.get({
|
|
6
|
-
url: "/system/bpm/process-instance/get-approval-detail",
|
|
7
|
-
params: {
|
|
8
|
-
processInstanceId: n
|
|
9
|
-
}
|
|
10
|
-
})
|
|
11
|
-
}), R = (t) => ({
|
|
12
|
-
getTaskListByProcessInstanceId: async (n) => await t.get({
|
|
13
|
-
url: "/system/bpm/task/list-by-process-instance-id",
|
|
14
|
-
params: {
|
|
15
|
-
processInstanceId: n
|
|
16
|
-
}
|
|
17
|
-
})
|
|
18
|
-
}), S = { class: "scroll-area" }, O = { class: "flow-header flex justify-between" }, $ = { class: "text-18px font-bold" }, G = {
|
|
19
|
-
class: "text-14px font-bold",
|
|
20
|
-
style: { color: "#005aae" }
|
|
21
|
-
}, J = { class: "flex items-center" }, K = { class: "flow-start" }, Q = { key: 0 }, W = { class: "mt-30px block" }, X = ["src"], Y = { style: { "font-weight": "700" } }, Z = {
|
|
22
|
-
key: 0,
|
|
23
|
-
style: { "margin-right": "30px", "font-weight": "normal" }
|
|
24
|
-
}, ee = {
|
|
25
|
-
key: 1,
|
|
26
|
-
style: { "margin-right": "30px", "font-weight": "normal" }
|
|
27
|
-
}, se = {
|
|
28
|
-
key: 0,
|
|
29
|
-
style: { "font-weight": "normal" }
|
|
30
|
-
}, te = {
|
|
31
|
-
key: 1,
|
|
32
|
-
style: { "font-weight": "normal", color: "#8a909c" }
|
|
33
|
-
}, ne = {
|
|
34
|
-
key: 2,
|
|
35
|
-
style: { "font-weight": "normal" }
|
|
36
|
-
}, oe = {
|
|
37
|
-
key: 3,
|
|
38
|
-
style: { "font-weight": "normal", color: "#8a909c" }
|
|
39
|
-
}, ae = {
|
|
40
|
-
key: 4,
|
|
41
|
-
style: { "margin-left": "30px", "font-weight": "normal" }
|
|
42
|
-
}, ce = {
|
|
43
|
-
key: 5,
|
|
44
|
-
style: { "font-weight": "normal", color: "#8a909c" }
|
|
45
|
-
}, re = { key: 2 }, le = /* @__PURE__ */ N({
|
|
46
|
-
name: "BpmProcessInstanceTaskList",
|
|
47
|
-
__name: "CmcFlowList",
|
|
48
|
-
props: {
|
|
49
|
-
processInstance: {},
|
|
50
|
-
tasks: {}
|
|
51
|
-
},
|
|
52
|
-
setup(t) {
|
|
53
|
-
const { t: n } = useI18n(), d = {
|
|
54
|
-
1: "svg-icon:approvalPending",
|
|
55
|
-
// 审批中
|
|
56
|
-
2: "svg-icon:approvalPass",
|
|
57
|
-
// 通过
|
|
58
|
-
3: "svg-icon:approvalRejected",
|
|
59
|
-
// 拒绝
|
|
60
|
-
4: "svg-icon:approvalCanceled"
|
|
61
|
-
// 取消
|
|
62
|
-
}, y = (p) => [0, 1, 6, 7].includes(p.status) ? "primary" : p.status === 2 ? "success" : p.status === 3 ? "danger" : p.status === 4 ? "info" : p.status === 5 ? "warning" : "";
|
|
63
|
-
return (p, M) => {
|
|
64
|
-
var b;
|
|
65
|
-
const x = f("Icon"), h = f("dict-tag"), g = f("el-tag"), F = f("el-card"), P = f("el-timeline-item"), C = f("el-timeline");
|
|
66
|
-
return r(), i("div", S, [
|
|
67
|
-
l("div", O, [
|
|
68
|
-
l("div", $, [
|
|
69
|
-
l("span", null, s(c(n)("processFlow.flow")), 1),
|
|
70
|
-
l("span", null, s(t.processInstance.id), 1)
|
|
71
|
-
]),
|
|
72
|
-
l("div", G, [
|
|
73
|
-
l("span", null, s(t.processInstance.name), 1)
|
|
74
|
-
])
|
|
75
|
-
]),
|
|
76
|
-
l("div", J, [
|
|
77
|
-
l("div", K, [
|
|
78
|
-
l("p", null, s(c(n)("processFlow.startTime")) + s(c(T)(t.processInstance.startTime)), 1),
|
|
79
|
-
l("p", null, s(c(n)("processFlow.endTime")) + s(c(T)(t.processInstance.endTime)), 1),
|
|
80
|
-
t.processInstance.durationInMillis ? (r(), i("p", Q, s(c(n)("processFlow.duration")) + s(c(B)((b = t.processInstance) == null ? void 0 : b.durationInMillis)), 1)) : u("", !0)
|
|
81
|
-
]),
|
|
82
|
-
v(x, {
|
|
83
|
-
size: 100,
|
|
84
|
-
icon: d[t.processInstance.status] || "svg-icon:approvalPending"
|
|
85
|
-
}, null, 8, ["icon"])
|
|
86
|
-
]),
|
|
87
|
-
l("div", W, [
|
|
88
|
-
v(C, null, {
|
|
89
|
-
default: m(() => [
|
|
90
|
-
(r(!0), i(H, null, z(t.tasks, (e, w) => (r(), A(P, {
|
|
91
|
-
key: w,
|
|
92
|
-
type: y(e) || "info"
|
|
93
|
-
}, {
|
|
94
|
-
dot: m(() => {
|
|
95
|
-
var a;
|
|
96
|
-
return [
|
|
97
|
-
l("img", {
|
|
98
|
-
src: ((a = e == null ? void 0 : e.assigneeUser) == null ? void 0 : a.avatar) || "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
|
|
99
|
-
class: "avatar-wrap"
|
|
100
|
-
}, null, 8, X)
|
|
101
|
-
];
|
|
102
|
-
}),
|
|
103
|
-
default: m(() => [
|
|
104
|
-
l("p", Y, [
|
|
105
|
-
I(s(e.name) + " ", 1),
|
|
106
|
-
e.status ? (r(), A(h, {
|
|
107
|
-
key: 0,
|
|
108
|
-
type: "bpm_task_status",
|
|
109
|
-
value: e.status || ""
|
|
110
|
-
}, null, 8, ["value"])) : u("", !0)
|
|
111
|
-
]),
|
|
112
|
-
v(F, { "body-style": { padding: "10px" } }, {
|
|
113
|
-
default: m(() => {
|
|
114
|
-
var a, _, o, D;
|
|
115
|
-
return [
|
|
116
|
-
w === 0 ? (r(), i("label", Z, [
|
|
117
|
-
I(s(((a = e.assigneeUser) == null ? void 0 : a.nickname) || ((_ = e.ownerUser) == null ? void 0 : _.nickname)) + " ", 1),
|
|
118
|
-
v(g, {
|
|
119
|
-
size: "small",
|
|
120
|
-
type: "info",
|
|
121
|
-
style: { "vertical-align": "1px" }
|
|
122
|
-
}, {
|
|
123
|
-
default: m(() => {
|
|
124
|
-
var L, U;
|
|
125
|
-
return [
|
|
126
|
-
I(s((U = (L = t.processInstance) == null ? void 0 : L.startUser) == null ? void 0 : U.deptName), 1)
|
|
127
|
-
];
|
|
128
|
-
}),
|
|
129
|
-
_: 1
|
|
130
|
-
})
|
|
131
|
-
])) : u("", !0),
|
|
132
|
-
e.assigneeUser ? (r(), i("label", ee, [
|
|
133
|
-
I(s(c(n)("processFlow.approver")) + s(((o = e.assigneeUser) == null ? void 0 : o.nickname) || ((D = e.ownerUser) == null ? void 0 : D.nickname)) + " ", 1),
|
|
134
|
-
v(g, {
|
|
135
|
-
size: "small",
|
|
136
|
-
type: "info",
|
|
137
|
-
style: { "vertical-align": "1px" }
|
|
138
|
-
}, {
|
|
139
|
-
default: m(() => [
|
|
140
|
-
I(s(e.assigneeUser.deptName), 1)
|
|
141
|
-
]),
|
|
142
|
-
_: 2
|
|
143
|
-
}, 1024)
|
|
144
|
-
])) : u("", !0),
|
|
145
|
-
l("div", null, [
|
|
146
|
-
e.createTime && !e.endTime ? (r(), i("label", se, s(c(n)("processFlow.createTime")), 1)) : u("", !0),
|
|
147
|
-
e.createTime && !e.endTime ? (r(), i("label", te, s(c(T)(e == null ? void 0 : e.createTime, "MM-DD HH:mm")), 1)) : u("", !0),
|
|
148
|
-
e.endTime ? (r(), i("label", ne, s(c(n)("processFlow.approvalTime")), 1)) : u("", !0),
|
|
149
|
-
e.endTime ? (r(), i("label", oe, s(c(T)(e == null ? void 0 : e.endTime, "MM-DD HH:mm")), 1)) : u("", !0),
|
|
150
|
-
e.durationInMillis ? (r(), i("label", ae, s(c(n)("processFlow.duration")), 1)) : u("", !0),
|
|
151
|
-
e.durationInMillis ? (r(), i("label", ce, s(c(B)(e == null ? void 0 : e.durationInMillis)), 1)) : u("", !0)
|
|
152
|
-
]),
|
|
153
|
-
e.reason ? (r(), i("div", re, s(c(n)("processFlow.approvalSuggestion")) + s(e.reason), 1)) : u("", !0)
|
|
154
|
-
];
|
|
155
|
-
}),
|
|
156
|
-
_: 2
|
|
157
|
-
}, 1024)
|
|
158
|
-
]),
|
|
159
|
-
_: 2
|
|
160
|
-
}, 1032, ["type"]))), 128))
|
|
161
|
-
]),
|
|
162
|
-
_: 1
|
|
163
|
-
})
|
|
164
|
-
])
|
|
165
|
-
]);
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
const q = (t, n) => {
|
|
170
|
-
const d = t.__vccOpts || t;
|
|
171
|
-
for (const [y, p] of n)
|
|
172
|
-
d[y] = p;
|
|
173
|
-
return d;
|
|
174
|
-
}, ie = /* @__PURE__ */ q(le, [["__scopeId", "data-v-85fc6a7b"]]), pe = /* @__PURE__ */ N({
|
|
1
|
+
import { defineComponent as c, resolveComponent as _, openBlock as r, createBlock as l, withCtx as p, createTextVNode as a } from "vue";
|
|
2
|
+
import { ElMessage as m } from "element-plus";
|
|
3
|
+
const u = /* @__PURE__ */ c({
|
|
175
4
|
__name: "CmcProcessFlow",
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
},
|
|
180
|
-
setup(t) {
|
|
181
|
-
const n = useMessage(), d = t, y = k(!1), p = k({}), M = k({}), x = k(""), h = k([]), g = k(""), F = j(d.request), P = R(d.request), C = () => {
|
|
182
|
-
V.success("aaa!");
|
|
183
|
-
}, b = (a) => {
|
|
184
|
-
g.value = a, e(), w();
|
|
185
|
-
}, e = async () => {
|
|
186
|
-
var a, _;
|
|
187
|
-
try {
|
|
188
|
-
y.value = !0;
|
|
189
|
-
const o = await F.getApprovalDetail(g.value);
|
|
190
|
-
if (!o) {
|
|
191
|
-
n.error("查询不到审批详情信息!");
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
if (!o.processDefinition || !o.processInstance) {
|
|
195
|
-
n.error("查询不到流程信息!");
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
p.value = o == null ? void 0 : o.processInstance, x.value = (_ = (a = o == null ? void 0 : o.processInstance) == null ? void 0 : a.formVariables) == null ? void 0 : _.applicationPrefix, M.value = o == null ? void 0 : o.todoTask;
|
|
199
|
-
} finally {
|
|
200
|
-
y.value = !1;
|
|
201
|
-
}
|
|
202
|
-
}, w = async () => {
|
|
203
|
-
h.value = await P.getTaskListByProcessInstanceId(g.value);
|
|
5
|
+
setup(o) {
|
|
6
|
+
const t = () => {
|
|
7
|
+
m.success("aaa!");
|
|
204
8
|
};
|
|
205
|
-
return
|
|
206
|
-
()
|
|
207
|
-
(
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
const o = f("el-button");
|
|
214
|
-
return r(), i(H, null, [
|
|
215
|
-
v(o, { onClick: C }, {
|
|
216
|
-
default: m(() => [..._[0] || (_[0] = [
|
|
217
|
-
I("测试按钮", -1)
|
|
218
|
-
])]),
|
|
219
|
-
_: 1
|
|
220
|
-
}),
|
|
221
|
-
v(ie, {
|
|
222
|
-
"process-instance": p.value,
|
|
223
|
-
tasks: h.value,
|
|
224
|
-
onRefresh: w
|
|
225
|
-
}, null, 8, ["process-instance", "tasks"])
|
|
226
|
-
], 64);
|
|
9
|
+
return (n, e) => {
|
|
10
|
+
const s = _("el-button");
|
|
11
|
+
return r(), l(s, { onClick: t }, {
|
|
12
|
+
default: p(() => [...e[0] || (e[0] = [
|
|
13
|
+
a("测试按钮", -1)
|
|
14
|
+
])]),
|
|
15
|
+
_: 1
|
|
16
|
+
});
|
|
227
17
|
};
|
|
228
18
|
}
|
|
229
19
|
});
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
20
|
+
const i = (o, t) => {
|
|
21
|
+
const n = o.__vccOpts || o;
|
|
22
|
+
for (const [e, s] of t)
|
|
23
|
+
n[e] = s;
|
|
24
|
+
return n;
|
|
25
|
+
}, d = /* @__PURE__ */ i(u, [["__scopeId", "data-v-30bb0e46"]]), b = {
|
|
26
|
+
install(o) {
|
|
27
|
+
o.component("CmcProcessFlow", d);
|
|
233
28
|
}
|
|
234
29
|
};
|
|
235
30
|
export {
|
|
236
|
-
|
|
237
|
-
|
|
31
|
+
d as CmcProcessFlow,
|
|
32
|
+
b as default
|
|
238
33
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.NbbComponentUi={},t.Vue,t.ElementPlus))})(this,function(t,e,r){"use strict";const u=e.defineComponent({__name:"CmcProcessFlow",setup(o){const s=()=>{r.ElMessage.success("aaa!")};return(c,n)=>{const l=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(l,{onClick:s},{default:e.withCtx(()=>[...n[0]||(n[0]=[e.createTextVNode("测试按钮",-1)])]),_:1})}}}),p="",_=((o,s)=>{const c=o.__vccOpts||o;for(const[n,l]of s)c[n]=l;return c})(u,[["__scopeId","data-v-30bb0e46"]]),i={install(o){o.component("CmcProcessFlow",_)}};t.CmcProcessFlow=_,t.default=i,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
processInstanceId: string;
|
|
3
|
-
request: any;
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
2
|
export default _default;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.
|
|
1
|
+
@charset "UTF-8";.process-container[data-v-30bb0e46]{height:100%;box-sizing:border-box}.process-container[data-v-30bb0e46]>.el-card__body{height:100%;padding-bottom:0}.process-container[data-v-30bb0e46]>.el-card__body>div{height:100%;display:flex;flex-direction:column}.approval-actions[data-v-30bb0e46]{margin:20px 0}.approval-actions .action-buttons[data-v-30bb0e46]{display:flex;flex-direction:column;gap:12px}.approval-actions .action-buttons .basic-actions[data-v-30bb0e46]{display:flex;gap:12px}.approval-actions .action-buttons .extended-actions[data-v-30bb0e46]{display:flex;gap:12px;flex-wrap:wrap}.approval-dialogs[data-v-30bb0e46]{display:contents}
|
package/package.json
CHANGED
|
@@ -1,87 +1,90 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-button @click="open">测试按钮</el-button>
|
|
3
3
|
<!-- 审批记录列表 -->
|
|
4
|
-
<ProcessInstanceTaskList
|
|
5
|
-
:process-instance="processInstance"
|
|
6
|
-
:tasks="tasks"
|
|
7
|
-
@refresh="getTaskList"
|
|
8
|
-
|
|
4
|
+
<!-- <ProcessInstanceTaskList-->
|
|
5
|
+
<!-- :process-instance="processInstance"-->
|
|
6
|
+
<!-- :tasks="tasks"-->
|
|
7
|
+
<!-- @refresh="getTaskList"-->
|
|
8
|
+
<!-- />-->
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script setup lang="ts">
|
|
12
12
|
import { ElMessage } from 'element-plus'
|
|
13
|
-
import {ref, watch} from "vue";
|
|
14
|
-
import {createProcessInstanceApi} from "@/api/processInstance";
|
|
15
|
-
import {createTaskApi} from "@/api/task";
|
|
16
|
-
|
|
17
|
-
import ProcessInstanceTaskList from './CmcFlowList.vue'
|
|
18
|
-
|
|
19
|
-
// @ts-expect-error 运行时由宿主应用提供
|
|
20
|
-
const message = useMessage() // 消息弹窗
|
|
21
|
-
|
|
22
|
-
const props = defineProps<{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}>()
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const processInstanceLoading = ref(false)
|
|
29
|
-
const processInstance = ref<any>({})
|
|
30
|
-
const todoTask = ref<any>({})
|
|
31
|
-
const applicationPrefix = ref('')
|
|
32
|
-
const tasks = ref<any[]>([])
|
|
33
|
-
|
|
34
|
-
const id = ref<string>('')
|
|
35
|
-
const processInstanceApi = createProcessInstanceApi(props.request)
|
|
36
|
-
const taskApi = createTaskApi(props.request)
|
|
13
|
+
// import {ref, watch} from "vue";
|
|
14
|
+
// import {createProcessInstanceApi} from "@/api/processInstance";
|
|
15
|
+
// import {createTaskApi} from "@/api/task";
|
|
16
|
+
|
|
17
|
+
// import ProcessInstanceTaskList from './CmcFlowList.vue'
|
|
18
|
+
|
|
19
|
+
// // @ts-expect-error 运行时由宿主应用提供
|
|
20
|
+
// const message = useMessage() // 消息弹窗
|
|
21
|
+
//
|
|
22
|
+
// const props = defineProps<{
|
|
23
|
+
// processInstanceId: string
|
|
24
|
+
// request: any
|
|
25
|
+
// }>()
|
|
26
|
+
//
|
|
27
|
+
//
|
|
28
|
+
// const processInstanceLoading = ref(false)
|
|
29
|
+
// const processInstance = ref<any>({})
|
|
30
|
+
// const todoTask = ref<any>({})
|
|
31
|
+
// const applicationPrefix = ref('')
|
|
32
|
+
// const tasks = ref<any[]>([])
|
|
33
|
+
//
|
|
34
|
+
// const id = ref<string>('')
|
|
35
|
+
// const processInstanceApi = createProcessInstanceApi(props.request)
|
|
36
|
+
// const taskApi = createTaskApi(props.request)
|
|
37
|
+
//
|
|
38
|
+
//
|
|
39
|
+
//
|
|
40
|
+
//
|
|
41
|
+
// const init = (processInstanceId: string) => {
|
|
42
|
+
// id.value = processInstanceId
|
|
43
|
+
// getApprovalDetail()
|
|
44
|
+
// getTaskList()
|
|
45
|
+
// }
|
|
46
|
+
//
|
|
47
|
+
// // 获取审批详情数据
|
|
48
|
+
// const getApprovalDetail = async () => {
|
|
49
|
+
// try {
|
|
50
|
+
// processInstanceLoading.value = true
|
|
51
|
+
// const data = await processInstanceApi.getApprovalDetail(id.value)
|
|
52
|
+
// if (!data) {
|
|
53
|
+
// message.error('查询不到审批详情信息!')
|
|
54
|
+
// return
|
|
55
|
+
// }
|
|
56
|
+
// if (!data.processDefinition || !data.processInstance) {
|
|
57
|
+
// message.error('查询不到流程信息!')
|
|
58
|
+
// return
|
|
59
|
+
// }
|
|
60
|
+
// processInstance.value = data?.processInstance
|
|
61
|
+
// applicationPrefix.value = data?.processInstance?.formVariables?.applicationPrefix
|
|
62
|
+
// todoTask.value = data?.todoTask
|
|
63
|
+
// } finally {
|
|
64
|
+
// processInstanceLoading.value = false
|
|
65
|
+
// }
|
|
66
|
+
// }
|
|
67
|
+
//
|
|
68
|
+
// // 获取任务列表
|
|
69
|
+
// const getTaskList = async () => {
|
|
70
|
+
// tasks.value = await taskApi.getTaskListByProcessInstanceId(id.value)
|
|
71
|
+
// }
|
|
72
|
+
//
|
|
73
|
+
// watch(
|
|
74
|
+
// () => props.processInstanceId,
|
|
75
|
+
// (newValue) => {
|
|
76
|
+
// debugger
|
|
77
|
+
// if (newValue && newValue !== id.value) {
|
|
78
|
+
// init(newValue)
|
|
79
|
+
// }
|
|
80
|
+
// },
|
|
81
|
+
// { immediate: true, deep: true }
|
|
82
|
+
// )
|
|
37
83
|
|
|
38
84
|
|
|
39
85
|
const open = () => {
|
|
40
86
|
ElMessage.success('aaa!')
|
|
41
87
|
}
|
|
42
|
-
|
|
43
|
-
const init = (processInstanceId: string) => {
|
|
44
|
-
id.value = processInstanceId
|
|
45
|
-
getApprovalDetail()
|
|
46
|
-
getTaskList()
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// 获取审批详情数据
|
|
50
|
-
const getApprovalDetail = async () => {
|
|
51
|
-
try {
|
|
52
|
-
processInstanceLoading.value = true
|
|
53
|
-
const data = await processInstanceApi.getApprovalDetail(id.value)
|
|
54
|
-
if (!data) {
|
|
55
|
-
message.error('查询不到审批详情信息!')
|
|
56
|
-
return
|
|
57
|
-
}
|
|
58
|
-
if (!data.processDefinition || !data.processInstance) {
|
|
59
|
-
message.error('查询不到流程信息!')
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
processInstance.value = data?.processInstance
|
|
63
|
-
applicationPrefix.value = data?.processInstance?.formVariables?.applicationPrefix
|
|
64
|
-
todoTask.value = data?.todoTask
|
|
65
|
-
} finally {
|
|
66
|
-
processInstanceLoading.value = false
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// 获取任务列表
|
|
71
|
-
const getTaskList = async () => {
|
|
72
|
-
tasks.value = await taskApi.getTaskListByProcessInstanceId(id.value)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
watch(
|
|
76
|
-
() => props.processInstanceId,
|
|
77
|
-
(newValue) => {
|
|
78
|
-
debugger
|
|
79
|
-
if (newValue && newValue !== id.value) {
|
|
80
|
-
init(newValue)
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
{ immediate: true, deep: true }
|
|
84
|
-
)
|
|
85
88
|
</script>
|
|
86
89
|
|
|
87
90
|
<style scoped lang="scss">
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
processInstance: any;
|
|
3
|
-
tasks: any[];
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
-
export default _default;
|