mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 18:22:11 +08:00
Merge branch 'workflow'
This commit is contained in:
@@ -53,6 +53,7 @@ function DialogList() {
|
||||
var url = '/ModuleElementManager/LoadWithAccess?tId=';
|
||||
this.maingrid = $.CurrentDialog.find('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType: 'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
|
@@ -56,6 +56,7 @@ function DialogList() {
|
||||
var url = '/ResourceManager/LoadWithAccess?cId=';
|
||||
this.maingrid = $.CurrentDialog.find('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType: 'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
|
@@ -17,6 +17,7 @@ function MainGrid() {
|
||||
var selectedId = '00000000-0000-0000-0000-000000000000'; //ztree选中的模块
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType: 'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
@@ -234,7 +235,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/CategoryManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/CategoryManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@@ -242,7 +243,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//编辑
|
||||
|
@@ -27,6 +27,7 @@ function MainGrid() {
|
||||
var selectedNode = 'me';
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType:'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
@@ -115,14 +116,14 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/CommonApplies/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/CommonApplies/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
}
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@@ -19,6 +19,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@@ -262,7 +263,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/moduleManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/moduleManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@@ -270,7 +271,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@@ -48,6 +48,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@@ -236,7 +237,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/OrgManager/DelOrg?Id=' + selected.Id, function (data) {
|
||||
$.post('/OrgManager/DelOrg?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@@ -244,7 +245,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@@ -38,8 +38,13 @@ $(function () {
|
||||
.on("click", function () { //执行命令
|
||||
$.post("/CommonApplies/ExeCmd?id=" +$("#processId").val() +"&cmd=" +$(this).val() ,
|
||||
function (data) {
|
||||
BJUI.dialog('refresh', 'detailDlg');
|
||||
});
|
||||
if (data.statusCode == "200") {
|
||||
BJUI.dialog('refresh', 'detailDlg');
|
||||
}
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -6,6 +6,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@@ -219,7 +220,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/ResourceManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/ResourceManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@@ -227,7 +228,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@@ -48,6 +48,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@@ -217,7 +218,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/RoleManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/RoleManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
orgtree.reload();
|
||||
@@ -225,7 +226,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@@ -47,6 +47,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@@ -231,7 +232,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/StockManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/StockManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@@ -239,7 +240,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@@ -43,6 +43,7 @@ function UserRolesList() {
|
||||
var selectedId = '00000000-0000-0000-0000-000000000000'; //ztree选中的模块
|
||||
this.maingrid = $.CurrentDialog.find('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType: 'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
|
@@ -49,6 +49,7 @@ function MainGrid() {
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
loadType: 'GET',
|
||||
columns: [
|
||||
{
|
||||
name: 'Id',
|
||||
@@ -228,7 +229,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/UserManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/UserManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
maintree.reload();
|
||||
@@ -236,9 +237,11 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//自定义的编辑按钮
|
||||
function edit() {
|
||||
var selected = list.getSelectedObj();
|
||||
|
@@ -34,7 +34,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
base.OnActionExecuting(filterContext);
|
||||
|
||||
if (!AuthUtil.CheckLogin()) return;
|
||||
if (!AuthUtil.CheckLogin()) return;
|
||||
|
||||
var controllername = Request.RequestContext.RouteData.Values["controller"].ToString().ToLower();
|
||||
var actionname = filterContext.ActionDescriptor.ActionName.ToLower();
|
||||
@@ -57,15 +57,11 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
|
||||
var version = ConfigurationManager.AppSettings["version"];
|
||||
if (version == "demo")
|
||||
if (version == "demo" && Request.HttpMethod == "POST")
|
||||
{
|
||||
HttpPostAttribute hobbyAttr = (HttpPostAttribute)Attribute.GetCustomAttribute(function, typeof(HttpPostAttribute));
|
||||
if (actionname.Contains("del") || hobbyAttr != null) //客户端提交数据
|
||||
{
|
||||
throw new HttpException(400, "演示版本,不能进行该操作,当前模块:" + controllername +"/" +actionname);
|
||||
}
|
||||
throw new HttpException(400, "演示版本,不能进行该操作,当前模块:" + controllername + "/" + actionname);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -13,6 +13,10 @@ using ProcessStatus = OptimaJet.Workflow.Core.Persistence.ProcessStatus;
|
||||
|
||||
namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 通用申请流程处理
|
||||
/// <para>李玉宝新增于2016-09-08 19:21:59</para>
|
||||
/// </summary>
|
||||
public class CommonAppliesController : BaseController
|
||||
{
|
||||
private CommonApplyApp _app;
|
||||
|
@@ -16,7 +16,7 @@ using WorkflowRuntime = OptimaJet.Workflow.Core.Runtime.WorkflowRuntime;
|
||||
|
||||
namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
public class DesignerController : Controller
|
||||
public class DesignerController : BaseController
|
||||
{
|
||||
public ActionResult Index(string schemeName)
|
||||
{
|
||||
|
@@ -81,12 +81,14 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return JsonHelper.Instance.Serialize(_app.LoadForOrgAndUser(orgId, userId));
|
||||
}
|
||||
|
||||
[System.Web.Mvc.HttpPost]
|
||||
public string AccessRoles(Guid userId, Guid[] ids)
|
||||
{
|
||||
_app.AccessRole(userId, ids);
|
||||
return JsonHelper.Instance.Serialize(BjuiResponse);
|
||||
}
|
||||
|
||||
[System.Web.Mvc.HttpPost]
|
||||
public string DelAccessRoles(Guid userId, Guid[] ids)
|
||||
{
|
||||
_app.DelAccessRole(userId, ids);
|
||||
|
Reference in New Issue
Block a user