提交 708a7b62 authored 作者: Ras's avatar Ras

新增筛选子表数据功能

上级 2753e792
...@@ -707,13 +707,13 @@ ...@@ -707,13 +707,13 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
// 是否一直显示编辑框,如果为false则只有点击的时候才出现输入框 // 数据源
compareFields: { compareFields: {
type: Object, type: Object,
default() { default: () => {}
return {}
}
}, },
}, },
data() { data() {
return { return {
...@@ -785,6 +785,7 @@ ...@@ -785,6 +785,7 @@
currentEditRows: {}, currentEditRows: {},
// 上次push数据的事件,用于判断是否点击过快 // 上次push数据的事件,用于判断是否点击过快
lastPushTimeMap: new Map(), lastPushTimeMap: new Map(),
} }
}, },
created() { created() {
...@@ -1078,9 +1079,8 @@ ...@@ -1078,9 +1079,8 @@
dataSource.forEach((data, newValueIndex) => { dataSource.forEach((data, newValueIndex) => {
//根据件数与关联件数筛选子表数据
//根据件数筛选子表数据 if(this.compareFields !== undefined && this.compareFields.f1 !== undefined && this.compareFields.f2 !== undefined && data[this.compareFields.f1] >= data[this.compareFields.f2]){
if(data[this.compareFields.field1] >= data[this.compareFields.field2]){
return; return;
} }
// 不能直接更改数据源的id // 不能直接更改数据源的id
...@@ -1095,6 +1095,8 @@ ...@@ -1095,6 +1095,8 @@
let value = { id: dataId } let value = { id: dataId }
let disabled = false let disabled = false
this.columns.forEach(column => { this.columns.forEach(column => {
if(!this.columnsDic[column.key]) if(!this.columnsDic[column.key])
{ {
this.columnsDic[column.key] = column; this.columnsDic[column.key] = column;
...@@ -1158,10 +1160,8 @@ ...@@ -1158,10 +1160,8 @@
} else if (column.type === FormTypes.date || column.type === FormTypes.datetime) { } else if (column.type === FormTypes.date || column.type === FormTypes.datetime) {
jdateValues[inputId] = sourceValue jdateValues[inputId] = sourceValue
} else if (column.type === FormTypes.slot) { } else if (column.type === FormTypes.slot) {
slotValues[inputId] = sourceValue slotValues[inputId] = sourceValue
} else if (column.type === FormTypes.popup) { } else if (column.type === FormTypes.popup) {
popupValues[inputId] = sourceValue popupValues[inputId] = sourceValue
} else if (column.type === FormTypes.input_pop) { } else if (column.type === FormTypes.input_pop) {
...@@ -1246,6 +1246,7 @@ ...@@ -1246,6 +1246,7 @@
this.radioValues = radioValues this.radioValues = radioValues
this.multiSelectValues = multiSelectValues this.multiSelectValues = multiSelectValues
this.searchSelectValues = searchSelectValues this.searchSelectValues = searchSelectValues
// 重新计算所有统计列 // 重新计算所有统计列
this.recalcAllStatisticsColumns() this.recalcAllStatisticsColumns()
// 更新到 dom // 更新到 dom
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论