vue2-client 1.15.27 → 1.15.28
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 +1 -1
- package/src/base-client/components/common/AmapMarker/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/XDescriptions.vue +174 -174
- package/src/base-client/components/common/XDescriptions/XDescriptionsGroup.vue +314 -314
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +166 -166
- package/src/config/CreateQueryConfig.js +325 -325
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +201 -37
- package/src/pages/WorkflowDetail/WorkFlowDemo2.vue +97 -169
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +22 -27
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowPreview.vue +5 -5
- package/src/pages/XTreeOneProExample/index.vue +67 -67
- package/src/router/async/router.map.js +7 -12
- package/vue.config.js +3 -4
@@ -1,47 +1,211 @@
|
|
1
|
+
<template>
|
2
|
+
<a-card :bordered="false">
|
3
|
+
<x-form-table
|
4
|
+
title="我的工单"
|
5
|
+
ref="xFormTable"
|
6
|
+
:queryParamsName="queryParamsName"
|
7
|
+
:fixed-query-form="{
|
8
|
+
users_f_handler_id: currUser.id,
|
9
|
+
}"
|
10
|
+
@action="toDetail">
|
11
|
+
<template slot="button">
|
12
|
+
<a-button @click="addApply">
|
13
|
+
<a-icon type="plus"/>
|
14
|
+
发起报建
|
15
|
+
</a-button>
|
16
|
+
</template>
|
17
|
+
</x-form-table>
|
18
|
+
<a-modal
|
19
|
+
v-model="applyAddFlag"
|
20
|
+
:footer="null"
|
21
|
+
:dialog-style="{ top: '5rem' }"
|
22
|
+
:z-index="1001"
|
23
|
+
title="发起报建"
|
24
|
+
:destroyOnClose="true">
|
25
|
+
<x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
|
26
|
+
</a-modal>
|
27
|
+
<WorkflowDetail
|
28
|
+
ref="workFlow"
|
29
|
+
@success="success"
|
30
|
+
@nextClick="nextClick"
|
31
|
+
@x-form-item-emit-func="handleFormItemEvent"
|
32
|
+
>
|
33
|
+
</WorkflowDetail>
|
34
|
+
<address-select ref="addressSelect" @setAddress="setForm"></address-select>
|
35
|
+
<!-- 协议作废功能 -->
|
36
|
+
<a-modal
|
37
|
+
v-model="formState"
|
38
|
+
:dialog-style="{ top: '5rem' }"
|
39
|
+
:z-index="1001"
|
40
|
+
title="作废"
|
41
|
+
:destroyOnClose="true"
|
42
|
+
width="55vw">
|
43
|
+
<x-add-native-form
|
44
|
+
ref="xCancelForm"
|
45
|
+
@onSubmit="submit"
|
46
|
+
/>
|
47
|
+
<template #footer>
|
48
|
+
<a-button key="back" @click="formState = false">取消</a-button>
|
49
|
+
<a-button key="submit" type="primary" :loading="submitLoading" @click="formSubmit">确认</a-button>
|
50
|
+
</template>
|
51
|
+
</a-modal>
|
52
|
+
</a-card>
|
53
|
+
</template>
|
54
|
+
|
1
55
|
<script>
|
2
56
|
import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
|
57
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
58
|
+
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
59
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
60
|
+
import { mapState } from 'vuex'
|
61
|
+
import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
|
3
62
|
|
4
63
|
export default {
|
5
|
-
name: '
|
6
|
-
components: {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
64
|
+
name: 'Apply',
|
65
|
+
components: {
|
66
|
+
XFormTable,
|
67
|
+
XAddNativeForm,
|
68
|
+
WorkflowDetail,
|
69
|
+
AddressSelect
|
70
|
+
},
|
71
|
+
provide () {
|
72
|
+
return {
|
73
|
+
generalFunction: {
|
74
|
+
setCancel: this.setCancel,
|
75
|
+
updateFormData: this.updateFormData,
|
76
|
+
}
|
77
|
+
}
|
78
|
+
},
|
79
|
+
data () {
|
80
|
+
return {
|
81
|
+
// 查询配置文件名
|
82
|
+
queryParamsName: 'ApplyProcessCRUD',
|
83
|
+
// 发起报建弹框控制
|
84
|
+
applyAddFlag: false,
|
85
|
+
formState: false,
|
86
|
+
submitLoading: false,
|
87
|
+
cancelRecord: {}
|
88
|
+
}
|
89
|
+
},
|
90
|
+
computed: {
|
91
|
+
...mapState('account', { currUser: 'user' }),
|
11
92
|
},
|
12
93
|
methods: {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
94
|
+
addApply () {
|
95
|
+
console.log('打开了吗')
|
96
|
+
this.applyAddFlag = true
|
97
|
+
this.$nextTick(
|
98
|
+
() => {
|
99
|
+
getConfigByName('addApplyForm', 'af-apply', (res) => {
|
100
|
+
this.$refs.xForm.init({
|
101
|
+
businessType: '新增',
|
102
|
+
title: '发起报建',
|
103
|
+
...res
|
104
|
+
})
|
105
|
+
})
|
106
|
+
}
|
107
|
+
)
|
108
|
+
},
|
109
|
+
applySubmit (formData) {
|
110
|
+
runLogic('addApply', formData).then(
|
111
|
+
res => {
|
112
|
+
this.$message.success('发起报建成功')
|
113
|
+
this.$refs.xFormTable.refreshTable(true)
|
114
|
+
this.applyAddFlag = false
|
115
|
+
}
|
116
|
+
).catch(() => {
|
117
|
+
this.applyAddFlag = false
|
118
|
+
})
|
119
|
+
},
|
120
|
+
success () {
|
121
|
+
console.log('完工')
|
122
|
+
},
|
123
|
+
toDetail (record, id) {
|
124
|
+
this.$refs.workFlow.init({
|
125
|
+
workflowId: record.ab_f_workflow_id,
|
126
|
+
})
|
127
|
+
},
|
128
|
+
handleFormItemEvent (func, data, value) {
|
129
|
+
console.log('打印一下:', func, data, value)
|
130
|
+
if (func === 'selectAddress') {
|
131
|
+
this.$refs.addressSelect.setFormShow()
|
132
|
+
}
|
133
|
+
},
|
134
|
+
setForm (record) {
|
135
|
+
this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
|
136
|
+
},
|
137
|
+
nextClick ({ form, formStep, workflowId }) {
|
138
|
+
console.log('success', form, formStep, workflowId)
|
139
|
+
const data = {
|
140
|
+
workflowId,
|
141
|
+
form,
|
142
|
+
formStep
|
143
|
+
}
|
144
|
+
runLogic('applySubmitAfter', data, 'af-apply').then(
|
145
|
+
res => {
|
146
|
+
if (res) {
|
147
|
+
// this.$message.success('提交成功!')
|
148
|
+
this.$refs.xFormTable.refreshTable(true)
|
149
|
+
}
|
150
|
+
}
|
151
|
+
)
|
152
|
+
},
|
153
|
+
// 协议作废
|
154
|
+
setCancel (record) {
|
155
|
+
this.cancelRecord = record
|
156
|
+
this.formState = true
|
157
|
+
this.$nextTick(() => {
|
158
|
+
getConfigByName('setCancelForm', 'af-apply', (config) => {
|
159
|
+
if (this.$refs.xCancelForm) {
|
160
|
+
this.$refs.xCancelForm.init({
|
161
|
+
formItems: config.formJson,
|
162
|
+
title: '补充协议作废',
|
163
|
+
businessType: '修改',
|
164
|
+
showSubmitBtn: false,
|
165
|
+
...config
|
166
|
+
})
|
167
|
+
if (this.$refs.xCancelForm) {
|
168
|
+
console.log(record)
|
169
|
+
// this.$refs.xCancelForm.setForm(recordData)
|
170
|
+
}
|
171
|
+
} else {
|
172
|
+
console.error('xCancelForm组件未加载完成')
|
173
|
+
// 延迟重试
|
174
|
+
setTimeout(() => {
|
175
|
+
this.setCancel(record)
|
176
|
+
}, 100)
|
177
|
+
}
|
178
|
+
})
|
179
|
+
})
|
180
|
+
},
|
181
|
+
async formSubmit () {
|
182
|
+
this.submitLoading = true
|
183
|
+
const formData = await this.$refs.xCancelForm.asyncSubmit()
|
184
|
+
try {
|
185
|
+
await this.submit(formData)
|
186
|
+
} catch (error) {
|
187
|
+
this.$message.error('表单验证失败,请检查填写内容')
|
188
|
+
} finally {
|
189
|
+
this.submitLoading = false
|
190
|
+
}
|
191
|
+
},
|
192
|
+
async submit (formData) {
|
193
|
+
const data = {
|
194
|
+
...formData,
|
195
|
+
}
|
196
|
+
console.log('==formData', data)
|
197
|
+
await runLogic('暂时没有实现的logic', data, 'af-apply').then(() => {
|
198
|
+
this.$message.success('操作成功')
|
199
|
+
this.formState = false
|
200
|
+
})
|
201
|
+
},
|
202
|
+
updateFormData (workflowId) {
|
203
|
+
runLogic('queryAgreementAmount', { workflowId: workflowId }, 'af-apply').then((res) => {
|
204
|
+
console.log('>>>> res==', res)
|
205
|
+
this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm({ add_amount: 1200 })
|
206
|
+
})
|
207
|
+
console.log()
|
36
208
|
}
|
37
209
|
}
|
38
210
|
}
|
39
211
|
</script>
|
40
|
-
|
41
|
-
<template>
|
42
|
-
<WorkflowDetail ref="workFlow" @success="success" @nextClick="nextClick"></WorkflowDetail>
|
43
|
-
</template>
|
44
|
-
|
45
|
-
<style scoped lang="less">
|
46
|
-
|
47
|
-
</style>
|
@@ -1,204 +1,132 @@
|
|
1
1
|
<template>
|
2
2
|
<a-card :bordered="false">
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
</
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
@nextClick="nextClick"
|
31
|
-
@x-form-item-emit-func="handleFormItemEvent"
|
32
|
-
>
|
33
|
-
</WorkflowDetail>
|
34
|
-
<address-select ref="addressSelect" @setAddress="setForm"></address-select>
|
35
|
-
<!-- 协议作废功能 -->
|
36
|
-
<a-modal
|
37
|
-
v-model="formState"
|
38
|
-
:dialog-style="{ top: '5rem' }"
|
39
|
-
:z-index="1001"
|
40
|
-
title="作废"
|
41
|
-
:destroyOnClose="true"
|
42
|
-
width="55vw">
|
43
|
-
<x-add-native-form
|
44
|
-
ref="xCancelForm"
|
45
|
-
@onSubmit="submit"
|
46
|
-
/>
|
47
|
-
<template #footer>
|
48
|
-
<a-button key="back" @click="formState = false">取消</a-button>
|
49
|
-
<a-button key="submit" type="primary" :loading="submitLoading" @click="formSubmit">确认</a-button>
|
50
|
-
</template>
|
51
|
-
</a-modal>
|
3
|
+
<a-tabs default-active-key="1">
|
4
|
+
<!-- 业务审核 Tab -->
|
5
|
+
<a-tab-pane key="1" tab="业务审核">
|
6
|
+
<x-form-table
|
7
|
+
title="业务审核"
|
8
|
+
:queryParamsName="queryParamsName"
|
9
|
+
:fixedAddForm="fixedAddForm"
|
10
|
+
:fixedQueryForm="fixedQueryForm"
|
11
|
+
@audit="audit"
|
12
|
+
serviceName="af-revenue"
|
13
|
+
ref="xFormTable">
|
14
|
+
</x-form-table>
|
15
|
+
<WorkflowDetail ref="workFlow" @success="confirmAudit" @nextClick="nextClick"></WorkflowDetail>
|
16
|
+
</a-tab-pane>
|
17
|
+
|
18
|
+
<!-- 我负责的 Tab -->
|
19
|
+
<a-tab-pane key="2" tab="我参与的">
|
20
|
+
<x-form-table
|
21
|
+
title="我参与的业务"
|
22
|
+
:queryParamsName="queryParamsName2"
|
23
|
+
:fixedQueryForm="fixedQueryForm2"
|
24
|
+
@check="check"
|
25
|
+
serviceName="af-revenue"
|
26
|
+
ref="xFormTable">
|
27
|
+
</x-form-table>
|
28
|
+
</a-tab-pane>
|
29
|
+
</a-tabs>
|
52
30
|
</a-card>
|
53
31
|
</template>
|
54
32
|
|
55
33
|
<script>
|
34
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
|
56
35
|
import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
|
57
|
-
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
58
36
|
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
59
|
-
import
|
37
|
+
import XDescriptions from '@vue2-client/base-client/components/common/XDescriptions/XDescriptions.vue'
|
60
38
|
import { mapState } from 'vuex'
|
61
|
-
import
|
39
|
+
import { runLogic } from '@vue2-client/services/api/common'
|
62
40
|
|
63
41
|
export default {
|
64
|
-
name: '
|
42
|
+
name: 'UnitManage',
|
65
43
|
components: {
|
66
|
-
XFormTable,
|
67
|
-
XAddNativeForm,
|
68
|
-
WorkflowDetail,
|
69
|
-
AddressSelect
|
70
|
-
},
|
71
|
-
provide () {
|
72
|
-
return {
|
73
|
-
generalFunction: {
|
74
|
-
setCancel: this.setCancel,
|
75
|
-
}
|
76
|
-
}
|
44
|
+
XFormTable, XDescriptions, XAddNativeForm, WorkflowDetail
|
77
45
|
},
|
78
46
|
data () {
|
79
47
|
return {
|
80
|
-
//
|
81
|
-
queryParamsName: '
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
48
|
+
// 查询配置名称
|
49
|
+
queryParamsName: 'businessAuditCRUD',
|
50
|
+
queryParamsName2: 'participatedCRUD',
|
51
|
+
// 新增表单固定值
|
52
|
+
fixedAddForm: {},
|
53
|
+
fixedQueryForm: {},
|
54
|
+
fixedQueryForm2: {},
|
55
|
+
// 页面宽度
|
56
|
+
screenWidth: document.documentElement.clientWidth,
|
57
|
+
// 是否显示详情抽屉
|
58
|
+
detailVisible: false
|
87
59
|
}
|
88
60
|
},
|
89
|
-
|
90
|
-
|
61
|
+
created () {
|
62
|
+
},
|
63
|
+
mounted () {
|
64
|
+
this.fixedQueryForm = {
|
65
|
+
ws_f_handler: this.currUser.name
|
66
|
+
}
|
67
|
+
this.fixedQueryForm2 = {
|
68
|
+
a_f_handler: this.currUser.name
|
69
|
+
}
|
91
70
|
},
|
92
71
|
methods: {
|
93
|
-
addApply () {
|
94
|
-
console.log('打开了吗')
|
95
|
-
this.applyAddFlag = true
|
96
|
-
this.$nextTick(
|
97
|
-
() => {
|
98
|
-
getConfigByName('addApplyForm', 'af-apply', (res) => {
|
99
|
-
this.$refs.xForm.init({
|
100
|
-
businessType: '新增',
|
101
|
-
title: '发起报建',
|
102
|
-
...res
|
103
|
-
})
|
104
|
-
})
|
105
|
-
}
|
106
|
-
)
|
107
|
-
},
|
108
|
-
applySubmit (formData) {
|
109
|
-
runLogic('addApply', formData).then(
|
110
|
-
res => {
|
111
|
-
this.$message.success('发起报建成功')
|
112
|
-
this.$refs.xFormTable.refreshTable(true)
|
113
|
-
this.applyAddFlag = false
|
114
|
-
}
|
115
|
-
).catch(() => {
|
116
|
-
this.applyAddFlag = false
|
117
|
-
})
|
118
|
-
},
|
119
|
-
success () {
|
120
|
-
console.log('完工')
|
121
|
-
},
|
122
|
-
toDetail (record, id) {
|
123
|
-
this.$refs.workFlow.init({
|
124
|
-
workflowId: record.ab_f_workflow_id,
|
125
|
-
stepId: record.ws_f_step_id
|
126
|
-
})
|
127
|
-
},
|
128
|
-
handleFormItemEvent (func, data, value) {
|
129
|
-
console.log('打印一下:', func, data, value)
|
130
|
-
if (func === 'selectAddress') {
|
131
|
-
this.$refs.addressSelect.setFormShow()
|
132
|
-
}
|
133
|
-
},
|
134
|
-
setForm (record) {
|
135
|
-
this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
|
136
|
-
},
|
137
72
|
nextClick ({ form, formStep, workflowId }) {
|
138
73
|
console.log('success', form, formStep, workflowId)
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
74
|
+
if (formStep === '管理员审核') {
|
75
|
+
const data = {
|
76
|
+
workflowId,
|
77
|
+
form
|
78
|
+
}
|
79
|
+
runLogic('auditFinish', { data: data }, 'af-revenue').then(
|
80
|
+
res => {
|
81
|
+
if (res) {
|
82
|
+
this.$message.success('审核完成!!!')
|
83
|
+
this.formModalVisible = false
|
84
|
+
this.$refs.xFormTable.refreshTable(true)
|
85
|
+
}
|
86
|
+
}
|
87
|
+
)
|
143
88
|
}
|
144
|
-
|
89
|
+
},
|
90
|
+
confirmAudit (param) {
|
91
|
+
runLogic('auditFinish', { data: param }, 'af-revenue').then(
|
145
92
|
res => {
|
146
93
|
if (res) {
|
147
|
-
|
94
|
+
this.$message.success('审核完成!!!')
|
95
|
+
this.formModalVisible = false
|
148
96
|
this.$refs.xFormTable.refreshTable(true)
|
149
97
|
}
|
150
98
|
}
|
151
99
|
)
|
152
100
|
},
|
153
|
-
|
154
|
-
|
155
|
-
this.
|
156
|
-
this.
|
157
|
-
this.$
|
158
|
-
|
159
|
-
if (this.$refs.xCancelForm) {
|
160
|
-
this.$refs.xCancelForm.init({
|
161
|
-
formItems: config.formJson,
|
162
|
-
title: '补充协议作废',
|
163
|
-
businessType: '修改',
|
164
|
-
showSubmitBtn: false,
|
165
|
-
...config
|
166
|
-
})
|
167
|
-
if (this.$refs.xCancelForm) {
|
168
|
-
console.log(record)
|
169
|
-
// this.$refs.xCancelForm.setForm(recordData)
|
170
|
-
}
|
171
|
-
} else {
|
172
|
-
console.error('xCancelForm组件未加载完成')
|
173
|
-
// 延迟重试
|
174
|
-
setTimeout(() => {
|
175
|
-
this.setCancel(record)
|
176
|
-
}, 100)
|
177
|
-
}
|
178
|
-
})
|
101
|
+
audit (record, id, type) {
|
102
|
+
console.log(record, id, type)
|
103
|
+
console.log(this.$refs.workFlow)
|
104
|
+
this.detailVisible = true
|
105
|
+
this.$refs.workFlow.init({
|
106
|
+
workflowId: record.w_id
|
179
107
|
})
|
180
108
|
},
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
this.$message.error('表单验证失败,请检查填写内容')
|
188
|
-
} finally {
|
189
|
-
this.submitLoading = false
|
190
|
-
}
|
191
|
-
},
|
192
|
-
async submit (formData) {
|
193
|
-
const data = {
|
194
|
-
...formData,
|
195
|
-
}
|
196
|
-
console.log('==formData', data)
|
197
|
-
await runLogic('暂时没有实现的logic', data, 'af-apply').then(() => {
|
198
|
-
this.$message.success('操作成功')
|
199
|
-
this.formState = false
|
109
|
+
check (record, id, type) {
|
110
|
+
console.log(record, id, type)
|
111
|
+
console.log(this.$refs.workFlow)
|
112
|
+
this.detailVisible = true
|
113
|
+
this.$refs.workFlow.init({
|
114
|
+
workflowId: record.a_id
|
200
115
|
})
|
116
|
+
},
|
117
|
+
onClose () {
|
118
|
+
this.detailVisible = false
|
201
119
|
}
|
202
|
-
}
|
120
|
+
},
|
121
|
+
computed: {
|
122
|
+
...mapState('account', { currUser: 'user' }),
|
123
|
+
...mapState('setting', { isMobile: 'isMobile' })
|
124
|
+
},
|
203
125
|
}
|
204
126
|
</script>
|
127
|
+
|
128
|
+
<style scoped lang="less">
|
129
|
+
:deep(.ant-statistic-content-value) {
|
130
|
+
color: @primary-color;
|
131
|
+
}
|
132
|
+
</style>
|
@@ -1051,39 +1051,34 @@ export default {
|
|
1051
1051
|
formCompletedDataPreview = JSON.parse(JSON.stringify(this.formCompletedData))
|
1052
1052
|
// 使用字段定义中内容,将回显数据的列名,替换为定义的中文名
|
1053
1053
|
// 调整逻辑:formData中只显示流程配置表单中定义过的显示列,多余冗余的存储列不进行页面展示
|
1054
|
-
const
|
1054
|
+
const formDataArr = []
|
1055
|
+
const dataObj = formCompletedDataPreview.data || {}
|
1055
1056
|
const currentStepDefine = this.stepsDefine.find(item => item.id === stepId)
|
1056
1057
|
const isKeyHandle = currentStepDefine?.properties?.form?.isKeyHandle || false
|
1057
|
-
for (
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
if (item.value === formData[key]) {
|
1068
|
-
formData[stepDefine.name] = item.label
|
1069
|
-
break
|
1070
|
-
}
|
1071
|
-
}
|
1072
|
-
} else {
|
1073
|
-
formData[stepDefine.name] = formCompletedDataPreview.data[key]
|
1074
|
-
}
|
1075
|
-
}
|
1076
|
-
// if (key !== stepDefine.name) {
|
1077
|
-
// delete formData[key]
|
1078
|
-
// }
|
1079
|
-
break
|
1058
|
+
for (let i = 0; i < this.targetStepDefine.length; i++) {
|
1059
|
+
const stepDefine = this.targetStepDefine[i]
|
1060
|
+
const key = this.getRealKey(stepDefine.model, isKeyHandle)
|
1061
|
+
if (Object.prototype.hasOwnProperty.call(dataObj, key)) {
|
1062
|
+
let value = dataObj[key]
|
1063
|
+
// 字典值处理
|
1064
|
+
if (stepDefine.formType === 'select' && stepDefine.selectType === 'key') {
|
1065
|
+
const dictList = this.$appdata.getDictionaryList(stepDefine.selectKey)
|
1066
|
+
const dictItem = dictList.find(item => item.value === value)
|
1067
|
+
value = dictItem ? dictItem.label : value
|
1080
1068
|
}
|
1069
|
+
formDataArr.push({ label: stepDefine.name, value })
|
1081
1070
|
}
|
1082
1071
|
}
|
1083
|
-
|
1084
|
-
|
1072
|
+
// 如果一个都没匹配上,兼容旧逻辑:把原对象转成数组
|
1073
|
+
if (formDataArr.length === 0 && dataObj && typeof dataObj === 'object') {
|
1074
|
+
for (const key in dataObj) {
|
1075
|
+
if (Object.prototype.hasOwnProperty.call(dataObj, key)) {
|
1076
|
+
formDataArr.push({ label: key, value: dataObj[key] })
|
1077
|
+
}
|
1078
|
+
}
|
1085
1079
|
}
|
1086
|
-
|
1080
|
+
formCompletedDataPreview.data = formDataArr.length > 0 ? formDataArr : null
|
1081
|
+
if (!formCompletedDataPreview.data) {
|
1087
1082
|
formCompletedDataPreview.data = null
|
1088
1083
|
}
|
1089
1084
|
// 备注
|
@@ -11,12 +11,12 @@
|
|
11
11
|
填写历史
|
12
12
|
</p>
|
13
13
|
<a-descriptions-item
|
14
|
-
v-for="(
|
15
|
-
:key="
|
16
|
-
v-show="
|
14
|
+
v-for="(item, idx) in formCompletedDataPreview.data"
|
15
|
+
:key="item.label || idx"
|
16
|
+
v-show="item.label !== '附件上传' && item.label !== '__expressionRs'"
|
17
17
|
>
|
18
|
-
<span slot="label" style="color: #000">{{
|
19
|
-
<div style="white-space: pre-wrap">{{ value }}</div>
|
18
|
+
<span slot="label" style="color: #000">{{ item.label }}</span>
|
19
|
+
<div style="white-space: pre-wrap">{{ item.value }}</div>
|
20
20
|
</a-descriptions-item>
|
21
21
|
</a-descriptions>
|
22
22
|
<a-descriptions
|