提交 b8cba27f 编写于 作者: tony001's avatar tony001

关系界面增加无临时数据模式判断

上级 271aed9f
...@@ -40,6 +40,14 @@ export default class AppFormDRUIPart extends Vue { ...@@ -40,6 +40,14 @@ export default class AppFormDRUIPart extends Vue {
*/ */
@Prop() public viewname?: string; @Prop() public viewname?: string;
/**
* 临时数据模式:从数据模式:"2"、主数据模式:"1"、无临时数据模式:"0"
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@Prop({default:"0"}) public tempMode?:string;
/** /**
* 刷新关系项 * 刷新关系项
* *
...@@ -285,11 +293,16 @@ export default class AppFormDRUIPart extends Vue { ...@@ -285,11 +293,16 @@ export default class AppFormDRUIPart extends Vue {
} }
this.viewparam = JSON.stringify(tempParam); this.viewparam = JSON.stringify(tempParam);
if (this.isRelationalData) { if (this.isRelationalData) {
if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) { // 从数据模式无遮罩层
this.blockUIStart(); if(this.tempMode && Object.is(this.tempMode,"2")){
return;
} else {
this.blockUIStop(); this.blockUIStop();
}else{
if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) {
this.blockUIStart();
return;
} else {
this.blockUIStop();
}
} }
} }
if(!this.isForbidLoad){ if(!this.isForbidLoad){
...@@ -320,7 +333,16 @@ export default class AppFormDRUIPart extends Vue { ...@@ -320,7 +333,16 @@ export default class AppFormDRUIPart extends Vue {
// 表单保存之前 // 表单保存之前
if (Object.is($event.type, 'beforesave')) { if (Object.is($event.type, 'beforesave')) {
if(Object.is(this.refviewtype,'DEMEDITVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW')){ if(Object.is(this.refviewtype,'DEMEDITVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW')){
this.formDruipart.next({action:'save',data:$event.data}); // 从数据模式直接通知保存
if(this.tempMode && Object.is(this.tempMode,"2")){
this.formDruipart.next({action:'save',data:$event.data});
}else{
if($event.data && !Object.is($event.data.srfuf,"0")){
this.formDruipart.next({action:'save',data:$event.data});
}else{
this.$emit('drdatasaved',$event);
}
}
} else { } else {
// 不需要保存的界面也要抛出事件,供计数器计算 // 不需要保存的界面也要抛出事件,供计数器计算
this.$emit('drdatasaved',$event); this.$emit('drdatasaved',$event);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册