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

Merge branch 'fix/service.interface_token' into 'wrdp'

Merge of fix/service.interface_token 修复流程记录组件分类排序选择为按日期的时候,刷新未选中的问题。修改后台API的this.Actions描述。修复侧边操作条未校验必填意见的问题。 to wrdp

See merge request o2oa/o2oa!6298
......@@ -1347,7 +1347,7 @@
* @borrows module:Actions.getHost as getHost
*/
/**
* 平台预置了Actions对象用于调用平台提供的服务,您可以使用this.Actions.load来获取这些方法。
* 平台预置了Actions对象用于调用平台提供的服务,您可以使用this.Actions.load来获取这些方法。由于是运行在服务器端,服务都是同步调用。
* @method load
* @methodOf module:server.Actions
* @instance
......@@ -1367,7 +1367,9 @@
* 通过this.Actions.load(root)方法得到action对象,就可以访问此服务下的方法了。<br/>
* 访问方法的规则如下:
* </caption>
* this.Actions.load( root )[actionName][methodName]( arguements );
* var requestString = this.Actions.load( root )[actionName][methodName]( arguements );
*
* requestString : 服务返回的响应数据,字符串格式,可以通过 requestObjest = JSON.parse(requestString);解析成对象
*
* root : 平台服务根名称,如果 x_processplatform_assemble_surface
*
......@@ -1393,12 +1395,11 @@
* xhr XmlHttpRequest对象,服务器请求失败时有值
* }
* 此参数可以省略,如果省略,系统会自动弹出错误信息。
*
* async : 方法同步或者异步执行,默认为true。
* @o2syntax
* <caption>
* 处理返回的数据:<br/>
* 通过success方法作为第一个参数来处理结果
* 处理返回的数据有两种方式,二选一即可:<br/>
* 1、该方法返回的结果是响应数据字符串,通过JSON.parse(responseString)获取对象。<br/>
* 2、通过success方法作为第一个参数来处理结果
* </caption>
* //success:arguements中的第一个function对象
* function(json){
......@@ -1421,7 +1422,7 @@
* </caption>
* var processAction = this.Actions.load("x_processplatform_assemble_surface"); //获取action
* var method = processAction.TaskAction.V2ListPaging; //获取列式方法
* //执行方法
* //执行方法1
* method(
* 1, //uri 第1个参数,如果无uri参数,可以省略
* 20, //uri 第2个参数,如果无uri参数,可以省略,如果还有其他uri参数,可以用逗号, 分隔
......@@ -1437,9 +1438,12 @@
* //responseJSON见下面的说明
*
* var message = responseJSON.message; //message为错误提示文本
* },
* true //可选,true为异步调用,false为同步调用,默认为true
* }
* );
*
* //执行方法2
* var responseString = method( 1, 20, {processList : [xxx]} )
* var responseObject = JSON.parse(responseObject);
* @example
* <caption>出错信息responseJSON的格式</caption>
* {
......
......@@ -189,7 +189,7 @@
<input class="editTableRadio" name="sortTypeInCategory" text{(!$.sortTypeInCategory || $.sortTypeInCategory=='default')?'checked':''} type="radio" value="default" onclick="if (this.checked){
//$('text{$.pid}sortInCategoryScript').setStyle('display', 'none');
}" />{{$.lp.sortByActivity}}
<input class="editTableRadio" name="sortTypeInCategory" text{( $.sortTypeInCategory && $.sortTypeInCategory=='completedTimeAsc') } type="radio" value="completedTimeAsc" onclick="if (this.checked){
<input class="editTableRadio" name="sortTypeInCategory" text{( $.sortTypeInCategory && $.sortTypeInCategory=='completedTimeAsc')?'checked':'' } type="radio" value="completedTimeAsc" onclick="if (this.checked){
//$('text{$.pid}sortInCategoryScript').setStyle('display', 'none');
}" />{{$.lp.sortByTimeAsc}}
<input class="editTableRadio" name="sortTypeInCategory" text{( $.sortTypeInCategory && $.sortTypeInCategory=='completedTimeDesc')?'checked':''} type="radio" value="completedTimeDesc" onclick="if (this.checked){
......
......@@ -314,6 +314,14 @@ MWF.xApplication.process.Xform.Sidebar = MWF.APPSidebar = new Class(
}
return this.routeDataList;
},
isOpinionRequired: function( routeName ){
var routeList = this.getRouteDataList();
for( var i=0; i<routeList.length; i++ ){
if( routeList[i].name === routeName ){
return routeList[i].opinionRequired;
}
}
},
getRouteId: function( routeName ){
var routeList = this.getRouteDataList();
for( var i=0; i<routeList.length; i++ ){
......@@ -368,6 +376,11 @@ MWF.xApplication.process.Xform.Sidebar = MWF.APPSidebar = new Class(
processWork: function(route){
var opinion = this.form.getOpinion();
if( !opinion.opinion && !opinion.medias.length && this.isOpinionRequired(route)){
this.form.notice(MWF.xApplication.process.Work.LP.opinionRequired, "error");
return;
}
this.form.Macro.environment.form.currentRouteName = route;
this.form.Macro.environment.form.opinion = opinion.opinion;
this.form.Macro.environment.form.medias = opinion.medias;
......
......@@ -877,7 +877,7 @@ MWF.xApplication.service.InvokeDesigner.Main = new Class({
//"dependInvokeList": [],
"isNewInvoke": true,
"text": "",
"enableToken" : true,
"enableToken" : false,
"enable" : true,
"remoteAddrRegex" : "",
"lastStartTime" : "",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册