vue2-client 1.8.146 → 1.8.147
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
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<!-- <XReportSlot :config="activatedConfig" v-if="render" :slot-config-name="row[0].slotConfig" :key="rowIndex" :for-display="forDisplay"></XReportSlot>-->
|
|
39
39
|
<!-- </template>-->
|
|
40
40
|
<!-- 普通行 -->
|
|
41
|
-
<template v-if="row[0].type !== 'inputColumns'">
|
|
41
|
+
<template v-if="row[0].type !== 'inputColumns' && row[0].type !== 'list'">
|
|
42
42
|
<template v-if="!forDisplay">
|
|
43
43
|
<x-report-tr-group :key="rowIndex" :columns="row" :config-data="activatedConfig.data"></x-report-tr-group>
|
|
44
44
|
</template>
|
|
@@ -46,6 +46,27 @@
|
|
|
46
46
|
<x-report-tr-group :config="activatedConfig" :key="rowIndex" :columns="row" :config-data="activatedConfig.data" :display="true"></x-report-tr-group>
|
|
47
47
|
</template>
|
|
48
48
|
</template>
|
|
49
|
+
<!-- 列表 -->
|
|
50
|
+
<template v-else-if="row[0].type === 'list'" v-for="(num, listIndex) in row[0].listLength">
|
|
51
|
+
<template v-if="!forDisplay">
|
|
52
|
+
<x-report-tr-group
|
|
53
|
+
:key="rowIndex + listIndex"
|
|
54
|
+
:columns="row"
|
|
55
|
+
:config-data="activatedConfig.data"
|
|
56
|
+
:list-index="listIndex">
|
|
57
|
+
</x-report-tr-group>
|
|
58
|
+
</template>
|
|
59
|
+
<template v-else>
|
|
60
|
+
<x-report-tr-group
|
|
61
|
+
:config="activatedConfig"
|
|
62
|
+
:key="rowIndex + listIndex"
|
|
63
|
+
:columns="row"
|
|
64
|
+
:config-data="activatedConfig.data"
|
|
65
|
+
:list-index="listIndex"
|
|
66
|
+
:display="true">
|
|
67
|
+
</x-report-tr-group>
|
|
68
|
+
</template>
|
|
69
|
+
</template>
|
|
49
70
|
<!-- 动态行 -->
|
|
50
71
|
<template v-else>
|
|
51
72
|
<template v-if="forDisplay">
|
|
@@ -40,6 +40,14 @@
|
|
|
40
40
|
{{ deserializeFunctionAndRun(cell.customFunction, showSubRowValue(cell)) }}
|
|
41
41
|
</template>
|
|
42
42
|
</template>
|
|
43
|
+
<template v-else-if="cell.type === 'list'">
|
|
44
|
+
<template v-if="cell.listType === 'input'">
|
|
45
|
+
{{ configData[cell.dataIndex][listIndex] }}
|
|
46
|
+
</template>
|
|
47
|
+
<template v-else-if="cell.listType === 'value'">
|
|
48
|
+
{{ cell.content[listIndex] }}
|
|
49
|
+
</template>
|
|
50
|
+
</template>
|
|
43
51
|
<template v-else-if="cell.type === 'images'">
|
|
44
52
|
<template v-for="(img,imgIndex) in configData.images[cell.dataIndex]">
|
|
45
53
|
<span :key="imgIndex" style="margin-right: 5%">{{ img.name }}</span>
|
|
@@ -166,6 +174,16 @@
|
|
|
166
174
|
</div>
|
|
167
175
|
</template>
|
|
168
176
|
</template>
|
|
177
|
+
<template v-else-if="cell.type === 'list'">
|
|
178
|
+
<template v-if="cell.listType === 'input'">
|
|
179
|
+
<a-input
|
|
180
|
+
v-model="configData[cell.dataIndex][listIndex]"
|
|
181
|
+
:style="'width:' + (cell.inputWidth ? cell.inputWidth : '100') + '%'"/>
|
|
182
|
+
</template>
|
|
183
|
+
<template v-else-if="cell.listType === 'value'">
|
|
184
|
+
{{cell.content[listIndex]}}
|
|
185
|
+
</template>
|
|
186
|
+
</template>
|
|
169
187
|
<template v-else-if="cell.type === 'images'">
|
|
170
188
|
<div>
|
|
171
189
|
<upload
|
|
@@ -298,6 +316,11 @@ export default {
|
|
|
298
316
|
display: {
|
|
299
317
|
type: Boolean,
|
|
300
318
|
default: false
|
|
319
|
+
},
|
|
320
|
+
// listIndex
|
|
321
|
+
listIndex: {
|
|
322
|
+
type: Number,
|
|
323
|
+
default: undefined
|
|
301
324
|
}
|
|
302
325
|
},
|
|
303
326
|
data () {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<!-- <XReport :config-name="'test_tableConfig'" :activated-slot-name="'test_tableConfig_slot'"/>-->
|
|
4
|
-
<XReport :config-name="'test_tableConfig'" :local-config="test_config_withoutSlot" :config-data="test_config_data"
|
|
5
|
-
|
|
6
|
-
<!-- <XReport :config-name="'test_tableConfig'" />-->
|
|
4
|
+
<!-- <XReport :config-name="'test_tableConfig'" :local-config="test_config_withoutSlot" :config-data="test_config_data"/>-->
|
|
5
|
+
<XReport :config-name="'test_tableConfig'" :local-config="test_config_list" :dont-format="true"/>
|
|
6
|
+
<!-- <XReport :config-name="'test_tableConfig'" />-->
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
@@ -494,6 +494,136 @@ export default {
|
|
|
494
494
|
]
|
|
495
495
|
}
|
|
496
496
|
},
|
|
497
|
+
test_config_list: {
|
|
498
|
+
slotsDefine: {},
|
|
499
|
+
subTitle: [],
|
|
500
|
+
slotsDeclare: [],
|
|
501
|
+
data: {
|
|
502
|
+
workOrder: [],
|
|
503
|
+
images: {},
|
|
504
|
+
workNum: [],
|
|
505
|
+
workContent: [],
|
|
506
|
+
workTime: []
|
|
507
|
+
},
|
|
508
|
+
columns: [
|
|
509
|
+
[
|
|
510
|
+
{
|
|
511
|
+
rowSpan: 1,
|
|
512
|
+
listHead: '编号',
|
|
513
|
+
dataIndexType: 'Array',
|
|
514
|
+
colSpan: 3,
|
|
515
|
+
dataIndex: 'workNum',
|
|
516
|
+
originalRowIndex: 0,
|
|
517
|
+
type: 'list',
|
|
518
|
+
listType: 'input',
|
|
519
|
+
originalCellIndex: 0,
|
|
520
|
+
listLength: 3
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
rowSpan: 1,
|
|
524
|
+
listHead: '顺序',
|
|
525
|
+
dataIndexType: 'Array',
|
|
526
|
+
colSpan: 3,
|
|
527
|
+
dataIndex: 'workOrder',
|
|
528
|
+
originalRowIndex: 0,
|
|
529
|
+
type: 'list',
|
|
530
|
+
listType: 'input',
|
|
531
|
+
originalCellIndex: 3,
|
|
532
|
+
listLength: 3
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
rowSpan: 1,
|
|
536
|
+
listHead: '工作内容',
|
|
537
|
+
dataIndexType: 'Array',
|
|
538
|
+
colSpan: 3,
|
|
539
|
+
dataIndex: 'workContent',
|
|
540
|
+
originalRowIndex: 0,
|
|
541
|
+
type: 'list',
|
|
542
|
+
listType: 'value',
|
|
543
|
+
originalCellIndex: 6,
|
|
544
|
+
content: [
|
|
545
|
+
'1. 检查阀门',
|
|
546
|
+
' 2. 检查管道',
|
|
547
|
+
' 3. 检查燃气表'
|
|
548
|
+
],
|
|
549
|
+
listLength: 3
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
rowSpan: 1,
|
|
553
|
+
listHead: '完成时间',
|
|
554
|
+
dataIndexType: 'Array',
|
|
555
|
+
colSpan: 3,
|
|
556
|
+
dataIndex: 'workTime',
|
|
557
|
+
originalRowIndex: 0,
|
|
558
|
+
type: 'list',
|
|
559
|
+
listType: 'input',
|
|
560
|
+
originalCellIndex: 9,
|
|
561
|
+
listLength: 3
|
|
562
|
+
}
|
|
563
|
+
]
|
|
564
|
+
],
|
|
565
|
+
width: 'auto',
|
|
566
|
+
style: {},
|
|
567
|
+
title: '测试卡片插槽',
|
|
568
|
+
table: [
|
|
569
|
+
[
|
|
570
|
+
{
|
|
571
|
+
rowSpan: 1,
|
|
572
|
+
def: {
|
|
573
|
+
listHead: '编号',
|
|
574
|
+
dataIndexType: 'Array',
|
|
575
|
+
dataIndex: 'workNum',
|
|
576
|
+
type: 'list',
|
|
577
|
+
listType: 'input'
|
|
578
|
+
},
|
|
579
|
+
colSpan: 3,
|
|
580
|
+
originalRowIndex: 0,
|
|
581
|
+
originalCellIndex: 0
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
rowSpan: 1,
|
|
585
|
+
def: {
|
|
586
|
+
listHead: '顺序',
|
|
587
|
+
dataIndexType: 'Array',
|
|
588
|
+
dataIndex: 'workOrder',
|
|
589
|
+
type: 'list',
|
|
590
|
+
listType: 'input'
|
|
591
|
+
},
|
|
592
|
+
colSpan: 3,
|
|
593
|
+
originalRowIndex: 0,
|
|
594
|
+
originalCellIndex: 3
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
rowSpan: 1,
|
|
598
|
+
def: {
|
|
599
|
+
listHead: '工作内容',
|
|
600
|
+
dataIndexType: 'Array',
|
|
601
|
+
dataIndex: 'workContent',
|
|
602
|
+
type: 'list',
|
|
603
|
+
listType: 'value',
|
|
604
|
+
content: '1. 检查阀门, 2. 检查管道, 3. 检查燃气表'
|
|
605
|
+
},
|
|
606
|
+
colSpan: 3,
|
|
607
|
+
originalRowIndex: 0,
|
|
608
|
+
originalCellIndex: 6
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
rowSpan: 1,
|
|
612
|
+
def: {
|
|
613
|
+
listHead: '完成时间',
|
|
614
|
+
dataIndexType: 'Array',
|
|
615
|
+
dataIndex: 'workTime',
|
|
616
|
+
type: 'list',
|
|
617
|
+
listType: 'input'
|
|
618
|
+
},
|
|
619
|
+
colSpan: 3,
|
|
620
|
+
originalRowIndex: 0,
|
|
621
|
+
originalCellIndex: 9
|
|
622
|
+
}
|
|
623
|
+
]
|
|
624
|
+
],
|
|
625
|
+
cardMode: false
|
|
626
|
+
}
|
|
497
627
|
}
|
|
498
628
|
},
|
|
499
629
|
}
|