check bugs

This commit is contained in:
yubao 2018-04-14 15:56:44 +08:00
parent 18cc60152b
commit 5a89eb2230
6 changed files with 151 additions and 16 deletions

View File

@ -24,6 +24,10 @@ namespace OpenAuth.Mvc.Controllers
{
return View();
}
public ActionResult Preview()
{
return View();
}
//流程节点信息
public ActionResult NodeInfo()

View File

@ -203,6 +203,7 @@
<Content Include="layui\css\modules\laydate\default\font.css" />
<Content Include="userJs\assignResource.js" />
<Content Include="userJs\assignRole.js" />
<Content Include="userJs\flowSchemePreview.js" />
<Content Include="userJs\flowinstanceDetail.js" />
<Content Include="userJs\resources.js" />
<Content Include="userJs\verification.js" />
@ -652,6 +653,7 @@
<Content Include="Views\FlowInstances\Detail.cshtml" />
<Content Include="Views\Resources\Index.cshtml" />
<Content Include="Views\Resources\Assign.cshtml" />
<Content Include="Views\FlowSchemes\Preview.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="layui\lay\modules\mobile\" />

View File

@ -0,0 +1,32 @@

@section header
{
<link rel="stylesheet" href="/css/treetable.css" />
<link href="/js/flow/GooFlow.css" rel="stylesheet" />
<link href="/css/formpreview.css" rel="stylesheet" />
}
<div class="layui-row">
<div class="layui-tab layui-tab-brief" lay-filter="tab" style="margin: 0px">
<ul class="layui-tab-title">
<li class="layui-this">表单预览</li>
<li>流程预览</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-fluid layui-show">
<div id="frmPreview"></div>
</div>
<div class="layui-tab-item">
<div id="flowPanel" style=""></div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/userJs/flowSchemePreview.js?v2"></script>

View File

@ -0,0 +1,75 @@
/// <reference path="flowInstanceOp.js" />
layui.config({
base: "/js/"
}).use(['form', 'vue', 'ztree', 'layer', 'utils', 'element', 'jquery', 'slimscroll', 'flow/gooflow', 'flowlayout'], function () {
var form = layui.form, element = layui.element,
layer = layui.layer,
$ = layui.jquery;
var index = layer.getFrameIndex(window.name); //获取窗口索引
var id = $.getUrlParam("id"); //ID
/*=========流程设计begin======================*/
var flowDesignPanel = $('#flowPanel').flowdesign({
height: 300,
widht: 300,
haveTool: false,
OpenNode: function (object) {
FlowDesignObject = object; //为NodeInfo窗口提供调用
if (object.type == 'start round mix' || object.type == 'end round') {
layer.msg("开始节点与结束节点不能设置");
return false;
}
layer.open({
type: 2,
area: ['500px', '450px'], //宽高
maxmin: true, //开启最大化最小化按钮
title: '节点设置【' + object.name + '】',
content: '/flowschemes/nodeInfo',
btn: ['确定', '取消'],
yes: function (index, layero) {
var body = layer.getChildFrame('body', index);
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象执行iframe页的方法iframeWin.method();
var nodedata = iframeWin.getVal();
flowDesignPanel.SetNodeEx(object.id, nodedata);
layer.close(index);
},
cancel: function (index) {
layer.close(index);
}
});
},
OpenLine: function (id, object) {
lay.msg("暂不能设置分支条件");
return;
}
});
/*=========流程设计end=====================*/
$.getJSON('/flowschemes/get?id=' + id,
function (data) {
var obj = data.Result;
flowDesignPanel.loadData(JSON.parse(obj.SchemeContent));
$.getJSON("/forms/get?id=" + obj.FrmId, function (data) {
$("#frmPreview").html(data.Result.Html);
});
});
flowDesignPanel.reinitSize($(window).width() - 30, $(window).height() - 100);
$(window).resize(function () {
flowDesignPanel.reinitSize($(window).width() - 30, $(window).height() - 100);
});
//让层自适应iframe
layer.iframeAuto(index);
$(".GooFlow_work").slimScroll({
height: 'auto'
});
})

View File

@ -1,8 +1,8 @@
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, element = layui.element,
layer = (top == undefined || top.layer === undefined )? layui.layer : top.layer,
layer = (top == undefined || top.layer === undefined) ? layui.layer : top.layer,
$ = layui.jquery;
var table = layui.table;
var openauth = layui.openauth;
@ -76,7 +76,7 @@
area: ['800px', '700px'], //宽高
maxmin: true, //开启最大化最小化按钮
title: title,
content: '/flowschemes/design?id='+data.Id,
content: '/flowschemes/design?id=' + data.Id,
btn: ['保存', '关闭'],
yes: function (index, layero) {
var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象执行iframe页的方法iframeWin.method();
@ -126,15 +126,33 @@
, 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]);
}
, btnPreview: function () { //预览
var checkStatus = table.checkStatus('mainList')
, data = checkStatus.data;
if (data.length != 1) {
layer.msg("请选择要处理的流程,且同时只能选择一条");
return;
}
layer.open({
type: 2,
area: ['800px', '600px'], //宽高
maxmin: true, //开启最大化最小化按钮
title: '进度详情',
content: ['/flowSchemes/preview?id=' + data[0].Id, 'no'],
btn: ['关闭']
});
}
, search: function () { //搜索
mainList({ key: $('#key').val() });

View File

@ -1,6 +1,6 @@
layui.config({
base: "/js/"
}).use(['form', 'vue', 'ztree', 'layer', 'utils', 'element', 'jquery', 'droptree', 'openauth', 'flow/gooflow', 'flowlayout'], function () {
}).use(['form', 'vue', 'ztree', 'layer', 'utils', 'element', 'slimscroll', 'jquery', 'droptree', 'openauth', 'flow/gooflow', 'flowlayout'], function () {
var form = layui.form, element = layui.element,
layer = (top == undefined || top.layer === undefined )? layui.layer : top.layer,
$ = layui.jquery;
@ -24,6 +24,13 @@
});
$("#frmPreview").html(data.Result.FrmPreviewHtml);
//让层自适应iframe
layer.iframeAuto(index);
$(".GooFlow_work").slimScroll({
height: 'auto'
});
});
//提交数据
@ -48,7 +55,4 @@
//只能用隐藏的submit btn才行用form.submit()时data.field里没有数据
$("#btnSubmit").click();
}
//让层自适应iframe
layer.iframeAuto(index);
})