mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 10:08:04 +08:00
4.0发布前最后一般脚本;
优化登陆; 优化流程审批;
This commit is contained in:
@@ -48,15 +48,12 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return JsonHelper.Instance.Serialize(resp);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开发者登录
|
||||
/// </summary>
|
||||
public string LoginByDev()
|
||||
public string Login(string username, string password)
|
||||
{
|
||||
var resp = new Response();
|
||||
try
|
||||
{
|
||||
var result = AuthUtil.Login(_appKey, "System", "123456");
|
||||
var result = AuthUtil.Login(_appKey, username, password);
|
||||
if (result.Code == 200)
|
||||
{
|
||||
var cookie = new HttpCookie("Token", result.Token)
|
||||
|
@@ -196,7 +196,7 @@
|
||||
<Content Include="js\flow\img\gooflow_icon.png" />
|
||||
<Content Include="js\flowlayout.js" />
|
||||
<Content Include="js\utils.js" />
|
||||
<Content Include="userJs\flowInstanceOp.js" />
|
||||
<Content Include="userJs\verification.js" />
|
||||
<Content Include="userJs\flowInstanceEdit.js" />
|
||||
<Content Include="userJs\flowInstanceWait.js" />
|
||||
<Content Include="userJs\flowInstanceDisposed.js" />
|
||||
|
@@ -6,47 +6,52 @@
|
||||
<link href="/css/formpreview.css" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<form class="layui-form" action="" id="formEdit">
|
||||
<div class="layui-row">
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="tab">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">表单信息</li>
|
||||
<li>流程信息</li>
|
||||
</ul>
|
||||
<form class="layui-form " action="" id="formEdit">
|
||||
<div class="layui-row ">
|
||||
<div class="layui-col-xs8">
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="tab">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">流程信息</li>
|
||||
<li>表单信息</li>
|
||||
</ul>
|
||||
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div id="flowPanel"></div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-item">
|
||||
<div id="frmPreview"></div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div id="frmPreview"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-item">
|
||||
<div id="flowPanel" ></div>
|
||||
</div>
|
||||
<div class="layui-col-xs4" style="background-color: gainsboro; min-height: 600px">
|
||||
<input type="hidden" id="FlowInstanceId" name="FlowInstanceId"/>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">审核结果</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="VerificationFinally" value="1" title="同意" checked>
|
||||
<input type="radio" name="VerificationFinally" value="2" title="不同意">
|
||||
<input type="radio" name="VerificationFinally" value="3" title="驳回">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">审核意见</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="VerificationOpinion"
|
||||
placeholder="" autocomplete="off" class="layui-textarea" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="FlowInstanceId" name="FlowInstanceId" />
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">审核结果</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="VerificationFinally" value="1" title="同意" checked>
|
||||
<input type="radio" name="VerificationFinally" value="2" title="不同意">
|
||||
<input type="radio" name="VerificationFinally" value="3" title="驳回">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">审核意见</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="VerificationOpinion"
|
||||
placeholder="" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" lay-submit id="btnSubmit" lay-filter="formSubmit"/>
|
||||
</form>
|
||||
<script type="text/javascript" src="/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="/userJs/flowInstanceOp.js?v2"></script>
|
||||
<script type="text/javascript" src="/userJs/verification.js?v2"></script>
|
||||
|
||||
|
@@ -43,11 +43,11 @@
|
||||
<form class="layui-form">
|
||||
<ul>
|
||||
<li>
|
||||
<input name="username" type="text" class="loginuser" value="admin"
|
||||
<input name="username" type="text" class="loginuser" value="System"
|
||||
placeholder="请输入用户名/手机号码" lay-verify="required">
|
||||
</li>
|
||||
<li>
|
||||
<input name="password" type="password" id="password" value="admin"
|
||||
<input name="password" type="password" id="password" value="123456"
|
||||
class="loginpwd ipt" placeholder="请输入密码" lay-verify="required">
|
||||
</li>
|
||||
<li>
|
||||
|
@@ -65,48 +65,7 @@
|
||||
}();
|
||||
$("#tree").height($("div.layui-table-view").height());
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function () {
|
||||
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: ['800px', '700px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
title: title,
|
||||
content: '/flowInstances/edit?id=' + data.Id,
|
||||
btn: ['保存', '关闭'],
|
||||
yes: function (index, layero) {
|
||||
var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
iframeWin.submit();
|
||||
},
|
||||
btn2: function (index) {
|
||||
layer.close(index);
|
||||
mainList();
|
||||
},
|
||||
cancel: function (index) {
|
||||
layer.close(index);
|
||||
mainList();
|
||||
}
|
||||
});
|
||||
}
|
||||
return {
|
||||
add: function () { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: ''
|
||||
});
|
||||
},
|
||||
update: function (data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
|
||||
//监听表格内部按钮
|
||||
table.on('tool(list)', function (obj) {
|
||||
var data = obj.data;
|
||||
@@ -117,27 +76,7 @@
|
||||
|
||||
//监听页面主按钮操作
|
||||
var active = {
|
||||
btnDel: function () { //批量删除
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
openauth.del("/FlowInstances/Delete",
|
||||
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]);
|
||||
}
|
||||
|
||||
, btnVerification: function () { //处理
|
||||
btnDetail: function () { //处理
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
if (data.length != 1) {
|
||||
@@ -147,16 +86,12 @@
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: ['750px', '550px'], //宽高
|
||||
area: ['800px', '600px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
title: '处理流程',
|
||||
content: '/flowInstances/Verification?id=' + data[0].Id,
|
||||
btn: ['保存', '关闭'],
|
||||
yes: function (index, layero) {
|
||||
var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
iframeWin.submit();
|
||||
},
|
||||
btn2: function (index) {
|
||||
content: ['/flowInstances/Verification?id=' + data[0].Id, 'no'],
|
||||
btn: ['关闭'],
|
||||
yes: function (index) {
|
||||
layer.close(index);
|
||||
mainList();
|
||||
},
|
||||
@@ -166,13 +101,6 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
, search: function () { //搜索
|
||||
mainList({ key: $('#key').val() });
|
||||
}
|
||||
, btnRefresh: function() {
|
||||
mainList();
|
||||
}
|
||||
};
|
||||
|
||||
$('.toolList .layui-btn').on('click', function () {
|
||||
|
@@ -65,48 +65,7 @@
|
||||
}();
|
||||
$("#tree").height($("div.layui-table-view").height());
|
||||
|
||||
//添加(编辑)对话框
|
||||
var editDlg = function () {
|
||||
|
||||
var update = false; //是否为更新
|
||||
var show = function (data) {
|
||||
var title = update ? "编辑信息" : "添加";
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: ['800px', '700px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
title: title,
|
||||
content: '/flowInstances/edit?id=' + data.Id,
|
||||
btn: ['保存', '关闭'],
|
||||
yes: function (index, layero) {
|
||||
var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
iframeWin.submit();
|
||||
},
|
||||
btn2: function (index) {
|
||||
layer.close(index);
|
||||
mainList();
|
||||
},
|
||||
cancel: function (index) {
|
||||
layer.close(index);
|
||||
mainList();
|
||||
}
|
||||
});
|
||||
}
|
||||
return {
|
||||
add: function () { //弹出添加
|
||||
update = false;
|
||||
show({
|
||||
Id: ''
|
||||
});
|
||||
},
|
||||
update: function (data) { //弹出编辑框
|
||||
update = true;
|
||||
show(data);
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
|
||||
//监听表格内部按钮
|
||||
table.on('tool(list)', function (obj) {
|
||||
var data = obj.data;
|
||||
@@ -117,27 +76,7 @@
|
||||
|
||||
//监听页面主按钮操作
|
||||
var active = {
|
||||
btnDel: function () { //批量删除
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
openauth.del("/FlowInstances/Delete",
|
||||
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]);
|
||||
}
|
||||
|
||||
, btnVerification: function () { //处理
|
||||
btnVerification: function () { //处理
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
if (data.length != 1) {
|
||||
@@ -147,10 +86,10 @@
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: ['750px', '550px'], //宽高
|
||||
area: ['800px', '600px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
title: '处理流程',
|
||||
content: '/flowInstances/Verification?id=' + data[0].Id,
|
||||
content: ['/flowInstances/Verification?id=' + data[0].Id,'no'],
|
||||
btn: ['保存', '关闭'],
|
||||
yes: function (index, layero) {
|
||||
var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
@@ -167,6 +106,31 @@
|
||||
});
|
||||
}
|
||||
|
||||
, btnDetail: 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: ['/flowInstances/Verification?id=' + data[0].Id, 'no'],
|
||||
btn: ['关闭'],
|
||||
yes: function (index) {
|
||||
layer.close(index);
|
||||
mainList();
|
||||
},
|
||||
cancel: function (index) {
|
||||
layer.close(index);
|
||||
mainList();
|
||||
}
|
||||
});
|
||||
}
|
||||
, search: function () { //搜索
|
||||
mainList({ key: $('#key').val() });
|
||||
}
|
||||
|
@@ -135,7 +135,7 @@
|
||||
editDlg.update(data[0]);
|
||||
}
|
||||
|
||||
, btnVerification: function () { //处理
|
||||
, btnDetail: function () { //处理
|
||||
var checkStatus = table.checkStatus('mainList')
|
||||
, data = checkStatus.data;
|
||||
if (data.length != 1) {
|
||||
@@ -145,16 +145,12 @@
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: ['750px', '550px'], //宽高
|
||||
area: ['800px', '600px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
title: '处理流程',
|
||||
content: '/flowInstances/Verification?id=' + data[0].Id,
|
||||
btn: ['保存', '关闭'],
|
||||
yes: function (index, layero) {
|
||||
var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
iframeWin.submit();
|
||||
},
|
||||
btn2: function (index) {
|
||||
content: ['/flowInstances/Verification?id=' + data[0].Id, 'no'],
|
||||
btn: ['关闭'],
|
||||
yes: function (index) {
|
||||
layer.close(index);
|
||||
mainList();
|
||||
},
|
||||
|
@@ -5,7 +5,6 @@ layui.config({
|
||||
var form = layui.form, element = layui.element,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery;
|
||||
var thiswin = (top == undefined) ? window : top.window;
|
||||
var table = layui.table;
|
||||
var openauth = layui.openauth;
|
||||
|
||||
@@ -108,7 +107,7 @@ layui.config({
|
||||
btn: ['确定', '取消'],
|
||||
yes: function (index, layero) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = thiswin[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
var nodedata = iframeWin.getVal();
|
||||
flowDesignPanel.SetNodeEx(object.id, nodedata);
|
||||
layer.close(index);
|
||||
|
@@ -3,9 +3,8 @@
|
||||
}).use(['form', 'vue', 'ztree', 'layer', 'utils', 'jquery', 'table', 'droptree', 'openauth', 'element'], function () {
|
||||
var form = layui.form,
|
||||
element = layui.element,
|
||||
layer = (top == undefined || top.layer === undefined )? layui.layer : top.layer,
|
||||
layer = layui.layer ,
|
||||
$ = layui.jquery;
|
||||
var thiswin = (top == undefined) ? window : top.window;
|
||||
var table = layui.table;
|
||||
var openauth = layui.openauth;
|
||||
|
||||
|
@@ -92,8 +92,9 @@ layui.config({
|
||||
|
||||
//登录按钮事件
|
||||
form.on("submit(login)", function (data) {
|
||||
$.getJSON("/Login/LoginByDev",
|
||||
function(data) {
|
||||
$.getJSON("/Login/Login"
|
||||
, data.field
|
||||
,function(data) {
|
||||
if (data.Code == 200) {
|
||||
window.location.href = "/Home/Index";
|
||||
} else {
|
||||
|
@@ -10,18 +10,12 @@
|
||||
var id = $.getUrlParam("id"); //ID
|
||||
$("#FlowInstanceId").val(id);
|
||||
|
||||
//标签切换
|
||||
element.on('tab(tab)', function (data) {
|
||||
layer.iframeAuto(index);
|
||||
});
|
||||
|
||||
|
||||
$.getJSON('/FlowInstances/get?id=' + id,
|
||||
function (data) {
|
||||
var obj = data.Result;
|
||||
var schemeContent = JSON.parse(obj.SchemeContent);
|
||||
var flowDesignPanel = $('#flowPanel').flowdesign({
|
||||
height: 300,
|
||||
widht: 300,
|
||||
haveTool: false
|
||||
, isprocessing: true
|
||||
, activityId: obj.ActivityId
|
||||
@@ -56,5 +50,5 @@
|
||||
}
|
||||
|
||||
//让层自适应iframe
|
||||
layer.iframeAuto(index);
|
||||
layer.iframeAuto(index);
|
||||
})
|
Reference in New Issue
Block a user