提交 16124202 编写于 作者: Mosher's avatar Mosher

新增表格重置表格项

上级 6cba9f8a
...@@ -2363,6 +2363,7 @@ ${gridColumn.getName()} ...@@ -2363,6 +2363,7 @@ ${gridColumn.getName()}
} }
} }
this.curEditRowData = row; this.curEditRowData = row;
this.resetGridData(row, property, rowIndex);
this.validate(property,row,rowIndex); this.validate(property,row,rowIndex);
<#if ctrl.getPSDEGridEditItems()??> <#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem> <#list ctrl.getPSDEGridEditItems() as editItem>
...@@ -2752,6 +2753,31 @@ ${gridColumn.getName()} ...@@ -2752,6 +2753,31 @@ ${gridColumn.getName()}
} }
} }
/**
* 重置表格项值
*
* @param {*} row 当前行
* @param {string} property 属性名
* @param {number} rowIndex 行下标
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public resetGridData(row: any, property: string, rowIndex: number) {
<#if ctrl.getPSDEGridColumns?? && ctrl.getPSDEGridColumns()??>
if(this.actualIsOpenEdit) {
<#list ctrl.getPSDEGridColumns() as column>
<#if column.getResetItemName?? && column.getResetItemName()??>
if(Object.is(property, '${column.getResetItemName()}')) {
this.onGridItemValueChange(row, {name: '${column.getName()}', value: null}, rowIndex);
<#if column.getValueItemName?? && column.getValueItemName()?? && column.getValueItemName() != ''>
this.onGridItemValueChange(row, {name: '${column.getValueItemName()}', value: null}, rowIndex);
</#if>
}
</#if>
</#list>
}
</#if>
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册