如何使用插件控制一个页签关闭时跳转到指定位置的页签
【问题描述】
如何使用插件控制一个页签关闭时跳转到指定位置的页签
星空默认的页签关闭动作,会跳转至当前页签的上一个位置的页签,如果想要关闭页签后跳转指定页签怎么做?
【场景介绍】
关闭页签后跳转指定索引的页签,以主控台为例(主控台首页索引为0)
【解决方案】
请尝试新增下列插件代码来解决:
一. 主要步骤
重写表单插件的FormClosed方法
关闭时设置页签索引为0
二. 详细代码
public override void FormClosed(FormClosedEventArgs e)
{
IDynamicFormView mainview = null;
if (this.View.ClientType == ClientType.Html) {
//这里H5端,关闭页面强制返回到主控首页,不分免登打开,还是主控处理打开
mainview = ViewUtils.GetHtml5MainEditPageView(this.View);
if (mainview != null) {
bool findmaintab = mainview.LayoutInfo.Appearances.Where(x => x.Key.EqualsIgnoreCase("FMainTab")).FirstOrDefault() != null;
if (findmaintab) {
mainview.GetControl < TabControl > ("FMainTab").SetCustomPropertyValue("SelectedIndex", 0);
this.View.SendDynamicFormAction(mainview);
}
}
}
}
运行之后可以看到,关闭页签自动跳转到了主控台页面:
如何使用插件控制一个页签关闭时跳转到指定位置的页签
本文2024-09-23 04:26:31发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-165325.html
- 鼎捷API-T100-5.生产信息API-发出还原工单数据-t100.oapi.wo.data.unissue-wssp00180CN02_s.pdf
- 鼎捷API-T100-5.生产信息API-读取当站报废单数据-t100.oapi.station.scrapped.details.data.read.get-wssp00282CN02_s.pdf
- 鼎捷API-T100-4.物流信息API-查询杂发单列表数据-t100.oapi.other.out.inventory.list.data.query.get-wssp00273CN02_s.pdf
- 鼎捷API-T100-1.企业基础API-删除部门数据-t100.oapi.department.data.delete-wssp00023CN02_s.pdf
- 鼎捷API-T100-5.生产信息API-取消审核退料单数据-t100.oapi.picking.return.data.disapprove-wssp00200CN02_s.pdf
- 鼎捷API-T100-1.企业基础API-读取工作历明细数据-t100.oapi.work.calendar.details.data.read.get-wssp00049CN02_s.pdf
- 鼎捷API-T100-2.采购信息API-建立采购验退单数据-t100.oapi.purchase.inspection.return.data.create-wssp00112CN02_s.pdf
- 鼎捷API-T100-2.采购信息API-更新采购单数据-t100.oapi.purchase.order.data.update-wssp00155CN02_s.pdf
- 鼎捷API-T100-5.生产信息API-查询当站报废单列表数据-t100.oapi.station.scrapped.list.data.query.get-wssp00283CN02_s.pdf
- 鼎捷API-T100-3.销售信息API-更新出货单数据-t100.oapi.shipping.data.update-wssp00145CN02_s.pdf