Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
$.messager.confirm("操作提示", "您确定要重启流程吗?", function (bo) {
if(bo){
Core.ajax(Config.ContextPath+'workflow/flow/manager/resetToCurrent/'+data.flowInstId, {
method: 'get'
}).then(function(data) {
// var index=table.datagrid('getSelectedRowIndex');
// table.datagrid('updateRow',{'index':index,row:data});
});
}
});
};
this.onClose = function(table) {
var flowInstId=this.parent.data.flowInstId;
Core.ajax(Config.ContextPath+'workflow/flow/manager/getvariablelist/'+flowInstId, {
method: 'get'
}).then(function(data) {
table.cdatagrid({
controller: _self
})
.datagrid('loadData', data);
});
};
// this.renderButton = function (btn, data) {
this.onClose = function(table) {
var flowInstId=this.parent.data.flowInstId;
Core.ajax(Config.ContextPath+'workflow/flow/manager/getvariablelist/'+flowInstId, {
method: 'get'
}).then(function(data) {
table.cdatagrid({
controller: _self
})
.datagrid('loadData', data);
});
};
// this.renderButton = function (btn, data) {
this.load = function(panel, data) {
var form = panel.find('form');
var table = this.table = panel.find('table');
form.form('load', data);
Core.ajax(Config.ContextPath+'workflow/flow/manager/getteamlist/'+data.flowInstId, {
method: 'get'
}).then(function(data) {
table.cdatagrid({
controller: _self
})
.datagrid('loadData', data);
});
};
});
this.submit = function(table, data,closeCallback) {
var _self=this;
Core.ajax(Config.ContextPath+'workflow/flow/define/deleteFlow/'+data.flowCode, {
method: 'GET'
}).then(function(data) {
var table=_self.parent.table;
table.datagrid('reload');
});
return false;
};
});
this.load = function(panel, data) {
var form = panel.find('form');
var table = this.table = panel.find('table');
form.form('load', data);
Core.ajax(Config.ContextPath+'workflow/flow/manager/getorglist/'+data.flowInstId, {
method: 'get'
}).then(function(data) {
table.cdatagrid({
controller: _self
})
.datagrid('loadData', data);
});
};
this.submit = function(panel, data, closeCallback) {
var form = panel.find('form');
var table = this.table;
if (form.form('validate') && table.cdatagrid('endEdit')) {
var items = table.datagrid('getData').rows;
data.flowVariableDefines = items;
data.flowVariableDefs = null;
data._method = 'PUT';
Core.ajax(Config.ContextPath+'workflow/flow/define/variableDefine/'+data.flowCode, {
data: data,
method: 'post'
}).then(closeCallback);
return false;
}
};
});
}).then(function() {
Core.ajax(Config.ContextPath+'workflow/flow/manager/getorglist/'+flowInstId, {
method: 'get'
}).then(function(data) {
table.datagrid('loadData', data);
});
})
};
this.submit = function(panel, data, closeCallback) {
var form = panel.find('form');
form.form('enableValidation');
var value=form.form('value');
userCode=value.userCode;
var isValid = form.form('validate');
if (isValid) {
form.form('ajax', {
url: Config.ContextPath+'workflow/flow/useroptmgr/alignrelegate/'+data.relegateno+'/'+userCode,
method: 'put',
}).then(closeCallback);
}
return false;
};