| | |
| | | var pageCurr; |
| | | var pageCount = 0; |
| | | var treeCond; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).extend({ |
| | |
| | | |
| | | // 树形图 |
| | | var organizationTree; |
| | | var selObj; |
| | | window.loadTree = function(condition){ |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | |
| | | onlyIconControl: true, |
| | | data: res.data, |
| | | click: function (obj) { |
| | | selObj = obj; |
| | | treeCond = { |
| | | key: obj.data.key, |
| | | val: obj.data.id |
| | | } |
| | | // treeCond = {[obj.data.key]: obj.data.id}; |
| | | $('#organizationTree').find('.ew-tree-click').removeClass('ew-tree-click'); |
| | | $(obj.elem).children('.layui-tree-entry').addClass('ew-tree-click'); |
| | | tableIns.reload({ |
| | |
| | | itemHeight: '250px', |
| | | filterable: true, |
| | | onChange: function (values, data) { |
| | | // console.log(values); |
| | | // console.log(data); |
| | | // console.log(values);console.log(data); |
| | | } |
| | | }); |
| | | } |
| | |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | if (treeCond) { |
| | | searchData[treeCond.key] = treeCond.val; |
| | | } |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |