mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 01:58:01 +08:00
修复表单设计bug
This commit is contained in:
@@ -58,6 +58,7 @@ namespace OpenAuth.App
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.Id = Guid.Parse(keyValue);
|
||||
_unitWork.Update(u =>u.Id, entity);
|
||||
}
|
||||
_unitWork.Save();
|
||||
|
@@ -31,15 +31,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
{
|
||||
return View();
|
||||
}
|
||||
/// <summary>
|
||||
/// 设计器
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult FormLayout()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 预览表单
|
||||
/// </summary>
|
||||
@@ -125,10 +117,10 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="ids">主键值</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public ActionResult RemoveForm(Guid[] ids)
|
||||
public string RemoveForm(Guid[] ids)
|
||||
{
|
||||
_wfFrmMainBll.RemoveForm(ids);
|
||||
return Content("删除成功。");
|
||||
return Result.ToJson();
|
||||
}
|
||||
///// <summary>
|
||||
///// 保存用户表单(新增、修改)
|
||||
@@ -153,19 +145,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
}
|
||||
return Result.ToJson();
|
||||
}
|
||||
///// <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>
|
||||
|
@@ -159,12 +159,13 @@
|
||||
/*=========创建完成(begin)==================================================================*/
|
||||
function finishbtn() {
|
||||
postData["EnabledMark"] = 1;
|
||||
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
||||
$.SaveForm({
|
||||
url: "../../FlowManage/FormDesign/SaveForm?keyValue=" + keyValue,
|
||||
param: postData,
|
||||
loading: "正在保存数据...",
|
||||
success: function () {
|
||||
$.currentIframe().$("#gridTable").trigger("reloadGrid");
|
||||
parent.layer.close(index);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@@ -12,12 +12,10 @@ function MainGrid() {
|
||||
{
|
||||
label: "状态", name: "EnabledMarklabel", index: "EnabledMarklabel", width: 50, align: "center",
|
||||
formatter: function (cellvalue, options, rowObject) {
|
||||
if (rowObject.enabledmark == 1) {
|
||||
return '<span class=\"label label-success\">启用</span>';
|
||||
} else if (rowObject.enabledmark == 0) {
|
||||
if (rowObject.enabledmark == 0) {
|
||||
return '<span class=\"label label-danger\">停用</span>';
|
||||
} else {
|
||||
return '<span class=\"label label-info\">草稿</span>';
|
||||
return '<span class=\"label label-success\">启用</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -77,9 +75,12 @@ function edit() {
|
||||
type: 2,
|
||||
title:selected.Code,
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['1200px', '700px'], //宽高
|
||||
area: ['1000px', '700px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
content: '/FlowManage/FormDesign/FrmBuider?keyValue=' + selected.Id
|
||||
content: '/FlowManage/FormDesign/FrmBuider?keyValue=' + selected.Id,
|
||||
end: function () {
|
||||
list.reload();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
@@ -89,7 +90,7 @@ function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['1200px', '700px'], //宽高
|
||||
area: ['1000px', '700px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
content: '/FlowManage/FormDesign/FrmBuider',
|
||||
end: function() {
|
||||
@@ -107,10 +108,11 @@ function preview() {
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
title:'表单预览',
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['1200px', '700px'], //宽高
|
||||
area: ['1000px', '700px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
content: '/FlowManage/FormDesign/PreviewIndex?keyValue=' + selected.Id + "&FrmVersion=" + selected.FrmVersion,
|
||||
content: '/FlowManage/FormDesign/FormPreview?keyValue=' + selected.Id + "&FrmVersion=" + selected.FrmVersion,
|
||||
end: function () {
|
||||
list.reload();
|
||||
}
|
||||
|
BIN
OpenAuth.Mvc/Content/Images/table_guide.png
Normal file
BIN
OpenAuth.Mvc/Content/Images/table_guide.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@@ -20,16 +20,8 @@
|
||||
type: options.type,
|
||||
dataType: options.dataType,
|
||||
success: function (data) {
|
||||
if (data.type == "3") {
|
||||
dialogAlert(data.message, -1);
|
||||
} else {
|
||||
Loading(false);
|
||||
dialogMsg(data.message, 1);
|
||||
options.success(data);
|
||||
if (options.close == true) {
|
||||
dialogClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
Loading(false);
|
||||
@@ -77,53 +69,7 @@ $.SetForm = function (options) {
|
||||
}
|
||||
});
|
||||
}
|
||||
$.RemoveForm = function (options) {
|
||||
var defaults = {
|
||||
msg: "注:您确定要删除吗?该操作将无法恢复",
|
||||
loading: "正在删除数据...",
|
||||
url: "",
|
||||
param: [],
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
success: null
|
||||
};
|
||||
var options = $.extend(defaults, options);
|
||||
dialogConfirm(options.msg, function (r) {
|
||||
if (r) {
|
||||
Loading(true, options.loading);
|
||||
window.setTimeout(function () {
|
||||
var postdata = options.param;
|
||||
if ($('[name=__RequestVerificationToken]').length > 0) {
|
||||
postdata["__RequestVerificationToken"] = $('[name=__RequestVerificationToken]').val();
|
||||
}
|
||||
$.ajax({
|
||||
url: options.url,
|
||||
data: postdata,
|
||||
type: options.type,
|
||||
dataType: options.dataType,
|
||||
success: function (data) {
|
||||
if (data.type == "3") {
|
||||
dialogAlert(data.message, -1);
|
||||
} else {
|
||||
dialogMsg(data.message, 1);
|
||||
options.success(data);
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
Loading(false);
|
||||
dialogMsg(errorThrown, -1);
|
||||
},
|
||||
beforeSend: function () {
|
||||
Loading(true, options.loading);
|
||||
},
|
||||
complete: function () {
|
||||
Loading(false);
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$.ConfirmAjax = function (options) {
|
||||
var defaults = {
|
||||
msg: "提示信息",
|
||||
|
@@ -1,7 +1,4 @@
|
||||
$(function () {
|
||||
window.onload = function () {
|
||||
Loading(true);
|
||||
}
|
||||
$(".ui-filter-text").click(function () {
|
||||
if ($(this).next('.ui-filter-list').is(":hidden")) {
|
||||
$(this).css('border-bottom-color', '#fff');
|
||||
@@ -26,22 +23,16 @@
|
||||
})
|
||||
})
|
||||
Loading = function (bool, text) {
|
||||
var ajaxbg = top.$("#loading_background,#loading_manage");
|
||||
if (bool) {
|
||||
ajaxbg.show();
|
||||
} else {
|
||||
if (top.$("#loading_manage").attr('istableloading') == undefined) {
|
||||
ajaxbg.hide();
|
||||
top.$(".ajax-loader").remove();
|
||||
layui.use('layer', function () {
|
||||
var layer = layui.layer;
|
||||
if (bool) {
|
||||
layer.load(1);
|
||||
} else {
|
||||
layer.closeAll('loading');
|
||||
}
|
||||
}
|
||||
if (!!text) {
|
||||
top.$("#loading_manage").html(text);
|
||||
} else {
|
||||
top.$("#loading_manage").html("正在拼了命为您加载…");
|
||||
}
|
||||
top.$("#loading_manage").css("left", (top.$('body').width() - top.$("#loading_manage").width()) / 2 - 54);
|
||||
top.$("#loading_manage").css("top", (top.$('body').height() - top.$("#loading_manage").height()) / 2);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
tabiframeId = function () {
|
||||
var iframeId = top.$(".LRADMS_iframe:visible").attr("id");
|
||||
@@ -722,25 +713,7 @@ $.fn.jqGridRow = function () {
|
||||
}
|
||||
|
||||
dialogTop = function (content, type) {
|
||||
$(".tip_container").remove();
|
||||
var bid = parseInt(Math.random() * 100000);
|
||||
$("body").prepend('<div id="tip_container' + bid + '" class="container tip_container"><div id="tip' + bid + '" class="mtip"><i class="micon"></i><span id="tsc' + bid + '"></span><i id="mclose' + bid + '" class="mclose"></i></div></div>');
|
||||
var $this = $(this);
|
||||
var $tip_container = $("#tip_container" + bid);
|
||||
var $tip = $("#tip" + bid);
|
||||
var $tipSpan = $("#tsc" + bid);
|
||||
//先清楚定时器
|
||||
clearTimeout(window.timer);
|
||||
//主体元素绑定事件
|
||||
$tip.attr("class", type).addClass("mtip");
|
||||
$tipSpan.html(content);
|
||||
$tip_container.slideDown(300);
|
||||
//提示层隐藏定时器
|
||||
window.timer = setTimeout(function () {
|
||||
$tip_container.slideUp(300);
|
||||
$(".tip_container").remove();
|
||||
}, 4000);
|
||||
$("#tip_container" + bid).css("left", ($(window).width() - $("#tip_container" + bid).width()) / 2);
|
||||
layer.msg(content);
|
||||
}
|
||||
dialogOpen = function (options) {
|
||||
Loading(true);
|
||||
@@ -758,7 +731,7 @@ dialogOpen = function (options) {
|
||||
var _url = options.url;
|
||||
var _width = top.$.windowWidth() > parseInt(options.width.replace('px', '')) ? options.width : top.$.windowWidth() + 'px';
|
||||
var _height = top.$.windowHeight() > parseInt(options.height.replace('px', '')) ? options.height : top.$.windowHeight() + 'px';
|
||||
top.layer.open({
|
||||
layer.open({
|
||||
id: options.id,
|
||||
type: 2,
|
||||
shade: options.shade,
|
||||
@@ -789,7 +762,7 @@ dialogContent = function (options) {
|
||||
callBack: null
|
||||
};
|
||||
var options = $.extend(defaults, options);
|
||||
top.layer.open({
|
||||
layer.open({
|
||||
id: options.id,
|
||||
type: 1,
|
||||
title: options.title,
|
||||
@@ -806,13 +779,13 @@ dialogAlert = function (content, type) {
|
||||
if (type == -1) {
|
||||
type = 2;
|
||||
}
|
||||
top.layer.alert(content, {
|
||||
layer.alert(content, {
|
||||
icon: type,
|
||||
title: "提示"
|
||||
});
|
||||
}
|
||||
dialogConfirm = function (content, callBack) {
|
||||
top.layer.confirm(content, {
|
||||
layer.confirm(content, {
|
||||
icon: 7,
|
||||
title: "提示",
|
||||
btn: ['确认', '取消'],
|
||||
@@ -826,18 +799,18 @@ dialogMsg = function (content, type) {
|
||||
if (type == -1) {
|
||||
type = 2;
|
||||
}
|
||||
top.layer.msg(content, { icon: type, time: 4000, shift: 5 });
|
||||
layer.msg(content, { icon: type, time: 4000, shift: 5 });
|
||||
}
|
||||
dialogClose = function () {
|
||||
try {
|
||||
var index = top.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
||||
var $IsdialogClose = top.$("#layui-layer" + index).find('.layui-layer-btn').find("#IsdialogClose");
|
||||
var index = layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
||||
var $IsdialogClose = $("#layui-layer" + index).find('.layui-layer-btn').find("#IsdialogClose");
|
||||
var IsClose = $IsdialogClose.is(":checked");
|
||||
if ($IsdialogClose.length == 0) {
|
||||
IsClose = true;
|
||||
}
|
||||
if (IsClose) {
|
||||
top.layer.close(index);
|
||||
layer.close(index);
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
|
@@ -272,6 +272,7 @@
|
||||
<Content Include="Content\ace\js\src\elements.typeahead.js" />
|
||||
<Content Include="Content\ace\js\src\elements.wizard.js" />
|
||||
<Content Include="Content\ace\js\src\elements.wysiwyg.js" />
|
||||
<Content Include="Content\Images\table_guide.png" />
|
||||
<Content Include="Content\layui\css\layui.css" />
|
||||
<Content Include="Content\layui\css\mobile.css" />
|
||||
<Content Include="Content\layui\css\modules\code.css" />
|
||||
|
@@ -17,12 +17,13 @@
|
||||
<script src="~/Content/scripts/bootstrap/bootstrap.min.js"></script>
|
||||
<!--bootstrap组件end-->
|
||||
<script src="~/Content/scripts/plugins/datepicker/WdatePicker.js"></script>
|
||||
|
||||
<link href="~/Content/layui/css/modules/layer/layer.css" rel="stylesheet" />
|
||||
<link href="~/Content/plugins/layer/skin/layer.ext.css" rel="stylesheet" />
|
||||
<script src="~/Content/layui/layui.js"></script>
|
||||
<script src="~/Content/layui/lay/modules/layer.js"></script>
|
||||
|
||||
<script src="/Content/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
var layer;
|
||||
layui.use(['layer', 'form'], function () {
|
||||
layer = layui.layer;
|
||||
});
|
||||
</script>
|
||||
|
||||
@System.Web.Optimization.Styles.Render("~/Content/scripts/plugins/tree/css",
|
||||
"~/Content/scripts/plugins/datetime/css",
|
||||
@@ -52,6 +53,8 @@
|
||||
@System.Web.Optimization.Styles.Render("~/Content/styles/flowall.css")
|
||||
@System.Web.Optimization.Scripts.Render("~/Content/scripts/flow/js")
|
||||
<!--工作流设计器依赖end-->
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1">
|
||||
|
@@ -32,7 +32,6 @@
|
||||
<link href="/Content/myace.css" rel="stylesheet"/>
|
||||
|
||||
<link href="/Content/plugins/zTree/css/metroStyle/metroStyle.css" rel="stylesheet"/>
|
||||
<link href="/Content/layui/css/modules/layer/layer.css" rel="stylesheet" />
|
||||
<!--[if lte IE 9]>
|
||||
<link rel="stylesheet" href="/Content/ace/css/ace-ie.css" />
|
||||
<![endif]-->
|
||||
@@ -44,9 +43,14 @@
|
||||
<script src="~/Content/plugins/jqGrid/jquery.jqGrid.src.js"></script>
|
||||
<script src="~/Content/plugins/jqGrid/i18n/grid.locale-en.js"></script>
|
||||
<script src="~/Content/plugins/zTree/js/jquery.ztree.core.js"></script>
|
||||
<script src="/Content/layui/layui.js"></script>
|
||||
<script src="/Content/layui/lay/modules/layer.js"></script>
|
||||
<script src="~/Content/vue.js"></script>
|
||||
<script src="/Content/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
var layer;
|
||||
layui.use(['layer', 'form'], function () {
|
||||
layer = layui.layer;
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="skin-1">
|
||||
|
@@ -32,8 +32,7 @@
|
||||
<link href="/Content/myace.css" rel="stylesheet"/>
|
||||
|
||||
<link href="/Content/plugins/zTree/css/metroStyle/metroStyle.css" rel="stylesheet"/>
|
||||
<link href="~/Content/layui/css/modules/layer/layer.css" rel="stylesheet" />
|
||||
<link href="~/Content/plugins/layer/skin/layer.ext.css" rel="stylesheet" />
|
||||
|
||||
<!--[if lte IE 9]>
|
||||
<link rel="stylesheet" href="/Content/ace/css/ace-ie.css" />
|
||||
<![endif]-->
|
||||
@@ -45,8 +44,14 @@
|
||||
<script src="~/Content/plugins/jqGrid/jquery.jqGrid.src.js"></script>
|
||||
<script src="~/Content/plugins/jqGrid/i18n/grid.locale-en.js"></script>
|
||||
<script src="~/Content/plugins/zTree/js/jquery.ztree.core.js"></script>
|
||||
<script src="~/Content/layui/lay/modules/layer.js"></script>
|
||||
<script src="~/Content/vue.js"></script>
|
||||
<script src="/Content/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
var layer;
|
||||
layui.use(['layer', 'form'], function () {
|
||||
layer = layui.layer;
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="skin-1">
|
||||
|
Reference in New Issue
Block a user