提交 3281ee10 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 7ed48ea7
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
{{/if}} {{/if}}
{{#if (eq item.columnType 'UAGRIDCOLUMN')}} {{#if (eq item.columnType 'UAGRIDCOLUMN')}}
{{!-- <ibizToolbar {{!-- <ibizToolbar
:toolbarModel="state.actionModel" :toolbarModel="record.{{lowerCase item.codeName}}"
@toolbarEvent="handleToolbarEvent"
:context="state.context" :context="state.context"
:viewParams="state.viewParams"/> --}} :viewParams="state.viewParams"
@toolbarEvent="($event: ) => handleToolbarEvent()"/> --}}
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}
...@@ -38,7 +38,12 @@ export class GridControl extends MainControl { ...@@ -38,7 +38,12 @@ export class GridControl extends MainControl {
* @memberof GridControl * @memberof GridControl
*/ */
public gridDataChange(rowIndex: number, name: string, value: any){ public gridDataChange(rowIndex: number, name: string, value: any){
if (this.controlState.items[rowIndex][name] !== value) {
this.controlState.items[rowIndex][name] = value; this.controlState.items[rowIndex][name] = value;
if (!this.controlState.items[rowIndex]["rowDataState"]) {
this.controlState.items[rowIndex]["rowDataState"] = "update";
}
}
} }
/** /**
......
...@@ -53,6 +53,7 @@ const rowClassName = (record: IParam, index: number) => { ...@@ -53,6 +53,7 @@ const rowClassName = (record: IParam, index: number) => {
const customRow = (record: IParam, index: number) => { const customRow = (record: IParam, index: number) => {
return { return {
onClick: () => { onClick: () => {
if (!props.rowEditState) {
state.selectedRowKeys = [record.srfkey]; state.selectedRowKeys = [record.srfkey];
if (!record.children) { if (!record.children) {
emit("ctrlEvent",{ tag: state.controlName, action: "selectionChange", data: [deepCopy(record)] }) emit("ctrlEvent",{ tag: state.controlName, action: "selectionChange", data: [deepCopy(record)] })
...@@ -60,6 +61,7 @@ const customRow = (record: IParam, index: number) => { ...@@ -60,6 +61,7 @@ const customRow = (record: IParam, index: number) => {
emit("ctrlEvent",{ tag: state.controlName, action: "rowClick", data: [deepCopy(record)] }) emit("ctrlEvent",{ tag: state.controlName, action: "rowClick", data: [deepCopy(record)] })
} }
} }
}
}, },
onDblclick: () => { onDblclick: () => {
if (!record.children && Object.is(props.rowActiveMode, 2)) { if (!record.children && Object.is(props.rowActiveMode, 2)) {
...@@ -70,6 +72,9 @@ const customRow = (record: IParam, index: number) => { ...@@ -70,6 +72,9 @@ const customRow = (record: IParam, index: number) => {
} }
// 表格选择功能配置 // 表格选择功能配置
const rowSelectionOption = computed(() => { const rowSelectionOption = computed(() => {
if (props.rowEditState || props.selectFirstDefault) {
return false;
}
return { return {
columnWidth: {{#neq ctrl.aggMode 'NONE'}}90{{else}}50{{/neq}}, columnWidth: {{#neq ctrl.aggMode 'NONE'}}90{{else}}50{{/neq}},
selectedRowKeys: state.selectedRowKeys, selectedRowKeys: state.selectedRowKeys,
...@@ -102,7 +107,7 @@ const handleChange = (pagination: IParam, filters: IParam, sorter: IParam, data: ...@@ -102,7 +107,7 @@ const handleChange = (pagination: IParam, filters: IParam, sorter: IParam, data:
<a-table <a-table
bordered bordered
sticky sticky
class="ibiz-grid" class="ibiz-grid{{#if ctrl.psSysCss}} {{ctrl.psSysCss.cssName}}{{/if}}"
:rowKey="rowKey" :rowKey="rowKey"
:showHeader="{{#if ctrl.hideHeader}}false{{else}}true{{/if}}" :showHeader="{{#if ctrl.hideHeader}}false{{else}}true{{/if}}"
:scroll="gridScrollOption" :scroll="gridScrollOption"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册