通知公告添加更多按钮(测试)
This commit is contained in:
		
							parent
							
								
									72516087f8
								
							
						
					
					
						commit
						d0829c7626
					
				| 
						 | 
					@ -160,7 +160,7 @@ public class IndexEditNewPlugin extends IndexEditNew implements SearchEnterListe
 | 
				
			||||||
        super.beforeDoOperation(args);
 | 
					        super.beforeDoOperation(args);
 | 
				
			||||||
        FormOperate operate = (FormOperate)args.getSource();
 | 
					        FormOperate operate = (FormOperate)args.getSource();
 | 
				
			||||||
        String key = operate.getOperateKey();
 | 
					        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<String> switchKeyList = CollectionUtils.arrayToList(switchKeys);
 | 
					        List<String> switchKeyList = CollectionUtils.arrayToList(switchKeys);
 | 
				
			||||||
        String globalSessionId;
 | 
					        String globalSessionId;
 | 
				
			||||||
        if (switchKeyList.contains(key)) {
 | 
					        if (switchKeyList.contains(key)) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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<String> 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);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue