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); + } + + } +}