mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 23:13:40 +08:00
flow ui
This commit is contained in:
parent
feaa4c36c2
commit
60b21be147
@ -74,6 +74,7 @@
|
|||||||
<Compile Include="Service\ModuleManService.cs" />
|
<Compile Include="Service\ModuleManService.cs" />
|
||||||
<Compile Include="Service\ResManagerService.cs" />
|
<Compile Include="Service\ResManagerService.cs" />
|
||||||
<Compile Include="Service\StockManagerService.cs" />
|
<Compile Include="Service\StockManagerService.cs" />
|
||||||
|
<Compile Include="Service\WFFormService.cs" />
|
||||||
<Compile Include="Service\WorkflowService.cs" />
|
<Compile Include="Service\WorkflowService.cs" />
|
||||||
<Compile Include="Core\Stock.cs" />
|
<Compile Include="Core\Stock.cs" />
|
||||||
<Compile Include="Core\User.cs" />
|
<Compile Include="Core\User.cs" />
|
||||||
|
36
OpenAuth.Domain/Service/WFFormService.cs
Normal file
36
OpenAuth.Domain/Service/WFFormService.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenAuth.Domain.Interface;
|
||||||
|
|
||||||
|
namespace OpenAuth.Domain.Service
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 表单服务
|
||||||
|
/// <para>李玉宝新增于2017-01-13 17:48:00</para>
|
||||||
|
/// </summary>
|
||||||
|
public class WFFormService
|
||||||
|
{
|
||||||
|
protected IUnitWork _unitWork;
|
||||||
|
|
||||||
|
public WFFormService(IUnitWork unitWork)
|
||||||
|
{
|
||||||
|
_unitWork = unitWork;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WFFrmMain> GetAllList()
|
||||||
|
{
|
||||||
|
return _unitWork.Find<WFFrmMain>(null).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public WFFrmMain GetForm(Guid keyValue)
|
||||||
|
{
|
||||||
|
return _unitWork.FindSingle<WFFrmMain>(u => u.Id == keyValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveForm(Guid keyValue)
|
||||||
|
{
|
||||||
|
_unitWork.Delete<WFFrmMain>(u =>u.Id == keyValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using OpenAuth.Domain.Interface;
|
using OpenAuth.Domain.Interface;
|
||||||
|
|
||||||
namespace OpenAuth.Domain.Service
|
namespace OpenAuth.Domain.Service
|
||||||
@ -94,7 +95,7 @@ namespace OpenAuth.Domain.Service
|
|||||||
|
|
||||||
public List<WFSchemeInfo> GetList()
|
public List<WFSchemeInfo> GetList()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return _unitWork.Find<WFSchemeInfo>(null).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,12 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
|||||||
private WorkflowService wfFlowInfoBLL;
|
private WorkflowService wfFlowInfoBLL;
|
||||||
private UserManagerApp userBLL;
|
private UserManagerApp userBLL;
|
||||||
|
|
||||||
|
public FlowDesignController()
|
||||||
|
{
|
||||||
|
wfFlowInfoBLL = AutofacExt.GetFromFac<WorkflowService>();
|
||||||
|
userBLL = AutofacExt.GetFromFac<UserManagerApp>();
|
||||||
|
}
|
||||||
|
|
||||||
#region 视图功能
|
#region 视图功能
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 管理
|
/// 管理
|
||||||
|
@ -0,0 +1,193 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using Infrastructure;
|
||||||
|
using LeaRun.Util.WebControl;
|
||||||
|
using OpenAuth.App;
|
||||||
|
using OpenAuth.Domain;
|
||||||
|
using OpenAuth.Domain.Service;
|
||||||
|
|
||||||
|
namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||||
|
{
|
||||||
|
|
||||||
|
public class FormDesignController : Controller
|
||||||
|
{
|
||||||
|
private WFFormService wfFrmMainBLL;
|
||||||
|
|
||||||
|
public FormDesignController()
|
||||||
|
{
|
||||||
|
wfFrmMainBLL = AutofacExt.GetFromFac<WFFormService>();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 视图功能
|
||||||
|
/// <summary>
|
||||||
|
/// 管理
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ActionResult Index()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ActionResult FormLayout()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 预览表单
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ActionResult FormPreview()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 创建表单
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ActionResult FrmBuider()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取数据
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 表单树
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="keyword">关键字</param>
|
||||||
|
/// <returns>返回树形Json</returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ActionResult GetTreeJson()
|
||||||
|
{
|
||||||
|
var data = wfFrmMainBLL.GetAllList();
|
||||||
|
var treeList = new List<TreeEntity>();
|
||||||
|
foreach (var item in data)
|
||||||
|
{
|
||||||
|
TreeEntity tree = new TreeEntity();
|
||||||
|
|
||||||
|
tree.id = item.Id.ToString();
|
||||||
|
tree.text = item.FrmName;
|
||||||
|
tree.value = item.Id.ToString();
|
||||||
|
tree.isexpand = true;
|
||||||
|
tree.complete = true;
|
||||||
|
tree.hasChildren = false;
|
||||||
|
tree.parentId = "0";
|
||||||
|
tree.Attribute = "Sort";
|
||||||
|
tree.AttributeValue = "Frm";
|
||||||
|
treeList.Add(tree);
|
||||||
|
}
|
||||||
|
return Content(treeList.TreeToJson());
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 设置表单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="keyValue">主键</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public ActionResult GetFormJson(Guid keyValue)
|
||||||
|
{
|
||||||
|
var data = wfFrmMainBLL.GetForm(keyValue);
|
||||||
|
return Content(data.ToJson());
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 提交数据
|
||||||
|
/// <summary>
|
||||||
|
/// 删除表单模板
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="keyValue">主键值</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public ActionResult RemoveForm(Guid keyValue)
|
||||||
|
{
|
||||||
|
wfFrmMainBLL.RemoveForm(keyValue);
|
||||||
|
return Content("删除成功。");
|
||||||
|
}
|
||||||
|
///// <summary>
|
||||||
|
///// 保存用户表单(新增、修改)
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="keyValue">主键值</param>
|
||||||
|
///// <param name="userEntity">用户实体</param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//[ValidateAntiForgeryToken]
|
||||||
|
//[AjaxOnly]
|
||||||
|
//public ActionResult SaveForm(string keyValue, WFFrmMainEntity userEntity)
|
||||||
|
//{
|
||||||
|
// wfFrmMainBLL.SaveForm(keyValue, userEntity);
|
||||||
|
// return Success("操作成功。");
|
||||||
|
//}
|
||||||
|
///// <summary>
|
||||||
|
///// (启用、禁用)
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="keyValue">主键值</param>
|
||||||
|
///// <param name="State">状态:1-启动;0-禁用</param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//[AjaxOnly]
|
||||||
|
//public ActionResult SubmitUpdateState(string keyValue, int State)
|
||||||
|
//{
|
||||||
|
// wfFrmMainBLL.UpdateState(keyValue, State);
|
||||||
|
// return Success("操作成功。");
|
||||||
|
//}
|
||||||
|
///// <summary>
|
||||||
|
///// 上传文件
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="folderId">文件夹Id</param>
|
||||||
|
///// <param name="Filedata">文件对象</param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public ActionResult UploadifyFile(string folderId, HttpPostedFileBase Filedata)
|
||||||
|
//{
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// if (string.IsNullOrEmpty(folderId))
|
||||||
|
// {
|
||||||
|
// return Success("虚拟上传文件成功。");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Thread.Sleep(500);////延迟500毫秒
|
||||||
|
// //没有文件上传,直接返回
|
||||||
|
// if (Filedata == null || string.IsNullOrEmpty(Filedata.FileName) || Filedata.ContentLength == 0)
|
||||||
|
// {
|
||||||
|
// return HttpNotFound();
|
||||||
|
// }
|
||||||
|
// //获取文件完整文件名(包含绝对路径)
|
||||||
|
// //文件存放路径格式:/Resource/ResourceFile/{userId}{data}/{guid}.{后缀名}
|
||||||
|
// string userId = OperatorProvider.Provider.Current().UserId;
|
||||||
|
// string fileGuid = Guid.NewGuid().ToString();
|
||||||
|
// long filesize = Filedata.ContentLength;
|
||||||
|
// string FileEextension = Path.GetExtension(Filedata.FileName);
|
||||||
|
// string uploadDate = DateTime.Now.ToString("yyyyMMdd");
|
||||||
|
// string virtualPath = string.Format("~/Resource/DocumentFile/{0}/{1}/{2}{3}", userId, uploadDate, fileGuid, FileEextension);
|
||||||
|
// string fullFileName = this.Server.MapPath(virtualPath);
|
||||||
|
// //创建文件夹
|
||||||
|
// string path = Path.GetDirectoryName(fullFileName);
|
||||||
|
// Directory.CreateDirectory(path);
|
||||||
|
// if (!System.IO.File.Exists(fullFileName))
|
||||||
|
// {
|
||||||
|
// //保存文件
|
||||||
|
// Filedata.SaveAs(fullFileName);
|
||||||
|
// }
|
||||||
|
// return Success("上传成功。");
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// return Content(ex.Message);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -18,12 +18,10 @@
|
|||||||
function initialPage() {
|
function initialPage() {
|
||||||
$('#step-1 .panel-body').height($(window).height() - 228);
|
$('#step-1 .panel-body').height($(window).height() - 228);
|
||||||
$('#Description').height($(window).height() - 385);
|
$('#Description').height($(window).height() - 385);
|
||||||
$('#step-2 .standtabborder').height($(window).height() - 131);
|
|
||||||
$('#DesignateMemberlist').height($(window).height() - 141);
|
$('#DesignateMemberlist').height($(window).height() - 141);
|
||||||
$('#Treebackground').height($(window).height() - 131);
|
$('#Treebackground').height($(window).height() - 131);
|
||||||
$('#step-3 .tab-content').height($(window).height() - 167);
|
$('#step-2 .tab-content').height($(window).height() - 167);
|
||||||
initBaseInfo();
|
initBaseInfo();
|
||||||
initSchemeAuthorize();
|
|
||||||
initFrmInfo();
|
initFrmInfo();
|
||||||
initFlowInfo();
|
initFlowInfo();
|
||||||
//加载导向
|
//加载导向
|
||||||
@ -38,18 +36,8 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2://流程模板权限设置
|
case 2://绑定表单
|
||||||
if (postData.FrmType == 0) {
|
|
||||||
if (!bindingSchemeAuthorize()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3://绑定表单
|
|
||||||
if (postData.FrmType == 1) {
|
|
||||||
frmData = "";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!bindingFrm()) {
|
if (!bindingFrm()) {
|
||||||
dialogTop("请选择左侧表单", "error");
|
dialogTop("请选择左侧表单", "error");
|
||||||
return false;
|
return false;
|
||||||
@ -59,9 +47,8 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
frmData.FrmContent = JSON.stringify(frmcotentls);
|
frmData.FrmContent = JSON.stringify(frmcotentls);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 4://流程设计
|
case 3://流程设计
|
||||||
if (!bindingFlow())
|
if (!bindingFlow())
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -79,17 +66,6 @@
|
|||||||
$('#btn_caogao').removeAttr('disabled');
|
$('#btn_caogao').removeAttr('disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.currentStep == 2 || data.currentStep == 3) {
|
|
||||||
if (postData.FrmType == 0) {
|
|
||||||
$('#sysbackground').hide();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('#sysbackground').show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('#sysbackground').hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
//获取表单
|
//获取表单
|
||||||
if (!!keyValue) {
|
if (!!keyValue) {
|
||||||
@ -100,19 +76,16 @@
|
|||||||
$("#step-1").SetWebControls(data.schemeinfo);
|
$("#step-1").SetWebControls(data.schemeinfo);
|
||||||
postData["SchemeVersion"] = data.schemeinfo.SchemeVersion;
|
postData["SchemeVersion"] = data.schemeinfo.SchemeVersion;
|
||||||
|
|
||||||
setSchemeAuthorize(data.schemeinfo.AuthorizeType, data.authorize);
|
|
||||||
|
|
||||||
if(data.schemeinfo.EnabledMark == 3)
|
if(data.schemeinfo.EnabledMark == 3)
|
||||||
{
|
{
|
||||||
flowData["SchemeVersion"] = "cg";
|
flowData["SchemeVersion"] = "cg";
|
||||||
}
|
}
|
||||||
SchemeContentOld = JSON.parse(data.schemecontent.SchemeContent);
|
SchemeContentOld = JSON.parse(data.schemecontent.SchemeContent);
|
||||||
if (data.schemeinfo.FrmType != 1)
|
|
||||||
{
|
|
||||||
$('#FormFrmTree').setNodeChecked(SchemeContentOld.Frm.FrmId);
|
$('#FormFrmTree').setNodeChecked(SchemeContentOld.Frm.FrmId);
|
||||||
frmData.FrmId = SchemeContentOld.Frm.FrmId;
|
frmData.FrmId = SchemeContentOld.Frm.FrmId;
|
||||||
setFrmInfo(SchemeContentOld.Frm);
|
setFrmInfo(SchemeContentOld.Frm);
|
||||||
}
|
|
||||||
setFlowInfo(SchemeContentOld.Flow);
|
setFlowInfo(SchemeContentOld.Flow);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -137,7 +110,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
flowData["SchemeContent"] = JSON.stringify({ "Frm": frmData, "Flow": FlowDesignPanel.exportData() });
|
flowData["SchemeContent"] = JSON.stringify({ "Frm": frmData, "Flow": FlowDesignPanel.exportData() });
|
||||||
bindingSchemeAuthorize(true);
|
|
||||||
postData = $.extend(postData, _data);
|
postData = $.extend(postData, _data);
|
||||||
postData["EnabledMark"] = 3;
|
postData["EnabledMark"] = 3;
|
||||||
$.SaveForm({
|
$.SaveForm({
|
||||||
@ -153,23 +125,7 @@
|
|||||||
/*=========基本配置(begin)==================================================================*/
|
/*=========基本配置(begin)==================================================================*/
|
||||||
function initBaseInfo()
|
function initBaseInfo()
|
||||||
{
|
{
|
||||||
//流程类型
|
|
||||||
$("#SchemeType").ComboBoxTree({
|
|
||||||
description: "==请选择==",
|
|
||||||
height: "300px",
|
|
||||||
param: { EnCode: "FlowSort" },
|
|
||||||
url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
|
|
||||||
allowSearch: true
|
|
||||||
});
|
|
||||||
//表单类型
|
|
||||||
$("#FrmType").ComboBox({
|
|
||||||
data: [{ "key": 0, "value": "自定义表单" }, { "key": 1, "value": "系统表单" }],
|
|
||||||
id: "key",
|
|
||||||
text: "value",
|
|
||||||
description: "==请选择==",
|
|
||||||
height: "115px",
|
|
||||||
allowSearch: true
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
function bindingBase()
|
function bindingBase()
|
||||||
{
|
{
|
||||||
@ -181,125 +137,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/*=========基本配置(end)====================================================================*/
|
/*=========基本配置(end)====================================================================*/
|
||||||
/*=========权限配置(begin)==================================================================*/
|
|
||||||
function initSchemeAuthorize()
|
|
||||||
{
|
|
||||||
GetTree('Role');
|
|
||||||
GetTree('Post');
|
|
||||||
GetTree('UserGroup');
|
|
||||||
GetTree('User');
|
|
||||||
$('input[name="AuthorizeType"]').click(function () {
|
|
||||||
var _value = $(this).val();
|
|
||||||
if (_value == "0") {
|
|
||||||
$("#Treebackground").show();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$("#Treebackground").hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function bindingSchemeAuthorize(flag)
|
|
||||||
{
|
|
||||||
var _value = $('input[name="AuthorizeType"]:checked').val();
|
|
||||||
postData.AuthorizeType = _value;
|
|
||||||
if (_value == "1") {
|
|
||||||
var _roleData = $("#Role").getCheckedAllNodes();
|
|
||||||
var _postData = $("#Post").getCheckedAllNodes();
|
|
||||||
var _userGroupData = $("#UserGroup").getCheckedAllNodes();
|
|
||||||
var _userData = $("#User").getCheckedAllNodes();
|
|
||||||
_roleData.push.apply(_roleData, _postData);
|
|
||||||
_roleData.push.apply(_roleData, _userGroupData);
|
|
||||||
_roleData.push.apply(_roleData, _userData);
|
|
||||||
|
|
||||||
shcemeAuthorizeData = String(_roleData);
|
|
||||||
if (shcemeAuthorizeData == "") {
|
|
||||||
if (!flag) {
|
|
||||||
dialogTop("请选择指定成员", "error");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
shcemeAuthorizeData = "";
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
function setSchemeAuthorize(type,data)
|
|
||||||
{
|
|
||||||
$('#ShcemeAuthorize' + type).trigger("click");
|
|
||||||
$.each(data, function (i,item) {
|
|
||||||
$("#Role").setCheckedNodeOne(item.ObjectId);
|
|
||||||
$("#Post").setCheckedNodeOne(item.ObjectId);
|
|
||||||
$("#UserGroup").setCheckedNodeOne(item.ObjectId);
|
|
||||||
$("#User").setCheckedNodeOne(item.ObjectId);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function GetTree(type) {
|
|
||||||
$.SetForm({
|
|
||||||
url: "../../FlowManage/FlowDesign/Get" + type + "CheckTreeJson",
|
|
||||||
success: function (data) {
|
|
||||||
AllAuthorizeCheckData[type] = $.arrayClone(data);
|
|
||||||
var item = {
|
|
||||||
height: $(window).height() - 131,
|
|
||||||
showcheck: true,
|
|
||||||
//url: "../../FlowManage/FlowDesign/Get" + type + "CheckTreeJson",
|
|
||||||
data:data,
|
|
||||||
oncheckboxclick: function (item, et, s) {
|
|
||||||
var $item = $("#" + item.mytype + "Div");
|
|
||||||
if (et == 1) {
|
|
||||||
var mytype = "";
|
|
||||||
var _html = "";
|
|
||||||
var _title = '';
|
|
||||||
switch (item.mytype) {
|
|
||||||
case "Role":
|
|
||||||
mytype = "角色";
|
|
||||||
break;
|
|
||||||
case "Post":
|
|
||||||
mytype = "岗位";
|
|
||||||
break;
|
|
||||||
case "UserGroup":
|
|
||||||
mytype = "用户组";
|
|
||||||
break;
|
|
||||||
case "User":
|
|
||||||
mytype = "用户";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
_html += '<div id="' + item.id + '" data-value="' + item.mytype + '" class="card-box shcemeinfocheck active">';
|
|
||||||
_html += ' <div class="card-box-img">';
|
|
||||||
_html += ' <img src="/Content/images/UserCard03.png" />';
|
|
||||||
_html += ' </div>';
|
|
||||||
_html += ' <div class="card-box-content">';
|
|
||||||
_html += ' <p>名称:' + item.text + '</p>';
|
|
||||||
_html += ' <p>类别:' + mytype + '</p>';
|
|
||||||
_html += ' </div><i></i>';
|
|
||||||
_html += '</div>';
|
|
||||||
$item.append(_html);
|
|
||||||
$item.show();
|
|
||||||
|
|
||||||
$(".card-box").click(function () {
|
|
||||||
$(this).remove();
|
|
||||||
$('#' + $(this).attr('data-value')).setNoCheckedNodes($(this).attr('id'));
|
|
||||||
if ($item.find('.card-box-img').length == 0) {
|
|
||||||
$item.hide();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
else if (et == 0) {
|
|
||||||
$item.find('#' + item.id).remove();
|
|
||||||
if ($item.find('.card-box-img').length == 0) {
|
|
||||||
$item.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
$("#" + type).treeview(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
/*=========权限配置(end)==================================================================*/
|
|
||||||
/*=========表单选择(begin)==================================================================*/
|
/*=========表单选择(begin)==================================================================*/
|
||||||
var _frmdatabase = "";
|
var _frmdatabase = "";
|
||||||
var _frmflag = false;
|
var _frmflag = false;
|
||||||
@ -358,20 +196,7 @@
|
|||||||
_frmflag = false;
|
_frmflag = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (frmData.isSystemTable == 1 && _frmdatabase != "") {
|
if ( frmData.FrmName != undefined) {
|
||||||
$('#frmpreview').hide();
|
|
||||||
$('#frmDefaulting').hide();
|
|
||||||
$('#frmdesign').show();
|
|
||||||
frmapp = $('#frmdesign').frmDesign({
|
|
||||||
Height: $(window).height() - 179,
|
|
||||||
tablefiledJsonData: _frmdatabase,
|
|
||||||
isSystemTable: frmData.isSystemTable,
|
|
||||||
frmContent: frmData.FrmContent
|
|
||||||
});
|
|
||||||
_frmflag = true;
|
|
||||||
$(this).html("预览表单");
|
|
||||||
}
|
|
||||||
else if (frmData.isSystemTable == 0 && frmData.FrmName != undefined) {
|
|
||||||
$('#frmpreview').hide();
|
$('#frmpreview').hide();
|
||||||
$('#frmDefaulting').hide();
|
$('#frmDefaulting').hide();
|
||||||
$('#frmdesign').show();
|
$('#frmdesign').show();
|
||||||
@ -396,7 +221,6 @@
|
|||||||
$('#frmDefaulting').hide();
|
$('#frmDefaulting').hide();
|
||||||
$('#frmpreview').show();
|
$('#frmpreview').show();
|
||||||
|
|
||||||
frmData.isSystemTable = data.isSystemTable;
|
|
||||||
frmData.FrmDbId = data.FrmDbId;
|
frmData.FrmDbId = data.FrmDbId;
|
||||||
frmData.FrmTable = data.FrmTable;
|
frmData.FrmTable = data.FrmTable;
|
||||||
frmData.FrmName = data.FrmName;
|
frmData.FrmName = data.FrmName;
|
||||||
@ -409,41 +233,11 @@
|
|||||||
width:870
|
width:870
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.isSystemTable == 0) {
|
|
||||||
frmapp = $('#frmdesign').frmDesign({
|
frmapp = $('#frmdesign').frmDesign({
|
||||||
Height: 480,
|
Height: 480,
|
||||||
frmContent: frmData.FrmContent
|
frmContent: frmData.FrmContent
|
||||||
});
|
});
|
||||||
}
|
|
||||||
else {
|
|
||||||
$.ajax({
|
|
||||||
url: "../../SystemManage/DataBaseTable/GetTableFiledListJson",
|
|
||||||
data: { dataBaseLinkId: data.FrmDbId, tableName: data.FrmTable },
|
|
||||||
type: "GET",
|
|
||||||
dataType: "json",
|
|
||||||
async: false,
|
|
||||||
success: function (data) {
|
|
||||||
_frmdatabase = [];
|
|
||||||
for (var id in data) {
|
|
||||||
item = data[id];
|
|
||||||
if (item.column != frmData.FrmTableId)
|
|
||||||
{
|
|
||||||
item.remark = item.column + "【" + item.remark + "】";
|
|
||||||
_frmdatabase.push(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
frmapp = $('#frmdesign').frmDesign({
|
|
||||||
Height: 480,
|
|
||||||
tablefiledJsonData: _frmdatabase,
|
|
||||||
isSystemTable: frmData.isSystemTable,
|
|
||||||
frmContent: frmData.FrmContent
|
|
||||||
});
|
|
||||||
},
|
|
||||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
||||||
dialogMsg(errorThrown, -1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function bindingFrm() {
|
function bindingFrm() {
|
||||||
@ -549,10 +343,9 @@
|
|||||||
<div id="wizard" class="wizard" data-target="#wizard-steps">
|
<div id="wizard" class="wizard" data-target="#wizard-steps">
|
||||||
<ul class="steps">
|
<ul class="steps">
|
||||||
<li data-target="#step-1" class="active"><span class="step">1</span>基本配置<span class="chevron"></span></li>
|
<li data-target="#step-1" class="active"><span class="step">1</span>基本配置<span class="chevron"></span></li>
|
||||||
<li data-target="#step-2"><span class="step">2</span>权限设置<span class="chevron"></span></li>
|
<li data-target="#step-2"><span class="step">2</span>表单选择<span class="chevron"></span></li>
|
||||||
<li data-target="#step-3"><span class="step">3</span>表单选择<span class="chevron"></span></li>
|
<li data-target="#step-3"><span class="step">3</span>流程设计<span class="chevron"></span></li>
|
||||||
<li data-target="#step-4"><span class="step">4</span>流程设计<span class="chevron"></span></li>
|
<li data-target="#step-4"><span class="step">4</span>创建完成<span class="chevron"></span></li>
|
||||||
<li data-target="#step-5"><span class="step">5</span>创建完成<span class="chevron"></span></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="step-content wizard-step-content" id="wizard-steps">
|
<div class="step-content wizard-step-content" id="wizard-steps">
|
||||||
@ -580,18 +373,6 @@
|
|||||||
<input id="SchemeName" type="text" class="form-control" placeholder="请输入流程名称" isvalid="yes" checkexpession="NotNull" />
|
<input id="SchemeName" type="text" class="form-control" placeholder="请输入流程名称" isvalid="yes" checkexpession="NotNull" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="formTitle">流程分类<font face="宋体">*</font></td>
|
|
||||||
<td class="formValue">
|
|
||||||
<div id="SchemeType" type="selectTree" class="ui-select" isvalid="yes" checkexpession="NotNull"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="formTitle">表单类型<font face="宋体">*</font></td>
|
|
||||||
<td class="formValue">
|
|
||||||
<div id="FrmType" type="selectTree" class="ui-select" isvalid="yes" checkexpession="NotNull"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="formTitle formTitle-top">
|
<th class="formTitle formTitle-top">
|
||||||
备注
|
备注
|
||||||
@ -604,49 +385,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="step-pane " id="step-2">
|
|
||||||
<div class="bottomline">
|
<div class="step-pane" id="step-2">
|
||||||
<div class="rdio rdio-color_a"><input name="AuthorizeType" value="0" id="ShcemeAuthorize0" type="radio" checked /><label for="ShcemeAuthorize0">所有成员</label></div>
|
|
||||||
<div class="rdio rdio-color_a"><input name="AuthorizeType" value="1" id="ShcemeAuthorize1" type="radio" /><label for="ShcemeAuthorize1">指定成员</label></div>
|
|
||||||
</div>
|
|
||||||
<div id="DesignateMember">
|
|
||||||
<div class="standtabborder">
|
|
||||||
<div class="standtab standtabactived" onclick="$.standTabchange(this, 'Role')">
|
|
||||||
角色
|
|
||||||
</div>
|
|
||||||
<div class="standtab " onclick="$.standTabchange(this, 'Post')">
|
|
||||||
岗位
|
|
||||||
</div>
|
|
||||||
<div class="standtab " onclick="$.standTabchange(this, 'UserGroup')">
|
|
||||||
用户组
|
|
||||||
</div>
|
|
||||||
<div class="standtab " onclick="$.standTabchange(this, 'User')">
|
|
||||||
用户
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="Role" class="standtab-pane"></div>
|
|
||||||
<div id="Post" style="display: none;" class="standtab-pane"></div>
|
|
||||||
<div id="UserGroup" style="display: none;" class="standtab-pane"></div>
|
|
||||||
<div id="User" style="display: none;" class="standtab-pane"></div>
|
|
||||||
|
|
||||||
<div id="DesignateMemberlist" style="margin: 0px; border-right: none; border-left: none; border-bottom: none; background-color: #fff; overflow: auto; padding-bottom: 10px;height:528px;">
|
|
||||||
<div id="RoleDiv" class="SchemeAuthorizePanel">
|
|
||||||
<div class="flow-portal-panel-title"><i class="fa fa-paw"></i> 角色</div>
|
|
||||||
</div>
|
|
||||||
<div id="PostDiv" class="SchemeAuthorizePanel">
|
|
||||||
<div class="flow-portal-panel-title"><i class="fa fa-graduation-cap"></i> 岗位</div>
|
|
||||||
</div>
|
|
||||||
<div id="UserGroupDiv" class="SchemeAuthorizePanel">
|
|
||||||
<div class="flow-portal-panel-title"><i class="fa fa-group"></i> 用户组</div>
|
|
||||||
</div>
|
|
||||||
<div id="UserDiv" class="SchemeAuthorizePanel">
|
|
||||||
<div class="flow-portal-panel-title"><i class="fa fa-user"></i> 用户</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="Treebackground" style="position: fixed; top: 91px; left: 0px; z-index: 2; width: 1100px; height: 528px; background: #000; filter: alpha(opacity=10); opacity: 0.1;"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="step-pane" id="step-3">
|
|
||||||
<div>
|
<div>
|
||||||
<div id="FormFrmTree" class="border-right" style="width: 190px; float: left;"></div>
|
<div id="FormFrmTree" class="border-right" style="width: 190px; float: left;"></div>
|
||||||
<div style="width: 890px;float:right;margin-right:10px;">
|
<div style="width: 890px;float:right;margin-right:10px;">
|
||||||
@ -666,20 +406,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="step-pane" id="step-4">
|
<div class="step-pane" id="step-3">
|
||||||
<div id="FlowPanel" style="margin: 0px;">
|
<div id="FlowPanel" style="margin: 0px;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="step-pane" id="step-5">
|
<div class="step-pane" id="step-4">
|
||||||
<div class="drag-tip">
|
<div class="drag-tip">
|
||||||
<i class="fa fa-check-circle"></i>
|
<i class="fa fa-check-circle"></i>
|
||||||
<p >设计完成,请点击保存</p>
|
<p >设计完成,请点击保存</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="sysbackground" class="drag-tip" style="position: absolute; top:47px; left: 0px; z-index: 10000; width: 1100px; height: 572px; background: #fff;text-align: center; padding-top: 100px;display:none; ">
|
|
||||||
<i class="fa fa-warning" style="color: #F0AD4E;"></i>
|
|
||||||
<p>系统表单流程,无这一步</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-button" id="wizard-actions">
|
<div class="form-button" id="wizard-actions">
|
||||||
<a id="btn_last" disabled class="btn btn-default btn-prev">上一步</a>
|
<a id="btn_last" disabled class="btn btn-default btn-prev">上一步</a>
|
||||||
|
@ -150,6 +150,7 @@
|
|||||||
<Compile Include="App_Start\BundleConfig.cs" />
|
<Compile Include="App_Start\BundleConfig.cs" />
|
||||||
<Compile Include="App_Start\FilterConfig.cs" />
|
<Compile Include="App_Start\FilterConfig.cs" />
|
||||||
<Compile Include="App_Start\RouteConfig.cs" />
|
<Compile Include="App_Start\RouteConfig.cs" />
|
||||||
|
<Compile Include="Areas\FlowManage\Controllers\FormDesignController.cs" />
|
||||||
<Compile Include="Areas\FlowManage\Controllers\FlowDesignController.cs" />
|
<Compile Include="Areas\FlowManage\Controllers\FlowDesignController.cs" />
|
||||||
<Compile Include="Areas\FlowManage\FlowManageAreaRegistration.cs" />
|
<Compile Include="Areas\FlowManage\FlowManageAreaRegistration.cs" />
|
||||||
<Compile Include="AutofacExt.cs" />
|
<Compile Include="AutofacExt.cs" />
|
||||||
|
@ -16,7 +16,7 @@ namespace OpenAuth.UnitTest
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void AddForm()
|
public void AddForm()
|
||||||
{
|
{
|
||||||
|
var datas = _app.GetList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user