升级.net8
This commit is contained in:
@ -70,32 +70,6 @@ namespace HT.Cloud.Web.Areas.SystemOrganize.Controllers
|
||||
public async Task<ActionResult> GetFormJson(string keyValue)
|
||||
{
|
||||
var data = await _service.GetLookForm(keyValue);
|
||||
if (!string.IsNullOrEmpty(data.F_OrganizeId))
|
||||
{
|
||||
List<string> str = new List<string>();
|
||||
foreach (var item in data.F_OrganizeId.Split(','))
|
||||
{
|
||||
var temp = await _orgService.GetForm(item);
|
||||
if (temp != null)
|
||||
{
|
||||
str.Add(temp.F_FullName);
|
||||
}
|
||||
}
|
||||
data.F_OrganizeName = string.Join(" ", str.ToArray());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data.F_RoleId))
|
||||
{
|
||||
List<string> str = new List<string>();
|
||||
foreach (var item in data.F_RoleId.Split(','))
|
||||
{
|
||||
var temp = await _roleService.GetForm(item);
|
||||
if (temp != null)
|
||||
{
|
||||
str.Add(temp.F_FullName);
|
||||
}
|
||||
}
|
||||
data.F_RoleName = string.Join(" ", str.ToArray());
|
||||
}
|
||||
return Content(data.ToJson());
|
||||
}
|
||||
|
||||
@ -104,32 +78,6 @@ namespace HT.Cloud.Web.Areas.SystemOrganize.Controllers
|
||||
public async Task<ActionResult> GetUserFormJson()
|
||||
{
|
||||
var data = await _service.GetFormExtend(_service.currentuser.UserId);
|
||||
if (!string.IsNullOrEmpty(data.F_OrganizeId))
|
||||
{
|
||||
List<string> str = new List<string>();
|
||||
foreach (var item in data.F_OrganizeId.Split(','))
|
||||
{
|
||||
var temp = await _orgService.GetForm(item);
|
||||
if (temp != null)
|
||||
{
|
||||
str.Add(temp.F_FullName);
|
||||
}
|
||||
}
|
||||
data.F_OrganizeName = string.Join(" ", str.ToArray());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(data.F_RoleId))
|
||||
{
|
||||
List<string> str = new List<string>();
|
||||
foreach (var item in data.F_RoleId.Split(','))
|
||||
{
|
||||
var temp = await _roleService.GetForm(item);
|
||||
if (temp != null)
|
||||
{
|
||||
str.Add(temp.F_FullName);
|
||||
}
|
||||
}
|
||||
data.F_RoleName = string.Join(" ", str.ToArray());
|
||||
}
|
||||
return Content(data.ToJson("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,9 @@
|
||||
return top.clients.dataItems["OrganizeCategory"][d.F_CategoryId] == null ? "" : top.clients.dataItems["OrganizeCategory"][d.F_CategoryId];
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'F_ManagerName', title: '负责人', width: 120
|
||||
},
|
||||
{
|
||||
field: 'F_EnabledMark', title: '状态', width: 80,
|
||||
templet: function (d) {
|
||||
|
@ -38,6 +38,25 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
function search(fileds) {
|
||||
layui.use(['jquery', 'form', 'common'], function () {
|
||||
var form = layui.form,
|
||||
$ = layui.$,
|
||||
common = layui.common;
|
||||
//不同弹窗
|
||||
if (fileds == '用户') {
|
||||
common.modalOpen({
|
||||
title: "选择用户",
|
||||
url: "/SystemOrganize/User/AddForm?name=" + "F_ManagerName" + "&value=" + "F_ManagerId" + "&ids=" + $('#F_ManagerId').val(),
|
||||
width: "650px",
|
||||
height: "600px",
|
||||
});
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
@ -71,6 +90,13 @@
|
||||
<input type="text" id="F_EnCode" name="F_EnCode" lay-verify="required" class="layui-input ">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-hide">
|
||||
<label class="layui-form-label">负责人</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="F_ManagerName" name="F_ManagerName" type="text" lay-verify="required" maxlength="50" autocomplete="off" class="layui-input" onclick="search('用户')" />
|
||||
<input id="F_ManagerId" name="F_ManagerId" type="text" hidden />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-hide">
|
||||
<label class="layui-form-label">显示顺序</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -76,6 +76,25 @@
|
||||
return false;
|
||||
});
|
||||
});
|
||||
function search(fileds) {
|
||||
layui.use(['jquery', 'form', 'common'], function () {
|
||||
var form = layui.form,
|
||||
$ = layui.$,
|
||||
common = layui.common;
|
||||
//不同弹窗
|
||||
if (fileds == '用户') {
|
||||
common.modalOpen({
|
||||
title: "选择用户",
|
||||
url: "/SystemOrganize/User/AddForm?name=" + "F_ManagerName" + "&value=" + "F_ManagerId" + "&ids=" + $('#F_ManagerId').val(),
|
||||
width: "650px",
|
||||
height: "600px",
|
||||
});
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
@ -109,6 +128,13 @@
|
||||
<input type="text" id="F_EnCode" name="F_EnCode" maxlength="50" lay-verify="required" class="layui-input ">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-hide">
|
||||
<label class="layui-form-label">负责人</label>
|
||||
<div class="layui-input-block">
|
||||
<input id="F_ManagerName" name="F_ManagerName" type="text" lay-verify="required" maxlength="50" autocomplete="off" class="layui-input" onclick="search('用户')" />
|
||||
<input id="F_ManagerId" name="F_ManagerId" type="text" hidden />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-hide">
|
||||
<label class="layui-form-label required">显示顺序</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -29,6 +29,9 @@
|
||||
return top.clients.dataItems["OrganizeCategory"][d.F_CategoryId] == null ? "" : top.clients.dataItems["OrganizeCategory"][d.F_CategoryId];
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'F_ManagerName', title: '负责人', width: 120, sort: true, filter: true
|
||||
},
|
||||
{
|
||||
field: 'F_EnabledMark', title: '状态', width: 80, filter: true,
|
||||
templet: function (d) {
|
||||
|
@ -38,7 +38,10 @@
|
||||
field: 'F_CompanyName', title: '公司名称', width: 150, sort: true
|
||||
},
|
||||
{
|
||||
field: 'F_OrganizeName', title: '部门名称', width: 200, sort: true
|
||||
field: 'F_OrganizeName', title: '部门名称', width: 200, sort: true
|
||||
},
|
||||
{
|
||||
field: 'F_ManagerName', title: '直属上级', width: 200, sort: true
|
||||
},
|
||||
{
|
||||
field: 'F_EnabledMark', title: '状态', width: 80, sort: true,
|
||||
|
@ -155,12 +155,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-sm6 layui-hide">
|
||||
<label class="layui-form-label">部门主管</label>
|
||||
<label class="layui-form-label">直属上级</label>
|
||||
<div class="layui-input-block">
|
||||
<select id="F_IsLeaderInDepts" name="F_IsLeaderInDepts" lay-verify="required">
|
||||
<option value="false">否</option>
|
||||
<option value="true">是</option>
|
||||
</select>
|
||||
<input id="F_ManagerName" name="F_ManagerName" type="text" lay-verify="required" maxlength="50" autocomplete="off" class="layui-input" onclick="search('部门')" />
|
||||
<input id="F_ManagerId" name="F_ManagerId" type="text" hidden />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,6 +8,15 @@
|
||||
$ = layui.$,
|
||||
common = layui.common,
|
||||
laydate = layui.laydate;
|
||||
// 自定义验证规则
|
||||
form.verify({
|
||||
pass: function (value, elem) {
|
||||
var EXP = /^[\S]{6,12}$/;
|
||||
if (value && !EXP.test(value)) {
|
||||
return '密码必须6到12位,且不能出现空格';
|
||||
}
|
||||
}
|
||||
});
|
||||
var keyValue = $.request("keyValue");
|
||||
//权限字段
|
||||
common.authorizeFields('adminform');
|
||||
@ -94,7 +103,15 @@
|
||||
else if (fileds == '部门') {
|
||||
common.modalOpen({
|
||||
title: "选择组织",
|
||||
url: "/SystemOrganize/Organize/AddForm?name=" + "F_OrganizeName" + "&value=" + "F_OrganizeId" + "&ids=" + $('#F_OrganizeId').val(),
|
||||
url: "/SystemOrganize/Organize/AddForm?name=" + "F_OrganizeName" + "&value=" + "F_OrganizeId" + "&ids=" + $('#F_OrganizeId').val() + "&managerkey=" + $('#F_ManagerId').val() + "&managername=" + $('#F_ManagerName').val(),
|
||||
width: "650px",
|
||||
height: "600px",
|
||||
});
|
||||
}
|
||||
else if (fileds == '用户') {
|
||||
common.modalOpen({
|
||||
title: "选择用户",
|
||||
url: "/SystemOrganize/User/AddForm?name=" + "F_ManagerName" + "&value=" + "F_ManagerId" + "&ids=" + $('#F_ManagerId').val(),
|
||||
width: "650px",
|
||||
height: "600px",
|
||||
});
|
||||
@ -188,18 +205,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-col-md6 layui-col-sm6 layui-hide">
|
||||
<label class="layui-form-label">微信</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="F_WeChat" name="F_WeChat" autocomplete="off" maxlength="50" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-sm6 layui-hide">
|
||||
<label class="layui-form-label">邮箱</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="F_Email" name="F_Email" autocomplete="off" lay-verify="email" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-sm6 layui-hide">
|
||||
<label class="layui-form-label">微信</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="F_WeChat" name="F_WeChat" autocomplete="off" maxlength="50" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-col-md6 layui-col-sm6 layui-hide">
|
||||
@ -212,12 +230,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-sm6 layui-hide">
|
||||
<label class="layui-form-label">部门主管</label>
|
||||
<label class="layui-form-label">直属上级</label>
|
||||
<div class="layui-input-block">
|
||||
<select id="F_IsLeaderInDepts" name="F_IsLeaderInDepts">
|
||||
<option value="false">否</option>
|
||||
<option value="true">是</option>
|
||||
</select>
|
||||
<input id="F_ManagerName" name="F_ManagerName" type="text" maxlength="50" autocomplete="off" class="layui-input" onclick="search('用户')" />
|
||||
<input id="F_ManagerId" name="F_ManagerId" type="text" hidden />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -38,9 +38,25 @@
|
||||
{
|
||||
field: 'F_OrganizeName', title: '部门名称', width: 200, sort: true
|
||||
},
|
||||
{
|
||||
field: 'F_IsLeaderInDepts', title: '部门主管', width: 120,
|
||||
templet: function (d) {
|
||||
if (d.F_IsLeaderInDepts == true) {
|
||||
return "<span class='layui-btn layui-btn-normal layui-btn-xs'>是</span>";
|
||||
} else {
|
||||
return "<span class='layui-btn layui-btn-warm layui-btn-xs'>否</span>";
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'F_ManagerName', title: '直属上级', width: 120, sort: true, filter: true
|
||||
},
|
||||
{
|
||||
field: 'F_DutyName', title: '岗位名称', width: 120, sort: true, filter: true
|
||||
},
|
||||
{
|
||||
field: 'F_RoleName', title: '角色', width: 120, sort: true
|
||||
},
|
||||
{
|
||||
field: 'F_EnabledMark', title: '状态', width: 80, sort: true, filter: true,
|
||||
templet: function (d) {
|
||||
|
@ -8,6 +8,15 @@
|
||||
$ = layui.$,
|
||||
common = layui.common,
|
||||
laydate = layui.laydate;
|
||||
// 自定义验证规则
|
||||
form.verify({
|
||||
pass: function (value, elem) {
|
||||
var EXP = /^[\S]{6,12}$/;
|
||||
if (value && !EXP.test(value)) {
|
||||
return '密码必须6到12位,且不能出现空格';
|
||||
}
|
||||
}
|
||||
});
|
||||
var keyValue = $.request("keyValue");
|
||||
//权限字段
|
||||
common.authorizeFields('useradmin');
|
||||
|
@ -13,6 +13,12 @@
|
||||
if (value != layui.$('input[name="F_UserPassword"]').val()) {
|
||||
return '密码不相同请重新输入!'
|
||||
}
|
||||
},
|
||||
pass: function (value, elem) {
|
||||
var EXP = /^[\S]{6,12}$/;
|
||||
if (value && !EXP.test(value)) {
|
||||
return '密码必须6到12位,且不能出现空格';
|
||||
}
|
||||
}
|
||||
});
|
||||
wcLoading.close();
|
||||
|
Reference in New Issue
Block a user