vue2-client 1.14.81 → 1.14.83
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/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250609151519.vue +222 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue +183 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue +183 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue +183 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181609.vue +206 -0
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181629.vue +209 -0
- package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +2 -1
- package/package.json +1 -1
- package/src/base-client/components/common/Upload/Upload.vue +0 -1
- package/src/base-client/components/common/XTab/XTab.vue +8 -0
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.vue +13 -236
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireDemo.vue +3 -14
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireItem.vue +280 -0
- package/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +32 -45
- package/src/components/FileImageItem/FileItem.vue +1 -1
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +1 -1
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +26 -56
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowPreview.vue +98 -0
- package/src/router/async/router.map.js +1 -1
- package/src/utils/axios-interceptors.js +19 -1
- package/src/utils/request.js +5 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<div class="file-content">
|
|
10
10
|
<div class="file-header">
|
|
11
|
-
<span class="file-name">{{ file.name }}</span>
|
|
11
|
+
<span class="file-name">{{ file.real_name ? file.real_name : file.name }}</span>
|
|
12
12
|
<span class="file-type">{{ getFileType(file.name) }}</span>
|
|
13
13
|
</div>
|
|
14
14
|
<div class="file-footer">
|
|
@@ -35,64 +35,24 @@
|
|
|
35
35
|
<a-tabs default-active-key="1" @change="note = ''" type="card">
|
|
36
36
|
<template v-if="beforeStepActive || workflowState">
|
|
37
37
|
<a-tab-pane key="0" tab="步骤详情">
|
|
38
|
-
<a-card :bordered="false" :loading="loadingHistory">
|
|
38
|
+
<a-card :bordered="false" :loading="loadingHistory" :body-style="{ paddingTop: 0 }">
|
|
39
39
|
<!-- 当前步骤历史记录 -->
|
|
40
|
-
<template v-if="
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
填写历史
|
|
49
|
-
</p>
|
|
50
|
-
<a-descriptions-item
|
|
51
|
-
v-for="(value,key) in formCompletedDataPreview.data"
|
|
52
|
-
:key="key"
|
|
53
|
-
v-show="key !== '附件上传'"
|
|
40
|
+
<template v-if="showTab">
|
|
41
|
+
<x-tab :compProp="{ buttonState: { add: false, edit: false, delete: false, import: false }}" :local-config="tabDesigner" :body-style="{ padding: 0 }" :tabBarGutter="24" default-active-key="workFlowTab">
|
|
42
|
+
<a-tab-pane
|
|
43
|
+
:forceRender="true"
|
|
44
|
+
v-if="formCompletedDataPreview"
|
|
45
|
+
slot="extraBeforeTabs"
|
|
46
|
+
key="workFlowTab"
|
|
47
|
+
tab="表单"
|
|
54
48
|
>
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
bordered
|
|
62
|
-
class="descriptionPreviewItem"
|
|
63
|
-
>
|
|
64
|
-
<p slot="title" class="descriptionTitle">
|
|
65
|
-
备注
|
|
66
|
-
</p>
|
|
67
|
-
<a-descriptions-item>
|
|
68
|
-
<span slot="label" style="color: #000">备注信息</span>
|
|
69
|
-
<p style="white-space: pre-wrap">{{ formCompletedDataPreview.note }}</p>
|
|
70
|
-
</a-descriptions-item>
|
|
71
|
-
</a-descriptions>
|
|
72
|
-
<a-descriptions
|
|
73
|
-
v-show="formCompletedDataPreview.images.length"
|
|
74
|
-
class="descriptionPreviewItem allWidth"
|
|
75
|
-
>
|
|
76
|
-
<p slot="title" class="descriptionTitle">
|
|
77
|
-
图片
|
|
78
|
-
</p>
|
|
79
|
-
<a-descriptions-item>
|
|
80
|
-
<image-item :images="formCompletedDataPreview.images" />
|
|
81
|
-
</a-descriptions-item>
|
|
82
|
-
</a-descriptions>
|
|
83
|
-
<a-descriptions
|
|
84
|
-
v-show="formCompletedDataPreview.files.length"
|
|
85
|
-
class="descriptionPreviewItem allWidth"
|
|
86
|
-
>
|
|
87
|
-
<p slot="title" class="descriptionTitle">
|
|
88
|
-
附件
|
|
89
|
-
</p>
|
|
90
|
-
<a-descriptions-item>
|
|
91
|
-
<file-item :files="formCompletedDataPreview.files" />
|
|
92
|
-
</a-descriptions-item>
|
|
93
|
-
</a-descriptions>
|
|
49
|
+
<work-flow-preview :form-completed-data-preview="formCompletedDataPreview" />
|
|
50
|
+
</a-tab-pane>
|
|
51
|
+
</x-tab>
|
|
52
|
+
</template>
|
|
53
|
+
<template v-else-if="formCompletedDataPreview">
|
|
54
|
+
<work-flow-preview :form-completed-data-preview="formCompletedDataPreview" />
|
|
94
55
|
</template>
|
|
95
|
-
<!-- 当前步骤无记录 -->
|
|
96
56
|
<template v-else>
|
|
97
57
|
<a-result status="404" title="暂无数据" sub-title="该步骤暂无数据。">
|
|
98
58
|
</a-result>
|
|
@@ -276,6 +236,7 @@ import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
|
|
|
276
236
|
import * as util from '@vue2-client/utils/util'
|
|
277
237
|
import { getConfigByNameAsync, runLogic } from '@vue2-client/services/api/common'
|
|
278
238
|
import XTab from '@vue2-client/base-client/components/common/XTab/XTab.vue'
|
|
239
|
+
import WorkFlowPreview from './WorkFlowPreview'
|
|
279
240
|
|
|
280
241
|
export default {
|
|
281
242
|
name: 'WorkFlowHandle',
|
|
@@ -288,7 +249,8 @@ export default {
|
|
|
288
249
|
XAddForm,
|
|
289
250
|
FilePreview,
|
|
290
251
|
FileItem,
|
|
291
|
-
ImageItem
|
|
252
|
+
ImageItem,
|
|
253
|
+
WorkFlowPreview
|
|
292
254
|
},
|
|
293
255
|
computed: {
|
|
294
256
|
...mapState('account', { currUser: 'user' }),
|
|
@@ -834,6 +796,14 @@ export default {
|
|
|
834
796
|
formCompletedDataPreview = null
|
|
835
797
|
}
|
|
836
798
|
this.formCompletedDataPreview = formCompletedDataPreview
|
|
799
|
+
// 渲染已完成步骤的Tab
|
|
800
|
+
const properties = this.stepsDefine[stepId - 1].properties
|
|
801
|
+
this.tabDesigner = properties.tabDesigner
|
|
802
|
+
if (this.tabDesigner) {
|
|
803
|
+
this.showTab = true
|
|
804
|
+
} else {
|
|
805
|
+
this.showTab = false
|
|
806
|
+
}
|
|
837
807
|
// 完成
|
|
838
808
|
this.loadingHistory = false
|
|
839
809
|
this.beforeStepActive = this.activeStepName !== this.currentStep.state
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a-descriptions
|
|
4
|
+
v-show="formCompletedDataPreview.data"
|
|
5
|
+
:column="{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }"
|
|
6
|
+
bordered
|
|
7
|
+
class="descriptionPreviewItem"
|
|
8
|
+
>
|
|
9
|
+
<p slot="title" class="descriptionTitle">
|
|
10
|
+
填写历史
|
|
11
|
+
</p>
|
|
12
|
+
<a-descriptions-item
|
|
13
|
+
v-for="(value, key) in formCompletedDataPreview.data"
|
|
14
|
+
:key="key"
|
|
15
|
+
v-show="key !== '附件上传'"
|
|
16
|
+
>
|
|
17
|
+
<span slot="label" style="color: #000">{{ key }}</span>
|
|
18
|
+
<div style="white-space: pre-wrap">{{ value }}</div>
|
|
19
|
+
</a-descriptions-item>
|
|
20
|
+
</a-descriptions>
|
|
21
|
+
<a-descriptions
|
|
22
|
+
v-show="formCompletedDataPreview.note"
|
|
23
|
+
bordered
|
|
24
|
+
class="descriptionPreviewItem"
|
|
25
|
+
>
|
|
26
|
+
<p slot="title" class="descriptionTitle">
|
|
27
|
+
备注
|
|
28
|
+
</p>
|
|
29
|
+
<a-descriptions-item>
|
|
30
|
+
<span slot="label" style="color: #000">备注信息</span>
|
|
31
|
+
<p style="white-space: pre-wrap">{{ formCompletedDataPreview.note }}</p>
|
|
32
|
+
</a-descriptions-item>
|
|
33
|
+
</a-descriptions>
|
|
34
|
+
<a-descriptions
|
|
35
|
+
v-show="formCompletedDataPreview.images.length"
|
|
36
|
+
class="descriptionPreviewItem allWidth"
|
|
37
|
+
>
|
|
38
|
+
<p slot="title" class="descriptionTitle">
|
|
39
|
+
图片
|
|
40
|
+
</p>
|
|
41
|
+
<a-descriptions-item>
|
|
42
|
+
<image-item :images="formCompletedDataPreview.images" />
|
|
43
|
+
</a-descriptions-item>
|
|
44
|
+
</a-descriptions>
|
|
45
|
+
<a-descriptions
|
|
46
|
+
v-show="formCompletedDataPreview.files.length"
|
|
47
|
+
class="descriptionPreviewItem allWidth"
|
|
48
|
+
>
|
|
49
|
+
<p slot="title" class="descriptionTitle">
|
|
50
|
+
附件
|
|
51
|
+
</p>
|
|
52
|
+
<a-descriptions-item>
|
|
53
|
+
<file-item :files="formCompletedDataPreview.files" />
|
|
54
|
+
</a-descriptions-item>
|
|
55
|
+
</a-descriptions>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script>
|
|
60
|
+
import { FileItem, ImageItem } from '@vue2-client/components/FileImageItem'
|
|
61
|
+
export default {
|
|
62
|
+
name: 'WorkFlowPreview',
|
|
63
|
+
components: {
|
|
64
|
+
FileItem,
|
|
65
|
+
ImageItem
|
|
66
|
+
},
|
|
67
|
+
props: {
|
|
68
|
+
formCompletedDataPreview: {
|
|
69
|
+
type: Object,
|
|
70
|
+
required: true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style scoped>
|
|
77
|
+
.descriptionPreviewItem {
|
|
78
|
+
margin-bottom: 22px;
|
|
79
|
+
}
|
|
80
|
+
.allWidth >>> .ant-descriptions-item-content {
|
|
81
|
+
width: 100%;
|
|
82
|
+
}
|
|
83
|
+
.descriptionTitle {
|
|
84
|
+
position: relative;
|
|
85
|
+
padding-left: 12px;
|
|
86
|
+
}
|
|
87
|
+
.descriptionTitle::before {
|
|
88
|
+
content: '';
|
|
89
|
+
position: absolute;
|
|
90
|
+
left: 0;
|
|
91
|
+
top: 50%;
|
|
92
|
+
transform: translateY(-50%);
|
|
93
|
+
width: 4px;
|
|
94
|
+
height: 16px;
|
|
95
|
+
background-color: #1890ff;
|
|
96
|
+
border-radius: 2px;
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -66,7 +66,7 @@ routerResource.example = {
|
|
|
66
66
|
// component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
|
|
67
67
|
// component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
|
|
68
68
|
// component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
|
|
69
|
-
component: () => import('@vue2-client/base-client/components/his/
|
|
69
|
+
component: () => import('@vue2-client/base-client/components/his/XShiftSchedule/dome.vue'),
|
|
70
70
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
|
71
71
|
// component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
|
|
72
72
|
// component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
|
|
@@ -48,6 +48,24 @@ const resp403 = {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
const resp413 = {
|
|
52
|
+
onFulfilled (response, options) {
|
|
53
|
+
const { message } = options
|
|
54
|
+
if (response.code === 413) {
|
|
55
|
+
message.error('上传文件过大')
|
|
56
|
+
}
|
|
57
|
+
return response
|
|
58
|
+
},
|
|
59
|
+
onRejected (error, options) {
|
|
60
|
+
const { message } = options
|
|
61
|
+
const { response } = error
|
|
62
|
+
if (response.status === 413) {
|
|
63
|
+
message.error('上传文件过大')
|
|
64
|
+
}
|
|
65
|
+
return Promise.reject(error)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
51
69
|
const reqCommon = {
|
|
52
70
|
/**
|
|
53
71
|
* 发送请求之前做些什么
|
|
@@ -78,5 +96,5 @@ const reqCommon = {
|
|
|
78
96
|
|
|
79
97
|
export default {
|
|
80
98
|
request: [reqCommon], // 请求拦截
|
|
81
|
-
response: [resp401, resp403] // 响应拦截
|
|
99
|
+
response: [resp401, resp403, resp413] // 响应拦截
|
|
82
100
|
}
|
package/src/utils/request.js
CHANGED
|
@@ -334,6 +334,11 @@ const errorHandler = (error) => {
|
|
|
334
334
|
message: '系统警告',
|
|
335
335
|
description: data
|
|
336
336
|
})
|
|
337
|
+
} else if (error.response.status === 413 || (data && data.code === 413)) {
|
|
338
|
+
notification.warn({
|
|
339
|
+
message: '上传的文件过大',
|
|
340
|
+
description: '请检查文件内容'
|
|
341
|
+
})
|
|
337
342
|
} else {
|
|
338
343
|
notification.error({
|
|
339
344
|
message: '网络异常',
|