vue2-client 1.8.150 → 1.8.151

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.150",
3
+ "version": "1.8.151",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -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 => {
@@ -2,8 +2,8 @@
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
- <XReport :config-name="'test_tableConfig'" :local-config="test_deepKey_dynamicLabel" :config-data="test_deepKey_dynamicLabel_data" :dont-format="true"/>
6
- <!-- <XReport :config-name="'test_table_config_forEditor'" :dont-format="true"/>-->
5
+ <XReport :config-name="'test_tableConfig'" :local-config="test_yangchun" :config-data="test_yangchun_data" :dont-format="true"/>
6
+ <!-- <XReport :config-name="'test_table_config_forEditor'" :dont-format="true"/>-->
7
7
  <!-- <XReport config-name="test_tableConfig" :local-config="test_config_json" :config-data="test_config_json_data"/>-->
8
8
  </div>
9
9
  </template>
@@ -1092,6 +1092,79 @@ export default {
1092
1092
  }
1093
1093
  },
1094
1094
  f_label: '123'
1095
+ },
1096
+ test_yangchun: {
1097
+ slotsDefine: {},
1098
+ subTitle: [],
1099
+ slotsDeclare: [],
1100
+ data: {
1101
+ 'serviceall@@@baseuserinfo@@@f_user_name': '',
1102
+ images: {},
1103
+ 'serviceall@@@f_new_failure': '',
1104
+ 'usermeter@@@f_meternumber': '',
1105
+ 'usermeter@@@f_meter_style': '',
1106
+ 'usermeter@@@f_meter_brand': '',
1107
+ 'serviceall@@@f_date_leave': '',
1108
+ 'serviceall@@@f_remarks': '',
1109
+ 'serviceall@@@baseuserinfo@@@f_userinfo_code': '',
1110
+ 'serviceall@@@f_date_come': '',
1111
+ 'serviceall@@@baseuserinfo@@@f_address': '',
1112
+ f_total_feeORf_total_gas: '',
1113
+ 'usermeter@@@f_aroundmeter': ''
1114
+ },
1115
+ columns: [
1116
+ [
1117
+ {
1118
+ rowSpan: 1,
1119
+ customFunction: "function (val, config) {\n return config.data.usermeter.f_collection_type === '按金额' ? '累购金额' : '累购气量'\n}",
1120
+ colSpan: 2,
1121
+ text: '累购金额or累购气量',
1122
+ originalRowIndex: 3,
1123
+ type: 'column',
1124
+ originalCellIndex: 0
1125
+ },
1126
+ {
1127
+ rowSpan: 1,
1128
+ dataIndexType: 'String',
1129
+ dynamicDataIndex: true,
1130
+ colSpan: 4,
1131
+ dataIndex: 'f_total_feeORf_total_gas',
1132
+ 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}",
1133
+ originalRowIndex: 3,
1134
+ type: 'input',
1135
+ originalCellIndex: 2
1136
+ },
1137
+ {
1138
+ rowSpan: 1,
1139
+ colSpan: 2,
1140
+ text: '左右表',
1141
+ originalRowIndex: 3,
1142
+ type: 'column',
1143
+ originalCellIndex: 6
1144
+ },
1145
+ {
1146
+ rowSpan: 1,
1147
+ dataIndexType: 'String',
1148
+ colSpan: 4,
1149
+ dataIndex: 'usermeter@@@f_aroundmeter',
1150
+ originalRowIndex: 3,
1151
+ type: 'input',
1152
+ originalCellIndex: 8
1153
+ }
1154
+ ]
1155
+ ],
1156
+ width: 'auto',
1157
+ style: {},
1158
+ title: '客户工单信息',
1159
+ designMode: 'VisualTable'
1160
+ },
1161
+ test_yangchun_data: {
1162
+ usermeter: {
1163
+ // f_collection_type: '按金额',
1164
+ f_collection_type: '按气量',
1165
+ f_total_fee: '总金额',
1166
+ f_total_gas: '总气量'
1167
+ }
1095
1168
  }
1096
1169
  }
1097
1170
  },