vue2-client 1.8.150 → 1.8.152
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
|
@@ -563,6 +563,15 @@ export default {
|
|
|
563
563
|
}
|
|
564
564
|
this.activeConfig = this.config
|
|
565
565
|
this.showSkeleton = false
|
|
566
|
+
this.activeConfig.columns.forEach(row => {
|
|
567
|
+
row.forEach(cell => {
|
|
568
|
+
if (cell.dynamicDataIndex === true) {
|
|
569
|
+
// eslint-disable-next-line no-eval
|
|
570
|
+
const func = eval('(' + cell.customFunctionForDynamicDataIndex + ')')
|
|
571
|
+
cell.dataIndex = func(this.config)
|
|
572
|
+
}
|
|
573
|
+
})
|
|
574
|
+
})
|
|
566
575
|
this.activeConfig.tempData = {}
|
|
567
576
|
this.activeConfig.columns.forEach(row => {
|
|
568
577
|
row.forEach(cell => {
|
|
@@ -48,20 +48,20 @@
|
|
|
48
48
|
<tr :key="rowIndex + '' + jsonArrayItemIndex" v-for="(item, jsonArrayItemIndex) in config.data[row.jsonArrayDataIndex]">
|
|
49
49
|
<!-- 表头 -->
|
|
50
50
|
<td class="tdWithBorder" colspan="6">
|
|
51
|
-
<template v-if="receivedFunction[rowIndex].labelFunction(config).type === 'key'">
|
|
52
|
-
{{ item[receivedFunction[rowIndex].labelFunction(config).content] }}
|
|
51
|
+
<template v-if="receivedFunction[rowIndex].labelFunction(config, item).type === 'key'">
|
|
52
|
+
{{ item[receivedFunction[rowIndex].labelFunction(config, item).content] }}
|
|
53
53
|
</template>
|
|
54
|
-
<template v-if="receivedFunction[rowIndex].labelFunction(config).type === 'value'">
|
|
55
|
-
{{ receivedFunction[rowIndex].labelFunction(config).content }}
|
|
54
|
+
<template v-if="receivedFunction[rowIndex].labelFunction(config, item).type === 'value'">
|
|
55
|
+
{{ receivedFunction[rowIndex].labelFunction(config, item).content }}
|
|
56
56
|
</template>
|
|
57
57
|
</td>
|
|
58
58
|
<!-- 内容 -->
|
|
59
59
|
<td class="tdWithBorder" colspan="6">
|
|
60
|
-
<template v-if="receivedFunction[rowIndex].valueFunction(config).type === 'key'">
|
|
61
|
-
{{ item[receivedFunction[rowIndex].valueFunction(config).content] }}
|
|
60
|
+
<template v-if="receivedFunction[rowIndex].valueFunction(config, item).type === 'key'">
|
|
61
|
+
{{ item[receivedFunction[rowIndex].valueFunction(config, item).content] }}
|
|
62
62
|
</template>
|
|
63
|
-
<template v-if="receivedFunction[rowIndex].valueFunction(config).type === 'value'">
|
|
64
|
-
{{ receivedFunction[rowIndex].valueFunction(config).content }}
|
|
63
|
+
<template v-if="receivedFunction[rowIndex].valueFunction(config, item).type === 'value'">
|
|
64
|
+
{{ receivedFunction[rowIndex].valueFunction(config, item).content }}
|
|
65
65
|
</template>
|
|
66
66
|
</td>
|
|
67
67
|
</tr>
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<!-- <XReport :config-name="'test_tableConfig'" :activated-slot-name="'test_tableConfig_slot'"/>-->
|
|
4
4
|
<!-- <XReport :config-name="'test_tableConfig'" :local-config="test_config_withoutSlot" :config-data="test_config_data"/>-->
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
<!-- <XReport :config-name="'test_tableConfig'" :local-config="test_yangchun_json" :config-data="test_yangchun_data" :dont-format="true"/>-->
|
|
6
|
+
<XReport :config-name="'test_tableConfig'" :local-config="test_yangchun_json" :config-data="test_yangchun_jsonData" :dont-format="true"/>
|
|
7
|
+
<!-- <XReport :config-name="'test_table_config_forEditor'" :dont-format="true"/>-->
|
|
7
8
|
<!-- <XReport config-name="test_tableConfig" :local-config="test_config_json" :config-data="test_config_json_data"/>-->
|
|
8
9
|
</div>
|
|
9
10
|
</template>
|
|
@@ -1092,6 +1093,157 @@ export default {
|
|
|
1092
1093
|
}
|
|
1093
1094
|
},
|
|
1094
1095
|
f_label: '123'
|
|
1096
|
+
},
|
|
1097
|
+
test_yangchun: {
|
|
1098
|
+
slotsDefine: {},
|
|
1099
|
+
subTitle: [],
|
|
1100
|
+
slotsDeclare: [],
|
|
1101
|
+
data: {
|
|
1102
|
+
'serviceall@@@baseuserinfo@@@f_user_name': '',
|
|
1103
|
+
images: {},
|
|
1104
|
+
'serviceall@@@f_new_failure': '',
|
|
1105
|
+
'usermeter@@@f_meternumber': '',
|
|
1106
|
+
'usermeter@@@f_meter_style': '',
|
|
1107
|
+
'usermeter@@@f_meter_brand': '',
|
|
1108
|
+
'serviceall@@@f_date_leave': '',
|
|
1109
|
+
'serviceall@@@f_remarks': '',
|
|
1110
|
+
'serviceall@@@baseuserinfo@@@f_userinfo_code': '',
|
|
1111
|
+
'serviceall@@@f_date_come': '',
|
|
1112
|
+
'serviceall@@@baseuserinfo@@@f_address': '',
|
|
1113
|
+
f_total_feeORf_total_gas: '',
|
|
1114
|
+
'usermeter@@@f_aroundmeter': ''
|
|
1115
|
+
},
|
|
1116
|
+
columns: [
|
|
1117
|
+
[
|
|
1118
|
+
{
|
|
1119
|
+
rowSpan: 1,
|
|
1120
|
+
customFunction: "function (val, config) {\n return config.data.usermeter.f_collection_type === '按金额' ? '累购金额' : '累购气量'\n}",
|
|
1121
|
+
colSpan: 2,
|
|
1122
|
+
text: '累购金额or累购气量',
|
|
1123
|
+
originalRowIndex: 3,
|
|
1124
|
+
type: 'column',
|
|
1125
|
+
originalCellIndex: 0
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
rowSpan: 1,
|
|
1129
|
+
dataIndexType: 'String',
|
|
1130
|
+
dynamicDataIndex: true,
|
|
1131
|
+
colSpan: 4,
|
|
1132
|
+
dataIndex: 'f_total_feeORf_total_gas',
|
|
1133
|
+
customFunctionForDynamicDataIndex: "function (config) {\n if(config.data.usermeter.f_collection_type === '按金额') {\n return 'usermeter@@@f_total_fee'\n }else {\n return 'usermeter@@@f_total_gas'\n }\n}",
|
|
1134
|
+
originalRowIndex: 3,
|
|
1135
|
+
type: 'input',
|
|
1136
|
+
originalCellIndex: 2
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
rowSpan: 1,
|
|
1140
|
+
colSpan: 2,
|
|
1141
|
+
text: '左右表',
|
|
1142
|
+
originalRowIndex: 3,
|
|
1143
|
+
type: 'column',
|
|
1144
|
+
originalCellIndex: 6
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
rowSpan: 1,
|
|
1148
|
+
dataIndexType: 'String',
|
|
1149
|
+
colSpan: 4,
|
|
1150
|
+
dataIndex: 'usermeter@@@f_aroundmeter',
|
|
1151
|
+
originalRowIndex: 3,
|
|
1152
|
+
type: 'input',
|
|
1153
|
+
originalCellIndex: 8
|
|
1154
|
+
}
|
|
1155
|
+
]
|
|
1156
|
+
],
|
|
1157
|
+
width: 'auto',
|
|
1158
|
+
style: {},
|
|
1159
|
+
title: '客户工单信息',
|
|
1160
|
+
designMode: 'VisualTable'
|
|
1161
|
+
},
|
|
1162
|
+
test_yangchun_data: {
|
|
1163
|
+
usermeter: {
|
|
1164
|
+
// f_collection_type: '按金额',
|
|
1165
|
+
f_collection_type: '按气量',
|
|
1166
|
+
f_total_fee: '总金额',
|
|
1167
|
+
f_total_gas: '总气量'
|
|
1168
|
+
}
|
|
1169
|
+
},
|
|
1170
|
+
test_yangchun_json: {
|
|
1171
|
+
title: {
|
|
1172
|
+
type: 'titleKey',
|
|
1173
|
+
value: 'f_type'
|
|
1174
|
+
},
|
|
1175
|
+
content: [
|
|
1176
|
+
{
|
|
1177
|
+
customFunctionForLabel: "function (config,item) {\n\treturn { type: 'key', content: 'f_project' }\n}",
|
|
1178
|
+
customFunctionForValue: "function (config,item) {\n if (item.f_content === null) {\n return { type: 'value', content: '无' }\n }else {\n return { type: 'key', content: 'f_content'}\n }\n}",
|
|
1179
|
+
jsonArrayDataIndex: 'details',
|
|
1180
|
+
type: 'jsonArray'
|
|
1181
|
+
}
|
|
1182
|
+
],
|
|
1183
|
+
designMode: 'json'
|
|
1184
|
+
},
|
|
1185
|
+
test_yangchun_jsonData: {
|
|
1186
|
+
imgs: [],
|
|
1187
|
+
details: [
|
|
1188
|
+
{
|
|
1189
|
+
f_project: '旧表表号',
|
|
1190
|
+
f_service_id: 35917,
|
|
1191
|
+
f_is_must: 'false',
|
|
1192
|
+
id: 224392,
|
|
1193
|
+
type: 'string'
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
f_project: '新表表号',
|
|
1197
|
+
f_service_id: 35917,
|
|
1198
|
+
f_is_must: 'false',
|
|
1199
|
+
id: 224393,
|
|
1200
|
+
type: 'string'
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
f_project: '引入方式',
|
|
1204
|
+
f_service_id: 35917,
|
|
1205
|
+
f_is_must: 'false',
|
|
1206
|
+
id: 224394,
|
|
1207
|
+
type: 'selector'
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
f_project: '是否高空作业',
|
|
1211
|
+
f_service_id: 35917,
|
|
1212
|
+
f_is_must: 'false',
|
|
1213
|
+
id: 224395,
|
|
1214
|
+
type: 'selector'
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
f_project: '处理结果',
|
|
1218
|
+
f_service_id: 35917,
|
|
1219
|
+
f_is_must: 'false',
|
|
1220
|
+
id: 224396,
|
|
1221
|
+
type: 'selector'
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
f_project: '位置',
|
|
1225
|
+
f_service_id: 35917,
|
|
1226
|
+
f_is_must: 'false',
|
|
1227
|
+
id: 224397,
|
|
1228
|
+
type: 'selector'
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
f_project: '补装管卡',
|
|
1232
|
+
f_service_id: 35917,
|
|
1233
|
+
f_is_must: 'false',
|
|
1234
|
+
id: 224398,
|
|
1235
|
+
type: 'selector'
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
f_project: '备注',
|
|
1239
|
+
f_service_id: 35917,
|
|
1240
|
+
f_is_must: 'false',
|
|
1241
|
+
id: 224399,
|
|
1242
|
+
type: 'string'
|
|
1243
|
+
}
|
|
1244
|
+
],
|
|
1245
|
+
id: 35917,
|
|
1246
|
+
f_type: '改管维修'
|
|
1095
1247
|
}
|
|
1096
1248
|
}
|
|
1097
1249
|
},
|