From d0829c762660cf1275c99cf5fe4d02dd0c364928 Mon Sep 17 00:00:00 2001 From: ptt <2403326863@qq.com> Date: Tue, 8 Jul 2025 14:50:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9B=B4=E5=A4=9A=E6=8C=89=E9=92=AE(=E6=B5=8B?= =?UTF-8?q?=E8=AF=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repc/resp/portal/IndexEditNewPlugin.java | 2 +- .../resp/portal/NoticeCardEditNewPlugin.java | 56 +++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 main/java/shkd/repc/resp/portal/NoticeCardEditNewPlugin.java diff --git a/main/java/shkd/repc/resp/portal/IndexEditNewPlugin.java b/main/java/shkd/repc/resp/portal/IndexEditNewPlugin.java index 0c148a1..e9f332b 100644 --- a/main/java/shkd/repc/resp/portal/IndexEditNewPlugin.java +++ b/main/java/shkd/repc/resp/portal/IndexEditNewPlugin.java @@ -160,7 +160,7 @@ public class IndexEditNewPlugin extends IndexEditNew implements SearchEnterListe super.beforeDoOperation(args); FormOperate operate = (FormOperate)args.getSource(); String key = operate.getOperateKey(); - String[] switchKeys = new String[]{"home", "bidprojanno", "bidwinanno", "recruitanno", "contactus", "notification"}; + String[] switchKeys = new String[]{"home", "bidprojanno", "bidwinanno", "recruitanno", "contactus", "qeug_notification"}; List switchKeyList = CollectionUtils.arrayToList(switchKeys); String globalSessionId; if (switchKeyList.contains(key)) { diff --git a/main/java/shkd/repc/resp/portal/NoticeCardEditNewPlugin.java b/main/java/shkd/repc/resp/portal/NoticeCardEditNewPlugin.java new file mode 100644 index 0000000..cfcc523 --- /dev/null +++ b/main/java/shkd/repc/resp/portal/NoticeCardEditNewPlugin.java @@ -0,0 +1,56 @@ +package shkd.repc.resp.portal; + +import kd.bos.dataentity.resource.ResManager; +import kd.bos.entity.datamodel.IDataModel; +import kd.bos.form.IFormView; +import kd.bos.form.control.Label; +import kd.bos.form.control.events.ClickListener; +import kd.bos.form.plugin.AbstractFormPlugin; +import kd.bos.orm.util.CollectionUtils; +import kd.repc.resp.formplugin.portal.PortalLableStyleChangeUtil; + +import java.util.EventObject; +import java.util.List; + +public class NoticeCardEditNewPlugin extends AbstractFormPlugin implements ClickListener { + public NoticeCardEditNewPlugin() { + } + + public void initialize() { + super.initialize(); + } + + public void registerListener(EventObject eventobject) { + this.addClickListeners(new String[]{"bidprojanno", "bidwinanno", "recruitanno", "qeug_notification"}); + } + + public void click(EventObject eventobject) { + super.click(eventobject); + String[] moreLabels = new String[]{"bidprojanno", "bidwinanno", "recruitanno", "qeug_notification"}; + List moreLabelLists = CollectionUtils.arrayToList(moreLabels); + String key = ((Label)eventobject.getSource()).getKey(); + if (moreLabelLists.contains(key)) { + IFormView view = this.getView(); + String parentPageId = (String)view.getFormShowParameter().getCustomParam("parentPageId"); + IFormView parentView = view.getView(parentPageId); + switch (key) { + case "qeug_notification": + (new PortalLableStyleChangeUtil()).addClickedLableStyle(parentView, "qeug_label_notification", ResManager.loadKDString("通知公告", "AnnounceCardEdit_5", "repc-resp-formplugin", new Object[0])); + break; + case "bidprojanno": + (new PortalLableStyleChangeUtil()).addClickedLableStyle(parentView, "label_bidproj", ResManager.loadKDString("招标公告", "AnnounceCardEdit_0", "repc-resp-formplugin", new Object[0])); + break; + case "bidwinanno": + (new PortalLableStyleChangeUtil()).addClickedLableStyle(parentView, "label_bidwon", ResManager.loadKDString("中标公告", "AnnounceCardEdit_1", "repc-resp-formplugin", new Object[0])); + break; + case "recruitanno": + (new PortalLableStyleChangeUtil()).addClickedLableStyle(parentView, "label_recruit", ResManager.loadKDString("招募公告", "AnnounceCardEdit_2", "repc-resp-formplugin", new Object[0])); + } + + IDataModel parentModel = (IDataModel)parentView.getService(IDataModel.class); + parentModel.setValue("showcontrol", key); + this.getView().sendFormAction(parentView); + } + + } +}