ws_dwff_specific.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. function nbListInit(sqid) {
  2. var url = document.getElementById("getNbListUrl").value;
  3. console.log("进来了");
  4. $.ajax({
  5. type: "post",
  6. url: url,
  7. async: true,
  8. data: {
  9. sqid: sqid
  10. },
  11. dataType: 'json',
  12. success: function (data) {
  13. if (data.result) {
  14. $.each(data.data, function (i, element) {
  15. var sj =
  16. "<span style='font-size: 12px;display:inline-block;width:46%; height:16px;line-height:16px;text-align:center;'>" +
  17. element.time.hours + ":" + element.time.minutes +
  18. "</span><span style='font-size: 12px;display:inline-block;width:46%; height:16px;line-height:16px;text-align:center;'>" +
  19. element.time.date + "\/" + (1 + element.time.month) + "</span>";
  20. var ynrid = "T-" + element.ynrid;
  21. if (element.ynrid.length != 0 && element.ynrid != 0) {
  22. var url = document.getElementById('lyUrl').value;
  23. url = wd.display.replaceDynamicParam(url, {
  24. 'id': ynrid
  25. });
  26. $('#nbSelected').append("<div wdObjectId='" + element.shid +
  27. "' class='list-background nb-Div' style=''><div class='nbLeft' style='overflow:hidden;max-width:780px'><span class='nbName list-dim' style='display: inline-block;float: left;width: 85px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;height:41px;line-height:41px;'>" +
  28. element.xm +
  29. "</span><span class='nbBt list-dim' style='float: left;display:inline-block;height:41px;line-height:41px;width:calc(100% - 265px);'>" +
  30. element.sm +
  31. "</span><input class='list-button' type='button' value='来源' onclick='" +
  32. url +
  33. "' /><div class='sj list-smallDim' style='float: right;margin-right: 10px;font-size: 0px;padding-top:12px;width:80px;'>" +
  34. sj + "</div></div><div class='nbRight'></div></div>");
  35. } else {
  36. var url = document.getElementById('lyUrl').value;
  37. url = wd.display.replaceDynamicParam(url, {
  38. 'id': ynrid
  39. });
  40. $('#nbSelected').append("<div wdObjectId='" + element.shid +
  41. "' class='list-background nb-Div' style='overflow:hidden;max-width:780px;'><div class='nbLeft'><span class='nbName list-dim' style='display: inline-block;float: left;width: 85px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;height:41px;line-height:41px;'>" +
  42. element.xm +
  43. "</span><span class='nbBt list-dim' style='float: left;display:inline-block;height:41px;line-height:41px;width:calc(100% - 265px);'>" +
  44. element.sm +
  45. "</span><div class='sj list-smallDim' style='float: right;margin-right: 10px;font-size: 0px;padding-top:12px;width:80px;'>" +
  46. sj + "</div></div><div class='nbRight'></div></div>");
  47. }
  48. });
  49. console.log("reload...");
  50. DM.getDrager().selectedList.reload();
  51. }
  52. }
  53. });
  54. }
  55. /*function nbListInit(sqid) {
  56. var url = document.getElementById("getNbListUrl").value;
  57. $.ajax({
  58. type: "post",
  59. url: url,
  60. async: true,
  61. data: {
  62. sqid: sqid
  63. },
  64. dataType:'json',
  65. success: function(data) {
  66. if(data.result) {
  67. $.each(data.data, function(i, element) {
  68. var sj = "<span style='font-size: 12px;display:inline-block;width:46%; height:16px;line-height:16px;text-align:center;'>"+element.time.hours + ":" + element.time.minutes + "</span><span style='font-size: 12px;display:inline-block;width:46%; height:16px;line-height:16px;text-align:center;'>" +element.time.date + "\/" + (1 + element.time.month)+"</span>";
  69. var ynrid = "T-" + element.ynrid;
  70. if(element.ynrid.length!=0&&element.ynrid!=0){
  71. var url = document.getElementById('lyUrl').value;
  72. url = wd.display.replaceDynamicParam(url, {
  73. 'id': ynrid
  74. });
  75. $('#nbUl').append("<li class='nbLi'><div class='nbLeft' style='overflow:hidden;max-width:780px'><input class='nbCheck' name='shidList' type='checkbox' style='float:left;margin-top:14px;margin-right:5px;' value='" + element.shid + "'/><span class="jdcheck"></span><span class='list-icon'></span><span class='nbName list-dim' style='display: inline-block;float: left;width: 85px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;height:41px;line-height:41px;'>" + element.xm + "</span><span class='nbBt list-dim' style='float: left;display:inline-block;height:41px;line-height:41px;width:calc(100% - 290px);'>" + element.sm + "</span><input class='list-button' type='button' value='来源' style='vertical-align:text-top' onclick='" + url + "' /><div class='sj list-smallDim' style='float: right;margin-right: 10px;font-size: 0px;padding-top:12px;width:80px;'>" + sj + "</div></div><div class='nbRight'></div></li>");
  76. }else{
  77. var url = document.getElementById('lyUrl').value;
  78. url = wd.display.replaceDynamicParam(url, {
  79. 'id': ynrid
  80. });
  81. $('#nbUl').append( "<div wdObjectId="+element.ynrid+" class='list-background' style='min-height: 41px;line-height: 41px;padding-left: 28px;width: calc(100% - 4px);box-sizing: border-box;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;'><span>"+element.xm+"</span></div>");
  82. }
  83. });
  84. DM.getDrager().selectedList.reload();
  85. DM.getDrager().optionList.reload();
  86. }
  87. }
  88. });
  89. }*/
  90. function getSelectedNb() {
  91. var shids = new Array();
  92. $('div.nb-Div').each(function (i, element) {
  93. if (!$(element).hasClass("list-checkedIcon")) {
  94. shids.push($(element).attr("wdobjectid"));
  95. }
  96. });
  97. return shids;
  98. }
  99. function updateUnCheckedSh() {
  100. var shids = getSelectedNb();
  101. /*$('input[name="shidList"]').not("input:checked").each(function(i, element) {
  102. shids.push(element.value);
  103. });20190308 11:09 cj*/
  104. var url = document.getElementById("updateShlbmUrl").value;
  105. $.ajax({
  106. type: "post",
  107. url: url,
  108. async: true,
  109. data: {
  110. "shids": shids
  111. },
  112. dataType: "json",
  113. traditional: true,
  114. success: function (data) {
  115. if (data.result) {
  116. console.info(data.data);
  117. }
  118. }
  119. });
  120. }
  121. function getRyidListParam() {
  122. //1、将单位领导和部门变成ryid集合
  123. var ryids = new Array();
  124. var bms = new Array();
  125. $("#rySelected").find("div.leader").each(function (i, element) {
  126. ryids.push(element.getAttribute("wdobjectid"));
  127. });
  128. $("#rySelected").find("div.bmList").each(function (i, element) {
  129. bms.push(element.getAttribute("wdobjectid"));
  130. });
  131. /*$('input[name="leader"]:checked').each(function(i, element) {
  132. ryids.push(element.value);
  133. });*/
  134. /*$('input[name="bm"]:checked').each(function(i, element) {
  135. bms.push(element.value);
  136. });*/
  137. var url = document.getElementById("toRyidUrl").value;
  138. var under = $('input[name="under"]:checked').size() == 0 ? false : true;
  139. $.ajax({
  140. type: "post",
  141. url: url,
  142. async: false,
  143. data: {
  144. "bms": bms,
  145. "under": under
  146. },
  147. dataType: "json",
  148. traditional: true,
  149. success: function (data) {
  150. if (data.result) {
  151. $.each(data.data, function (i, element) {
  152. ryids.push(element);
  153. });
  154. }
  155. }
  156. });
  157. //参数变换
  158. var ryidList = "";
  159. $.each(ryids, function (i, element) {
  160. ryidList += element + ",";
  161. });
  162. return ryidList.substring(0, ryidList.length - 1);
  163. }
  164. /**
  165. 学员查询中获得ryid
  166. **/
  167. function getRyidListParamForXy() {
  168. //获得已选id
  169. var yxids = [];
  170. $('#rySelected > div').each(function (i, d) {
  171. yxids.push($(d).attr('attr-id'));
  172. });
  173. //wsly
  174. var wsly = $('input[name="wslym"]').val();
  175. //查询获得
  176. var data = {};
  177. data.wslym = wsly;
  178. if (yxids.length)
  179. data.ids = yxids.toString();
  180. var url = $('#XyshiftRyidsUrl').val();
  181. var ryidList = "";
  182. $.ajax({
  183. type: "post",
  184. url: url,
  185. async: false,
  186. data: data,
  187. dataType: "json",
  188. traditional: true,
  189. success: function (data) {
  190. if (data.result) {
  191. var data = data.data;
  192. $.each(data, function (i, element) {
  193. ryidList += element + ",";
  194. });
  195. }
  196. }
  197. });
  198. return ryidList == "" ? "" : ryidList.substring(0, ryidList.length - 1);
  199. }
  200. /**
  201. 查询学员相关
  202. 班级 -- 家长
  203. 专业 -- 班级
  204. **/
  205. function queryXyRelated() {
  206. //获得已选的id集合
  207. var yxids = [];
  208. $('#column1 > li').each(function (i, d) {
  209. yxids.push($(d).attr('attr-id'));
  210. });
  211. //获得文书来源
  212. var wsly = $('input[name="wsly"]').val();
  213. var sid = $('select[name="sid"]').val();
  214. //
  215. var data = {};
  216. if (yxids.length)
  217. data.yxids = yxids.toString();
  218. data.wslym = wsly;
  219. data.sid = sid;
  220. var url = $('#queryRyUrl').val();
  221. $.post(url, data, function (data) {
  222. if (data.result) {
  223. var list = data.data;
  224. $("#column2").html('');
  225. $.each(list, function (i) {
  226. $("#column2").append('<li attr-id="' + list[i].id +
  227. '" class="item"><h2 class="handle dragList_margin">' + list[i].mc +
  228. '</h2> </li>');
  229. });
  230. initDrag();
  231. } else {
  232. console.info('has an error');
  233. }
  234. }, 'json');
  235. }
  236. //2018-10-31 cj
  237. // 批示工具初始化
  238. function commentToolInit() {
  239. var ynrid = null;
  240. var shid = document.getElementById('shid').value;
  241. // 1、判断审核表的ynrid是否存在,如果存在则使用loadCMSEditor重新编辑,如果不存在则使用loadCMSEditor新建
  242. $.ajax({
  243. type: "post",
  244. url: "/service?wdService=ajax_getShYnrid&wdToken=5",
  245. async: false,
  246. data: {
  247. shid: shid
  248. },
  249. dataType: "json",
  250. success: function (data) {
  251. if (!data['isNull']) {
  252. ynrid = data['ynrid'];
  253. // 3、存储ynrid
  254. document.getElementById('ynrid').value = ynrid;
  255. }
  256. }
  257. });
  258. // 2、加载内容
  259. if (ynrid) {
  260. console.info('edit');
  261. var nrid = "T-" + ynrid;
  262. wd.edit.loadCMSEditor('outDiv', {
  263. 'type': "edit",
  264. 'nrid': nrid,
  265. 'save': saveSh
  266. });
  267. } else {
  268. createCommentTool(); // 根据下拉框创建不同的批阅内容
  269. }
  270. }
  271. // 根据下拉框创建不同的批阅内容
  272. function createCommentTool() {
  273. var psType = document.getElementById('psType');
  274. var psVal = psType.value;
  275. var nrid = null;
  276. if (psVal == "440120100230") {
  277. console.info('create');
  278. nrid = wd.edit.loadCMSEditor('outDiv', {
  279. 'type': 'create',
  280. 'editorId': 'T-440120100230',
  281. 'save': saveSh
  282. });
  283. } else if (psVal == "440120100210") { // TODO 其他情况
  284. nrid = wd.edit.loadCMSEditor('outDiv', {
  285. 'type': 'create',
  286. 'editorId': 'T-440120100210',
  287. 'save': saveSh
  288. });
  289. } else if (psVal == "440120100250") {
  290. nrid = wd.edit.loadCMSEditor('outDiv', {
  291. 'type': 'create',
  292. 'editorId': 'T-440120100250',
  293. 'save': saveSh
  294. });
  295. }
  296. // 存储ynrid
  297. ynrid = nrid.substr(2);
  298. document.getElementById('ynrid').value = ynrid;
  299. }
  300. //打开弹层方法
  301. function openScreenLayer(src) {
  302. var topbody = $("body", window.top.document);
  303. var wdfs = topbody.find("#wdfullscreen"); //弹层的div
  304. if (wdfs.length < 1) {
  305. topbody.append("<div id='wdfullscreen' style='display:none'></div>");
  306. wdfs = topbody.find("#wdfullscreen");
  307. }
  308. wdfs.html("");
  309. wdfs.append("<link rel='stylesheet' type='text/css' id='uefullscreenstyle' href='/wd/js/ueditor/ueFull.css'>").show()
  310. wdfs.append(
  311. '<div class="uefullscreen"><input type="button" style="border: 1px solid #000000;" class="btn-list fulscrbtn fullButton" value="X" state="1" onClick="wd.display.closeDialog();"/><div class="fullscreen fullscreenSrc" ></div></div>'
  312. );
  313. wdfs.find(".fullscreen").html('<iframe frameborder=0 id="myIframe" src="' + src +
  314. '" width="" height="" style="width:1200px;height:800px;position: absolute;left: 50% !important;margin-left: -600px;)"></iframe>'
  315. );
  316. wdfs.find(".fulscrbtn").click(function (e) {
  317. wdfs.find('#myIframe')[0].contentWindow.saveEditor('outDiv');
  318. wdfs.find('#myIframe')[0].contentWindow.saveYnridToWsxd();
  319. wdfs.remove();
  320. });
  321. }
  322. function isGg(wsxdid) {
  323. var result = false;
  324. var url = document.getElementById("isGg").value;
  325. $.ajax({
  326. type: "post",
  327. url: url,
  328. async: false,
  329. data: {
  330. "wsxdid": wsxdid
  331. },
  332. dataType: "json",
  333. success: function (data) {
  334. if (data.result) {
  335. result = new Boolean(data.data);
  336. }
  337. }
  338. });
  339. return result;
  340. }
  341. // commentTool事件
  342. function commentToolEvent() {
  343. $('#psType').on('change', function (e) {
  344. createCommentTool();
  345. });
  346. }
  347. function otherEvent() {
  348. $('#mainText').click(function (e) {
  349. var src = document.getElementById("gg").value;
  350. openScreenLayer(src);
  351. });
  352. }
  353. // 将批示意见保存到审核表中
  354. function saveSh() {
  355. var shid = document.getElementById('shid').value;
  356. var sm = "";
  357. var textarea = $('#outDiv').find('textarea');
  358. if (textarea.size() > 0) {
  359. sm = textarea.get(0).value;
  360. zhFlag = false;
  361. }
  362. var ynrid = document.getElementById('ynrid').value;
  363. /*if(ynrid.trim().length <= 0) {
  364. return;
  365. }*/
  366. $.ajax({
  367. type: "post",
  368. url: "/service?wdService=ajax_updateSh&wdToken=5",
  369. async: false,
  370. data: {
  371. 'shid': shid,
  372. 'sm': sm,
  373. 'ynrid': ynrid, // 不带T-的内容id
  374. 'shlbm': 11
  375. },
  376. success: function (data) {
  377. console.info(data);
  378. }
  379. });
  380. }
  381. function thWsZwwj() {
  382. var wsid = document.getElementById('wsid').value;
  383. var wsxdid = document.getElementById('wsxdid').value;
  384. $.ajax({
  385. type: "post",
  386. url: "/service?wdService=ws_ps_thzwwj",
  387. async: true,
  388. data: {
  389. 'wsid': wsid,
  390. 'wsxdid': wsxdid
  391. },
  392. success: function (data) {
  393. console.info(data);
  394. }
  395. });
  396. }
  397. function compare(wsxdid) {
  398. var contrastStr1 = null;
  399. var contrastStr2 = null;
  400. $.ajax({
  401. type: "post",
  402. url: "/service?wdService=ws_sh_db_cx&wdToken=5",
  403. async: false,
  404. data: {
  405. 'wsxdid': wsxdid
  406. },
  407. dataType: "json",
  408. success: function(data) {
  409. if(data.result) {
  410. contrastStr1 = data.data.str1;
  411. contrastStr2 = data.data.str2;
  412. }
  413. }
  414. });
  415. $('body').append("<div id='wind' class='wd'></div>");
  416. diffInitUI({
  417. textboxId: "wind",
  418. leftHtml: contrastStr1,
  419. rightHtml: contrastStr2
  420. });
  421. console.info(33333);
  422. $('#wind').append("<span class='close'></span>");
  423. $('.close').on('click', function() {
  424. $('.wd').remove();
  425. });
  426. }
  427. /*
  428. function compare(wsxdid) {
  429. var contrastStr1 = null;
  430. var contrastStr2 = null;
  431. $.ajax({
  432. type: "post",
  433. url: "/service?wdService=ws_sh_db_cx&wdToken=5",
  434. async: false,
  435. data: {
  436. 'wsxdid': wsxdid
  437. },
  438. dataType: "json",
  439. success: function (data) {
  440. if (data.result) {
  441. contrastStr1 = data.data.str1;
  442. contrastStr2 = data.data.str2;
  443. }
  444. }
  445. });
  446. var diffUrl = $("#diffurl").val();
  447. var json = JSON.parse('{"str1":"'+contrastStr1.replace(/\"/g,"'").replace(/\t/g," ").replace(/&nbsp;/g," ").replace(/&quot;/g,"'")+'","str2":"'+contrastStr2.replace(/\"/g,"'").replace(/\t/g," ").replace(/&nbsp;/g," ").replace(/&quot;/g,"'")+'"}');
  448. diffUrl = wd.display.replaceDynamicParam(diffUrl,json);
  449. eval(diffUrl);
  450. }
  451. */
  452. //2018-11-1 cj
  453. //zgzButton全选
  454. function allCheckEvent() {
  455. var arr = "";
  456. if ($('input[name="qx"][type="button"]').attr("class").indexOf("content-onButton") > -1) {
  457. $("input[name='bm'][type='checkbox']").each(function () {
  458. arr += $(this).val() + ",";
  459. });
  460. wd.edit.onoffEdit("bm", arr);
  461. } else {
  462. wd.edit.onoffEdit("bm", "");
  463. }
  464. }
  465. //2018-11-06
  466. //会签合稿节点
  467. /**
  468. * 合稿的版本
  469. */
  470. function versionListInit() {
  471. //1、使用treetable
  472. $('#versionList').treetable({
  473. expandable: true
  474. });
  475. //2、添加versionList的点击事件
  476. $("#versionList").on("click", "tr", function () {
  477. $(".list-checkedIcon").not(this).removeClass("list-checkedIcon");
  478. $(this).toggleClass("list-checkedIcon");
  479. var zwwj = $(this).attr("data-zwwj");
  480. if (zwwj != null && zwwj.trim().length > 0) {
  481. var url = document.getElementById("getZwwjUrl").value;
  482. $.ajax({
  483. type: "post",
  484. url: url,
  485. data: {
  486. 'zwwj': zwwj
  487. },
  488. async: false,
  489. success: function (data) {
  490. //加载其他的内容
  491. UE.getEditor("selectZwEdit").setContent(data);
  492. }
  493. });
  494. }
  495. });
  496. }
  497. //2018-11-08 cj搬运工
  498. var num = 0;
  499. var ondiv = false;
  500. var ontips = false;
  501. var hideTime = null;
  502. var islock = false;
  503. function versionListInit2() {
  504. //1、使用treetable
  505. /*$('#bmxdSelected').treetable({
  506. expandable: true
  507. });*/
  508. //2、添加versionList的点击事件
  509. $("#bmxdSelected>div>span.icon-unchecked").on("click", function () {
  510. var zwwj = $(this).parent().attr("data-zwwj");
  511. var xdsj = $(this).parent().attr("data-xdsj");
  512. var beforeZwwj = $("#beforeVersion").val();
  513. var beforeXdsj = $("#beforeXdsj").val();
  514. if($(this).hasClass("icon-checked")){
  515. $(this).attr("class", "icon-unchecked");
  516. num--;
  517. var this_ = this;
  518. $(this).parent().siblings().each(function (i,e) {
  519. if($($(e).children().get(0)).hasClass("icon-checked")){
  520. zwwj = $(e).attr("data-zwwj");
  521. xdsj = $(e).attr("data-xdsj");
  522. return false;
  523. }
  524. });
  525. }else{
  526. $(this).attr("class", "icon-checked");
  527. num++;
  528. }
  529. /*if ($(this).parent().attr("data-zwwj") == $("#beforeVersion").val() && num == 1) {
  530. $(this).parent().attr("class", "list-checkedIcon");
  531. $("#beforeVersion").val(zwwj);
  532. $("#beforeXdsj").val(xdsj);
  533. return;
  534. }*/
  535. /*$(this).parent().siblings().each(function () {
  536. if ($(this).parent().attr("class") == "list-background") {
  537. $(this).parent().attr("class", "list-background");
  538. } else {
  539. $(this).parent().attr("class", "list-checkedIcon");
  540. }
  541. });*/
  542. if (num == 2) {
  543. var beforeContent = getZwByZwwj(beforeZwwj);
  544. var selectContent = getZwByZwwj(zwwj);
  545. if (beforeXdsj > xdsj) {
  546. diffInitUI({
  547. textboxId: "compareDiv",
  548. leftHtml: beforeContent,
  549. rightHtml: selectContent
  550. });
  551. } else {
  552. diffInitUI({
  553. textboxId: "compareDiv",
  554. leftHtml: selectContent,
  555. rightHtml: beforeContent
  556. });
  557. }
  558. } else {
  559. diffInitUI({
  560. textboxId: "compareDiv",
  561. leftHtml: "",
  562. rightHtml: ""
  563. });
  564. }
  565. if (num == 3) {
  566. num = 1;
  567. $(this).parent().siblings().each(function (i,e) {
  568. $($(e).children().get(0)).attr("class", "icon-unchecked");
  569. });
  570. $(this).attr("class", "icon-checked");
  571. }
  572. $("#beforeVersion").val(zwwj);
  573. $("#beforeXdsj").val(xdsj);
  574. });
  575. //显示头像
  576. //3、添加versionList的悬停事件
  577. $(".smname").on("mouseenter mouseleave", function (enent) {
  578. if (event.type == "mouseover") {
  579. if(!islock){
  580. $(".tips").remove();
  581. ondiv = true;
  582. tips($(this));
  583. $(".flashMsg-lockButton").on("click",function(){
  584. islock = true;
  585. $(".flashMsg-lockButton").hide();
  586. $(".flashMsg-closeButton").show();
  587. })
  588. $(".flashMsg-closeButton").on("click",function(){
  589. islock = false;
  590. $(".flashMsg-closeButton").hide();
  591. $(".flashMsg-lockButton").show();
  592. $(".tips").remove();
  593. ondiv = false;
  594. ontips = false;
  595. // var hideTime = null;
  596. })
  597. }
  598. } else if (event.type == "mouseout") {
  599. ondiv = false;
  600. $(".tips").on("mouseenter",function(){
  601. ontips = true;
  602. });
  603. $(".tips").on("mouseleave",function(){
  604. ontips = false;
  605. if(!ondiv && !ontips && !islock){
  606. $(".tips").remove();
  607. }
  608. })
  609. hideTime = setTimeout(function(){
  610. if(!ondiv && !ontips && !islock){
  611. $(".tips").remove();
  612. }
  613. }, 100);
  614. }
  615. });
  616. }
  617. /*
  618. 文书会签合稿页面的对比函数
  619. */
  620. function hgCompare(versionPath){
  621. let zwwj = $("#wszwwj").val();
  622. var beforeContent = getZwByZwwj(versionPath);
  623. var selectContent = getZwByZwwj(zwwj);
  624. diffInitUI({
  625. textboxId: "compareDiv",
  626. leftHtml: beforeContent,
  627. rightHtml: selectContent
  628. });
  629. }
  630. function tips(obj) {
  631. var left = $(obj).offset().left;
  632. var top = $(obj).offset().top;
  633. var height = $(obj).height();
  634. var imgPath = $(obj).attr('data-ysz');
  635. if($(obj).attr('data-sm') == ""){
  636. var sm = "";
  637. }else{
  638. var sm = '<div id="wdhelpdialog" class="flashMsg-div help-size-m" style="position:relative"><div style="text-align:left;display:inline-block;min-height:25px;"><span style="display:inline-block;text-align:center;margin-bottom:5px">'+$(obj).attr('data-bmmc')+'</span></div><div class="flashMsg-down"></div><div class="flashMsg-title" style="position:absolute;top:6px;right:20px;"><div title="已锁定" class="flashMsg-lockButton" style="display: block;"></div><div title="关闭" class="flashMsg-closeButton" style="display: none;"></div></div><div class=""><p class="smallHelp-text">'+$(obj).attr('data-sm')+'</p></div></div>'
  639. }
  640. var tipHtml;
  641. if(imgPath&&imgPath.indexOf("..")>-1){
  642. imgPath = getDataUrl+"&path="+encodeURIComponent(imgPath);//getDataUrl是在部件里面声明的变量
  643. tipHtml = '<div class="tips" id="tips" style="position: absolute;left: ' + (left + 5) + 'px; z-index: 999999999999999;">'+
  644. '<div class="personalPhoto-small" style="margin-left:16px;float:none;">' +
  645. '<img src="' + imgPath + '" />'+
  646. '</div>' + sm + '</div>';
  647. }else{
  648. tipHtml = '<div class="tips" id="tips" style="position: absolute;left: ' + (left + 5) + 'px; z-index: 999999999999999;">'+
  649. '<div class="personalPhoto-small" style="margin-left:16px;float:none;">' +
  650. '<img src="' + imgPath + '" />'+
  651. '</div>' + sm + '</div>';
  652. }
  653. $("body").append(tipHtml);
  654. var tipsHeight = $(".tips").height();
  655. $(".tips").css({
  656. "top":(top - tipsHeight + 5 ) + "px"
  657. })
  658. // console.log("tipsHeight---------------|" + tipsHeight)
  659. }
  660. function getZwByZwwj(zwwj) {
  661. var zwContent = "";
  662. if (zwwj != null && zwwj.trim().length > 0) {
  663. var url = document.getElementById("getZwwjUrl").value;
  664. $.ajax({
  665. type: "post",
  666. url: url,
  667. data: {
  668. 'lj': zwwj
  669. },
  670. async: false,
  671. success: function (data) {
  672. //加载其他的内容
  673. zwContent = data;
  674. }
  675. });
  676. }
  677. return zwContent;
  678. }