|
|
@@ -217,13 +217,13 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
|
|
|
this.loadRelatedScript();
|
|
|
//this.loadResource( function () {
|
|
|
- this.loadDictionaryList( function () {
|
|
|
+ this.loadDictionaryList(function () {
|
|
|
this.fireEvent("queryLoad");
|
|
|
- if (this.event_resolve){
|
|
|
- this.event_resolve(function(){
|
|
|
+ if (this.event_resolve) {
|
|
|
+ this.event_resolve(function () {
|
|
|
this.loadForm(callback)
|
|
|
}.bind(this));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.loadForm(callback);
|
|
|
}
|
|
|
}.bind(this));
|
|
|
@@ -233,14 +233,14 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
}.bind(this));
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- loadRelatedScript: function(){
|
|
|
+ loadRelatedScript: function () {
|
|
|
debugger;
|
|
|
- if (this.json.includeScripts && this.json.includeScripts.length){
|
|
|
+ if (this.json.includeScripts && this.json.includeScripts.length) {
|
|
|
var includeScriptText = "";
|
|
|
var includedIds = [];
|
|
|
- this.json.includeScripts.each(function(s){
|
|
|
- if (this.app.relatedScriptMap && this.app.relatedScriptMap[s.id]){
|
|
|
- includeScriptText+="\n"+this.app.relatedScriptMap[s.id].text;
|
|
|
+ this.json.includeScripts.each(function (s) {
|
|
|
+ if (this.app.relatedScriptMap && this.app.relatedScriptMap[s.id]) {
|
|
|
+ includeScriptText += "\n" + this.app.relatedScriptMap[s.id].text;
|
|
|
includedIds.push(s.id);
|
|
|
}
|
|
|
}.bind(this));
|
|
|
@@ -258,39 +258,39 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
// // this.loadScriptList( cb );
|
|
|
// this.loadDictionaryList( cb );
|
|
|
// },
|
|
|
- loadDictionaryList: function( callback ){
|
|
|
+ loadDictionaryList: function (callback) {
|
|
|
this.dictionaryLoaded = false;
|
|
|
var loadedCount = 0;
|
|
|
- if( this.json.includeDictionaries && this.json.includeDictionaries.length ){
|
|
|
+ if (this.json.includeDictionaries && this.json.includeDictionaries.length) {
|
|
|
var fun = function () {
|
|
|
loadedCount++;
|
|
|
- if (this.json.includeDictionaries.length <= loadedCount){
|
|
|
+ if (this.json.includeDictionaries.length <= loadedCount) {
|
|
|
this.dictionaryLoaded = true;
|
|
|
- if(callback)callback();
|
|
|
+ if (callback) callback();
|
|
|
}
|
|
|
}.bind(this);
|
|
|
|
|
|
this.json.includeDictionaries.map(function (d) {
|
|
|
- var action = MWF.Actions.get( d.dictionary.appType === "cms" ? "x_cms_assemble_control" : "x_processplatform_assemble_surface");
|
|
|
- if ( d.path && d.path !== "root" ){
|
|
|
- action[ "getDictData" ]( d.dictionary.id, d.dictionary.appId, d.path, function(json){
|
|
|
+ var action = MWF.Actions.get(d.dictionary.appType === "cms" ? "x_cms_assemble_control" : "x_processplatform_assemble_surface");
|
|
|
+ if (d.path && d.path !== "root") {
|
|
|
+ action["getDictData"](d.dictionary.id, d.dictionary.appId, d.path, function (json) {
|
|
|
MWF.xScript.addDictToCache(d.dictionary, d.path, json.data);
|
|
|
fun();
|
|
|
- }.bind(this), function(){
|
|
|
+ }.bind(this), function () {
|
|
|
fun();
|
|
|
- }.bind(this), true );
|
|
|
- }else{
|
|
|
- action[ "getDictRoot" ](d.dictionary.id, d.dictionary.appId, function(json){
|
|
|
+ }.bind(this), true);
|
|
|
+ } else {
|
|
|
+ action["getDictRoot"](d.dictionary.id, d.dictionary.appId, function (json) {
|
|
|
MWF.xScript.addDictToCache(d.dictionary, d.path, json.data);
|
|
|
fun();
|
|
|
- }.bind(this), function(){
|
|
|
+ }.bind(this), function () {
|
|
|
fun();
|
|
|
- }.bind(this), true );
|
|
|
+ }.bind(this), true);
|
|
|
}
|
|
|
}.bind(this));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.dictionaryLoaded = true;
|
|
|
- if(callback)callback();
|
|
|
+ if (callback) callback();
|
|
|
}
|
|
|
},
|
|
|
// loadScriptList : function( callback ){
|
|
|
@@ -342,8 +342,8 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
// loadAsyncList();
|
|
|
// loadSyncList();
|
|
|
// },
|
|
|
- loadForm: function(callback){
|
|
|
- if (this.lockDataPerson){
|
|
|
+ loadForm: function (callback) {
|
|
|
+ if (this.lockDataPerson) {
|
|
|
var text = MWF.xApplication.process.Xform.LP.keyLockInfor;
|
|
|
text = text.replace("{name}", o2.name.cn(this.lockDataPerson));
|
|
|
var title = MWF.xApplication.process.Xform.LP.keyLockTitle;
|
|
|
@@ -361,25 +361,25 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
if (callback) callback();
|
|
|
return;
|
|
|
}
|
|
|
- if (this.json["$version"]=="5.2"){
|
|
|
+ if (this.json["$version"] == "5.2") {
|
|
|
if (callback) callback();
|
|
|
return;
|
|
|
}
|
|
|
var stylesUrl = "../x_component_process_FormDesigner/Module/Form/skin/" + this.json.styleConfig.extendFile;
|
|
|
MWF.getJSON(stylesUrl, {
|
|
|
- "onSuccess": function (responseJSON) {
|
|
|
- if (responseJSON && responseJSON.form) {
|
|
|
- this.json = Object.merge(this.json, responseJSON.form);
|
|
|
- }
|
|
|
- if (callback) callback();
|
|
|
- }.bind(this),
|
|
|
- "onRequestFailure": function () {
|
|
|
- if (callback) callback();
|
|
|
- }.bind(this),
|
|
|
- "onError": function () {
|
|
|
- if (callback) callback();
|
|
|
- }.bind(this)
|
|
|
- }
|
|
|
+ "onSuccess": function (responseJSON) {
|
|
|
+ if (responseJSON && responseJSON.form) {
|
|
|
+ this.json = Object.merge(this.json, responseJSON.form);
|
|
|
+ }
|
|
|
+ if (callback) callback();
|
|
|
+ }.bind(this),
|
|
|
+ "onRequestFailure": function () {
|
|
|
+ if (callback) callback();
|
|
|
+ }.bind(this),
|
|
|
+ "onError": function () {
|
|
|
+ if (callback) callback();
|
|
|
+ }.bind(this)
|
|
|
+ }
|
|
|
);
|
|
|
},
|
|
|
loadMacro: function (callback) {
|
|
|
@@ -418,7 +418,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
if (node) {
|
|
|
node.empty();
|
|
|
this._loadMobileActions(node, callback);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
console.log("没有找到移动端底部操作栏!")
|
|
|
}
|
|
|
} else {
|
|
|
@@ -970,11 +970,11 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
if (beforeLoad) beforeLoad.apply(module);
|
|
|
if (!this.all[json.id]) this.all[json.id] = module;
|
|
|
|
|
|
- if ( json.name ){
|
|
|
- if( this.allForName[json.name] ){
|
|
|
+ if (json.name) {
|
|
|
+ if (this.allForName[json.name]) {
|
|
|
var item = this.allForName[json.name];
|
|
|
- typeOf(item) === "array" ? item.push( module ) : this.allForName[json.name] = [item, module];
|
|
|
- }else{
|
|
|
+ typeOf(item) === "array" ? item.push(module) : this.allForName[json.name] = [item, module];
|
|
|
+ } else {
|
|
|
this.allForName[json.name] = module;
|
|
|
}
|
|
|
}
|
|
|
@@ -1018,9 +1018,9 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
this.saveOpinion(module);
|
|
|
|
|
|
var key = layout.desktop.session.user.id;
|
|
|
- if( typeOf( data[id] ) === "object" && typeOf(data[id][key])==="string" ){
|
|
|
- data[id][key]= "";
|
|
|
- }else if( typeOf( data[id] ) === "string" ){
|
|
|
+ if (typeOf(data[id]) === "object" && typeOf(data[id][key]) === "string") {
|
|
|
+ data[id][key] = "";
|
|
|
+ } else if (typeOf(data[id]) === "string") {
|
|
|
data[id] = "";
|
|
|
}
|
|
|
// delete data[id];
|
|
|
@@ -1275,11 +1275,11 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
this.app.options.desktopReload = true;
|
|
|
|
|
|
this.app.appId = "process.Work" + json.data.work.id;
|
|
|
- if(layout.desktop.apps) {
|
|
|
+ if (layout.desktop.apps) {
|
|
|
delete layout.desktop.apps[this.app.options.appId];
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
layout.desktop.apps = {};
|
|
|
- }
|
|
|
+ }
|
|
|
layout.desktop.apps[this.app.appId] = this.app;
|
|
|
|
|
|
if (callback) callback();
|
|
|
@@ -1358,32 +1358,32 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
if (data.completed) {
|
|
|
content += MWF.xApplication.process.Xform.LP.workCompleted;
|
|
|
} else {
|
|
|
- if (data.occurSignalStack){
|
|
|
- if (data.signalStack && data.signalStack.length){
|
|
|
+ if (data.occurSignalStack) {
|
|
|
+ if (data.signalStack && data.signalStack.length) {
|
|
|
var activityUsers = [];
|
|
|
- data.signalStack.each(function(stack){
|
|
|
+ data.signalStack.each(function (stack) {
|
|
|
var ids = [];
|
|
|
- if (stack.splitExecute){
|
|
|
+ if (stack.splitExecute) {
|
|
|
ids = stack.splitExecute.splitValueList || [];
|
|
|
}
|
|
|
- if (stack.manualExecute){
|
|
|
+ if (stack.manualExecute) {
|
|
|
ids = stack.manualExecute.identities || [];
|
|
|
}
|
|
|
var count = 0;
|
|
|
- if (ids.length>8){
|
|
|
+ if (ids.length > 8) {
|
|
|
count = ids.length;
|
|
|
- ids = ids.slice(0,8);
|
|
|
+ ids = ids.slice(0, 8);
|
|
|
}
|
|
|
ids = o2.name.cns(ids);
|
|
|
var lp = MWF.xApplication.process.Xform.LP;
|
|
|
- var t = "<b>" + lp.nextActivity + "</b><span style='color: #ea621f'>" + stack.name + "</span>;<b>" + lp.nextUser + "</b><span style='color: #ea621f'>" + ids.join(",") + "</span> <b>"+ ((count) ? ","+lp.next_etc.replace("{count}", count) : "")+"</b>";
|
|
|
+ var t = "<b>" + lp.nextActivity + "</b><span style='color: #ea621f'>" + stack.name + "</span>;<b>" + lp.nextUser + "</b><span style='color: #ea621f'>" + ids.join(",") + "</span> <b>" + ((count) ? "," + lp.next_etc.replace("{count}", count) : "") + "</b>";
|
|
|
activityUsers.push(t);
|
|
|
}.bind(this));
|
|
|
content += activityUsers.join("<br>");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
content += MWF.xApplication.process.Xform.LP.taskCompleted;
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
if (data.properties.nextManualList && data.properties.nextManualList.length) {
|
|
|
var activityUsers = [];
|
|
|
data.properties.nextManualList.each(function (a) {
|
|
|
@@ -1676,10 +1676,10 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
if (this.json.isPrompt !== false) {
|
|
|
this.showSubmitedDialog(json.data);
|
|
|
} else {
|
|
|
- if (this.json.afterProcessAction=="redirect" && this.json.afterProcessRedirectScript && this.json.afterProcessRedirectScript.code){
|
|
|
+ if (this.json.afterProcessAction == "redirect" && this.json.afterProcessRedirectScript && this.json.afterProcessRedirectScript.code) {
|
|
|
var url = this.Macro.exec(this.json.afterProcessRedirectScript.code, this);
|
|
|
(new URI(url)).go();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.app.close();
|
|
|
}
|
|
|
}
|
|
|
@@ -1723,10 +1723,10 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
"text": this.app.lp.closePage,
|
|
|
"action": function () {
|
|
|
dlg.close();
|
|
|
- if (this.json.afterProcessAction=="redirect" && this.json.afterProcessRedirectScript && this.json.afterProcessRedirectScript.code){
|
|
|
+ if (this.json.afterProcessAction == "redirect" && this.json.afterProcessRedirectScript && this.json.afterProcessRedirectScript.code) {
|
|
|
var url = this.Macro.exec(this.json.afterProcessRedirectScript.code, this);
|
|
|
(new URI(url)).go();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.app.close();
|
|
|
}
|
|
|
}.bind(this)
|
|
|
@@ -1800,10 +1800,10 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
} else {
|
|
|
dlg.close();
|
|
|
|
|
|
- if (_work.json.afterProcessAction=="redirect" && _work.json.afterProcessRedirectScript && _work.json.afterProcessRedirectScript.code){
|
|
|
+ if (_work.json.afterProcessAction == "redirect" && _work.json.afterProcessRedirectScript && _work.json.afterProcessRedirectScript.code) {
|
|
|
var url = _work.Macro.exec(_work.json.afterProcessRedirectScript.code, _work);
|
|
|
(new URI(url)).go();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
_work.app.close();
|
|
|
}
|
|
|
}
|
|
|
@@ -1811,10 +1811,10 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
window.setTimeout(countDown, 1000);
|
|
|
} else {
|
|
|
window.setTimeout(function () {
|
|
|
- if (_work.json.afterProcessAction=="redirect" && _work.json.afterProcessRedirectScript && _work.json.afterProcessRedirectScript.code){
|
|
|
+ if (_work.json.afterProcessAction == "redirect" && _work.json.afterProcessRedirectScript && _work.json.afterProcessRedirectScript.code) {
|
|
|
var url = _work.Macro.exec(_work.json.afterProcessRedirectScript.code, _work);
|
|
|
(new URI(url)).go();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
_work.app.close();
|
|
|
}
|
|
|
}, t);
|
|
|
@@ -1839,10 +1839,10 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
this.workAction.startDraft(this.businessData.work.id, function (json) {
|
|
|
this.app.options.workId = json.data[0].work;
|
|
|
if (layout.mobile) {
|
|
|
- if(layout.notice) {
|
|
|
+ if (layout.notice) {
|
|
|
layout.notice(MWF.xApplication.process.Xform.LP.processStartedMessage + "“[" + json.data[0].processName + "]" + (this.businessData.data.title || this.businessData.data.subject));
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
var msg = {
|
|
|
"subject": MWF.xApplication.process.Xform.LP.processStarted,
|
|
|
"content": "<div>" + MWF.xApplication.process.Xform.LP.processStartedMessage + "“[" + json.data[0].processName + "]" + (this.businessData.data.title || this.businessData.data.subject) + "”</div>"
|
|
|
@@ -1850,7 +1850,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
var tooltip = layout.desktop.message.addTooltip(msg);
|
|
|
var item = layout.desktop.message.addMessage(msg);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
this.app.reload();
|
|
|
|
|
|
@@ -1905,9 +1905,9 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
debugger;
|
|
|
if (!this.businessData.work.startTime) {
|
|
|
this.startDraftProcess();
|
|
|
- } else if( this.json.submitFormType === "select" ){
|
|
|
+ } else if (this.json.submitFormType === "select") {
|
|
|
this.processWork_custom();
|
|
|
- } else if( this.json.submitFormType === "script" ){
|
|
|
+ } else if (this.json.submitFormType === "script") {
|
|
|
this.processWork_custom();
|
|
|
} else {
|
|
|
if (this.json.mode == "Mobile") {
|
|
|
@@ -1919,7 +1919,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- processWork_custom : function(){
|
|
|
+ processWork_custom: function () {
|
|
|
this.fireEvent("beforeProcessWork");
|
|
|
if (this.app && this.app.fireEvent) this.app.fireEvent("beforeProcessWork");
|
|
|
|
|
|
@@ -1936,21 +1936,21 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
}
|
|
|
|
|
|
debugger;
|
|
|
- if( !this.submitFormModule ){
|
|
|
+ if (!this.submitFormModule) {
|
|
|
if (!MWF["APPSubmitform"]) {
|
|
|
MWF.xDesktop.requireApp("process.Xform", "Subform", null, false);
|
|
|
}
|
|
|
- var submitFormContainer = new Element("div").inject( layout.mobile ? $(document.body) : this.app.content );
|
|
|
- this.submitFormModule = new MWF["APPSubmitform"]( submitFormContainer , this.json, this);
|
|
|
+ var submitFormContainer = new Element("div").inject(layout.mobile ? $(document.body) : this.app.content);
|
|
|
+ this.submitFormModule = new MWF["APPSubmitform"](submitFormContainer, this.json, this);
|
|
|
this.submitFormModule.addEvent("afterModulesLoad", function () {
|
|
|
this.submitFormModule.show();
|
|
|
}.bind(this))
|
|
|
this.submitFormModule.load();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.submitFormModule.show();
|
|
|
}
|
|
|
},
|
|
|
- processWork_pc: function(){
|
|
|
+ processWork_pc: function () {
|
|
|
var _self = this;
|
|
|
this.fireEvent("beforeProcessWork");
|
|
|
if (this.app && this.app.fireEvent) this.app.fireEvent("beforeProcessWork");
|
|
|
@@ -1994,7 +1994,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
|
|
|
//var node = new Element("div", {"styles": this.css.rollbackAreaNode});
|
|
|
var processNode = new Element("div", { "styles": this.app.css.processNode_Area }).inject(this.node);
|
|
|
- this.setProcessNode(processNode, "process", function ( processor ){
|
|
|
+ this.setProcessNode(processNode, "process", function (processor) {
|
|
|
this.processDlg = o2.DL.open({
|
|
|
"title": this.app.lp.process,
|
|
|
"style": this.json.dialogStyle || "user",
|
|
|
@@ -2140,7 +2140,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
"tabletWidth": this.json.tabletWidth || 0,
|
|
|
"tabletHeight": this.json.tabletHeight || 0,
|
|
|
"onPostLoad": function () {
|
|
|
- if (postLoadFun) postLoadFun( this );
|
|
|
+ if (postLoadFun) postLoadFun(this);
|
|
|
},
|
|
|
"onResize": function () {
|
|
|
if (resizeFun) resizeFun();
|
|
|
@@ -2458,12 +2458,12 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
addSplitWork: function (splitValue, trimExist, success, failure) {
|
|
|
var data = { "splitValueList": splitValue, "trimExist": trimExist };
|
|
|
if (this.options.readonly) {
|
|
|
- o2.Actions.load("x_processplatform_assemble_surface").WorkAction.V2AddSplit(this.businessData.work.id, data,function (json) {
|
|
|
+ o2.Actions.load("x_processplatform_assemble_surface").WorkAction.V2AddSplit(this.businessData.work.id, data, function (json) {
|
|
|
if (success) success(json);
|
|
|
}.bind(this),
|
|
|
- function (xhr, text, error) {
|
|
|
- if (failure) failure(xhr, text, error);
|
|
|
- });
|
|
|
+ function (xhr, text, error) {
|
|
|
+ if (failure) failure(xhr, text, error);
|
|
|
+ });
|
|
|
// this.workAction.addSplit(
|
|
|
// function (json) {
|
|
|
// if (success) success(json);
|
|
|
@@ -2476,12 +2476,12 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
} else {
|
|
|
this.saveFormData(
|
|
|
function (json) {
|
|
|
- o2.Actions.load("x_processplatform_assemble_surface").WorkAction.V2AddSplit(this.businessData.work.id, data,function (json) {
|
|
|
+ o2.Actions.load("x_processplatform_assemble_surface").WorkAction.V2AddSplit(this.businessData.work.id, data, function (json) {
|
|
|
if (success) success(json);
|
|
|
}.bind(this),
|
|
|
- function (xhr, text, error) {
|
|
|
- if (failure) failure(xhr, text, error);
|
|
|
- });
|
|
|
+ function (xhr, text, error) {
|
|
|
+ if (failure) failure(xhr, text, error);
|
|
|
+ });
|
|
|
// this.workAction.addSplit(
|
|
|
// function (json) {
|
|
|
// if (success) success(json);
|
|
|
@@ -2864,14 +2864,14 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
var htmlFormId = "";
|
|
|
o2.Actions.load("x_processplatform_assemble_surface").AttachmentAction.uploadWorkInfo(this.businessData.work.id, "pdf", {
|
|
|
"workHtml": this.app.content.get("html"),
|
|
|
- "pageWidth" : 1000
|
|
|
+ "pageWidth": 1000
|
|
|
}, function (json) {
|
|
|
htmlFormId = json.data.id;
|
|
|
}.bind(this), null, false);
|
|
|
htmlFormId = htmlFormId.replace("#", "%23");
|
|
|
var url = "/x_processplatform_assemble_surface/jaxrs/attachment/batch/download/work/" + this.businessData.work.id + "/site/(0)/stream";
|
|
|
url = o2.filterUrl(o2.Actions.getHost("x_processplatform_assemble_surface") + url);
|
|
|
- window.open( o2.filterUrl(url + "?fileName=&flag=" + htmlFormId));
|
|
|
+ window.open(o2.filterUrl(url + "?fileName=&flag=" + htmlFormId));
|
|
|
},
|
|
|
resetWork: function () {
|
|
|
if (!this.businessData.control["allowReset"]) {
|
|
|
@@ -2949,10 +2949,10 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
// this.selectPeopleCompany(dlg, json.data, count)
|
|
|
// }.bind(this), null, this.businessData.task.identity);
|
|
|
break;
|
|
|
- case "script" :
|
|
|
- o2.Actions.load("x_processplatform_assemble_surface").ProcessAction.getActivity( this.businessData.work.activity,"manual",function (activityJson) {
|
|
|
+ case "script":
|
|
|
+ o2.Actions.load("x_processplatform_assemble_surface").ProcessAction.getActivity(this.businessData.work.activity, "manual", function (activityJson) {
|
|
|
var scriptText = activityJson.data.activity.resetRangeScriptText;
|
|
|
- if( !scriptText )return;
|
|
|
+ if (!scriptText) return;
|
|
|
var resetRange = this.Macro.exec(activityJson.data.activity.resetRangeScriptText, this);
|
|
|
this.selectPeopleUnit(dlg, "", count, resetRange);
|
|
|
}.bind(this))
|
|
|
@@ -2980,9 +2980,9 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
dlg.identityList = identityList;
|
|
|
}.bind(this)
|
|
|
};
|
|
|
- if( include ){
|
|
|
+ if (include) {
|
|
|
options.noUnit = true;
|
|
|
- options.include = typeOf(include)==="array" ? include : [include];
|
|
|
+ options.include = typeOf(include) === "array" ? include : [include];
|
|
|
}
|
|
|
MWF.xDesktop.requireApp("Selector", "package", function () {
|
|
|
var selector = new MWF.O2Selector(this.app.content, options);
|
|
|
@@ -3931,6 +3931,10 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
window.o2android.closeWork("");
|
|
|
} else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.closeWork) {
|
|
|
window.webkit.messageHandlers.closeWork.postMessage("");
|
|
|
+ } else if (window.wx && window.__wxjs_environment === 'miniprogram') { //微信小程序 关闭页面
|
|
|
+ wx.miniProgram.navigateBack({ delta: 1 });
|
|
|
+ } else if (window.wx) { //微信关闭 当前页面
|
|
|
+ wx.closeWindow();
|
|
|
} else {
|
|
|
var len = window.history.length;
|
|
|
if (len > 1) {
|