+ {text || text === 0 ? text : Vue.prototype.global.emptyLine}
+ {text || text === 0 ? text : Vue.prototype.global.emptyLine}
+ ,
+ attrs: {
+ // 合并行 含col字段则合并,其他的必须设置为0!!
+ rowSpan: row.col ? row.col : 0,
+ }
+ }
+ }
+ // scopedSlots: { customRender: 'text' }
},
{ // 新生产车实施日期
title: this.$t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate'),
@@ -340,6 +383,48 @@ export default {
this.loading = false
})
},
+ loadData (arg) {
+ // 加载数据 若传入参数1则加载第一页的内容
+ if (arg === 1) {
+ this.ipagination.current = 1
+ }
+ const params = this.getQueryParams()// 查询条件
+ console.log(params)
+ this.loading = true
+ getAction(this.url.list, params).then((res) => {
+ if (res.success) {
+ // update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
+ const result = res.result.records || res.result
+ this.dataSource = result.map(item => {
+ const arr = this.indexcount(result, item.standardNumber)
+ return {
+ ...item,
+ col: item.id === arr[0] ? arr.length : 0
+ }
+ })
+ if (res.result.total) {
+ this.ipagination.total = res.result.total
+ } else {
+ this.ipagination.total = 0
+ }
+ // update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
+ } else {
+ this.$message.warning(res.message)
+ }
+ }).finally(() => {
+ this.loading = false
+ })
+ },
+ // 出现次数
+ indexcount (arr, item) {
+ const arr1 = []
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i].standardNumber == item) {
+ arr1.push(arr[i].id)
+ }
+ }
+ return arr1
+ },
toDetail (record) {
const path = '/standardRegulationLibrary/foreignStandardDetailPage'
this.$openPageNewSheet({