vue2-client 1.19.56 → 1.19.58
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/package.json
CHANGED
|
@@ -245,7 +245,8 @@ export default {
|
|
|
245
245
|
gif: 'file-image',
|
|
246
246
|
txt: 'file-text',
|
|
247
247
|
zip: 'file-zip',
|
|
248
|
-
rar: 'file-zip'
|
|
248
|
+
rar: 'file-zip',
|
|
249
|
+
m4a: 'right-circle',
|
|
249
250
|
}
|
|
250
251
|
return iconMap[ext] || 'file'
|
|
251
252
|
},
|
|
@@ -316,7 +317,7 @@ export default {
|
|
|
316
317
|
&.file-type-jpg, &.file-type-jpeg, &.file-type-png, &.file-type-gif {
|
|
317
318
|
background: linear-gradient(135deg, #722ed1, #b37feb);
|
|
318
319
|
}
|
|
319
|
-
&.file-type-txt {
|
|
320
|
+
&.file-type-txt, &.file-type-m4a {
|
|
320
321
|
background: linear-gradient(135deg, #13c2c2, #5cdbd3);
|
|
321
322
|
}
|
|
322
323
|
&.file-type-zip, &.file-type-rar {
|
|
@@ -371,13 +372,9 @@ export default {
|
|
|
371
372
|
margin-right: 12px;
|
|
372
373
|
}
|
|
373
374
|
|
|
374
|
-
.file-audio-duration {
|
|
375
|
-
margin-right: 12px;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
375
|
.file-time {
|
|
379
376
|
position: relative;
|
|
380
|
-
padding-left:
|
|
377
|
+
padding-left: 6px;
|
|
381
378
|
|
|
382
379
|
&::before {
|
|
383
380
|
content: '';
|
|
@@ -419,7 +416,7 @@ export default {
|
|
|
419
416
|
.file-actions {
|
|
420
417
|
display: flex;
|
|
421
418
|
align-items: center;
|
|
422
|
-
margin-left:
|
|
419
|
+
margin-left: 6px;
|
|
423
420
|
|
|
424
421
|
.action-btn {
|
|
425
422
|
width: 36px;
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
key="workFlowTab"
|
|
82
82
|
tab="表单"
|
|
83
83
|
>
|
|
84
|
+
<work-flow-preview v-if="historyFormCompletedDataPreview" :form-completed-data-preview="historyFormCompletedDataPreview" :showTitle="false"/>
|
|
84
85
|
<x-add-native-form
|
|
85
86
|
ref="xAddForm"
|
|
86
87
|
@x-form-item-emit-func="formItemEmitFunc"
|
|
@@ -486,6 +487,7 @@ export default {
|
|
|
486
487
|
formCompletedData: {},
|
|
487
488
|
// 用于展示提交的数据
|
|
488
489
|
formCompletedDataPreview: null,
|
|
490
|
+
historyFormCompletedDataPreview: null,
|
|
489
491
|
// 切换至目标流程时,目标流程定义
|
|
490
492
|
targetStepDefine: [],
|
|
491
493
|
// 控制历史记录加载
|
|
@@ -953,8 +955,78 @@ export default {
|
|
|
953
955
|
// 获取当前步骤定义内容,构建组件
|
|
954
956
|
async buildComp (stepId) {
|
|
955
957
|
const properties = this.stepsDefine.find(item => item.id === stepId).properties
|
|
958
|
+
this.historyFormCompletedDataPreview = null
|
|
956
959
|
// 表单的渲染
|
|
957
960
|
if (properties.form && properties.form.formJson) {
|
|
961
|
+
if (properties.otherProperty && properties.otherProperty.historyFormData) {
|
|
962
|
+
const historyFormDataConfig = properties.otherProperty.historyFormData
|
|
963
|
+
|
|
964
|
+
// 收集所有需要查询的步骤和字段映射关系
|
|
965
|
+
const configItems = []
|
|
966
|
+
const stepIdSet = new Set()
|
|
967
|
+
|
|
968
|
+
for (const historyFormConfig of historyFormDataConfig) {
|
|
969
|
+
const stepConfig = this.stepsDefine.find(item => item.name === historyFormConfig.stepName)
|
|
970
|
+
if (!stepConfig) {
|
|
971
|
+
continue
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
const stepId = stepConfig.id
|
|
975
|
+
const stepFormJson = stepConfig?.properties?.form?.formJson
|
|
976
|
+
if (!stepFormJson) {
|
|
977
|
+
continue
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
const formItem = stepFormJson.find(item => item.name === historyFormConfig.formLabel)
|
|
981
|
+
const model = formItem?.model
|
|
982
|
+
|
|
983
|
+
if (!model) {
|
|
984
|
+
continue
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
// 收集配置项和需要查询的 stepId
|
|
988
|
+
configItems.push({
|
|
989
|
+
stepId,
|
|
990
|
+
model,
|
|
991
|
+
displayLabel: historyFormConfig.displayLabel
|
|
992
|
+
})
|
|
993
|
+
stepIdSet.add(stepId)
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
// 批量查询:每个 stepId 只查询一次,并行执行
|
|
997
|
+
const formDataCache = new Map()
|
|
998
|
+
const queryPromises = Array.from(stepIdSet).map(async stepId => {
|
|
999
|
+
try {
|
|
1000
|
+
const formData = await postByServiceName(
|
|
1001
|
+
workFlowViewApi.getWorkFlowCompletedStepData,
|
|
1002
|
+
{ workflowId: this.workflowId, stepId }
|
|
1003
|
+
)
|
|
1004
|
+
formDataCache.set(stepId, formData.data || {})
|
|
1005
|
+
} catch (error) {
|
|
1006
|
+
console.error(`查询步骤 ${stepId} 的数据失败:`, error)
|
|
1007
|
+
formDataCache.set(stepId, {})
|
|
1008
|
+
}
|
|
1009
|
+
})
|
|
1010
|
+
|
|
1011
|
+
// 等待所有查询完成
|
|
1012
|
+
await Promise.all(queryPromises)
|
|
1013
|
+
|
|
1014
|
+
// 组装历史表单数据
|
|
1015
|
+
const historyFormData = configItems.map(configItem => {
|
|
1016
|
+
const cachedFormData = formDataCache.get(configItem.stepId)
|
|
1017
|
+
return {
|
|
1018
|
+
label: configItem.displayLabel,
|
|
1019
|
+
value: cachedFormData?.[configItem.model]
|
|
1020
|
+
}
|
|
1021
|
+
})
|
|
1022
|
+
|
|
1023
|
+
this.historyFormCompletedDataPreview = {
|
|
1024
|
+
data: historyFormData,
|
|
1025
|
+
images: [],
|
|
1026
|
+
files: [],
|
|
1027
|
+
note: ''
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
958
1030
|
this.stepDefine = properties.form.formJson
|
|
959
1031
|
this.showForm = true
|
|
960
1032
|
this.$nextTick(() => {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
bordered
|
|
8
8
|
class="descriptionPreviewItem"
|
|
9
9
|
>
|
|
10
|
-
<p slot="title" class="descriptionTitle">
|
|
10
|
+
<p slot="title" class="descriptionTitle" v-if="showTitle">
|
|
11
11
|
填写历史
|
|
12
12
|
</p>
|
|
13
13
|
<template v-if="legacyMode">
|
|
@@ -97,7 +97,11 @@ export default {
|
|
|
97
97
|
legacyMode: {
|
|
98
98
|
type: Boolean,
|
|
99
99
|
default: false
|
|
100
|
-
}
|
|
100
|
+
},
|
|
101
|
+
showTitle: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: true
|
|
104
|
+
},
|
|
101
105
|
},
|
|
102
106
|
computed: {
|
|
103
107
|
noData () {
|