|
发表于 2016-9-6 14:12:16
|
显示全部楼层
1.把windowDialog的forceRefreshOnOpen设置为true
2.子页面的data上的树形设置去掉,然后在Model.prototype.windowReceiverReceive方法中如下修改
- Model.prototype.windowReceiverReceive = function(event) {
- var orgData = this.comp("orgData");
- this._params = event.data;
- this.openMode.set(this._params.openMode || "view");
- var parentID = this._params.parentID;
-
- if (this._params.openMode == "new") {
- if(parentID){
- orgData.setFilter("filter1", "Base_class_dict='" + parentID + "'");
- orgData.refreshData();
- orgData.setValue("NODE_KIND","");
- }
- orgData.newData();
- orgData.setValue("UPPER_CODE", parentID);
- orgData.setValue("PARENT_NAME", this._params.parentName);
- orgData.setValue("NODE_KIND", "nkLeaf");
- }
- else{
- orgData.setFilter("filter1", "Base_class_dict='" + parentID + "'");
- orgData.refreshData();
- }
- };
复制代码
3.在子页面的ok按钮中再调用windowReceiver组件的windowEnsure方法前调用data的保存方法,这样数据才可以报错,然后到主页面中刷新
4.把主页面的treeData上的autoNew设置为false |
|