From 08a515946d6763b26746d593af76a8af9b1b4076 Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期五, 28 六月 2024 16:05:44 +0800
Subject: [PATCH] 操作日志
---
HTML/js/public.js | 9
Wms/Model/ModelVm/LogVm/OperationInputVm.cs | 64 ++
HTML/views/WareHouseSetting/LogOperation.html | 342 ++++++------
Wms/Utility/Extension/SqlSugarPagedExtensions.cs | 52 ++
Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs | 7
HTML/views/BaseSetting/LogOperation.html | 402 +++++++--------
Wms/Model/ModelVm/LogVm/OperationVm.cs | 2
Wms/WMS.BLL/SysServer/RoleRightServer.cs | 4
HTML/views/SystemSettings/LogOperation.html | 411 +++++++--------
Wms/WMS.BLL/LogServer/OperationSysServer.cs | 110 +--
Wms/Wms/Controllers/BasisController.cs | 115 ++-
11 files changed, 801 insertions(+), 717 deletions(-)
diff --git a/HTML/js/public.js b/HTML/js/public.js
index 4f657ef..03fbba5 100644
--- a/HTML/js/public.js
+++ b/HTML/js/public.js
@@ -332,4 +332,13 @@
}
}
});
+}
+
+var FnParseData = function (res) {
+ return {
+ "code": res.code == 200 ? 0 : res.code, // 瑙f瀽鎺ュ彛鐘舵��
+ "msg": res.msg, // 瑙f瀽鎻愮ず鏂囨湰
+ "count": res.data.Total, // 瑙f瀽鏁版嵁闀垮害
+ "data": res.data.Items // 瑙f瀽鏁版嵁鍒楄〃
+ };
}
\ No newline at end of file
diff --git a/HTML/views/BaseSetting/LogOperation.html b/HTML/views/BaseSetting/LogOperation.html
index a0dc58b..febc127 100644
--- a/HTML/views/BaseSetting/LogOperation.html
+++ b/HTML/views/BaseSetting/LogOperation.html
@@ -1,229 +1,207 @@
<!DOCTYPE html>
<html>
- <head>
- <meta charset="utf-8">
- <title>鎿嶄綔鏃ュ織</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
- <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
- <script>
- // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
- document.addEventListener("DOMContentLoaded", function() {
-
- //鑾峰彇table榛樿鏄剧ず鏁�
- pageCntFirst();
- });
- </script>
- </head>
- <body id="body">
- <div class="layui-fluid" style="padding-bottom: 0;">
- <div class="layui-card">
- <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" id="top">
- <div class="layui-form-item" >
- <div class="layui-inline">
- <label class="layui-form-label">鑿滃崟鍙�</label>
- <div class="layui-input-inline">
- <input type="text" id="MenuNo" name="MenuNo" placeholder="璇疯緭鍏ヨ彍鍗曞彿" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鑿滃崟鍚嶇О</label>
- <div class="layui-input-inline">
- <input type="text" id="MenuName" name="MenuName" placeholder="璇疯緭鍏ヨ彍鍗曞悕绉�" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鎿嶄綔鍐呭</label>
- <div class="layui-input-inline">
- <input type="text" id="Msg" name="Msg" placeholder="璇疯緭鍏ユ搷浣滃唴瀹�" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 45px;">绫诲瀷</label>
- <div class="layui-input-inline">
- <select name="Type" id="Type" lay-verify="" lay-search >
- <option value=""></option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
- </button>
+
+<head>
+ <meta charset="utf-8">
+ <title>鎿嶄綔鏃ュ織</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport"
+ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
+ <script>
+ // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
+ document.addEventListener("DOMContentLoaded", function () {
+
+ //鑾峰彇table榛樿鏄剧ず鏁�
+ pageCntFirst();
+ });
+ </script>
+</head>
+
+<body id="body">
+ <div class="layui-fluid" style="padding-bottom: 0;">
+ <div class="layui-card">
+ <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC"
+ id="top">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label">鑿滃崟鍙�</label>
+ <div class="layui-input-inline">
+ <input type="text" id="MenuNo" name="MenuNo" placeholder="璇疯緭鍏ヨ彍鍗曞彿" autocomplete="off"
+ class="layui-input">
</div>
</div>
- </div>
-
- <div id="center"></div>
-
- <div class="layui-card-body">
- <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
+ <div class="layui-inline">
+ <label class="layui-form-label">鑿滃崟鍚嶇О</label>
+ <div class="layui-input-inline">
+ <input type="text" id="MenuName" name="MenuName" placeholder="璇疯緭鍏ヨ彍鍗曞悕绉�" autocomplete="off"
+ class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鎿嶄綔鍐呭</label>
+ <div class="layui-input-inline">
+ <input type="text" id="Msg" name="Msg" placeholder="璇疯緭鍏ユ搷浣滃唴瀹�" autocomplete="off"
+ class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 45px;">绫诲瀷</label>
+ <div class="layui-input-inline">
+ <select name="Type" id="Type" lay-verify="" lay-search>
+ <option value=""></option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
+ lay-filter="LAY-app-contlist-search">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
+ </button>
+ </div>
</div>
</div>
+
+ <div id="center"></div>
+
+ <div class="layui-card-body">
+ <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
+ </div>
</div>
- <script src="../../layuiadmin/layui/layui.js"></script>
- <script src="../../js/public.js"></script>
- <script src="../../js/jquery-3.5.1.min.js"></script>
- <script src="../../js/jquery.cookie.js"></script>
- <script>
- layui.config({
- base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
- }).extend({
- index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'table', 'laypage', 'layer'], function() {
- var table = layui.table,
- form = layui.form,
- laypage = layui.laypage,
- layer = layui.layer;
+ </div>
+ <script src="../../layuiadmin/layui/layui.js"></script>
+ <script src="../../js/public.js"></script>
+ <script src="../../js/jquery-3.5.1.min.js"></script>
+ <script src="../../js/jquery.cookie.js"></script>
+ <script>
+ layui.config({
+ base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['index', 'table', 'laypage', 'layer'], function () {
+ var table = layui.table,
+ form = layui.form,
+ laypage = layui.laypage,
+ layer = layui.layer;
- var h1 = GetTableHeight();
- refreshTable("", "", "", "","");
- var tableIns;
+ var h1 = GetTableHeight();
+ var tableIns;
- //鑾峰彇绫诲瀷鑿滃崟涓嬫媺
- sendData(IP + '/Basis/GetDicTypeList?DicName=鎿嶄綔绫诲瀷',{},'get',function(res){
- if (res.code == 0) //鎴愬姛
- {
- for (var i = 0; i < res.data.length; i++)
- {
- $("#Type").append('<option value =' + res.data[i].Id + '>' + res.data[i].DictName + '</option>');
- }
- form.render('select');
+ //鑾峰彇绫诲瀷鑿滃崟涓嬫媺
+ sendData(IP + '/Basis/GetDicTypeList?DicName=鎿嶄綔绫诲瀷', {}, 'get', function (res) {
+ if (res.code == 200) //鎴愬姛
+ {
+ for (var i = 0; i < res.data.length; i++) {
+ $("#Type").append('<option value =' + res.data[i].Id + '>' + res.data[i].DictName + '</option>');
}
- else //涓嶆垚鍔�
- {
- layer.msg('鑾峰彇绫诲瀷鑿滃崟淇℃伅澶辫触锛�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
- }
- });
-
-
- function refreshTable(MenuName, Type, Msg, MenuNo,ParentNo) {
- var param = {
- MenuName: MenuName,
- Type: Type,
- Msg: Msg,
- MenuNo: MenuNo,
- ParentNo: ParentNo,
- };
- ParentNo = '鍩虹淇℃伅'; //妯″潡鍚嶇О
- var url = "/Basis/GetSysOperationList?MenuName="+MenuName+"&&Type="+Type+"&&Msg="+Msg+"&&MenuNo="+MenuNo+"&&ParentNo="+ParentNo;
- sendData(IP + url, {}, 'get', function(res) {
-
- console.log(res.data)
-
- if (res.code == 0) //鎴愬姛
- {
- var list = res.data;
- $.extend(infoOptions, {
- data: list
- });
- infoOptions.page = {
- curr: 1
- }
- tableIns = table.render(infoOptions);
-
- }
- else //涓嶆垚鍔�
- {
- layer.msg('鑾峰彇鏃ュ織鍒楄〃淇℃伅澶辫触锛�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
- }
- });
-
+ form.render('select');
}
- var xml = '';
- function getchiled(data, mainId) {
- if (data)
- {
- var list = data.filter(item => item.ParentId == mainId);
- if (list)
- {
- for (var i = 0; i < list.length; i++)
- {
- var id = list[i].Id;
- //鏌ヨ鏈夋棤瀛愯彍鍗�
- var count = data.filter(item => item.ParentId == id).length;
- if (count > 0)
- {
- xml = xml + '<dd>' + '<a href="javascript:;">' + list[i].Name + '</a>' + '<dl class="layui-nav-child">';
- getchiled(data, id);
- xml = xml + '</dl></dd>';
- }
- else
- {
- xml = xml + '<dd>' + '<a lay-href="' + list[i].Url + '">' + list[i].Name + '</a>' + '</dd>';
- }
- }
- }
+ else //涓嶆垚鍔�
+ {
+ layer.msg('鑾峰彇绫诲瀷鑿滃崟淇℃伅澶辫触锛�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ var TotalColsArr = [[
+ {
+ title: '搴忓彿', type: 'numbers', fixed: 'left', width: 65
+ },
+ {
+ field: 'ParentNo', title: '妯″潡鍙�', align: 'center', fixed: 'left', width: 80
+ },
+ {
+ field: 'MenuNo', title: '鑿滃崟鍙�', align: 'center', fixed: 'left', width: 80
+ },
+ {
+ field: 'MenuName', title: '鑿滃崟鍚嶇О', align: 'center', width: 190
+ },
+ {
+ field: 'FkNo', title: '鏁版嵁缂栧彿', align: 'center', width: 180
+ },
+ {
+ field: 'TypeName', title: '绫诲瀷', align: 'center', width: 100
+ },
+ {
+ field: 'Msg', title: '鎿嶄綔鍐呭', align: 'center'
+ },
+ {
+ field: 'CreateUserName', title: '鎿嶄綔浜�', align: 'center', width: 120
+ },
+ {
+ field: 'CreateTime', title: '鎿嶄綔鏃堕棿', align: 'center', width: 160,
+ templet: function (d) {
+ return formatDate(d.CreateTime);
}
}
- var infoOptions = {
- elem: '#LAY-app-content-list',
- height: h1,
- id: 'LAY-app-content-list',
- page: true,
- limit: pageCnt,
- limits: pageLimits,
- even: true,
- cols:
- [[
- {
- title: '搴忓彿', type: 'numbers', fixed: 'left', width:65
- },
- {
- field: 'ParentNo', title: '妯″潡鍙�', align: 'center', fixed: 'left', width:80
- },
- {
- field: 'MenuNo', title: '鑿滃崟鍙�', align: 'center', fixed: 'left', width:80
- },
- {
- field: 'MenuName', title: '鑿滃崟鍚嶇О', align: 'center', width:190
- },
- {
- field: 'FkNo', title: '鏁版嵁缂栧彿', align: 'center', width:180
- },
- {
- field: 'TypeName', title: '绫诲瀷', align: 'center', width:100
- },
- {
- field: 'Msg', title: '鎿嶄綔鍐呭', align: 'center'
- },
- {
- field: 'CreateUserName', title: '鎿嶄綔浜�', align: 'center', width:120
- },
- {
- field: 'CreateTime', title: '鎿嶄綔鏃堕棿', align: 'center', width:160,
- templet: function (d) {
- return formatDate(d.CreateTime);
- }
+ ]];
+ var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+ function objectToQueryString(obj) {
+ var queryString = '';
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ if (queryString.length > 0) {
+ queryString += '&';
}
- ]]
- };
- //鐩戝惉鎼滅储
- form.on('submit(LAY-app-contlist-search)', function(data) {
- console.log(data)
- var MenuName = data.field.MenuName;
- var Type = data.field.Type;
- var Msg = data.field.Msg;
- var MenuNo = data.field.MenuNo;
- //MenuName, Type, Msg, MenuNo,ParentNo
- refreshTable(MenuName, Type, Msg, MenuNo);
- });
+ queryString += encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]);
+ }
+ }
+ return queryString;
+ }
+ // 鍒涘缓娓叉煋瀹炰緥
+ tableIns = table.render({
+ elem: '#LAY-app-content-list',
+ url: IP + "/Basis/GetSysOperationList",
+ method: 'post',
+ height: GetTableHeight(),
+ id: 'LAY-app-content-list',
+ where: {
+ MenuName: $("#MenuName").val(),
+ Type: $("#Type").val(),
+ Msg: $("#Msg").val(),
+ MenuNo: $("#MenuNo").val(),
+ ParentNo: '鍩虹淇℃伅',
+ },
+ parseData: FnParseData,
+ contentType: 'application/json',
+ defaultToolbar: [],
+ headers: { ToKen: $.cookie('token') },
+ page: true,
+ even: true,
+ limit: pageCnt,
+ limits: pageLimits,
+ cellMinWidth: 60,
+ done: function (res) {
+ //鑷畾涔夊垪瀹�
+ SetTableColW('LAY-app-content-list', 'Basis/GetSysOperationList', TotalColsSysArr);
+ },
+ cols: TotalColsArr
+ });
- var doing = true;
-
- $('.layui-btn.layuiadmin-btn-list').on('click', function() {
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
+ //鐩戝惉鎼滅储
+ form.on('submit(LAY-app-contlist-search)', function (data) {
+ table.reload('LAY-app-content-list', {
+ where: {
+ MenuName: $("#MenuName").val(),
+ Type: $("#Type").val(),
+ Msg: $("#Msg").val(),
+ MenuNo: $("#MenuNo").val(),
+ ParentNo: '鍩虹淇℃伅',
+ }
});
});
- </script>
- </body>
-</html>
+
+ var doing = true;
+
+ $('.layui-btn.layuiadmin-btn-list').on('click', function () {
+ var type = $(this).data('type');
+ active[type] ? active[type].call(this) : '';
+ });
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/HTML/views/SystemSettings/LogOperation.html b/HTML/views/SystemSettings/LogOperation.html
index ba320c4..3bd3ee6 100644
--- a/HTML/views/SystemSettings/LogOperation.html
+++ b/HTML/views/SystemSettings/LogOperation.html
@@ -1,228 +1,207 @@
<!DOCTYPE html>
<html>
- <head>
- <meta charset="utf-8">
- <title>鐢ㄦ埛淇℃伅鍒楄〃</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
- <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
- <script>
- // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
- document.addEventListener("DOMContentLoaded", function() {
-
- //鑾峰彇table榛樿鏄剧ず鏁�
- pageCntFirst();
- });
- </script>
- </head>
- <body id="body">
- <div class="layui-fluid" style="padding-bottom: 0; ">
- <div class="layui-card">
- <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" id="top">
- <div class="layui-form-item" >
- <div class="layui-inline">
- <label class="layui-form-label">鑿滃崟鍙�</label>
- <div class="layui-input-inline">
- <input type="text" id="MenuNo" name="MenuNo" placeholder="璇疯緭鍏ヨ彍鍗曞彿" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鑿滃崟鍚嶇О</label>
- <div class="layui-input-inline">
- <input type="text" id="MenuName" name="MenuName" placeholder="璇疯緭鍏ヨ彍鍗曞悕绉�" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鎿嶄綔鍐呭</label>
- <div class="layui-input-inline">
- <input type="text" id="Msg" name="Msg" placeholder="璇疯緭鍏ユ搷浣滃唴瀹�" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 45px;">绫诲瀷</label>
- <div class="layui-input-inline">
- <select name="Type" id="Type" lay-verify="" lay-search >
- <option value=""></option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
- </button>
+
+<head>
+ <meta charset="utf-8">
+ <title>鎿嶄綔鏃ュ織</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport"
+ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
+ <script>
+ // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
+ document.addEventListener("DOMContentLoaded", function () {
+
+ //鑾峰彇table榛樿鏄剧ず鏁�
+ pageCntFirst();
+ });
+ </script>
+</head>
+
+<body id="body">
+ <div class="layui-fluid" style="padding-bottom: 0;">
+ <div class="layui-card">
+ <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC"
+ id="top">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label">鑿滃崟鍙�</label>
+ <div class="layui-input-inline">
+ <input type="text" id="MenuNo" name="MenuNo" placeholder="璇疯緭鍏ヨ彍鍗曞彿" autocomplete="off"
+ class="layui-input">
</div>
</div>
- </div>
-
- <div id="center"></div>
-
- <div class="layui-card-body">
- <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
+ <div class="layui-inline">
+ <label class="layui-form-label">鑿滃崟鍚嶇О</label>
+ <div class="layui-input-inline">
+ <input type="text" id="MenuName" name="MenuName" placeholder="璇疯緭鍏ヨ彍鍗曞悕绉�" autocomplete="off"
+ class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鎿嶄綔鍐呭</label>
+ <div class="layui-input-inline">
+ <input type="text" id="Msg" name="Msg" placeholder="璇疯緭鍏ユ搷浣滃唴瀹�" autocomplete="off"
+ class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 45px;">绫诲瀷</label>
+ <div class="layui-input-inline">
+ <select name="Type" id="Type" lay-verify="" lay-search>
+ <option value=""></option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
+ lay-filter="LAY-app-contlist-search">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
+ </button>
+ </div>
</div>
</div>
+
+ <div id="center"></div>
+
+ <div class="layui-card-body">
+ <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
+ </div>
</div>
- <script src="../../layuiadmin/layui/layui.js"></script>
- <script src="../../js/public.js"></script>
- <script src="../../js/jquery-3.5.1.min.js"></script>
- <script src="../../js/jquery.cookie.js"></script>
- <script>
- layui.config({
- base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
- }).extend({
- index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'table', 'laypage', 'layer'], function() {
- var table = layui.table,
- form = layui.form,
- laypage = layui.laypage,
- layer = layui.layer;
- var h1 = GetTableHeight();
- refreshTable("", "", "", "","");
- var tableIns;
+ </div>
+ <script src="../../layuiadmin/layui/layui.js"></script>
+ <script src="../../js/public.js"></script>
+ <script src="../../js/jquery-3.5.1.min.js"></script>
+ <script src="../../js/jquery.cookie.js"></script>
+ <script>
+ layui.config({
+ base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['index', 'table', 'laypage', 'layer'], function () {
+ var table = layui.table,
+ form = layui.form,
+ laypage = layui.laypage,
+ layer = layui.layer;
- //鑾峰彇绫诲瀷鑿滃崟涓嬫媺
- sendData(IP + '/Basis/GetDicTypeList?DicName=鎿嶄綔绫诲瀷',{},'get',function(res){
- if (res.code == 0) //鎴愬姛
- {
- for (var i = 0; i < res.data.length; i++)
- {
- $("#Type").append('<option value =' + res.data[i].Id + '>' + res.data[i].DictName + '</option>');
- }
- form.render('select');
+ var h1 = GetTableHeight();
+ var tableIns;
+
+ //鑾峰彇绫诲瀷鑿滃崟涓嬫媺
+ sendData(IP + '/Basis/GetDicTypeList?DicName=鎿嶄綔绫诲瀷', {}, 'get', function (res) {
+ if (res.code == 200) //鎴愬姛
+ {
+ for (var i = 0; i < res.data.length; i++) {
+ $("#Type").append('<option value =' + res.data[i].Id + '>' + res.data[i].DictName + '</option>');
}
- else //涓嶆垚鍔�
- {
- layer.msg('鑾峰彇绫诲瀷鑿滃崟淇℃伅澶辫触锛�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
- }
- });
-
-
- function refreshTable(MenuName, Type, Msg, MenuNo,ParentNo) {
- var param = {
- MenuName: MenuName,
- Type: Type,
- Msg: Msg,
- MenuNo: MenuNo,
- ParentNo: ParentNo,
- };
- ParentNo = '绯荤粺璁剧疆'; //妯″潡鍚嶇О
- var url = "/Basis/GetSysOperationList?MenuName="+MenuName+"&&Type="+Type+"&&Msg="+Msg+"&&MenuNo="+MenuNo+"&&ParentNo="+ParentNo;
- sendData(IP + url, {}, 'get', function(res) {
-
- // console.log(res.data)
-
- if (res.code == 0) //鎴愬姛
- {
- var list = res.data;
- $.extend(infoOptions, {
- data: list
- });
- infoOptions.page = {
- curr: 1
- }
- tableIns = table.render(infoOptions);
-
- }
- else //涓嶆垚鍔�
- {
- layer.msg('鑾峰彇鏃ュ織鍒楄〃淇℃伅澶辫触锛�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
- }
- });
-
+ form.render('select');
}
- var xml = '';
- function getchiled(data, mainId) {
- if (data)
- {
- var list = data.filter(item => item.ParentId == mainId);
- if (list)
- {
- for (var i = 0; i < list.length; i++)
- {
- var id = list[i].Id;
- //鏌ヨ鏈夋棤瀛愯彍鍗�
- var count = data.filter(item => item.ParentId == id).length;
- if (count > 0)
- {
- xml = xml + '<dd>' + '<a href="javascript:;">' + list[i].Name + '</a>' + '<dl class="layui-nav-child">';
- getchiled(data, id);
- xml = xml + '</dl></dd>';
- }
- else
- {
- xml = xml + '<dd>' + '<a lay-href="' + list[i].Url + '">' + list[i].Name + '</a>' + '</dd>';
- }
- }
- }
- }
+ else //涓嶆垚鍔�
+ {
+ layer.msg('鑾峰彇绫诲瀷鑿滃崟淇℃伅澶辫触锛�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
}
- var infoOptions = {
- elem: '#LAY-app-content-list',
- height: h1,
- id: 'LAY-app-content-list',
- page: true,
- limit: pageCnt,
- limits: pageLimits,
- even: true,
- cols:
- [[
- {
- title: '搴忓彿', type: 'numbers', fixed: 'left', width:65
- },
- {
- field: 'ParentNo', title: '妯″潡鍙�', align: 'center', fixed: 'left', width:80
- },
- {
- field: 'MenuNo', title: '鑿滃崟鍙�', align: 'center', fixed: 'left', width:80
- },
- {
- field: 'MenuName', title: '鑿滃崟鍚嶇О', align: 'center', width:190
- },
- {
- field: 'FkNo', title: '鏁版嵁缂栧彿', align: 'center', width:180
- },
- {
- field: 'TypeName', title: '绫诲瀷', align: 'center', width:100
- },
- {
- field: 'Msg', title: '鎿嶄綔鍐呭', align: 'center'
- },
- {
- field: 'CreateUserName', title: '鎿嶄綔浜�', align: 'center', width: 120
- },
- {
- field: 'CreateTime', title: '鎿嶄綔鏃堕棿', align: 'center', width:160,
- templet: function (d) {
- return formatDate(d.CreateTime);
- }
- }
- ]]
- };
- //鐩戝惉鎼滅储
- form.on('submit(LAY-app-contlist-search)', function(data) {
- // console.log(data)
- var MenuName = data.field.MenuName;
- var Type = data.field.Type;
- var Msg = data.field.Msg;
- var MenuNo = data.field.MenuNo;
- //MenuName, Type, Msg, MenuNo,ParentNo
- refreshTable(MenuName, Type, Msg, MenuNo);
- });
-
- var doing = true;
-
- // $('.layui-btn.layuiadmin-btn-list').on('click', function() {
- // var type = $(this).data('type');
- // active[type] ? active[type].call(this) : '';
- // });
});
- </script>
- </body>
-</html>
+ var TotalColsArr = [[
+ {
+ title: '搴忓彿', type: 'numbers', fixed: 'left', width: 65
+ },
+ {
+ field: 'ParentNo', title: '妯″潡鍙�', align: 'center', fixed: 'left', width: 80
+ },
+ {
+ field: 'MenuNo', title: '鑿滃崟鍙�', align: 'center', fixed: 'left', width: 80
+ },
+ {
+ field: 'MenuName', title: '鑿滃崟鍚嶇О', align: 'center', width: 190
+ },
+ {
+ field: 'FkNo', title: '鏁版嵁缂栧彿', align: 'center', width: 180
+ },
+ {
+ field: 'TypeName', title: '绫诲瀷', align: 'center', width: 100
+ },
+ {
+ field: 'Msg', title: '鎿嶄綔鍐呭', align: 'center'
+ },
+ {
+ field: 'CreateUserName', title: '鎿嶄綔浜�', align: 'center', width: 120
+ },
+ {
+ field: 'CreateTime', title: '鎿嶄綔鏃堕棿', align: 'center', width: 160,
+ templet: function (d) {
+ return formatDate(d.CreateTime);
+ }
+ }
+ ]];
+ var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+ function objectToQueryString(obj) {
+ var queryString = '';
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ if (queryString.length > 0) {
+ queryString += '&';
+ }
+ queryString += encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]);
+ }
+ }
+ return queryString;
+ }
+ // 鍒涘缓娓叉煋瀹炰緥
+ tableIns = table.render({
+ elem: '#LAY-app-content-list',
+ url: IP + "/Basis/GetSysOperationList",
+ method: 'post',
+ height: GetTableHeight(),
+ id: 'LAY-app-content-list',
+ where: {
+ MenuName: $("#MenuName").val(),
+ Type: $("#Type").val(),
+ Msg: $("#Msg").val(),
+ MenuNo: $("#MenuNo").val(),
+ ParentNo: '绯荤粺璁剧疆',
+ },
+ parseData: FnParseData,
+ contentType: 'application/json',
+ defaultToolbar: [],
+ headers: { ToKen: $.cookie('token') },
+ page: true,
+ even: true,
+ limit: pageCnt,
+ limits: pageLimits,
+ cellMinWidth: 60,
+ done: function (res) {
+ //鑷畾涔夊垪瀹�
+ SetTableColW('LAY-app-content-list', 'Basis/GetSysOperationList', TotalColsSysArr);
+ },
+ cols: TotalColsArr
+ });
+
+ //鐩戝惉鎼滅储
+ form.on('submit(LAY-app-contlist-search)', function (data) {
+ table.reload('LAY-app-content-list', {
+ where: {
+ MenuName: $("#MenuName").val(),
+ Type: $("#Type").val(),
+ Msg: $("#Msg").val(),
+ MenuNo: $("#MenuNo").val(),
+ ParentNo: '绯荤粺璁剧疆',
+ }
+ });
+ });
+
+ var doing = true;
+
+ $('.layui-btn.layuiadmin-btn-list').on('click', function () {
+ var type = $(this).data('type');
+ active[type] ? active[type].call(this) : '';
+ });
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/HTML/views/WareHouseSetting/LogOperation.html b/HTML/views/WareHouseSetting/LogOperation.html
index 652eb1b..dd6a819 100644
--- a/HTML/views/WareHouseSetting/LogOperation.html
+++ b/HTML/views/WareHouseSetting/LogOperation.html
@@ -1,223 +1,207 @@
<!DOCTYPE html>
<html>
- <head>
- <meta charset="utf-8">
- <title>浠撳簱璁剧疆鎿嶄綔鏃ュ織</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
- <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
- <script>
- // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
- document.addEventListener("DOMContentLoaded", function() {
-
- //鑾峰彇table榛樿鏄剧ず鏁�
- pageCntFirst();
- });
- </script>
- </head>
- <body>
- <div class="layui-card" style="padding-bottom: 0">
- <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC">
- <div class="layui-form-item" >
+
+<head>
+ <meta charset="utf-8">
+ <title>鎿嶄綔鏃ュ織</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport"
+ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
+ <script>
+ // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
+ document.addEventListener("DOMContentLoaded", function () {
+
+ //鑾峰彇table榛樿鏄剧ず鏁�
+ pageCntFirst();
+ });
+ </script>
+</head>
+
+<body id="body">
+ <div class="layui-fluid" style="padding-bottom: 0;">
+ <div class="layui-card">
+ <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC"
+ id="top">
+ <div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">鑿滃崟鍙�</label>
<div class="layui-input-inline">
- <input type="text" id="MenuNo" name="MenuNo" placeholder="璇疯緭鍏ヨ彍鍗曞彿" autocomplete="off" class="layui-input">
+ <input type="text" id="MenuNo" name="MenuNo" placeholder="璇疯緭鍏ヨ彍鍗曞彿" autocomplete="off"
+ class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">鑿滃崟鍚嶇О</label>
<div class="layui-input-inline">
- <input type="text" id="MenuName" name="MenuName" placeholder="璇疯緭鍏ヨ彍鍗曞悕绉�" autocomplete="off" class="layui-input">
+ <input type="text" id="MenuName" name="MenuName" placeholder="璇疯緭鍏ヨ彍鍗曞悕绉�" autocomplete="off"
+ class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">鎿嶄綔鍐呭</label>
<div class="layui-input-inline">
- <input type="text" id="Msg" name="Msg" placeholder="璇疯緭鍏ユ搷浣滃唴瀹�" autocomplete="off" class="layui-input">
+ <input type="text" id="Msg" name="Msg" placeholder="璇疯緭鍏ユ搷浣滃唴瀹�" autocomplete="off"
+ class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 45px;">绫诲瀷</label>
<div class="layui-input-inline">
- <select name="Type" id="Type" lay-verify="" lay-search >
+ <select name="Type" id="Type" lay-verify="" lay-search>
<option value=""></option>
</select>
</div>
</div>
<div class="layui-inline">
- <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search">
+ <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
+ lay-filter="LAY-app-contlist-search">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
</button>
</div>
</div>
</div>
+
+ <div id="center"></div>
+
<div class="layui-card-body">
<table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
</div>
</div>
- <script src="../../layuiadmin/layui/layui.js"></script>
- <script src="../../js/public.js"></script>
- <script src="../../js/jquery-3.5.1.min.js"></script>
- <script src="../../js/jquery.cookie.js"></script>
- <script>
- layui.config({
- base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
- }).extend({
- index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'table', 'laypage', 'layer'], function() {
- var table = layui.table,
- form = layui.form,
- laypage = layui.laypage,
- layer = layui.layer;
+ </div>
+ <script src="../../layuiadmin/layui/layui.js"></script>
+ <script src="../../js/public.js"></script>
+ <script src="../../js/jquery-3.5.1.min.js"></script>
+ <script src="../../js/jquery.cookie.js"></script>
+ <script>
+ layui.config({
+ base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['index', 'table', 'laypage', 'layer'], function () {
+ var table = layui.table,
+ form = layui.form,
+ laypage = layui.laypage,
+ layer = layui.layer;
- refreshTable("", "", "", "","");
- var tableIns;
+ var h1 = GetTableHeight();
+ var tableIns;
- //鑾峰彇绫诲瀷鑿滃崟涓嬫媺
- sendData(IP + '/Basis/GetDicTypeList?DicName=鎿嶄綔绫诲瀷',{},'get',function(res){
- if (res.code == 0) //鎴愬姛
- {
- for (var i = 0; i < res.data.length; i++)
- {
- $("#Type").append('<option value =' + res.data[i].Id + '>' + res.data[i].DictName + '</option>');
- }
- form.render('select');
+ //鑾峰彇绫诲瀷鑿滃崟涓嬫媺
+ sendData(IP + '/Basis/GetDicTypeList?DicName=鎿嶄綔绫诲瀷', {}, 'get', function (res) {
+ if (res.code == 200) //鎴愬姛
+ {
+ for (var i = 0; i < res.data.length; i++) {
+ $("#Type").append('<option value =' + res.data[i].Id + '>' + res.data[i].DictName + '</option>');
}
- else //涓嶆垚鍔�
- {
- layer.msg('鑾峰彇绫诲瀷鑿滃崟淇℃伅澶辫触锛�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
- }
- });
-
-
- function refreshTable(MenuName, Type, Msg, MenuNo,ParentNo) {
- var param = {
- MenuName: MenuName,
- Type: Type,
- Msg: Msg,
- MenuNo: MenuNo,
- ParentNo: ParentNo,
- };
- ParentNo = '浠撳簱璁剧疆'; //妯″潡鍚嶇О
- var url = "/Basis/GetSysOperationList?MenuName="+MenuName+"&&Type="+Type+"&&Msg="+Msg+"&&MenuNo="+MenuNo+"&&ParentNo="+ParentNo;
- sendData(IP + url, {}, 'get', function(res) {
-
- console.log(res.data)
-
- if (res.code == 0) //鎴愬姛
- {
- var list = res.data;
- $.extend(infoOptions, {
- data: list
- });
- infoOptions.page = {
- curr: 1
- }
- tableIns = table.render(infoOptions);
-
- }
- else //涓嶆垚鍔�
- {
- layer.msg('鑾峰彇鏃ュ織鍒楄〃淇℃伅澶辫触锛�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
- }
- });
-
+ form.render('select');
}
- var xml = '';
- function getchiled(data, mainId) {
- if (data)
- {
- var list = data.filter(item => item.ParentId == mainId);
- if (list)
- {
- for (var i = 0; i < list.length; i++)
- {
- var id = list[i].Id;
- //鏌ヨ鏈夋棤瀛愯彍鍗�
- var count = data.filter(item => item.ParentId == id).length;
- if (count > 0)
- {
- xml = xml + '<dd>' + '<a href="javascript:;">' + list[i].Name + '</a>' + '<dl class="layui-nav-child">';
- getchiled(data, id);
- xml = xml + '</dl></dd>';
- }
- else
- {
- xml = xml + '<dd>' + '<a lay-href="' + list[i].Url + '">' + list[i].Name + '</a>' + '</dd>';
- }
- }
- }
+ else //涓嶆垚鍔�
+ {
+ layer.msg('鑾峰彇绫诲瀷鑿滃崟淇℃伅澶辫触锛�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ var TotalColsArr = [[
+ {
+ title: '搴忓彿', type: 'numbers', fixed: 'left', width: 65
+ },
+ {
+ field: 'ParentNo', title: '妯″潡鍙�', align: 'center', fixed: 'left', width: 80
+ },
+ {
+ field: 'MenuNo', title: '鑿滃崟鍙�', align: 'center', fixed: 'left', width: 80
+ },
+ {
+ field: 'MenuName', title: '鑿滃崟鍚嶇О', align: 'center', width: 190
+ },
+ {
+ field: 'FkNo', title: '鏁版嵁缂栧彿', align: 'center', width: 180
+ },
+ {
+ field: 'TypeName', title: '绫诲瀷', align: 'center', width: 100
+ },
+ {
+ field: 'Msg', title: '鎿嶄綔鍐呭', align: 'center'
+ },
+ {
+ field: 'CreateUserName', title: '鎿嶄綔浜�', align: 'center', width: 120
+ },
+ {
+ field: 'CreateTime', title: '鎿嶄綔鏃堕棿', align: 'center', width: 160,
+ templet: function (d) {
+ return formatDate(d.CreateTime);
}
}
- var infoOptions = {
- elem: '#LAY-app-content-list',
- height: 'full-88',
- id: 'LAY-app-content-list',
- page: true,
- limit: pageCnt,
- limits: pageLimits,
- even: true,
- cols:
- [[
- {
- title: '搴忓彿', type: 'numbers', fixed: 'left', width:65
- },
- {
- field: 'ParentNo', title: '妯″潡鍙�', align: 'center', fixed: 'left', width:80
- },
- {
- field: 'MenuNo', title: '鑿滃崟鍙�', align: 'center', fixed: 'left', width:80
- },
- {
- field: 'MenuName', title: '鑿滃崟鍚嶇О', align: 'center', width:190
- },
- {
- field: 'FkNo', title: '鏁版嵁缂栧彿', align: 'center', width:180
- },
- {
- field: 'TypeName', title: '绫诲瀷', align: 'center', width:100
- },
- {
- field: 'Msg', title: '鎿嶄綔鍐呭', align: 'center'
- },
- {
- field: 'CreateUserName', title: '鎿嶄綔浜�', align: 'center', width: 120
- },
- {
- field: 'CreateTime', title: '鎿嶄綔鏃堕棿', align: 'center', width:160,
- templet: function (d) {
- return formatDate(d.CreateTime);
- }
+ ]];
+ var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+ function objectToQueryString(obj) {
+ var queryString = '';
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ if (queryString.length > 0) {
+ queryString += '&';
}
- ]]
- };
- //鐩戝惉鎼滅储
- form.on('submit(LAY-app-contlist-search)', function(data) {
- console.log(data)
- var MenuName = data.field.MenuName;
- var Type = data.field.Type;
- var Msg = data.field.Msg;
- var MenuNo = data.field.MenuNo;
- //MenuName, Type, Msg, MenuNo,ParentNo
- refreshTable(MenuName, Type, Msg, MenuNo);
- });
+ queryString += encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]);
+ }
+ }
+ return queryString;
+ }
+ // 鍒涘缓娓叉煋瀹炰緥
+ tableIns = table.render({
+ elem: '#LAY-app-content-list',
+ url: IP + "/Basis/GetSysOperationList",
+ method: 'post',
+ height: GetTableHeight(),
+ id: 'LAY-app-content-list',
+ where: {
+ MenuName: $("#MenuName").val(),
+ Type: $("#Type").val(),
+ Msg: $("#Msg").val(),
+ MenuNo: $("#MenuNo").val(),
+ ParentNo: '浠撳簱璁剧疆',
+ },
+ parseData: FnParseData,
+ contentType: 'application/json',
+ defaultToolbar: [],
+ headers: { ToKen: $.cookie('token') },
+ page: true,
+ even: true,
+ limit: pageCnt,
+ limits: pageLimits,
+ cellMinWidth: 60,
+ done: function (res) {
+ //鑷畾涔夊垪瀹�
+ SetTableColW('LAY-app-content-list', 'Basis/GetSysOperationList', TotalColsSysArr);
+ },
+ cols: TotalColsArr
+ });
- var doing = true;
-
- $('.layui-btn.layuiadmin-btn-list').on('click', function() {
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
+ //鐩戝惉鎼滅储
+ form.on('submit(LAY-app-contlist-search)', function (data) {
+ table.reload('LAY-app-content-list', {
+ where: {
+ MenuName: $("#MenuName").val(),
+ Type: $("#Type").val(),
+ Msg: $("#Msg").val(),
+ MenuNo: $("#MenuNo").val(),
+ ParentNo: '浠撳簱璁剧疆',
+ }
});
});
- </script>
- </body>
-</html>
+
+ var doing = true;
+
+ $('.layui-btn.layuiadmin-btn-list').on('click', function () {
+ var type = $(this).data('type');
+ active[type] ? active[type].call(this) : '';
+ });
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/Wms/Model/ModelVm/LogVm/OperationInputVm.cs b/Wms/Model/ModelVm/LogVm/OperationInputVm.cs
new file mode 100644
index 0000000..8bdc5a4
--- /dev/null
+++ b/Wms/Model/ModelVm/LogVm/OperationInputVm.cs
@@ -0,0 +1,64 @@
+锘縰sing System;
+
+namespace Model.ModelVm.LogVm
+{
+ public class OperationInputVm
+ {
+ public int Id { get; set; }
+ /// <summary>
+ /// 妯″潡鍙�
+ /// </summary>
+ public string ParentNo { get; set; }
+ /// <summary>
+ /// 妯″潡鍙�
+ /// </summary>
+ public string ParentName { get; set; }
+ /// <summary>
+ /// 鑿滃崟鍙�
+ /// </summary>
+ public string MenuNo { get; set; }
+ /// <summary>
+ /// 鑿滃崟鍚嶇О
+ /// </summary>
+ public string MenuName { get; set; }
+ /// <summary>
+ /// 鏁版嵁缂栧彿 鑿滃崟琛�.缂栧彿
+ /// </summary>
+ public string FkNo { get; set; }
+ /// <summary>
+ /// 绫诲瀷ID 娣诲姞 淇敼 鍒犻櫎 鍋滅敤 鍚敤
+ /// </summary>
+ public string Type { get; set; }
+ /// <summary>
+ /// 绫诲瀷鍚嶇О
+ /// </summary>
+ public string TypeName { get; set; }
+ /// <summary>
+ /// 鎿嶄綔鍐呭
+ /// </summary>
+ public string Msg { get; set; }
+ /// <summary>
+ /// 鍒涘缓鏃ユ湡
+ /// </summary>
+ public DateTime CreateTime { get; set; }
+
+ /// <summary>
+ /// 鏇存柊鏃ユ湡
+ /// </summary>
+ public string UpdateTime { get; set; }
+
+ /// <summary>
+ /// 鍒涘缓浜�
+ /// </summary>
+ public int CreateUser { get; set; }
+ /// <summary>
+ /// 鍒涘缓浜�
+ /// </summary>
+ public string CreateUserName { get; set; }
+
+ /// <summary>
+ /// 鏇存柊浜�
+ /// </summary>
+ public string UpdateUserName { get; set; }
+ }
+}
diff --git a/Wms/Model/ModelVm/LogVm/OperationVm.cs b/Wms/Model/ModelVm/LogVm/OperationVm.cs
index 678f61e..34573bf 100644
--- a/Wms/Model/ModelVm/LogVm/OperationVm.cs
+++ b/Wms/Model/ModelVm/LogVm/OperationVm.cs
@@ -6,6 +6,8 @@
{
public class GetOperationVm:IndexPage
{
+ public string MenuNo { get; set; }
+ public string ParentNo { get; set; }
public string MenuName { get; set; }
public string Type { get; set; }
public string Msg { get; set; }
diff --git a/Wms/Utility/Extension/SqlSugarPagedExtensions.cs b/Wms/Utility/Extension/SqlSugarPagedExtensions.cs
new file mode 100644
index 0000000..697f375
--- /dev/null
+++ b/Wms/Utility/Extension/SqlSugarPagedExtensions.cs
@@ -0,0 +1,52 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Utility
+{
+ public class SqlSugarPagedList<TEntity> where TEntity : new()
+ {
+ /// <summary>
+ /// 鎬绘潯鏁�
+ /// </summary>
+ public int Total { get; set; }
+
+ /// <summary>
+ /// 鎬婚〉鏁�
+ /// </summary>
+ public int TotalPages { get; set; }
+
+ /// <summary>
+ /// 褰撳墠椤甸泦鍚�
+ /// </summary>
+ public IEnumerable<TEntity> Items { get; set; }
+ }
+ /// <summary>
+ /// 鍒嗛〉鎷撳睍绫�
+ /// </summary>
+ public static class SqlSugarPagedExtensions
+ {
+ /// <summary>
+ /// 鍒嗛〉鎷撳睍
+ /// </summary>
+ /// <param name="query"><see cref="ISugarQueryable{TEntity}"/>瀵硅薄</param>
+ /// <param name="pageIndex">褰撳墠椤电爜锛屼粠1寮�濮�</param>
+ /// <param name="pageSize">椤电爜瀹归噺</param>
+ /// <returns></returns>
+ public static async Task<SqlSugarPagedList<TEntity>> ToPagedListAsync<TEntity>(this ISugarQueryable<TEntity> query, int pageIndex, int pageSize)
+ where TEntity : new()
+ {
+ RefAsync<int> total = 0;
+ var items = await query.ToPageListAsync(pageIndex, pageSize, total);
+ var totalPages = pageSize > 0 ? (int)Math.Ceiling(total / (double)pageSize) : 0;
+ return new SqlSugarPagedList<TEntity>
+ {
+ Items = items,
+ Total = total,
+ TotalPages = totalPages,
+ };
+ }
+ }
+}
diff --git a/Wms/WMS.BLL/LogServer/OperationSysServer.cs b/Wms/WMS.BLL/LogServer/OperationSysServer.cs
index abbf1fa..b22d150 100644
--- a/Wms/WMS.BLL/LogServer/OperationSysServer.cs
+++ b/Wms/WMS.BLL/LogServer/OperationSysServer.cs
@@ -6,7 +6,9 @@
using System.Threading.Tasks;
using AutoMapper;
using Model.ModelDto.LogDto;
+using Model.ModelVm.LogVm;
using SqlSugar;
+using Utility;
using WMS.DAL;
using WMS.Entity.Context;
using WMS.Entity.LogEntity;
@@ -21,67 +23,18 @@
private readonly IOperationSysRepository _operation;
private readonly IMapper _mapper;
private static readonly SqlSugarScope Db = DataContext.Db;
+ private readonly UserManager _userManager;
/// <summary>
/// 鏋勯�犲嚱鏁�
/// </summary>
/// <param name="operation">鏃ュ織</param>
/// <param name="mapper">automapper</param>
- public OperationSysServer(IOperationSysRepository operation, IMapper mapper) : base(Db)
+ public OperationSysServer(IOperationSysRepository operation, IMapper mapper, UserManager userManager) : base(Db)
{
_operation = operation; //鏃ュ織
_mapper = mapper; //automapper
+ _userManager = userManager;
}
-
-
- ///// <summary>
- ///// 鏌ヨ鎿嶄綔鏃ュ織
- ///// </summary>
- ///// <param name="menuName">鑿滃崟鍚嶇О</param>
- ///// <param name="type">绫诲瀷</param>
- ///// <param name="msg">鍐呭</param>
- ///// <param name="startTime">寮�濮嬫棩鏈�</param>
- ///// <param name="endTime">缁撴潫鏃ユ湡</param>
- ///// <param name="page"></param>
- ///// <param name="limit"></param>
- ///// <param name="count"></param>
- ///// <returns></returns>
- //public List<OperationDto> GetOperationSysList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, out int count)
- //{
- // try
- // {
- // Expression<Func<LogOperationSys, bool>> item = Expressionable.Create<LogOperationSys>()
- // .AndIF(!string.IsNullOrWhiteSpace(menuName), it => it.MenuName.Contains(menuName.Trim()))
- // .AndIF(!string.IsNullOrWhiteSpace(type), it => it.Type == type)
- // .AndIF(!string.IsNullOrWhiteSpace(msg), it => it.Msg.Contains(msg.Trim()))
- // .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime))
- // .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(startTime).AddDays(1))
- // .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏�
-
- // var data = GetAllWhereAsync(item)
- // .Includes(x => x.TypeInfo)
- // .Includes(x => x.CreateUserInfo)
- // .Includes(x => x.UpdateUserInfo).ToList();
- // count = data.Count;
- // return data.Select(m => new OperationDto()
- // {
- // Id = m.Id,
- // ParentNo = m.ParentNo,
- // MenuNo = m.MenuNo,
- // MenuName = m.MenuName,
- // FkNo = m.FkNo,
- // Type = m.TypeInfo == null ? "" : m.TypeInfo.DictName,
- // Msg = m.Msg,
- // CreateTime = m.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
- // CreateUserName = m.CreateUserInfo == null ? "" : m.CreateUserInfo.UserName,
- // UpdateTime = m.UpdateTime == null ? "" : ((DateTime)m.UpdateTime).ToString("yyyy-MM-dd HH:mm:ss"),
- // UpdateUserName = m.UpdateUserInfo == null ? "" : m.UpdateUserInfo.UserName
- // }).ToList();
- // }
- // catch (Exception e)
- // {
- // throw new Exception(e.Message);
- // }
- //}
/// <summary>
/// 娣诲姞鎿嶄綔鏃ュ織
@@ -133,10 +86,25 @@
/// <param name="menuNo">鑿滃崟鍙�</param>
/// <param name="parentNo">妯″潡鍙�</param>
/// <returns></returns>
- public List<OperationDto> GetSysOperationList(string menuName, string type, string msg, string menuNo, string parentNo)
+ public async Task<SqlSugarPagedList<OperationDto>> GetSysOperationList(GetOperationVm model)
{
- List<OperationDto> operationlist = _operation.GetSysOperationList(menuName, type, msg, menuNo, parentNo);
- return operationlist;
+ return await Db.Queryable<LogOperationSys>()
+ .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id)
+ .LeftJoin<SysFunctionMenu>((a, b, c) => a.ParentNo == c.MenuNo)
+ .LeftJoin<SysDictionary>((a, b, c, d) => SqlFunc.ToInt32(a.Type) == d.Id)
+ .Where(a => a.IsDel == "0")
+ .WhereIF(!string.IsNullOrEmpty(model.MenuName), a => a.MenuName.Contains(model.MenuName))
+ .WhereIF(!string.IsNullOrEmpty(model.Type), a => a.Type == model.Type)
+ .WhereIF(!string.IsNullOrEmpty(model.Msg), a => a.Msg.Contains(model.Msg))
+ .WhereIF(!string.IsNullOrEmpty(model.MenuNo), a => a.MenuNo == model.MenuNo)
+ .Where((a, b, c, d) => a.ParentNo == SqlFunc.Subqueryable<SysFunctionMenu>().Where(e => e.IsDel == "0" && e.MenuName == model.ParentNo).Select(e => e.MenuNo))
+ .Select<OperationDto>((a, b, c, d) => new OperationDto()
+ {
+ Id = a.Id,
+ CreateUserName = b.RealName,
+ TypeName = d.DictName,
+ }, true)
+ .ToPagedListAsync(model.Page, model.Limit);
}
/// <summary>
@@ -154,8 +122,8 @@
//鎹曡幏寮傚父
try
{
- var parentNo = _operation.GetMenuList(parentName).MenuNo;
- var menuNo = _operation.GetMenuList(menuName).MenuNo;
+ var parentNo = (await Db.Queryable<SysFunctionMenu>().FirstAsync(s => s.MenuName == parentName && s.IsDel == "0"))?.MenuNo;
+ var menuNo = (await Db.Queryable<SysFunctionMenu>().FirstAsync(s => s.MenuName == menuName && s.IsDel == "0"))?.MenuNo;
int i = await _operation.InsertOperation(parentNo, menuNo, parentName + "-" + menuName, fkNo, type, msg, createuser);
return i;
}
@@ -165,16 +133,36 @@
throw new Exception("鏂板鎿嶄綔鏃ュ織寮傚父", ex);
}
}
-
+ /// <summary>
+ /// 鏂板绯荤粺鎿嶄綔鏃ュ織
+ /// </summary>
+ /// <param name="parentName">妯″潡鍙�</param>
+ /// <param name="menuName">鑿滃崟鍙�</param>
+ /// <param name="fkNo">鏁版嵁缂栧彿</param>
+ /// <param name="type">鎿嶄綔绫诲瀷</param>
+ /// <param name="msg">鎿嶄綔鍐呭</param>
+ /// <param name="createuser">鍒涘缓浜�</param>
+ /// <returns></returns>
+ public async Task<int> InsertOperation(OperationInputVm input)
+ {
+ input.ParentNo = (await Db.Queryable<SysFunctionMenu>().FirstAsync(s => s.MenuName == input.ParentName && s.IsDel == "0"))?.MenuNo;
+ input.MenuNo = (await Db.Queryable<SysFunctionMenu>().FirstAsync(s => s.MenuName == input.MenuName && s.IsDel == "0"))?.MenuNo;
+ input.Type = (await Db.Queryable<SysDictionary>().FirstAsync(s => s.DictName == input.TypeName && s.IsDel == "0"))?.Id.ToString();
+ input.CreateUser = _userManager.UserId;
+ input.CreateTime = DateTime.Now;
+ return await Db.Insertable<LogOperationSys>(input).ExecuteCommandAsync();
+ }
/// <summary>
/// 鑾峰彇绫诲瀷鑿滃崟
/// </summary>
/// <param name="dicName">瀛楀吀鍚嶇О</param>
/// <returns></returns>
- public List<SysDictionary> GetDicTypeList(string dicName)
+ public async Task<List<SysDictionary>> GetDicTypeList(string dicName)
{
- List<SysDictionary> diclist = _operation.GetDicTypeList( dicName);
- return diclist;
+ return await Db.Queryable<SysDictionary>()
+ .Where(s => s.IsDel == "0")
+ .Where(s => s.ParentNo == SqlFunc.Subqueryable<SysDictionary>().Where(c => c.DictName == dicName).Select(c => c.DictNo))
+ .ToListAsync();
}
}
}
diff --git a/Wms/WMS.BLL/SysServer/RoleRightServer.cs b/Wms/WMS.BLL/SysServer/RoleRightServer.cs
index 63cc975..8579b02 100644
--- a/Wms/WMS.BLL/SysServer/RoleRightServer.cs
+++ b/Wms/WMS.BLL/SysServer/RoleRightServer.cs
@@ -25,16 +25,14 @@
/// <summary>
/// 渚濊禆娉ㄥ叆
/// </summary>
- public IRoleRightRepository _rolerights { get; set; }
private static readonly SqlSugarScope Db = DataContext.Db;
private readonly UserManager _userManager;
/// <summary>
/// 鏋勯�犲嚱鏁�
/// </summary>
/// <param name="roles"></param>
- public RoleRightServer(IRoleRightRepository rolerights, UserManager userManager)
+ public RoleRightServer(UserManager userManager)
{
- _rolerights = rolerights;
_userManager = userManager;
}
diff --git a/Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs b/Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs
index 488b4cd..2386291 100644
--- a/Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs
+++ b/Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs
@@ -3,6 +3,8 @@
using System.Text;
using System.Threading.Tasks;
using Model.ModelDto.LogDto;
+using Model.ModelVm.LogVm;
+using Utility;
using WMS.Entity.LogEntity;
using WMS.Entity.SysEntity;
@@ -47,7 +49,7 @@
/// <param name="menuno">鑿滃崟鍙�</param>
/// <param name="parentno">妯″潡鍙�</param>
/// <returns></returns>
- List<OperationDto> GetSysOperationList(string menuname, string type, string msg, string menuno, string parentno);
+ Task<SqlSugarPagedList<OperationDto>> GetSysOperationList(GetOperationVm model);
/// <summary>
/// 鏂板绯荤粺鎿嶄綔鏃ュ織
@@ -61,11 +63,12 @@
/// <returns></returns>
Task<int> InsertOperation(string parentName, string menuName, string fkNo, string type, string msg, int createuser);
+ Task<int> InsertOperation(OperationInputVm input);
/// <summary>
/// 鑾峰彇绫诲瀷鑿滃崟
/// </summary>
/// <param name="dicName">瀛楀吀鍚嶇О</param>
/// <returns></returns>
- List<SysDictionary> GetDicTypeList(string dicName);
+ Task<List<SysDictionary>> GetDicTypeList(string dicName);
}
}
diff --git a/Wms/Wms/Controllers/BasisController.cs b/Wms/Wms/Controllers/BasisController.cs
index 2370f47..fb0997a 100644
--- a/Wms/Wms/Controllers/BasisController.cs
+++ b/Wms/Wms/Controllers/BasisController.cs
@@ -21,6 +21,7 @@
using System.Data;
using Model.ModelDto.LogDto;
using Utility;
+using Model.ModelVm.LogVm;
namespace Wms.Controllers
{
@@ -119,11 +120,18 @@
/// <exception cref="System.Exception">鎹曡幏寮傚父</exception>
[HttpPost]
[ServiceFilter(typeof(ApiResponseActionFilter))]
+ [UnitOfWork]
public async Task InsertUserinfo(UserInfoDto UserInfoDto)
{
await _userInforServer.InsertUserInfo(UserInfoDto);
- await _operation.InsertOperation("绯荤粺璁剧疆", "鐢ㄦ埛绠$悊", UserInfoDto.UserNo, "娣诲姞", "娣诲姞鐢ㄦ埛淇℃伅 鐢ㄦ埛鍙凤細" + UserInfoDto.UserNo, _userManager.UserId);
-
+ await _operation.InsertOperation(new OperationInputVm()
+ {
+ ParentName = "绯荤粺璁剧疆",
+ MenuName = "鐢ㄦ埛绠$悊",
+ FkNo = UserInfoDto.UserNo,
+ TypeName = "娣诲姞",
+ Msg = "娣诲姞鐢ㄦ埛淇℃伅 鐢ㄦ埛鍙凤細" + UserInfoDto.UserNo
+ });
}
@@ -135,12 +143,20 @@
/// <exception cref="System.Exception">寮傚父</exception>
[HttpGet]
[ServiceFilter(typeof(ApiResponseActionFilter))]
+ [UnitOfWork]
public async Task DeleteUserInfo(int userids)
{
//鑾峰彇鐢ㄦ埛淇℃伅
SysUserInfor user = await _userInforServer.GetUserInfoById(userids);
await _userInforServer.DeleteUserinfo(user);
- await _operation.InsertOperation("绯荤粺璁剧疆", "鐢ㄦ埛绠$悊", user.UserNo, "鍒犻櫎", "鍒犻櫎鐢ㄦ埛淇℃伅 鐢ㄦ埛鍙凤細" + user.UserNo, _userManager.UserId);
+ await _operation.InsertOperation(new OperationInputVm()
+ {
+ ParentName = "绯荤粺璁剧疆",
+ MenuName = "鐢ㄦ埛绠$悊",
+ FkNo = user.UserNo,
+ TypeName = "鍒犻櫎",
+ Msg = "鍒犻櫎鐢ㄦ埛淇℃伅 鐢ㄦ埛鍙凤細" + user.UserNo
+ });
}
@@ -152,11 +168,18 @@
/// <exception cref="System.Exception">鎹曡幏寮傚父</exception>
[HttpPost]
[ServiceFilter(typeof(ApiResponseActionFilter))]
+ [UnitOfWork]
public async Task UpdateUserinfo(UserInfoDto userdto)
{
await _userInforServer.UpdateUserinfo(userdto);
- await _operation.InsertOperation("绯荤粺璁剧疆", "鐢ㄦ埛绠$悊", userdto.UserNo, "淇敼", "淇敼鐢ㄦ埛淇℃伅 鐢ㄦ埛鍙凤細" + userdto.UserNo, _userManager.UserId);
-
+ await _operation.InsertOperation(new OperationInputVm()
+ {
+ ParentName = "绯荤粺璁剧疆",
+ MenuName = "鐢ㄦ埛绠$悊",
+ FkNo = userdto.UserNo,
+ TypeName = "缂栬緫",
+ Msg = "淇敼鐢ㄦ埛淇℃伅 鐢ㄦ埛鍙凤細" + userdto.UserNo
+ });
}
@@ -183,20 +206,13 @@
//鑾峰彇褰撳墠鎿嶄綔鐢ㄦ埛id
SysUserInfor user = await _userInforServer.GetUserInfoById(_userManager.UserId);
if (user == null)
- {
throw Oops.Bah("鎵句笉鍒扮敤鎴蜂俊鎭�");
- }
if (user.PassWord != pwdOld)
- {
throw Oops.Bah("鍘熷瘑鐮佷笉姝g‘");
- }
- else
- {
- //淇敼瀵嗙爜
- int i = await _userInforServer.UptUserPassWord(pwdNew, _userManager.UserId);
- if (i <= 0)
- throw Oops.Bah("淇敼瀵嗙爜澶辫触");
- }
+ //淇敼瀵嗙爜
+ int i = await _userInforServer.UptUserPassWord(pwdNew, _userManager.UserId);
+ if (i <= 0)
+ throw Oops.Bah("淇敼瀵嗙爜澶辫触");
}
/// <summary>
/// x澶╁悗鎻愰啋鐢ㄦ埛淇敼瀵嗙爜
@@ -251,8 +267,14 @@
public async Task InsertRoleInfo(RoleDto roledto)
{
await _rolesServer.InsertRoleInfo(roledto);
- await _operation.InsertOperation("绯荤粺璁剧疆", "瑙掕壊鏉冮檺", roledto.RoleNo, "娣诲姞", "娣诲姞瑙掕壊淇℃伅 瑙掕壊鍙凤細" + roledto.RoleNo, _userManager.UserId);
-
+ await _operation.InsertOperation(new OperationInputVm()
+ {
+ ParentName = "绯荤粺璁剧疆",
+ MenuName = "瑙掕壊鏉冮檺",
+ FkNo = roledto.RoleNo,
+ TypeName = "娣诲姞",
+ Msg = "娣诲姞瑙掕壊淇℃伅 瑙掕壊鍙凤細" + roledto.RoleNo
+ });
}
/// <summary>
@@ -269,7 +291,14 @@
//鏍规嵁瑙掕壊id鑾峰彇瑙掕壊淇℃伅
SysRoles role = await _rolesServer.GetRoleInfoById(roleids);
await _rolesServer.DeleteRoleInfo(role);
- await _operation.InsertOperation("绯荤粺璁剧疆", "瑙掕壊鏉冮檺", role.RoleNo, "鍒犻櫎", "鍒犻櫎瑙掕壊淇℃伅 瑙掕壊鍙凤細" + role.RoleNo, _userManager.UserId);
+ await _operation.InsertOperation(new OperationInputVm()
+ {
+ ParentName = "绯荤粺璁剧疆",
+ MenuName = "瑙掕壊鏉冮檺",
+ FkNo = role.RoleNo,
+ TypeName = "鍒犻櫎",
+ Msg = "鍒犻櫎瑙掕壊淇℃伅 瑙掕壊鍙凤細" + role.RoleNo
+ });
}
/// <summary>
@@ -284,7 +313,14 @@
public async Task UpdateRolesInfo(SysRoles role)
{
await _rolesServer.UpdateRoleInfo(role);
- await _operation.InsertOperation("绯荤粺璁剧疆", "瑙掕壊鏉冮檺", role.RoleNo, "淇敼", "淇敼瑙掕壊淇℃伅 瑙掕壊鍙凤細" + role.RoleNo, _userManager.UserId);
+ await _operation.InsertOperation(new OperationInputVm()
+ {
+ ParentName = "绯荤粺璁剧疆",
+ MenuName = "瑙掕壊鏉冮檺",
+ FkNo = role.RoleNo,
+ TypeName = "缂栬緫",
+ Msg = "淇敼瑙掕壊淇℃伅 瑙掕壊鍙凤細" + role.RoleNo
+ });
}
#endregion
@@ -365,8 +401,14 @@
SysRoles roles = await _rolesServer.GetRoleInfoById(id);
//淇濆瓨瑙掕壊鏉冮檺淇℃伅
await _roleRightServer.InsertRoleRight(MenuNo, roles.RoleNo);
- await _operation.InsertOperation("绯荤粺璁剧疆", "瑙掕壊鏉冮檺", roles.RoleNo, "淇敼", "鍒嗛厤瑙掕壊鏉冮檺 瑙掕壊鍙凤細" + roles.RoleNo, _userManager.UserId);
-
+ await _operation.InsertOperation(new OperationInputVm()
+ {
+ ParentName = "绯荤粺璁剧疆",
+ MenuName = "瑙掕壊鏉冮檺",
+ FkNo = roles.RoleNo,
+ TypeName = "缂栬緫",
+ Msg = "鍒嗛厤瑙掕壊鏉冮檺 瑙掕壊鍙凤細" + roles.RoleNo
+ });
}
#endregion
@@ -2051,22 +2093,12 @@
/// <summary>
/// 鑾峰彇鎿嶄綔鏃ュ織淇℃伅鍒楄〃
/// </summary>
- /// <param name="menuName">鑿滃崟鍚嶇О</param>
- /// <param name="type">鎿嶄綔绫诲瀷</param>
- /// <param name="msg">鎿嶄綔鍐呭</param>
- /// <param name="menuNo">鑿滃崟鍙�</param>
- /// <param name="parentNo">妯″潡鍙�</param>
/// <returns></returns>
- [HttpGet]
- public IActionResult GetSysOperationList(string menuName, string type, string msg, string menuNo, string parentNo)
+ [HttpPost]
+ [ServiceFilter(typeof(ApiResponseActionFilter))]
+ public async Task<SqlSugarPagedList<OperationDto>> GetSysOperationList(GetOperationVm model)
{
- List<OperationDto> operation = _operation.GetSysOperationList(menuName, type, msg, menuNo, parentNo);
- return Ok(new
- {
- data = operation,
- code = 0,
- msg = "鎴愬姛"
- });
+ return await _operation.GetSysOperationList(model);
}
/// <summary>
@@ -2075,15 +2107,10 @@
/// <param name="dicName">瀛楀吀鍚嶇О</param>
/// <returns></returns>
[HttpGet]
- public IActionResult GetDicTypeList(string dicName)
+ [ServiceFilter(typeof(ApiResponseActionFilter))]
+ public async Task<List<SysDictionary>> GetDicTypeList(string dicName)
{
- List<SysDictionary> diclist = _operation.GetDicTypeList(dicName);
- return Ok(new
- {
- data = diclist,
- code = 0,
- msg = "鎴愬姛"
- });
+ return await _operation.GetDicTypeList(dicName);
}
#endregion
--
Gitblit v1.8.0