Bläddra i källkod

bug修复,更改布局

ming 4 år sedan
förälder
incheckning
8ee1805f57

+ 1 - 1
css/common.css

@@ -538,7 +538,7 @@ li.parent_li ul li ul li {
     color: #fff;
     position: absolute;
     left: 0;
-    bottom: 0;
+    bottom: .3rem;
     width: 100%;
     line-height: 22px
 }

+ 16 - 22
css/per-manage.css

@@ -3,38 +3,28 @@
 .mainbox {
     min-width: 1024px;
     max-width: 1920px;
-    padding: 0.8125rem 1.1rem 1.4rem .9rem;
+    padding: 0.8125rem 1.1rem 1rem .9rem;
     /* display: flex; */
-    height: 100%;
-    /* height: 100vh; */
+    /* height: 100%; */
+    height: 100vh;
+    min-height: 723px
+    /* min-height: 10rem; */
 }
 
 .per-manage {
     height: 13.5rem
 }
 
+.column1 {}
 
-/* .column{
-    height:100%;
-   
-} */
-
-.column1 {
-    /* flex:2; */
-}
-
-.column2 {
-    /* flex:2; */
-    /* border:1px solid yellow */
-}
+.column2 {}
 
 .column3 {
-    /* flex: 8; */
     overflow: hidden;
-    height: 10rem;
-    /* height: calc(100vh - 2.9rem); */
+    /* height: 10rem; */
+    height: calc(100vh - 2.7rem);
+    min-height: 10.5rem;
     position: relative;
-    /* border:1px solid yellow */
 }
 
 .title {
@@ -211,6 +201,10 @@ ul.depart-opera {
     font-size: 0.2rem;
     border-collapse: collapse;
     border-spacing: 0;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    max-width: 100px;
     /* width: 0.3375rem */
 }
 
@@ -488,13 +482,13 @@ ul.depart-opera {
     display: none;
     position: absolute;
     z-index: 999;
-    top: 20%;
+    top: 30%;
     margin-top: -50px;
     height: 200px;
     width: 200px;
     /* right: 0; */
     /* bottom: 0; */
-    margin-left: -50px;
+    margin-left: -150px;
     left: 50%;
     background-repeat: no-repeat;
     /* background-attachment: fixed; */

+ 3 - 1
js/building-manage.js

@@ -100,7 +100,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/buildingFloor-manage.js

@@ -113,7 +113,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/buildingRoom-manage.js

@@ -112,7 +112,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/device-check.js

@@ -109,7 +109,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/device-communicate.js

@@ -119,7 +119,9 @@ $('#nextPageButton').on('click', function() {
 })
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm)
 
 function resetForm() {
     pageNo = 1;

+ 3 - 1
js/device-list.js

@@ -97,7 +97,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm)
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/device-type.js

@@ -123,7 +123,9 @@ $('#nextPageButton').on('click', function() {
 })
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm)
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/deviceCheck-channel.js

@@ -88,7 +88,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/event-manage.js

@@ -95,7 +95,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/eventDanger-manage.js

@@ -105,7 +105,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/eventWarning-manage.js

@@ -104,7 +104,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //重置表单
 function resetForm() {

+ 3 - 1
js/organization.js

@@ -115,7 +115,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm)
 
 //重置表单
 function resetForm() {

+ 4 - 1
js/per-manage.js

@@ -87,7 +87,10 @@ $(".treeDepartment").on('click', function() {
 })
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+
+//分页刷新按钮
+$('.pg-refresh').click(resetForm)
     //重置表单
 function resetForm() {
     location.reload();

+ 7 - 5
js/property.js

@@ -114,12 +114,13 @@ $('#nextPageButton').on('click', function() {
 })
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+
+//分页刷新按钮
+$('.pg-refresh').click(resetForm)
 
 //重置表单
 function resetForm() {
-
-
     pageNo = 1;
     $("#facilityName").val("");
     $("#addrs").val("");
@@ -142,6 +143,7 @@ function getTypeList() {
             items += `<option value="${item.id}">${item.facilityTypeName}</option>`
         })
         $('#getTypeList').append(items);
+        $('#getTypeList2').append(items);
     }, function(errorMsg) {
         alert("请求数据失败!");
     })
