@jari-ace/element-plus-component 0.4.3 → 0.5.0
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/components/avatar/JaAvatar.vue.d.ts.map +1 -1
- package/dist/components/avatar/JaAvatar.vue.js +4 -2
- package/dist/components/avatar/JaAvatar.vue.js.map +1 -1
- package/dist/components/flowShell/FlowFormShell.vue.d.ts +403 -0
- package/dist/components/flowShell/FlowFormShell.vue.d.ts.map +1 -0
- package/dist/components/flowShell/FlowFormShell.vue.js +671 -0
- package/dist/components/flowShell/FlowFormShell.vue.js.map +1 -0
- package/dist/components/flowShell/index.d.ts +4 -0
- package/dist/components/flowShell/index.d.ts.map +1 -0
- package/dist/components/flowShell/index.js +4 -0
- package/dist/components/flowShell/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/upload/uploader.vue.d.ts.map +1 -1
- package/dist/components/upload/uploader.vue.js +65 -46
- package/dist/components/upload/uploader.vue.js.map +1 -1
- package/dist/components/userPicker/src/JaUserList.vue.d.ts.map +1 -1
- package/dist/components/userPicker/src/JaUserList.vue.js +0 -2
- package/dist/components/userPicker/src/JaUserList.vue.js.map +1 -1
- package/dist/components/userTag/UserInfoTag.vue.d.ts +1 -1
- package/dist/components/userTag/UserInfoTag.vue.d.ts.map +1 -1
- package/dist/components/userTag/UserInfoTag.vue.js +2 -2
- package/dist/components/userTag/UserInfoTag.vue.js.map +1 -1
- package/dist/hooks/useRouteableVisible.d.ts +12 -0
- package/dist/hooks/useRouteableVisible.d.ts.map +1 -0
- package/dist/hooks/useRouteableVisible.js +34 -0
- package/dist/hooks/useRouteableVisible.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.js +10616 -9904
- package/lib/index.umd.cjs +39 -35
- package/package.json +4 -2
- package/packages/components/avatar/JaAvatar.vue +4 -2
- package/packages/components/flowShell/FlowFormShell.vue +628 -0
- package/packages/components/flowShell/index.ts +5 -0
- package/packages/components/index.ts +1 -0
- package/packages/components/upload/uploader.vue +61 -46
- package/packages/components/userPicker/src/JaUserList.vue +0 -1
- package/packages/components/userTag/UserInfoTag.vue +2 -2
- package/packages/hooks/useRouteableVisible.ts +35 -0
- package/packages/index.ts +1 -0
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
import { ref, watch, computed, nextTick } from 'vue';
|
|
2
|
+
import { useTaskQueryApi, useFlowDefinitionApi } from '@jari-ace/app-bolts';
|
|
3
|
+
import { createAxiosWithoutCache, useLoading } from '@jari-ace/app-bolts';
|
|
4
|
+
import { ElMessage, ElTag, ElCard, ElButton, ElTimeline, ElTimelineItem, ElEmpty, ElIcon, ElResult } from 'element-plus';
|
|
5
|
+
import { JaButton } from '../button';
|
|
6
|
+
import { JaUserInfoTag } from '../userTag';
|
|
7
|
+
import { ArrowLeft } from '@element-plus/icons-vue';
|
|
8
|
+
import dayjs from 'dayjs';
|
|
9
|
+
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
10
|
+
import 'dayjs/locale/zh-cn';
|
|
11
|
+
import { ElTooltip } from 'element-plus';
|
|
12
|
+
import { isVisible } from 'element-plus/es/utils/index.mjs';
|
|
13
|
+
export default ((__VLS_props, __VLS_ctx, __VLS_expose, __VLS_setup = (async () => {
|
|
14
|
+
dayjs.extend(relativeTime);
|
|
15
|
+
dayjs.locale('zh-cn');
|
|
16
|
+
const props = withDefaults(defineProps(), {
|
|
17
|
+
appName: undefined,
|
|
18
|
+
flowKey: undefined,
|
|
19
|
+
startNodeKey: undefined,
|
|
20
|
+
taskInstanceId: undefined
|
|
21
|
+
});
|
|
22
|
+
const dialogVisible = defineModel({
|
|
23
|
+
default: false
|
|
24
|
+
});
|
|
25
|
+
const axios = createAxiosWithoutCache();
|
|
26
|
+
const loading = useLoading(axios);
|
|
27
|
+
const localLoading = ref(false);
|
|
28
|
+
const isLoading = computed(() => loading.value || localLoading.value);
|
|
29
|
+
const saving = ref(false);
|
|
30
|
+
const error = ref('');
|
|
31
|
+
const flowFormParam = ref(undefined);
|
|
32
|
+
const taskQueryApi = useTaskQueryApi(axios);
|
|
33
|
+
const flowDefinitionApi = useFlowDefinitionApi(axios);
|
|
34
|
+
const emits = defineEmits();
|
|
35
|
+
const flowStateTagType = computed(() => {
|
|
36
|
+
switch (flowFormParam.value?.flowInstance?.state) {
|
|
37
|
+
case 0:
|
|
38
|
+
return 'warning';
|
|
39
|
+
case 1:
|
|
40
|
+
return 'success';
|
|
41
|
+
case 2:
|
|
42
|
+
return 'danger';
|
|
43
|
+
default:
|
|
44
|
+
return 'info';
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const showForwardButton = computed(() => {
|
|
48
|
+
return flowFormParam.value?.taskInstance || !flowFormParam.value?.flowInstance;
|
|
49
|
+
});
|
|
50
|
+
// 获取排序后的任务列表
|
|
51
|
+
const sortedTasks = computed(() => {
|
|
52
|
+
if (!flowFormParam.value?.flowInstance?.nodes)
|
|
53
|
+
return [];
|
|
54
|
+
let allTasks = [];
|
|
55
|
+
// 收集所有节点的任务
|
|
56
|
+
Object.values(flowFormParam.value.flowInstance.nodes).forEach(node => {
|
|
57
|
+
allTasks = [...allTasks, ...node.tasks];
|
|
58
|
+
});
|
|
59
|
+
// 按办结时间排序,最新的在前面
|
|
60
|
+
return allTasks.sort((a, b) => {
|
|
61
|
+
const timeA = a.finishTime ? new Date(a.finishTime).getTime() : 0;
|
|
62
|
+
const timeB = b.finishTime ? new Date(b.finishTime).getTime() : 0;
|
|
63
|
+
return timeB - timeA;
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
// 格式化日期
|
|
67
|
+
const formatDate = (dateStr) => {
|
|
68
|
+
if (!dateStr)
|
|
69
|
+
return '';
|
|
70
|
+
return dayjs(dateStr).format('YYYY-MM-DD HH:mm:ss');
|
|
71
|
+
};
|
|
72
|
+
// 友好显示时间
|
|
73
|
+
const formatFriendlyTime = (dateStr) => {
|
|
74
|
+
if (!dateStr)
|
|
75
|
+
return '';
|
|
76
|
+
return dayjs(dateStr).fromNow();
|
|
77
|
+
};
|
|
78
|
+
// 获取流程状态文本
|
|
79
|
+
const getFlowStatus = (state) => {
|
|
80
|
+
switch (state) {
|
|
81
|
+
case 0:
|
|
82
|
+
return '进行中';
|
|
83
|
+
case 1:
|
|
84
|
+
return '已完成';
|
|
85
|
+
case 2:
|
|
86
|
+
return '已中止';
|
|
87
|
+
default:
|
|
88
|
+
return '待发起';
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
// 获取任务状态文本
|
|
92
|
+
const getTaskStatus = (state) => {
|
|
93
|
+
switch (state) {
|
|
94
|
+
case 0:
|
|
95
|
+
return '未激活';
|
|
96
|
+
case 1:
|
|
97
|
+
return '未接收';
|
|
98
|
+
case 2:
|
|
99
|
+
return '已接收';
|
|
100
|
+
case 3:
|
|
101
|
+
return '已办结';
|
|
102
|
+
default:
|
|
103
|
+
return '未知状态';
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
// 监听dialogVisible变化
|
|
107
|
+
watch(() => dialogVisible.value, async (newValue) => {
|
|
108
|
+
resetState();
|
|
109
|
+
if (newValue) {
|
|
110
|
+
emits('open');
|
|
111
|
+
// 等待下一个事件循环,确保父组件的open事件处理完成(可能包含异步loadData)
|
|
112
|
+
await nextTick();
|
|
113
|
+
loadFlowFormParam();
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
emits('closed');
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
// 重置状态
|
|
120
|
+
const resetState = () => {
|
|
121
|
+
error.value = '';
|
|
122
|
+
flowFormParam.value = undefined;
|
|
123
|
+
};
|
|
124
|
+
// 加载流程表单参数
|
|
125
|
+
const loadFlowFormParam = async () => {
|
|
126
|
+
resetState();
|
|
127
|
+
// 检查参数
|
|
128
|
+
// 必须提供 taskInstanceId,或者 appName 和 flowKey
|
|
129
|
+
if (!props.taskId && !(props.appName && props.flowKey)) {
|
|
130
|
+
ElMessage.error('参数错误: 必须提供taskInstanceId或appName、flowKey');
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
const formId = props.formData?.flowFormId;
|
|
135
|
+
if (props.taskId) {
|
|
136
|
+
// 优先使用taskInstanceId
|
|
137
|
+
flowFormParam.value = await taskQueryApi.getTaskInstanceById(props.taskId);
|
|
138
|
+
}
|
|
139
|
+
else if (formId) {
|
|
140
|
+
// 使用appName、flowKey、formId
|
|
141
|
+
flowFormParam.value = await taskQueryApi.getTaskByFormIdAndAppAndFlowKey(formId, props.appName, props.flowKey);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
// 新建模式:只有 appName 和 flowKey,没有 formId
|
|
145
|
+
// 获取流程定义
|
|
146
|
+
const flowDefinition = await flowDefinitionApi.getEffectiveDefinition(props.appName, props.flowKey);
|
|
147
|
+
// 构造部分 flowFormParam
|
|
148
|
+
flowFormParam.value = {
|
|
149
|
+
flowDefinition: flowDefinition,
|
|
150
|
+
// 其他字段为空
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
catch (e) {
|
|
155
|
+
ElMessage.error(e.message || '加载流程信息失败');
|
|
156
|
+
error.value = e.message;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
// 底部按钮处理
|
|
160
|
+
const handleSave = async () => {
|
|
161
|
+
saving.value = true;
|
|
162
|
+
try {
|
|
163
|
+
await props.saveAndForward({
|
|
164
|
+
flowArgs: {
|
|
165
|
+
taskId: flowFormParam.value?.taskInstance?.id || '',
|
|
166
|
+
processRequestType: "SAVE_FORM",
|
|
167
|
+
appName: props.appName || '',
|
|
168
|
+
flowKey: props.flowKey || '',
|
|
169
|
+
startNodeKey: props.startNodeKey || '',
|
|
170
|
+
forwardTo: []
|
|
171
|
+
},
|
|
172
|
+
formCommand: props.formData
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
finally {
|
|
176
|
+
saving.value = false;
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
const handleForward = async () => {
|
|
180
|
+
saving.value = true;
|
|
181
|
+
try {
|
|
182
|
+
const p = flowFormParam.value;
|
|
183
|
+
await props.saveAndForward({
|
|
184
|
+
flowArgs: {
|
|
185
|
+
taskId: p?.taskInstance?.id || '',
|
|
186
|
+
processRequestType: p?.taskInstance ? "FORWARD" : "INITIATE",
|
|
187
|
+
appName: props.appName || '',
|
|
188
|
+
flowKey: props.flowKey || '',
|
|
189
|
+
startNodeKey: props.startNodeKey || '',
|
|
190
|
+
forwardTo: []
|
|
191
|
+
},
|
|
192
|
+
formCommand: props.formData
|
|
193
|
+
});
|
|
194
|
+
dialogVisible.value = false;
|
|
195
|
+
}
|
|
196
|
+
finally {
|
|
197
|
+
saving.value = false;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
201
|
+
const __VLS_withDefaultsArg = (function (t) { return t; })({
|
|
202
|
+
appName: undefined,
|
|
203
|
+
flowKey: undefined,
|
|
204
|
+
startNodeKey: undefined,
|
|
205
|
+
taskInstanceId: undefined
|
|
206
|
+
});
|
|
207
|
+
const __VLS_fnComponent = (await import('vue')).defineComponent({
|
|
208
|
+
__typeEmits: {},
|
|
209
|
+
});
|
|
210
|
+
const __VLS_defaults = {
|
|
211
|
+
'modelValue': false,
|
|
212
|
+
};
|
|
213
|
+
const __VLS_modelEmit = defineEmits();
|
|
214
|
+
const __VLS_ctx = {};
|
|
215
|
+
let __VLS_components;
|
|
216
|
+
let __VLS_directives;
|
|
217
|
+
/** @type {__VLS_StyleScopedClasses['back-button-wrapper']} */ ;
|
|
218
|
+
/** @type {__VLS_StyleScopedClasses['info-item']} */ ;
|
|
219
|
+
/** @type {__VLS_StyleScopedClasses['info-item']} */ ;
|
|
220
|
+
/** @type {__VLS_StyleScopedClasses['info-item']} */ ;
|
|
221
|
+
/** @type {__VLS_StyleScopedClasses['side-panel-header']} */ ;
|
|
222
|
+
/** @type {__VLS_StyleScopedClasses['comment-content']} */ ;
|
|
223
|
+
// CSS variable injection
|
|
224
|
+
// CSS variable injection end
|
|
225
|
+
if (__VLS_ctx.dialogVisible) {
|
|
226
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
227
|
+
...{ class: "flow-shell-wrapper" },
|
|
228
|
+
});
|
|
229
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
230
|
+
...{ class: "flow-shell-container" },
|
|
231
|
+
});
|
|
232
|
+
__VLS_asFunctionalDirective(__VLS_directives.vLoading)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.isLoading) }, null, null);
|
|
233
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.header, __VLS_intrinsicElements.header)({
|
|
234
|
+
...{ class: "flow-shell-header" },
|
|
235
|
+
});
|
|
236
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
237
|
+
...{ class: "header-content" },
|
|
238
|
+
});
|
|
239
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
240
|
+
...{ class: "header-top" },
|
|
241
|
+
});
|
|
242
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
243
|
+
...{ onClick: (...[$event]) => {
|
|
244
|
+
if (!(__VLS_ctx.dialogVisible))
|
|
245
|
+
return;
|
|
246
|
+
__VLS_ctx.dialogVisible = false;
|
|
247
|
+
} },
|
|
248
|
+
...{ class: "back-button-wrapper" },
|
|
249
|
+
});
|
|
250
|
+
const __VLS_0 = {}.ElIcon;
|
|
251
|
+
/** @type {[typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, ]} */ ;
|
|
252
|
+
// @ts-ignore
|
|
253
|
+
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
|
|
254
|
+
size: (40),
|
|
255
|
+
}));
|
|
256
|
+
const __VLS_2 = __VLS_1({
|
|
257
|
+
size: (40),
|
|
258
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
259
|
+
__VLS_3.slots.default;
|
|
260
|
+
const __VLS_4 = {}.ArrowLeft;
|
|
261
|
+
/** @type {[typeof __VLS_components.ArrowLeft, ]} */ ;
|
|
262
|
+
// @ts-ignore
|
|
263
|
+
const __VLS_5 = __VLS_asFunctionalComponent(__VLS_4, new __VLS_4({}));
|
|
264
|
+
const __VLS_6 = __VLS_5({}, ...__VLS_functionalComponentArgsRest(__VLS_5));
|
|
265
|
+
var __VLS_3;
|
|
266
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({});
|
|
267
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
268
|
+
...{ class: "title-section" },
|
|
269
|
+
});
|
|
270
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.h2, __VLS_intrinsicElements.h2)({
|
|
271
|
+
...{ class: "flow-title" },
|
|
272
|
+
});
|
|
273
|
+
(__VLS_ctx.flowFormParam?.flowDefinition?.flowModel?.flowCaption || '流程详情');
|
|
274
|
+
const __VLS_8 = {}.ElTag;
|
|
275
|
+
/** @type {[typeof __VLS_components.ElTag, typeof __VLS_components.elTag, typeof __VLS_components.ElTag, typeof __VLS_components.elTag, ]} */ ;
|
|
276
|
+
// @ts-ignore
|
|
277
|
+
const __VLS_9 = __VLS_asFunctionalComponent(__VLS_8, new __VLS_8({
|
|
278
|
+
type: (__VLS_ctx.flowStateTagType),
|
|
279
|
+
}));
|
|
280
|
+
const __VLS_10 = __VLS_9({
|
|
281
|
+
type: (__VLS_ctx.flowStateTagType),
|
|
282
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_9));
|
|
283
|
+
__VLS_11.slots.default;
|
|
284
|
+
(__VLS_ctx.getFlowStatus(__VLS_ctx.flowFormParam?.flowInstance?.state));
|
|
285
|
+
var __VLS_11;
|
|
286
|
+
if (__VLS_ctx.flowFormParam?.flowInstance) {
|
|
287
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
288
|
+
...{ class: "header-bottom" },
|
|
289
|
+
});
|
|
290
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
291
|
+
...{ class: "info-item" },
|
|
292
|
+
});
|
|
293
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
294
|
+
...{ class: "label" },
|
|
295
|
+
});
|
|
296
|
+
const __VLS_12 = {}.JaUserInfoTag;
|
|
297
|
+
/** @type {[typeof __VLS_components.JaUserInfoTag, typeof __VLS_components.jaUserInfoTag, typeof __VLS_components.JaUserInfoTag, typeof __VLS_components.jaUserInfoTag, ]} */ ;
|
|
298
|
+
// @ts-ignore
|
|
299
|
+
const __VLS_13 = __VLS_asFunctionalComponent(__VLS_12, new __VLS_12({
|
|
300
|
+
userId: (__VLS_ctx.flowFormParam?.flowInstance?.initiator),
|
|
301
|
+
showAvatarInTag: true,
|
|
302
|
+
fullName: (__VLS_ctx.flowFormParam?.flowInstance?.initiatorName),
|
|
303
|
+
}));
|
|
304
|
+
const __VLS_14 = __VLS_13({
|
|
305
|
+
userId: (__VLS_ctx.flowFormParam?.flowInstance?.initiator),
|
|
306
|
+
showAvatarInTag: true,
|
|
307
|
+
fullName: (__VLS_ctx.flowFormParam?.flowInstance?.initiatorName),
|
|
308
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_13));
|
|
309
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
310
|
+
...{ class: "info-item" },
|
|
311
|
+
});
|
|
312
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
313
|
+
...{ class: "label" },
|
|
314
|
+
});
|
|
315
|
+
if (__VLS_ctx.flowFormParam?.flowInstance?.createTime) {
|
|
316
|
+
const __VLS_16 = {}.ElTooltip;
|
|
317
|
+
/** @type {[typeof __VLS_components.ElTooltip, typeof __VLS_components.elTooltip, typeof __VLS_components.ElTooltip, typeof __VLS_components.elTooltip, ]} */ ;
|
|
318
|
+
// @ts-ignore
|
|
319
|
+
const __VLS_17 = __VLS_asFunctionalComponent(__VLS_16, new __VLS_16({
|
|
320
|
+
content: (__VLS_ctx.formatDate(__VLS_ctx.flowFormParam?.flowInstance?.createTime)),
|
|
321
|
+
placement: "top",
|
|
322
|
+
}));
|
|
323
|
+
const __VLS_18 = __VLS_17({
|
|
324
|
+
content: (__VLS_ctx.formatDate(__VLS_ctx.flowFormParam?.flowInstance?.createTime)),
|
|
325
|
+
placement: "top",
|
|
326
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_17));
|
|
327
|
+
__VLS_19.slots.default;
|
|
328
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
329
|
+
...{ class: "value" },
|
|
330
|
+
});
|
|
331
|
+
(__VLS_ctx.formatFriendlyTime(__VLS_ctx.flowFormParam?.flowInstance?.createTime));
|
|
332
|
+
var __VLS_19;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
336
|
+
...{ class: "value" },
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
if (__VLS_ctx.flowFormParam?.flowInstance?.workNo) {
|
|
340
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
341
|
+
...{ class: "info-item" },
|
|
342
|
+
});
|
|
343
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
344
|
+
...{ class: "label" },
|
|
345
|
+
});
|
|
346
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
347
|
+
...{ class: "value" },
|
|
348
|
+
});
|
|
349
|
+
(__VLS_ctx.flowFormParam?.flowInstance?.workNo);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.main, __VLS_intrinsicElements.main)({
|
|
353
|
+
...{ class: "flow-shell-main" },
|
|
354
|
+
});
|
|
355
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.section, __VLS_intrinsicElements.section)({
|
|
356
|
+
...{ class: "main-content" },
|
|
357
|
+
});
|
|
358
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
359
|
+
...{ class: "content-wrapper" },
|
|
360
|
+
});
|
|
361
|
+
if (__VLS_ctx.error) {
|
|
362
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
363
|
+
...{ class: "error-tip" },
|
|
364
|
+
});
|
|
365
|
+
const __VLS_20 = {}.ElResult;
|
|
366
|
+
/** @type {[typeof __VLS_components.ElResult, typeof __VLS_components.elResult, typeof __VLS_components.ElResult, typeof __VLS_components.elResult, ]} */ ;
|
|
367
|
+
// @ts-ignore
|
|
368
|
+
const __VLS_21 = __VLS_asFunctionalComponent(__VLS_20, new __VLS_20({
|
|
369
|
+
icon: "error",
|
|
370
|
+
title: "加载失败",
|
|
371
|
+
subTitle: (__VLS_ctx.error),
|
|
372
|
+
}));
|
|
373
|
+
const __VLS_22 = __VLS_21({
|
|
374
|
+
icon: "error",
|
|
375
|
+
title: "加载失败",
|
|
376
|
+
subTitle: (__VLS_ctx.error),
|
|
377
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_21));
|
|
378
|
+
__VLS_23.slots.default;
|
|
379
|
+
{
|
|
380
|
+
const { extra: __VLS_thisSlot } = __VLS_23.slots;
|
|
381
|
+
const __VLS_24 = {}.ElButton;
|
|
382
|
+
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
|
383
|
+
// @ts-ignore
|
|
384
|
+
const __VLS_25 = __VLS_asFunctionalComponent(__VLS_24, new __VLS_24({
|
|
385
|
+
...{ 'onClick': {} },
|
|
386
|
+
type: "primary",
|
|
387
|
+
}));
|
|
388
|
+
const __VLS_26 = __VLS_25({
|
|
389
|
+
...{ 'onClick': {} },
|
|
390
|
+
type: "primary",
|
|
391
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_25));
|
|
392
|
+
let __VLS_28;
|
|
393
|
+
let __VLS_29;
|
|
394
|
+
let __VLS_30;
|
|
395
|
+
const __VLS_31 = {
|
|
396
|
+
onClick: (__VLS_ctx.loadFlowFormParam)
|
|
397
|
+
};
|
|
398
|
+
__VLS_27.slots.default;
|
|
399
|
+
var __VLS_27;
|
|
400
|
+
}
|
|
401
|
+
var __VLS_23;
|
|
402
|
+
}
|
|
403
|
+
else if (__VLS_ctx.flowFormParam) {
|
|
404
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({});
|
|
405
|
+
var __VLS_32 = {
|
|
406
|
+
flowParam: (__VLS_ctx.flowFormParam),
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
411
|
+
...{ class: "no-form-tip" },
|
|
412
|
+
});
|
|
413
|
+
const __VLS_34 = {}.ElEmpty;
|
|
414
|
+
/** @type {[typeof __VLS_components.ElEmpty, typeof __VLS_components.elEmpty, ]} */ ;
|
|
415
|
+
// @ts-ignore
|
|
416
|
+
const __VLS_35 = __VLS_asFunctionalComponent(__VLS_34, new __VLS_34({
|
|
417
|
+
description: "暂无表单内容",
|
|
418
|
+
}));
|
|
419
|
+
const __VLS_36 = __VLS_35({
|
|
420
|
+
description: "暂无表单内容",
|
|
421
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_35));
|
|
422
|
+
}
|
|
423
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.aside, __VLS_intrinsicElements.aside)({
|
|
424
|
+
...{ class: "side-panel" },
|
|
425
|
+
});
|
|
426
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
427
|
+
...{ class: "side-panel-header" },
|
|
428
|
+
});
|
|
429
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.h3, __VLS_intrinsicElements.h3)({});
|
|
430
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
431
|
+
...{ class: "side-panel-content" },
|
|
432
|
+
});
|
|
433
|
+
if (__VLS_ctx.sortedTasks.length > 0) {
|
|
434
|
+
const __VLS_38 = {}.ElTimeline;
|
|
435
|
+
/** @type {[typeof __VLS_components.ElTimeline, typeof __VLS_components.elTimeline, typeof __VLS_components.ElTimeline, typeof __VLS_components.elTimeline, ]} */ ;
|
|
436
|
+
// @ts-ignore
|
|
437
|
+
const __VLS_39 = __VLS_asFunctionalComponent(__VLS_38, new __VLS_38({}));
|
|
438
|
+
const __VLS_40 = __VLS_39({}, ...__VLS_functionalComponentArgsRest(__VLS_39));
|
|
439
|
+
__VLS_41.slots.default;
|
|
440
|
+
for (const [task, index] of __VLS_getVForSourceType((__VLS_ctx.sortedTasks))) {
|
|
441
|
+
const __VLS_42 = {}.ElTimelineItem;
|
|
442
|
+
/** @type {[typeof __VLS_components.ElTimelineItem, typeof __VLS_components.elTimelineItem, typeof __VLS_components.ElTimelineItem, typeof __VLS_components.elTimelineItem, ]} */ ;
|
|
443
|
+
// @ts-ignore
|
|
444
|
+
const __VLS_43 = __VLS_asFunctionalComponent(__VLS_42, new __VLS_42({
|
|
445
|
+
key: (index),
|
|
446
|
+
timestamp: (__VLS_ctx.formatFriendlyTime(task.finishTime)),
|
|
447
|
+
placement: "top",
|
|
448
|
+
}));
|
|
449
|
+
const __VLS_44 = __VLS_43({
|
|
450
|
+
key: (index),
|
|
451
|
+
timestamp: (__VLS_ctx.formatFriendlyTime(task.finishTime)),
|
|
452
|
+
placement: "top",
|
|
453
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_43));
|
|
454
|
+
__VLS_45.slots.default;
|
|
455
|
+
const __VLS_46 = {}.ElCard;
|
|
456
|
+
/** @type {[typeof __VLS_components.ElCard, typeof __VLS_components.elCard, typeof __VLS_components.ElCard, typeof __VLS_components.elCard, ]} */ ;
|
|
457
|
+
// @ts-ignore
|
|
458
|
+
const __VLS_47 = __VLS_asFunctionalComponent(__VLS_46, new __VLS_46({}));
|
|
459
|
+
const __VLS_48 = __VLS_47({}, ...__VLS_functionalComponentArgsRest(__VLS_47));
|
|
460
|
+
__VLS_49.slots.default;
|
|
461
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
462
|
+
...{ class: "task-info" },
|
|
463
|
+
});
|
|
464
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
465
|
+
...{ class: "handler-info" },
|
|
466
|
+
});
|
|
467
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
468
|
+
...{ class: "handler-name" },
|
|
469
|
+
});
|
|
470
|
+
(task.handlerName || '未知');
|
|
471
|
+
const __VLS_50 = {}.ElTooltip;
|
|
472
|
+
/** @type {[typeof __VLS_components.ElTooltip, typeof __VLS_components.elTooltip, typeof __VLS_components.ElTooltip, typeof __VLS_components.elTooltip, ]} */ ;
|
|
473
|
+
// @ts-ignore
|
|
474
|
+
const __VLS_51 = __VLS_asFunctionalComponent(__VLS_50, new __VLS_50({
|
|
475
|
+
content: (__VLS_ctx.formatDate(task.finishTime)),
|
|
476
|
+
placement: "top",
|
|
477
|
+
}));
|
|
478
|
+
const __VLS_52 = __VLS_51({
|
|
479
|
+
content: (__VLS_ctx.formatDate(task.finishTime)),
|
|
480
|
+
placement: "top",
|
|
481
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_51));
|
|
482
|
+
__VLS_53.slots.default;
|
|
483
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
484
|
+
...{ class: "task-status" },
|
|
485
|
+
});
|
|
486
|
+
(__VLS_ctx.getTaskStatus(task.state));
|
|
487
|
+
var __VLS_53;
|
|
488
|
+
if (task.comment) {
|
|
489
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
490
|
+
...{ class: "task-comment" },
|
|
491
|
+
});
|
|
492
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
493
|
+
...{ class: "comment-label" },
|
|
494
|
+
});
|
|
495
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
496
|
+
...{ class: "comment-content" },
|
|
497
|
+
});
|
|
498
|
+
(task.comment);
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
502
|
+
...{ class: "task-comment" },
|
|
503
|
+
});
|
|
504
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
505
|
+
...{ class: "comment-label" },
|
|
506
|
+
});
|
|
507
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
|
508
|
+
...{ class: "comment-content empty" },
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
var __VLS_49;
|
|
512
|
+
var __VLS_45;
|
|
513
|
+
}
|
|
514
|
+
var __VLS_41;
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
|
518
|
+
...{ class: "no-history-tip" },
|
|
519
|
+
});
|
|
520
|
+
const __VLS_54 = {}.ElEmpty;
|
|
521
|
+
/** @type {[typeof __VLS_components.ElEmpty, typeof __VLS_components.elEmpty, ]} */ ;
|
|
522
|
+
// @ts-ignore
|
|
523
|
+
const __VLS_55 = __VLS_asFunctionalComponent(__VLS_54, new __VLS_54({
|
|
524
|
+
description: "暂无办理历史",
|
|
525
|
+
imageSize: (100),
|
|
526
|
+
}));
|
|
527
|
+
const __VLS_56 = __VLS_55({
|
|
528
|
+
description: "暂无办理历史",
|
|
529
|
+
imageSize: (100),
|
|
530
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_55));
|
|
531
|
+
}
|
|
532
|
+
__VLS_asFunctionalElement(__VLS_intrinsicElements.footer, __VLS_intrinsicElements.footer)({
|
|
533
|
+
...{ class: "flow-shell-footer" },
|
|
534
|
+
});
|
|
535
|
+
const __VLS_58 = {}.JaButton;
|
|
536
|
+
/** @type {[typeof __VLS_components.JaButton, typeof __VLS_components.jaButton, typeof __VLS_components.JaButton, typeof __VLS_components.jaButton, ]} */ ;
|
|
537
|
+
// @ts-ignore
|
|
538
|
+
const __VLS_59 = __VLS_asFunctionalComponent(__VLS_58, new __VLS_58({
|
|
539
|
+
...{ 'onClick': {} },
|
|
540
|
+
shortcut: "Ctrl+S",
|
|
541
|
+
tooltip: "保存",
|
|
542
|
+
loading: (__VLS_ctx.saving),
|
|
543
|
+
disabled: (__VLS_ctx.saving),
|
|
544
|
+
}));
|
|
545
|
+
const __VLS_60 = __VLS_59({
|
|
546
|
+
...{ 'onClick': {} },
|
|
547
|
+
shortcut: "Ctrl+S",
|
|
548
|
+
tooltip: "保存",
|
|
549
|
+
loading: (__VLS_ctx.saving),
|
|
550
|
+
disabled: (__VLS_ctx.saving),
|
|
551
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_59));
|
|
552
|
+
let __VLS_62;
|
|
553
|
+
let __VLS_63;
|
|
554
|
+
let __VLS_64;
|
|
555
|
+
const __VLS_65 = {
|
|
556
|
+
onClick: (__VLS_ctx.handleSave)
|
|
557
|
+
};
|
|
558
|
+
__VLS_61.slots.default;
|
|
559
|
+
var __VLS_61;
|
|
560
|
+
if (__VLS_ctx.showForwardButton) {
|
|
561
|
+
const __VLS_66 = {}.JaButton;
|
|
562
|
+
/** @type {[typeof __VLS_components.JaButton, typeof __VLS_components.jaButton, typeof __VLS_components.JaButton, typeof __VLS_components.jaButton, ]} */ ;
|
|
563
|
+
// @ts-ignore
|
|
564
|
+
const __VLS_67 = __VLS_asFunctionalComponent(__VLS_66, new __VLS_66({
|
|
565
|
+
...{ 'onClick': {} },
|
|
566
|
+
type: "danger",
|
|
567
|
+
shortcut: "Ctrl+F",
|
|
568
|
+
tooltip: ('保存并' + (__VLS_ctx.flowFormParam?.taskInstance ? '结束当前工作步骤办理' : '发起工作')),
|
|
569
|
+
loading: (__VLS_ctx.saving),
|
|
570
|
+
disabled: (__VLS_ctx.saving),
|
|
571
|
+
}));
|
|
572
|
+
const __VLS_68 = __VLS_67({
|
|
573
|
+
...{ 'onClick': {} },
|
|
574
|
+
type: "danger",
|
|
575
|
+
shortcut: "Ctrl+F",
|
|
576
|
+
tooltip: ('保存并' + (__VLS_ctx.flowFormParam?.taskInstance ? '结束当前工作步骤办理' : '发起工作')),
|
|
577
|
+
loading: (__VLS_ctx.saving),
|
|
578
|
+
disabled: (__VLS_ctx.saving),
|
|
579
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_67));
|
|
580
|
+
let __VLS_70;
|
|
581
|
+
let __VLS_71;
|
|
582
|
+
let __VLS_72;
|
|
583
|
+
const __VLS_73 = {
|
|
584
|
+
onClick: (__VLS_ctx.handleForward)
|
|
585
|
+
};
|
|
586
|
+
__VLS_69.slots.default;
|
|
587
|
+
(__VLS_ctx.flowFormParam?.taskInstance ? "办理结束" : "发起工作");
|
|
588
|
+
var __VLS_69;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
/** @type {__VLS_StyleScopedClasses['flow-shell-wrapper']} */ ;
|
|
592
|
+
/** @type {__VLS_StyleScopedClasses['flow-shell-container']} */ ;
|
|
593
|
+
/** @type {__VLS_StyleScopedClasses['flow-shell-header']} */ ;
|
|
594
|
+
/** @type {__VLS_StyleScopedClasses['header-content']} */ ;
|
|
595
|
+
/** @type {__VLS_StyleScopedClasses['header-top']} */ ;
|
|
596
|
+
/** @type {__VLS_StyleScopedClasses['back-button-wrapper']} */ ;
|
|
597
|
+
/** @type {__VLS_StyleScopedClasses['title-section']} */ ;
|
|
598
|
+
/** @type {__VLS_StyleScopedClasses['flow-title']} */ ;
|
|
599
|
+
/** @type {__VLS_StyleScopedClasses['header-bottom']} */ ;
|
|
600
|
+
/** @type {__VLS_StyleScopedClasses['info-item']} */ ;
|
|
601
|
+
/** @type {__VLS_StyleScopedClasses['label']} */ ;
|
|
602
|
+
/** @type {__VLS_StyleScopedClasses['info-item']} */ ;
|
|
603
|
+
/** @type {__VLS_StyleScopedClasses['label']} */ ;
|
|
604
|
+
/** @type {__VLS_StyleScopedClasses['value']} */ ;
|
|
605
|
+
/** @type {__VLS_StyleScopedClasses['value']} */ ;
|
|
606
|
+
/** @type {__VLS_StyleScopedClasses['info-item']} */ ;
|
|
607
|
+
/** @type {__VLS_StyleScopedClasses['label']} */ ;
|
|
608
|
+
/** @type {__VLS_StyleScopedClasses['value']} */ ;
|
|
609
|
+
/** @type {__VLS_StyleScopedClasses['flow-shell-main']} */ ;
|
|
610
|
+
/** @type {__VLS_StyleScopedClasses['main-content']} */ ;
|
|
611
|
+
/** @type {__VLS_StyleScopedClasses['content-wrapper']} */ ;
|
|
612
|
+
/** @type {__VLS_StyleScopedClasses['error-tip']} */ ;
|
|
613
|
+
/** @type {__VLS_StyleScopedClasses['no-form-tip']} */ ;
|
|
614
|
+
/** @type {__VLS_StyleScopedClasses['side-panel']} */ ;
|
|
615
|
+
/** @type {__VLS_StyleScopedClasses['side-panel-header']} */ ;
|
|
616
|
+
/** @type {__VLS_StyleScopedClasses['side-panel-content']} */ ;
|
|
617
|
+
/** @type {__VLS_StyleScopedClasses['task-info']} */ ;
|
|
618
|
+
/** @type {__VLS_StyleScopedClasses['handler-info']} */ ;
|
|
619
|
+
/** @type {__VLS_StyleScopedClasses['handler-name']} */ ;
|
|
620
|
+
/** @type {__VLS_StyleScopedClasses['task-status']} */ ;
|
|
621
|
+
/** @type {__VLS_StyleScopedClasses['task-comment']} */ ;
|
|
622
|
+
/** @type {__VLS_StyleScopedClasses['comment-label']} */ ;
|
|
623
|
+
/** @type {__VLS_StyleScopedClasses['comment-content']} */ ;
|
|
624
|
+
/** @type {__VLS_StyleScopedClasses['task-comment']} */ ;
|
|
625
|
+
/** @type {__VLS_StyleScopedClasses['comment-label']} */ ;
|
|
626
|
+
/** @type {__VLS_StyleScopedClasses['comment-content']} */ ;
|
|
627
|
+
/** @type {__VLS_StyleScopedClasses['empty']} */ ;
|
|
628
|
+
/** @type {__VLS_StyleScopedClasses['no-history-tip']} */ ;
|
|
629
|
+
/** @type {__VLS_StyleScopedClasses['flow-shell-footer']} */ ;
|
|
630
|
+
// @ts-ignore
|
|
631
|
+
var __VLS_33 = __VLS_32;
|
|
632
|
+
var __VLS_dollars;
|
|
633
|
+
const __VLS_self = (await import('vue')).defineComponent({
|
|
634
|
+
setup() {
|
|
635
|
+
return {
|
|
636
|
+
ElTag: ElTag,
|
|
637
|
+
ElCard: ElCard,
|
|
638
|
+
ElButton: ElButton,
|
|
639
|
+
ElTimeline: ElTimeline,
|
|
640
|
+
ElTimelineItem: ElTimelineItem,
|
|
641
|
+
ElEmpty: ElEmpty,
|
|
642
|
+
ElIcon: ElIcon,
|
|
643
|
+
ElResult: ElResult,
|
|
644
|
+
JaButton: JaButton,
|
|
645
|
+
JaUserInfoTag: JaUserInfoTag,
|
|
646
|
+
ArrowLeft: ArrowLeft,
|
|
647
|
+
ElTooltip: ElTooltip,
|
|
648
|
+
dialogVisible: dialogVisible,
|
|
649
|
+
isLoading: isLoading,
|
|
650
|
+
saving: saving,
|
|
651
|
+
error: error,
|
|
652
|
+
flowFormParam: flowFormParam,
|
|
653
|
+
flowStateTagType: flowStateTagType,
|
|
654
|
+
showForwardButton: showForwardButton,
|
|
655
|
+
sortedTasks: sortedTasks,
|
|
656
|
+
formatDate: formatDate,
|
|
657
|
+
formatFriendlyTime: formatFriendlyTime,
|
|
658
|
+
getFlowStatus: getFlowStatus,
|
|
659
|
+
getTaskStatus: getTaskStatus,
|
|
660
|
+
loadFlowFormParam: loadFlowFormParam,
|
|
661
|
+
handleSave: handleSave,
|
|
662
|
+
handleForward: handleForward,
|
|
663
|
+
};
|
|
664
|
+
},
|
|
665
|
+
__typeEmits: {},
|
|
666
|
+
__typeProps: {},
|
|
667
|
+
props: {},
|
|
668
|
+
});
|
|
669
|
+
return {};
|
|
670
|
+
})()) => ({})); /* PartiallyEnd: #4569/main.vue */
|
|
671
|
+
//# sourceMappingURL=FlowFormShell.vue.js.map
|