vue2-client 1.14.80 → 1.14.81
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
CHANGED
|
@@ -659,24 +659,7 @@ export default {
|
|
|
659
659
|
continue
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
}
|
|
663
|
-
closeAddReport () {
|
|
664
|
-
// 获取所有 xAddReport 组件实例
|
|
665
|
-
const addReportRefs = this.$parent.$refs.xAddReport
|
|
666
|
-
if (addReportRefs) {
|
|
667
|
-
// 如果是数组,遍历关闭所有实例
|
|
668
|
-
if (Array.isArray(addReportRefs)) {
|
|
669
|
-
addReportRefs.forEach(ref => {
|
|
670
|
-
if (ref && typeof ref.close === 'function') {
|
|
671
|
-
ref.close()
|
|
672
|
-
}
|
|
673
|
-
})
|
|
674
|
-
} else if (typeof addReportRefs.close === 'function') {
|
|
675
|
-
// 如果是单个实例,直接关闭
|
|
676
|
-
addReportRefs.close()
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
},
|
|
662
|
+
}
|
|
680
663
|
},
|
|
681
664
|
beforeMount () {
|
|
682
665
|
if (this.useOssForImg) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"config":{
|
|
3
3
|
"title":"",
|
|
4
|
-
"split":""
|
|
4
|
+
"split":"",
|
|
5
|
+
"style":""//TODO 居中方式
|
|
5
6
|
},
|
|
6
7
|
"content": [
|
|
7
8
|
{
|
|
@@ -12,15 +13,19 @@
|
|
|
12
13
|
"type":"",
|
|
13
14
|
"key": "",
|
|
14
15
|
"value": {},
|
|
15
|
-
|
|
16
|
+
|
|
17
|
+
"configName":"", // 通过后端获配置单选多选
|
|
18
|
+
"button-type":"",
|
|
19
|
+
|
|
20
|
+
|
|
16
21
|
}
|
|
17
22
|
]
|
|
18
23
|
}
|
|
19
24
|
]
|
|
20
25
|
}
|
|
21
26
|
//常量取值 checkBox多选
|
|
22
|
-
type [radio,selectionBox,text,input,time,describe]
|
|
23
|
-
|
|
27
|
+
type [radio,selectionBox,text,input,time,describe,button]
|
|
28
|
+
style = ['flex-start', 'flex-end', 'center', 'space-between', 'space-around']
|
|
24
29
|
|
|
25
30
|
"results": [{
|
|
26
31
|
"row_key": "",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<div >{{ config.header }}</div>
|
|
12
12
|
</template>
|
|
13
13
|
<a-list-item
|
|
14
|
+
:class="{'header-row': item.type === 'header'}"
|
|
14
15
|
slot="renderItem"
|
|
15
16
|
slot-scope="item, index">
|
|
16
17
|
<div
|
|
@@ -42,6 +43,22 @@
|
|
|
42
43
|
<template v-else-if="column.type === 'describe'">
|
|
43
44
|
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-describe']"> {{ column.value }} </span>
|
|
44
45
|
</template>
|
|
46
|
+
<template v-else-if="column.type === 'header'">
|
|
47
|
+
<span :key="`row-${index}-item-${idx}`" :class="['item-header']"> {{ column.value }} </span>
|
|
48
|
+
</template>
|
|
49
|
+
<template v-else-if="column.type === 'button'">
|
|
50
|
+
<a-button
|
|
51
|
+
:class="['column-item']"
|
|
52
|
+
:key="`row-${index}-item-${idx}`"
|
|
53
|
+
:disabled="column.disabled"
|
|
54
|
+
:icon="column.icon"
|
|
55
|
+
:loading="column.loading"
|
|
56
|
+
:type="column.buttonType || 'default'"
|
|
57
|
+
@click="handleButtonClick(column)"
|
|
58
|
+
>
|
|
59
|
+
{{ column.label }}
|
|
60
|
+
</a-button>
|
|
61
|
+
</template>
|
|
45
62
|
<template v-else>
|
|
46
63
|
<span :key="`row-${index}-item-${idx}`" :class="['column-item','item-text']"> {{ column.value }} </span>
|
|
47
64
|
</template>
|
|
@@ -146,6 +163,24 @@ export default {
|
|
|
146
163
|
} else if (column.type === 'radio' || column.type === 'time') {
|
|
147
164
|
this.results[resultIndex][column.key] = e
|
|
148
165
|
}
|
|
166
|
+
},
|
|
167
|
+
handleButtonClick (item) {
|
|
168
|
+
item.loading = true
|
|
169
|
+
const callback = () => {
|
|
170
|
+
item.loading = false
|
|
171
|
+
}
|
|
172
|
+
if (item.clickEventName && this.$listeners[item.clickEventName]) {
|
|
173
|
+
// 交由父级处理
|
|
174
|
+
this.$emit(item.clickEventName, item, callback)
|
|
175
|
+
} else {
|
|
176
|
+
this.defaultAction(item.clickEventName, item, callback)
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
defaultAction (clickEventName, item, callback) {
|
|
180
|
+
setTimeout(() => {
|
|
181
|
+
this.$message.warn(`已触发按钮 [${item.key}],注册事件名 [${clickEventName}],未实现事件函数`)
|
|
182
|
+
callback()
|
|
183
|
+
}, 200)
|
|
149
184
|
}
|
|
150
185
|
},
|
|
151
186
|
watch: {
|
|
@@ -196,6 +231,7 @@ export default {
|
|
|
196
231
|
display: flex;
|
|
197
232
|
justify-content: center;
|
|
198
233
|
}
|
|
234
|
+
|
|
199
235
|
.list-wrapper ::v-deep .x-radio-item {
|
|
200
236
|
margin-bottom: 0;
|
|
201
237
|
}
|
|
@@ -208,8 +244,13 @@ export default {
|
|
|
208
244
|
.list-wrapper ::v-deep .x-time-select {
|
|
209
245
|
width: auto !important;
|
|
210
246
|
}
|
|
247
|
+
.list-wrapper ::v-deep .header-row {
|
|
248
|
+
background-color: #F4F4F4; /* 自定义背景色 */
|
|
249
|
+
height: 45px !important;
|
|
250
|
+
}
|
|
211
251
|
/*每一行的整体样式*/
|
|
212
252
|
.row-item{
|
|
253
|
+
width: 100%;
|
|
213
254
|
display: flex;
|
|
214
255
|
align-items: center;
|
|
215
256
|
padding: 2px;
|
|
@@ -225,7 +266,10 @@ export default {
|
|
|
225
266
|
color: #808080 ;
|
|
226
267
|
}
|
|
227
268
|
.item-input{
|
|
228
|
-
|
|
269
|
+
width: auto !important;
|
|
270
|
+
}
|
|
271
|
+
.item-header {
|
|
272
|
+
color: rgba(0, 0, 0, 0.65)
|
|
229
273
|
}
|
|
230
274
|
|
|
231
275
|
</style>
|