ming há 4 anos atrás
pai
commit
62a581fbef
5 ficheiros alterados com 59 adições e 22 exclusões
  1. 27 9
      js/per-manage.js
  2. 5 3
      js/property.js
  3. 3 3
      js/system-inform.js
  4. 14 4
      js/userLog.js
  5. 10 3
      system-inform.html

+ 27 - 9
js/per-manage.js

@@ -14,6 +14,12 @@ var totalPages = 0;
 var depname = 0;
 var companyId = 0;
 
+
+var param1 = '';
+var param2 = '';
+var param3 = ''; //公司树
+var param4 = ''; //部门树
+
 //用户列表
 getListDataAjax();
 
@@ -21,6 +27,9 @@ getListDataAjax();
 $('#buttonClick').on('click', function() {
     pageNo = 1;
     getListDataAjax(getSearchParamObj());
+
+    param1 = $('#userName').val()
+    param2 = $('#roleId').val()
 })
 
 //公司树点击事件
@@ -42,6 +51,11 @@ $(".treeCompany").on('click', function() {
         $('#roleId option').eq(0).prop("selected", true)
         getListDataAjax({ "companyId": $(this).data('id') });
 
+        param3 = $(this).data('id');
+
+
+
+
     })
     //部门树点击事件
 $(".treeDepartment").on('click', function() {
@@ -63,10 +77,21 @@ $(".treeDepartment").on('click', function() {
     getListDataAjax({ "depname": $(this).data('id') });
 
 
+    param4 = $(this).data('id');
+
+
 })
 
 //重置表单
 $('.reset').click(resetForm)
+    //重置表单
+function resetForm() {
+    location.reload();
+    // pageNo = 1;
+    // $("#userName").val("");
+    // $('#roleId option').eq(0).prop("selected", true)
+    // getListDataAjax(getSearchParamObj());
+}
 
 
 //分页操作
@@ -91,13 +116,7 @@ $('#nextPageButton').on('click', function() {
     getListDataAjax(getSearchParamObj(), pageNo);
 })
 
-//重置表单
-function resetForm() {
-    pageNo = 1;
-    $("#userName").val("");
-    $('#roleId option').eq(0).prop("selected", true)
-    getListDataAjax(getSearchParamObj());
-}
+
 
 //拼接搜索条件
 function getSearchParamObj() {
@@ -576,8 +595,7 @@ function linkDep(element) {
 
 // 导出 start
 $('.export').click(function() {
-    getDataExport()
-        // getDataExport(getSearchParamObj(), 1)
+    getDataExport({ "user_name": param1, "roleId": param2, "companyId": param3, "depname": param4 })
 })
 
 

+ 5 - 3
js/property.js

@@ -73,11 +73,13 @@ function getListDataAjax(queryParam = {}, pageNo = 1) {
 
 //按钮搜索
 $('#buttonClick').on('click', function() {
-    param1 = $('#facilityName').val()
-    param2 = $('#addrs').val()
+
     pageNo = 1;
     getListDataAjax(getSearchParamObj());
 
+    param1 = $('#facilityName').val()
+    param2 = $('#addrs').val()
+
 })
 
 //拼接搜索条件
@@ -206,7 +208,7 @@ function getDataExport(queryParam = {}) {
             str += '<tr style="text-align:center">';
             for (const key in newData[i]) {
                 // 增加\t为了不让表格显示科学计数法或者其他格式
-                str += `<td>${ newData[i][key] + '\t'}</td>`;
+                str += `<td x:str>${ newData[i][key] + '\t'}</td>`;
             }
             str += '</tr>';
         }

+ 3 - 3
js/system-inform.js

@@ -135,7 +135,7 @@ layui.use('layer', function() {
             let dataId = $('.pure-table tr').find('.checked').data('id');
             let systemInfo = $('.pure-table tr').find('.checked').data('system');
             let perm = $('.pure-table tr').find('.checked').data('perm');
-            let systemStatus = systemInfo.status == "1" ? '启动' : '未启动';
+            // let systemStatus = systemInfo.status == "1" ? '启动' : '未启动';
 
             $('.editSystemOut input[name=systemName]').val(systemInfo.systemName)
             $('.editSystemOut input[name=fullName]').val(systemInfo.fullName)
@@ -145,7 +145,7 @@ layui.use('layer', function() {
 
             $('.editSystemOut input[name=id]').val(systemInfo.id)
             $('.editSystemOut input[name=creatMan').val(systemInfo.creatMan)
-            $('.editSystemOut input[name=status').val(systemStatus)
+            $('.editSystemOut select[name=status').val(systemInfo.status)
 
             if (systemInfo.systemLogo) {
                 $('#systemLogoShow').attr('src', systemInfo.systemLogo)
@@ -158,7 +158,7 @@ layui.use('layer', function() {
                 closeBtn: 0,
                 shadeClose: true,
                 skin: 'yourclass',
-                area: ['410px', '400px'],
+                area: ['410px', '420px'],
                 content: $(".editSystemOut"),
                 success: function() {
                     $('.clsBtn,.cancel').click(function() {

+ 14 - 4
js/userLog.js

@@ -74,6 +74,10 @@ function getListDataAjax(queryParam = {}, pageNo = 1) {
 $('#buttonSearch').on('click', function() {
     pageNo = 1
     getListDataAjax(getSearchParamObj());
+
+    param1 = $('#user_name').val()
+    param2 = $('#start_creat_date').val()
+    param2 = $('#end_creat_date').val()
 })
 
 //拼接搜索条件
@@ -97,6 +101,10 @@ function resetForm() {
     $("#start_creat_date").val("");
     $("#end_creat_date").val("");
     getListDataAjax(getSearchParamObj());
+
+    param1 = $('#user_name').val()
+    param2 = $('#start_creat_date').val()
+    param2 = $('#end_creat_date').val()
 }
 
 //分页操作
@@ -122,13 +130,15 @@ $('#nextPageButton').on('click', function() {
 
 
 // 导出 start
-$('.export').click(getDataExport)
+$('.export').click(function() {
+    getDataExport({ "user_name": param1, "start_creat_date": param2, "end_creat_date": param2 })
+})
 
-function getDataExport() {
+function getDataExport(queryParam = {}) {
     // 输出base64编码
     const base64 = s => window.btoa(unescape(encodeURIComponent(s)));
 
-    ajaxRequest(LOG_EXPORT, "POST", {}, function(result) {
+    ajaxRequest(LOG_EXPORT, "POST", queryParam, function(result) {
         let data = result.RESULT.data;
         let newData = [];
 
@@ -141,7 +151,7 @@ function getDataExport() {
             str += '<tr style="text-align:center">';
             for (const key in newData[i]) {
                 // 增加\t为了不让表格显示科学计数法或者其他格式
-                str += `<td>${ newData[i][key] + '\t'}</td>`;
+                str += `<td x:str>${ newData[i][key] + '\t'}</td>`;
             }
             str += '</tr>';
         }

+ 10 - 3
system-inform.html

@@ -69,7 +69,7 @@
                                 <th>全称</th>
                                 <th>简称</th>
                                 <th>官网链接</th>
-                                <th>系统状态</th>
+                                <th>启动状态</th>
                                 <th>创建人</th>
                                 <th>创建时间</th>
                             </tr>
@@ -222,6 +222,13 @@
                         <span>系统简称:<i class="necessary">*</i></span>
                         <input name="forShort" type="text">
                     </div>
+                    <div>
+                        <span>启动状态:<i class="necessary">*</i></span>
+                        <select name="status" id="status">
+                            <option value="1">启动</option>
+                            <option value="0">未启动</option>
+                        </select>
+                    </div>
                     <div>
                         <span>官网链接:<i class="necessary">*</i></span>
                         <input name="url" type="text">
@@ -231,10 +238,10 @@
                         <input name="parm" type="text">
                     </div>
 
-                    <div style="opacity:0">
+                    <!-- <div style="opacity:0">
                         <span>状态:</span>
                         <input name="status" type="text">
-                    </div>
+                    </div> -->
 
                     <div style="opacity:0">
                         <span>数据id:</span>