training_object.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. {extend name="public/layout" /} {block name="title"}组织结构{/block} {block name="body"}
  2. <style>
  3. html,
  4. body {
  5. display: block;
  6. width: 100%;
  7. height: 100%;
  8. background-color: #fff;
  9. }
  10. .cardheader {
  11. padding-left: 10px;
  12. }
  13. .laytable-cell-1-0-1 {
  14. height: 32px !important;
  15. line-height: 32px !important;
  16. }
  17. .layui-tree-set,
  18. .layui-tree-entry {
  19. margin-top: 5px !important;
  20. }
  21. .layui-table tr {
  22. height: 7vh;
  23. }
  24. @media screen and (min-width: 992px) {
  25. .layui-col-md9 {
  26. margin-left: 1%;
  27. width: 74%;
  28. }
  29. }
  30. .layui-table thead tr,
  31. .layui-table-header {
  32. background-color: #D8E6F1 !important;
  33. }
  34. #root-list {
  35. border-right: 1px solid #f6f6f6;
  36. }
  37. #addRoot {
  38. border-top: 1px solid #f6f6f6;
  39. }
  40. .root {
  41. cursor: pointer;
  42. text-align: center;
  43. padding: 10px 1px;
  44. font-size: 1rem;
  45. font-weight: bold;
  46. }
  47. .root.selected {
  48. font-size: x-large;
  49. color: #269efb;
  50. }
  51. .root:hover {
  52. font-size: x-large;
  53. color: #269efb;
  54. }
  55. .layui-form-label {
  56. width: 150px;
  57. }
  58. .layui-input-block {
  59. margin-left: 180px;
  60. }
  61. .strucinfo {
  62. cursor: pointer;
  63. }
  64. .setleader {
  65. float: right;
  66. display: none;
  67. }
  68. .setleader:hover {
  69. display: block;
  70. }
  71. .leader {
  72. float: right;
  73. }
  74. /*重要 样式*/
  75. .layui-tree-entry.tree-node-current .layui-tree-main {
  76. background-color: #d7edbf87;
  77. }
  78. /*重要 样式*/
  79. .layui-btn.layui-btn-success {
  80. background-color: #009688;
  81. }
  82. .filterbutton {
  83. float: right;
  84. }
  85. .layui-layer-content {
  86. overflow: inherit !important;
  87. }
  88. .layui-zz-box {
  89. border: 1px solid #f2f2f2;
  90. margin-right: 5px;
  91. }
  92. .list>ul:first-child>li>div {
  93. background-color: #f2f2f2;
  94. display: block;
  95. padding: 5px
  96. }
  97. .list li {
  98. min-width: 150px;
  99. }
  100. .list li div {
  101. padding: 3px;
  102. padding-right: 5px;
  103. }
  104. .list>ul ul {
  105. margin-left: 15px;
  106. }
  107. .list .op {
  108. float: right;
  109. margin-left: 2px;
  110. }
  111. .list i.op:hover,
  112. .list i.group:hover,
  113. .list span:hover {
  114. cursor: pointer;
  115. }
  116. .list span {
  117. overflow: hidden;
  118. text-overflow: ellipsis;
  119. white-space: nowrap;
  120. max-width: 184px;
  121. display: inline-block;
  122. }
  123. .list li i:first-child {
  124. position: relative;
  125. top: -6px;
  126. margin-right: 5px;
  127. }
  128. .list{
  129. padding-bottom: 24px;
  130. }
  131. .everydepart {
  132. display: block;
  133. position: relative;
  134. padding-right: 24px !important;
  135. }
  136. .everydepart .checkdiv {
  137. display: block;
  138. position: absolute;
  139. right: 4px;
  140. top: 10px;
  141. }
  142. .addbtn {
  143. position: absolute;
  144. display: block;
  145. width: 48px;
  146. height: 32px;
  147. top: 40%;
  148. left: 50%;
  149. margin-left: -24px;
  150. }
  151. .clearfix {
  152. clear: both;
  153. }
  154. .clearfix::after {
  155. clear: both;
  156. content: ' ';
  157. display: table;
  158. }
  159. .clearfix::before {
  160. content: ' ';
  161. display: table;
  162. }
  163. .height100 {
  164. height: 100%;
  165. }
  166. .showdepartbox {
  167. border: 1px solid #f2f2f2;
  168. width: 64%;
  169. }
  170. .left {
  171. float: left;
  172. }
  173. .right {
  174. float: right;
  175. }
  176. .everynowdepart {
  177. position: relative;
  178. height: 32px;
  179. padding-left: 16px;
  180. line-height: 32px;
  181. border-bottom: 1px solid #e9e9e9;
  182. padding-right: 48px;
  183. }
  184. .del {
  185. position: absolute;
  186. top: 0;
  187. right: 0;
  188. height: 32px;
  189. width: 48px;
  190. text-align: center;
  191. cursor: pointer;
  192. }
  193. .rightitlebox {
  194. padding: 0 8px;
  195. border-bottom: 1px solid #e4e4e4;
  196. }
  197. div{
  198. box-sizing: border-box;
  199. }
  200. .leftcontentbox{
  201. position: relative;
  202. height: 100%;
  203. overflow: hidden;
  204. width: 36%;
  205. }
  206. .rotate {
  207. transform: rotateY(90deg);
  208. }
  209. .layui-zz-box{
  210. display: block;
  211. height: 100%;
  212. }
  213. .layui-fluid {
  214. padding: 15px 0;
  215. }
  216. .keyword{
  217. height: 35px;
  218. margin: 4px;
  219. }
  220. .keywords{
  221. height: 35px;
  222. margin: 4px;
  223. }
  224. #range_person {
  225. height: calc(100vh - 130px);
  226. }
  227. .layui-layer-iframe .layui-layer-btn, .layui-layer-page .layui-layer-btn {
  228. display: flex !important;
  229. justify-content: center !important;
  230. }
  231. </style>
  232. <body>
  233. <div class="layui-fluid height100">
  234. <div class="layui-card height100">
  235. <div class="layui-card-body height100">
  236. <div class="layui-row height100">
  237. <div class="layui-col-md12 layui-col-xs12 layui-col-sm12 height100">
  238. <div class="layui-tab layui-tab-brief height100" lay-filter="component-tabs-hash">
  239. <div class="layui-tab-content height100">
  240. <div class="layui-tab-item layui-show clearfix height100">
  241. <div class="layui-col-md5 layui-col-xs5 layui-col-sm5 leftcontentbox" style=" min-width: 200px;">
  242. <div class="layui-zz-box" >
  243. <div class="tree">
  244. <div class="clearfix rightitlebox">
  245. <div class="left departnum">
  246. <div class="layui-inline">
  247. <div class="layui-input-inline" style="width: auto;">
  248. <input type="text" name="keyword" placeholder="请输入关键字搜索" autocomplete="off" class="layui-input keyword" id="keyword_left_text">
  249. </div>
  250. </div>
  251. </div>
  252. <div class="" style="cursor: pointer;" id="left_search">
  253. <button class="layui-btn layuiadmin-btn keyword" lay-submit lay-filter="LAY-app-contlist-search">
  254. <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
  255. </div>
  256. </div>
  257. <div class="list" id="range_person" style="overflow: auto;">
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. <div class="layui-col-md2 layui-col-xs2 layui-col-sm2 layui-hide" style="position: unset;height: 85vh;">
  263. <button type="button" class="addbtn">添加</button>
  264. <input type="hidden" id="departinput" />
  265. </div>
  266. <div class="layui-col-md5 layui-col-xs5 layui-col-sm5 showdepartbox" style="overflow: auto;height: 90vh;">
  267. <div class="clearfix rightitlebox">
  268. <div class="left departnum">
  269. <div class="layui-inline">
  270. <div class="layui-input-inline" style="width: auto;">
  271. <input type="text" name="keyword" id="keyword" placeholder="请输入关键字搜索" autocomplete="off" class="layui-input keyword">
  272. </div>
  273. </div>
  274. <div class="layui-inline" id="right_search">
  275. <button class="layui-btn layuiadmin-btn keyword" lay-submit lay-filter="LAY-app-contlist-search">
  276. <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
  277. </button>
  278. </div>
  279. </div>
  280. <div class="right" style="cursor: pointer;">
  281. <!-- 取消选择 -->
  282. <!-- <button class="layui-btn layuiadmin-btn layui-btn-primary keywords" style="display: flex;align-items: center;" id="all_del">取消选择</button> -->
  283. </div>
  284. </div>
  285. <div class="nowdepartbox">
  286. <table id="LAY-employee-list" lay-filter="LAY-employee-list" style="margin-top:15px;"></table>
  287. </div>
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. <input type="hidden" id="activity-submit" lay-filter="activity-submit">
  293. </div>
  294. </div>
  295. </div>
  296. </div>
  297. </div>
  298. <script src="__STATIC__/layui/layui/layui.js"></script>
  299. <script src="__STATIC__/layui/layui/lay/modules/xm-select.js" type="text/javascript" charset="utf-8"></script>
  300. <script type="text/html" id="operateTpls">
  301. {{# if(d.is_manager){ }}
  302. <p class="strucinfo" data-leader="{{d.is_manager}}"><span>{{d.org_name}}</span><span class="leader" lay-event="removeleader"><img src="__STATIC__/img/managericon.png" style="width:80%" alt="" /></span></p>
  303. {{# }else{ }}
  304. <p class="strucinfo" data-leader="{{d.is_manager}}"><span>{{d.org_name}}</span><span class="setleader employee" lay-event="setleader"><i class="layui-icon layui-icon-friends"></i><img class="layui-hide" src="__STATIC__/img/managericon.png" style="width:80%" alt="" /></span></span></p>
  305. {{# } }}
  306. </script>
  307. <script type="text/html" id="operateTpl">
  308. <a class="layui-btn layui-btn-info layui-btn-xs" id="operate{{d.id}}" lay-event="edit">取消选择</a>
  309. <span id="campele{{d.id}}" class="layui-hide">正在训练中</span>
  310. </script>
  311. {/block} {block name="js"}
  312. <script>
  313. layui.config({
  314. base: '__LAYUI__/',
  315. }).extend({
  316. index: 'lib/index' //主入口模块
  317. }).use(['index', 'jquery', 'table', 'tree', 'layer','element','form'], function() {
  318. var table = layui.table,
  319. tree = layui.tree,
  320. layer = layui.layer,
  321. $ = layui.jquery,
  322. element = layui.element,
  323. form = layui.form,
  324. localIds = [];
  325. //点击选择人员
  326. $(document).on('click','.leftcontentbox li',function(e){
  327. if (e.target.localName === 'i') {
  328. let o = $(this).next();
  329. if (o && o[0] && o[0].localName === 'ul') {
  330. if (!o[0].style.display || o[0].style.display == 'block') {
  331. o[0].style.display = 'none';
  332. e.target.className = "group layui-icon layui-icon-triangle-r"
  333. } else {
  334. o[0].style.display = 'block';
  335. e.target.className = "group layui-icon layui-icon-triangle-d"
  336. }
  337. }
  338. }
  339. if (!(e.target.localName == 'input')) {
  340. return;
  341. }
  342. sessionStorage.setItem('Dialog',true);
  343. //唯一class
  344. var perclass = $(this).data('perclass');
  345. //类型 per员工 org部门         
  346. var type = $(this).data('type');
  347. //选中/取消
  348. var c = $('.'+perclass).prop("checked");
  349. var res = c==true ? 1 : 0;
  350. //id
  351. var id = $(this).data('id');
  352. if (id>0) {
  353. var index = layer.load(1); //添加laoding,0-2两种方式
  354. $.ajax({
  355. url: '{:url("camp/training_object")}?id='+{:$id},
  356. data: {
  357. pid:id,type:type,res:res
  358. },
  359. type: 'get',
  360. success: function(res) {
  361. if (res.code==0) {
  362. if (c) {
  363. localIds.push(id);
  364. } else {
  365. localIds.splice(localIds.indexOf(id), 1);
  366. }
  367. window.parent.setCampFunc(localIds, {:$id});
  368. for (var i = res.data.length - 1; i >= 0; i--) {
  369. $('.'+res.data[i]).prop("checked",c);
  370. // $('.'+res.data[i]).attr("disabled",'disabled');
  371. }
  372. table.reload('LAY-employee-list', {});
  373. layer.close(index);
  374. }
  375. },
  376. error:function(res){
  377. layer.close(index);
  378. }
  379. });
  380. }
  381. })
  382. //右侧搜索按钮
  383. $('#right_search').click(function(){
  384. var keyword = $('#keyword').val();
  385. table.reload('LAY-employee-list', {
  386. where: {
  387. keyword: keyword
  388. }
  389. , page: { curr: 1 }
  390. });
  391. });
  392. //左侧搜索
  393. $('#left_search').click(function(){
  394. var keyword = $('#keyword_left_text').val();
  395. operate.struct(keyword);
  396. });
  397. //取消全部
  398. $('#all_del').click(function(){
  399. operate.edit(-1);
  400. });
  401. $("#activity-submit").click(function(){
  402. var index = parent.layer.getFrameIndex(window.name);
  403. var loadingIndex = layer.load('Loading...', {
  404. shade: [0.6,'#000'] //0.1透明度的白色背景
  405. });
  406. $.ajax({
  407. url: '{:url("camp/confirm_assigns")}',
  408. data: {
  409. id: {:$id}, empids: localIds.join(','),
  410. },
  411. type: 'post',
  412. success: function(res) {
  413. if (res.code==0) {
  414. layer.msg(res.msg, {
  415. anim: 0
  416. ,time: 1500
  417. }, function() {
  418. layer.close(loadingIndex);
  419. parent.layer.close(index);
  420. });
  421. } else {
  422. layer.msg(res.msg, {
  423. anim: 6
  424. ,time: 2000
  425. });
  426. }
  427. },
  428. });
  429. })
  430. //右侧选中人员列表
  431. var orgstrucUrl = '{:url("camp/class_assigns_list")}?id='+{:$id};
  432. table.render({
  433. elem: '#LAY-employee-list',
  434. url: orgstrucUrl,
  435. cols: [
  436. [{
  437. title: '序号',
  438. field: 'xh',
  439. width: '25%',
  440. align:'center',
  441. },
  442. {
  443. title: '姓名',
  444. field: 'name',
  445. width: '25%',
  446. align:'center',
  447. },{
  448. field: 'org_name',
  449. title: '部门',
  450. width: '25%',
  451. templet: '#operateTpls',
  452. align:'center',
  453. },
  454. {
  455. title: '操作',
  456. templet: '#operateTpl',
  457. width: '25%',
  458. align:'center',
  459. }
  460. ]
  461. ],
  462. page: true,
  463. limit: 10,
  464. height: 'full-160',
  465. limits: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
  466. text: '对不起,加载出现异常!',
  467. done: function(res) {
  468. for(let i = 0; i < res.data.length; i++) {
  469. let idStr = res.data[i]['id'];
  470. if (localIds.indexOf(idStr) < 0) {
  471. $(`#campele${idStr}`).removeClass('layui-hide');
  472. $(`#operate${idStr}`).addClass('layui-hide');
  473. } else {
  474. $(`#campele${idStr}`).addClass('layui-hide');
  475. $(`#operate${idStr}`).removeClass('layui-hide');
  476. }
  477. }
  478. }
  479. });
  480. table.on('tool(LAY-employee-list)', function (obj) {
  481. var data = obj.data;
  482. if (obj.event === 'edit') {
  483. operate.edit(data.id);
  484. }
  485. });
  486. var jiaojie = function(from, to, callback) {
  487. return $.ajax({
  488. type: 'post',
  489. url: '{:url("org/receive")}',
  490. data: {
  491. from: from,
  492. to: to
  493. },
  494. success: function(res) {
  495. callback(res)
  496. }
  497. })
  498. }
  499. var operate = {
  500. struct: function(keyword) {
  501. var that = this;
  502. that.send({'keyword':keyword}, '{:url("camp/get_person")}?id='+{:$id}, function(res) {
  503. if(res.code == 0) {
  504. $('.list').html(that.setStruct(res.data,res.checkOrg,res.orgs));
  505. } else {
  506. $('.list').html('<span>' + res.msg + '</span>');
  507. }
  508. $('.everydepart .checkdiv').click(function(e) {
  509.                             var type = $(this).parents('li').data('type');
  510.                             var perclass = $(this).parents('li').data('perclass');
  511.                             var orgclass = $(this).parents('li').data('orgclass');
  512.                             var c = $('.'+perclass).prop("checked");
  513.                             if (type=='per') {
  514.                                 $('.'+perclass).prop('checked',c);
  515.                                 if (c===false) {
  516.                                     console.log(orgclass);
  517.                                     $('.per_'+orgclass).prop('checked',false);
  518.                                 }
  519.                             }else{
  520.                                 $('.'+orgclass).prop('checked',c);
  521.                             }
  522.                         })
  523. });
  524. },
  525. send: function(data, url, callback) {
  526. if(data.length == 0) {
  527. return $.ajax({
  528. type: 'get',
  529. url: url,
  530. data: {'id':{$id}},
  531. success: function(res) {
  532. callback(res)
  533. }
  534. })
  535. }
  536. return $.ajax({
  537. type: 'post',
  538. url: url,
  539. data: data,
  540. success: function(res) {
  541. callback(res)
  542. }
  543. })
  544. },
  545. setStruct: function(data,checkOrg,orgs) {
  546. console.log(orgs);
  547. var that = this;
  548. var arr=checkOrg?checkOrg.split(','):[];
  549. var html = '<ul>';
  550. data.forEach(function(elem, index) {
  551. var flag=false;
  552. var type = elem.type=='org' ? true : false;
  553. html += '<li data-id="' + elem.id + '" data-level="' + elem.level + '" data-type='+elem.type+' data-perclass='+elem.per_class+' data-orgclass='+elem.org_class+'><div class="everydepart">';
  554. if(elem.children.length !== 0)
  555. html += '<i class="group layui-icon layui-icon-triangle-d"></i>';
  556. else
  557. html += '<i class="layui-icon layui-icon-user"></i>';
  558. html += '<span>' + elem.title + '</span>';
  559. if (!type) {
  560. for(var i in arr){
  561. if(arr[i]==elem.id){
  562. html += '<input data-did="' + elem.id + '" data-title="' + elem.title + '" data-class='+elem.class+' class="checkdiv '+elem.org_class+' '+elem.per_class+'" data-type="'+elem.type+'" type="checkbox" disabled="disabled" checked/></div>';
  563. flag=true;
  564. break;
  565. }
  566. }
  567. if(!flag){
  568. html += '<input data-did="' + elem.id + '" data-title="' + elem.title + '" data-class='+elem.class+' class="checkdiv '+elem.org_class+' '+elem.per_class+'" id="'+elem.class+'" data-type="'+elem.type+'" type="checkbox" /></div>';
  569. }
  570. } else {
  571. var org = false;
  572. $.each (orgs,function(k,v){
  573. if (elem.id==k && elem.count==v) {
  574. html += '<input data-did="' + elem.id + '" data-title="' + elem.title + '" data-class='+elem.class+' class="checkdiv '+elem.org_class+' '+elem.per_class+'" data-type="'+elem.type+'" type="checkbox" disabled="disabled" checked/></div>';
  575. org = true;
  576. }
  577. })
  578. if (!org) {
  579. if (elem.count==0) {
  580. html += '<input data-did="' + elem.id + '" data-title="' + elem.title + '" data-class='+elem.class+' class="checkdiv '+elem.org_class+' '+elem.per_class+'" data-type="'+elem.type+'" type="checkbox" disabled="disabled" checked/></div>';
  581. } else {
  582. html += '<input data-did="' + elem.id + '" data-title="' + elem.title + '" data-class='+elem.class+' class="checkdiv '+elem.org_class+' '+elem.per_class+'" id="'+elem.class+'" data-type="'+elem.type+'" type="checkbox" /></div>';
  583. }
  584. }
  585. }
  586. html += '</li>';
  587. if(elem.children.length > 0) {
  588. html += that.setStruct(elem.children,checkOrg,orgs);
  589. }
  590. });
  591. html += '</ul>';
  592. return html
  593. },
  594. edit:function(eid){
  595. layer.confirm('确定取消指派此员工?', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'] }, function (index) {
  596. $.ajax({
  597. url: '{:url("camp/training_object")}?id='+{:$id},
  598. data: {
  599. pid: eid, type: 'per', res: '0'
  600. },
  601. type: 'get',
  602. success: function(res) {
  603. if (res.code==0) {
  604. if (localIds.length) {
  605. localIds.splice(localIds.indexOf(eid), 1);
  606. window.parent.setCampFunc(localIds, {:$id});
  607. }
  608. for (var i = res.data.length - 1; i >= 0; i--) {
  609. $('.'+res.data[i]).prop("checked", false);
  610. }
  611. table.reload('LAY-employee-list', {});
  612. layer.close(index);
  613. }
  614. },
  615. error:function(res){
  616. layer.close(index);
  617. }
  618. });
  619. });
  620. }
  621. }
  622. // 结构初始化
  623. operate.struct();
  624. $('.addbtn').click(function(e) {
  625. var arr = $('#departinput').val() ? JSON.parse($('#departinput').val()) : {};
  626. for(var i = 0; i < $('.checkdiv').length; i++) {
  627. if($('.checkdiv')[i].checked) {
  628. arr[$($('.checkdiv')[i]).data('did')] = $($('.checkdiv')[i]).data('title');
  629. $($('.checkdiv')[i]).parents('.everydepart').css('display', 'none');
  630. }
  631. }
  632. var str = "";
  633. var len = 0;
  634. for(var j in arr) {
  635. len = len + 1;
  636. str += '<div class="everynowdepart">' +
  637. '<span>' + arr[j] + '</span>' +
  638. '<div data-did="' + j + '" class="del">删除</div>' +
  639. '</div >';
  640. }
  641. $('.departnum').html('已选择' + len + '个部门');
  642. $('.nowdepartbox').html(str);
  643. $('#departinput').val(JSON.stringify(arr));
  644. $('.del').click(function() {
  645. $(this).parents('.everynowdepart').remove();
  646. $('.departnum').html('已选择' + $('.nowdepartbox .everynowdepart').length + '个部门');
  647. var arr = $('#departinput').val() ? JSON.parse($('#departinput').val()) : {};
  648. for(var i = 0; i < $('.checkdiv').length; i++) {
  649. delete arr[$(this).data('did')];
  650. if($($('.checkdiv')[i]).data('did') == $(this).data('did')) {
  651. $($('.checkdiv')[i]).parents('.everydepart').css('display', 'block');
  652. }
  653. }
  654. $('#departinput').val(JSON.stringify(arr));
  655. })
  656. })
  657. $('.alldel').click(function() {
  658. $('.nowdepartbox').html('');
  659. $('.departnum').html('已选择0个部门');
  660. $('#departinput').val("");
  661. for(var i = 0; i < $('.checkdiv').length; i++) {
  662. $($('.checkdiv')[i]).parents('.everydepart').css('display', 'block');
  663. }
  664. })
  665. });
  666. </script>
  667. </body>
  668. {/block}