@@ -270,7 +272,7 @@ layui.use('layer', function() {
             } else {
                 let userInfo = $('.pure-table tr').find('.checked').data('user');
                 $('.editPropertyOut input[name=facilityName]').val(userInfo.facilityName)
-                $('.editPropertyOut input[name=facilityType]').val(userInfo.facilityType)
+                $('.editPropertyOut select[name=facilityType]').val(userInfo.facilityTypeCode)
 
                 // 单位赋值
                 $('.editPropertyOut select[name=company]').val(userInfo.company)
@@ -347,13 +349,13 @@ $('#addData').click(function() {
     let res = validParamIsEmpty(allParam, {
         "facilityName": "请输入资产名称",
         "facilityType": "请选择资产类别",
+        "buyTime": "请输入购买时间",
         "company": "请选择使用单位",
         "man": "请填写负责人",
         "purchase": "请选择购入方式",
         "price": "请输入单价",
         "addrs": "请输入存放地点",
         "supplier": "请输入供应商",
-        "buyTime": "请输入购买时间",
         "buyNo": "请输入采购编号",
         "invoice": "请输入发票编号",
         "purpose": "请输入资产用途",

+ 16 - 0
js/security.js

@@ -70,6 +70,22 @@ function getSearchParamObj() {
     return queryParam;
 }
 
+
+//分页部分,刷新按钮点击
+// $('.pg-refresh').click(function() {
+//     location.reload()
+// })
+
+
+//分页刷新按钮
+$('.pg-refresh').click(resetForm)
+
+//重置表单
+function resetForm() {
+    pageNo = 1;
+    getListDataAjax();
+}
+
 //分页操作
 $('#firstPageButton').on('click', function() {
     pageNo = 1;

+ 10 - 0
js/system-inform.js

@@ -73,6 +73,16 @@ function getSystemListDataAjax(queryParam = {}, pageNo = 1) {
 
 }
 
+
+// /分页刷新按钮
+$('.pg-refresh').click(resetForm)
+
+//重置表单
+function resetForm() {
+    pageNo = 1;
+    getSystemListDataAjax();
+}
+
 //分页操作
 $('#firstPageButton').on('click', function() {
     pageNo = 1;

+ 3 - 1
js/userAccount.js

@@ -97,7 +97,9 @@ function getSearchParamObj() {
 
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //角色列表
 getUserRole()

+ 4 - 2
js/userLog.js

@@ -93,8 +93,10 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
-    //重置表单
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
+//重置表单
 function resetForm() {
     pageNo = 1
     $("#user_name").val("");

+ 9 - 13
js/util.js

@@ -59,21 +59,17 @@ var test = test(3000000);
 
 
 
-document.addEventListener('input', function(e) {
-    // input框 type='text'
-    //e.target.getAttribute('maxlength') === null,本身没有设置maxlength长度,防止全局设置覆盖所在页面设置的长度
-    if (e.target.type === 'text' && e.target.getAttribute('maxlength') === null) {
-        e.target.setAttribute('maxlength', '5') // 限制最长输入50个字符
-    }
-    // input框 type='textarea',且本身没有设置maxlength长度
-    if (e.target.type === 'textarea' && e.target.getAttribute('maxlength') === null) {
-        e.target.setAttribute('maxlength', '100') // 限制最长输入500个字符
-    }
-})
 
 
-//限制输入框字符长度
-$("input").attr("maxLength", 100);
+//限制input输入框字符长度
+$("input").attr("maxLength", 20);
+//限制textarea输入框字符长度
+$("textarea").attr("maxLength", 100);
+
+
+
+
+
 
 // 导出封装 
 function downExcel(str, titleName) {

+ 3 - 1
js/work-manage.js

@@ -97,7 +97,9 @@ function getSearchParamObj() {
 }
 
 //重置表单
-$('.reset').click(resetForm)
+$('.reset').click(resetForm);
+//分页刷新按钮
+$('.pg-refresh').click(resetForm);
 
 //重置表单
 function resetForm() {

+ 58 - 19
pages/property-manage/property-manage.html

@@ -21,6 +21,7 @@
 
 <body style="background:rgba(0,0,0,0)">
     <div class="memberbox">
+
         <div class="member-choose">
             <span>资产名称</span>
             <input type="text" id="facilityName" maxlength="100">
@@ -103,6 +104,12 @@
                             <span>资产名称:<i class="necessary">*</i></span>
                             <input type="text" name="facilityName" maxlength="100">
                         </div>
+                        <div class="layui-col-xs4 choose-item">
+                            <span>购买时间:<i class="necessary">*</i></span>
+                            <div class="layui-input-inline">
+                                <input type="text" class="layui-input" id="test5" name="buyTime" maxlength="100">
+                            </div>
+                        </div>
                         <div class="layui-col-xs4 choose-item">
                             <span>类别:<i class="necessary">*</i></span>
                             <select name="facilityType" id="getTypeList">
@@ -131,6 +138,7 @@
                                 <option value="其他">其他</option>
                             </select>
                         </div>
+
                         <div class="layui-col-xs4 choose-item">
                             <span>型号:</span>
                             <input type="text" name="facilityModel" maxlength="100">
@@ -151,12 +159,7 @@
                             <span>供应商:<i class="necessary">*</i></span>
                             <input type="text" name="supplier" maxlength="100">
                         </div>
-                        <div class="layui-col-xs4 choose-item">
-                            <span>购买时间:<i class="necessary">*</i></span>
-                            <div class="layui-input-inline">
-                                <input type="text" class="layui-input" id="test5" name="buyTime" maxlength="100">
-                            </div>
-                        </div>
+
                         <div class="layui-col-xs4 choose-item">
                             <span>采购编号:<i class="necessary">*</i></span>
                             <input type="text" name="buyNo" maxlength="100">
@@ -209,7 +212,10 @@
                     </div>
                     <div>
                         <span>资产类型:<i class="necessary">*</i></span>
-                        <input type="text" name="facilityType" maxlength="100">
+                        <!-- <input type="text" name="facilityType" maxlength="100"> -->
+                        <select name="facilityType" id="getTypeList2">
+                            <option value="">请选择</option>
+                        </select>
                     </div>
                     <div>
                         <span>单位名称:<i class="necessary">*</i></span>
@@ -262,29 +268,62 @@
         //常规用法
         laydate.render({
             elem: '#test5',
+            trigger: 'click',
             type: 'datetime'
         });
     });
 
     $(function() {
-            enlargeImg();
-        })
-        //关闭并移除图层
-    function closeImg() {
-        $('.enlargeImg_wrapper').fadeOut(200).remove();
-    }
-    //查看大图
-    function enlargeImg() {
+
+        var outside = true;
         $(".enlargeImg").click(function() {
+            outside = false
             $('.imgBox').html("<div  class='enlargeImg_wrapper'></div>");
             var imgSrc = $(this).attr('src');
             $(".enlargeImg_wrapper").css("background-image", "url(" + imgSrc + ")");
-            $('.enlargeImg_wrapper').fadeIn(200);
+            $('.enlargeImg_wrapper').fadeIn(300);
         })
-        $('.imgBox').on('click', '.enlargeImg_wrapper', function() {
-            $('.enlargeImg_wrapper').fadeOut(200).remove();
+
+        // $('.imgBox').on('click', '.enlargeImg_wrapper', function() {
+        //     $('.enlargeImg_wrapper').fadeOut(200).remove();
+        // })
+
+
+        //以下两个方法用于判断是点击按钮和弹框,还是弹框外面,如果点击弹框外面隐藏弹框,注document.body必须要在文档后面写,在head写documnet.body为null
+        document.body.addEventListener('click', function() {
+            outside = true
+        }, true)
+        document.body.addEventListener('click', function() {
+            if (outside) {
+                // alertBox.style.display = 'none'
+                $('.enlargeImg_wrapper').fadeOut(200).remove();
+            }
         })
-    };
+
+
+
+
+
+
+    });
+
+    // var outside = true;
+
+    // function alertBoxFn(e) {
+    //     alert(1)
+    //     outside = false
+    //     alertBox.style.display = "block";
+    // };
+
+    // //以下两个方法用于判断是点击按钮和弹框,还是弹框外面,如果点击弹框外面隐藏弹框,注document.body必须要在文档后面写,在head写documnet.body为null
+    // document.body.addEventListener('click', function() {
+    //     outside = true
+    // }, true)
+    // document.body.addEventListener('click', function() {
+    //     if (outside) {
+    //         alertBox.style.display = 'none'
+    //     }
+    // })
 </script>
 
 </html>