Browse Source

:bug: 修改权限无法加载默认权限

刘嘉伟 4 years ago
parent
commit
0574e9f5b0

+ 2 - 2
src/main/resources/static/page/archive/edit.html

@@ -60,7 +60,7 @@
                         <div class="layui-input-inline">
                             <!--                            <input type="hidden" id="mlId" class="layui-input">-->
                             <!--                            <input type="hidden" id="mlCode" class="layui-input">-->
-                            <input type="text" id="ml" name="ml" lay-verify="required" lay-reqtext="档案门类不能为空"
+                            <input type="text" id="ml" name="ml" lay-reqtext="档案门类不能为空"
                                    lay-filter="ml" class="layui-input">
                             <!--                            <select name="ml" id="ml" lay-filter="ml" lay-verify="required" lay-reqtext="档案门类不能为空">-->
                             <!--                                <option value="">请选择档案门类</option>-->
@@ -286,7 +286,7 @@
         const urlParam = layui.url()
         let bgqxappend = false;
 
-        let fileType = $("#fileType").val()
+        let fileType = urlParam.fileType
         let curr = 1;
 
 

+ 1 - 1
src/main/resources/static/page/archive/list.html

@@ -461,7 +461,7 @@
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './edit.html',
+                content: './edit.html?id=' + id + '&mlId=' + searchParam.mlId + '&mlCode=' + searchParam.ml + '&fileType=' + 0,
                 success: function (layero, index) {
                     var body = layer.getChildFrame('body', index);
                     body.find("#id").val(id);

+ 12 - 12
src/main/resources/static/page/role/editRole.html

@@ -55,7 +55,8 @@
                 <div class="layui-card">
                     <div class="layui-card-header"><i class="layui-icon layui-icon-star"></i>档案权限</div>
                     <div class="layui-card-body">
-                        <input type="checkbox" name="bmqx-role" lay-skin="switch" lay-filter="switchTest" lay-text="ON|OFF">
+                        <input type="checkbox" name="bmqx-role" lay-skin="switch" lay-filter="switchTest"
+                               lay-text="ON|OFF">
 
                     </div>
                 </div>
@@ -132,10 +133,10 @@
                     elem: '#bmqx-role'
                     , data: res.data
                 });
-                if(res.data==1){
-                        form.val('addPaper', {
-                            "bmqx-role": true //开关状态
-                        });
+                if (res.data == 1) {
+                    form.val('addPaper', {
+                        "bmqx-role": true //开关状态
+                    });
                 }
             })
 
@@ -176,7 +177,6 @@
                 archiveTrees: getChecked_list(tree.getChecked("archive-tree-role")),
                 archiveShow: getChecked_list(tree.getChecked("archive-role")),
                 bmqxRole: document.getElementById("bmqx-role").value
-                bmqxRole:bmqxRole
             }
             console.log()
             http.post('system/role/setRole', data, true, function (res) {
@@ -200,12 +200,12 @@
         initMj()
         initdept()
 
-        var bmqxRole=0
-        form.on('switch(switchTest)', function(data){
-            if(this.checked){
-                bmqxRole=1
-            }else {
-                bmqxRole=0
+        var bmqxRole = 0
+        form.on('switch(switchTest)', function (data) {
+            if (this.checked) {
+                bmqxRole = 1
+            } else {
+                bmqxRole = 0
             }
         });