提交 8a03c543 编写于 作者: ibizdev's avatar ibizdev

zhujiamin 发布系统代码 [TrainSys,网页端]

上级 989cf026
......@@ -13,13 +13,13 @@
"dependencies": {
"@floating-ui/dom": "^1.0.11",
"@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.126",
"@ibiz-template/core": "^0.0.1-beta.126",
"@ibiz-template/model": "^0.0.1-beta.126",
"@ibiz-template/runtime": "^0.0.1-beta.126",
"@ibiz-template/service": "^0.0.1-beta.126",
"@ibiz-template/theme": "^0.0.1-beta.126",
"@ibiz-template/vue-util": "^0.0.1-beta.126",
"@ibiz-template/controller": "^0.0.1-beta.127",
"@ibiz-template/core": "^0.0.1-beta.127",
"@ibiz-template/model": "^0.0.1-beta.127",
"@ibiz-template/runtime": "^0.0.1-beta.127",
"@ibiz-template/service": "^0.0.1-beta.127",
"@ibiz-template/theme": "^0.0.1-beta.127",
"@ibiz-template/vue-util": "^0.0.1-beta.127",
"@ibiz/dynamic-model-api": "^2.1.28",
"@riophae/vue-treeselect": "^0.4.0",
"dayjs": "^1.11.7",
......
此差异已折叠。
......@@ -59,24 +59,44 @@ export const GridControl = defineComponent({
return ctrlParams?.HIGHLIGHT !== 'false';
});
let timer: number | null = null;
// iView表格单击行选中没有,必须手动调用选中方法
const onUIRowClick = (data: IData, index: number) => {
const gridInstance: IData | undefined = proxy.$refs.grid;
if (gridInstance) {
if (gridInstance.toggleSelect) {
gridInstance.toggleSelect(index);
}
const objData = gridInstance.objData;
const rowData = objData?.[index];
if (rowData) {
if (rowData._isChecked) {
gridInstance.highlightCurrentRow(index);
} else {
if (timer != null) {
window.clearTimeout(timer);
}
timer = window.setTimeout(() => {
const gridInstance: IData | undefined = proxy.$refs.grid;
if (gridInstance) {
const selectedItem = c.selectedData.find(
item => item.srfkey === data.srfkey,
);
if (selectedItem) {
gridInstance.clearCurrentRow();
}
if (gridInstance.toggleSelect) {
gridInstance.toggleSelect(index);
}
}
onRowClick(data);
}, 300);
};
const onUIDbRowClick = (data: IData) => {
if (timer != null) {
window.clearTimeout(timer);
}
const gridInstance: IData | undefined = proxy.$refs.grid;
if (gridInstance) {
const selectedItem = c.selectedData.find(
item => item.srfkey === data.srfkey,
);
if (!selectedItem) {
gridInstance.clearCurrentRow();
}
}
onRowClick(data);
onDbRowClick(data);
};
// 给到iView table组件的高度
......@@ -151,6 +171,7 @@ export const GridControl = defineComponent({
tableData,
onDbRowClick,
onUIRowClick,
onUIDbRowClick,
onSelectionChange,
onSortChange,
onPageChange,
......@@ -211,11 +232,11 @@ export const GridControl = defineComponent({
height={this.tableHeight}
class={this.ns.b('content')}
show-header={!this.c.model.source.hideHeader}
highlight-row={this.highlight}
highlight-row={this.c.singleSelect && this.highlight}
data={this.tableData}
columns={this.columns}
on-on-row-click={this.onUIRowClick}
on-on-row-dblclick={this.onDbRowClick}
on-on-row-dblclick={this.onUIDbRowClick}
on-on-selection-change={this.onSelectionChange}
on-on-sort-change={this.onSortChange}
row-class-name={(row: IData) => (row.hiddenRow ? 'hidden-row' : '')}
......
......@@ -1432,16 +1432,16 @@
"codeName" : "VMGroup2",
"name" : "视图消息组2",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "视图消息2",
"name" : "视图消息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg3"
"id" : "ViewMsg2"
}
}, {
"name" : "视图消息",
"name" : "视图消息2",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg2"
"id" : "ViewMsg3"
}
} ]
}, {
......
......@@ -10019,16 +10019,16 @@
"codeName" : "VMGroup2",
"name" : "视图消息组2",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "视图消息2",
"name" : "视图消息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg3"
"id" : "ViewMsg2"
}
}, {
"name" : "视图消息",
"name" : "视图消息2",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg2"
"id" : "ViewMsg3"
}
} ]
}, {
......@@ -10057,12 +10057,6 @@
"codeName" : "VMGroup3",
"name" : "视图消息类型测试",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "消息类型-常规信息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg4"
}
}, {
"name" : "消息类型-警告信息",
"getPSAppViewMsg" : {
"modelref" : true,
......@@ -10074,6 +10068,12 @@
"modelref" : true,
"id" : "ViewMsg6"
}
}, {
"name" : "消息类型-常规信息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg4"
}
} ]
}, {
"codeName" : "VMGroup7",
......@@ -10089,16 +10089,16 @@
"codeName" : "VMGroup4",
"name" : "视图消息位置测试",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "消息位置-弹出",
"name" : "消息位置-视图下方",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg10"
"id" : "ViewMsg8"
}
}, {
"name" : "消息位置-视图上方",
"name" : "消息位置-弹出",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg7"
"id" : "ViewMsg10"
}
}, {
"name" : "消息位置-视图内容区",
......@@ -10107,20 +10107,20 @@
"id" : "ViewMsg9"
}
}, {
"name" : "消息位置-视图方",
"name" : "消息位置-视图方",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg8"
"id" : "ViewMsg7"
}
} ]
}, {
"codeName" : "VMGroup8",
"name" : "【静态测试】",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "消息位置-视图下方",
"name" : "关闭模式-本次删除-上方-警告",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg8"
"id" : "ViewMsg13"
}
}, {
"name" : "消息类型-错误信息",
......@@ -10130,30 +10130,23 @@
},
"position" : "POPUP"
}, {
"name" : "消息类型-警告信息",
"name" : "消息类型-常规信息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg5"
"id" : "ViewMsg4"
},
"position" : "POPUP"
}, {
"name" : "关闭模式-无删除-上方-常规",
"name" : "消息位置-视图下方",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg11"
"id" : "ViewMsg8"
}
}, {
"name" : "消息类型-常规信息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg4"
},
"position" : "POPUP"
}, {
"name" : "关闭模式-默认删除-上方-错误",
"name" : "关闭模式-无删除-上方-常规",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg12"
"id" : "ViewMsg11"
}
}, {
"name" : "消息位置-视图内容区",
......@@ -10162,32 +10155,39 @@
"id" : "ViewMsg9"
}
}, {
"name" : "关闭模式-本次删除-上方-警告",
"name" : "消息类型-警告信息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg13"
"id" : "ViewMsg5"
},
"position" : "POPUP"
}, {
"name" : "关闭模式-默认删除-上方-错误",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg12"
}
} ]
}, {
"codeName" : "VMGroup5",
"name" : "视图消息关闭模式",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "关闭模式-默认删除",
"name" : "关闭模式-删除",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg12"
"id" : "ViewMsg11"
}
}, {
"name" : "关闭模式-本次删除",
"name" : "关闭模式-默认删除",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg13"
"id" : "ViewMsg12"
}
}, {
"name" : "关闭模式-删除",
"name" : "关闭模式-本次删除",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg11"
"id" : "ViewMsg13"
}
} ]
}, {
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册