From a310eabeb950b292cc80046f0d758fc7c58c65bc Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 16 九月 2022 12:09:23 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/cstmr/cstmr.js |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/main/webapp/static/js/cstmr/cstmr.js b/src/main/webapp/static/js/cstmr/cstmr.js
index 3a934a6..c2cac53 100644
--- a/src/main/webapp/static/js/cstmr/cstmr.js
+++ b/src/main/webapp/static/js/cstmr/cstmr.js
@@ -3,9 +3,8 @@
 layui.config({
     base: baseUrl + "/static/layui/lay/modules/"
 }).extend({
-    dropdown: 'dropdown/dropdown',
     cascader: 'cascader/cascader',
-}).use(['table','laydate', 'form', 'admin', 'xmSelect', 'dropdown', 'element', 'cascader', 'tree'], function(){
+}).use(['table','laydate', 'form', 'admin', 'xmSelect', 'element', 'cascader', 'tree', 'dropdown'], function(){
     var table = layui.table;
     var $ = layui.jquery;
     var layer = layui.layer;
@@ -15,12 +14,23 @@
     var xmSelect = layui.xmSelect;
     var cascader = layui.cascader;
     var tree = layui.tree;
+    var dropdown = layui.dropdown;
+
+    dropdown.render({
+        elem: '#slrassa'
+        ,content: ['<div id="organizationTree" style="height: calc(100vh - 525px);border: none"></div>'].join('')
+        ,style: 'width: 370px; height: 500px; padding: 0 15px; box-shadow: 1px 1px 30px rgb(0 0 0 / 12%);'
+        ,ready: function(){
+            loadTree();
+        }
+    });
 
     // 鏍戝舰鍥�
     var organizationTree;
+    var selObj;
     window.loadTree = function(condition){
         $.ajax({
-            url: baseUrl+"/tag/tree/auth",
+            url: baseUrl+"/dept/user/tree/auth",
             headers: {'token': localStorage.getItem('token')},
             data: {
                 'condition': condition
@@ -37,6 +47,10 @@
                             selObj = obj;
                             $('#organizationTree').find('.ew-tree-click').removeClass('ew-tree-click');
                             $(obj.elem).children('.layui-tree-entry').addClass('ew-tree-click');
+                            tableIns.reload({
+                                where: {dept_id: obj.data.id},
+                                page: {curr: 1}
+                            });
                         }
                     });
                     treeData = res.data;
@@ -48,7 +62,6 @@
             }
         })
     }
-    loadTree();
 
     // 鏁版嵁娓叉煋
     tableIns = table.render({
@@ -59,7 +72,7 @@
         limit: 15,
         limits: [15, 30, 50, 100, 200, 500],
         cellMinWidth: 100,
-        height: 'full-145',
+        height: 'full-148',
         // size: 'sm',
         skin: 'line',
         cols: [[

--
Gitblit v1.9.1