优化代码 资源i清单监听

This commit is contained in:
xiaoshi 2024-12-16 19:32:17 +08:00
parent 2b4ef29849
commit edcc45ff26
1 changed files with 15 additions and 6 deletions

View File

@ -17,22 +17,31 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
Map<String, Object> customParams = formShowParameter.getCustomParams();
Object contractType = customParams.get("contractType");
String firstOpen = this.getPageCache().get("firstOpen");
if (firstOpen != null) {
if (firstOpen == null) {
// this.getPageCache().put("firstOpen", "false");
this.getPageCache().remove("firstOpen");
this.getPageCache().put("firstOpen","false");
// this.setResourceTypeStyle("material");
// this.afterSelectedTag("material");
// contractType="ck";
if (contractType != null) {
if (contractType.toString().equals("wzcg")) {//物资采购
this.setResourceTypeStyle("material");
this.afterSelectedTag("material");
} else if (contractType.toString().equals("sbcg")) {//设备采购
this.setResourceTypeStyle("equipment");
this.afterSelectedTag("equipment");
}else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")) {//产出物
this.setResourceTypeStyle("turnover");
this.afterSelectedTag("turnover");
}else {
this.setResourceTypeStyle("material");
this.afterSelectedTag("material");
}
}
}else{
this.getPageCache().put("firstOpen","false");
}
System.out.println();
@ -45,8 +54,9 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
Map<String, Object> customParams = formShowParameter.getCustomParams();
Object contractType = customParams.get("contractType");
String firstOpen = this.getPageCache().get("firstOpen");
if (firstOpen != null) {
if (firstOpen == null) {
this.getPageCache().put("firstOpen", "false");
// contractType = "ck";
if (contractType != null) {
if (contractType.toString().equals("wzcg")) {//物资采购
this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
@ -64,7 +74,6 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
@Override
public void registerListener(EventObject e) {
super.registerListener(e);
Image subLabel = (Image)this.getView().getControl("sub");
subLabel.addClickListener(this);
Image labourLabel = (Image)this.getView().getControl("labour");