mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-05-10 23:58:02 +08:00
Merge branch 'workflow'
This commit is contained in:
commit
e7aa36e83a
@ -53,6 +53,7 @@ function DialogList() {
|
||||
var url = '/ModuleElementManager/LoadWithAccess?tId=';
|
||||
this.maingrid = $.CurrentDialog.find('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType: 'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
|
@ -56,6 +56,7 @@ function DialogList() {
|
||||
var url = '/ResourceManager/LoadWithAccess?cId=';
|
||||
this.maingrid = $.CurrentDialog.find('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType: 'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
|
@ -17,6 +17,7 @@ function MainGrid() {
|
||||
var selectedId = '00000000-0000-0000-0000-000000000000'; //ztree选中的模块
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType: 'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
@ -234,7 +235,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/CategoryManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/CategoryManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@ -242,7 +243,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//编辑
|
||||
|
@ -27,6 +27,7 @@ function MainGrid() {
|
||||
var selectedNode = 'me';
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType:'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
@ -115,14 +116,14 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/CommonApplies/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/CommonApplies/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
}
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@ -19,6 +19,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@ -262,7 +263,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/moduleManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/moduleManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@ -270,7 +271,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@ -48,6 +48,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@ -236,7 +237,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/OrgManager/DelOrg?Id=' + selected.Id, function (data) {
|
||||
$.post('/OrgManager/DelOrg?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@ -244,7 +245,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@ -38,8 +38,13 @@ $(function () {
|
||||
.on("click", function () { //执行命令
|
||||
$.post("/CommonApplies/ExeCmd?id=" +$("#processId").val() +"&cmd=" +$(this).val() ,
|
||||
function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
BJUI.dialog('refresh', 'detailDlg');
|
||||
});
|
||||
}
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -6,6 +6,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@ -219,7 +220,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/ResourceManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/ResourceManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@ -227,7 +228,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@ -48,6 +48,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@ -217,7 +218,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/RoleManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/RoleManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
orgtree.reload();
|
||||
@ -225,7 +226,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@ -47,6 +47,7 @@ function MainGrid() {
|
||||
this.maingrid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
loadType: 'GET',
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
@ -231,7 +232,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/StockManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/StockManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
@ -239,7 +240,7 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
|
@ -43,6 +43,7 @@ function UserRolesList() {
|
||||
var selectedId = '00000000-0000-0000-0000-000000000000'; //ztree选中的模块
|
||||
this.maingrid = $.CurrentDialog.find('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
loadType: 'GET',
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
|
@ -49,6 +49,7 @@ function MainGrid() {
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
loadType: 'GET',
|
||||
columns: [
|
||||
{
|
||||
name: 'Id',
|
||||
@ -228,7 +229,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/UserManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.post('/UserManager/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
maintree.reload();
|
||||
@ -236,9 +237,11 @@ function del() {
|
||||
else {
|
||||
$(this).alertmsg('warn', data.message);
|
||||
}
|
||||
});
|
||||
}, "json");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//自定义的编辑按钮
|
||||
function edit() {
|
||||
var selected = list.getSelectedObj();
|
||||
|
@ -57,14 +57,10 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
|
||||
var version = ConfigurationManager.AppSettings["version"];
|
||||
if (version == "demo")
|
||||
{
|
||||
HttpPostAttribute hobbyAttr = (HttpPostAttribute)Attribute.GetCustomAttribute(function, typeof(HttpPostAttribute));
|
||||
if (actionname.Contains("del") || hobbyAttr != null) //客户端提交数据
|
||||
if (version == "demo" && Request.HttpMethod == "POST")
|
||||
{
|
||||
throw new HttpException(400, "演示版本,不能进行该操作,当前模块:" + controllername + "/" + actionname);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,10 @@ using ProcessStatus = OptimaJet.Workflow.Core.Persistence.ProcessStatus;
|
||||
|
||||
namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 通用申请流程处理
|
||||
/// <para>李玉宝新增于2016-09-08 19:21:59</para>
|
||||
/// </summary>
|
||||
public class CommonAppliesController : BaseController
|
||||
{
|
||||
private CommonApplyApp _app;
|
||||
|
@ -16,7 +16,7 @@ using WorkflowRuntime = OptimaJet.Workflow.Core.Runtime.WorkflowRuntime;
|
||||
|
||||
namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
public class DesignerController : Controller
|
||||
public class DesignerController : BaseController
|
||||
{
|
||||
public ActionResult Index(string schemeName)
|
||||
{
|
||||
|
@ -81,12 +81,14 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return JsonHelper.Instance.Serialize(_app.LoadForOrgAndUser(orgId, userId));
|
||||
}
|
||||
|
||||
[System.Web.Mvc.HttpPost]
|
||||
public string AccessRoles(Guid userId, Guid[] ids)
|
||||
{
|
||||
_app.AccessRole(userId, ids);
|
||||
return JsonHelper.Instance.Serialize(BjuiResponse);
|
||||
}
|
||||
|
||||
[System.Web.Mvc.HttpPost]
|
||||
public string DelAccessRoles(Guid userId, Guid[] ids)
|
||||
{
|
||||
_app.DelAccessRole(userId, ids);
|
||||
|
@ -1,6 +1,7 @@
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Domain.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Repository
|
||||
@ -35,20 +36,16 @@ namespace OpenAuth.Repository
|
||||
/// <param name="idMaps">关联的<firstId, secondId>数组</param>
|
||||
public void AddRelevance(string key, ILookup<Guid, Guid> idMaps)
|
||||
{
|
||||
foreach (var sameVals in idMaps)
|
||||
{
|
||||
foreach (var value in sameVals)
|
||||
{
|
||||
Add(new Relevance
|
||||
DeleteBy(key, idMaps);
|
||||
BatchAdd((from sameVals in idMaps
|
||||
from value in sameVals
|
||||
select new Relevance
|
||||
{
|
||||
Key = key,
|
||||
FirstId = sameVals.Key,
|
||||
SecondId = value,
|
||||
OperateTime = DateTime.Now
|
||||
});
|
||||
}
|
||||
}
|
||||
Save();
|
||||
}).ToArray());
|
||||
}
|
||||
}
|
||||
}
|
@ -69,6 +69,14 @@
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.6.9.8\lib\net45\MySql.Data.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.Entity.6.9.8\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@ -182,6 +190,7 @@
|
||||
</Content>
|
||||
<Content Include="Areas\SSO\Content\Site.css" />
|
||||
<Content Include="Areas\SSO\Scripts\_references.js" />
|
||||
<None Include="Properties\PublishProfiles\webapi.pubxml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Infrastructure\Infrastructure.csproj">
|
||||
|
17
OpenAuth.WebApi/Properties/PublishProfiles/webapi.pubxml
Normal file
17
OpenAuth.WebApi/Properties/PublishProfiles/webapi.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
您 Web 项目的发布/打包进程将使用此文件。您可以通过编辑此 MSBuild 文件
|
||||
来自定义该进程的行为。若要了解与此相关的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkID=208121。
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<publishUrl>C:\Users\Administrator\Desktop\OpenAuth.WebApi</publishUrl>
|
||||
<DeleteExistingFiles>False</DeleteExistingFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -91,6 +91,12 @@
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||
</providers>
|
||||
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
|
||||
</provider></providers>
|
||||
</entityFramework>
|
||||
</configuration>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<remove invariant="MySql.Data.MySqlClient" />
|
||||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
||||
</DbProviderFactories>
|
||||
</system.data></configuration>
|
@ -27,6 +27,8 @@
|
||||
<package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net45" developmentDependency="true" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
|
||||
<package id="MySql.Data" version="6.9.8" targetFramework="net45" />
|
||||
<package id="MySql.Data.Entity" version="6.9.8" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
|
||||
<package id="Respond" version="1.2.0" targetFramework="net45" />
|
||||
<package id="WebGrease" version="1.5.2" targetFramework="net45" />
|
||||
|
@ -137,6 +137,7 @@
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="Scripts\bootstrap.js" />
|
||||
<Content Include="Scripts\bootstrap.min.js" />
|
||||
<None Include="Properties\PublishProfiles\webtest.pubxml" />
|
||||
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
|
||||
<Content Include="Scripts\jquery-1.10.2.js" />
|
||||
<Content Include="Scripts\jquery-1.10.2.min.js" />
|
||||
|
17
OpenAuth.WebTest/Properties/PublishProfiles/webtest.pubxml
Normal file
17
OpenAuth.WebTest/Properties/PublishProfiles/webtest.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
您 Web 项目的发布/打包进程将使用此文件。您可以通过编辑此 MSBuild 文件
|
||||
来自定义该进程的行为。若要了解与此相关的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkID=208121。
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<publishUrl>C:\Users\Administrator\Desktop\OpenAuth.WebTest</publishUrl>
|
||||
<DeleteExistingFiles>False</DeleteExistingFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user