提交 f5f2efe0 编写于 作者: 蔡祥熠

Merge branch 'fix/Query.ViewDesign_notice' into 'wrdp'

Merge of fix/Query.ViewDesign_notice to wrdp

See merge request o2oa/o2oa!4274
......@@ -660,6 +660,39 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
return false;
}
if( !this.data.data && !this.data.data.where ){
if( this.data.type === "cms" ){
this.designer.notice(this.designer.lp.notice.selectCMS, "error");
return false;
}else{
this.designer.notice(this.designer.lp.notice.selectProcess, "error");
return false;
}
}else{
var where = this.data.data.where;
if( this.data.type === "cms" ){
var appInfoList = where.appInfoList;
var categoryInfoList = where.categoryInfoList;
if( (!appInfoList || !appInfoList.length) && (!categoryInfoList || !categoryInfoList.length) ){
this.designer.notice(this.designer.lp.notice.selectCMS, "error");
return false;
}
}else{
var applicationList = where.applicationList;
var processList = where.processList;
if( (!applicationList || !applicationList.length) && (!processList || !processList.length) ){
this.designer.notice(this.designer.lp.notice.selectProcess, "error");
return false;
}
}
if( where.dateRange && where.dateRange.dateRangeType === "range" ){
if( !where.dateRange.start || !where.dateRange.completed ){
this.designer.notice(this.designer.lp.notice.selectDateRange, "error");
return false;
}
}
}
// var list;
// if( this.data.data && this.data.data.where ){
// if( this.data.data.where.creatorIdentityList ){
......@@ -700,6 +733,39 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
}
//}
if( !this.data.data && !this.data.data.where ){
if( this.data.type === "cms" ){
this.designer.notice(this.designer.lp.notice.selectCMS, "error");
return false;
}else{
this.designer.notice(this.designer.lp.notice.selectProcess, "error");
return false;
}
}else{
var where = this.data.data.where;
if( this.data.type === "cms" ){
var appInfoList = where.appInfoList;
var categoryInfoList = where.categoryInfoList;
if( (!appInfoList || !appInfoList.length) && (!categoryInfoList || !categoryInfoList.length) ){
this.designer.notice(this.designer.lp.notice.selectCMS, "error");
return false;
}
}else{
var applicationList = where.applicationList;
var processList = where.processList;
if( (!applicationList || !applicationList.length) && (!processList || !processList.length) ){
this.designer.notice(this.designer.lp.notice.selectProcess, "error");
return false;
}
}
if( where.dateRange && where.dateRange.dateRangeType === "range" ){
if( !where.dateRange.start || !where.dateRange.completed ){
this.designer.notice(this.designer.lp.notice.selectDateRange, "error");
return false;
}
}
}
debugger;
// var list;
// if( this.data.data && this.data.data.where ){
......
......@@ -52,7 +52,11 @@ MWF.xApplication.query.ViewDesigner.LP = {
"noModifyName": "Cannot modify the name or alias",
"deleteEventTitle": "Delete Event Confirmation",
"deleteEvent": "Are you sure you want to delete the current event?"
"deleteEvent": "Are you sure you want to delete the current event?",
"selectProcess": "Please select an application or process",
"selectCMS": "Please select content management column or category",
"selectDateRange": "The period type is a range, please select the start date and end date"
},
"actionbar": {
"readhide": "Set whether to display when reading",
......
......@@ -52,7 +52,11 @@ MWF.xApplication.query.ViewDesigner.LP = {
"noModifyName": "不能修改名称或者别名",
"deleteEventTitle": "删除事件确认",
"deleteEvent": "是否确定删除当前事件吗?"
"deleteEvent": "是否确定删除当前事件吗?",
"selectProcess": "请选择应用或者流程",
"selectCMS": "请选择内容管理栏目或者分类",
"selectDateRange": "时段类型为范围,请选择开始日期和结束日期"
},
"actionbar": {
"readhide": "设置阅读时是否显示",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册