项目计划进度显示设置放入列表菜单-空闲资源显示开关放到界面显示

栏目:云星瀚知识作者:金蝶来源:金蝶云社区发布:2024-09-23浏览:1

项目计划进度显示设置放入列表菜单-空闲资源显示开关放到界面显示

1. 在列表菜单栏增加显示设置中的属性


 

2. 在对应甘特图布局增加二开插件、当操作新增按钮时更新缓存和个人配置,参考如下代码:

                   ListView view = (ListView) this.getView();

                   //获取个人配置

                   GanttPageShowModel config = GanttUserConfigUtils.getPageShowSet(view);

                   //设置操作按钮对应属性(以空横道展示为例)

        config.setEmptyBarsShow(Boolean.TRUE);

                   //保存个人配置

        GanttUserConfigUtils.setConfig(view, config);

                   //缓存显示设置

        GanttCacheUtils.cacheBigObject(view.getPageId(), GanttBigCacheConst.PAGESHOWSET, config);

                  

                   //向前端页面发送数据,刷新甘特图

                   String pageId = view.getPageId();

        List<String> dataModelTypeList = GanttDataUtils.getDataModelTypeList(pageId);

        Map<String, String> modelTypeToCtrlMap = GanttDataUtils.getModelTypeToCtrlMap(pageId);

 

        for (String dataModelType : dataModelTypeList) {

            String ganttCtl = modelTypeToCtrlMap.get(dataModelType);

 

            Map<String, Object> resultMap = GanttUtils.getReResult("gtRefreshViewSchem");

            resultMap.put(GanttResultConst.SUCCESS, Boolean.TRUE);

            resultMap.put("viewSchem", config);

 

            GanttViewSchemModel viewSchemModel = GanttCacheUtils.getCacheBigObjectWithDataModel(view.getPageCache(), dataModelType, GanttBigCacheConst.VIEWSCHEM);

            GanttGlobalModel globalModel = GanttCacheUtils.getCacheBigObjectWithDataModel(view.getPageCache(), dataModelType, GanttBigCacheConst.GANTTMODEL);

            GanttDataUtils.copyProperties(viewSchemModel, config);

            globalModel.setViewSchem(viewSchemModel);

            GanttCacheUtils.cacheBigObjectWithDataModel(view.getPageCache(), dataModelType, GanttBigCacheConst.GANTTMODEL, globalModel);

            GanttCacheUtils.cacheBigObjectWithDataModel(view.getPageCache(), dataModelType, GanttBigCacheConst.VIEWSCHEM, viewSchemModel);

            GanttUtils.sendGanttMessage(view, ganttCtl, resultMap);

        }

 

3. 在显示设置中更改对应按钮值时更新按钮(复选框)状态时更新页面新增复选框值,在显示设置页面(mpdm_gantt_showsett)中注册二开插件,二开插件逻辑如下:

             @Override

    public void click(EventObject evt) {

        super.click(evt);

        Control control = (Control) evt.getSource();

        String key = control.getKey();

        if ("btnok".equals(key)) {

           //在此实现对应逻辑(如更改复选框值、锁定按钮等)

                      //以复选框为例

           IFormView parentView = this.getView().getParentView();

            parentView.getModel().setValue("对应复选框key", "对应复选框值");

            parentView.updateView();

            this.getView().sendFormAction(parentView);

        }

    }


项目计划进度显示设置放入列表菜单-空闲资源显示开关放到界面显示

1. 在列表菜单栏增加显示设置中的属性 2. 在对应甘特图布局增加二开插件、当操作新增按钮时更新缓存和个人配置,参考如下代码: ...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息