vue2-client 1.9.63 → 1.9.65
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/XAddNativeForm/XAddNativeForm.vue +9 -2
- package/src/base-client/components/common/XAddReport/XAddReport.vue +2 -1
- package/src/base-client/components/common/XButtons/XButtons.vue +145 -0
- package/src/base-client/components/common/XButtons/index.js +3 -0
- package/src/base-client/components/common/XButtons/index.md +0 -0
- package/src/base-client/components/common/XDataCard/XDataCard.vue +14 -22
- package/src/base-client/components/common/XFormTable/XFormTable.vue +1 -1
- package/src/base-client/components/common/XFormTable/demo.vue +7 -0
- package/src/base-client/components/common/XReportDrawer/XReportDrawer.vue +2 -1
- package/src/base-client/components/common/XReportGrid/XReportDesign.vue +3 -0
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +5 -3
- package/src/base-client/components/common/XTab/XTab.vue +9 -0
- package/src/base-client/components/common/XTable/XTable.vue +1 -0
- package/src/router/async/router.map.js +1 -1
package/package.json
CHANGED
|
@@ -223,18 +223,25 @@ export default {
|
|
|
223
223
|
getConfigByName,
|
|
224
224
|
init (params) {
|
|
225
225
|
const {
|
|
226
|
-
configName, configContent, formItems, formJson, viewMode, isHandleFormKey = true,
|
|
226
|
+
configName, configContent, formItems, formJson, viewMode, isHandleFormKey, isKeyHandle = true,
|
|
227
227
|
showSubmitBtn = true, serviceName,
|
|
228
228
|
modifyModelData = {}, businessType, title, fixedAddForm = {}, getDataParams = {},
|
|
229
229
|
simpleFormJsonData = {}, env = 'prod', layout, xAddFormLayout = 'horizontal'
|
|
230
230
|
} = params
|
|
231
231
|
this.loaded = false
|
|
232
232
|
// 兼容需要省略 传递 layout: res.xAddFormLayout 可以使用 ...res 展开运算符 直接转递
|
|
233
|
-
if (xAddFormLayout &&
|
|
233
|
+
if (xAddFormLayout && layout === undefined) {
|
|
234
234
|
this.layout = xAddFormLayout
|
|
235
235
|
} else {
|
|
236
236
|
this.layout = layout
|
|
237
237
|
}
|
|
238
|
+
if (isHandleFormKey && !isKeyHandle) {
|
|
239
|
+
this.isHandleFormKey = isKeyHandle
|
|
240
|
+
} else if (isHandleFormKey) {
|
|
241
|
+
this.isHandleFormKey = isHandleFormKey
|
|
242
|
+
} else {
|
|
243
|
+
this.isHandleFormKey = isKeyHandle
|
|
244
|
+
}
|
|
238
245
|
this.configName = configName
|
|
239
246
|
this.configContent = configContent
|
|
240
247
|
this.formItems = this.getFromItem(formItems, formJson)
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="x-buttons">
|
|
3
|
+
<a-button-group>
|
|
4
|
+
<a-button
|
|
5
|
+
v-for="(button, index) in config"
|
|
6
|
+
:key="index"
|
|
7
|
+
:type="button.type || 'default'"
|
|
8
|
+
:danger="button.danger"
|
|
9
|
+
:disabled="button.disabled"
|
|
10
|
+
:ghost="button.ghost"
|
|
11
|
+
:href="button.href"
|
|
12
|
+
:html-type="button.htmlType"
|
|
13
|
+
:icon="button.icon"
|
|
14
|
+
:loading="button.loading"
|
|
15
|
+
:shape="button.shape"
|
|
16
|
+
:size="button.size"
|
|
17
|
+
:target="button.target"
|
|
18
|
+
@click="handleButtonClick(index)"
|
|
19
|
+
>
|
|
20
|
+
{{ button.label }}
|
|
21
|
+
</a-button>
|
|
22
|
+
</a-button-group>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import { Button, Icon as AIcon } from 'ant-design-vue'
|
|
28
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: 'XButtons',
|
|
32
|
+
components: {
|
|
33
|
+
'a-button': Button,
|
|
34
|
+
'a-icon': AIcon,
|
|
35
|
+
},
|
|
36
|
+
props: {
|
|
37
|
+
configName: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: undefined
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
data () {
|
|
43
|
+
return {
|
|
44
|
+
// 配置
|
|
45
|
+
config: [
|
|
46
|
+
{
|
|
47
|
+
label: 'Primary Button',
|
|
48
|
+
type: 'primary',
|
|
49
|
+
icon: 'rocket',
|
|
50
|
+
disabled: false,
|
|
51
|
+
loading: false,
|
|
52
|
+
danger: false,
|
|
53
|
+
ghost: false,
|
|
54
|
+
href: '',
|
|
55
|
+
htmlType: 'button',
|
|
56
|
+
shape: 'default',
|
|
57
|
+
size: 'middle',
|
|
58
|
+
target: '',
|
|
59
|
+
onClick: () => {}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'Danger Button',
|
|
63
|
+
type: 'default',
|
|
64
|
+
icon: 'fire',
|
|
65
|
+
disabled: false,
|
|
66
|
+
loading: false,
|
|
67
|
+
danger: true,
|
|
68
|
+
ghost: false,
|
|
69
|
+
href: '',
|
|
70
|
+
htmlType: 'button',
|
|
71
|
+
shape: 'default',
|
|
72
|
+
size: 'middle',
|
|
73
|
+
target: '',
|
|
74
|
+
onClick: () => {}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: 'Ghost Button',
|
|
78
|
+
type: 'ghost',
|
|
79
|
+
icon: 'ghost',
|
|
80
|
+
disabled: false,
|
|
81
|
+
loading: false,
|
|
82
|
+
danger: false,
|
|
83
|
+
ghost: true,
|
|
84
|
+
href: '',
|
|
85
|
+
htmlType: 'button',
|
|
86
|
+
shape: 'default',
|
|
87
|
+
size: 'middle',
|
|
88
|
+
target: '',
|
|
89
|
+
onClick: () => {}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: 'Dashed Button',
|
|
93
|
+
type: 'dashed',
|
|
94
|
+
icon: 'ellipsis',
|
|
95
|
+
disabled: false,
|
|
96
|
+
loading: false,
|
|
97
|
+
danger: false,
|
|
98
|
+
ghost: false,
|
|
99
|
+
href: '',
|
|
100
|
+
htmlType: 'button',
|
|
101
|
+
shape: 'default',
|
|
102
|
+
size: 'middle',
|
|
103
|
+
target: '',
|
|
104
|
+
onClick: () => {}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: 'Link Button',
|
|
108
|
+
type: 'link',
|
|
109
|
+
icon: 'link',
|
|
110
|
+
disabled: false,
|
|
111
|
+
loading: false,
|
|
112
|
+
danger: false,
|
|
113
|
+
ghost: false,
|
|
114
|
+
href: '#',
|
|
115
|
+
htmlType: 'button',
|
|
116
|
+
shape: 'default',
|
|
117
|
+
size: 'middle',
|
|
118
|
+
target: '_blank',
|
|
119
|
+
onClick: () => {}
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
methods: {
|
|
125
|
+
handleButtonClick (index) {
|
|
126
|
+
// 在这里处理点击事件,或者 emit 一个事件到父组件
|
|
127
|
+
this.$emit('button-click', this.config[index])
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
watch: {
|
|
131
|
+
configName: {
|
|
132
|
+
deep: true,
|
|
133
|
+
immediate: true,
|
|
134
|
+
handler (val) {
|
|
135
|
+
console.log('>>>>点击按钮进入')
|
|
136
|
+
if (val) {
|
|
137
|
+
getConfigByName(this.configName, undefined, res => {
|
|
138
|
+
this.config = res.data || this.config
|
|
139
|
+
})
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
}
|
|
145
|
+
</script>
|
|
File without changes
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div class="body">
|
|
12
12
|
<template v-for="(item, bodyIndex) in config.content" v-if="bodyIndex < 6">
|
|
13
13
|
<div :key="'body' + bodyIndex" class="body-item">
|
|
14
|
-
<span class="body-item-label">{{ item.label }}
|
|
14
|
+
<span class="body-item-label">{{ item.label }}:</span>
|
|
15
15
|
<template v-if="item.type === 'progress'">
|
|
16
16
|
<div class="progress">
|
|
17
17
|
<div class="progress-bar">
|
|
@@ -119,6 +119,10 @@ export default {
|
|
|
119
119
|
simpleMode: {
|
|
120
120
|
type: Boolean,
|
|
121
121
|
default: false
|
|
122
|
+
},
|
|
123
|
+
tableColumns: {
|
|
124
|
+
type: Array,
|
|
125
|
+
default: undefined
|
|
122
126
|
}
|
|
123
127
|
},
|
|
124
128
|
data () {
|
|
@@ -284,20 +288,19 @@ export default {
|
|
|
284
288
|
display: flex;
|
|
285
289
|
flex-wrap: wrap;
|
|
286
290
|
justify-content: space-between;
|
|
291
|
+
overflow-y: auto;
|
|
292
|
+
max-height: 85vh;
|
|
287
293
|
|
|
288
294
|
.data-card {
|
|
289
|
-
width:
|
|
290
|
-
margin: 10px 0;
|
|
295
|
+
width: 100%;
|
|
291
296
|
border: 2px solid rgb(244,244,244);
|
|
292
297
|
border-radius: 5px;
|
|
293
|
-
margin-bottom:
|
|
298
|
+
margin-bottom: 10px;
|
|
294
299
|
|
|
295
300
|
.header {
|
|
296
|
-
height: 30px;
|
|
297
301
|
width: 100%;
|
|
298
302
|
background-color: rgb(244,244,244);
|
|
299
|
-
padding
|
|
300
|
-
padding-left: 5%;
|
|
303
|
+
padding: 5px 15px;
|
|
301
304
|
|
|
302
305
|
span {
|
|
303
306
|
font-weight: bold;
|
|
@@ -306,28 +309,21 @@ export default {
|
|
|
306
309
|
}
|
|
307
310
|
|
|
308
311
|
.body {
|
|
309
|
-
width: 100%;
|
|
310
|
-
padding: 3%;
|
|
311
|
-
|
|
312
312
|
.body-item {
|
|
313
|
-
|
|
313
|
+
padding: 5px 15px;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
.body-split {
|
|
317
|
-
|
|
318
|
-
margin: 1%;
|
|
317
|
+
margin: 1px 0;
|
|
319
318
|
}
|
|
320
319
|
|
|
321
320
|
.body-item-label {
|
|
322
321
|
color: rgba(117, 117, 117, 0.8);
|
|
323
322
|
font-size: 0.95em;
|
|
324
|
-
padding-left: 1.5%;
|
|
325
323
|
}
|
|
326
324
|
|
|
327
325
|
.body-item-value {
|
|
328
|
-
padding-right: 1.5%;
|
|
329
326
|
color: black;
|
|
330
|
-
float: right;
|
|
331
327
|
}
|
|
332
328
|
|
|
333
329
|
.progress {
|
|
@@ -364,13 +360,10 @@ export default {
|
|
|
364
360
|
}
|
|
365
361
|
|
|
366
362
|
.footer {
|
|
367
|
-
|
|
368
|
-
width: 100%;
|
|
363
|
+
padding: 5px 15px;
|
|
369
364
|
background-color: rgb(244,244,244);
|
|
370
|
-
padding-top: 5%;
|
|
371
|
-
|
|
372
365
|
.footer-icon {
|
|
373
|
-
margin-right:
|
|
366
|
+
margin-right: 5px;
|
|
374
367
|
}
|
|
375
368
|
|
|
376
369
|
.footer-item-split {
|
|
@@ -380,7 +373,6 @@ export default {
|
|
|
380
373
|
.footer-item {
|
|
381
374
|
color: rgba(117, 117, 117, 0.8);
|
|
382
375
|
font-size: 1em;
|
|
383
|
-
text-align: center;
|
|
384
376
|
}
|
|
385
377
|
|
|
386
378
|
.footer-item:hover {
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
138
138
|
XAddReport,
|
|
139
139
|
XImportExcel
|
|
140
140
|
},
|
|
141
|
-
inject: ['getSelectedId', 'getSelectedData', 'getMixinData', 'getOutEnv'],
|
|
141
|
+
inject: ['getSelectedId', 'getSelectedData', 'getMixinData', 'getOutEnv', 'currUser'],
|
|
142
142
|
data () {
|
|
143
143
|
return {
|
|
144
144
|
// 加载状态
|
|
@@ -26,11 +26,17 @@
|
|
|
26
26
|
<script>
|
|
27
27
|
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
|
|
28
28
|
import { microDispatch } from '@vue2-client/utils/microAppUtils'
|
|
29
|
+
import { mapState } from 'vuex'
|
|
29
30
|
export default {
|
|
30
31
|
name: 'Demo',
|
|
31
32
|
components: {
|
|
32
33
|
XFormTable
|
|
33
34
|
},
|
|
35
|
+
provide () {
|
|
36
|
+
return {
|
|
37
|
+
currUser: this.currUser
|
|
38
|
+
}
|
|
39
|
+
},
|
|
34
40
|
data () {
|
|
35
41
|
return {
|
|
36
42
|
// 查询配置文件名
|
|
@@ -60,6 +66,7 @@ export default {
|
|
|
60
66
|
}
|
|
61
67
|
},
|
|
62
68
|
computed: {
|
|
69
|
+
...mapState('account', { currUser: 'user' })
|
|
63
70
|
},
|
|
64
71
|
}
|
|
65
72
|
</script>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a-row type="flex" :gutter="gutter">
|
|
2
|
+
<a-row type="flex" :gutter="gutter" style="margin-bottom: 20px;">
|
|
3
3
|
<!-- 预览页展示 -->
|
|
4
4
|
<template v-if="display">
|
|
5
5
|
<template v-if="!inputColumns">
|
|
6
6
|
<a-col
|
|
7
7
|
name="trGroup"
|
|
8
|
+
style="flex: 1;"
|
|
8
9
|
v-for="(cell, cellIndex) in columns"
|
|
9
10
|
v-if="!cell.dontShowRow"
|
|
10
11
|
:key="cellIndex"
|
|
@@ -502,7 +503,7 @@ export default {
|
|
|
502
503
|
// tableConfig: {}
|
|
503
504
|
}
|
|
504
505
|
},
|
|
505
|
-
inject: ['openDialog', 'registerComponent', 'getComponentByName', 'runLogic', 'getMixinData', 'getSelectedId', 'isInAModal', 'getConfigByName', 'getSelectedData', 'getOutEnv'],
|
|
506
|
+
inject: ['openDialog', 'registerComponent', 'getComponentByName', 'runLogic', 'getMixinData', 'getSelectedId', 'isInAModal', 'getConfigByName', 'getSelectedData', 'getOutEnv', 'currUser'],
|
|
506
507
|
methods: {
|
|
507
508
|
getWindow,
|
|
508
509
|
isMicroAppEnv,
|
|
@@ -982,6 +983,7 @@ export default {
|
|
|
982
983
|
background: #b37feb;
|
|
983
984
|
}
|
|
984
985
|
.flexItem {
|
|
985
|
-
border-radius:
|
|
986
|
+
border-radius: 8px;
|
|
987
|
+
height: 100%;
|
|
986
988
|
}
|
|
987
989
|
</style>
|
|
@@ -30,6 +30,7 @@ import { getConfigByName, getConfigByNameAsync, runLogic } from '@vue2-client/se
|
|
|
30
30
|
import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
|
|
31
31
|
import { getRealKeyData } from '@vue2-client/utils/util'
|
|
32
32
|
import { getMicroData, getWindow, isMicroAppEnv, microDispatch } from '@vue2-client/utils/microAppUtils'
|
|
33
|
+
import { mapState } from 'vuex'
|
|
33
34
|
|
|
34
35
|
export default {
|
|
35
36
|
name: 'XTab',
|
|
@@ -39,6 +40,11 @@ export default {
|
|
|
39
40
|
XReportGrid: () => import('@vue2-client/base-client/components/common/XReportGrid/XReport.vue')
|
|
40
41
|
},
|
|
41
42
|
inject: ['isInAModal', 'getSelectedId', 'getSelectedData', 'getOutEnv'],
|
|
43
|
+
provide () {
|
|
44
|
+
return {
|
|
45
|
+
currUser: this.currUser
|
|
46
|
+
}
|
|
47
|
+
},
|
|
42
48
|
data () {
|
|
43
49
|
return {
|
|
44
50
|
activeKey: 0,
|
|
@@ -46,6 +52,9 @@ export default {
|
|
|
46
52
|
config: undefined,
|
|
47
53
|
}
|
|
48
54
|
},
|
|
55
|
+
computed: {
|
|
56
|
+
...mapState('account', { currUser: 'user' })
|
|
57
|
+
},
|
|
49
58
|
methods: {
|
|
50
59
|
// 自定义函数中调用的方法 这个不能删
|
|
51
60
|
getWindow,
|
|
@@ -87,7 +87,7 @@ routerResource.example = {
|
|
|
87
87
|
// component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
|
|
88
88
|
// component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
89
89
|
// component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
|
|
90
|
-
|
|
90
|
+
component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
|
|
91
91
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
|
92
92
|
meta: {
|
|
93
93
|
// 菜单中不显示
|