vue2-client 1.14.74 → 1.14.78
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/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +4 -3
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.json +32 -0
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.vue +226 -0
- package/src/base-client/components/his/XQuestionnaire/XQuestionnaireDemo.vue +25 -0
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +36 -79
- package/src/pages/addressSelect/addressDemo.vue +24 -0
- package/src/pages/addressSelect/index.vue +259 -0
- package/src/router/async/router.map.js +3 -1
- package/vue.config.js +2 -2
package/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import AmapPointRendering from './AmapPointRendering'
|
|
2
|
-
|
|
3
|
-
export default AmapPointRendering
|
|
1
|
+
import AmapPointRendering from './AmapPointRendering'
|
|
2
|
+
|
|
3
|
+
export default AmapPointRendering
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import XDetailsView from './XDetailsView'
|
|
2
|
-
|
|
3
|
-
export default XDetailsView
|
|
1
|
+
import XDetailsView from './XDetailsView'
|
|
2
|
+
|
|
3
|
+
export default XDetailsView
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import XFormGroupDetails from './XFormGroupDetails'
|
|
2
|
-
|
|
3
|
-
export default XFormGroupDetails
|
|
1
|
+
import XFormGroupDetails from './XFormGroupDetails'
|
|
2
|
+
|
|
3
|
+
export default XFormGroupDetails
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
<template v-else-if="cell.type === 'slot'">
|
|
27
27
|
<template
|
|
28
|
-
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select' ,'x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders', 'x-shift-schedule','x-charge'].includes(cell.slotType)">
|
|
28
|
+
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select' ,'x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders', 'x-shift-schedule','x-charge','x-questionnaire'].includes(cell.slotType)">
|
|
29
29
|
<component
|
|
30
30
|
:is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
|
|
31
31
|
:key="cellIndex"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
</template>
|
|
64
64
|
<template v-else-if="cell.type === 'slot'">
|
|
65
65
|
<template
|
|
66
|
-
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse', 'x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select','x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders', 'x-shift-schedule','x-charge'].includes(cell.slotType)">
|
|
66
|
+
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse', 'x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select','x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders', 'x-shift-schedule','x-charge','x-questionnaire'].includes(cell.slotType)">
|
|
67
67
|
<component
|
|
68
68
|
:is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
|
|
69
69
|
:key="cellIndex"
|
|
@@ -126,7 +126,8 @@ export default {
|
|
|
126
126
|
XTreeRows: () => import('@vue2-client/base-client/components/his/XTreeRows/XTreeRows.vue'),
|
|
127
127
|
XThreeTestOrders: () => import('@vue2-client/base-client/components/his/threeTestOrders/threeTestOrders.vue'),
|
|
128
128
|
XShiftSchedule: () => import('@vue2-client/base-client/components/his/XShiftSchedule/XShiftSchedule.vue'),
|
|
129
|
-
XCharge: () => import('@vue2-client/base-client/components/his/XCharge/XCharge.vue')
|
|
129
|
+
XCharge: () => import('@vue2-client/base-client/components/his/XCharge/XCharge.vue'),
|
|
130
|
+
XQuestionnaire: () => import('@vue2-client/base-client/components/his/XQuestionnaire/XQuestionnaire.vue')
|
|
130
131
|
},
|
|
131
132
|
props: {
|
|
132
133
|
// 每一行的配置
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"config":{
|
|
3
|
+
"title":"",
|
|
4
|
+
"split":""
|
|
5
|
+
},
|
|
6
|
+
"content": [
|
|
7
|
+
{
|
|
8
|
+
"key":"", //单行记录的标识
|
|
9
|
+
"style":"",//居中方式
|
|
10
|
+
"item": [
|
|
11
|
+
{
|
|
12
|
+
"type":"",
|
|
13
|
+
"key": "",
|
|
14
|
+
"value": {},
|
|
15
|
+
"configName":"" // 通过后端获配置单选多选
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
//常量取值 checkBox多选
|
|
22
|
+
type [radio,selectionBox,text,input,time,describe]
|
|
23
|
+
justifyContent = ['flex-start', 'flex-end', 'center', 'space-between', 'space-around']
|
|
24
|
+
|
|
25
|
+
"results": [{
|
|
26
|
+
"row_key": "",
|
|
27
|
+
"key": "value"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="list-wrapper">
|
|
3
|
+
<a-list size="large"
|
|
4
|
+
:data-source="data"
|
|
5
|
+
itemLayout="horizontal"
|
|
6
|
+
class="list-container"
|
|
7
|
+
ref="listRef"
|
|
8
|
+
split="config.split"
|
|
9
|
+
>
|
|
10
|
+
<template v-if="config.header" #header>
|
|
11
|
+
<div >{{ config.header }}</div>
|
|
12
|
+
</template>
|
|
13
|
+
<a-list-item
|
|
14
|
+
slot="renderItem"
|
|
15
|
+
slot-scope="item, index">
|
|
16
|
+
<div
|
|
17
|
+
class="row-item"
|
|
18
|
+
:style="{ justifyContent: getFlexJustify(item.style) }"
|
|
19
|
+
>
|
|
20
|
+
<template v-for="(column, idx) in item.item">
|
|
21
|
+
<template v-if="column.type === 'selectionBox'">
|
|
22
|
+
<a-checkbox @change="handleChange($event,column,index)" v-model="column.value" :key="`row-${index}-item-${idx}`" :class="['column-item']"></a-checkbox>
|
|
23
|
+
</template>
|
|
24
|
+
<template v-else-if="column.type === 'input'">
|
|
25
|
+
<a-input @change="handleChange($event,column,index)" :key="`row-${index}-item-${idx}`" :class="['column-item','item-input']" v-model="column.value" />
|
|
26
|
+
</template>
|
|
27
|
+
<template v-else-if="column.type === 'radio'">
|
|
28
|
+
<x-radio
|
|
29
|
+
:class="['column-item']"
|
|
30
|
+
:key="`row-${index}-item-${idx}`"
|
|
31
|
+
:queryParamsName="column.configName"
|
|
32
|
+
@change="handleChange($event,column,index)">
|
|
33
|
+
</x-radio>
|
|
34
|
+
</template>
|
|
35
|
+
<template v-else-if="column.type === 'time'">
|
|
36
|
+
<x-time-select :key="`row-${index}-item-${idx}`" :class="['column-item']" @change="handleChange($event,column,index)" :queryParamsName="column.configName">
|
|
37
|
+
</x-time-select>
|
|
38
|
+
</template>
|
|
39
|
+
<template v-else-if="column.type === 'text'">
|
|
40
|
+
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-text']"> {{ column.value }} </span>
|
|
41
|
+
</template>
|
|
42
|
+
<template v-else-if="column.type === 'describe'">
|
|
43
|
+
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-describe']"> {{ column.value }} </span>
|
|
44
|
+
</template>
|
|
45
|
+
<template v-else>
|
|
46
|
+
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-text']"> {{ column.value }} </span>
|
|
47
|
+
</template>
|
|
48
|
+
</template>
|
|
49
|
+
</div>
|
|
50
|
+
</a-list-item>
|
|
51
|
+
</a-list>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script>
|
|
56
|
+
|
|
57
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
58
|
+
import XRadio from '@vue2-client/base-client/components/his/XRadio/XRadio'
|
|
59
|
+
import XTimeSelect from '@vue2-client/base-client/components/his/XTimeSelect/XTimeSelect'
|
|
60
|
+
export default {
|
|
61
|
+
name: 'XQuestionnaire',
|
|
62
|
+
props: {
|
|
63
|
+
queryParamsName: {
|
|
64
|
+
type: Object,
|
|
65
|
+
default: null
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
inject: ['getComponentByName'],
|
|
69
|
+
components: {
|
|
70
|
+
XTimeSelect,
|
|
71
|
+
XRadio
|
|
72
|
+
},
|
|
73
|
+
data () {
|
|
74
|
+
return {
|
|
75
|
+
data: [],
|
|
76
|
+
config: {
|
|
77
|
+
split: true,
|
|
78
|
+
header: null
|
|
79
|
+
},
|
|
80
|
+
results: [],
|
|
81
|
+
mapping: [] // 行索引 results数据所在的行
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
created () {
|
|
85
|
+
this.getData(this.queryParamsName)
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
// 获取配置
|
|
89
|
+
async getData (queryParamsName) {
|
|
90
|
+
const that = this
|
|
91
|
+
getConfigByName(queryParamsName, 'af-his', res => {
|
|
92
|
+
if (!res.config.split) {
|
|
93
|
+
res.config.split = true
|
|
94
|
+
}
|
|
95
|
+
that.config = res.config
|
|
96
|
+
that.config = {
|
|
97
|
+
...that.config,
|
|
98
|
+
...res.config
|
|
99
|
+
}
|
|
100
|
+
that.data = res.content || []
|
|
101
|
+
// 将又返回值的数据创建到results
|
|
102
|
+
for (let i = 0; i < res.content.length; i++) {
|
|
103
|
+
const fields = res.content[i]
|
|
104
|
+
if (!fields.item) {
|
|
105
|
+
continue
|
|
106
|
+
}
|
|
107
|
+
const value = {}
|
|
108
|
+
let hasValidData = false // 标识是否有有效数据
|
|
109
|
+
for (let j = 0; j < fields.item.length; j++) {
|
|
110
|
+
const field = fields.item[j]
|
|
111
|
+
if (field.type === 'selectionBox' || field.type === 'input' || field.type === 'radio' || field.type === 'time') {
|
|
112
|
+
value[field.key] = field.value
|
|
113
|
+
hasValidData = true
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (hasValidData) {
|
|
117
|
+
this.mapping.push(this.results.length)
|
|
118
|
+
value.row_key = fields.key
|
|
119
|
+
this.results.push(value)
|
|
120
|
+
} else {
|
|
121
|
+
this.mapping.push(undefined)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
},
|
|
126
|
+
refreshList (param) {
|
|
127
|
+
this.getData(this.queryParamsName, param)
|
|
128
|
+
},
|
|
129
|
+
// 行数据排量方式
|
|
130
|
+
getFlexJustify (style) {
|
|
131
|
+
const validStyles = [
|
|
132
|
+
'flex-start', 'flex-end', 'center',
|
|
133
|
+
'space-between', 'space-around'
|
|
134
|
+
]
|
|
135
|
+
return validStyles.includes(style) ? style : 'flex-start'
|
|
136
|
+
},
|
|
137
|
+
// 数据发生改变--将修改后的值填充到results
|
|
138
|
+
handleChange (e, column, rowIndex) {
|
|
139
|
+
const resultIndex = this.mapping[rowIndex]
|
|
140
|
+
if (resultIndex === undefined) return
|
|
141
|
+
if (column.type === 'selectionBox') {
|
|
142
|
+
this.results[resultIndex][column.key] = e.target.checked
|
|
143
|
+
} else if (column.type === 'input') {
|
|
144
|
+
this.results[resultIndex][column.key] = column.value
|
|
145
|
+
} else if (column.type === 'radio' || column.type === 'time') {
|
|
146
|
+
this.results[resultIndex][column.key] = e
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
watch: {
|
|
151
|
+
fixedQueryForm: {
|
|
152
|
+
deep: true,
|
|
153
|
+
handler (val) {
|
|
154
|
+
this.refreshList(val)
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
beforeDestroy () {
|
|
159
|
+
this.clearAllTimers()
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
</script>
|
|
163
|
+
|
|
164
|
+
<style scoped>
|
|
165
|
+
.list-wrapper {
|
|
166
|
+
max-height: 240px;
|
|
167
|
+
overflow-y: auto;
|
|
168
|
+
padding-right: 2px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.list-container {
|
|
172
|
+
width: 100%;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* 自定义滚动条样式 */
|
|
176
|
+
.list-wrapper::-webkit-scrollbar {
|
|
177
|
+
width: 6px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.list-wrapper::-webkit-scrollbar-thumb {
|
|
181
|
+
background-color: #d9d9d9;
|
|
182
|
+
border-radius: 3px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.list-wrapper::-webkit-scrollbar-track {
|
|
186
|
+
background-color: #f0f0f0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* header样式 */
|
|
190
|
+
.list-wrapper ::v-deep .ant-list-header {
|
|
191
|
+
background-color: #F4F4F4; /* 自定义背景色 */
|
|
192
|
+
display: flex;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
}
|
|
195
|
+
.list-wrapper ::v-deep .x-radio-item {
|
|
196
|
+
margin-bottom: 0;
|
|
197
|
+
}
|
|
198
|
+
.list-wrapper ::v-deep .x-radio-item-container{
|
|
199
|
+
padding: 0;
|
|
200
|
+
}
|
|
201
|
+
.list-wrapper ::v-deep span.ant-radio + *{
|
|
202
|
+
padding: 0;
|
|
203
|
+
}
|
|
204
|
+
.list-wrapper ::v-deep .x-time-select {
|
|
205
|
+
width: auto !important;
|
|
206
|
+
}
|
|
207
|
+
/*每一行的整体样式*/
|
|
208
|
+
.row-item{
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
}
|
|
212
|
+
/*行中每一列的数据*/
|
|
213
|
+
.column-item{
|
|
214
|
+
margin-left: 10px;
|
|
215
|
+
}
|
|
216
|
+
.item-text {
|
|
217
|
+
color: black;
|
|
218
|
+
}
|
|
219
|
+
.item-describe {
|
|
220
|
+
color: #808080 ;
|
|
221
|
+
}
|
|
222
|
+
.item-input{
|
|
223
|
+
flex: 1;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import XQuestionnaire from './XQuestionnaire.vue'
|
|
3
|
+
import XRadio from '../XRadio/XRadio.vue'
|
|
4
|
+
export default {
|
|
5
|
+
name: 'XList2Demo',
|
|
6
|
+
components: {
|
|
7
|
+
XQuestionnaire,
|
|
8
|
+
XRadio
|
|
9
|
+
},
|
|
10
|
+
data () {
|
|
11
|
+
return {
|
|
12
|
+
queryParamsName: 'surgeryRiskAssessConfig4'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<x-questionnaire :queryParamsName="queryParamsName">
|
|
20
|
+
</x-questionnaire>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<style scoped>
|
|
24
|
+
|
|
25
|
+
</style>
|
|
@@ -1,90 +1,47 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-card :bordered="false">
|
|
3
|
-
<x-form-table
|
|
4
|
-
title="示例页面"
|
|
5
|
-
:queryParamsName="queryParamsName"
|
|
6
|
-
:fixed-query-form="{
|
|
7
|
-
users_f_handler_id: currUser.id,
|
|
8
|
-
}"
|
|
9
|
-
@action="toDetail">
|
|
10
|
-
<template slot="button">
|
|
11
|
-
<a-button @click="add">
|
|
12
|
-
<a-icon type="plus"/>
|
|
13
|
-
发起报建
|
|
14
|
-
</a-button>
|
|
15
|
-
</template>
|
|
16
|
-
</x-form-table>
|
|
17
|
-
<a-modal
|
|
18
|
-
v-model="applyAddFlag"
|
|
19
|
-
:footer="null"
|
|
20
|
-
:dialog-style="{ top: '5rem' }"
|
|
21
|
-
:z-index="1001"
|
|
22
|
-
title="发起报建"
|
|
23
|
-
:destroyOnClose="true">
|
|
24
|
-
<x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
|
|
25
|
-
</a-modal>
|
|
26
|
-
<WorkflowDetail ref="workFlow" @success="success"></WorkflowDetail>
|
|
27
|
-
</a-card>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
1
|
<script>
|
|
31
2
|
import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
|
|
32
|
-
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
33
|
-
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
|
34
|
-
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
35
|
-
import { mapState } from 'vuex'
|
|
36
3
|
|
|
37
4
|
export default {
|
|
38
|
-
name: '
|
|
39
|
-
components: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
data () {
|
|
45
|
-
return {
|
|
46
|
-
// 查询配置文件名
|
|
47
|
-
queryParamsName: 'applyCRUD',
|
|
48
|
-
// 发起报建弹框控制
|
|
49
|
-
applyAddFlag: false
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
computed: {
|
|
53
|
-
...mapState('account', { currUser: 'user' }),
|
|
5
|
+
name: 'WorkFlowDemo',
|
|
6
|
+
components: { WorkflowDetail },
|
|
7
|
+
mounted () {
|
|
8
|
+
this.$refs.workFlow.init({
|
|
9
|
+
workflowId: '11'
|
|
10
|
+
})
|
|
54
11
|
},
|
|
55
12
|
methods: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
...res
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
},
|
|
70
|
-
applySubmit (formData) {
|
|
71
|
-
runLogic('addApply', formData).then(
|
|
72
|
-
res => {
|
|
73
|
-
this.$message.success('发起报建成功')
|
|
74
|
-
this.applyAddFlag = false
|
|
75
|
-
}
|
|
76
|
-
).catch(() => {
|
|
77
|
-
this.applyAddFlag = false
|
|
78
|
-
})
|
|
13
|
+
/**
|
|
14
|
+
* 流程详情页成功
|
|
15
|
+
* @param note 备注信息
|
|
16
|
+
* @param form 表单信息
|
|
17
|
+
* @param workflowId
|
|
18
|
+
*/
|
|
19
|
+
success ({ note, form, workflowId }) {
|
|
20
|
+
console.log('success', note, form, workflowId)
|
|
79
21
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
22
|
+
/**
|
|
23
|
+
* 流程详情页成功
|
|
24
|
+
* @param note 备注信息
|
|
25
|
+
* @param form 表单信息
|
|
26
|
+
* @param workflowId 工作流id
|
|
27
|
+
* @param fromStepId 起ID
|
|
28
|
+
* @param toStepId 往ID
|
|
29
|
+
* @param successStepId 完成步骤id
|
|
30
|
+
* @param successStep 完成步骤名称
|
|
31
|
+
* @param fromStep 起步骤名称
|
|
32
|
+
* @param toStep 往步骤名称
|
|
33
|
+
*/
|
|
34
|
+
nextClick ({ note, form, workflowId, fromStepId, toStepId, fromStep, toStep, successStepId, successStep }) {
|
|
35
|
+
console.log('success', note, form, workflowId, fromStepId, toStepId, fromStep, toStep, successStepId, successStep)
|
|
87
36
|
}
|
|
88
37
|
}
|
|
89
38
|
}
|
|
90
39
|
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<WorkflowDetail ref="workFlow" @success="success" @nextClick="nextClick"></WorkflowDetail>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<style scoped lang="less">
|
|
46
|
+
|
|
47
|
+
</style>
|
|
@@ -0,0 +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>
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable'
|
|
3
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
4
|
+
import { mapState } from 'vuex'
|
|
5
|
+
export default {
|
|
6
|
+
components: {
|
|
7
|
+
XFormTable
|
|
8
|
+
},
|
|
9
|
+
props: {
|
|
10
|
+
addressShow: {
|
|
11
|
+
required: true,
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
watch: {
|
|
17
|
+
addressShow (val) {
|
|
18
|
+
this.selectAddressVisible = val
|
|
19
|
+
},
|
|
20
|
+
'form.f_address_type' (newVal, oldVal) {
|
|
21
|
+
this.onAddressTypeChange(newVal, oldVal)
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
data () {
|
|
25
|
+
return {
|
|
26
|
+
selectAddressVisible: false,
|
|
27
|
+
addAddressFlag: false,
|
|
28
|
+
form: {
|
|
29
|
+
f_address_type: '',
|
|
30
|
+
f_residential_area_id: '',
|
|
31
|
+
f_residential_area: '',
|
|
32
|
+
f_iscity: ''
|
|
33
|
+
},
|
|
34
|
+
addressModel: [
|
|
35
|
+
{
|
|
36
|
+
expression: '{f_building}楼号{f_unit}单元{f_floor}楼层{f_room}门牌号',
|
|
37
|
+
label: '城市',
|
|
38
|
+
value: '城市'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
expression: '{f_building}组{f_unit}号',
|
|
42
|
+
label: '乡镇',
|
|
43
|
+
value: '乡镇'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
expression: '{f_address}',
|
|
47
|
+
label: '自定义',
|
|
48
|
+
value: '自定义'
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
labelCol: { span: 4 },
|
|
52
|
+
wrapperCol: { span: 20 },
|
|
53
|
+
formItems: [],
|
|
54
|
+
areaList: [],
|
|
55
|
+
signContractVisible: false
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
methods: {
|
|
59
|
+
selAddress (record) {
|
|
60
|
+
// 给表单赋值
|
|
61
|
+
const form = {
|
|
62
|
+
f_address: record.tua_f_address,
|
|
63
|
+
f_address_id: record.tua_id
|
|
64
|
+
}
|
|
65
|
+
console.log('选择了地址是', form)
|
|
66
|
+
this.$emit('selAddress', form)
|
|
67
|
+
this.selectAddressVisible = false
|
|
68
|
+
},
|
|
69
|
+
addAddress () {
|
|
70
|
+
// 获取地址模式配置
|
|
71
|
+
getConfigByName('addressTypeDic', 'af-revenue', (res) => {
|
|
72
|
+
// 地址模式赋值
|
|
73
|
+
if (res.value?.length) {
|
|
74
|
+
this.addressModel = res.value
|
|
75
|
+
}
|
|
76
|
+
// 赋值默认地址模式
|
|
77
|
+
this.form = { f_address_type: this.addressModel[0].value }
|
|
78
|
+
this.addAddressFlag = true
|
|
79
|
+
this.addAddressMsg = '添加地址'
|
|
80
|
+
this.onAddressTypeChange()
|
|
81
|
+
})
|
|
82
|
+
},
|
|
83
|
+
onAddressTypeChange (newVal, oldVal) {
|
|
84
|
+
const selectedModel = this.addressModel.find(item => item.value === this.form.f_address_type)
|
|
85
|
+
Object.keys(this.form).forEach(key => {
|
|
86
|
+
if (key.endsWith('_suffix')) {
|
|
87
|
+
this.form[key] = ''
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
if (selectedModel) {
|
|
91
|
+
const matches = selectedModel.expression.match(/{(.*?)}([^{}]*)(?={|$)/g)
|
|
92
|
+
this.formItems = matches.map(item => {
|
|
93
|
+
const value = item.match(/{(.*?)}/)[1]
|
|
94
|
+
const label = item.replace(/{.*?}/, '').trim()
|
|
95
|
+
// 处理后缀
|
|
96
|
+
this.form[`${value}_suffix`] = label
|
|
97
|
+
return {
|
|
98
|
+
label: label || (value === 'f_address' ? '' : value), // 如果存在后面的文字,就使用后面的文字作为 label,否则使用原来的值
|
|
99
|
+
value: `${value}`
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
handleSearch (value) {
|
|
105
|
+
this.getAreaList(value)
|
|
106
|
+
},
|
|
107
|
+
getAreaList (value) {
|
|
108
|
+
console.log('搜索小区', this.currUser.orgid)
|
|
109
|
+
runLogic('getAreaListByName', {
|
|
110
|
+
orgId: this.currUser.orgid,
|
|
111
|
+
name: value
|
|
112
|
+
}, 'af-revenue').then(res => {
|
|
113
|
+
console.log(res)
|
|
114
|
+
this.areaList = res
|
|
115
|
+
})
|
|
116
|
+
},
|
|
117
|
+
handleChange (value) {
|
|
118
|
+
this.form.f_residential_area = this.areaList.find(item => item.value === value).label
|
|
119
|
+
console.log(this.form.f_residential_area)
|
|
120
|
+
},
|
|
121
|
+
addressSubmit () {
|
|
122
|
+
if (!this.form.f_residential_area) {
|
|
123
|
+
this.$message.warning('请选择小区')
|
|
124
|
+
return
|
|
125
|
+
}
|
|
126
|
+
this.deleteAddressData()
|
|
127
|
+
runLogic('addAddress', Object.assign({}, this.form, {
|
|
128
|
+
f_address: this.generateAddressString()
|
|
129
|
+
}, {
|
|
130
|
+
orgid: this.currUser.orgid,
|
|
131
|
+
f_orgid: this.currUser.orgid,
|
|
132
|
+
f_orgname: this.currUser.orgs,
|
|
133
|
+
f_depid: this.currUser.depids,
|
|
134
|
+
f_depname: this.currUser.deps,
|
|
135
|
+
f_operatorid: this.currUser.id,
|
|
136
|
+
f_operator: this.currUser.name,
|
|
137
|
+
f_filialeid: this.currUser.orgid
|
|
138
|
+
}), 'af-revenue').then(res => {
|
|
139
|
+
if (res) {
|
|
140
|
+
this.$message.success(`${this.addAddressMsg}成功`)
|
|
141
|
+
this.addAddressFlag = false
|
|
142
|
+
this.refresh()
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
},
|
|
146
|
+
// 删除 addressData 中存在 addressModel 不存在的字段
|
|
147
|
+
deleteAddressData () {
|
|
148
|
+
// 目前只需要检查这几个key
|
|
149
|
+
const keys = ['f_building', 'f_unit', 'f_floor', 'f_room']
|
|
150
|
+
Object.keys(this.form).forEach(key => {
|
|
151
|
+
if (keys.includes(key) && !this.formItems.some(item => item.value === key)) {
|
|
152
|
+
this.form[key] = ''
|
|
153
|
+
this.form[`${key}_suffix`] = ''
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
},
|
|
157
|
+
generateAddressString () {
|
|
158
|
+
const selectedModel = this.addressModel.find(item => item.value === this.form.f_address_type)
|
|
159
|
+
if (selectedModel) {
|
|
160
|
+
let addressString = selectedModel.expression
|
|
161
|
+
this.formItems.forEach(item => {
|
|
162
|
+
const value = this.form[item.value]
|
|
163
|
+
addressString = addressString.replace(`{${item.value}}`, value)
|
|
164
|
+
})
|
|
165
|
+
return addressString
|
|
166
|
+
}
|
|
167
|
+
return ''
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
computed: {
|
|
171
|
+
inputWidth () {
|
|
172
|
+
if (this.formItems.length === 1) {
|
|
173
|
+
return '85%'
|
|
174
|
+
}
|
|
175
|
+
return this.formItems.length ? `${65 / this.formItems.length}%` : '85%'
|
|
176
|
+
},
|
|
177
|
+
...mapState('account', { currUser: 'user' }),
|
|
178
|
+
...mapState('setting', { isMobile: 'isMobile' })
|
|
179
|
+
},
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
</script>
|
|
183
|
+
|
|
184
|
+
<template>
|
|
185
|
+
<div>
|
|
186
|
+
<!-- 地址弹出框 -->
|
|
187
|
+
<a-modal
|
|
188
|
+
v-model="selectAddressVisible"
|
|
189
|
+
:dialog-style="{ top: '30px' }"
|
|
190
|
+
:bodyStyle="{height:'70vh',overflowY:'scroll'}"
|
|
191
|
+
:destroy-on-close="true"
|
|
192
|
+
:z-index="1002"
|
|
193
|
+
title="选择地址"
|
|
194
|
+
:footer="null"
|
|
195
|
+
width="80vw">
|
|
196
|
+
<x-form-table
|
|
197
|
+
title="选择地址"
|
|
198
|
+
queryParamsName="userfiles_sel_address"
|
|
199
|
+
@action="selAddress"
|
|
200
|
+
serviceName="af-revenue"
|
|
201
|
+
:extraHeight="225"
|
|
202
|
+
ref="selAddressXFormTable">
|
|
203
|
+
<template #leftButton="{selectedRows}">
|
|
204
|
+
<a-button
|
|
205
|
+
type="primary"
|
|
206
|
+
:disabled="selectedRows?.length !== 1"
|
|
207
|
+
@click="selAddress(selectedRows[0])"> 选择地址</a-button>
|
|
208
|
+
<a-button
|
|
209
|
+
type="primary"
|
|
210
|
+
@click="addAddress"> 新建地址
|
|
211
|
+
</a-button>
|
|
212
|
+
</template>
|
|
213
|
+
</x-form-table>
|
|
214
|
+
</a-modal>
|
|
215
|
+
<!-- 添加地址 -->
|
|
216
|
+
<a-modal
|
|
217
|
+
v-model="addAddressFlag"
|
|
218
|
+
:dialog-style="{ top: '30px' }"
|
|
219
|
+
:z-index="1005"
|
|
220
|
+
@ok="addressSubmit"
|
|
221
|
+
@cancel="addAddressFlag = false"
|
|
222
|
+
title="新增地址信息"
|
|
223
|
+
:destroyOnClose="true">
|
|
224
|
+
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
225
|
+
<a-form-model-item label="小区">
|
|
226
|
+
<a-select
|
|
227
|
+
show-search
|
|
228
|
+
placeholder="请选择小区"
|
|
229
|
+
option-filter-prop="children"
|
|
230
|
+
@search="handleSearch"
|
|
231
|
+
style="width: 200px"
|
|
232
|
+
@change="handleChange"
|
|
233
|
+
>
|
|
234
|
+
<a-select-option v-for="item in areaList" :value="item.value" :key="item">
|
|
235
|
+
{{ item.label }}
|
|
236
|
+
</a-select-option>
|
|
237
|
+
</a-select>
|
|
238
|
+
</a-form-model-item>
|
|
239
|
+
<a-form-model-item label="地址类型">
|
|
240
|
+
<a-radio-group v-model="form.f_address_type">
|
|
241
|
+
<a-radio :value="item.value" v-for="(item, index) in addressModel" :key="index">
|
|
242
|
+
{{ item.label }}
|
|
243
|
+
</a-radio>
|
|
244
|
+
</a-radio-group>
|
|
245
|
+
</a-form-model-item>
|
|
246
|
+
<a-form-model-item label="详细地址">
|
|
247
|
+
<div v-for="(item, index) in formItems" :key="index" style="display: inline;white-space: nowrap">
|
|
248
|
+
<a-input v-model="form[item.value]" style="display: inline;" :style="{ width: inputWidth }"/>
|
|
249
|
+
<span>{{ item.label }}</span>
|
|
250
|
+
</div>
|
|
251
|
+
</a-form-model-item>
|
|
252
|
+
</a-form-model>
|
|
253
|
+
</a-modal>
|
|
254
|
+
</div>
|
|
255
|
+
</template>
|
|
256
|
+
|
|
257
|
+
<style>
|
|
258
|
+
|
|
259
|
+
</style>
|
|
@@ -55,16 +55,18 @@ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynami
|
|
|
55
55
|
routerResource.example = {
|
|
56
56
|
path: 'example',
|
|
57
57
|
name: '示例主页面',
|
|
58
|
+
// component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
|
|
58
59
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
|
59
60
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|
|
60
61
|
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
|
61
|
-
component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
|
|
62
|
+
// component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
|
|
62
63
|
// component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
63
64
|
// component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
|
|
64
65
|
// component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
|
|
65
66
|
// component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
|
|
66
67
|
// component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
|
|
67
68
|
// component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
|
|
69
|
+
component: () => import('@vue2-client/base-client/components/his/XQuestionnaire/XQuestionnaireDemo.vue'),
|
|
68
70
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
|
69
71
|
// component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
|
|
70
72
|
// component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
|
package/vue.config.js
CHANGED
|
@@ -11,12 +11,12 @@ const productionGzipExtensions = ['js', 'css']
|
|
|
11
11
|
const isProd = process.env.NODE_ENV === 'production'
|
|
12
12
|
|
|
13
13
|
// v4 产品演示
|
|
14
|
-
const v3Server = 'http://
|
|
14
|
+
const v3Server = 'http://aote-office.8866.org:31567'
|
|
15
15
|
// const gateway = 'http://192.168.50.67:31467'
|
|
16
16
|
// const testUpload = 'http://123.60.214.109:8406'
|
|
17
17
|
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
18
18
|
// const revenue = 'http://aote-office.8866.org:31567'
|
|
19
|
-
const revenue = 'http://
|
|
19
|
+
const revenue = 'http://aote-office.8866.org:31567'
|
|
20
20
|
// const OSSServerProd = 'http://192.168.50.67:31351'
|
|
21
21
|
// const testUploadLocal = 'http://127.0.0.1:9001'
|
|
22
22
|
// v3 铜川
|