mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-07-28 06:07:59 +08:00
Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b40cf6b43d | ||
|
|
d54cebc3ab | ||
|
|
bbc55bb53b | ||
|
|
3484c3468a | ||
|
|
43012c89a8 | ||
|
|
6cfed27598 | ||
|
|
2ce95036ef | ||
|
|
55f3ee5b0a | ||
|
|
dbe5a04b9b | ||
|
|
6d7725e2c2 | ||
|
|
849a80a512 | ||
|
|
49de0f6f8e | ||
|
|
33204cc44b | ||
|
|
71506d11dd | ||
|
|
a6a16f7df3 | ||
|
|
62e51584e6 | ||
|
|
13ba107c73 | ||
|
|
68e6b46e55 | ||
|
|
02dbb87349 | ||
|
|
b9ea8aa0d6 | ||
|
|
0b0e7485ce | ||
|
|
627f43c4fd | ||
|
|
e46d162ead | ||
|
|
99574e1e91 | ||
|
|
838eb134e5 | ||
|
|
b3592d108b | ||
|
|
c417859da7 | ||
|
|
d2cadace34 | ||
|
|
9a674ac4db | ||
|
|
4938027aa5 | ||
|
|
c8db5cb0b0 | ||
|
|
958a455dc4 | ||
|
|
c5149d33c4 | ||
|
|
86aad6337c | ||
|
|
099e695c27 | ||
|
|
a909d723a2 | ||
|
|
2b38807d2d | ||
|
|
d49ed28b13 |
@@ -1,36 +1,42 @@
|
||||
namespace Infrastructure
|
||||
{
|
||||
/// <summary>
|
||||
/// 常量定义
|
||||
/// </summary>
|
||||
public static class Define
|
||||
{
|
||||
public static string USERROLE = "UserRole"; //用户角色关联KEY
|
||||
public const string ROLERESOURCE = "RoleResource"; //角色资源关联KEY
|
||||
public const string USERORG = "UserOrg"; //用户机构关联KEY
|
||||
public static string USERROLE = "UserRole"; //用户角色关联KEY
|
||||
public const string ROLERESOURCE = "RoleResource"; //角色资源关联KEY
|
||||
public const string USERORG = "UserOrg"; //用户机构关联KEY
|
||||
public const string ROLEELEMENT = "RoleElement"; //角色菜单关联KEY
|
||||
public const string ROLEMODULE = "RoleModule"; //角色模块关联KEY
|
||||
public const string ROLEDATAPROPERTY = "RoleDataProperty"; //角色数据字段权限
|
||||
public const string MODULEPRINTERPLAN = "ModulePrinterPlan"; //模块配置打印方案
|
||||
public const string ROLEMODULE = "RoleModule"; //角色模块关联KEY
|
||||
public const string ROLEDATAPROPERTY = "RoleDataProperty"; //角色数据字段权限
|
||||
public const string MODULEPRINTERPLAN = "ModulePrinterPlan"; //模块配置打印方案
|
||||
|
||||
public const string DBTYPE_SQLSERVER = "SqlServer"; //sql server
|
||||
public const string DBTYPE_MYSQL = "MySql"; //mysql
|
||||
public const string DBTYPE_PostgreSQL = "PostgreSQL"; //PostgreSQL
|
||||
public const string DBTYPE_ORACLE = "Oracle"; //oracle
|
||||
public const string DBTYPE_SQLSERVER = "SqlServer"; //sql server
|
||||
public const string DBTYPE_MYSQL = "MySql"; //mysql
|
||||
public const string DBTYPE_PostgreSQL = "PostgreSQL"; //PostgreSQL
|
||||
public const string DBTYPE_ORACLE = "Oracle"; //oracle
|
||||
|
||||
|
||||
public const int INVALID_TOKEN = 50014; //token无效
|
||||
public const int INVALID_TOKEN = 50014; //token无效
|
||||
|
||||
public const string TOKEN_NAME = "X-Token";
|
||||
public const string TENANT_ID = "tenantId";
|
||||
|
||||
|
||||
public const string SYSTEM_USERNAME = "System";
|
||||
public const string SYSTEM_USERPWD = "123456";
|
||||
|
||||
public const string DATAPRIVILEGE_LOGINUSER = "{loginUser}"; //数据权限配置中,当前登录用户的key
|
||||
public const string DATAPRIVILEGE_LOGINROLE = "{loginRole}"; //数据权限配置中,当前登录用户角色的key
|
||||
public const string DATAPRIVILEGE_LOGINORG = "{loginOrg}"; //数据权限配置中,当前登录用户部门的key
|
||||
public const string DATAPRIVILEGE_LOGINUSER = "{loginUser}"; //数据权限配置中,当前登录用户的key
|
||||
public const string DATAPRIVILEGE_LOGINROLE = "{loginRole}"; //数据权限配置中,当前登录用户角色的key
|
||||
public const string DATAPRIVILEGE_LOGINORG = "{loginOrg}"; //数据权限配置中,当前登录用户部门的key
|
||||
|
||||
public const string JOBMAPKEY = "OpenJob";
|
||||
|
||||
public const string DEFAULT_FORM_INSTANCE_ID_NAME = "InstanceId";
|
||||
|
||||
//流程实例知会用户
|
||||
public const string INSTANCE_NOTICE_USER = "INSTANCE_NOTICE_USER";
|
||||
//流程实例知会角色
|
||||
public const string INSTANCE_NOTICE_ROLE = "INSTANCE_NOTICE_ROLE";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,8 +44,10 @@ namespace OpenAuth.App
|
||||
var moduleIds = SugarClient.Queryable<Relevance>().Where(
|
||||
u =>
|
||||
(u.Key == Define.ROLEMODULE && _userRoleIds.Contains(u.FirstId))).Select(u => u.SecondId).ToList();
|
||||
var elementIds = GetElementIds();
|
||||
|
||||
return SugarClient.Queryable<ModuleView>().Where(m =>moduleIds.Contains(m.Id)).Includes(x=>x.Elements).ToList();
|
||||
return SugarClient.Queryable<ModuleView>().Where(m =>moduleIds.Contains(m.Id))
|
||||
.Includes(x=>x.Elements.Where(u=>elementIds.Contains(u.Id)).ToList()).ToList();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -54,14 +56,24 @@ namespace OpenAuth.App
|
||||
{
|
||||
get
|
||||
{
|
||||
var elementIds = SugarClient.Queryable<Relevance>().Where(
|
||||
u =>
|
||||
(u.Key == Define.ROLEELEMENT && _userRoleIds.Contains(u.FirstId))).Select(u => u.SecondId).ToList();
|
||||
var elementIds = GetElementIds();
|
||||
var usermoduleelements = SugarClient.Queryable<ModuleElement>().Where(u => elementIds.Contains(u.Id));
|
||||
return usermoduleelements.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取角色可访问的菜单Id
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private List<string> GetElementIds()
|
||||
{
|
||||
var elementIds = SugarClient.Queryable<Relevance>().Where(
|
||||
u =>
|
||||
(u.Key == Define.ROLEELEMENT && _userRoleIds.Contains(u.FirstId))).Select(u => u.SecondId).ToList();
|
||||
return elementIds;
|
||||
}
|
||||
|
||||
public List<Role> Roles
|
||||
{
|
||||
get { return SugarClient.Queryable<Role>().Where(u => _userRoleIds.Contains(u.Id)).ToList(); }
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace OpenAuth.App
|
||||
builder.RegisterGeneric(typeof(BaseRepository<,>)).As(typeof(IRepository<,>));
|
||||
builder.RegisterGeneric(typeof(UnitWork<>)).As(typeof(IUnitWork<>));
|
||||
//注入授权
|
||||
builder.RegisterType(typeof(LocalAuth)).As(typeof(IAuth));
|
||||
builder.RegisterType(typeof(LocalAuth)).As(typeof(IAuth)).InstancePerLifetimeScope();
|
||||
|
||||
//注册app层
|
||||
builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly());
|
||||
|
||||
@@ -30,7 +30,13 @@ namespace OpenAuth.App
|
||||
var columnFields = loginContext.GetTableColumns("Category");
|
||||
if (columnFields == null || columnFields.Count == 0)
|
||||
{
|
||||
throw new Exception("请在代码生成界面配置Category表的字段属性");
|
||||
//因为分类字典值需要在别的地方使用,必需初始化有值
|
||||
columnFields = new List<BuilderTableColumn>
|
||||
{
|
||||
new() { ColumnName = "Name", ColumnType = "string" },
|
||||
new() { ColumnName = "DtCode", ColumnType = "string" },
|
||||
new() { ColumnName = "DtValue", ColumnType = "string" }
|
||||
};
|
||||
}
|
||||
|
||||
var result = new TableData();
|
||||
|
||||
149
OpenAuth.App/FlowApproverApp/FlowApproverApp.cs
Normal file
149
OpenAuth.App/FlowApproverApp/FlowApproverApp.cs
Normal file
@@ -0,0 +1,149 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure;
|
||||
using OpenAuth.App.Interface;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.App.Response;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using Quartz.Listener;
|
||||
using SqlSugar;
|
||||
|
||||
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
public class FlowApproverApp : SqlSugarBaseApp<FlowApprover>
|
||||
{
|
||||
/// <summary>
|
||||
/// 加签
|
||||
/// </summary>
|
||||
public void Add(AddApproverReq obj)
|
||||
{
|
||||
var loginContext = _auth.GetCurrentUser();
|
||||
if (loginContext == null)
|
||||
{
|
||||
throw new CommonException("登录已过期", Define.INVALID_TOKEN);
|
||||
}
|
||||
|
||||
//先删除已有的加签记录
|
||||
Repository.Delete(u => u.InstanceId == obj.InstanceId && u.ActivityId == obj.ActivityId);
|
||||
|
||||
var objs =new List<FlowApprover>();
|
||||
foreach (var approver in obj.Approvers)
|
||||
{
|
||||
var addobj = approver.MapTo<FlowApprover>();
|
||||
if (string.IsNullOrEmpty(addobj.Id))
|
||||
{
|
||||
addobj.Id = Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
CaculateCascade(addobj);
|
||||
addobj.InstanceId = obj.InstanceId;
|
||||
addobj.ActivityId = obj.ActivityId;
|
||||
addobj.ApproveType = obj.ApproveType;
|
||||
addobj.ReturnToSignNode = obj.ReturnToSignNode;
|
||||
addobj.Reason = obj.Reason;
|
||||
addobj.CreateDate = DateTime.Now;
|
||||
addobj.CreateUserId = loginContext.User.Id;
|
||||
addobj.CreateUserName = loginContext.User.Name;
|
||||
objs.Add(addobj);
|
||||
}
|
||||
|
||||
Repository.InsertRange(objs);
|
||||
}
|
||||
|
||||
public void Update(AddApproverReq application)
|
||||
{
|
||||
var updateobj = application.MapTo<FlowApprover>();
|
||||
Repository.Update(updateobj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载当前节点的加签人
|
||||
/// </summary>
|
||||
public async Task<TableResp<FlowApprover>> Load(QueryApproverReq request)
|
||||
{
|
||||
var objs = await Repository.GetListAsync(u =>
|
||||
u.InstanceId == request.FlowInstanceId && u.ActivityId == request.ActivityId);
|
||||
return new TableResp<FlowApprover>()
|
||||
{
|
||||
data = objs
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前可以审批的加签人ID列表
|
||||
/// <para>如果是顺序执行,取第一个人</para>
|
||||
/// <para>否则并行且/并行或都是返回所有加签人</para>
|
||||
/// </summary>
|
||||
public string[] GetApproverIds(QueryApproverReq req)
|
||||
{
|
||||
var approvers = GetApprovers(req);
|
||||
if (approvers == null)
|
||||
{
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
//否则并行且/并行或都是返回所有加签人
|
||||
return approvers.Select(u => u.ApproverId).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前可以审批的加签人列表
|
||||
/// <para>如果是顺序执行,取第一个人</para>
|
||||
/// <para>否则并行且/并行或都是返回所有加签人</para>
|
||||
/// </summary>
|
||||
public FlowApprover[] GetApprovers(QueryApproverReq req)
|
||||
{
|
||||
var query= Repository.AsQueryable()
|
||||
.Where(u => u.InstanceId == req.FlowInstanceId
|
||||
&& u.ActivityId == req.ActivityId && u.Status == 0); //本节点待审批的加签人
|
||||
if (query.Count() == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
//如果是顺序执行,取第一个人
|
||||
if (query.First().ApproveType == 0)
|
||||
{
|
||||
var result = query.OrderBy(u => u.OrderNo).First();
|
||||
return new[] { result };
|
||||
}
|
||||
//否则并行且/并行或都是返回所有加签人
|
||||
return query.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审批加签节点
|
||||
/// </summary>
|
||||
public bool Verify(VerifyApproverReq verifyApproverReq)
|
||||
{
|
||||
var approve = Get(verifyApproverReq.Id);
|
||||
if (approve == null)
|
||||
{
|
||||
throw new Exception("加签审批失败,没能找打对应的加签人信息");
|
||||
}
|
||||
Repository.Update(u => new FlowApprover()
|
||||
{
|
||||
Status = verifyApproverReq.Status,
|
||||
VerifyComment = verifyApproverReq.VerifyComment,
|
||||
VerifyDate = DateTime.Now
|
||||
}, u => u.Id == verifyApproverReq.Id);
|
||||
|
||||
if (approve.ApproveType == 2)
|
||||
{
|
||||
//如果是并行或,只需要一个审批通过即可
|
||||
return Repository.IsAny(u => u.InstanceId == approve.InstanceId
|
||||
&& u.ActivityId == approve.ActivityId && u.Status == 1);
|
||||
}
|
||||
|
||||
//没有未处理的加签信息
|
||||
return !Repository.IsAny(u => u.InstanceId == approve.InstanceId
|
||||
&& u.ActivityId == approve.ActivityId && u.Status == 0);
|
||||
}
|
||||
|
||||
public FlowApproverApp(ISqlSugarClient client, IAuth auth) : base(client, auth)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
37
OpenAuth.App/FlowApproverApp/Request/AddApproverDtlReq.cs
Normal file
37
OpenAuth.App/FlowApproverApp/Request/AddApproverDtlReq.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// Author:Yubao Li
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenAuth.App.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 加签人具体信息
|
||||
/// </summary>
|
||||
public class AddApproverDtlReq
|
||||
{
|
||||
/// <summary>
|
||||
///Id
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///加签人姓名
|
||||
/// </summary>
|
||||
public string ApproverName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///加签人ID
|
||||
/// </summary>
|
||||
public string ApproverId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///顺序号(当类型为0时)
|
||||
/// </summary>
|
||||
public int? OrderNo { get; set; }
|
||||
}
|
||||
}
|
||||
53
OpenAuth.App/FlowApproverApp/Request/AddApproverReq.cs
Normal file
53
OpenAuth.App/FlowApproverApp/Request/AddApproverReq.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// Author:Yubao Li
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.App.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建或修改加签信息
|
||||
/// </summary>
|
||||
public class AddApproverReq
|
||||
{
|
||||
/// <summary>
|
||||
///加签原因
|
||||
/// </summary>
|
||||
public string Reason { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///工作流实例Id
|
||||
/// </summary>
|
||||
public string InstanceId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///类型(0顺序,1并行且,2并行或)
|
||||
/// </summary>
|
||||
public int ApproveType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///父节点ID,应对多次加签
|
||||
/// </summary>
|
||||
public string ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///当前节点ID
|
||||
/// </summary>
|
||||
public string ActivityId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///是否回到加签节点
|
||||
/// <para>如果不需要,则加签完成后自动审批完成,否则还需要当前节点审批</para>
|
||||
/// </summary>
|
||||
public bool? ReturnToSignNode { get; set; }
|
||||
|
||||
public List<AddApproverDtlReq> Approvers { get; set; }
|
||||
}
|
||||
}
|
||||
16
OpenAuth.App/FlowApproverApp/Request/QueryApproverReq.cs
Normal file
16
OpenAuth.App/FlowApproverApp/Request/QueryApproverReq.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace OpenAuth.App.Request
|
||||
{
|
||||
public class QueryApproverReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置流程实例ID
|
||||
/// </summary>
|
||||
public string FlowInstanceId { get;set; }
|
||||
|
||||
/// <summary>
|
||||
/// 节点Id
|
||||
/// </summary>
|
||||
public string ActivityId{ get;set; }
|
||||
|
||||
}
|
||||
}
|
||||
33
OpenAuth.App/FlowApproverApp/Request/VerifyApproverReq.cs
Normal file
33
OpenAuth.App/FlowApproverApp/Request/VerifyApproverReq.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// Author:Yubao Li
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenAuth.App.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 审批加签节点
|
||||
/// </summary>
|
||||
public class VerifyApproverReq
|
||||
{
|
||||
/// <summary>
|
||||
///Id
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///审批意见
|
||||
/// </summary>
|
||||
public string VerifyComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///状态(0未处理,1通过,2未通过,3驳回)
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,37 +1,21 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : OpenAuth.App
|
||||
// Author : 李玉宝
|
||||
// Created : 07-19-2018
|
||||
//
|
||||
// Last Modified By : 李玉宝
|
||||
// Last Modified On : 07-19-2018
|
||||
// ***********************************************************************
|
||||
// <copyright file="FlowInstanceApp.cs" company="OpenAuth.App">
|
||||
// Copyright (c) http://www.openauth.net.cn. All rights reserved.
|
||||
// </copyright>
|
||||
// <summary></summary>
|
||||
// ***********************************************************************
|
||||
|
||||
using Infrastructure;
|
||||
using OpenAuth.App.Flow;
|
||||
using OpenAuth.App.Interface;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.App.Response;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using OpenAuth.Repository.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Castle.Core.Internal;
|
||||
using Infrastructure.Const;
|
||||
using Infrastructure.Extensions;
|
||||
using Infrastructure.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using OpenAuth.Repository;
|
||||
using OpenAuth.Repository.QueryObj;
|
||||
using SqlSugar;
|
||||
using Yitter.IdGenerator;
|
||||
|
||||
namespace OpenAuth.App
|
||||
@@ -39,7 +23,7 @@ namespace OpenAuth.App
|
||||
/// <summary>
|
||||
/// 工作流实例表操作
|
||||
/// </summary>
|
||||
public class FlowInstanceApp : BaseStringApp<FlowInstance, OpenAuthDBContext>
|
||||
public class FlowInstanceApp : SqlSugarBaseApp<FlowInstance>
|
||||
{
|
||||
private RevelanceManagerApp _revelanceApp;
|
||||
private FlowSchemeApp _flowSchemeApp;
|
||||
@@ -50,24 +34,8 @@ namespace OpenAuth.App
|
||||
private DbExtension _dbExtension;
|
||||
private UserManagerApp _userManagerApp;
|
||||
private OrgManagerApp _orgManagerApp;
|
||||
|
||||
public FlowInstanceApp(IUnitWork<OpenAuthDBContext> unitWork,
|
||||
IRepository<FlowInstance, OpenAuthDBContext> repository
|
||||
, RevelanceManagerApp app, FlowSchemeApp flowSchemeApp, FormApp formApp,
|
||||
IHttpClientFactory httpClientFactory, IAuth auth, IServiceProvider serviceProvider,
|
||||
SysMessageApp messageApp, DbExtension dbExtension, UserManagerApp userManagerApp, OrgManagerApp orgManagerApp)
|
||||
: base(unitWork, repository, auth)
|
||||
{
|
||||
_revelanceApp = app;
|
||||
_flowSchemeApp = flowSchemeApp;
|
||||
_formApp = formApp;
|
||||
_httpClientFactory = httpClientFactory;
|
||||
_serviceProvider = serviceProvider;
|
||||
_messageApp = messageApp;
|
||||
_dbExtension = dbExtension;
|
||||
_userManagerApp = userManagerApp;
|
||||
_orgManagerApp = orgManagerApp;
|
||||
}
|
||||
private FlowApproverApp _flowApproverApp;
|
||||
private RevelanceManagerApp _revelanceManagerApp;
|
||||
|
||||
#region 流程处理API
|
||||
|
||||
@@ -130,22 +98,34 @@ namespace OpenAuth.App
|
||||
? FlowInstanceStatus.Finished
|
||||
: FlowInstanceStatus.Running);
|
||||
|
||||
UnitWork.Add(flowInstance);
|
||||
|
||||
SugarClient.Ado.BeginTran();
|
||||
SugarClient.Insertable(flowInstance).ExecuteCommand();
|
||||
wfruntime.flowInstanceId = flowInstance.Id;
|
||||
|
||||
//知会
|
||||
if (!addFlowInstanceReq.NoticeType.IsNullOrEmpty() && addFlowInstanceReq.NoticeIds != null)
|
||||
{
|
||||
_revelanceApp.Assign(new AssignReq
|
||||
{
|
||||
type = addFlowInstanceReq.NoticeType,
|
||||
firstId = flowInstance.Id,
|
||||
secIds = addFlowInstanceReq.NoticeIds.ToArray()
|
||||
});
|
||||
}
|
||||
|
||||
if (flowInstance.FrmType == 1) //如果是开发者自定义的表单
|
||||
{
|
||||
var t = Type.GetType("OpenAuth.App." + flowInstance.DbName + "App");
|
||||
ICustomerForm icf = (ICustomerForm) _serviceProvider.GetService(t);
|
||||
ICustomerForm icf = (ICustomerForm)_serviceProvider.GetService(t);
|
||||
try
|
||||
{
|
||||
icf.Add(flowInstance.Id, flowInstance.FrmData);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new Exception("流程表单数据解析失败,请检查表单是否填写完整");
|
||||
throw new Exception("流程表单数据解析失败,请检查表单是否填写完整");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//如果工作流配置的表单配置有对应的数据库
|
||||
@@ -206,7 +186,7 @@ namespace OpenAuth.App
|
||||
columnstr = columnstr.TrimEnd(',');
|
||||
valstr = valstr.TrimEnd(',');
|
||||
var sql = $"insert into {form.DbName}({columnstr}) values ({valstr})";
|
||||
UnitWork.ExecuteSql(sql);
|
||||
SugarClient.Ado.ExecuteCommand(sql);
|
||||
}
|
||||
|
||||
#endregion 根据运行实例改变当前节点状态
|
||||
@@ -225,12 +205,12 @@ namespace OpenAuth.App
|
||||
+ addFlowInstanceReq.Code + "/"
|
||||
+ addFlowInstanceReq.CustomName + "】"
|
||||
};
|
||||
UnitWork.Add(processOperationHistoryEntity);
|
||||
SugarClient.Insertable(processOperationHistoryEntity).ExecuteCommand();
|
||||
|
||||
#endregion 流程操作记录
|
||||
|
||||
AddTransHistory(wfruntime);
|
||||
UnitWork.Save();
|
||||
SugarClient.Ado.CommitTran();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -256,7 +236,7 @@ namespace OpenAuth.App
|
||||
if (form.FrmType == 1) //如果是开发者自定义的表单,更新对应数据库表数据
|
||||
{
|
||||
var t = Type.GetType("OpenAuth.App." + req.DbName + "App");
|
||||
ICustomerForm icf = (ICustomerForm) _serviceProvider.GetService(t);
|
||||
ICustomerForm icf = (ICustomerForm)_serviceProvider.GetService(t);
|
||||
icf.Update(req.Id, req.FrmData);
|
||||
}
|
||||
else if (form.FrmType == 2 && !string.IsNullOrEmpty(form.DbName)) //拖拽表单定义了关联数据库
|
||||
@@ -283,6 +263,7 @@ namespace OpenAuth.App
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
updatestr += $"{column.ColumnName} = '{val}',";
|
||||
}
|
||||
|
||||
@@ -291,7 +272,7 @@ namespace OpenAuth.App
|
||||
{
|
||||
var sql =
|
||||
$"update {form.DbName} set {updatestr} where {Define.DEFAULT_FORM_INSTANCE_ID_NAME}='{req.Id}'";
|
||||
UnitWork.ExecuteSql(sql);
|
||||
SugarClient.Ado.ExecuteCommand(sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -301,8 +282,7 @@ namespace OpenAuth.App
|
||||
flowinstance.FrmData = req.FrmData;
|
||||
flowinstance.DbName = req.DbName;
|
||||
flowinstance.CustomName = req.CustomName;
|
||||
UnitWork.Update(flowinstance);
|
||||
UnitWork.Save();
|
||||
SugarClient.Updateable(flowinstance).ExecuteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -324,8 +304,14 @@ namespace OpenAuth.App
|
||||
};
|
||||
|
||||
FlowInstance flowInstance = Get(instanceId);
|
||||
var approvers = _flowApproverApp.GetApproverIds(new QueryApproverReq
|
||||
{
|
||||
FlowInstanceId = instanceId,
|
||||
ActivityId = flowInstance.ActivityId
|
||||
});
|
||||
|
||||
if (flowInstance.MakerList != "1" && !flowInstance.MakerList.Contains(user.Id))
|
||||
if (flowInstance.MakerList != "1" && !flowInstance.MakerList.Contains(user.Id) &&
|
||||
!approvers.Contains(user.Id))
|
||||
{
|
||||
throw new Exception("当前用户没有审批该节点权限");
|
||||
}
|
||||
@@ -342,7 +328,7 @@ namespace OpenAuth.App
|
||||
|
||||
string canCheckId = ""; //寻找当前登录用户可审核的节点Id
|
||||
foreach (string fromForkStartNodeId in wfruntime.FromNodeLines[wfruntime.currentNodeId]
|
||||
.Select(u => u.to))
|
||||
.Select(u => u.to))
|
||||
{
|
||||
var fromForkStartNode = wfruntime.Nodes[fromForkStartNodeId]; //与会前开始节点直接连接的节点
|
||||
canCheckId = GetOneForkLineCanCheckNodeId(fromForkStartNode, wfruntime, tag);
|
||||
@@ -353,9 +339,10 @@ namespace OpenAuth.App
|
||||
{
|
||||
throw (new Exception("审核异常,找不到审核节点"));
|
||||
}
|
||||
|
||||
var content = $"{user.Account}-{DateTime.Now.ToString("yyyy-MM-dd HH:mm")}审批了【{wfruntime.Nodes[canCheckId].name}】" +
|
||||
$"结果:{(tag.Taged == 1 ? "同意" : "不同意")},备注:{tag.Description}";
|
||||
|
||||
var content =
|
||||
$"{user.Account}-{DateTime.Now.ToString("yyyy-MM-dd HH:mm")}审批了【{wfruntime.Nodes[canCheckId].name}】" +
|
||||
$"结果:{(tag.Taged == 1 ? "同意" : "不同意")},备注:{tag.Description}";
|
||||
AddOperationHis(instanceId, tag, content);
|
||||
|
||||
wfruntime.MakeTagNode(canCheckId, tag); //标记审核节点状态
|
||||
@@ -384,12 +371,12 @@ namespace OpenAuth.App
|
||||
flowInstance.MakerList = GetForkNodeMakers(wfruntime, wfruntime.currentNodeId);
|
||||
AddTransHistory(wfruntime);
|
||||
}
|
||||
|
||||
|
||||
flowInstance.SchemeContent = JsonHelper.Instance.Serialize(wfruntime.ToSchemeObj());
|
||||
}
|
||||
|
||||
#endregion 会签
|
||||
|
||||
|
||||
#region 一般审核
|
||||
|
||||
else
|
||||
@@ -399,24 +386,21 @@ namespace OpenAuth.App
|
||||
|
||||
#endregion 一般审核
|
||||
|
||||
if (!string.IsNullOrEmpty(request.FrmData))
|
||||
//自定义开发表单,需要更新对应的数据库
|
||||
if (!string.IsNullOrEmpty(request.FrmData) && flowInstance.FrmType == 1)
|
||||
{
|
||||
flowInstance.FrmData = request.FrmData;
|
||||
|
||||
if (flowInstance.FrmType == 1) //如果是开发者自定义的表单,更新对应数据库表数据
|
||||
{
|
||||
var t = Type.GetType("OpenAuth.App." + flowInstance.DbName + "App");
|
||||
ICustomerForm icf = (ICustomerForm) _serviceProvider.GetService(t);
|
||||
icf.Update(flowInstance.Id, flowInstance.FrmData);
|
||||
}
|
||||
var t = Type.GetType("OpenAuth.App." + flowInstance.DbName + "App");
|
||||
ICustomerForm icf = (ICustomerForm)_serviceProvider.GetService(t);
|
||||
icf.Update(flowInstance.Id, flowInstance.FrmData);
|
||||
}
|
||||
|
||||
UnitWork.Update(flowInstance);
|
||||
|
||||
SugarClient.Updateable(flowInstance).ExecuteCommand();
|
||||
//给流程创建人发送通知信息
|
||||
_messageApp.SendMsgTo(flowInstance.CreateUserId,
|
||||
$"你的流程[{flowInstance.CustomName}]已被{user.Name}处理。");
|
||||
|
||||
UnitWork.Save();
|
||||
SugarClient.Ado.CommitTran();
|
||||
|
||||
wfruntime.NotifyThirdParty(_httpClientFactory.CreateClient(), tag);
|
||||
return true;
|
||||
@@ -428,19 +412,69 @@ namespace OpenAuth.App
|
||||
private void VerifyNode(VerificationReq request, Tag tag, FlowInstance flowInstance)
|
||||
{
|
||||
var user = _auth.GetCurrentUser().User;
|
||||
|
||||
if (!string.IsNullOrEmpty(request.FrmData))
|
||||
{
|
||||
flowInstance.FrmData = request.FrmData;
|
||||
}
|
||||
|
||||
FlowRuntime wfruntime = new FlowRuntime(flowInstance);
|
||||
wfruntime.MakeTagNode(wfruntime.currentNodeId, tag);
|
||||
if (tag.Taged == (int)TagState.Ok)
|
||||
{
|
||||
bool canNext = true;
|
||||
if (wfruntime.currentNode.setInfo.NodeDesignate == Setinfo.RUNTIME_MANY_PARENTS)
|
||||
var approvers = _flowApproverApp.GetApprovers(new QueryApproverReq
|
||||
{
|
||||
var roles = _auth.GetCurrentUser().Roles;
|
||||
//如果是连续多级直属上级且还没到指定的角色,只改变执行人,不到下一个节点
|
||||
if (!wfruntime.currentNode.setInfo.NodeDesignateData.roles.Intersect(roles.Select(u => u.Id)).Any())
|
||||
FlowInstanceId = flowInstance.Id,
|
||||
ActivityId = flowInstance.ActivityId
|
||||
});
|
||||
|
||||
var approverInfo = approvers?.Find(u => u.ApproverId == user.Id);
|
||||
if (approverInfo != null)
|
||||
{
|
||||
//如果是加签,则调整加签状态
|
||||
bool isfinish = _flowApproverApp.Verify(new VerifyApproverReq()
|
||||
{
|
||||
Id = approverInfo.Id,
|
||||
Status = (int)TagState.Ok,
|
||||
VerifyComment = tag.Description
|
||||
});
|
||||
if (!isfinish) //如果没有完成,不能到下一步
|
||||
{
|
||||
canNext = false;
|
||||
var parentId = _userManagerApp.GetParent(user.Id);
|
||||
}
|
||||
else if (approverInfo.ReturnToSignNode == null || !approverInfo.ReturnToSignNode.Value)
|
||||
{
|
||||
//加签完成后,不需要返回原节点,则直接审批加签的节点
|
||||
tag.UserId = approverInfo.CreateUserId;
|
||||
tag.UserName = approverInfo.CreateUserName;
|
||||
//把当前审批人变成加签人,从而可以自动审批
|
||||
wfruntime.MakeTagNode(wfruntime.currentNodeId, tag);
|
||||
}
|
||||
else
|
||||
{
|
||||
canNext = false; //加签完成了,但还需要回到该节点审批
|
||||
}
|
||||
}
|
||||
|
||||
if (wfruntime.currentNode.setInfo.NodeDesignate == Setinfo.RUNTIME_MANY_PARENTS)
|
||||
{
|
||||
List<string> roles;
|
||||
if (user.Id != tag.UserId)
|
||||
{
|
||||
//最后一个执行加签的用户,tag.UserId就是加签人id,需要找他的角色
|
||||
roles = _revelanceManagerApp.Get(Define.USERROLE, true, tag.UserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
roles = _auth.GetCurrentUser().Roles.Select(u => u.Id).ToList();
|
||||
}
|
||||
|
||||
//如果是连续多级直属上级且还没到指定的角色,只改变执行人,不到下一个节点
|
||||
if (!wfruntime.currentNode.setInfo.NodeDesignateData.roles.Intersect(roles).Any())
|
||||
{
|
||||
canNext = false;
|
||||
var parentId = _userManagerApp.GetParent(tag.UserId);
|
||||
flowInstance.MakerList = parentId;
|
||||
}
|
||||
}
|
||||
@@ -463,22 +497,38 @@ namespace OpenAuth.App
|
||||
wfruntime.nextNodeId = "-1";
|
||||
wfruntime.nextNodeType = 4;
|
||||
}
|
||||
|
||||
var content =
|
||||
$"{user.Account}-{DateTime.Now.ToString("yyyy-MM-dd HH:mm")}审批了【{wfruntime.currentNode.name}】" +
|
||||
$"结果:{(tag.Taged == 1 ? "同意" : "不同意")},备注:{tag.Description}";
|
||||
AddOperationHis(flowInstance.Id, tag, content);
|
||||
|
||||
if (flowInstance.IsFinish == 1)
|
||||
{
|
||||
//给知会人员发送通知信息
|
||||
var userids = _userManagerApp.GetNoticeUsers(flowInstance.Id);
|
||||
if (userids.Count > 0)
|
||||
{
|
||||
foreach (var userid in userids)
|
||||
{
|
||||
_messageApp.SendMsgTo(userid,
|
||||
$"[{flowInstance.CustomName}]已完成,您可以在我的流程中查看。");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var content = $"{user.Account}-{DateTime.Now.ToString("yyyy-MM-dd HH:mm")}审批了【{wfruntime.currentNode.name}】" +
|
||||
$"结果:{(tag.Taged == 1 ? "同意" : "不同意")},备注:{tag.Description}";
|
||||
AddOperationHis(flowInstance.Id, tag, content);
|
||||
flowInstance.SchemeContent = JsonHelper.Instance.Serialize(wfruntime.ToSchemeObj());
|
||||
flowInstance.SchemeContent = JsonHelper.Instance.Serialize(wfruntime.ToSchemeObj());
|
||||
|
||||
//如果审批通过,且下一个审批人是自己,则自动审批
|
||||
if (tag.Taged == (int)TagState.Ok)
|
||||
{
|
||||
if (flowInstance.MakerList != "1" && (!flowInstance.MakerList.Contains(user.Id)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
VerifyNode(request, tag, flowInstance);
|
||||
}
|
||||
//如果审批通过,且下一个审批人是自己,则自动审批
|
||||
if (tag.Taged == (int)TagState.Ok)
|
||||
{
|
||||
if (flowInstance.MakerList != "1" && (!flowInstance.MakerList.Contains(user.Id)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
VerifyNode(request, tag, flowInstance);
|
||||
}
|
||||
}
|
||||
|
||||
//会签时,获取一条会签分支上面是否有用户可审核的节点
|
||||
@@ -527,7 +577,7 @@ namespace OpenAuth.App
|
||||
var tag = new Tag
|
||||
{
|
||||
Description = reqest.VerificationOpinion,
|
||||
Taged = (int) TagState.Reject,
|
||||
Taged = (int)TagState.Reject,
|
||||
UserId = user.Id,
|
||||
UserName = user.Name
|
||||
};
|
||||
@@ -546,9 +596,9 @@ namespace OpenAuth.App
|
||||
}
|
||||
|
||||
flowInstance.SchemeContent = JsonHelper.Instance.Serialize(wfruntime.ToSchemeObj());
|
||||
UnitWork.Update(flowInstance);
|
||||
SugarClient.Updateable(flowInstance).ExecuteCommand();
|
||||
|
||||
UnitWork.Add(new FlowInstanceOperationHistory
|
||||
SugarClient.Insertable(new FlowInstanceOperationHistory
|
||||
{
|
||||
InstanceId = reqest.FlowInstanceId,
|
||||
CreateUserId = user.Id,
|
||||
@@ -558,13 +608,13 @@ namespace OpenAuth.App
|
||||
+ wfruntime.currentNode.name
|
||||
+ "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】驳回,备注:"
|
||||
+ reqest.VerificationOpinion
|
||||
});
|
||||
}).ExecuteCommand();
|
||||
|
||||
//给流程创建人发送通知信息
|
||||
_messageApp.SendMsgTo(flowInstance.CreateUserId,
|
||||
$"你的流程[{flowInstance.CustomName}]已被{user.Name}驳回。备注信息:{reqest.VerificationOpinion}");
|
||||
|
||||
UnitWork.Save();
|
||||
SugarClient.Ado.CommitTran();
|
||||
|
||||
wfruntime.NotifyThirdParty(_httpClientFactory.CreateClient(), tag);
|
||||
|
||||
@@ -613,7 +663,7 @@ namespace OpenAuth.App
|
||||
|
||||
makerList = GenericHelpers.ArrayToString(request.NodeDesignates, makerList);
|
||||
}
|
||||
else if (wfruntime.nextNode.setInfo.NodeDesignate == Setinfo.RUNTIME_PARENT
|
||||
else if (wfruntime.nextNode.setInfo.NodeDesignate == Setinfo.RUNTIME_PARENT
|
||||
|| wfruntime.nextNode.setInfo.NodeDesignate == Setinfo.RUNTIME_MANY_PARENTS)
|
||||
{
|
||||
//如果是上一节点执行人的直属上级或连续多级直属上级
|
||||
@@ -630,7 +680,8 @@ namespace OpenAuth.App
|
||||
{
|
||||
throw new Exception("无法找到当前用户的直属上级");
|
||||
}
|
||||
makerList = GenericHelpers.ArrayToString(new[]{parentId}, makerList);
|
||||
|
||||
makerList = GenericHelpers.ArrayToString(new[] { parentId }, makerList);
|
||||
}
|
||||
else if (wfruntime.nextNode.setInfo.NodeDesignate == Setinfo.RUNTIME_CHAIRMAN)
|
||||
{
|
||||
@@ -687,7 +738,7 @@ namespace OpenAuth.App
|
||||
{
|
||||
if (node.setInfo != null && node.setInfo.Taged != null)
|
||||
{
|
||||
if (node.type != FlowNode.FORK && node.setInfo.Taged != (int) TagState.Ok) //如果节点是不同意或驳回,则不用再找了
|
||||
if (node.type != FlowNode.FORK && node.setInfo.Taged != (int)TagState.Ok) //如果节点是不同意或驳回,则不用再找了
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -733,7 +784,8 @@ namespace OpenAuth.App
|
||||
}
|
||||
else if (node.setInfo != null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(node.setInfo.NodeDesignate) ||node.setInfo.NodeDesignate == Setinfo.ALL_USER) //所有成员
|
||||
if (string.IsNullOrEmpty(node.setInfo.NodeDesignate) ||
|
||||
node.setInfo.NodeDesignate == Setinfo.ALL_USER) //所有成员
|
||||
{
|
||||
makerList = "1";
|
||||
}
|
||||
@@ -774,7 +826,7 @@ namespace OpenAuth.App
|
||||
CheckNodeDesignate(request);
|
||||
}
|
||||
|
||||
bool isReject = TagState.Reject.Equals((TagState) Int32.Parse(request.VerificationFinally));
|
||||
bool isReject = TagState.Reject.Equals((TagState)Int32.Parse(request.VerificationFinally));
|
||||
if (isReject) //驳回
|
||||
{
|
||||
NodeReject(request);
|
||||
@@ -830,54 +882,93 @@ namespace OpenAuth.App
|
||||
|
||||
if (request.type == "wait") //待办事项
|
||||
{
|
||||
Expression<Func<FlowInstance, bool>> waitExp = u => (u.MakerList == "1"
|
||||
|| u.MakerList.Contains(user.User.Id)) &&
|
||||
(u.IsFinish == FlowInstanceStatus.Running ||
|
||||
u.IsFinish == FlowInstanceStatus.Rejected);
|
||||
//包括加签人包含当前用户,审批人包含当前用户且没有加签节点的
|
||||
var query = SugarClient.SqlQueryable<FlowInstance>($@"
|
||||
SELECT fi.*
|
||||
FROM FlowInstance fi
|
||||
JOIN (SELECT fith.Id
|
||||
FROM FlowInstance fith
|
||||
WHERE (MakerList = '1' or MakerList LIKE '%{user.User.Id}%')
|
||||
and (fith.IsFinish = {FlowInstanceStatus.Running} or fith.IsFinish = {FlowInstanceStatus.Rejected})
|
||||
and not exists (select 1
|
||||
from flowapprover
|
||||
where fith.Id = InstanceId
|
||||
and fith.ActivityId = ActivityId
|
||||
and Status = 0)
|
||||
UNION
|
||||
SELECT fa.InstanceId
|
||||
FROM FlowApprover fa
|
||||
WHERE fa.Status = 0
|
||||
AND fa.ApproverId = '{user.User.Id}') AS UniqueInstanceIds
|
||||
ON fi.Id = UniqueInstanceIds.Id")
|
||||
.WhereIF(!string.IsNullOrEmpty(request.key), t => t.CustomName.Contains(request.key));
|
||||
|
||||
// 加入搜索自定义标题
|
||||
if (!string.IsNullOrEmpty(request.key))
|
||||
{
|
||||
waitExp = PredicateBuilder.And(waitExp, t => t.CustomName.Contains(request.key));
|
||||
}
|
||||
|
||||
result.count = await UnitWork.Find(waitExp).CountAsync();
|
||||
|
||||
result.data = await UnitWork.Find(request.page, request.limit, "CreateDate descending", waitExp)
|
||||
.ToListAsync();
|
||||
result.count = await query.CountAsync();
|
||||
result.data = await query.OrderByDescending(u => u.CreateDate)
|
||||
.ToPageListAsync(request.page, request.limit);
|
||||
}
|
||||
else if (request.type == "disposed") //已办事项(即我参与过的流程)
|
||||
{
|
||||
var instances = UnitWork.Find<FlowInstanceTransitionHistory>(u => u.CreateUserId == user.User.Id)
|
||||
.Select(u => u.InstanceId).Distinct();
|
||||
var query = from ti in instances
|
||||
join ct in UnitWork.Find<FlowInstance>(null) on ti equals ct.Id
|
||||
select ct;
|
||||
var finalQuery = SugarClient.SqlQueryable<FlowInstance>($@"
|
||||
SELECT fi.*
|
||||
FROM FlowInstance fi
|
||||
JOIN (SELECT fith.InstanceId
|
||||
FROM FlowInstanceOperationHistory fith
|
||||
WHERE fith.CreateUserId = '{user.User.Id}'
|
||||
UNION
|
||||
SELECT fa.InstanceId
|
||||
FROM FlowApprover fa
|
||||
WHERE fa.Status <> 0
|
||||
AND fa.ApproverId = '{user.User.Id}') AS UniqueInstanceIds
|
||||
ON fi.Id = UniqueInstanceIds.InstanceId
|
||||
")
|
||||
.WhereIF(!string.IsNullOrEmpty(request.key), t => t.CustomName.Contains(request.key));
|
||||
|
||||
// 加入搜索自定义标题
|
||||
if (!string.IsNullOrEmpty(request.key))
|
||||
{
|
||||
query = query.Where(t => t.CustomName.Contains(request.key));
|
||||
}
|
||||
|
||||
result.data = await query.OrderByDescending(u => u.CreateDate)
|
||||
.Skip((request.page - 1) * request.limit)
|
||||
.Take(request.limit).ToListAsync();
|
||||
result.count = await instances.CountAsync();
|
||||
result.data = await finalQuery.OrderByDescending(i => i.CreateDate)
|
||||
.ToPageListAsync(request.page, request.limit);
|
||||
result.count = await finalQuery.CountAsync();
|
||||
}
|
||||
else //我的流程
|
||||
else //我的流程(包含知会我的)
|
||||
{
|
||||
Expression<Func<FlowInstance, bool>> myFlowExp = u => u.CreateUserId == user.User.Id;
|
||||
var sql = $@"
|
||||
SELECT fi.*
|
||||
FROM FlowInstance fi
|
||||
JOIN (select Id as InstanceId
|
||||
from FlowInstance
|
||||
where CreateUserId = '{user.User.Id}'
|
||||
union
|
||||
select distinct FirstId as InstanceId
|
||||
from Relevance rel
|
||||
inner join FlowInstance flow on rel.FirstId = flow.Id and flow.IsFinish = 1
|
||||
where `Key` = '{Define.INSTANCE_NOTICE_USER}'
|
||||
and SecondId = '{user.User.Id}'
|
||||
union
|
||||
select distinct a.FirstId as InstanceId
|
||||
from Relevance a
|
||||
inner join (select SecondId as RoleId
|
||||
from Relevance
|
||||
where `Key` = 'UserRole'
|
||||
and FirstId = '{user.User.Id}') b on a.SecondId = b.RoleId
|
||||
inner join FlowInstance flow on a.FirstId = flow.Id and flow.IsFinish = 1
|
||||
where a.`Key` = '{Define.INSTANCE_NOTICE_ROLE}') AS UniqueInstanceIds
|
||||
ON fi.Id = UniqueInstanceIds.InstanceId
|
||||
";
|
||||
|
||||
// 加入搜索自定义标题
|
||||
if (!string.IsNullOrEmpty(request.key))
|
||||
if (SugarClient.CurrentConnectionConfig.DbType == DbType.SqlServer)
|
||||
{
|
||||
myFlowExp = PredicateBuilder.And(myFlowExp, t => t.CustomName.Contains(request.key));
|
||||
sql = sql.Replace("`Key`", "[Key]");
|
||||
}
|
||||
else if (SugarClient.CurrentConnectionConfig.DbType == DbType.Oracle)
|
||||
{
|
||||
sql = sql.Replace("`Key`", "\"Key\"");
|
||||
}
|
||||
|
||||
result.count = await UnitWork.Find(myFlowExp).CountAsync();
|
||||
result.data = await UnitWork.Find(request.page, request.limit,
|
||||
"CreateDate descending", myFlowExp).ToListAsync();
|
||||
var finalQuery = SugarClient.SqlQueryable<FlowInstance>(sql)
|
||||
.WhereIF(!string.IsNullOrEmpty(request.key), t => t.CustomName.Contains(request.key));
|
||||
|
||||
result.count = await finalQuery.CountAsync();
|
||||
result.data = await finalQuery.OrderByDescending(u => u.CreateDate)
|
||||
.ToPageListAsync(request.page, request.limit);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -889,7 +980,7 @@ namespace OpenAuth.App
|
||||
private void AddTransHistory(FlowRuntime wfruntime)
|
||||
{
|
||||
var tag = _auth.GetCurrentUser().User;
|
||||
UnitWork.Add(new FlowInstanceTransitionHistory
|
||||
SugarClient.Insertable(new FlowInstanceTransitionHistory
|
||||
{
|
||||
InstanceId = wfruntime.flowInstanceId,
|
||||
CreateUserId = tag.Id,
|
||||
@@ -902,9 +993,9 @@ namespace OpenAuth.App
|
||||
ToNodeType = wfruntime.nextNodeType,
|
||||
IsFinish = wfruntime.nextNodeType == 4 ? FlowInstanceStatus.Finished : FlowInstanceStatus.Running,
|
||||
TransitionSate = 0
|
||||
});
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
|
||||
|
||||
private void AddOperationHis(string instanceId, Tag tag, string content)
|
||||
{
|
||||
FlowInstanceOperationHistory flowInstanceOperationHistory = new FlowInstanceOperationHistory
|
||||
@@ -916,12 +1007,13 @@ namespace OpenAuth.App
|
||||
Content = content
|
||||
}; //操作记录
|
||||
|
||||
UnitWork.Add(flowInstanceOperationHistory);
|
||||
SugarClient.Insertable(flowInstanceOperationHistory).ExecuteCommand();
|
||||
}
|
||||
|
||||
public List<FlowInstanceOperationHistory> QueryHistories(QueryFlowInstanceHistoryReq request)
|
||||
{
|
||||
return UnitWork.Find<FlowInstanceOperationHistory>(u => u.InstanceId == request.FlowInstanceId)
|
||||
return SugarClient.Queryable<FlowInstanceOperationHistory>()
|
||||
.Where(u => u.InstanceId == request.FlowInstanceId)
|
||||
.OrderByDescending(u => u.CreateDate).ToList();
|
||||
}
|
||||
|
||||
@@ -953,18 +1045,18 @@ namespace OpenAuth.App
|
||||
|
||||
AddTransHistory(wfruntime);
|
||||
|
||||
UnitWork.Update(flowInstance);
|
||||
SugarClient.Updateable(flowInstance).ExecuteCommand();
|
||||
|
||||
UnitWork.Add(new FlowInstanceOperationHistory
|
||||
SugarClient.Insertable(new FlowInstanceOperationHistory
|
||||
{
|
||||
InstanceId = request.FlowInstanceId,
|
||||
CreateUserId = user.Id,
|
||||
CreateUserName = user.Name,
|
||||
CreateDate = DateTime.Now,
|
||||
Content = $"【撤销】由{user.Name}撤销,备注:{request.Description}"
|
||||
});
|
||||
}).ExecuteCommand();
|
||||
|
||||
UnitWork.Save();
|
||||
SugarClient.Ado.CommitTran();
|
||||
}
|
||||
|
||||
/// <summary>启动流程</summary>
|
||||
@@ -999,7 +1091,7 @@ namespace OpenAuth.App
|
||||
? FlowInstanceStatus.Finished
|
||||
: FlowInstanceStatus.Running);
|
||||
|
||||
UnitWork.Update(flowInstance);
|
||||
SugarClient.Updateable(flowInstance).ExecuteCommand();
|
||||
|
||||
#endregion 根据运行实例改变当前节点状态
|
||||
|
||||
@@ -1013,12 +1105,30 @@ namespace OpenAuth.App
|
||||
CreateDate = DateTime.Now,
|
||||
Content = $"【启动】由用户{user.User.Name}启动"
|
||||
};
|
||||
UnitWork.Add(processOperationHistoryEntity);
|
||||
SugarClient.Insertable(processOperationHistoryEntity).ExecuteCommand();
|
||||
|
||||
#endregion 流程操作记录
|
||||
|
||||
AddTransHistory(wfruntime);
|
||||
UnitWork.Save();
|
||||
SugarClient.Ado.CommitTran();
|
||||
}
|
||||
|
||||
public FlowInstanceApp(ISqlSugarClient client, IAuth auth, RevelanceManagerApp revelanceApp,
|
||||
FlowSchemeApp flowSchemeApp, FormApp formApp, IHttpClientFactory httpClientFactory,
|
||||
SysMessageApp messageApp, UserManagerApp userManagerApp, OrgManagerApp orgManagerApp,
|
||||
IServiceProvider serviceProvider, FlowApproverApp flowApproverApp,
|
||||
RevelanceManagerApp revelanceManagerApp) : base(client, auth)
|
||||
{
|
||||
_revelanceApp = revelanceApp;
|
||||
_flowSchemeApp = flowSchemeApp;
|
||||
_formApp = formApp;
|
||||
_httpClientFactory = httpClientFactory;
|
||||
_messageApp = messageApp;
|
||||
_userManagerApp = userManagerApp;
|
||||
_orgManagerApp = orgManagerApp;
|
||||
_serviceProvider = serviceProvider;
|
||||
_flowApproverApp = flowApproverApp;
|
||||
_revelanceManagerApp = revelanceManagerApp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,37 +8,37 @@
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace OpenAuth.App.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建工作流请求
|
||||
/// </summary>
|
||||
/// 创建工作流请求
|
||||
/// </summary>
|
||||
public class AddFlowInstanceReq : NodeDesignateReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 实例编号
|
||||
/// </summary>
|
||||
[Description("实例编号")]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实例编号
|
||||
/// </summary>
|
||||
[Description("实例编号")]
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
/// 自定义名称
|
||||
/// </summary>
|
||||
[Description("自定义名称")]
|
||||
/// 自定义名称
|
||||
/// </summary>
|
||||
[Description("自定义名称")]
|
||||
public string CustomName { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 流程模板内容
|
||||
/// </summary>
|
||||
[Description("流程模板内容")]
|
||||
/// 流程模板内容
|
||||
/// </summary>
|
||||
[Description("流程模板内容")]
|
||||
public string SchemeContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流程模板ID
|
||||
/// </summary>
|
||||
/// 流程模板ID
|
||||
/// </summary>
|
||||
public string SchemeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -46,39 +46,42 @@ namespace OpenAuth.App.Request
|
||||
/// </summary>
|
||||
public string SchemeCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库名称
|
||||
/// </summary>
|
||||
[Description("数据库名称")]
|
||||
public string DbName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库名称
|
||||
/// </summary>
|
||||
[Description("数据库名称")]
|
||||
public string DbName { get; set; }
|
||||
/// <summary>
|
||||
/// 表单数据
|
||||
/// </summary>
|
||||
[Description("表单数据")]
|
||||
/// 表单数据
|
||||
/// </summary>
|
||||
[Description("表单数据")]
|
||||
public string FrmData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单类型
|
||||
/// </summary>
|
||||
[Description("表单类型")]
|
||||
/// 表单类型
|
||||
/// </summary>
|
||||
[Description("表单类型")]
|
||||
public int FrmType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单中的控件属性描述
|
||||
/// </summary>
|
||||
[Description("表单中的控件属性描述")]
|
||||
/// 表单中的控件属性描述
|
||||
/// </summary>
|
||||
[Description("表单中的控件属性描述")]
|
||||
public string FrmContentData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单控件位置模板
|
||||
/// </summary>
|
||||
[Description("表单控件位置模板")]
|
||||
/// 表单控件位置模板
|
||||
/// </summary>
|
||||
[Description("表单控件位置模板")]
|
||||
public string FrmContentParse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表单ID
|
||||
/// </summary>
|
||||
[Description("表单ID")]
|
||||
/// 表单ID
|
||||
/// </summary>
|
||||
[Description("表单ID")]
|
||||
public string FrmId { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所属部门
|
||||
/// </summary>
|
||||
@@ -86,21 +89,35 @@ namespace OpenAuth.App.Request
|
||||
public string OrgId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建用户主键
|
||||
/// </summary>
|
||||
[Description("创建用户主键")]
|
||||
/// 创建用户主键
|
||||
/// </summary>
|
||||
[Description("创建用户主键")]
|
||||
public string CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
[Description("创建用户")]
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
[Description("创建用户")]
|
||||
public string CreateUserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实例备注
|
||||
/// </summary>
|
||||
[Description("实例备注")]
|
||||
/// 实例备注
|
||||
/// </summary>
|
||||
[Description("实例备注")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 知会类型
|
||||
/// INSTANCE_NOTICE_USER :知会具体用户
|
||||
/// INSTANCE_NOTICE_ROLE :知会角色
|
||||
/// </summary>
|
||||
[Description("知会类型")]
|
||||
public string NoticeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 知会的用户或角色ID列表
|
||||
/// </summary>
|
||||
[Description("知会的用户或角色ID列表")]
|
||||
public List<string> NoticeIds { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,7 @@ namespace OpenAuth.App
|
||||
{
|
||||
Repository.Update(u => u.Id == obj.Id, u => new Form
|
||||
{
|
||||
FrmType = obj.FrmType,
|
||||
ContentData = obj.ContentData,
|
||||
Content = obj.Content,
|
||||
ContentParse = obj.ContentParse,
|
||||
|
||||
@@ -313,5 +313,44 @@ namespace OpenAuth.App
|
||||
}
|
||||
return Repository.FirstOrDefault(u => u.Id == userid).ParentId;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取流程实例通知的用户
|
||||
/// </summary>
|
||||
/// <param name="instanceId"></param>
|
||||
/// <returns></returns>
|
||||
public List<string> GetNoticeUsers(string instanceId)
|
||||
{
|
||||
var sql = $@"
|
||||
select u.*
|
||||
from `USER` u
|
||||
join (select distinct SecondId as UserId
|
||||
from Relevance
|
||||
where `Key` = '{Define.INSTANCE_NOTICE_USER}'
|
||||
and FirstId = '{instanceId}'
|
||||
union
|
||||
select distinct FirstId as UserId
|
||||
from Relevance a
|
||||
inner join (select SecondId as RoleId
|
||||
from Relevance
|
||||
where `Key` = '{Define.INSTANCE_NOTICE_ROLE}'
|
||||
and FirstId = '{instanceId}') b on a.SecondId = b.RoleId
|
||||
where `Key` = 'UserRole') userids on u.Id = userids.UserId";
|
||||
|
||||
if (UnitWork.GetDbContext().Database.GetDbConnection().GetType().Name == "SqlConnection")
|
||||
{
|
||||
sql = sql.Replace(" `USER` ", " [USER] ");
|
||||
sql = sql.Replace("`Key`", "[Key]");
|
||||
}
|
||||
else if (UnitWork.GetDbContext().Database.GetDbConnection().GetType().Name == "OracleConnection")
|
||||
{
|
||||
sql = sql.Replace(" `USER` ", " \"USER\" ");
|
||||
sql = sql.Replace("`Key`", "\"Key\"");
|
||||
}
|
||||
|
||||
var users = UnitWork.FromSql<User>(sql);
|
||||
return users.Select(u=>u.Id).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,17 @@
|
||||
@section header
|
||||
{
|
||||
<link rel="stylesheet" href="/css/treetable.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
|
||||
<link rel="stylesheet" href="/css/treetable.css"/>
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css"/>
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css"/>
|
||||
}
|
||||
|
||||
<blockquote class="layui-elem-quote news_search toolList" id="menus">
|
||||
</blockquote>
|
||||
|
||||
<table id="mainList"
|
||||
lay-data="{height: 'full-80',cellMinWidth:80, page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm"></table>
|
||||
<table id="mainList"
|
||||
lay-data="{height: 'full-80',cellMinWidth:80, page:true, id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
</table>
|
||||
|
||||
<script type="text/html" id="barList">
|
||||
@*<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>*@
|
||||
@@ -19,19 +21,19 @@
|
||||
|
||||
<!--用户添加/编辑窗口-->
|
||||
<div id="divEdit" style="display: none">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">类型标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Id" v-model="tmp.Id"
|
||||
<input type="text" name="Id"
|
||||
placeholder="请输入类型标识" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Name" v-model="tmp.Name" required lay-verify="required"
|
||||
<input type="text" name="Name" required lay-verify="required"
|
||||
placeholder="请输入名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,16 +41,16 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">类型分类</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="TypeName" name="TypeName" v-model="tmp.TypeName" required lay-verify="required" class="layui-input" />
|
||||
<input id="TypeId" name="TypeId" v-model="tmp.TypeId" required lay-verify="required" type="hidden" />
|
||||
|
||||
<input id="TypeName" name="TypeName" required lay-verify="required" class="layui-input"/>
|
||||
<input id="TypeId" name="TypeId" required lay-verify="required" type="hidden"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">描述</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Description" v-model="tmp.Description"
|
||||
<input type="text" name="Description"
|
||||
placeholder="请输入描述" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,4 +65,4 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/categories.js?v=3.2"></script>
|
||||
<script type="text/javascript" src="/userJs/categories.js?v3"></script>
|
||||
@@ -25,47 +25,47 @@
|
||||
|
||||
<!--添加/编辑窗口-->
|
||||
<div id="divEdit" style="display: none">
|
||||
<form class="layui-form" action="" id="formEdit">
|
||||
<input type="hidden" name="Id" v-model="Id"/>
|
||||
<form class="layui-form" action="" id="formEdit" lay-filter="formEdit">
|
||||
<input type="hidden" name="Id" />
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">资源标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="SourceCode" v-model="SourceCode" required lay-verify="required"
|
||||
<input type="text" name="SourceCode" required lay-verify="required"
|
||||
placeholder="即模块标识,比如Resource" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">二级标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="SubSourceCode" v-model="SubSourceCode" required lay-verify="required"
|
||||
<input type="text" name="SubSourceCode" required lay-verify="required"
|
||||
placeholder="二级资源标识" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">权限描述</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Description" v-model="Description" required lay-verify="required"
|
||||
<input type="text" name="Description" required lay-verify="required"
|
||||
placeholder="权限描述" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="SortNo" v-model="SortNo" required lay-verify="required"
|
||||
<input type="text" name="SortNo" required lay-verify="required"
|
||||
placeholder="1" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">权限规则</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="PrivilegeRules" v-model="PrivilegeRules" required lay-verify="required"
|
||||
<input type="text" name="PrivilegeRules" required lay-verify="required"
|
||||
placeholder="这个界面太复杂,请查看企业版效果" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">是否可用</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="Enable" v-model="Enable" lay-skin="switch" value="1">
|
||||
<input type="checkbox" name="Enable" lay-skin="switch" value="1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -80,4 +80,4 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/dataprivilegerules.js"></script>
|
||||
<script type="text/javascript" src="/userJs/dataprivilegerules.js?v3"></script>
|
||||
@@ -11,8 +11,8 @@
|
||||
}
|
||||
|
||||
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit">
|
||||
<input type="hidden" name="Id" v-model="tmp.Id" />
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
|
||||
<input type="hidden" name="Id" />
|
||||
<input type="hidden" name="Fields" id="Fields" value="0">
|
||||
|
||||
<div class="layui-row">
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">表单名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Name" v-model="tmp.Name" required lay-verify="required"
|
||||
<input type="text" name="Name" required lay-verify="required"
|
||||
placeholder="表单名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">关联数据表名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="DbName" v-model="tmp.DbName" required
|
||||
<input type="text" name="DbName" required
|
||||
placeholder="关联数据表名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,14 +42,14 @@
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">排序码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="SortCode" v-model="tmp.SortCode" class="layui-input">
|
||||
<input type="text" name="SortCode" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">备注</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="Description" v-model="tmp.Description"
|
||||
<textarea name="Description"
|
||||
placeholder="备注" class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,6 +92,6 @@
|
||||
<script type="text/javascript" charset="utf-8" src="/js/ueditor/formdesign/leipi.formdesign.v4.js?2023"></script>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/formEdit.js?v2.0.0"></script>
|
||||
<script type="text/javascript" src="/userJs/formEdit.js?v3"></script>
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
@section header
|
||||
{
|
||||
<link rel="stylesheet" href="/css/treetable.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
|
||||
<link rel="stylesheet" href="/css/treetable.css"/>
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css"/>
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css"/>
|
||||
}
|
||||
|
||||
<blockquote class="layui-elem-quote news_search toolList" id="menus">
|
||||
</blockquote>
|
||||
|
||||
@@ -18,46 +19,45 @@
|
||||
lay-data="{height: 'full-80', id:'mainList'}"
|
||||
lay-filter="list" lay-size="sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Name', width:120, sort: true, fixed: true}">模块名称</th>
|
||||
<th lay-data="{field:'Status', width:100,templet: '#statusTpl'}">导航栏展示</th>
|
||||
<th lay-data="{field:'IsSys', width:100,templet: '#sysTpl'}">模块类型</th>
|
||||
<th lay-data="{field:'IconName', width:60,templet: '#iconTpl'}">图标</th>
|
||||
<th lay-data="{field:'CascadeId', width:80}">层级ID</th>
|
||||
<th lay-data="{field:'Code', width:80}">模块标识</th>
|
||||
<th lay-data="{field:'Url', width:200}">Url</th>
|
||||
<th lay-data="{field:'ParentName', width:135}">父节点名称</th>
|
||||
<th lay-data="{field:'SortNo', width:80}">排序号</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th lay-data="{checkbox:true, fixed: true}"></th>
|
||||
<th lay-data="{field:'Name', width:120, sort: true, fixed: true}">模块名称</th>
|
||||
<th lay-data="{field:'Status', width:100,templet: '#statusTpl'}">导航栏展示</th>
|
||||
<th lay-data="{field:'IsSys', width:100,templet: '#sysTpl'}">模块类型</th>
|
||||
<th lay-data="{field:'IconName', width:60,templet: '#iconTpl'}">图标</th>
|
||||
<th lay-data="{field:'CascadeId', width:80}">层级ID</th>
|
||||
<th lay-data="{field:'Code', width:80}">模块标识</th>
|
||||
<th lay-data="{field:'Url', width:200}">Url</th>
|
||||
<th lay-data="{field:'ParentName', width:135}">父节点名称</th>
|
||||
<th lay-data="{field:'SortNo', width:80}">排序号</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/html" id="iconTpl">
|
||||
{{# if( d.IconName != null && d.IconName != ''){ }}
|
||||
{{# if( d.IconName != null && d.IconName != ''){ }}
|
||||
<i class="layui-icon {{ d.IconName }}"></i>
|
||||
{{# } else { }}
|
||||
{{# } else { }}
|
||||
{{ d.IconName }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="statusTpl">
|
||||
{{# if( d.Status == -1){ }}
|
||||
{{# if( d.Status == -1){ }}
|
||||
<span style="color:red">隐藏</span>
|
||||
{{# } else { }}
|
||||
{{# } else { }}
|
||||
<span style="color:green">显示</span>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="sysTpl">
|
||||
{{# if( d.IsSys == 1){ }}
|
||||
<script type="text/html" id="sysTpl">
|
||||
{{# if( d.IsSys == 1){ }}
|
||||
<span class="layui-badge">内置</span>
|
||||
{{# } else { }}
|
||||
{{# } else { }}
|
||||
<span class="layui-badge layui-bg-green">自定义</span>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-xs">
|
||||
<div class="layui-col-xs3">
|
||||
<!--菜单列表-->
|
||||
<table class="layui-table"
|
||||
lay-data="{height: 'full-80', id:'menuList', text: { none: '单击模块列表数据行查看菜单' }}"
|
||||
@@ -69,32 +69,31 @@
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
|
||||
<script type="text/html" id="menuTpl">
|
||||
<button class="layui-btn layui-btn-xs {{ d.Class }} layui-btn-fluid" alt="{{ d.DomId }}"> <i class="layui-icon {{ d.Icon }}"></i> {{ d.Name }}</button>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--模块添加/编辑窗口-->
|
||||
<div id="divEdit" style="display: none">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
|
||||
|
||||
<input type="hidden" name="Id" v-model="tmp.Id" />
|
||||
<input type="hidden" name="Id"/>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">模块名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Name" v-model="tmp.Name" required lay-verify="required"
|
||||
<input type="text" name="Name" required lay-verify="required"
|
||||
placeholder="请输入模块名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">导航栏展示</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="Status" v-model="tmp.Status" required lay-verify="required">
|
||||
<option value="0" selected="selected" >正常</option>
|
||||
<select name="Status" required lay-verify="required">
|
||||
<option value="0" selected="selected">正常</option>
|
||||
<option value="-1">隐藏</option>
|
||||
</select>
|
||||
|
||||
@@ -103,27 +102,27 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">模块标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Code" v-model="tmp.Code"
|
||||
<input type="text" name="Code"
|
||||
placeholder="比如:Module" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">URL地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Url" v-model="tmp.Url" required lay-verify="required"
|
||||
<input type="text" name="Url" required lay-verify="required"
|
||||
placeholder="请输入URL" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图标</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="IconName" name="IconName" v-model="tmp.IconName" lay-filter="iconPicker" class="layui-input">
|
||||
<input type="text" id="IconName" name="IconName" lay-filter="iconPicker" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="SortNo" v-model="tmp.SortNo" required lay-verify="required"
|
||||
<input type="text" name="SortNo" required lay-verify="required"
|
||||
placeholder="请输入排序号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,9 +130,8 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">所属模块</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="ParentName" name="ParentName" v-model="tmp.ParentName" class="layui-input" />
|
||||
<input id="ParentId" name="ParentId" v-model="tmp.ParentId" type="hidden" />
|
||||
|
||||
<input id="ParentName" name="ParentName" class="layui-input"/>
|
||||
<input id="ParentId" name="ParentId" type="hidden"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -148,15 +146,15 @@
|
||||
|
||||
<!--添加菜单窗口-->
|
||||
<div id="divMenuEdit" style="display: none">
|
||||
<form class="layui-form layui-form-pane" action="" id="mfromEdit">
|
||||
<form class="layui-form layui-form-pane" action="" id="mfromEdit" lay-filter="mfromEdit">
|
||||
|
||||
<input type="hidden" name="Id" v-model="tmp.Id" />
|
||||
<input type="hidden" name="ModuleId" v-model="tmp.ModuleId" />
|
||||
<input type="hidden" name="Id"/>
|
||||
<input type="hidden" name="ModuleId"/>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Name" v-model="tmp.Name" required lay-verify="required"
|
||||
<input type="text" name="Name" required lay-verify="required"
|
||||
placeholder="请输入名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,28 +162,28 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">DomId</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="DomId" v-model="tmp.DomId" required lay-verify="required"
|
||||
<input type="text" name="DomId" required lay-verify="required"
|
||||
placeholder="请输入DomId" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图标</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="Icon" name="Icon" v-model="tmp.Icon" lay-filter="btnIconPicker" class="layui-input">
|
||||
<input type="text" id="Icon" name="Icon" lay-filter="btnIconPicker" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">样式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Class" v-model="tmp.Class"
|
||||
<input type="text" name="Class"
|
||||
placeholder="菜单的样式,如:layui-btn-danger" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Sort" v-model="tmp.Sort" required lay-verify="required"
|
||||
<input type="text" name="Sort" required lay-verify="required"
|
||||
placeholder="请输入排序号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -200,4 +198,4 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/modules.js"></script>
|
||||
<script type="text/javascript" src="/userJs/modules.js?v2"></script>
|
||||
@@ -42,12 +42,12 @@
|
||||
|
||||
<!--添加/编辑窗口-->
|
||||
<div id="divEdit" style="display: none">
|
||||
<form class="layui-form" action="" id="formEdit">
|
||||
<input type="hidden" name="Id" v-model="tmp.Id" />
|
||||
<form class="layui-form" action="" id="formEdit" lay-filter="formEdit">
|
||||
<input type="hidden" name="Id" />
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">任务名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="JobName" v-model="tmp.JobName" required lay-verify="required"
|
||||
<input type="text" name="JobName" required lay-verify="required"
|
||||
placeholder="任务名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,21 +55,21 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">任务地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="JobCall" v-model="tmp.JobCall" required lay-verify="required"
|
||||
<input type="text" name="JobCall" required lay-verify="required"
|
||||
placeholder="任务地址" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">任务参数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="JobCallParams" v-model="tmp.JobCallParams"
|
||||
<input type="text" name="JobCallParams"
|
||||
placeholder="任务参数,JSON格式" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">CRON表达式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Cron" v-model="tmp.Cron" required lay-verify="required"
|
||||
<input type="text" name="Cron" required lay-verify="required"
|
||||
placeholder="CRON表达式" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -77,7 +77,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">备注</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Remark" v-model="tmp.Remark"
|
||||
<input type="text" name="Remark"
|
||||
placeholder="备注" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,6 +92,6 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/openjobs.js"></script>
|
||||
<script type="text/javascript" src="/userJs/openjobs.js?v3"></script>
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
@section header
|
||||
{
|
||||
<link rel="stylesheet" href="/css/treetable.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
|
||||
<link rel="stylesheet" href="/css/treetable.css"/>
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css"/>
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css"/>
|
||||
}
|
||||
<blockquote class="layui-elem-quote news_search toolList" id ="menus">
|
||||
|
||||
<blockquote class="layui-elem-quote news_search toolList" id="menus">
|
||||
</blockquote>
|
||||
|
||||
<div class="layui-row">
|
||||
@@ -39,21 +40,21 @@
|
||||
|
||||
<!--用户添加/编辑窗口-->
|
||||
<div id="divEdit" style="display: none">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
|
||||
|
||||
<input type="hidden" name="Id" v-model="tmp.Id" />
|
||||
<input type="hidden" name="Id"/>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">部门名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Name" v-model="tmp.Name" required lay-verify="required"
|
||||
<input type="text" name="Name" required lay-verify="required"
|
||||
placeholder="请输入部门名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="SortNo" v-model="tmp.SortNo" required lay-verify="required"
|
||||
<input type="text" name="SortNo" required lay-verify="required"
|
||||
placeholder="请输入排序号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,9 +62,9 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">所属部门</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="ParentName" name="ParentName" v-model="tmp.ParentName" class="layui-input" />
|
||||
<input id="ParentId" name="ParentId" v-model="tmp.ParentId" type="hidden" />
|
||||
|
||||
<input id="ParentName" name="ParentName" class="layui-input"/>
|
||||
<input id="ParentId" name="ParentId" type="hidden"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -77,4 +78,4 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/orgs.js?v=1"></script>
|
||||
<script type="text/javascript" src="/userJs/orgs.js?v3"></script>
|
||||
@@ -25,11 +25,11 @@
|
||||
|
||||
<!--添加/编辑窗口-->
|
||||
<div id="divEdit" style="display: none">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">资源标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Id" v-model="tmp.Id" required lay-verify="required"
|
||||
<input type="text" name="Id" required lay-verify="required"
|
||||
placeholder="名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Name" v-model="tmp.Name" required lay-verify="required"
|
||||
<input type="text" name="Name" required lay-verify="required"
|
||||
placeholder="名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">描述</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Description" v-model="tmp.Description" required lay-verify="required"
|
||||
<input type="text" name="Description" required lay-verify="required"
|
||||
placeholder="描述" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,8 +53,8 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">所属应用</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="AppName" name="AppName" v-model="tmp.AppName" class="layui-input" />
|
||||
<input id="AppId" name="AppId" v-model="tmp.AppId" type="hidden" />
|
||||
<input id="AppName" name="AppName" class="layui-input" />
|
||||
<input id="AppId" name="AppId" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -68,6 +68,6 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/resources.js?v=3.2.1"></script>
|
||||
<script type="text/javascript" src="/userJs/resources.js?v4"></script>
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
@section header
|
||||
{
|
||||
<link rel="stylesheet" href="/css/treetable.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
|
||||
<link rel="stylesheet" href="/css/treetable.css"/>
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css"/>
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css"/>
|
||||
}
|
||||
<blockquote class="layui-elem-quote news_search toolList" id ="menus">
|
||||
|
||||
<blockquote class="layui-elem-quote news_search toolList" id="menus">
|
||||
</blockquote>
|
||||
|
||||
<div class="layui-row">
|
||||
<table class="layui-hide" id="mainList" lay-filter="list" lay-size="sm"></table>
|
||||
<table class="layui-hide" id="mainList" lay-filter="list" lay-size="sm"></table>
|
||||
<script type="text/html" id="Status">
|
||||
{{# if(d.Status == 0){ }}
|
||||
<span class="layui-badge layui-bg-blue">启用</span>
|
||||
@@ -21,18 +22,16 @@
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--角色添加/编辑窗口-->
|
||||
<div id="divEdit" style="display: none">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
|
||||
|
||||
<input type="hidden" name="Id" v-model="tmp.Id" />
|
||||
<input type="hidden" name="Id"/>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">角色名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Name" v-model="tmp.Name" required lay-verify="required"
|
||||
<input type="text" name="Name" required lay-verify="required"
|
||||
placeholder="请输入角色名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -40,7 +39,7 @@
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">禁用</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="Status" v-model="tmp.Status" lay-skin="switch" value="1">
|
||||
<input type="checkbox" name="Status" lay-skin="switch" value="1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
@@ -53,4 +52,4 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/roles.js?v=1"></script>
|
||||
<script type="text/javascript" src="/userJs/roles.js?v2"></script>
|
||||
@@ -4,19 +4,19 @@
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
|
||||
}
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Account" v-model="tmp.Account" required lay-verify="required"
|
||||
<input type="text" name="Account" required lay-verify="required"
|
||||
readonly="readonly" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Password" v-model="tmp.Password" required lay-verify="required"
|
||||
<input type="text" name="Password" required lay-verify="required"
|
||||
placeholder="请输入密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">确认密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ConfirmPassword" v-model="tmp.ConfirmPassword" required lay-verify="required"
|
||||
<input type="text" name="ConfirmPassword" required lay-verify="required"
|
||||
placeholder="请再次输入密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,4 +39,4 @@
|
||||
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/changePwd.js"></script>
|
||||
<script type="text/javascript" src="/userJs/changePwd.js?v3"></script>
|
||||
@@ -56,21 +56,21 @@
|
||||
|
||||
<!--用户添加/编辑窗口-->
|
||||
<div id="divEdit" style="display: none">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
|
||||
|
||||
<input type="hidden" name="Id" v-model="tmp.Id" />
|
||||
<input type="hidden" name="Id" />
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Account" v-model="tmp.Account" required lay-verify="required"
|
||||
<input type="text" name="Account" required lay-verify="required"
|
||||
placeholder="请输入登录账号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Name" v-model="tmp.Name" required lay-verify="required"
|
||||
<input type="text" name="Name" required lay-verify="required"
|
||||
placeholder="请输入昵称或姓名" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,8 +78,8 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">所属部门</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="Organizations" name="Organizations" v-model="tmp.Organizations" required lay-verify="required" class="layui-input" />
|
||||
<input id="OrganizationIds" name="OrganizationIds" v-model="tmp.OrganizationIds" required lay-verify="required" type="hidden" />
|
||||
<input id="Organizations" name="Organizations" required lay-verify="required" class="layui-input" />
|
||||
<input id="OrganizationIds" name="OrganizationIds" required lay-verify="required" type="hidden" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -87,14 +87,14 @@
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">性别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="Sex" value="1" title="男" v-model="tmp.Sex" >
|
||||
<input type="radio" name="Sex" value="0" title="女" v-model="tmp.Sex" >
|
||||
<input type="radio" name="Sex" value="1" title="男" >
|
||||
<input type="radio" name="Sex" value="0" title="女" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">禁用</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="Status" v-model="tmp.Status" lay-skin="switch" value="1">
|
||||
<input type="checkbox" name="Status" lay-skin="switch" value="1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
@@ -107,4 +107,4 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/users.js?v2.0"></script>
|
||||
<script type="text/javascript" src="/userJs/users.js?v3"></script>
|
||||
@@ -4,12 +4,12 @@
|
||||
<link rel="stylesheet" href="/js/dtree/dtree.css" />
|
||||
<link rel="stylesheet" href="/js/dtree/font/dtreefont.css" />
|
||||
}
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit">
|
||||
<form class="layui-form layui-form-pane" action="" id="formEdit" lay-filter="formEdit">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Account" v-model="tmp.Account" required lay-verify="required"
|
||||
<input type="text" name="Account" required lay-verify="required"
|
||||
readonly="readonly" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
@@ -17,15 +17,15 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Name" v-model="tmp.Name" required lay-verify="required"
|
||||
<input type="text" name="Name" required lay-verify="required"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">性别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="Sex" value="1" title="男" v-model="tmp.Sex" >
|
||||
<input type="radio" name="Sex" value="0" title="女" v-model="tmp.Sex" >
|
||||
<input type="radio" name="Sex" value="1" title="男" >
|
||||
<input type="radio" name="Sex" value="0" title="女" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -64,4 +64,4 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/profile.js"></script>
|
||||
<script type="text/javascript" src="/userJs/profile.js?v3"></script>
|
||||
@@ -1,7 +1,8 @@
|
||||
@section header
|
||||
{
|
||||
<link rel="stylesheet" href="/css/treetable.css" />
|
||||
<link rel="stylesheet" href="/css/treetable.css"/>
|
||||
}
|
||||
|
||||
<blockquote class="layui-elem-quote news_search toolList" id="menus">
|
||||
</blockquote>
|
||||
|
||||
@@ -20,124 +21,124 @@
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--添加/编辑窗口-->
|
||||
<div id="divEdit" style="display: none">
|
||||
<form class="layui-form" action="" id="formEdit">
|
||||
<input type="hidden" name="Id" v-model="tmp.Id" />
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">相关单据号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ExternalNo" v-model="tmp.ExternalNo"
|
||||
placeholder="相关单据号" autocomplete="off" class="layui-input">
|
||||
<form class="layui-form" action="" id="formEdit" lay-filter="formEdit">
|
||||
<input type="hidden" name="Id"/>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">单据号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ExternalNo"
|
||||
placeholder="单据号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">相关单据类型</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ExternalType" v-model="tmp.ExternalType"
|
||||
placeholder="相关单据类型" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">单据类型</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ExternalType"
|
||||
placeholder="单据类型" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">入库通知单状态 </label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="Status" value="1" title="value1" checked>
|
||||
<input type="radio" name="Status" value="0" title="value2">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态 </label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="Status" value="1" title="已完成" checked>
|
||||
<input type="radio" name="Status" value="0" title="正常">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">入库类型 </label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="OrderType" v-model="tmp.OrderType"
|
||||
placeholder="入库类型 " autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">入库类型 </label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="OrderType"
|
||||
placeholder="入库类型 " autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">商品类别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="GoodsType" v-model="tmp.GoodsType"
|
||||
placeholder="商品类别" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">商品类别</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="GoodsType"
|
||||
placeholder="商品类别" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">采购单号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="PurchaseNo" v-model="tmp.PurchaseNo"
|
||||
placeholder="采购单号" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">采购单号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="PurchaseNo"
|
||||
placeholder="采购单号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">仓库编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="StockId" v-model="tmp.StockId"
|
||||
placeholder="仓库编号" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">仓库编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="StockId"
|
||||
placeholder="仓库编号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">货主编号(固定值CQM)</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="OwnerId" v-model="tmp.OwnerId"
|
||||
placeholder="货主编号(固定值CQM)" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">货主</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="OwnerId"
|
||||
placeholder="货主编号(固定值CQM)" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">承运人编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ShipperId" v-model="tmp.ShipperId"
|
||||
placeholder="承运人编号" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">承运人</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ShipperId"
|
||||
placeholder="承运人编号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">供应商编号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="SupplierId" v-model="tmp.SupplierId"
|
||||
placeholder="供应商编号" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">供应商</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="SupplierId"
|
||||
placeholder="供应商编号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">预定入库时间</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ScheduledInboundTime" v-model="tmp.ScheduledInboundTime"
|
||||
placeholder="预定入库时间" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">入库时间</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ScheduledInboundTime"
|
||||
placeholder="预定入库时间" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">备注</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Remark" v-model="tmp.Remark"
|
||||
placeholder="备注" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">备注</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="Remark"
|
||||
placeholder="备注" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">有效标志</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="Enable" v-model="tmp.Enable" lay-skin="switch" value="1">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">有效标志</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="Enable" lay-skin="switch" value="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">承运方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="TransferType" v-model="tmp.TransferType"
|
||||
placeholder="承运方式" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">承运方式</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="TransferType"
|
||||
placeholder="承运方式" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">是否入保税库(0:否,1:是)</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="InBondedArea" v-model="tmp.InBondedArea" lay-skin="switch" value="1">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">是否入保税库</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="InBondedArea" lay-skin="switch" value="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">销退箱数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ReturnBoxNum" v-model="tmp.ReturnBoxNum"
|
||||
placeholder="销退箱数" autocomplete="off" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">销退箱数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="ReturnBoxNum"
|
||||
placeholder="销退箱数" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
@@ -147,6 +148,4 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/wmsinboundordertbls.js?v3.2.1"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="/userJs/wmsinboundordertbls.js?v4"></script>
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form','vue', 'ztree', 'layer', 'jquery', 'table','droptree','openauth','utils'], function () {
|
||||
}).use(['form', 'vue', 'ztree', 'layer', 'jquery', 'table', 'droptree', 'openauth', 'utils'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
@@ -9,33 +9,41 @@ layui.config({
|
||||
|
||||
$("#menus").loadMenus("Category");
|
||||
|
||||
var initVal = { //初始化的值
|
||||
Id: '',
|
||||
Name: '',
|
||||
TypeName: '',
|
||||
TypeId: '',
|
||||
Description: ''
|
||||
}
|
||||
|
||||
//加载表头
|
||||
$.getJSON('/Categories/All',
|
||||
{ page: 1, limit: 1 },
|
||||
function(data) {
|
||||
var columns = data.columnFields.filter(u => u.IsList ===true).map(function (e) {
|
||||
{page: 1, limit: 1},
|
||||
function (data) {
|
||||
var columns = data.columnFields.filter(u => u.IsList === true).map(function (e) {
|
||||
return {
|
||||
field: e.ColumnName,
|
||||
title: e.Comment
|
||||
};
|
||||
});
|
||||
columns.unshift({
|
||||
type: 'checkbox',
|
||||
fixed: 'left'
|
||||
});
|
||||
table.render({
|
||||
elem: '#mainList',
|
||||
page: true,
|
||||
url: '/Categories/All',
|
||||
cols: [columns]
|
||||
, response: {
|
||||
statusCode: 200 //规定成功的状态码,默认:0
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
columns.unshift({
|
||||
type: 'checkbox',
|
||||
fixed: 'left'
|
||||
});
|
||||
table.render({
|
||||
elem: '#mainList',
|
||||
page: true,
|
||||
url: '/Categories/All',
|
||||
cols: [columns]
|
||||
, response: {
|
||||
statusCode: 200 //规定成功的状态码,默认:0
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//主列表加载,可反复调用进行刷新
|
||||
var config= {}; //table的参数,如搜索key,点击tree的id
|
||||
var config = {}; //table的参数,如搜索key,点击tree的id
|
||||
var mainList = function (options) {
|
||||
if (options != undefined) {
|
||||
$.extend(config, options);
|
||||
@@ -45,49 +53,26 @@ layui.config({
|
||||
where: config
|
||||
, response: {
|
||||
statusCode: 200 //规定成功的状态码,默认:0
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function() {
|
||||
var vm;
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var editDlg = function () {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
area: ["500px", "400px"],
|
||||
type: 1,
|
||||
content: $('#divEdit'),
|
||||
success: function() {
|
||||
if(vm == undefined){
|
||||
vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp:data //使用一个tmp封装一下,后面可以直接用vm.tmp赋值
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
var _this = this;
|
||||
layui.droptree("/Categories/AllTypes", "#TypeName", "#TypeId", false,function (ids, names) {
|
||||
_this.tmp.TypeName = ids;
|
||||
_this.tmp.TypeId = names;
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
vm.tmp = Object.assign({}, vm.tmp,data)
|
||||
}
|
||||
success: function () {
|
||||
layui.droptree("/Categories/AllTypes", "#TypeName", "#TypeId", false);
|
||||
if (data == undefined) {
|
||||
form.val("formEdit", initVal);
|
||||
} else {
|
||||
form.val("formEdit", data);
|
||||
}
|
||||
},
|
||||
end: mainList
|
||||
});
|
||||
@@ -97,10 +82,10 @@ layui.config({
|
||||
}
|
||||
//提交数据
|
||||
form.on('submit(formSubmit)',
|
||||
function(data) {
|
||||
function (data) {
|
||||
$.post(url,
|
||||
data.field,
|
||||
function(data) {
|
||||
function (data) {
|
||||
layer.msg(data.Message);
|
||||
},
|
||||
"json");
|
||||
@@ -109,24 +94,20 @@ layui.config({
|
||||
}
|
||||
return {
|
||||
add: function() { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: ''
|
||||
});
|
||||
show(false);
|
||||
},
|
||||
update: function(data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
show(true,data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
|
||||
//监听表格内部按钮
|
||||
table.on('tool(list)', function (obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'detail') { //查看
|
||||
layer.msg('ID:' + data.Id + ' 的查看操作');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -136,26 +117,28 @@ layui.config({
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
openauth.del("/Categories/Delete",
|
||||
data.map(function (e) { return e.Id; }),
|
||||
data.map(function (e) {
|
||||
return e.Id;
|
||||
}),
|
||||
mainList);
|
||||
}
|
||||
, btnAdd: function () { //添加
|
||||
editDlg.add();
|
||||
}
|
||||
, btnEdit: function () { //编辑
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
if (data.length != 1) {
|
||||
layer.msg("请选择编辑的行,且同时只能编辑一行");
|
||||
return;
|
||||
}
|
||||
editDlg.update(data[0]);
|
||||
}
|
||||
, btnEdit: function () { //编辑
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
if (data.length != 1) {
|
||||
layer.msg("请选择编辑的行,且同时只能编辑一行");
|
||||
return;
|
||||
}
|
||||
editDlg.update(data[0]);
|
||||
}
|
||||
|
||||
, search: function () { //搜索
|
||||
mainList({ key: $('#key').val() });
|
||||
mainList({key: $('#key').val()});
|
||||
}
|
||||
, btnRefresh: function() {
|
||||
, btnRefresh: function () {
|
||||
mainList();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form','vue', 'ztree', 'layer', 'jquery', 'table','droptree','openauth','utils'], function () {
|
||||
}).use(['form','ztree', 'layer', 'jquery', 'table','droptree','openauth','utils'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
@@ -8,26 +8,10 @@ layui.config({
|
||||
var openauth = layui.openauth;
|
||||
var toplayer = (top == undefined || top.layer === undefined) ? layer : top.layer; //顶层的LAYER
|
||||
|
||||
var vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data() {
|
||||
return {
|
||||
tmp: {
|
||||
Account: '',
|
||||
Password: '',
|
||||
ConfirmPassword: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
var _this = this;
|
||||
$.get('/UserSession/GetUserName',
|
||||
function (data) {
|
||||
_this.tmp.Account = data;
|
||||
});
|
||||
form.render();
|
||||
}
|
||||
});
|
||||
$.get('/UserSession/GetUserName',
|
||||
function (data) {
|
||||
form.val("formEdit", {Account:data});
|
||||
});
|
||||
|
||||
var url = "/UserManager/ChangePassword";
|
||||
//提交数据
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form', 'vue', 'ztree', 'layer', 'jquery', 'table', 'droptree', 'openauth', 'utils'], function () {
|
||||
}).use(['form', 'ztree', 'layer', 'jquery', 'table', 'droptree', 'openauth', 'utils'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
@@ -10,6 +10,15 @@
|
||||
|
||||
$("#menus").loadMenus("DataPrivilegeRule");
|
||||
|
||||
var initVal = { //初始化的值
|
||||
Id: '',
|
||||
SourceCode: '',
|
||||
SubSourceCode: '',
|
||||
Description: '',
|
||||
SortNo: '',
|
||||
PrivilegeRules: '',
|
||||
Enable: 0,
|
||||
}
|
||||
|
||||
//加载表头
|
||||
$.getJSON('/DataPrivilegeRules/Load',
|
||||
@@ -56,9 +65,7 @@
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function () {
|
||||
var vm;
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
@@ -66,32 +73,12 @@
|
||||
type: 1,
|
||||
content: $('#divEdit'),
|
||||
success: function () {
|
||||
if(vm == undefined){
|
||||
vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp:data //使用一个tmp封装一下,后面可以直接用vm.tmp赋值
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId", false);
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId", false);
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
vm.tmp = Object.assign({}, vm.tmp,data)
|
||||
}
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId",false);
|
||||
if (data == undefined) {
|
||||
form.val("formEdit", initVal);
|
||||
} else {
|
||||
form.val("formEdit", data);
|
||||
}
|
||||
},
|
||||
end: mainList
|
||||
});
|
||||
@@ -112,15 +99,11 @@
|
||||
});
|
||||
}
|
||||
return {
|
||||
add: function () { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: ''
|
||||
});
|
||||
add: function() { //弹出添加
|
||||
show(false);
|
||||
},
|
||||
update: function (data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
update: function(data) { //弹出编辑框
|
||||
show(true,data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
@@ -20,6 +20,15 @@
|
||||
tips: 1 //1 上方 3下方
|
||||
});
|
||||
});
|
||||
|
||||
var initVal ={
|
||||
Id: '',
|
||||
Name: '',
|
||||
DbName: '',
|
||||
SortCode: '',
|
||||
Description: ''
|
||||
}
|
||||
|
||||
|
||||
//表单设计器
|
||||
var ue = UE.getEditor('myFormDesign', {
|
||||
@@ -264,15 +273,8 @@
|
||||
function (data) {
|
||||
var obj = data.Result;
|
||||
url = "/Forms/Update";
|
||||
new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return{
|
||||
tmp:data.Result
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
form.val("formEdit", data.Result);
|
||||
|
||||
//玄学:加个延迟ueditor才能正常
|
||||
setTimeout(function () {
|
||||
if (obj.FrmType === 0) {
|
||||
@@ -283,17 +285,7 @@
|
||||
}, 500);
|
||||
});
|
||||
} else {
|
||||
new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return{
|
||||
tmp:{
|
||||
Id: '',
|
||||
SortCode:1
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
form.val("formEdit", initVal);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,62 +1,39 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form','vue', 'ztree', 'layer', 'jquery', 'table', 'droptree', 'openauth', 'iconPicker', 'utils'], function () {
|
||||
}).use(['form', 'ztree', 'layer', 'jquery', 'table', 'droptree', 'openauth', 'iconPicker', 'utils'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
var iconPicker = layui.iconPicker;
|
||||
var btnIconPicker = layui.iconPicker;
|
||||
var vmMenu = new Vue({
|
||||
el: "#mfromEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp: {}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
btnIconPicker.checkIcon('btnIconPicker', this.tmp.Icon);
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
}
|
||||
});
|
||||
var vmModule = new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp: {} //使用一个tmp封装一下,后面可以直接用vm.tmp赋值
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
layui.droptree("/UserSession/GetModules", "#ParentName", "#ParentId", false);
|
||||
|
||||
iconPicker.checkIcon('iconPicker', this.tmp.IconName);
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
layui.droptree("/UserSession/GetModules", "#ParentName", "#ParentId", false);
|
||||
}
|
||||
});
|
||||
var moduleInitVal = { //模块初始化的值
|
||||
Id: "",
|
||||
SortNo: 1,
|
||||
IconName: 'layui-icon-app',
|
||||
ParentId: '',
|
||||
ParentName: '',
|
||||
Name: '',
|
||||
Url: '',
|
||||
Status: 0,
|
||||
Remark: '',
|
||||
Code: ''
|
||||
};
|
||||
var menuInital={ //菜单初始化的值
|
||||
Id: "",
|
||||
ModuleId: "",
|
||||
Name:'',
|
||||
DomeId:'',
|
||||
Class:'',
|
||||
Sort: 1,
|
||||
Icon: 'layui-icon-app'
|
||||
}
|
||||
|
||||
iconPicker.render({
|
||||
// 选择器,推荐使用input
|
||||
elem: '#IconName',
|
||||
type: 'fontClass',
|
||||
// 每个图标格子的宽度:'43px'或'20%'
|
||||
cellWidth: '43px',
|
||||
// 点击回调
|
||||
click: function (data) {
|
||||
vmModule.tmp.IconName = data.icon;
|
||||
}
|
||||
});
|
||||
btnIconPicker.render({ //按钮的图标
|
||||
// 选择器,推荐使用input
|
||||
@@ -64,19 +41,15 @@ layui.config({
|
||||
type: 'fontClass',
|
||||
// 每个图标格子的宽度:'43px'或'20%'
|
||||
cellWidth: '43px',
|
||||
// 点击回调
|
||||
click: function (data) {
|
||||
vmMenu.tmp.Icon = data.icon;
|
||||
}
|
||||
});
|
||||
|
||||
var table = layui.table;
|
||||
var openauth = layui.openauth;
|
||||
|
||||
|
||||
$("#menus").loadMenus("Module");
|
||||
|
||||
//主列表加载,可反复调用进行刷新
|
||||
var config= {}; //table的参数,如搜索key,点击tree的id
|
||||
var config = {}; //table的参数,如搜索key,点击tree的id
|
||||
var mainList = function (options) {
|
||||
if (options != undefined) {
|
||||
$.extend(config, options);
|
||||
@@ -86,7 +59,7 @@ layui.config({
|
||||
where: config
|
||||
, response: {
|
||||
statusCode: 200 //规定成功的状态码,默认:0
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -101,7 +74,7 @@ layui.config({
|
||||
where: menucon
|
||||
, response: {
|
||||
statusCode: 200 //规定成功的状态码,默认:0
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -110,7 +83,7 @@ layui.config({
|
||||
var url = '/UserSession/GetModules';
|
||||
var zTreeObj;
|
||||
var setting = {
|
||||
view: { selectedMulti: false },
|
||||
view: {selectedMulti: false},
|
||||
data: {
|
||||
key: {
|
||||
name: 'Name',
|
||||
@@ -125,17 +98,17 @@ layui.config({
|
||||
},
|
||||
callback: {
|
||||
onClick: function (event, treeId, treeNode) {
|
||||
mainList({ pId: treeNode.Id });
|
||||
mainList({pId: treeNode.Id});
|
||||
}
|
||||
}
|
||||
};
|
||||
var load = function () {
|
||||
$.getJSON(url, function (json) {
|
||||
zTreeObj = $.fn.zTree.init($("#tree"), setting);
|
||||
var newNode = { Name: "根节点", Id: null, ParentId: "" };
|
||||
var newNode = {Name: "根节点", Id: null, ParentId: ""};
|
||||
json.Result.push(newNode);
|
||||
zTreeObj.addNodes(null, json.Result);
|
||||
mainList({ pId: "" });
|
||||
mainList({pId: ""});
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
};
|
||||
@@ -146,35 +119,35 @@ layui.config({
|
||||
}();
|
||||
$("#tree").height($("div.layui-table-view").height());
|
||||
//添加(编辑)模块对话框
|
||||
var editDlg = function() {
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var editDlg = function () {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
area: ["500px", "480px"],
|
||||
type: 1,
|
||||
content: $('#divEdit'),
|
||||
success: function() {
|
||||
if(data.Id ==''){
|
||||
for(var key in vmModule.tmp){
|
||||
delete vmModule.tmp[key];
|
||||
}
|
||||
success: function () {
|
||||
layui.droptree("/UserSession/GetModules", "#ParentName", "#ParentId", false);
|
||||
if (data == undefined) {
|
||||
form.val("formEdit", moduleInitVal);
|
||||
} else {
|
||||
form.val("formEdit", data);
|
||||
iconPicker.checkIcon('iconPicker', data.IconName);
|
||||
}
|
||||
vmModule.tmp = Object.assign({}, vmModule.tmp,data)
|
||||
},
|
||||
end: mainList
|
||||
});
|
||||
var url = "/moduleManager/Add";
|
||||
if (update) {
|
||||
url = "/moduleManager/Update";
|
||||
url = "/moduleManager/Update";
|
||||
}
|
||||
//提交数据
|
||||
form.on('submit(formSubmit)',
|
||||
function(data) {
|
||||
function (data) {
|
||||
$.post(url,
|
||||
data.field,
|
||||
function(data) {
|
||||
function (data) {
|
||||
layer.msg(data.Message);
|
||||
if ((!update) && data.Code == 200) { //添加成功要刷新左边的树
|
||||
ztree.reload();
|
||||
@@ -185,25 +158,18 @@ layui.config({
|
||||
});
|
||||
}
|
||||
return {
|
||||
add: function() { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: "",
|
||||
SortNo: 1,
|
||||
IconName:'layui-icon-app'
|
||||
});
|
||||
add: function () { //弹出添加
|
||||
show(false);
|
||||
},
|
||||
update: function(data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
update: function (data) { //弹出编辑框
|
||||
show(true,data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
//添加菜单对话框
|
||||
var meditDlg = function () {
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
@@ -211,12 +177,12 @@ layui.config({
|
||||
type: 1,
|
||||
content: $('#divMenuEdit'),
|
||||
success: function () {
|
||||
if(data.Id ==''){
|
||||
for(var key in vmMenu.tmp){
|
||||
delete vmMenu.tmp[key];
|
||||
}
|
||||
if (data == undefined) {
|
||||
form.val("mfromEdit", menuInital);
|
||||
} else {
|
||||
form.val("mfromEdit", data);
|
||||
btnIconPicker.checkIcon('btnIconPicker', data.Icon);
|
||||
}
|
||||
vmMenu.tmp = Object.assign({}, vmMenu.tmp,data)
|
||||
},
|
||||
end: menuList
|
||||
});
|
||||
@@ -238,24 +204,17 @@ layui.config({
|
||||
}
|
||||
return {
|
||||
add: function (moduleId) { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: "",
|
||||
ModuleId:moduleId,
|
||||
Sort: 1,
|
||||
Icon:'layui-icon-app'
|
||||
});
|
||||
show(false);
|
||||
},
|
||||
update: function (data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
show(true,data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
//监听行单击事件
|
||||
table.on('row(list)', function(obj){
|
||||
menuList({moduleId:obj.data.Id});
|
||||
table.on('row(list)', function (obj) {
|
||||
menuList({moduleId: obj.data.Id});
|
||||
});
|
||||
|
||||
//监听页面主按钮操作
|
||||
@@ -264,7 +223,9 @@ layui.config({
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
openauth.del("/moduleManager/Delete",
|
||||
data.map(function (e) { return e.Id; }),
|
||||
data.map(function (e) {
|
||||
return e.Id;
|
||||
}),
|
||||
function () {
|
||||
mainList();
|
||||
ztree.reload();
|
||||
@@ -274,7 +235,9 @@ layui.config({
|
||||
var checkStatus = table.checkStatus('menuList')
|
||||
, data = checkStatus.data;
|
||||
openauth.del("/moduleManager/DelMenu",
|
||||
data.map(function (e) { return e.Id; }),
|
||||
data.map(function (e) {
|
||||
return e.Id;
|
||||
}),
|
||||
menuList);
|
||||
}
|
||||
, btnAdd: function () { //添加模块
|
||||
@@ -289,15 +252,15 @@ layui.config({
|
||||
}
|
||||
meditDlg.add(data[0].Id);
|
||||
}
|
||||
, btnEdit: function () { //编辑
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
if (data.length != 1) {
|
||||
layer.msg("请选择编辑的行,且同时只能编辑一行");
|
||||
return;
|
||||
}
|
||||
editDlg.update(data[0]);
|
||||
}
|
||||
, btnEdit: function () { //编辑
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
if (data.length != 1) {
|
||||
layer.msg("请选择编辑的行,且同时只能编辑一行");
|
||||
return;
|
||||
}
|
||||
editDlg.update(data[0]);
|
||||
}
|
||||
|
||||
, btnEditMenu: function () { //编辑菜单
|
||||
var checkStatus = table.checkStatus('menuList')
|
||||
@@ -310,9 +273,9 @@ layui.config({
|
||||
}
|
||||
|
||||
, search: function () { //搜索
|
||||
mainList({ key: $('#key').val() });
|
||||
mainList({key: $('#key').val()});
|
||||
}
|
||||
, btnRefresh: function() {
|
||||
, btnRefresh: function () {
|
||||
mainList();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form', 'vue', 'ztree', 'layer', 'jquery', 'table', 'droptree', 'openauth', 'utils'], function () {
|
||||
}).use(['form', 'ztree', 'layer', 'jquery', 'table', 'droptree', 'openauth', 'utils'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
@@ -10,6 +10,15 @@
|
||||
|
||||
$("#menus").loadMenus("OpenJob");
|
||||
|
||||
var initVal = { //初始化的值
|
||||
Id: '',
|
||||
JobName: '',
|
||||
JobCall: '',
|
||||
JobCallParams: '',
|
||||
Cron: '',
|
||||
Remark: ''
|
||||
}
|
||||
|
||||
//主列表加载,可反复调用进行刷新
|
||||
var config = {}; //table的参数,如搜索key,点击tree的id
|
||||
var mainList = function(options) {
|
||||
@@ -29,9 +38,7 @@
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function () {
|
||||
var vm;
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
@@ -39,32 +46,11 @@
|
||||
type: 1,
|
||||
content: $('#divEdit'),
|
||||
success: function () {
|
||||
if(vm == undefined){
|
||||
vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp:data //使用一个tmp封装一下,后面可以直接用vm.tmp赋值
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId", false);
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId", false);
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
vm.tmp = Object.assign({}, vm.tmp,data)
|
||||
}
|
||||
if (data == undefined) {
|
||||
form.val("formEdit", initVal);
|
||||
} else {
|
||||
form.val("formEdit", data);
|
||||
}
|
||||
},
|
||||
end: mainList
|
||||
});
|
||||
@@ -85,15 +71,11 @@
|
||||
});
|
||||
}
|
||||
return {
|
||||
add: function () { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: ''
|
||||
});
|
||||
add: function() { //弹出添加
|
||||
show(false);
|
||||
},
|
||||
update: function (data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
update: function(data) { //弹出编辑框
|
||||
show(true,data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form','vue', 'ztree', 'layer', 'jquery', 'table','droptree','openauth','utils'], function () {
|
||||
}).use(['form', 'ztree', 'layer', 'jquery', 'table','droptree','openauth','utils'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
@@ -8,6 +8,14 @@
|
||||
var openauth = layui.openauth;
|
||||
|
||||
$("#menus").loadMenus("Org");
|
||||
|
||||
var initVal = { //初始化的值
|
||||
Id: '',
|
||||
Name: '',
|
||||
SortNo: '',
|
||||
ParentName: '',
|
||||
ParentId: ''
|
||||
}
|
||||
|
||||
//主列表加载,可反复调用进行刷新
|
||||
var config= {}; //table的参数,如搜索key,点击tree的id
|
||||
@@ -66,9 +74,7 @@
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function() {
|
||||
var vm;
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
@@ -76,34 +82,12 @@
|
||||
type: 1,
|
||||
content: $('#divEdit'),
|
||||
success: function() {
|
||||
if(vm == undefined){
|
||||
vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp:data //使用一个tmp封装一下,后面可以直接用vm.tmp赋值
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
var _this = this;
|
||||
layui.droptree("/UserSession/GetOrgs", "#ParentName", "#ParentId", false,function (ids, names) {
|
||||
_this.tmp.ParentId = ids;
|
||||
_this.tmp.ParentName = names;
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
layui.droptree("/UserSession/GetOrgs", "#ParentName", "#ParentId", false);
|
||||
if (data == undefined) {
|
||||
form.val("formEdit", initVal);
|
||||
} else {
|
||||
vm.tmp = Object.assign({}, vm.tmp,data)
|
||||
}
|
||||
form.val("formEdit", data);
|
||||
}
|
||||
},
|
||||
end: mainList
|
||||
});
|
||||
@@ -128,15 +112,10 @@
|
||||
}
|
||||
return {
|
||||
add: function() { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: '',
|
||||
SortNo:1
|
||||
});
|
||||
show(false);
|
||||
},
|
||||
update: function(data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
show(true,data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form','vue', 'ztree', 'layer', 'jquery', 'table','droptree','openauth','utils','cookie'], function () {
|
||||
}).use(['form','ztree', 'layer', 'jquery', 'table','droptree','openauth','utils','cookie'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
@@ -98,33 +98,11 @@ layui.config({
|
||||
}
|
||||
}();
|
||||
|
||||
var vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data() {
|
||||
return {
|
||||
tmp: {
|
||||
Account: '',
|
||||
Name: '',
|
||||
Sex: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
var _this = this;
|
||||
$.get('/UserSession/GetUserProfile',
|
||||
function (data) {
|
||||
var obj = JSON.parse(data);
|
||||
_this.tmp = obj.Result;
|
||||
});
|
||||
}
|
||||
});
|
||||
$.get('/UserSession/GetUserProfile',
|
||||
function (data) {
|
||||
var obj = JSON.parse(data);
|
||||
form.val("formEdit", obj.Result);
|
||||
});
|
||||
|
||||
var url = "/UserManager/ChangeProfile";
|
||||
//提交数据
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form', 'vue', 'ztree', 'layer', 'jquery', 'table', 'droptree', 'openauth', 'utils'], function () {
|
||||
}).use(['form', 'ztree', 'layer', 'jquery', 'table', 'droptree', 'openauth', 'utils'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
@@ -10,36 +10,43 @@
|
||||
|
||||
$("#menus").loadMenus("Resource");
|
||||
|
||||
var initVal = { //初始化的值
|
||||
Id: "",
|
||||
Name: '',
|
||||
Description: "",
|
||||
AppName: "",
|
||||
AppId: ""
|
||||
}
|
||||
|
||||
//加载表头
|
||||
$.getJSON('/Resources/Load',
|
||||
{ page: 1, limit: 1 },
|
||||
function (data) {
|
||||
var columns = data.columnFields.filter(u => u.IsList ===true).map(function (e) {
|
||||
return {
|
||||
{page: 1, limit: 1},
|
||||
function (data) {
|
||||
var columns = data.columnFields.filter(u => u.IsList === true).map(function (e) {
|
||||
return {
|
||||
field: e.ColumnName,
|
||||
title: e.Comment
|
||||
};
|
||||
});
|
||||
columns.unshift({
|
||||
type: 'checkbox',
|
||||
fixed: 'left'
|
||||
});
|
||||
table.render({
|
||||
elem: '#mainList',
|
||||
page: true,
|
||||
};
|
||||
});
|
||||
columns.unshift({
|
||||
type: 'checkbox',
|
||||
fixed: 'left'
|
||||
});
|
||||
table.render({
|
||||
elem: '#mainList',
|
||||
page: true,
|
||||
url: '/Resources/Load',
|
||||
cols: [columns]
|
||||
, response: {
|
||||
statusCode: 200 //规定成功的状态码,默认:0
|
||||
}
|
||||
});
|
||||
cols: [columns]
|
||||
, response: {
|
||||
statusCode: 200 //规定成功的状态码,默认:0
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//主列表加载,可反复调用进行刷新
|
||||
var config = {}; //table的参数,如搜索key,点击tree的id
|
||||
var mainList = function(options) {
|
||||
var mainList = function (options) {
|
||||
if (options != undefined) {
|
||||
$.extend(config, options);
|
||||
}
|
||||
@@ -49,16 +56,14 @@
|
||||
where: config
|
||||
, response: {
|
||||
statusCode: 200 //规定成功的状态码,默认:0
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
mainList();
|
||||
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function () {
|
||||
var vm;
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
@@ -66,32 +71,12 @@
|
||||
type: 1,
|
||||
content: $('#divEdit'),
|
||||
success: function () {
|
||||
if(vm == undefined){
|
||||
vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp:data //使用一个tmp封装一下,后面可以直接用vm.tmp赋值
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId", false);
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId", false);
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
vm.tmp = Object.assign({}, vm.tmp,data)
|
||||
}
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId", false);
|
||||
if (data == undefined) {
|
||||
form.val("formEdit", initVal);
|
||||
} else {
|
||||
form.val("formEdit", data);
|
||||
}
|
||||
},
|
||||
end: mainList
|
||||
});
|
||||
@@ -113,14 +98,10 @@
|
||||
}
|
||||
return {
|
||||
add: function () { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: ''
|
||||
});
|
||||
show(false);
|
||||
},
|
||||
update: function (data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
show(true, data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
@@ -140,7 +121,9 @@
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
openauth.del("/Resources/Delete",
|
||||
data.map(function (e) { return e.Id; }),
|
||||
data.map(function (e) {
|
||||
return e.Id;
|
||||
}),
|
||||
mainList);
|
||||
}
|
||||
, btnAdd: function () { //添加
|
||||
@@ -157,7 +140,7 @@
|
||||
}
|
||||
|
||||
, search: function () { //搜索
|
||||
mainList({ key: $('#key').val() });
|
||||
mainList({key: $('#key').val()});
|
||||
}
|
||||
, btnRefresh: function () {
|
||||
mainList();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form','vue', 'ztree', 'layer', 'jquery', 'table','droptree','openauth','utils'], function () {
|
||||
}).use(['form','ztree', 'layer', 'jquery', 'table','droptree','openauth','utils'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
@@ -9,6 +9,11 @@ layui.config({
|
||||
var toplayer = (top == undefined || top.layer === undefined) ? layer : top.layer; //顶层的LAYER
|
||||
|
||||
$("#menus").loadMenus("Role");
|
||||
var initVal={ //初始化的值
|
||||
Id: "",
|
||||
Name: '',
|
||||
Status: 0, // Assuming 1 is true and 0 is false for radio buttons
|
||||
}
|
||||
|
||||
//主列表加载,角色后台没有分页,直接前端分页
|
||||
var config= {}; //table的参数,如搜索key,点击tree的id
|
||||
@@ -40,9 +45,7 @@ layui.config({
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function() {
|
||||
var vm;
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
@@ -50,29 +53,11 @@ layui.config({
|
||||
type: 1,
|
||||
content: $('#divEdit'),
|
||||
success: function() {
|
||||
if(vm == undefined){
|
||||
vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp:data //使用一个tmp封装一下,后面可以直接用vm.tmp赋值
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
vm.tmp = Object.assign({}, vm.tmp,data)
|
||||
}
|
||||
if (data == undefined) {
|
||||
form.val("formEdit", initVal);
|
||||
} else {
|
||||
form.val("formEdit", data);
|
||||
}
|
||||
},
|
||||
end: mainList
|
||||
});
|
||||
@@ -94,14 +79,10 @@ layui.config({
|
||||
}
|
||||
return {
|
||||
add: function() { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: ''
|
||||
});
|
||||
show(false);
|
||||
},
|
||||
update: function(data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
show(true,data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
@@ -7,6 +7,16 @@ layui.config({
|
||||
var table = layui.table;
|
||||
var openauth = layui.openauth;
|
||||
var toplayer = (top == undefined || top.layer === undefined) ? layer : top.layer; //顶层的LAYER
|
||||
|
||||
var initVal = { //初始化数据
|
||||
Id: '',
|
||||
Account:'',
|
||||
Name:'',
|
||||
Organizations:'',
|
||||
OrganizationIds:'',
|
||||
Sex:'',
|
||||
Status:0
|
||||
};
|
||||
|
||||
$("#menus").loadMenus("User");
|
||||
|
||||
@@ -68,9 +78,7 @@ layui.config({
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function() {
|
||||
var vm;
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
@@ -78,34 +86,12 @@ layui.config({
|
||||
type: 1,
|
||||
content: $('#divEdit'),
|
||||
success: function() {
|
||||
if(vm == undefined){
|
||||
vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp:data //使用一个tmp封装一下,后面可以直接用vm.tmp赋值
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
//layui.droptree("/UserSession/GetOrgs", "#Organizations", "#OrganizationIds");
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
var _this = this;
|
||||
layui.droptree("/UserSession/GetOrgs", "#Organizations", "#OrganizationIds", true,function (ids, names) {
|
||||
_this.tmp.OrganizationIds = ids;
|
||||
_this.tmp.Organizations = names;
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
vm.tmp = Object.assign({}, vm.tmp,data)
|
||||
}
|
||||
layui.droptree("/UserSession/GetOrgs", "#Organizations", "#OrganizationIds", true);
|
||||
if (data == undefined) {
|
||||
form.val("formEdit", initVal);
|
||||
} else {
|
||||
form.val("formEdit", data);
|
||||
}
|
||||
},
|
||||
end: mainList
|
||||
});
|
||||
@@ -127,22 +113,15 @@ layui.config({
|
||||
|
||||
//重置
|
||||
$("#reset").click(function(){
|
||||
vm.tmp = {
|
||||
OrganizationIds:'',
|
||||
Organizations:''
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
return {
|
||||
add: function() { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: ''
|
||||
});
|
||||
show(false);
|
||||
},
|
||||
update: function(data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
show(true,data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
layui.config({
|
||||
base: "/js/"
|
||||
}).use(['form', 'vue', 'ztree', 'layer', 'jquery', 'cookie','table', 'droptree', 'openauth', 'utils'], function () {
|
||||
}).use(['form', 'ztree', 'layer', 'jquery', 'cookie','table', 'droptree', 'openauth', 'utils'], function () {
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
@@ -10,6 +10,25 @@
|
||||
|
||||
$("#menus").loadMenus("WmsInboundOrderTbl");
|
||||
|
||||
var initVal = { //初始化的值
|
||||
Id: "",
|
||||
ExternalNo: '',
|
||||
ExternalType: '',
|
||||
Status: 0, // Assuming 1 is true and 0 is false for radio buttons
|
||||
OrderType: '',
|
||||
GoodsType: '',
|
||||
PurchaseNo: '',
|
||||
StockId: '',
|
||||
OwnerId: '',
|
||||
ShipperId: '',
|
||||
SupplierId: '',
|
||||
ScheduledInboundTime: '',
|
||||
Remark: '',
|
||||
Enable: 0,
|
||||
TransferType: '',
|
||||
InBondedArea: 0,
|
||||
ReturnBoxNum: ''
|
||||
}
|
||||
|
||||
//加载表头
|
||||
$.getJSON('/WmsInboundOrderTbls/Load',
|
||||
@@ -56,9 +75,7 @@
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function () {
|
||||
var vm;
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var show = function (update, data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
layer.open({
|
||||
title: title,
|
||||
@@ -66,32 +83,11 @@
|
||||
type: 1,
|
||||
content: $('#divEdit'),
|
||||
success: function () {
|
||||
if(vm == undefined){
|
||||
vm = new Vue({
|
||||
el: "#formEdit",
|
||||
data(){
|
||||
return {
|
||||
tmp:data //使用一个tmp封装一下,后面可以直接用vm.tmp赋值
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
tmp(val){
|
||||
this.$nextTick(function () {
|
||||
form.render(); //刷新select等
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId", false);
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
form.render();
|
||||
layui.droptree("/Applications/GetList", "#AppName", "#AppId", false);
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
vm.tmp = Object.assign({}, vm.tmp,data)
|
||||
}
|
||||
if (data == undefined) {
|
||||
form.val("formEdit", initVal);
|
||||
} else {
|
||||
form.val("formEdit", data);
|
||||
}
|
||||
},
|
||||
end: mainList
|
||||
});
|
||||
@@ -113,15 +109,11 @@
|
||||
});
|
||||
}
|
||||
return {
|
||||
add: function () { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: ''
|
||||
});
|
||||
add: function() { //弹出添加
|
||||
show(false);
|
||||
},
|
||||
update: function (data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
update: function(data) { //弹出编辑框
|
||||
show(true,data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
127
OpenAuth.Repository/Domain/FlowApprover.cs
Normal file
127
OpenAuth.Repository/Domain/FlowApprover.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// Author:Yubao Li
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using OpenAuth.Repository.Core;
|
||||
|
||||
namespace OpenAuth.Repository.Domain
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Table("FlowApprover")]
|
||||
public class FlowApprover : TreeEntity
|
||||
{
|
||||
public FlowApprover()
|
||||
{
|
||||
this.Reason = "";
|
||||
this.ApproverName = "";
|
||||
this.InstanceId = "";
|
||||
this.VerifyComment = "";
|
||||
this.CascadeId = "";
|
||||
this.ApproverId = "";
|
||||
this.ApproveType = 0;
|
||||
this.CreateDate = DateTime.Now;
|
||||
this.CreateUserName = "";
|
||||
this.ParentId = "";
|
||||
this.VerifyDate = DateTime.Now;
|
||||
this.Status = 0;
|
||||
this.ActivityId = "";
|
||||
this.OrderNo = 0;
|
||||
this.CreateUserId = "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///加签原因
|
||||
/// </summary>
|
||||
[Description("加签原因")]
|
||||
public string Reason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///审批人
|
||||
/// </summary>
|
||||
[Description("审批人")]
|
||||
public string ApproverName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///工作流实例Id
|
||||
/// </summary>
|
||||
[Description("工作流实例Id")]
|
||||
public string InstanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///审批意见
|
||||
/// </summary>
|
||||
[Description("审批意见")]
|
||||
public string VerifyComment { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///审批人ID
|
||||
/// </summary>
|
||||
[Description("审批人ID")]
|
||||
public string ApproverId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///类型(0顺序,1并行且,2并行或)
|
||||
/// </summary>
|
||||
[Description("类型(0顺序,1并行且,2并行或)")]
|
||||
public int ApproveType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///加签时间
|
||||
/// </summary>
|
||||
[Description("加签时间")]
|
||||
public DateTime? CreateDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///加签人
|
||||
/// </summary>
|
||||
[Description("加签人")]
|
||||
public string CreateUserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///审批日期
|
||||
/// </summary>
|
||||
[Description("审批日期")]
|
||||
public DateTime? VerifyDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///状态(0未处理,1通过,2未通过,3驳回)
|
||||
/// </summary>
|
||||
[Description("状态(0未处理,1通过,2未通过,3驳回)")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///当前节点ID
|
||||
/// </summary>
|
||||
[Description("当前节点ID")]
|
||||
public string ActivityId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///顺序号(当类型为0时)
|
||||
/// </summary>
|
||||
[Description("顺序号(当类型为0时)")]
|
||||
public int? OrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///加签人Id
|
||||
/// </summary>
|
||||
[Description("加签人Id")]
|
||||
public string CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///是否回到加签节点
|
||||
/// <para>如果不需要,则加签完成后自动审批完成,否则还需要当前节点审批</para>
|
||||
/// </summary>
|
||||
[Description("是否回到加签节点")]
|
||||
public bool? ReturnToSignNode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ namespace OpenAuth.Repository.Domain
|
||||
/// 前端界面是否缓存
|
||||
/// </summary>
|
||||
/// [Description("前端界面是否缓存")]
|
||||
public bool? KeepAlive { get; set; }
|
||||
public bool KeepAlive { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -95,6 +95,14 @@ namespace OpenAuth.Repository
|
||||
{
|
||||
property.SetValueConverter(boolToSmallIntConverter);
|
||||
}
|
||||
|
||||
//解决PostgreSQL时间戳问题
|
||||
if (Database.ProviderName == "Npgsql.EntityFrameworkCore.PostgreSQL" &&
|
||||
property.ClrType == typeof(DateTime))
|
||||
{
|
||||
property.SetValueConverter(new ValueConverter<DateTime, DateTime>(
|
||||
v => v.ToUniversalTime(), v => DateTime.SpecifyKind(v, DateTimeKind.Utc)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
92
OpenAuth.WebApi/Controllers/FlowApproversController.cs
Normal file
92
OpenAuth.WebApi/Controllers/FlowApproversController.cs
Normal file
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.App.Response;
|
||||
using OpenAuth.Repository.Domain;
|
||||
|
||||
namespace OpenAuth.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 加签接口
|
||||
/// </summary>
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
[ApiExplorerSettings(GroupName = "加签接口_FlowApprovers")]
|
||||
public class FlowApproversController : ControllerBase
|
||||
{
|
||||
private readonly FlowApproverApp _app;
|
||||
|
||||
//添加
|
||||
[HttpPost]
|
||||
public Response Add(AddApproverReq obj)
|
||||
{
|
||||
var result = new Response();
|
||||
try
|
||||
{
|
||||
_app.Add(obj);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.Code = 500;
|
||||
result.Message = ex.InnerException?.Message ?? ex.Message;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//修改
|
||||
[HttpPost]
|
||||
public Response Update(AddApproverReq obj)
|
||||
{
|
||||
var result = new Response();
|
||||
try
|
||||
{
|
||||
_app.Update(obj);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.Code = 500;
|
||||
result.Message = ex.InnerException?.Message ?? ex.Message;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载列表
|
||||
/// </summary>
|
||||
[HttpGet]
|
||||
public async Task<TableResp<FlowApprover>> Load([FromQuery] QueryApproverReq request)
|
||||
{
|
||||
return await _app.Load(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public Response Delete([FromBody] string[] ids)
|
||||
{
|
||||
var result = new Response();
|
||||
try
|
||||
{
|
||||
_app.Delete(ids);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.Code = 500;
|
||||
result.Message = ex.InnerException?.Message ?? ex.Message;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public FlowApproversController(FlowApproverApp app)
|
||||
{
|
||||
_app = app;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -364,6 +364,34 @@ INSERT INTO `flowinstance` VALUES ('d4f8d2b9-6374-4c10-8d3c-1ca540bc309b', '', '
|
||||
INSERT INTO `flowinstance` VALUES ('df6df6b5-53f7-4db4-931b-12e3352ef413', '', '1564334658879', '按角色执行2019-07-29 01:24:21', '1564334332325', 2, '管理员', '1564334327861', '{\"title\":\"newFlow_1\",\"nodes\":[{\"name\":\"node_1\",\"left\":99,\"top\":32,\"type\":\"start round mix\",\"id\":\"1564334327861\",\"width\":26,\"height\":26,\"alt\":true},{\"name\":\"node_2\",\"left\":70,\"top\":295,\"type\":\"end round\",\"id\":\"1564334330157\",\"width\":26,\"height\":26,\"alt\":true},{\"name\":\"管理员\",\"left\":43,\"top\":131,\"type\":\"node\",\"id\":\"1564334332325\",\"width\":104,\"height\":36,\"alt\":true,\"setInfo\":{\"NodeConfluenceType\":\"all\",\"NodeDesignate\":\"SPECIAL_ROLE\",\"ThirdPartyUrl\":\"\",\"NodeDesignateData\":{\"users\":[],\"roles\":[\"09ee2ffa-7463-4938-ae0b-1cb4e80c7c13\"]}}},{\"name\":\"测试人员\",\"left\":185,\"top\":226,\"type\":\"node\",\"id\":\"1564334333133\",\"width\":104,\"height\":36,\"alt\":true,\"setInfo\":{\"NodeConfluenceType\":\"all\",\"NodeDesignate\":\"SPECIAL_ROLE\",\"ThirdPartyUrl\":\"\",\"NodeDesignateData\":{\"users\":[],\"roles\":[\"0a7ebd0c-78d6-4fbc-8fbe-6fc25c3a932d\"]}}}],\"lines\":[{\"type\":\"sl\",\"from\":\"1564334327861\",\"to\":\"1564334332325\",\"id\":\"1564334335789\",\"name\":\"\",\"dash\":false,\"alt\":true},{\"type\":\"sl\",\"from\":\"1564334332325\",\"to\":\"1564334333133\",\"id\":\"1564334336629\",\"name\":\"\",\"dash\":false,\"alt\":true},{\"type\":\"sl\",\"from\":\"1564334333133\",\"to\":\"1564334330157\",\"id\":\"1564334337805\",\"name\":\"\",\"dash\":false,\"alt\":true}],\"areas\":[],\"initNum\":9}', '0b21f59c-7809-4275-acb4-8e8c08e0167e', '', '{\"REASON\":\"身体原因\",\"DAYS\":\"1\",\"CUSTOME_NAME\":\"玉宝\"}', 0, '[{\"type\":\"text\",\"name\":\"REASON\",\"title\":\"REASON\",\"value\":\"身体原因\",\"leipiplugins\":\"text\",\"orghide\":\"0\",\"orgalign\":\"left\",\"orgwidth\":\"150\",\"orgtype\":\"text\",\"style\":\"text-align: left; width: 150px;\",\"content\":\"<input name=\\\"leipiNewField\\\" type=\\\"text\\\" title=\\\"REASON\\\" value=\\\"身体原因\\\" leipiplugins=\\\"text\\\" orghide=\\\"0\\\" orgalign=\\\"left\\\" orgwidth=\\\"150\\\" orgtype=\\\"text\\\" style=\\\"text-align: left; width: 150px;\\\"/>\"},{\"leipiplugins\":\"select\",\"name\":\"DAYS\",\"title\":\"DAYS\",\"size\":\"1\",\"orgwidth\":\"150\",\"style\":\"width: 150px;\",\"value\":\"1,3,5,10\",\"selected\":\"selected\",\"content\":\"<span leipiplugins=\\\"select\\\"><select name=\\\"leipiNewField\\\" title=\\\"DAYS\\\" leipiplugins=\\\"select\\\" size=\\\"1\\\" orgwidth=\\\"150\\\" style=\\\"width: 150px;\\\"><option value=\\\"1\\\" selected=\\\"selected\\\">1</option><option value=\\\"3\\\">3</option><option value=\\\"5\\\">5</option><option value=\\\"10\\\">10</option></select> </span>\"},{\"type\":\"text\",\"name\":\"CUSTOME_NAME\",\"title\":\"CUSTOME_NAME\",\"value\":\"玉宝\",\"leipiplugins\":\"text\",\"orghide\":\"0\",\"orgalign\":\"left\",\"orgwidth\":\"150\",\"orgtype\":\"text\",\"style\":\"text-align: left; width: 150px;\",\"content\":\"<input name=\\\"leipiNewField\\\" type=\\\"text\\\" title=\\\"CUSTOME_NAME\\\" value=\\\"玉宝\\\" leipiplugins=\\\"text\\\" orghide=\\\"0\\\" orgalign=\\\"left\\\" orgwidth=\\\"150\\\" orgtype=\\\"text\\\" style=\\\"text-align: left; width: 150px;\\\"/>\"}]', '<p style=\"text-align: center;\"><span style=\"font-size: 36px;\">请假条</span></p><p><span style=\"font-size: 36px;\"><br/></span></p><p style=\"text-align: center;\">因{REASON},本人想请假{DAYS}天,望领导批准!</p><p><br/></p><p style=\"text-align: center;\"> 谢谢!</p><p><br/></p><p style=\"text-align: right;\"> 申请人:{CUSTOME_NAME}</p>', 'ef89f96a-af33-407c-b02e-897faf46ecf0', '', 0, '2019-07-29 01:24:26', '00000000-0000-0000-0000-000000000000', 'System', 0, '', 0, '49df1602-f5f3-4d52-afb7-3802da619558', NULL);
|
||||
INSERT INTO `flowinstance` VALUES ('ee589689-3ae0-4037-abec-ba70e566da16', '', '1564334720434', '普通的请假2019-07-29 01:25:24', '1564334035352', 2, '所有人可以审批', '1564334032785', '{\"title\":\"newFlow_1\",\"initNum\":9,\"lines\":[{\"id\":\"1564334041040\",\"type\":\"sl\",\"from\":\"1564334032785\",\"to\":\"1564334035352\",\"name\":\"\",\"dash\":false,\"Compares\":null},{\"id\":\"1564334041720\",\"type\":\"sl\",\"from\":\"1564334035352\",\"to\":\"1564334036152\",\"name\":\"\",\"dash\":false,\"Compares\":null},{\"id\":\"1564334042927\",\"type\":\"sl\",\"from\":\"1564334036152\",\"to\":\"1564334038904\",\"name\":\"\",\"dash\":false,\"Compares\":null}],\"nodes\":[{\"id\":\"1564334032785\",\"name\":\"node_1\",\"type\":\"start round mix\",\"left\":19,\"top\":36,\"width\":26,\"height\":26,\"alt\":true,\"setInfo\":null},{\"id\":\"1564334035352\",\"name\":\"所有人可以审批\",\"type\":\"node\",\"left\":133,\"top\":50,\"width\":104,\"height\":56,\"alt\":true,\"setInfo\":{\"NodeDesignate\":\"ALL_USER\",\"NodeDesignateData\":{\"users\":[],\"roles\":[],\"orgs\":null},\"NodeCode\":null,\"NodeName\":null,\"ThirdPartyUrl\":\"http://xxxx.com/api/workflow/callback\",\"NodeRejectType\":null,\"Taged\":2,\"UserName\":\"test\",\"UserId\":\"6ba79766-faa0-4259-8139-a4a6d35784e0\",\"Description\":\"最近有很多事情要处理\",\"TagedTime\":\"2019-07-29 01:28\",\"NodeConfluenceType\":\"all\",\"ConfluenceOk\":null,\"ConfluenceNo\":null}},{\"id\":\"1564334036152\",\"name\":\"所有人可以审批\",\"type\":\"node\",\"left\":139,\"top\":123,\"width\":104,\"height\":56,\"alt\":true,\"setInfo\":{\"NodeDesignate\":\"ALL_USER\",\"NodeDesignateData\":{\"users\":[],\"roles\":[],\"orgs\":null},\"NodeCode\":null,\"NodeName\":null,\"ThirdPartyUrl\":\"\",\"NodeRejectType\":null,\"Taged\":null,\"UserName\":null,\"UserId\":null,\"Description\":null,\"TagedTime\":null,\"NodeConfluenceType\":\"all\",\"ConfluenceOk\":null,\"ConfluenceNo\":null}},{\"id\":\"1564334038904\",\"name\":\"node_4\",\"type\":\"end round\",\"left\":47,\"top\":193,\"width\":26,\"height\":26,\"alt\":true,\"setInfo\":null}],\"areas\":[]}', '61806396-9498-492b-bc22-9f9e95a389bc', '', '{\"REASON\":\"身体原因\",\"DAYS\":\"1\",\"CUSTOME_NAME\":\"玉宝\"}', 0, '[{\"type\":\"text\",\"name\":\"REASON\",\"title\":\"REASON\",\"value\":\"身体原因\",\"leipiplugins\":\"text\",\"orghide\":\"0\",\"orgalign\":\"left\",\"orgwidth\":\"150\",\"orgtype\":\"text\",\"style\":\"text-align: left; width: 150px;\",\"content\":\"<input name=\\\"leipiNewField\\\" type=\\\"text\\\" title=\\\"REASON\\\" value=\\\"身体原因\\\" leipiplugins=\\\"text\\\" orghide=\\\"0\\\" orgalign=\\\"left\\\" orgwidth=\\\"150\\\" orgtype=\\\"text\\\" style=\\\"text-align: left; width: 150px;\\\"/>\"},{\"leipiplugins\":\"select\",\"name\":\"DAYS\",\"title\":\"DAYS\",\"size\":\"1\",\"orgwidth\":\"150\",\"style\":\"width: 150px;\",\"value\":\"1,3,5,10\",\"selected\":\"selected\",\"content\":\"<span leipiplugins=\\\"select\\\"><select name=\\\"leipiNewField\\\" title=\\\"DAYS\\\" leipiplugins=\\\"select\\\" size=\\\"1\\\" orgwidth=\\\"150\\\" style=\\\"width: 150px;\\\"><option value=\\\"1\\\" selected=\\\"selected\\\">1</option><option value=\\\"3\\\">3</option><option value=\\\"5\\\">5</option><option value=\\\"10\\\">10</option></select> </span>\"},{\"type\":\"text\",\"name\":\"CUSTOME_NAME\",\"title\":\"CUSTOME_NAME\",\"value\":\"玉宝\",\"leipiplugins\":\"text\",\"orghide\":\"0\",\"orgalign\":\"left\",\"orgwidth\":\"150\",\"orgtype\":\"text\",\"style\":\"text-align: left; width: 150px;\",\"content\":\"<input name=\\\"leipiNewField\\\" type=\\\"text\\\" title=\\\"CUSTOME_NAME\\\" value=\\\"玉宝\\\" leipiplugins=\\\"text\\\" orghide=\\\"0\\\" orgalign=\\\"left\\\" orgwidth=\\\"150\\\" orgtype=\\\"text\\\" style=\\\"text-align: left; width: 150px;\\\"/>\"}]', '<p style=\"text-align: center;\"><span style=\"font-size: 36px;\">请假条</span></p><p><span style=\"font-size: 36px;\"><br/></span></p><p style=\"text-align: center;\">因{REASON},本人想请假{DAYS}天,望领导批准!</p><p><br/></p><p style=\"text-align: center;\"> 谢谢!</p><p><br/></p><p style=\"text-align: right;\"> 申请人:{CUSTOME_NAME}</p>', 'ef89f96a-af33-407c-b02e-897faf46ecf0', '', 0, '2019-07-29 01:25:30', '00000000-0000-0000-0000-000000000000', 'System', 0, '', 3, '1', NULL);
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS flowapprover;
|
||||
CREATE TABLE flowapprover(
|
||||
`Id` VARCHAR(50) NOT NULL COMMENT 'Id' ,
|
||||
`InstanceId` VARCHAR(50) NOT NULL COMMENT '工作流实例Id' ,
|
||||
`ActivityId` VARCHAR(50) NOT NULL COMMENT '当前节点ID' ,
|
||||
`Reason` VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '加签原因' ,
|
||||
`CreateDate` DATETIME COMMENT '加签时间' ,
|
||||
`CreateUserId` VARCHAR(50) COMMENT '加签人Id' ,
|
||||
`CreateUserName` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '加签人' ,
|
||||
`Status` INT NOT NULL COMMENT '状态(0未处理,1通过,2未通过,3驳回)' ,
|
||||
`ApproveType` INT NOT NULL COMMENT '类型(0顺序,1并行且,2并行或)' ,
|
||||
`ApproverId` VARCHAR(50) NOT NULL COMMENT '审批人ID' ,
|
||||
`ApproverName` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '审批人' ,
|
||||
`OrderNo` INT COMMENT '顺序号(当类型为0时)' ,
|
||||
`VerifyDate` DATETIME COMMENT '审批日期' ,
|
||||
`VerifyComment` VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '审批意见' ,
|
||||
`CascadeId` VARCHAR(100) NOT NULL COMMENT '层级ID,应对多次加签' ,
|
||||
`ParentId` VARCHAR(50) COMMENT '父节点ID,应对多次加签' ,
|
||||
`ParentName` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '父节点名称,应对多次加签结构' ,
|
||||
`Name` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '加签节点名称,应对多次加签结构' ,
|
||||
`ReturnToSignNode` tinyint(4) COMMENT '是否回到加签节点',
|
||||
PRIMARY KEY (Id)
|
||||
) COMMENT = '工作流加签';
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for flowinstanceoperationhistory
|
||||
-- ----------------------------
|
||||
|
||||
@@ -43,6 +43,52 @@ COMMENT ON TABLE "Application" IS '应用';
|
||||
INSERT INTO "Application" VALUES ('110', 'OpenAuth.Net', 'openauthdotnetyubaolee', '最好用的.NET权限工作流框架', NULL, '0', TO_DATE('2018-04-14 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
|
||||
INSERT INTO "Application" VALUES ('119', 'XXX管理平台', 'manageryubaolee', '这是一个第三的平台', NULL, '0', TO_DATE('2018-04-14 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
|
||||
|
||||
CREATE TABLE FlowApprover(
|
||||
Id VARCHAR2(50) NOT NULL,
|
||||
InstanceId VARCHAR2(50) NOT NULL,
|
||||
ActivityId VARCHAR2(50) NOT NULL,
|
||||
Reason VARCHAR2(200),
|
||||
CreateDate DATE,
|
||||
CreateUserId VARCHAR2(50),
|
||||
CreateUserName VARCHAR2(50),
|
||||
Status INT NOT NULL,
|
||||
ApproveType INT NOT NULL,
|
||||
ApproverId VARCHAR2(50) NOT NULL,
|
||||
ApproverName VARCHAR2(50),
|
||||
OrderNo INT,
|
||||
VerifyDate DATE,
|
||||
VerifyComment VARCHAR2(200),
|
||||
CascadeId VARCHAR2(100) NOT NULL,
|
||||
ParentId VARCHAR2(50),
|
||||
ParentName VARCHAR2(100),
|
||||
Name VARCHAR2(100),
|
||||
ReturnToSignNode NUMBER(4,0)
|
||||
PRIMARY KEY (Id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE FlowApprover IS '工作流加签';
|
||||
COMMENT ON COLUMN FlowApprover.Id IS 'Id';
|
||||
COMMENT ON COLUMN FlowApprover.InstanceId IS '工作流实例Id';
|
||||
COMMENT ON COLUMN FlowApprover.ActivityId IS '当前节点ID';
|
||||
COMMENT ON COLUMN FlowApprover.Reason IS '加签原因';
|
||||
COMMENT ON COLUMN FlowApprover.CreateDate IS '加签时间';
|
||||
COMMENT ON COLUMN FlowApprover.CreateUserId IS '加签人Id';
|
||||
COMMENT ON COLUMN FlowApprover.CreateUserName IS '加签人';
|
||||
COMMENT ON COLUMN FlowApprover.Status IS '状态(0未处理,1通过,2未通过,3驳回)';
|
||||
COMMENT ON COLUMN FlowApprover.ApproveType IS '类型(0顺序,1并行且,2并行或)';
|
||||
COMMENT ON COLUMN FlowApprover.ApproverId IS '审批人ID';
|
||||
COMMENT ON COLUMN FlowApprover.ApproverName IS '审批人';
|
||||
COMMENT ON COLUMN FlowApprover.OrderNo IS '顺序号(当类型为0时)';
|
||||
COMMENT ON COLUMN FlowApprover.VerifyDate IS '审批日期';
|
||||
COMMENT ON COLUMN FlowApprover.VerifyComment IS '审批意见';
|
||||
COMMENT ON COLUMN FlowApprover.CascadeId IS '层级ID,应对多次加签';
|
||||
COMMENT ON COLUMN FlowApprover.ParentId IS '父节点ID,应对多次加签';
|
||||
COMMENT ON COLUMN FlowApprover.ParentName IS '父节点名称,应对多次加签结构';
|
||||
COMMENT ON COLUMN FlowApprover.Name IS '加签节点名称,应对多次加签结构';
|
||||
COMMENT ON COLUMN FlowApprover.ReturnToSignNode IS '是否回到加签节点';
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BuilderTable
|
||||
-- ----------------------------
|
||||
|
||||
@@ -98,6 +98,52 @@ GO
|
||||
INSERT INTO [dbo].[Application] ([Id], [Name], [AppSecret], [Description], [Icon], [Disable], [CreateTime], [CreateUser]) VALUES (N'119', N'XXX管理平台', N'manageryubaolee', N'这是一个第三的平台', NULL, N'0', N'2018-04-14', NULL)
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[FlowApprover]') AND type in (N'U')) DROP TABLE [dbo].[FlowApprover];
|
||||
CREATE TABLE [dbo].[FlowApprover](
|
||||
Id VARCHAR(50) NOT NULL,
|
||||
InstanceId VARCHAR(50) NOT NULL,
|
||||
ActivityId VARCHAR(50) NOT NULL,
|
||||
Reason VARCHAR(200),
|
||||
CreateDate DATETIME,
|
||||
CreateUserId VARCHAR(50),
|
||||
CreateUserName VARCHAR(50),
|
||||
Status INT NOT NULL,
|
||||
ApproveType INT NOT NULL,
|
||||
ApproverId VARCHAR(50) NOT NULL,
|
||||
ApproverName VARCHAR(50),
|
||||
OrderNo INT,
|
||||
VerifyDate DATETIME,
|
||||
VerifyComment VARCHAR(200),
|
||||
CascadeId VARCHAR(100) NOT NULL,
|
||||
ParentId VARCHAR(50),
|
||||
ParentName VARCHAR(100),
|
||||
ReturnToSignNode bit DEFAULT 1 NOT NULL,
|
||||
Name VARCHAR(100),
|
||||
PRIMARY KEY (Id)
|
||||
);
|
||||
|
||||
EXEC sp_addextendedproperty 'MS_Description', '工作流加签', 'SCHEMA', dbo, 'table', FlowApprover, null, null;
|
||||
EXEC sp_addextendedproperty 'MS_Description', 'Id', 'SCHEMA', dbo, 'table', FlowApprover, 'column', Id;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '工作流实例Id', 'SCHEMA', dbo, 'table', FlowApprover, 'column', InstanceId;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '当前节点ID', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ActivityId;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '加签原因', 'SCHEMA', dbo, 'table', FlowApprover, 'column', Reason;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '加签时间', 'SCHEMA', dbo, 'table', FlowApprover, 'column', CreateDate;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '加签人Id', 'SCHEMA', dbo, 'table', FlowApprover, 'column', CreateUserId;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '加签人', 'SCHEMA', dbo, 'table', FlowApprover, 'column', CreateUserName;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '状态(0未处理,1通过,2未通过,3驳回)', 'SCHEMA', dbo, 'table', FlowApprover, 'column', Status;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '类型(0顺序,1并行且,2并行或)', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ApproveType;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '审批人ID', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ApproverId;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '审批人', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ApproverName;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '顺序号(当类型为0时)', 'SCHEMA', dbo, 'table', FlowApprover, 'column', OrderNo;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '审批日期', 'SCHEMA', dbo, 'table', FlowApprover, 'column', VerifyDate;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '审批意见', 'SCHEMA', dbo, 'table', FlowApprover, 'column', VerifyComment;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '层级ID,应对多次加签', 'SCHEMA', dbo, 'table', FlowApprover, 'column', CascadeId;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '父节点ID,应对多次加签', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ParentId;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '父节点名称,应对多次加签结构', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ParentName;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '加签节点名称,应对多次加签结构', 'SCHEMA', dbo, 'table', FlowApprover, 'column', Name;
|
||||
EXEC sp_addextendedproperty 'MS_Description', '是否回到加签节点', 'SCHEMA', dbo, 'table', FlowApprover, 'column', ReturnToSignNode;
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BuilderTable
|
||||
|
||||
@@ -31,6 +31,52 @@ COMMENT ON TABLE "public"."Application" IS '应用';
|
||||
INSERT INTO "public"."Application" VALUES ('110', 'OpenAuth.Net', 'openauthdotnetyubaolee', '最好用的.NET权限工作流框架', NULL, 0, '2018-04-14', NULL);
|
||||
INSERT INTO "public"."Application" VALUES ('119', 'XXX管理平台', 'manageryubaolee', '这是一个第三的平台', NULL, 0, '2018-04-14', NULL);
|
||||
|
||||
DROP TABLE IF EXISTS FlowApprover;
|
||||
CREATE TABLE FlowApprover(
|
||||
Id VARCHAR(50) NOT NULL,
|
||||
InstanceId VARCHAR(50) NOT NULL,
|
||||
ActivityId VARCHAR(50) NOT NULL,
|
||||
Reason VARCHAR(200),
|
||||
CreateDate TIMESTAMP,
|
||||
CreateUserId VARCHAR(50),
|
||||
CreateUserName VARCHAR(50),
|
||||
Status INTEGER NOT NULL,
|
||||
ApproveType INTEGER NOT NULL,
|
||||
ApproverId VARCHAR(50) NOT NULL,
|
||||
ApproverName VARCHAR(50),
|
||||
OrderNo INTEGER,
|
||||
VerifyDate TIMESTAMP,
|
||||
VerifyComment VARCHAR(200),
|
||||
CascadeId VARCHAR(100) NOT NULL,
|
||||
ParentId VARCHAR(50),
|
||||
ParentName VARCHAR(100),
|
||||
Name VARCHAR(100),
|
||||
ReturnToSignNode int2,
|
||||
PRIMARY KEY (Id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE FlowApprover IS '工作流加签';
|
||||
COMMENT ON COLUMN FlowApprover.Id IS 'Id';
|
||||
COMMENT ON COLUMN FlowApprover.InstanceId IS '工作流实例Id';
|
||||
COMMENT ON COLUMN FlowApprover.ActivityId IS '当前节点ID';
|
||||
COMMENT ON COLUMN FlowApprover.Reason IS '加签原因';
|
||||
COMMENT ON COLUMN FlowApprover.CreateDate IS '加签时间';
|
||||
COMMENT ON COLUMN FlowApprover.CreateUserId IS '加签人Id';
|
||||
COMMENT ON COLUMN FlowApprover.CreateUserName IS '加签人';
|
||||
COMMENT ON COLUMN FlowApprover.Status IS '状态(0未处理,1通过,2未通过,3驳回)';
|
||||
COMMENT ON COLUMN FlowApprover.ApproveType IS '类型(0顺序,1并行且,2并行或)';
|
||||
COMMENT ON COLUMN FlowApprover.ApproverId IS '审批人ID';
|
||||
COMMENT ON COLUMN FlowApprover.ApproverName IS '审批人';
|
||||
COMMENT ON COLUMN FlowApprover.OrderNo IS '顺序号(当类型为0时)';
|
||||
COMMENT ON COLUMN FlowApprover.VerifyDate IS '审批日期';
|
||||
COMMENT ON COLUMN FlowApprover.VerifyComment IS '审批意见';
|
||||
COMMENT ON COLUMN FlowApprover.CascadeId IS '层级ID,应对多次加签';
|
||||
COMMENT ON COLUMN FlowApprover.ParentId IS '父节点ID,应对多次加签';
|
||||
COMMENT ON COLUMN FlowApprover.ParentName IS '父节点名称,应对多次加签结构';
|
||||
COMMENT ON COLUMN FlowApprover.Name IS '加签节点名称,应对多次加签结构';
|
||||
COMMENT ON COLUMN FlowApprover.ReturnToSignNode IS '是否回到加签节点';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BuilderTable
|
||||
-- ----------------------------
|
||||
|
||||
Reference in New Issue
Block a user