No Description

askRecords.html 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>索要记录</title>
  6. <script src="../Script/Common/huayi.load.js"></script>
  7. <link rel="stylesheet" href="../css/bootstrap-select.css">
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  10. <link rel="stylesheet" href="../css/init.css" />
  11. <style>
  12. #sqzx th {
  13. padding: 5px 8px 5px 0;
  14. text-align: right;
  15. width: 50px;
  16. }
  17. .select {
  18. width: 150px;
  19. background-color: #FFF;
  20. background-image: none;
  21. border: 1px solid #ccc;
  22. border-radius: 1px;
  23. color: inherit;
  24. padding: 6px 12px;
  25. }
  26. #sex {
  27. background-color: #FFF;
  28. background-image: none;
  29. border: 1px solid #ccc;
  30. border-radius: 1px;
  31. color: inherit;
  32. padding: 6px 12px;
  33. }
  34. input {
  35. background-color: #FFF;
  36. background-image: none;
  37. border: 1px solid #ccc;
  38. border-radius: 1px;
  39. color: inherit;
  40. padding: 6px 12px;
  41. }
  42. #sqzx td {
  43. padding: 6px 0 5px 10px;
  44. width: 150px;
  45. }
  46. .lxr ul li {
  47. float: left;
  48. list-style: none;
  49. width: 30%;
  50. margin-bottom: 5px;
  51. padding-top: 10px;
  52. }
  53. .clearFix:after {
  54. content: "";
  55. display: block;
  56. clear: both;
  57. }
  58. .form-group {
  59. padding-left: 40px;
  60. margin-bottom: 0;
  61. }
  62. textarea {
  63. height: 70px;
  64. border: 1px solid #ccc;
  65. border-radius: 1px;
  66. width: 50%;
  67. resize: none;
  68. }
  69. .textarea_box {
  70. margin-top: 10px;
  71. }
  72. .box_content {
  73. border-bottom: 1px solid #ccc;
  74. }
  75. .tj_content {
  76. border: 1px solid #e6e6e6;
  77. border-radius: 5px;
  78. }
  79. .t-shade {
  80. position: fixed;
  81. top: 0;
  82. left: 0;
  83. width: 100%;
  84. background: rgba(0, 0, 0, 0.48);
  85. z-index: 10004;
  86. display: none;
  87. }
  88. .lyxz .shade_k {
  89. z-index: 10005;
  90. width: 40%;
  91. left: 30%;
  92. position: absolute;
  93. background-color: rgb(255, 255, 255);
  94. box-shadow: rgba(0, 0, 0, 0.298039) 1px 1px 50px;
  95. margin: 20% auto;
  96. border-radius: 5px;
  97. }
  98. .shade_title {
  99. padding: 0 80px 0 20px;
  100. height: 42px;
  101. line-height: 42px;
  102. border-bottom: 1px solid #eee;
  103. font-size: 16px;
  104. color: #FFFFFF;
  105. overflow: hidden;
  106. background-color: #00a1cb;
  107. border-radius: 2px 2px 0 0;
  108. position: relative;
  109. border-top-left-radius: 5px;
  110. border-top-right-radius: 5px;
  111. }
  112. .cx {
  113. display: block;
  114. }
  115. .setwin {
  116. position: absolute;
  117. right: 15px;
  118. top: 5px;
  119. font-size: 0;
  120. line-height: initial;
  121. }
  122. .setwin a {
  123. position: relative;
  124. width: 16px;
  125. height: 16px;
  126. font-size: 20px;
  127. color: #fff;
  128. }
  129. .xg i {
  130. font-size: 16px;
  131. }
  132. .hidens {
  133. display: none;
  134. }
  135. .inpBox {
  136. border: 1px solid #cccccc;
  137. height: 31px;
  138. width: 220px;
  139. display: inline-block;
  140. position: relative;
  141. vertical-align: middle;
  142. position: absolute;
  143. left: 0px;
  144. top: 8px;
  145. z-index: 111;
  146. }
  147. .selDpart1{
  148. position: absolute;
  149. left: 0px;
  150. top: 30px;
  151. z-index: 11111;
  152. width: 220px;
  153. line-height: 30px;
  154. background: #FFFFFF;
  155. display: none;
  156. }
  157. #sponsor{
  158. width: 218px;
  159. border: 1px solid #00a1cb;
  160. margin: 0;
  161. padding: 0;
  162. list-style: none;
  163. max-height: 212px;
  164. overflow-x: hidden;
  165. overflow-y: scroll;
  166. }
  167. #sponsor li{
  168. margin: 0;
  169. padding-left: 10px;
  170. width: 220px;
  171. height: 30px;
  172. line-height: 30px;
  173. list-style: none;
  174. }
  175. #sponsor li:hover{
  176. background: #00a1cb;
  177. }
  178. .addTree {
  179. background: #fff;
  180. position: absolute;
  181. width: 100%;
  182. border: 1px solid darkgrey;
  183. right: 0;
  184. top: 29px;
  185. display: none;
  186. z-index: 222;
  187. }
  188. .xl {
  189. display: inline-block;
  190. background: url(../../img/dropDown.png) no-repeat;
  191. height: 100%;
  192. background-position: center center;
  193. width: 20px;
  194. position: absolute;
  195. right: 0;
  196. top: 0px;
  197. /* background-color: #f7bc8b; */
  198. cursor: pointer;
  199. }
  200. .ztree li span {
  201. border: none;
  202. padding: 0;
  203. }
  204. .inps {
  205. width: 217px;
  206. height: 29px;
  207. outline: none;
  208. border: 0;
  209. border-image-width: 0;
  210. padding: 0;
  211. padding-left: 3px;
  212. }
  213. .xl {
  214. display: inline-block;
  215. background: url(../img/dropDown.png) no-repeat;
  216. height: 100%;
  217. background-position: center center;
  218. width: 20px;
  219. position: absolute;
  220. right: 0;
  221. top: 0px;
  222. /* background-color: #f7bc8b; */
  223. cursor: pointer;
  224. }
  225. .Cleans {
  226. display: inline-block;
  227. width: 20px;
  228. position: absolute;
  229. right: 21px;
  230. top: 8px;
  231. display: none;
  232. }
  233. .Min-width {
  234. width: 150px;
  235. }
  236. .btn-default{
  237. background: #FFFFFF;
  238. color: #000000;
  239. }
  240. .tool_downs{
  241. display: flex;
  242. justify-content: center;
  243. }
  244. .tool_downs span{
  245. display: block;
  246. width: 100%;
  247. height: 100%;
  248. text-align: center;
  249. }
  250. .tool_downs a{
  251. display: block;
  252. list-style: none;
  253. float: left;
  254. padding-left: 10px;
  255. }
  256. .operation_list{
  257. width: 270px;
  258. }
  259. ul{
  260. padding: 0;
  261. }
  262. </style>
  263. </head>
  264. <body class="gray-bg">
  265. <div class="wrapper wrapper-content animated fadeInRight">
  266. <div class="daoHang clearfix">
  267. <div class="dhLeft">
  268. <sapn>
  269. <i class="syIcon"></i>位置:
  270. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  271. <a href="javaScript:;">知识库</a>&gt;
  272. <a href="" class="nowPosition">新版知识库索要记录</a>
  273. </sapn>
  274. </div>
  275. <div class="dhRight">
  276. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  277. </div>
  278. </div>
  279. <div style="padding: 10px;" class="tj_content clearFix">
  280. <div style="padding: 10px;" class="tj_content clearFix">
  281. <div>
  282. <div class="box_content">
  283. <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
  284. <tr>
  285. <th>关键字:</th>
  286. <td>
  287. <input type="text" placeholder="输入关键字" id="key" class="Min-width" />
  288. </td>
  289. <th>时间:</th>
  290. <td>
  291. <input type="text" id="starttime" class="Min-width" placeholder="请选择时间" style="height: 32px;" />
  292. </td>
  293. <th>紧急程度:</th>
  294. <td>
  295. <select class="select_" id="dealtype">
  296. <option value="">请选择</option>
  297. <option value="0">普通</option>
  298. <option value="1">紧急</option>
  299. </select>
  300. </td>
  301. <th>承办单位:</th>
  302. <td style="position: relative;">
  303. <div class="inpBox">
  304. <input type="text" class="inps" onkeyup="darptSearch()"/>
  305. <i class="Cleans fa fa-close"></i>
  306. <i class="xl xl_one"></i>
  307. <div class="addTree xlAdd">
  308. <ul id="addTreeDemo" class="ztree"></ul>
  309. </div>
  310. </div>
  311. <div class="selDpart1">
  312. <ul id="sponsor">
  313. </ul>
  314. </div>
  315. </td>
  316. </tr>
  317. <tr>
  318. <td style="padding: 15px 70px 30px 0px; text-align: right;" colspan="8">
  319. <botton class="btns Seach">搜索</botton>
  320. <botton class="btns add_record">添加</botton>
  321. <botton class="btns Remove">删除</botton>
  322. </td>
  323. </tr>
  324. </table>
  325. </div>
  326. </div>
  327. <div>
  328. <div style="width: 100%;padding: 10px;">
  329. <table id="orderlist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  330. <thead>
  331. <tr>
  332. <th data-checkbox="true"></th>
  333. <th data-field="F_Descript" data-formatter="GetCont" data-align="center">文本描述</th>
  334. <th data-field="F_Level" data-align="center" data-formatter="States">级别</th>
  335. <th data-field="F_DeptName" data-align="center">承办单位</th>
  336. <th data-field="F_CreateTime" data-align="center">添加时间</th>
  337. <th data-field="F_CreateUserName" data-align="center">添加人</th>
  338. <th data-field="F_SubmitUserName" data-align="center">提交人</th>
  339. <th data-field="F_SubmitTime" data-align="center">提交时间</th>
  340. <th data-field="F_LimitTime" data-align="center">时限</th>
  341. <th data-field="F_WorkOrderId" data-formatter="Dispose" data-align="center" class="operation_list">操作</th>
  342. </tr>
  343. </thead>
  344. <tbody class="list"></tbody>
  345. </table>
  346. </div>
  347. </div>
  348. </div>
  349. </div>
  350. <input type="hidden" id="PID" />
  351. <input type="hidden" id="Dpment" />
  352. </div>
  353. <script src="../js/bootstrap-select.js"></script>
  354. <script src="../js/laydate/laydate.js"></script>
  355. <script src="../My97DatePicker/WdatePicker.js"></script>
  356. <script src="../js/zTree/jquery.ztree.core.js"></script>
  357. <script src="../js/search/screen.js"></script>
  358. <script>
  359. $(document).ready(function () {
  360. load();
  361. var str = helper.request.queryString("str");
  362. var wid = helper.request.queryString("wid");
  363. if (wid) {
  364. $('#tel').val(wid);
  365. load();
  366. }
  367. laydate.render({
  368. elem: '#starttime' //指定元素
  369. ,range:'~'
  370. });
  371. load();
  372. });
  373. $("#orderlist").on("click-row.bs.table", function (e, row, ele) {
  374. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  375. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  376. });
  377. function getNowFormatDate() {
  378. var date = new Date( );
  379. var seperator1 = "-";
  380. var seperator2 = ":";
  381. var month = date.getMonth() + 1;
  382. var strDate = date.getDate();
  383. if (month >= 1 && month <= 9) {
  384. month = "0" + month;
  385. }
  386. if (strDate >= 0 && strDate <= 9) {
  387. strDate = "0" + strDate;
  388. }
  389. var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
  390. + " " + date.getHours() + seperator2 + date.getMinutes()
  391. + seperator2 + date.getSeconds();
  392. return currentdate;
  393. }
  394. //获取查询信息
  395. function load() {
  396. //先销毁表格
  397. $('#orderlist').bootstrapTable('destroy');
  398. //初始化表格,动态从服务器加载数据
  399. $("#orderlist").bootstrapTable({
  400. method: "get", //使用get请求到服务器获取数据
  401. url: huayi.config.callcenter_url + "Repository/GetListDemands", //获取数据的Servlet地址
  402. contentType: "application/x-www-form-urlencoded",
  403. striped: true, //表格显示条纹
  404. pagination: true, //启动分页
  405. pageSize: 10, //每页显示的记录数
  406. pageNumber: 1, //当前第几页
  407. pageList: [10, 20, 50, 100], //记录数可选列表
  408. search: false, //是否启用查询
  409. showColumns: false, //显示下拉框勾选要显示的列
  410. showRefresh: false, //显示刷新按钮
  411. sidePagination: "server", //表示服务端请求
  412. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  413. //设置为limit可以获取limit, offset, search, sort, order
  414. queryParamsType: "undefined",
  415. queryParams: function queryParams(params) { //设置查询参数
  416. //alert(params.pageNumber)
  417. var param = {
  418. page: params.pageNumber,
  419. pagesize: params.pageSize,
  420. stime: $('#starttime').val() && $('#starttime').val().split(' ~ ')[0], //=开始时间
  421. etime: $('#starttime').val() && $('#starttime').val().split(' ~ ')[1], //=结束时间
  422. deptid: $("#PID").val(),//承办单位id
  423. level: $("#dealtype").val(),//级别
  424. key:$('#key').val(),//关键字
  425. token: $.cookie("token")
  426. };
  427. return param;
  428. },
  429. onLoadSuccess: function (data) { //加载成功时执行
  430. // layer.msg("加载成功");
  431. //console.log(data);
  432. },
  433. onLoadError: function () { //加载失败时执行
  434. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  435. }
  436. });
  437. }
  438. //状态
  439. function States(val, row) {
  440. var html = '';
  441. switch (val + '') {
  442. case '0':
  443. html = '普通';
  444. break;
  445. case '1':
  446. html = '紧急';
  447. break;
  448. }
  449. return html;
  450. }
  451. function GetCont(val) {
  452. if (val) {
  453. var str = '<div '
  454. if (val.length > 30) {
  455. str = str + ' title="' + val + '" ';
  456. val = val.substr(0, 30) + "...";
  457. }
  458. return str + '>' + val + '</div>';
  459. } else {
  460. return '';
  461. }
  462. }
  463. //格式化操作
  464. function Dispose(val, row) {
  465. if(row.F_RepositoryId&&row.F_RepositoryId!=0){
  466. return '<div class="tool_downs">' +
  467. '<a href="javascript:;" class="aBtn" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="see_knowledge(' + row.F_RepositoryId +')" title="查看知识库">查看知识库</a>' +
  468. '<a href="javascript:;" class="aBtn" style="margin-left:0px;" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="btn_details(\'' + row.F_DemandsId + '\')" title="详情">详情</a>' +
  469. '</div>';
  470. }else{
  471. return '<div class="tool_downs">' +
  472. '<a href="javascript:;" class="aBtn" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="add_knowledge(' + row.F_DemandsId +','+row.F_Deptid+')" title="添加知识库">添加知识库</a>' +
  473. '<a href="javascript:;" class="aBtn" style="margin-left:0px;" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="btn_details(\'' + row.F_DemandsId + '\')" title="详情">详情</a>' +
  474. '<a href="javascript:;" class="aBtn" style="margin-left:0px;" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="btn_edit(\'' + row.F_DemandsId + '\')" title="编辑">编辑</a>' +
  475. '<a href="javascript:;" class="aBtn hide_btn" style="margin-left:0px;" authorize="yes" id="HY_delete_' + row.F_DemandsId + '" onclick="btn_delete(' + row.F_DemandsId + ')" title="删除">删除</a>' +
  476. '</div>';
  477. }
  478. }
  479. //查看知识库
  480. function see_knowledge(ids){
  481. //iframe窗
  482. layer.open({
  483. type: 2,
  484. title: '查看知识库详情',
  485. area: ['70%', '60%'],
  486. maxmin:true,
  487. content: 'newRepositoryDetail.html?ids='+ ids
  488. });
  489. }
  490. //添加到知识库
  491. function add_knowledge(str,deptid) {
  492. layer.open({
  493. type: 2,
  494. content: "newRepositoryAdd.html?wid=" + str +"&depId="+deptid, //iframe的url,no代表不显示滚动条
  495. title: '新增知识库',
  496. area: ['60%', '80%'], //宽高
  497. });
  498. }
  499. //查看详情
  500. function btn_details(str) {
  501. layer.open({
  502. type: 2,
  503. scrollbar: false,
  504. content: ["../CommonHtml/recordDatil.html?wid=" + str,'no'],//iframe的url,no代表不显示滚动条
  505. title: '记录详情',
  506. area: ['60%', '80%'], //宽高
  507. });
  508. }
  509. //编辑
  510. function btn_edit(str) {
  511. layer.open({
  512. type: 2,
  513. scrollbar: false,
  514. content: ["../CommonHtml/recordEdit.html?wid=" + str,'no'], //iframe的url,no代表不显示滚动条
  515. title: '编辑记录',
  516. area: ['60%', '80%'], //宽高
  517. });
  518. }
  519. //删除
  520. function btn_delete(str) {
  521. layer.confirm('确定删除记录?', {
  522. btn: ['是', '否'] //按钮
  523. }, function () {
  524. $.post(huayi.config.callcenter_url + "Repository/DelDemands", {
  525. ids: str,
  526. token: $.cookie("token")
  527. }, function (result) {
  528. result = JSON.parse(result);
  529. if (result.state.toLowerCase() == "success") {
  530. layer.msg("删除成功");
  531. $("#orderlist").bootstrapTable('refresh');
  532. }
  533. })
  534. });
  535. }
  536. //添加记录
  537. $('.add_record').on('click',function(){
  538. layer.open({
  539. type: 2,
  540. content: "../CommonHtml/addRecord.html" , //iframe的url,no代表不显示滚动条
  541. title: '添加记录',
  542. area: ['60%', '80%'], //宽高
  543. });
  544. })
  545. //上传文件
  546. function upload() {
  547. if (document.getElementById("upFile").files.length > 0) {
  548. var formData = new FormData();
  549. formData.append("upFile", document.getElementById("upFile").files[0]);
  550. formData.append("token", $.cookie("token"));
  551. $.ajax({
  552. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  553. type: "POST",
  554. data: formData,
  555. /**
  556. *必须false才会自动加上正确的Content-Type
  557. */
  558. contentType: false,
  559. /**
  560. * 必须false才会避开jQuery对 formdata 的默认处理
  561. * XMLHttpRequest会对 formdata 进行正确的处理
  562. */
  563. processData: false,
  564. success: function (result) {
  565. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  566. $("#upFile").change(function () {
  567. upload();
  568. });
  569. var r = $.parseJSON(result);
  570. if (r.state.toLowerCase() == "success") {
  571. $(".fjnr").text(r.data);
  572. $("#scfj").show();
  573. }
  574. }
  575. });
  576. } else {
  577. layer.confirm('请上传文件!', {
  578. btn: ['确定']
  579. });
  580. }
  581. }
  582. //批量删除Remove
  583. $(".Remove").click(function() {
  584. var ids = $.map($('#orderlist').bootstrapTable('getSelections'),
  585. function(row) {
  586. return row.F_DemandsId;
  587. });
  588. /*判断长度*/
  589. if(ids.length <= 0) {
  590. layer.confirm('没有可删除的选项!', {
  591. btn: ['确定'] //按钮
  592. });
  593. return;
  594. }
  595. layer.confirm('确定要删除吗?',{
  596. btn:['确定','取消']
  597. },function(){
  598. $.post(huayi.config.callcenter_url + "Repository/DelDemands", {
  599. ids: ids,
  600. token: $.cookie("token")
  601. }, function(result) {
  602. result = JSON.parse(result);
  603. if(result.state.toLowerCase() == "success") {
  604. layer.msg("删除成功");
  605. $("#orderlist").bootstrapTable('refresh');
  606. }
  607. })
  608. })
  609. });
  610. //来源
  611. function LY(obj) {
  612. obj.empty();
  613. obj.append('<option selected="selected" value="">请选择</option>');
  614. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  615. "token": $.cookie("token"),
  616. id: 1
  617. }, function (data) {
  618. if (data.state.toLowerCase() == "success") {
  619. var content = data.data;
  620. $(content).each(function (i, n) {
  621. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  622. })
  623. }
  624. })
  625. }
  626. //类别
  627. function LB(obj) {
  628. obj.empty();
  629. obj.append('<option selected="selected" value="">请选择</option>');
  630. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  631. "token": $.cookie("token"),
  632. id: 2
  633. }, function (data) {
  634. if (data.state.toLowerCase() == "success") {
  635. var content = data.data;
  636. $(content).each(function (i, n) {
  637. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  638. })
  639. }
  640. })
  641. }
  642. // 主题
  643. function ZT(obj) {
  644. obj.empty();
  645. obj.append('<option selected="selected" value="">请选择</option>');
  646. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  647. "token": $.cookie("token"),
  648. id: 3
  649. }, function (data) {
  650. if (data.state.toLowerCase() == "success") {
  651. var content = data.data;
  652. $(content).each(function (i, n) {
  653. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  654. })
  655. }
  656. })
  657. }
  658. function tree() {
  659. $.get(huayi.config.callcenter_url + 'Department/GetDeptList', {
  660. "token": $.cookie("token"),
  661. // "pid": pid
  662. }, function (result) {
  663. result = $.parseJSON(result);
  664. $.fn.zTree.init($("#addTreeDemo"), setting1, result.data); //实例化树形图
  665. });
  666. }
  667. var setting1 = {
  668. data: {
  669. key: {
  670. name: "F_DeptName"
  671. },
  672. simpleData: {
  673. enable: true,
  674. idKey: "F_DeptId",
  675. pIdKey: "F_PartentId",
  676. rootPId: 0
  677. }
  678. },
  679. callback: {
  680. onClick: zTreeOnClick
  681. }
  682. };
  683. function zTreeOnClick(event, treeId, treeNode) {
  684. if (treeNode.level >= 2) {
  685. $('.inps').val(treeNode.F_DeptName);
  686. $("#PID").val(treeNode.F_DeptId);
  687. $("#Dpment").val(treeNode.F_DeptId);
  688. $(".Cleans").show();
  689. }
  690. };
  691. function Close() {
  692. $(".lyxz").removeClass("cx");
  693. if ($('audio').length > 0) {
  694. $('audio')[0].pause();
  695. }
  696. }
  697. </script>
  698. </body>
  699. </html>