vue2-client 1.8.3 → 1.8.5
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/.eslintrc.js +1 -0
- package/docs/index.md +2 -1
- package/package.json +5 -4
- package/src/App.vue +3 -89
- package/src/base-client/components/common/AMisRender/index.vue +42 -6
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +3 -3
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1 -1
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +4 -8
- package/src/base-client/components/common/Tree/Tree.vue +149 -0
- package/src/base-client/components/common/Tree/index.js +2 -0
- package/src/base-client/components/common/XCard/XCard.vue +1 -1
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +2 -2
- package/src/base-client/components/common/XFormTable/XFormTable.vue +2 -2
- package/src/base-client/components/common/XStepView/XStepView.vue +492 -0
- package/src/base-client/components/common/XStepView/index.js +3 -0
- package/src/base-client/components/common/XStepView/index.md +31 -0
- package/src/base-client/components/index.js +45 -41
- package/src/bootstrap.js +2 -2
- package/src/config/default/setting.config.js +2 -2
- package/src/main.js +40 -12
- package/src/pages/AMisDemo/AMisDemo.vue +41 -140
- package/src/pages/CreateQueryPage.vue +6 -0
- package/src/pages/resourceManage/orgListManage.vue +2 -2
- package/src/react-client/amis-react-starter/.prettierrc +12 -0
- package/src/react-client/amis-react-starter/LICENSE +201 -0
- package/src/react-client/amis-react-starter/README.md +16 -0
- package/src/react-client/amis-react-starter/index.html +13 -0
- package/src/react-client/amis-react-starter/package.json +63 -0
- package/src/react-client/amis-react-starter/server.js +23 -0
- package/src/react-client/amis-react-starter/snowpack/favicon.ico +0 -0
- package/src/react-client/amis-react-starter/snowpack/index.html +25 -0
- package/src/react-client/amis-react-starter/snowpack.config.js +30 -0
- package/src/react-client/amis-react-starter/src/AMISComponent.tsx +79 -0
- package/src/react-client/amis-react-starter/src/App.tsx +154 -0
- package/src/react-client/amis-react-starter/src/index.html +13 -0
- package/src/react-client/amis-react-starter/src/index.tsx +7 -0
- package/src/react-client/amis-react-starter/src/react-app-env.d.ts +74 -0
- package/src/react-client/amis-react-starter/tsconfig.json +19 -0
- package/src/react-client/amis-react-starter/vite.config.ts +7 -0
- package/src/react-client/amis-react-starter/webpack.config.js +76 -0
- package/src/router/async/router.map.js +1 -1
- package/src/router.js +13 -0
- package/src/services/api/common.js +10 -2
- package/test/Amis.spec.js +163 -0
- package/test/Tree.spec.js +167 -0
- package/vue.config.js +21 -5
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a-row type="flex">
|
|
4
|
+
<a-col :span="stepStyle.flex">
|
|
5
|
+
<a-steps
|
|
6
|
+
:type="stepStyle.type"
|
|
7
|
+
:current="current"
|
|
8
|
+
:direction="stepStyle.direction"
|
|
9
|
+
:labelPlacement="stepStyle.labelPlacement"
|
|
10
|
+
:progressDot="stepStyle.false"
|
|
11
|
+
:size="stepStyle.size"
|
|
12
|
+
:initial="initial"
|
|
13
|
+
:status="status"
|
|
14
|
+
@change="onChange"
|
|
15
|
+
>
|
|
16
|
+
<a-step
|
|
17
|
+
v-for="(item, index) in this.configContent.step.steps"
|
|
18
|
+
:key="'step-'+item.name"
|
|
19
|
+
:title="item.title"
|
|
20
|
+
:description="item.description"
|
|
21
|
+
:sub-title="item.subTitle"
|
|
22
|
+
:disabled="item.disabled">
|
|
23
|
+
<a-icon v-if="current === index" slot="icon" :type="iconType" />
|
|
24
|
+
</a-step>
|
|
25
|
+
</a-steps>
|
|
26
|
+
</a-col>
|
|
27
|
+
<a-col :span="panelStyle.flex">
|
|
28
|
+
<template v-for="(item, index) in this.configContent.step.steps">
|
|
29
|
+
<a-card
|
|
30
|
+
v-if="current === index"
|
|
31
|
+
:bordered="false"
|
|
32
|
+
:key="'stepCard-'+item.name">
|
|
33
|
+
<template v-if="item.content.card.type === 'text'">
|
|
34
|
+
<p>{{ item.content.card.value }}</p>
|
|
35
|
+
</template>
|
|
36
|
+
<x-add-native-form v-else-if="item.content.card.type === 'form'" :ref="'XAddNativeForm'+ item.name" @onSubmit="submit"/>
|
|
37
|
+
<x-table v-else-if="item.content.card.type === 'table'" :fixed-query-form="item.content.card.queryFrom" @action="action" :query-params-name="item.content.card.queryParamsName" :ref="'XAddNativeForm'+item.name" />
|
|
38
|
+
<a-button v-if="status === 'error'" @click="success" style="color: v-bind()">下一步</a-button>
|
|
39
|
+
</a-card>
|
|
40
|
+
</template>
|
|
41
|
+
</a-col>
|
|
42
|
+
</a-row>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
import XAddNativeForm from '@/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
|
48
|
+
import { post } from '@/services/api'
|
|
49
|
+
import XTable from '@/base-client/components/common/XTable/XTable.vue'
|
|
50
|
+
|
|
51
|
+
export default {
|
|
52
|
+
name: 'XStepView',
|
|
53
|
+
components: { XTable, XAddNativeForm },
|
|
54
|
+
computed: {
|
|
55
|
+
stepStyle () {
|
|
56
|
+
const style = this.configContent.step.style
|
|
57
|
+
if (style) {
|
|
58
|
+
return style
|
|
59
|
+
} else {
|
|
60
|
+
return {
|
|
61
|
+
flex: 5,
|
|
62
|
+
type: 'default',
|
|
63
|
+
progressDot: 'false',
|
|
64
|
+
direction: 'horizontal',
|
|
65
|
+
labelPlacement: 'horizontal',
|
|
66
|
+
size: 'default',
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
panelStyle () {
|
|
71
|
+
const style = this.configContent.panelStyle
|
|
72
|
+
if (style) {
|
|
73
|
+
return style
|
|
74
|
+
} else {
|
|
75
|
+
return {
|
|
76
|
+
flex: 19
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
},
|
|
82
|
+
props: {
|
|
83
|
+
params: {
|
|
84
|
+
type: Object,
|
|
85
|
+
default: () => {
|
|
86
|
+
return { meternumber: '4923217' }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
// panelStyle: {
|
|
90
|
+
// type: Object,
|
|
91
|
+
// default: () => {
|
|
92
|
+
// return {
|
|
93
|
+
// flex: 19
|
|
94
|
+
// }
|
|
95
|
+
// }
|
|
96
|
+
// },
|
|
97
|
+
// stepStyle: {
|
|
98
|
+
// type: Object,
|
|
99
|
+
// default: () => {
|
|
100
|
+
// return {
|
|
101
|
+
// flex: 5,
|
|
102
|
+
// type: 'default',
|
|
103
|
+
// progressDot: 'false',
|
|
104
|
+
// direction: 'horizontal',
|
|
105
|
+
// labelPlacement: 'horizontal',
|
|
106
|
+
// size: 'default',
|
|
107
|
+
// }
|
|
108
|
+
// }
|
|
109
|
+
// }
|
|
110
|
+
},
|
|
111
|
+
data () {
|
|
112
|
+
return {
|
|
113
|
+
current: -1,
|
|
114
|
+
initial: 0,
|
|
115
|
+
status: 'wait',
|
|
116
|
+
iconType: 'loading',
|
|
117
|
+
configContent: {
|
|
118
|
+
step: {
|
|
119
|
+
style: {
|
|
120
|
+
flex: 5,
|
|
121
|
+
type: 'default',
|
|
122
|
+
progressDot: 'false',
|
|
123
|
+
direction: 'vertical',
|
|
124
|
+
labelPlacement: 'horizontal',
|
|
125
|
+
size: 'default',
|
|
126
|
+
},
|
|
127
|
+
steps: [
|
|
128
|
+
{
|
|
129
|
+
name: '开始检测',
|
|
130
|
+
title: '开始检测',
|
|
131
|
+
subTitle: '对设备状态进行确认',
|
|
132
|
+
description: '第一步',
|
|
133
|
+
disabled: false,
|
|
134
|
+
content: {
|
|
135
|
+
card: {
|
|
136
|
+
type: 'text',
|
|
137
|
+
value: '正在对档案状态进行查看'
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
run: {
|
|
141
|
+
name: 'deviceCheckMeterInfo',
|
|
142
|
+
params: {
|
|
143
|
+
data: {
|
|
144
|
+
meternumber: this.params.meternumber
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: '设备重置',
|
|
151
|
+
title: '设备重置',
|
|
152
|
+
subTitle: '对设备进行重置',
|
|
153
|
+
description: '第二步',
|
|
154
|
+
disabled: false,
|
|
155
|
+
content: {
|
|
156
|
+
card: {
|
|
157
|
+
type: 'form',
|
|
158
|
+
value: [
|
|
159
|
+
{
|
|
160
|
+
addOrEdit: 'all',
|
|
161
|
+
name: '表号',
|
|
162
|
+
rule: {
|
|
163
|
+
type: 'number',
|
|
164
|
+
required: 'true'
|
|
165
|
+
},
|
|
166
|
+
isOnlyAddOrEdit: false,
|
|
167
|
+
model: 't_meternumber',
|
|
168
|
+
type: 'input'
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
addOrEdit: 'all',
|
|
172
|
+
name: '识别码',
|
|
173
|
+
rule: {
|
|
174
|
+
type: 'number',
|
|
175
|
+
required: 'true'
|
|
176
|
+
},
|
|
177
|
+
isOnlyAddOrEdit: false,
|
|
178
|
+
model: 't_imei',
|
|
179
|
+
type: 'input'
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
run: {
|
|
185
|
+
name: 'deviceChangeMeterInfo',
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: '开户记录检查',
|
|
190
|
+
title: '开户记录检查',
|
|
191
|
+
subTitle: '对开户记录进行检查',
|
|
192
|
+
description: '第三步',
|
|
193
|
+
disabled: false,
|
|
194
|
+
content: {
|
|
195
|
+
card: {
|
|
196
|
+
type: 'text',
|
|
197
|
+
value: '正在等待系统生成开户指令'
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
before: {
|
|
201
|
+
name: 'logic@deviceCheckOpenAccount',
|
|
202
|
+
params: {
|
|
203
|
+
data: {
|
|
204
|
+
meternumber: this.params.meternumber
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: '充值补气记录检查',
|
|
211
|
+
title: '充值补气记录检查',
|
|
212
|
+
subTitle: '对开户充值补气记录进行检查',
|
|
213
|
+
description: '第四步',
|
|
214
|
+
disabled: false,
|
|
215
|
+
content: {
|
|
216
|
+
card: {
|
|
217
|
+
type: 'table',
|
|
218
|
+
queryParamsName: 'crud_metercheck_instruct',
|
|
219
|
+
queryFrom: {
|
|
220
|
+
t_f_meternumber: this.params.meternumber
|
|
221
|
+
},
|
|
222
|
+
value: [
|
|
223
|
+
{
|
|
224
|
+
slots: {
|
|
225
|
+
customRender: 't_id'
|
|
226
|
+
},
|
|
227
|
+
sorter: true,
|
|
228
|
+
scopedSlots: {
|
|
229
|
+
customRender: 't_id'
|
|
230
|
+
},
|
|
231
|
+
slotType: 'ellipsis',
|
|
232
|
+
dataIndex: 't_id',
|
|
233
|
+
width: 164,
|
|
234
|
+
title: '指令id',
|
|
235
|
+
slotValue: 16
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
slots: {
|
|
239
|
+
customRender: 't_f_meternumber'
|
|
240
|
+
},
|
|
241
|
+
sorter: true,
|
|
242
|
+
scopedSlots: {
|
|
243
|
+
customRender: 't_f_meternumber'
|
|
244
|
+
},
|
|
245
|
+
slotType: 'ellipsis',
|
|
246
|
+
dataIndex: 't_f_meternumber',
|
|
247
|
+
width: 164,
|
|
248
|
+
title: '表号',
|
|
249
|
+
slotValue: 16
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
slots: {
|
|
253
|
+
customRender: 't_f_alias'
|
|
254
|
+
},
|
|
255
|
+
sorter: true,
|
|
256
|
+
scopedSlots: {
|
|
257
|
+
customRender: 't_f_alias'
|
|
258
|
+
},
|
|
259
|
+
slotType: 'ellipsis',
|
|
260
|
+
dataIndex: 't_f_alias',
|
|
261
|
+
width: 164,
|
|
262
|
+
title: '表具别名',
|
|
263
|
+
slotValue: 16
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
slots: {
|
|
267
|
+
customRender: 't_f_instruct_type'
|
|
268
|
+
},
|
|
269
|
+
sorter: true,
|
|
270
|
+
scopedSlots: {
|
|
271
|
+
customRender: 't_f_instruct_type'
|
|
272
|
+
},
|
|
273
|
+
slotType: 'ellipsis',
|
|
274
|
+
dataIndex: 't_f_instruct_type',
|
|
275
|
+
width: 164,
|
|
276
|
+
title: '指令类型',
|
|
277
|
+
slotValue: 16
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
slots: {
|
|
281
|
+
customRender: 't_f_instruct_state'
|
|
282
|
+
},
|
|
283
|
+
sorter: true,
|
|
284
|
+
scopedSlots: {
|
|
285
|
+
customRender: 't_f_instruct_state'
|
|
286
|
+
},
|
|
287
|
+
slotType: 'ellipsis',
|
|
288
|
+
dataIndex: 't_f_instruct_state',
|
|
289
|
+
width: 164,
|
|
290
|
+
title: '通信状态',
|
|
291
|
+
slotValue: 16
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
slots: {
|
|
295
|
+
customRender: 't_f_receive_state'
|
|
296
|
+
},
|
|
297
|
+
sorter: true,
|
|
298
|
+
scopedSlots: {
|
|
299
|
+
customRender: 't_f_receive_state'
|
|
300
|
+
},
|
|
301
|
+
slotType: 'ellipsis',
|
|
302
|
+
dataIndex: 't_f_receive_state',
|
|
303
|
+
width: 164,
|
|
304
|
+
title: '通信结果',
|
|
305
|
+
slotValue: 16
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
slots: {
|
|
309
|
+
customRender: 'action'
|
|
310
|
+
},
|
|
311
|
+
sorter: false,
|
|
312
|
+
scopedSlots: {
|
|
313
|
+
customRender: 'action'
|
|
314
|
+
},
|
|
315
|
+
slotType: 'action',
|
|
316
|
+
dataIndex: 'action',
|
|
317
|
+
title: '操作',
|
|
318
|
+
slotValue: '重新通信'
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
run: {
|
|
324
|
+
name: 'xxx'
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
panel: {
|
|
330
|
+
style: {
|
|
331
|
+
flex: 19
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
watch: {
|
|
338
|
+
async current (newValue) {
|
|
339
|
+
this.changeIcon()
|
|
340
|
+
const setpes = this.configContent.step.steps[newValue]
|
|
341
|
+
const type = setpes.content.card.type
|
|
342
|
+
const formValue = setpes.content.card.value
|
|
343
|
+
let timeOut = null
|
|
344
|
+
if (setpes.before) {
|
|
345
|
+
const postName = setpes.before.name.split('@')
|
|
346
|
+
let times = 0
|
|
347
|
+
timeOut = window.setInterval(() => {
|
|
348
|
+
times++
|
|
349
|
+
post('/api/af-system/' + postName[0] + '/' + postName[1], setpes.before.params).then(res => {
|
|
350
|
+
console.warn(setpes.before.name + '执行结果', res)
|
|
351
|
+
if (res.code === 200) {
|
|
352
|
+
if (res.instructs.length > 0) {
|
|
353
|
+
window.clearTimeout(timeOut)
|
|
354
|
+
this.success()
|
|
355
|
+
}
|
|
356
|
+
} else {
|
|
357
|
+
setpes.content.card.value = res.msg
|
|
358
|
+
}
|
|
359
|
+
}).catch(e => {
|
|
360
|
+
console.warn(setpes.before.name + '执行结果', e)
|
|
361
|
+
window.clearTimeout(timeOut)
|
|
362
|
+
|
|
363
|
+
this.error()
|
|
364
|
+
})
|
|
365
|
+
if (times > 12) {
|
|
366
|
+
window.clearTimeout(timeOut)
|
|
367
|
+
setpes.content.card.value = '未查询到开户信息,请确认'
|
|
368
|
+
this.error()
|
|
369
|
+
}
|
|
370
|
+
}, 10 * 1000)
|
|
371
|
+
}
|
|
372
|
+
if (type === 'form') {
|
|
373
|
+
console.warn('formValue = ', formValue)
|
|
374
|
+
this.$nextTick(() => {
|
|
375
|
+
const stepsss = this.$refs['XAddNativeForm' + setpes.name][0]
|
|
376
|
+
console.warn('stepsss', stepsss)
|
|
377
|
+
stepsss.init({
|
|
378
|
+
formItems: formValue
|
|
379
|
+
})
|
|
380
|
+
})
|
|
381
|
+
} else if (type === 'table') {
|
|
382
|
+
console.warn('formValue = ', formValue)
|
|
383
|
+
this.$nextTick(() => {
|
|
384
|
+
const stepsss = this.$refs['XAddNativeForm' + setpes.name][0]
|
|
385
|
+
console.warn('stepsss', stepsss)
|
|
386
|
+
stepsss.init({
|
|
387
|
+
tableColumns: formValue,
|
|
388
|
+
buttonState: {
|
|
389
|
+
add: false,
|
|
390
|
+
edit: true,
|
|
391
|
+
delete: false,
|
|
392
|
+
import: false,
|
|
393
|
+
export: false
|
|
394
|
+
}
|
|
395
|
+
})
|
|
396
|
+
})
|
|
397
|
+
} else {
|
|
398
|
+
if (setpes.run) {
|
|
399
|
+
post('/api/af-system/logic/' + setpes.run.name, setpes.run.params).then(t => {
|
|
400
|
+
console.warn(setpes.run.name + '执行结果', t)
|
|
401
|
+
if (t.code === 200) {
|
|
402
|
+
this.success()
|
|
403
|
+
} else {
|
|
404
|
+
setpes.content.card.value = t.msg
|
|
405
|
+
}
|
|
406
|
+
}).catch(e => {
|
|
407
|
+
console.warn(setpes.run.name + '执行结果', e)
|
|
408
|
+
this.error()
|
|
409
|
+
})
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
mounted () {
|
|
415
|
+
|
|
416
|
+
},
|
|
417
|
+
methods: {
|
|
418
|
+
init (parms) {
|
|
419
|
+
const {
|
|
420
|
+
style,
|
|
421
|
+
panel,
|
|
422
|
+
steps
|
|
423
|
+
} = parms
|
|
424
|
+
if (style) {
|
|
425
|
+
this.stepStyle = style
|
|
426
|
+
}
|
|
427
|
+
if (panel) {
|
|
428
|
+
this.panelStyle = panel
|
|
429
|
+
}
|
|
430
|
+
if (steps) {
|
|
431
|
+
this.configContent.step.steps = steps
|
|
432
|
+
}
|
|
433
|
+
this.current++
|
|
434
|
+
},
|
|
435
|
+
steps () {
|
|
436
|
+
return this.steps
|
|
437
|
+
},
|
|
438
|
+
onChange (current) {
|
|
439
|
+
this.current = current
|
|
440
|
+
},
|
|
441
|
+
submit (res) {
|
|
442
|
+
console.warn('res', res)
|
|
443
|
+
const setpes = this.configContent.step.steps[this.current]
|
|
444
|
+
if (setpes.run) {
|
|
445
|
+
post('/api/af-system/logic/' + setpes.run.name, res.realForm).then(t => {
|
|
446
|
+
console.warn(setpes.run.name + '执行结果', t)
|
|
447
|
+
if (t.code === 200) {
|
|
448
|
+
this.success()
|
|
449
|
+
}
|
|
450
|
+
}).catch(e => {
|
|
451
|
+
console.warn(setpes.run.name + '执行结果', e)
|
|
452
|
+
this.error()
|
|
453
|
+
})
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
error () {
|
|
457
|
+
this.status = 'error'
|
|
458
|
+
this.iconType = 'close-circle'
|
|
459
|
+
},
|
|
460
|
+
success () {
|
|
461
|
+
this.changeIcon()
|
|
462
|
+
this.current++
|
|
463
|
+
},
|
|
464
|
+
changeIcon () {
|
|
465
|
+
this.status = 'wait'
|
|
466
|
+
this.iconType = 'loading'
|
|
467
|
+
},
|
|
468
|
+
previous () {
|
|
469
|
+
this.current--
|
|
470
|
+
},
|
|
471
|
+
action (record, id, actionType) {
|
|
472
|
+
console.warn('record', record)
|
|
473
|
+
console.warn('id', id)
|
|
474
|
+
console.warn('actionType', actionType)
|
|
475
|
+
const setpes = this.configContent.step.steps[this.current]
|
|
476
|
+
if (setpes.run) {
|
|
477
|
+
post('/api/af-system/logic/' + setpes.run.name, { data: record }).then(t => {
|
|
478
|
+
console.warn(setpes.run.name + '执行结果', t)
|
|
479
|
+
if (t.code === 200) {
|
|
480
|
+
this.success()
|
|
481
|
+
}
|
|
482
|
+
}).catch(e => {
|
|
483
|
+
console.warn(setpes.run.name + '执行结果', e)
|
|
484
|
+
this.error()
|
|
485
|
+
})
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
}
|
|
490
|
+
</script>
|
|
491
|
+
|
|
492
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# XStepView 通用步骤视图
|
|
2
|
+
|
|
3
|
+
通用步骤视图,根据JSON配置生成一个完整的通用步骤视图
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## 何时使用
|
|
8
|
+
|
|
9
|
+
当需要一个可以JSON配置生成一个完整的通用步骤视图时
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
引用方式:
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
import XStepView from '@vue2-client/base-client/components/XStepView'
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
components: {
|
|
19
|
+
XStepView
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 代码演示
|
|
27
|
+
```html
|
|
28
|
+
<x-step-view
|
|
29
|
+
:params = 'json'
|
|
30
|
+
/>
|
|
31
|
+
```
|
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import XForm from './common/XForm'
|
|
2
|
-
import XAddForm from './common/XAddForm'
|
|
3
|
-
import XAddNativeForm from './common/XAddNativeForm'
|
|
4
|
-
import XFormCol from './common/XFormCol'
|
|
5
|
-
import XTable from './common/XTable'
|
|
6
|
-
import XTreeOne from './common/XTreeOne'
|
|
7
|
-
import XImportExcel from './common/XImportExcel'
|
|
8
|
-
import XDataDrawer from './common/XDataDrawer'
|
|
9
|
-
import XCard from './common/XCard'
|
|
10
|
-
import XBadge from './common/XBadge'
|
|
11
|
-
import Upload from './common/Upload'
|
|
12
|
-
import JSONToTree from './common/JSONToTree'
|
|
13
|
-
import FormGroupEdit from './common/FormGroupEdit'
|
|
14
|
-
import FormGroupQuery from './common/FormGroupQuery'
|
|
15
|
-
import AddressSearchCombobox from './common/AddressSearchCombobox'
|
|
16
|
-
import AmapMarker from './common/AmapMarker'
|
|
17
|
-
import CreateQuery from './common/CreateQuery'
|
|
18
|
-
import CreateSimpleFormQuery from './common/CreateSimpleFormQuery'
|
|
19
|
-
import PersonSetting from './common/PersonSetting'
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import XForm from './common/XForm'
|
|
2
|
+
import XAddForm from './common/XAddForm'
|
|
3
|
+
import XAddNativeForm from './common/XAddNativeForm'
|
|
4
|
+
import XFormCol from './common/XFormCol'
|
|
5
|
+
import XTable from './common/XTable'
|
|
6
|
+
import XTreeOne from './common/XTreeOne'
|
|
7
|
+
import XImportExcel from './common/XImportExcel'
|
|
8
|
+
import XDataDrawer from './common/XDataDrawer'
|
|
9
|
+
import XCard from './common/XCard'
|
|
10
|
+
import XBadge from './common/XBadge'
|
|
11
|
+
import Upload from './common/Upload'
|
|
12
|
+
import JSONToTree from './common/JSONToTree'
|
|
13
|
+
import FormGroupEdit from './common/FormGroupEdit'
|
|
14
|
+
import FormGroupQuery from './common/FormGroupQuery'
|
|
15
|
+
import AddressSearchCombobox from './common/AddressSearchCombobox'
|
|
16
|
+
import AmapMarker from './common/AmapMarker'
|
|
17
|
+
import CreateQuery from './common/CreateQuery'
|
|
18
|
+
import CreateSimpleFormQuery from './common/CreateSimpleFormQuery'
|
|
19
|
+
import PersonSetting from './common/PersonSetting'
|
|
20
|
+
import XFormTable from './common/XFormTable'
|
|
21
|
+
import Tree from './common/Tree'
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
XForm,
|
|
25
|
+
XAddForm,
|
|
26
|
+
XAddNativeForm,
|
|
27
|
+
XFormCol,
|
|
28
|
+
XTable,
|
|
29
|
+
XTreeOne,
|
|
30
|
+
XImportExcel,
|
|
31
|
+
XDataDrawer,
|
|
32
|
+
XCard,
|
|
33
|
+
XBadge,
|
|
34
|
+
Upload,
|
|
35
|
+
JSONToTree,
|
|
36
|
+
FormGroupEdit,
|
|
37
|
+
FormGroupQuery,
|
|
38
|
+
AddressSearchCombobox,
|
|
39
|
+
AmapMarker,
|
|
40
|
+
CreateQuery,
|
|
41
|
+
CreateSimpleFormQuery,
|
|
42
|
+
XFormTable,
|
|
43
|
+
PersonSetting,
|
|
44
|
+
Tree
|
|
45
|
+
}
|
package/src/bootstrap.js
CHANGED
|
@@ -3,7 +3,7 @@ import { loadRoutes, loadGuards, setAppOptions } from '@vue2-client/utils/router
|
|
|
3
3
|
import { loadInterceptors } from '@vue2-client/utils/request'
|
|
4
4
|
import guards from '@vue2-client/router/guards'
|
|
5
5
|
import interceptors from '@vue2-client/utils/axios-interceptors'
|
|
6
|
-
import {
|
|
6
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* 启动引导方法
|
|
@@ -16,7 +16,7 @@ import { getConfig } from '@vue2-client/services/api'
|
|
|
16
16
|
async function bootstrap ({ router, store, i18n, message }) {
|
|
17
17
|
Vue.$store = store
|
|
18
18
|
// 获取系统配置
|
|
19
|
-
await
|
|
19
|
+
await getConfigByName('webConfig', undefined, res => {
|
|
20
20
|
localStorage.setItem(process.env.VUE_APP_WEB_CONFIG_KEY, JSON.stringify(res))
|
|
21
21
|
if (res.setting) {
|
|
22
22
|
Vue.$store.commit('setting/setSetting', res.setting)
|
|
@@ -42,8 +42,8 @@ module.exports = {
|
|
|
42
42
|
},
|
|
43
43
|
// 旧系统路径
|
|
44
44
|
iframeSrc: '/singlepage/index.html',
|
|
45
|
-
// 兼容旧版本 V3(
|
|
46
|
-
compatible: '
|
|
45
|
+
// 兼容旧版本 V4(最新产品) V3(V3产品) OA(公司OA)
|
|
46
|
+
// compatible: 'V4',
|
|
47
47
|
// 路由资源名称
|
|
48
48
|
routeName: '智慧燃气',
|
|
49
49
|
// 自定义组件集合 格式为组件名: 组件路径(不需要带@/)
|