提交 6711dc32 编写于 作者: 蔡祥熠

Merge branch 'fix/process_submit' into 'develop'

Merge of fix/process_submit 提交界面、自定义提交界面点击路由设置默认意见 to develop

See merge request o2oa/o2oa!867
......@@ -16,7 +16,8 @@ MWF.xApplication.process.Work.Processor = new Class({
"tabletHeight": 0,
"orgHeight": 276,
"maxOrgCountPerline": 2,
"isManagerProcess": false //是否为管理员提交
"isManagerProcess": false, //是否为管理员提交
"useDefaultOpinion": true
},
initialize: function (node, task, options, form) {
......@@ -478,14 +479,27 @@ MWF.xApplication.process.Work.Processor = new Class({
}
this.routeSelectorArea.setStyle("background-color", "#FFF");
},
getDefaultOpinion: function( node ){
var routeId = node.retrieve("route");
var routeDate = this.getRouteData( routeId );
return routeDate.opinion || "";
},
selectRoute: function (node) {
if (this.selectedRoute) {
if (this.selectedRoute.get("text") != node.get("text")) {
if (this.selectedRoute.get("text") != node.get("text")) { //选中其他路由
this.selectedRoute.setStyles(this.css.routeNode);
this.selectedRoute.removeClass("mainColor_bg");
//this.selectedRoute.getFirst().setStyles(this.css.routeIconNode);
//this.selectedRoute.getLast().setStyles(this.css.routeTextNode);
if( this.options.useDefaultOpinion ){
if( this.inputTextarea.get("value") === this.getDefaultOpinion( this.selectedRoute ) ||
this.inputTextarea.get("value") === (MWF.xApplication.process.Work.LP.inputText || "")
){
this.inputTextarea.set("value", this.getDefaultOpinion(node) || (MWF.xApplication.process.Work.LP.inputText || "") );
}
}
this.selectedRoute = node;
node.setStyles(this.css.routeNode_selected);
node.addClass("mainColor_bg");
......@@ -494,7 +508,12 @@ MWF.xApplication.process.Work.Processor = new Class({
//node.getFirst().setStyle("background-image", "url("+"../x_component_process_Work/$Processor/default/checked.png)");
//node.getLast().setStyle("color", "#FFF");
} else {
} else { //取消选中当前路由
if( this.options.useDefaultOpinion ) {
if (this.inputTextarea.get("value") === this.getDefaultOpinion(this.selectedRoute)) {
this.inputTextarea.set("value", MWF.xApplication.process.Work.LP.inputText || "");
}
}
this.selectedRoute.setStyles(this.css.routeNode);
this.selectedRoute.addClass("lightColor_bg");
this.selectedRoute.removeClass("mainColor_bg");
......@@ -504,6 +523,13 @@ MWF.xApplication.process.Work.Processor = new Class({
this.selectedRoute = null;
}
} else {
if( this.options.useDefaultOpinion ) {
if (this.inputTextarea.get("value") === (MWF.xApplication.process.Work.LP.inputText || "")) {
var defaultOpinion1 = this.getDefaultOpinion(node);
if (defaultOpinion1) this.inputTextarea.set("value", defaultOpinion1);
}
}
this.selectedRoute = node;
node.setStyles(this.css.routeNode_selected);
node.addClass("mainColor_bg");
......
......@@ -38,7 +38,7 @@ MWF.xApplication.process.Xform.Statement = MWF.APPStatement = new Class(
* @event MWF.xApplication.process.Xform.Statement#openDocument
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
"moduleEvents": ["load", "beforeLoadView", "loadView", "queryLoad", "postLoad", "select", "openDocument"]
"moduleEvents": ["load", "beforeLoadView", "loadViewLayout", "loadView", "queryLoad", "postLoad", "select", "openDocument"]
},
_loadUserInterface: function(){
......@@ -128,6 +128,9 @@ MWF.xApplication.process.Xform.Statement = MWF.APPStatement = new Class(
this.view = new MWF.xApplication.query.Query.Statement(this.node, viewJson, {
"isload": (this.json.loadView!=="no"),
"resizeNode": (this.node.getStyle("height").toString().toLowerCase()!=="auto" && this.node.getStyle("height").toInt()>0),
"onLoadLayout": function () {
this.fireEvent("loadViewLayout");
}.bind(this),
"onLoadView": function(){
this.fireEvent("loadView");
}.bind(this),
......
......@@ -38,7 +38,7 @@ MWF.xApplication.process.Xform.View = MWF.APPView = new Class(
* @event MWF.xApplication.process.Xform.View#openDocument
* @see {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|组件事件说明}
*/
"moduleEvents": ["load", "beforeLoadView", "loadView", "queryLoad", "postLoad", "select", "openDocument"]
"moduleEvents": ["load", "beforeLoadView", "loadViewLayout", "loadView", "queryLoad", "postLoad", "select", "openDocument"]
},
_loadUserInterface: function(){
......@@ -116,6 +116,9 @@ MWF.xApplication.process.Xform.View = MWF.APPView = new Class(
this.view = new MWF.xApplication.query.Query.Viewer(this.node, viewJson, {
"isload": (this.json.loadView!=="no"),
"resizeNode": (this.node.getStyle("height").toString().toLowerCase()!=="auto" && this.node.getStyle("height").toInt()>0),
"onLoadLayout": function () {
this.fireEvent("loadViewLayout");
}.bind(this),
"onLoadView": function(){
this.fireEvent("loadView");
}.bind(this),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册