vue2-client 1.15.2 → 1.15.3
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/XFormTable/XFormTable.vue +7 -0
- package/src/base-client/components/common/XFormTable/demo.vue +2 -2
- package/src/base-client/components/common/XTable/XTable.vue +18 -2
- package/src/pages/WorkflowDetail/WorkFlowDemo2.vue +34 -7
- package/src/pages/addressSelect/addressDemo.vue +24 -24
package/package.json
CHANGED
@@ -200,6 +200,13 @@ export default {
|
|
200
200
|
return { id: null, name: 'Guest' }
|
201
201
|
},
|
202
202
|
},
|
203
|
+
// 父组件API(通用),对象参数,可给里面任意塞父组件的方法
|
204
|
+
parentAPI: {
|
205
|
+
default: () => {
|
206
|
+
console.warn('getParentsThis is not provided.')
|
207
|
+
return null
|
208
|
+
}
|
209
|
+
}
|
203
210
|
},
|
204
211
|
data () {
|
205
212
|
return {
|
@@ -25,7 +25,7 @@ export default {
|
|
25
25
|
data () {
|
26
26
|
return {
|
27
27
|
// 查询配置文件名
|
28
|
-
queryParamsName: '
|
28
|
+
queryParamsName: 'ChargeQueryCRUD',
|
29
29
|
// 新增表单固定值
|
30
30
|
fixedAddForm: {},
|
31
31
|
// 是否显示详情抽屉
|
@@ -33,7 +33,7 @@ export default {
|
|
33
33
|
// 当前记录
|
34
34
|
record: {},
|
35
35
|
// 选中的行keys
|
36
|
-
selectedKeys: [
|
36
|
+
selectedKeys: [],
|
37
37
|
selected: {
|
38
38
|
keys: [],
|
39
39
|
rows: []
|
@@ -461,7 +461,9 @@ export default {
|
|
461
461
|
clearSelectRowAfterQuery: false,
|
462
462
|
selectedRowModalVisible: false,
|
463
463
|
// 是否禁用右侧操作行为
|
464
|
-
disableAction: false
|
464
|
+
disableAction: false,
|
465
|
+
// 中文字段名列表
|
466
|
+
chineseQueryColumnArray: []
|
465
467
|
}
|
466
468
|
},
|
467
469
|
props: {
|
@@ -743,7 +745,8 @@ export default {
|
|
743
745
|
selectRowMode = 'default',
|
744
746
|
tableSize = 'default',
|
745
747
|
clearSelectRowAfterQuery = false,
|
746
|
-
disableAction = false
|
748
|
+
disableAction = false,
|
749
|
+
chineseQueryColumnArray = []
|
747
750
|
} = params
|
748
751
|
this.showSummary = Object.keys(tableSummaryMap).length > 0
|
749
752
|
if (this.showSummary) {
|
@@ -770,6 +773,10 @@ export default {
|
|
770
773
|
this.showCustomSummary = true
|
771
774
|
this.customSummaryArray = customTableSummaryArray
|
772
775
|
}
|
776
|
+
this.chineseQueryColumnArray = chineseQueryColumnArray
|
777
|
+
if (this.summaryData.length > 0) {
|
778
|
+
this.sortSummaryData()
|
779
|
+
}
|
773
780
|
this.queryParams = queryParams
|
774
781
|
this.tableColumns = JSON.parse(JSON.stringify(tableColumns))
|
775
782
|
if (this.tableColumns.length === 0) {
|
@@ -1386,6 +1393,15 @@ export default {
|
|
1386
1393
|
await Promise.all(promises)
|
1387
1394
|
return this.summaryData
|
1388
1395
|
},
|
1396
|
+
sortSummaryData () {
|
1397
|
+
const result = this.summaryData
|
1398
|
+
// 过滤出 result 中实际存在的 title,并按照 fieldsArray 的顺序排序
|
1399
|
+
this.summaryData = [...result].sort((a, b) => {
|
1400
|
+
const indexA = this.chineseQueryColumnArray.indexOf(a.title)
|
1401
|
+
const indexB = this.chineseQueryColumnArray.indexOf(b.title)
|
1402
|
+
return indexA - indexB
|
1403
|
+
})
|
1404
|
+
},
|
1389
1405
|
showDrawer () {
|
1390
1406
|
if (this.summaryUpdate) {
|
1391
1407
|
this.summaryData.forEach(item => {
|
@@ -1,14 +1,15 @@
|
|
1
1
|
<template>
|
2
2
|
<a-card :bordered="false">
|
3
3
|
<x-form-table
|
4
|
-
title="
|
4
|
+
title="我的工单"
|
5
|
+
ref="xFormTable"
|
5
6
|
:queryParamsName="queryParamsName"
|
6
7
|
:fixed-query-form="{
|
7
8
|
users_f_handler_id: currUser.id,
|
8
9
|
}"
|
9
10
|
@action="toDetail">
|
10
11
|
<template slot="button">
|
11
|
-
<a-button @click="
|
12
|
+
<a-button @click="addApply">
|
12
13
|
<a-icon type="plus"/>
|
13
14
|
发起报建
|
14
15
|
</a-button>
|
@@ -26,6 +27,7 @@
|
|
26
27
|
<WorkflowDetail
|
27
28
|
ref="workFlow"
|
28
29
|
@success="success"
|
30
|
+
@nextClick="nextClick"
|
29
31
|
@x-form-item-emit-func="handleFormItemEvent"
|
30
32
|
>
|
31
33
|
</WorkflowDetail>
|
@@ -66,10 +68,17 @@ export default {
|
|
66
68
|
WorkflowDetail,
|
67
69
|
AddressSelect
|
68
70
|
},
|
71
|
+
provide () {
|
72
|
+
return {
|
73
|
+
parentAPI: {
|
74
|
+
setCancel: this.setCancel,
|
75
|
+
}
|
76
|
+
}
|
77
|
+
},
|
69
78
|
data () {
|
70
79
|
return {
|
71
80
|
// 查询配置文件名
|
72
|
-
queryParamsName: '
|
81
|
+
queryParamsName: 'ApplyProcessCRUD',
|
73
82
|
// 发起报建弹框控制
|
74
83
|
applyAddFlag: false,
|
75
84
|
formState: false,
|
@@ -81,7 +90,8 @@ export default {
|
|
81
90
|
...mapState('account', { currUser: 'user' }),
|
82
91
|
},
|
83
92
|
methods: {
|
84
|
-
|
93
|
+
addApply () {
|
94
|
+
console.log('打开了吗')
|
85
95
|
this.applyAddFlag = true
|
86
96
|
this.$nextTick(
|
87
97
|
() => {
|
@@ -99,6 +109,7 @@ export default {
|
|
99
109
|
runLogic('addApply', formData).then(
|
100
110
|
res => {
|
101
111
|
this.$message.success('发起报建成功')
|
112
|
+
this.$refs.xFormTable.refreshTable(true)
|
102
113
|
this.applyAddFlag = false
|
103
114
|
}
|
104
115
|
).catch(() => {
|
@@ -110,7 +121,7 @@ export default {
|
|
110
121
|
},
|
111
122
|
toDetail (record, id) {
|
112
123
|
this.$refs.workFlow.init({
|
113
|
-
workflowId: record.
|
124
|
+
workflowId: record.ab_f_workflow_id
|
114
125
|
})
|
115
126
|
},
|
116
127
|
handleFormItemEvent (func, data, value) {
|
@@ -120,7 +131,23 @@ export default {
|
|
120
131
|
}
|
121
132
|
},
|
122
133
|
setForm (record) {
|
123
|
-
this.$refs.workFlow.setFormValue({ address: record.f_address })
|
134
|
+
this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
|
135
|
+
},
|
136
|
+
nextClick ({ form, formStep, workflowId }) {
|
137
|
+
console.log('success', form, formStep, workflowId)
|
138
|
+
const data = {
|
139
|
+
workflowId,
|
140
|
+
form,
|
141
|
+
formStep
|
142
|
+
}
|
143
|
+
runLogic('applySubmitAfter', data, 'af-apply').then(
|
144
|
+
res => {
|
145
|
+
if (res) {
|
146
|
+
// this.$message.success('提交成功!')
|
147
|
+
this.$refs.xFormTable.refreshTable(true)
|
148
|
+
}
|
149
|
+
}
|
150
|
+
)
|
124
151
|
},
|
125
152
|
// 协议作废
|
126
153
|
setCancel (record) {
|
@@ -166,7 +193,7 @@ export default {
|
|
166
193
|
...formData,
|
167
194
|
}
|
168
195
|
console.log('==formData', data)
|
169
|
-
await runLogic('
|
196
|
+
await runLogic('暂时没有实现的logic', data, 'af-apply').then(() => {
|
170
197
|
this.$message.success('操作成功')
|
171
198
|
this.formState = false
|
172
199
|
})
|
@@ -1,24 +1,24 @@
|
|
1
|
-
<template>
|
2
|
-
<!-- 测试界面——测试地址选择新增组件-->
|
3
|
-
<div>
|
4
|
-
<a-button @click="open">打开选择地址弹窗</a-button>
|
5
|
-
<address-select :addressShow="showDialog"/>
|
6
|
-
</div>
|
7
|
-
</template>
|
8
|
-
|
9
|
-
<script>
|
10
|
-
import AddressSelect from '@/pages/addressSelect'
|
11
|
-
|
12
|
-
export default {
|
13
|
-
components: { AddressSelect },
|
14
|
-
data: () => ({
|
15
|
-
showDialog: false
|
16
|
-
}),
|
17
|
-
methods: {
|
18
|
-
open () {
|
19
|
-
console.log('打开选择地址弹窗')
|
20
|
-
this.showDialog = true
|
21
|
-
}
|
22
|
-
}
|
23
|
-
}
|
24
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<!-- 测试界面——测试地址选择新增组件-->
|
3
|
+
<div>
|
4
|
+
<a-button @click="open">打开选择地址弹窗</a-button>
|
5
|
+
<address-select :addressShow="showDialog"/>
|
6
|
+
</div>
|
7
|
+
</template>
|
8
|
+
|
9
|
+
<script>
|
10
|
+
import AddressSelect from '@/pages/addressSelect'
|
11
|
+
|
12
|
+
export default {
|
13
|
+
components: { AddressSelect },
|
14
|
+
data: () => ({
|
15
|
+
showDialog: false
|
16
|
+
}),
|
17
|
+
methods: {
|
18
|
+
open () {
|
19
|
+
console.log('打开选择地址弹窗')
|
20
|
+
this.showDialog = true
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
</script>
|