indexNew3.js 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548
  1. sp.setCssSkin(); //皮肤换色GlWorkPlatform-username
  2. var get_userid = $.cookie("GlWorkPlatform-userid"); //获取userid
  3. var get_username = $.cookie("GlWorkPlatform-username"); //获取英文名
  4. var get_chineseName = decodeURI($.cookie("GlWorkPlatform-chineseName")); //获取中文名
  5. var UserRole = "";
  6. document.addEventListener("visibilitychange", function () {
  7. //if (document.visibilityState == "visible") {
  8. // if ($("#spanAdminUserId").val() != $.cookie("GlWorkPlatform-userid")) {
  9. // var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">温馨提示</span></span>";
  10. // var dialogBody = "<div class=\"sp-dialog-body\">有新用户登入,当前用户为" + decodeURI($.cookie("GlWorkPlatform-chineseName")) + "!</div>";
  11. // var dialogFoot = "<div class=\"sp-dialog-foot\"><input id='delDataTrue' type='button' value='确 认' class='sp-dialog-btnTrue' /></div>";
  12. // $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
  13. // sp.openDLTX(".sp-dialog");
  14. // $("#delDataTrue").click(function () {
  15. // window.location.reload()
  16. // });
  17. // }
  18. //}
  19. })
  20. if (get_userid == null || get_userid == "" || get_userid == "undefined") {
  21. window.location.href = "login.html";
  22. }
  23. //判断从哪里进来,只有从登录页进来才可以
  24. var get_sessionStorage = sessionStorage.getItem("GlWorkPlatform-LoginFrom");
  25. if (get_sessionStorage == null || get_sessionStorage == "" || get_sessionStorage == "undefined") {
  26. window.location.href = "login.html";
  27. } else {
  28. $("#spanAdminUserId").val(get_userid);
  29. $("#spanAdminUserName").text(get_chineseName);
  30. }
  31. //退出
  32. function btnLoginOut() {
  33. $.cookie("GlWorkPlatform-userid", null, {path: '/', expires: -1});
  34. $.cookie("GlWorkPlatform-username", null, {path: '/', expires: -1});
  35. $.cookie("GlWorkPlatform-chineseName", null, {path: '/', expires: -1});
  36. $.cookie("GlWorkPlatform-photo", null, { path: '/', expires: -1 });
  37. $.cookie("GlWorkPlatform-onlineUsers", null, { path: '/', expires: -1 });
  38. sessionStorage.removeItem("GlWorkPlatform-LoginFrom");
  39. localStorage.removeItem("GlWorkPlatform-openfileArray"); ////清空保存菜单文件的变量
  40. localStorage.removeItem("GlWorkPlatform-setLeftBarClickID");
  41. localStorage.removeItem("GlWorkPlatform-userInfoJsonStr");
  42. //socket.close()
  43. window.location.href = "login.html"//"http://10.233.22.218/sy/#/sso?token=" + localStorage.getItem("main-token");
  44. };
  45. //判断是否是第一次进入这个系统,即是否为空库
  46. function checkIsEmptyDatabase() {
  47. $.ajax({
  48. type: "get",
  49. url: apiurljs.login + "connect/isemptydatabase",
  50. //data: { action: "fadetail", userid: userid, routeinfoid: routeinfoid },
  51. dataType: "json",
  52. ContentType: 'application/x-www-form-urlencoded',
  53. success: function (obj) {
  54. var res = strToJson(s4.decryptData_CBC(obj.data));
  55. //console.log(JSON.stringify(res.data));
  56. document.getElementsByTagName("title")[0].innerText = res.data.SYSNAME;
  57. //$(".sp-wrapper-head-title span").html(res.data.SYSNAME);
  58. $.cookie("GlWorkPlatform-SYSNAME", res.data.SECTION, {path: '/', expires: 1});
  59. },
  60. error: function (XMLHttpRequest, textStatus, errorThrown) {
  61. console.log(errorThrown);
  62. }
  63. });
  64. };
  65. //为保证页面显示效果,判断浏览器版本是否过低
  66. function checkIEVersion() {
  67. var getjson = sp.getExplorerInfo();
  68. if (getjson.type == "IE") {
  69. if (getjson.version == "8.0" || getjson.version == "7.0" || getjson.version == "6.0") {
  70. $("#checkIEVersionDiv").text("您当前使用的是" + getjson.type + "浏览器 版本:" + getjson.version + ",版本过低,请更新IE浏览器或使用其他浏览器");
  71. $("#checkIEVersionDiv").show();
  72. //然后跳到需要连接的下载网站
  73. //window.location.href="http://jiaoxueyun.com/download.jsp";
  74. }
  75. }
  76. }
  77. //20分钟不操作退出登录
  78. //$(function () {
  79. // var TimeNum = new Date().getTime();
  80. // //mousedown() 监听鼠标是否使用 keydown() 监听键盘是否可用
  81. // $(document).mousedown(function () {
  82. // TimeNum = new Date().getTime();
  83. // }).keydown(function () {
  84. // TimeNum = new Date().getTime();
  85. // }).mousemove(function () {
  86. // TimeNum = new Date().getTime();
  87. // });
  88. // //setInterval用来判断 当前时间之差
  89. // setInterval(function () {
  90. // if ($.cookie("GlWorkPlatform-TimeNum") != '' && $.cookie("GlWorkPlatform-TimeNum") != null) {
  91. // TimeNum = new Date($.cookie("GlWorkPlatform-TimeNum")).getTime();
  92. // }
  93. // //这里判断按键或鼠标 事件是否触发了
  94. // var TimeCount = new Date().getTime();
  95. // console.log(TimeCount,TimeNum)
  96. // //var minutes = Math.floor((TimeCount - TimeNum) / (60 * 1000));
  97. // var minutes = Math.floor((TimeCount - TimeNum) / (1 * 1000));
  98. // //如果两个时间差大于20分钟
  99. // if (minutes >= 20 || $.cookie("GlWorkPlatform-userid")==null||$.cookie("GlWorkPlatform-userid")==undefined) {
  100. // var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">温馨提示</span></span>";
  101. // var dialogBody = "<div class=\"sp-dialog-body\">您已经20秒没有操作了,请重新登录!</div>";
  102. // var dialogFoot = "<div class=\"sp-dialog-foot\"><input id='delDataTrue' type='button' value='确 认' class='sp-dialog-btnTrue' /></div>";
  103. // $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
  104. // //sp.openDLTX(".sp-dialog");
  105. // ///取消按钮
  106. // $('.sp-closeDialog').click(function (event) {
  107. // sp.closeCenter(".sp-dialog");
  108. // event.preventDefault();
  109. // event.stopPropagation();
  110. // });
  111. // //post消息的id
  112. // $("#delDataTrue").click(function () {
  113. // sp.closeCenter(".sp-dialog");
  114. // //$.cookie("GlWorkPlatform-userid", null, { path: '/', expires: -1 });
  115. // //$.cookie("GlWorkPlatform-username", null, { path: '/', expires: -1 });
  116. // //$.cookie("GlWorkPlatform-chineseName", null, { path: '/', expires: -1 });
  117. // //$.cookie("GlWorkPlatform-photo", null, { path: '/', expires: -1 });
  118. // //$.cookie("GlWorkPlatform-onlineUsers", null, { path: '/', expires: -1 });
  119. // //sessionStorage.removeItem("GlWorkPlatform-LoginFrom");
  120. // //localStorage.removeItem("GlWorkPlatform-openfileArray");
  121. // //localStorage.removeItem("GlWorkPlatform-setLeftBarClickID");
  122. // //localStorage.removeItem("GlWorkPlatform-userInfoJsonStr");
  123. // ////socket.close()
  124. // //window.location.href = 'login.html';
  125. // });
  126. // }
  127. // }, 1000);
  128. //})
  129. checkIsEmptyDatabase();
  130. checkIEVersion();
  131. //被邀请加入共享沟通
  132. var userMsg = {userid: get_userid, username: get_chineseName};
  133. if (apiurljs.meetingFlag == true) {
  134. var socket = io.connect(apiurljs.wsio, {path: apiurljs.wspath})
  135. window.socket = socket;
  136. var meetingData = new Object;
  137. socket.emit('userReg', userMsg);
  138. socket.on('error', function (data) {
  139. console.log(JSON.stringify(data) + ' - error');
  140. });
  141. socket.on('disconnect', function (data) {
  142. //失去连接的事件
  143. console.log(JSON.stringify(data) + ' - disconnect');
  144. });
  145. socket.on('reconnect', function (data) {
  146. //重新连接的事件
  147. console.log(JSON.stringify(data) + ' - reconnect');
  148. socket.emit('userReg', userMsg);
  149. });
  150. socket.on('invitemeeting', function (data) {
  151. meetingData = data;
  152. $("#meetingMsg").html("<a title='【" + meetingData.title + "】的沟通会议邀请' onclick='joinMeeting()'>【" + meetingData.title + "】的沟通会议邀请</a>");
  153. $("#meetingMsg").show();
  154. var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">系统提示</span><span class=\"sp-dialog-close sp-closeDialog\" title=\"关闭\">×</span></span>";
  155. var dialogBody = "<div class=\"sp-dialog-body\">您有一个【" + meetingData.title + "】的沟通会议邀请,确认后跳转到沟通会议室。<br/>如暂时不进入会议室,可以稍后在个人消息列表中选择进入。</div>";
  156. var dialogFoot = "<div class=\"sp-dialog-foot\"><input id='joinInMeet' type='button' value='确 认' class='sp-dialog-btnTrue' /><input type='button' value='取 消' class='sp-dialog-btnCancle closeDialog' /></div>";
  157. $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
  158. sp.openCenter(".sp-dialog");
  159. $(".closeDialog").click(function (event) {
  160. sp.closeCenter(".sp-dialog");
  161. event.preventDefault();
  162. event.stopPropagation();
  163. });
  164. $("#joinInMeet").click(function () {
  165. sp.dialoghide();
  166. joinMeeting();
  167. });
  168. });
  169. }
  170. function joinMeeting() {
  171. $("#meetingMsg").hide();
  172. var data = meetingData;
  173. var time = new Date().valueOf();
  174. $.cookie("wb_data" + time, JSON.stringify({
  175. meetingid: data.meetingid,
  176. masterid: data.masterid,
  177. mastername: data.mastername,
  178. userid: data.touserid,
  179. username: data.tousername,
  180. title: data.title,
  181. pdf: data.pdf,
  182. wsio: apiurljs.wsio,
  183. wspath: apiurljs.wspath,
  184. uploadUrl: data.uploadUrl,
  185. AccessToken: data.AccessToken,
  186. routeinfoid: data.routeinfoid
  187. }), {path: '/', expires: 1});
  188. window.sp.addTabNav("GXGT", "共享沟通", "meeting/chat.html?wb_ts=" + time);
  189. setTimeout(function () {
  190. $.cookie("wb_data" + time, null, {path: '/', expires: -1});
  191. //document.getElementById('wrapper_tabs_box_col_GXGT').childNodes[0].contentWindow.postMessage({
  192. // masterid: data.masterid,
  193. // touserid: data.touserid,
  194. // tousername: data.tousername,
  195. // title: data.title,
  196. // pdf: data.pdf,
  197. // meetingid: data.meetingid,
  198. // uploadUrl: data.uploadUrl,
  199. // AccessToken: data.AccessToken,
  200. // routeinfoid: data.routeinfoid
  201. //}, "*")
  202. }, 5000)
  203. }
  204. // 消息弹窗
  205. function openModal(num) {
  206. console.log(num)
  207. var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">系统提示</span><span id='closeModal' class=\"sp-dialog-close sp-closeDialog\" title=\"关闭\">×</span></span>";
  208. var dialogBody = "<div class=\"sp-dialog-body\" style='height: 300px'>当前在线人数已超过" + num + "人!</div>";
  209. var dialogFoot = "<div class=\"sp-dialog-foot\"><input id='okModal' type='button' value='确 认' class='sp-dialog-btnTrue' /></div>";
  210. $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
  211. // $('#spWrapperTabsPart').html("<div class='sp-dialog'>" + dialogHead + dialogBody + dialogFoot + "</div>");
  212. $('.sp-dialog').css('width', '600px');
  213. sp.openCenter(".sp-dialog");
  214. $(".closeDialog").click(function (event) {
  215. sp.closeCenter(".sp-dialog");
  216. event.preventDefault();
  217. event.stopPropagation();
  218. });
  219. //关闭
  220. $("#closeModal").click(function () {
  221. sp.dialoghide();
  222. });
  223. // 下一步操作
  224. $("#okModal").click(function () {
  225. sp.dialoghide();
  226. // 后续逻辑
  227. });
  228. }
  229. window.onmessage = function (event) {
  230. if (event.data == "close") {
  231. $("#wrapper_tabs_menu_li_GXGT").prev("li").addClass("sp-wrapper-tabs-current").show();
  232. $("#wrapper_tabs_box_col_GXGT").prev(".sp-wrapper-tabs-box-col").addClass("sp-wrapper-tabs-box-current").show();
  233. $("#wrapper_tabs_menu_li_GXGT").remove();
  234. $("#wrapper_tabs_box_col_GXGT").remove();
  235. }
  236. if (typeof (event.data) == "object") {
  237. console.log(event.data);
  238. sp.addTabNav(event.data.id, event.data.title, event.data.src)
  239. }
  240. }
  241. //左侧的动态新动态菜单采用angularJS的方式渲染
  242. var app = angular.module('app', []);
  243. app.controller("leftPartCtrl", ["$scope", "$http", "$interval", "$timeout", function ($scope, $http, $interval, $timeout) {
  244. var self = this;
  245. var s4 = new SM4Util();
  246. self.userId = $.cookie("GlWorkPlatform-userid");
  247. self.engName = $.cookie("GlWorkPlatform-username");
  248. self.userName = $.cookie("GlWorkPlatform-chineseName");
  249. self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken");
  250. self.ctime = $.cookie("CrossPage-ctime");
  251. localStorage.setItem("main-token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0ODgxODg1ZDhiMWVjNTQ1MDE4YjI3MDNmOGIzMjdmYyIsImFwcE5hbWUiOiJPQeWKnuWFrOeuoeeQhiIsImFwcENvZGUiOiJvYWJnZ2wiLCJ0eXBlIjoiVVNFUl9QQVNTV09SRCIsInVzZXJOYW1lIjoi5L2P5bu6566h55CG5ZGYT0HnlKgiLCJ1c2VySWQiOiI0ODgxODg1ZDhiMWVjNTQ1MDE4YjI3MDNmOGIzMjdmYyIsInNlY3JldExldmVsIjowLCJyYW5kb20iOiJYWFJXaTkiLCJsb2dpbk5hbWUiOiJ6aHVqaWFuYWRtaW4iLCJhcHBJZCI6IjhhNTAyYzhlODVmNjFkNmIwMTg2MmFiZDc4NzIyNTNhIiwiRHNwVG9rZW4iOiIyMDYxYjM2NmFkZjkzZDI3OWIzZDk3NDU3ZjUwYmQyYTlhMWZiZGVlNTgyYTZlMmI0NTE2ZmJjNGIxNDM1NTM0MmQ5MTQ2YjFhMWRhYmJiMiIsImV4cCI6MTcxNTkyOTI3NCwiaWF0IjoxNzE1OTI1Njc0fQ.ovQVPFaP2TS5UBCfF6dRkbKXiHA83EBrXJ2bO_niBco")
  252. self.outToken = localStorage.getItem("main-token");
  253. $interval(function(){
  254. var data = {
  255. token: self.outToken
  256. }
  257. $http.post(apiurljs.login + "g2app/usercertification/loginToken", JSON.stringify(data), postCfg)
  258. .success(function (obj) {
  259. var res = strToJson(s4.decryptData_CBC(obj.data));
  260. if (res.success == true) {
  261. localStorage.setItem("main-token", res.data)
  262. }
  263. })
  264. }, 21600000)
  265. ///增加设备标识
  266. localStorage.setItem("tjJxtGoldenlinkWork-deviceType", "pc");
  267. //左侧动态赋值高度
  268. var bodyHeight = $(window).height();
  269. $(".sp-menu-list").height(bodyHeight - 115);
  270. ///20230222--修改左侧菜单
  271. self.bindSetMenuSwitch = function () {
  272. if ($(".sp-menu-switch").hasClass("hasClick")) {
  273. $(".sp-menu-switch").removeClass("hasClick");
  274. $(".sp-menu-list").fadeIn(200);
  275. } else {
  276. $(".sp-menu-switch").addClass("hasClick");
  277. $(".sp-menu-list").fadeOut(200);
  278. }
  279. };
  280. /////点击桌面设置,打开并跨域发送消息打开设置弹出层--zyg--20230426
  281. self.btnSetDesktop = function () {
  282. ////sp.addTabNav('FZ0', '工作桌面', 'tpl/_indexgmt/index_2.html');
  283. var id = 'FZ0';
  284. var setID = "wrapper_tabs_box_col_" + id;
  285. $("#spWrapperTabsPart ul li").removeClass("sp-wrapper-tabs-current");
  286. $(".sp-wrapper-tabs-box-current").hide();
  287. $("#spWrapperTabsPart .sp-wrapper-tabs-box .sp-wrapper-tabs-box-col").removeClass("sp-wrapper-tabs-box-current");
  288. $("#wrapper_tabs_menu_li_" + id).addClass("sp-wrapper-tabs-current").show();
  289. $("#" + setID).addClass("sp-wrapper-tabs-box-current").show();
  290. $timeout(function () {
  291. var ifr = document.getElementById('iframe_wrapper_tabs_box_col_FZ0');
  292. var json = {};
  293. var func = { name: "openLayerSetting", arg: json };//传输name名称以及json串
  294. ifr.contentWindow.postMessage(func, '*');
  295. }, 200);
  296. };
  297. var postCfg = {
  298. headers: {
  299. 'Content-Type': 'application/json',
  300. 'Authorization': "Bearer " + self.get_AccessToken
  301. }
  302. };
  303. self.set_imgurl = "";
  304. self.get_userInfoJsonStr = {};
  305. self.getReloadUserData = function () {
  306. var postData = { };
  307. //console.log(postData);
  308. //console.log(postData); s4.encryptData_CBC(JSON.stringify(postData))
  309. $http.post(apiurljs.login + "api/User/UserInfo", JSON.stringify(postData), postCfg)
  310. .success(function (obj) {
  311. var res1 = strToJson(s4.decryptData_CBC(obj.data));
  312. localStorage.setItem("GlWorkPlatform-userInfoJsonStr", s4.encryptData_CBC(JSON.stringify(res1.data)));
  313. self.get_userInfoJsonStr = res1.data;
  314. ////加载背景图片*******************************************************************************************
  315. if (apiurljs.login.indexOf("http://139.129.27.3:85") != -1) {
  316. self.set_imgurl = "http://139.129.27.3:8511/web/UploadAttach";
  317. } else {
  318. self.set_imgurl = apiurljs.login.split("glwork")[0] + "glworkweb/UploadAttach";
  319. }
  320. $(".sp-wrapper-tabs .sp-wrapper-tabs-head").css("background-image", "url(" + self.set_imgurl + self.get_userInfoJsonStr.bkimageurl + ")");
  321. self.getData_bkimage();///背景图片
  322. self.getHomePage();///
  323. self.getUserFavoriteFunc();
  324. self.getUserRecentFunc();
  325. //首页上隐藏一张图链接按钮
  326. self.hideOnePic();
  327. })
  328. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  329. if (textStatus != 200) {
  330. self.loading = false;
  331. }
  332. })
  333. }
  334. self.getReloadUserData();
  335. //根据登录人员返回是否显示一张图链接按钮
  336. self.hideOnePic = function () {
  337. var data = {
  338. userid: self.userId
  339. };
  340. $http.post(apiurljs.login + "g2work/datazu/queryDataUserAuth", data, postCfg)
  341. .success(function (res) {
  342. var mark = true;
  343. for (var i = 0; i < res.data[0].auths.length; i++) {
  344. if (res.data[0].auths[i].ZID == "AA84" && res.data[0].auths[i].AUTH == "1") {
  345. mark = false;
  346. break;
  347. }
  348. }
  349. $scope.hideOnePic = mark;
  350. });
  351. };
  352. self.imgColActive_code_bkimage = "";
  353. self.bkimageArray = [];
  354. self.bkimageArray_active = {};
  355. self.ifHasDefault_bkimage = 0;
  356. self.getData_bkimage = function () {
  357. var postData = { "userid": self.userId };
  358. //console.log(postData);
  359. //console.log(postData); s4.encryptData_CBC(JSON.stringify(postData))
  360. $http.post(apiurljs.login + "g2work/bkimage/queryDataUserByUserid", JSON.stringify(postData), postCfg)
  361. .success(function (obj) {
  362. //var res = strToJson(s4.decryptData_CBC(obj.data));
  363. var res = obj;
  364. //console.log(JSON.stringify(res));
  365. if (res.success) {
  366. self.bkimageArray = res.data;
  367. angular.forEach(self.bkimageArray, function (item) {
  368. item.URL_set = self.set_imgurl + item.URL;
  369. });
  370. } else {
  371. self.loading = false;
  372. self.bkimageArray = [];
  373. self.bkimageArray_active = {};
  374. }
  375. })
  376. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  377. if (textStatus != 200) {
  378. self.loading = false;
  379. }
  380. })
  381. };
  382. $timeout(function () {
  383. //选择底图
  384. if ($("body").find(".sp-desk-img").length > 0) {
  385. $(".sp-desk-img").each(function () {
  386. $(this).click(function () {
  387. var get_url = $(this).attr('data-url');
  388. var get_code = $(this).attr('data-code');
  389. $(this).addClass("sp-desk-current").siblings().removeClass("sp-desk-current");
  390. $("#wrapper_tabs_box_col_FZ0").find("iframe").contents().find("body").css("background-image", "url(" + get_url + ")")
  391. $("#wrapper_tabs_box_col_FZ0").find("iframe").contents().find("body").css("background-repeat", "no-repeat")
  392. $("#wrapper_tabs_box_col_FZ0").find("iframe").contents().find("body").css("background-size", "cover")
  393. $("#wrapper_tabs_box_col_FZ0").find("iframe").contents().find("body").css("background-position", "0 -30px")
  394. $(".sp-wrapper-tabs .sp-wrapper-tabs-head").css("background-image", "url(" + get_url + ")");
  395. var postData_2 = {
  396. "userid": self.userId,
  397. "code": get_code
  398. };
  399. $http.post(apiurljs.login + "g2work/bkimage/updateDataUserDefault", JSON.stringify(postData_2), postCfg)
  400. .success(function (obj_2) {
  401. //var res = strToJson(s4.decryptData_CBC(obj.data));
  402. var res_2 = obj_2;
  403. //console.log(JSON.stringify(res));
  404. if (res_2.success) {
  405. console.log("背景图片修改成功");
  406. } else {
  407. sp.dialog(res_2.message);
  408. }
  409. })
  410. .error(function (XMLHttpRequest, textStatus, errorThrown) {
  411. if (textStatus != 200) {
  412. self.loading = false;
  413. }
  414. })
  415. });
  416. });
  417. }
  418. }, 1000);
  419. ////加载背景图片*******************************************************************************************
  420. self.func = {
  421. normalTitle: "全部",
  422. favoriteTitle: "常用功能",
  423. recentTitle: "最近访问",
  424. favoriteList: [],
  425. recentList: [],
  426. keyWord: "",
  427. keyCondition: "",
  428. keyShow: false,
  429. keyPartList: [], //当前模块下所有符合关键字的模块列表
  430. keyPartListCopy: [], //当前模块下前12个符合关键字的模块列表
  431. keyAllList: [], //全局模块下所有符合关键字的模块列表
  432. keyAllListCopy: [], //全局模块下前12个符合关键字的模块列表
  433. keyPartShow: false,
  434. keyPartHide: false,
  435. keyAllShow: false,
  436. keyAllHide: false,
  437. allFuncList: [], //存储最全的功能防止遗漏
  438. nowFuncName: "",
  439. nowFuncCode: ""
  440. }
  441. //声明一个左侧的功能列表
  442. self.userFuncList = [];
  443. //首选获取当前用户的个人桌面
  444. self.getHomePage = function () {
  445. self.userFuncList = [];
  446. var postData = {
  447. userid: self.userId
  448. }
  449. $http.post(apiurljs.login + "g2work/desktop/queryDesktopMarkT", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  450. .success(function (obj) {
  451. var res = strToJson(s4.decryptData_CBC(obj.data));
  452. //console.log(JSON.stringify(res));
  453. //console.log(get_userInfoJsonStr);
  454. var homePageObj = {
  455. CNAME: "工作桌面",
  456. C_H_I_L_D: [],
  457. COPYCHILD: [],
  458. ///FILEN: res.data.tenantcode,
  459. FILEN: self.get_userInfoJsonStr.desktopurl,
  460. FUNCSCOPE: "ADMINISTATOR|ADMIN",
  461. LEAF: 0,
  462. LEVELS: 1,
  463. OPENTYPE: "0",
  464. PARENTID: "0",
  465. PKID: "FZ0",
  466. SORTID: 1,
  467. SRCIMG: "",
  468. SRCIMG32: "",
  469. WINDOWS: "",
  470. IMGBox: "box0",
  471. }
  472. $.cookie("GlWorkPlatform-userTypeEng", res.data.data, {path: '/', expires: 1});
  473. if (res.data.data == "USER") {
  474. $.cookie("GlWorkPlatform-userType", "普通用户", {path: '/', expires: 1})
  475. } else if (res.data.data == "SYSADMIN") {
  476. $.cookie("GlWorkPlatform-userType", "系统管理员", {path: '/', expires: 1})
  477. } else if (res.data.data == "SECADMIN") {
  478. $.cookie("GlWorkPlatform-userType", "安全管理员", {path: '/', expires: 1})
  479. } else if (res.data.data == "AUDITADMIN") {
  480. $.cookie("GlWorkPlatform-userType", "审计管理员", {path: '/', expires: 1})
  481. } else if (res.data.data == "ADMIN") {
  482. $.cookie("GlWorkPlatform-userType", "总管理员", {path: '/', expires: 1})
  483. }
  484. ////20230423--zyg-修改,变更成加载图片base64编码,判断是否为base64图片,是直接加载,否设置图片路径;
  485. if (res.data.imgsrc.indexOf("data:image") != -1) {
  486. ///base64图片格式直接加载
  487. $("#spanAdminPhoto").attr("src", res.data.imgsrc);
  488. self.usercard.img = res.data.imgsrc;
  489. } else {
  490. ///路径图片,赋值
  491. $("#spanAdminPhoto").attr("src", "AFrontEnd/css/icons/photo/" + res.data.imgsrc);
  492. self.usercard.img = "AFrontEnd/css/icons/photo/" + res.data.imgsrc;
  493. }
  494. $.cookie("GlWorkPlatform-photo", $("#spanAdminPhoto").attr("src"), { path: '/', expires: 1 })
  495. self.userFuncList.push(homePageObj);
  496. self.getUserFunc();
  497. var data = {
  498. tablename: "SYS_CLICKLOG",
  499. data: {
  500. CTIME: self.ctime,
  501. TITLE: "系统登录",
  502. REQUESTURL: window.location.pathname,
  503. REQUESTHEADERURL: window.location.origin,
  504. LOGTYPE: "登录登出",
  505. USERTYPE: $.cookie("GlWorkPlatform-userType"),
  506. ADMIN: $.cookie("GlWorkPlatform-userTypeEng"),
  507. CLIENTIP: sp.myIP(),
  508. PCNAME: sp.detectOS(),
  509. BROWSERNAME: sp.browser(),
  510. RESPONSETIME: sp.getLocalDate1(),
  511. USERID: self.userId,
  512. USERNAME: self.userName
  513. }
  514. }
  515. $http.post(apiurljs.login + "g2app/dataabase/insertFormData", {data: s4.encryptData_CBC(JSON.stringify(data))}, postCfg)
  516. .success(function (res) {
  517. $.cookie("CrossPage-ctime", null, {path: '/', expires: -1});
  518. })
  519. })
  520. }
  521. //获取用户的功能列表
  522. self.getUserFunc = function () {
  523. $http.post(apiurljs.login + "UserPower/PermissionsDecrypt", {data: s4.encryptData_CBC("")}, postCfg)
  524. .success(function (obj) {
  525. //var res = strToJson(s4.decryptData_CBC(obj.data));
  526. var res = obj;
  527. res.data.rows.forEach(function (item) {
  528. item.showRightMenu = false;
  529. if (item.C_H_I_L_D.length == 0) {
  530. item.IMGBox = "box0";
  531. } else if (item.C_H_I_L_D.length > 0 && item.C_H_I_L_D.length <= 4) {
  532. item.IMGBox = "box4";
  533. } else if (item.C_H_I_L_D.length > 4) {
  534. item.IMGBox = "box9";
  535. }
  536. let array = angular.copy(item.C_H_I_L_D);
  537. if (array.length > 12) {
  538. item.COPYCHILD = array.slice(0, 12);
  539. item.hideFunc = true;
  540. item.showFunc = false;
  541. } else {
  542. item.COPYCHILD = array;
  543. item.hideFunc = false;
  544. item.showFunc = false;
  545. }
  546. self.userFuncList.push(item);
  547. })
  548. //记录全部功能模块列表
  549. res.data.rows.forEach(function (item) {
  550. item.C_H_I_L_D.forEach(function (item2) {
  551. self.func.allFuncList.push(item2);
  552. })
  553. })
  554. //默认打开工作桌面
  555. var title = self.userFuncList[0].CNAME;
  556. var id = self.userFuncList[0].PKID;
  557. var src = self.userFuncList[0].FILEN;
  558. sp.addhometabnav(id, title, src);
  559. CrossPage = {
  560. cname: "",
  561. ctime: sp.getLocalDate(),
  562. type: 0
  563. }
  564. // if (getParameter("openPage") == "") {
  565. // //sp.loadmenufiles();//加载记录菜单文件
  566. // }
  567. // if (getParameter("openPage") != "") {
  568. // self.secondMenu = "全部/";
  569. // self.func.normalList.forEach(function (item) {
  570. // if (item.PKID == getParameter("PKID")) {
  571. // self.CrossPage(item)
  572. // }
  573. // })
  574. // sp.addTabNav(getParameter("PKID"), decodeURI(getParameter("CNAME")), getParameter("openPage"))
  575. // }
  576. })
  577. }
  578. //获取用户常用功能列表
  579. self.getUserFavoriteFunc = function () {
  580. var postData = {
  581. userid: self.userId,
  582. ntops: "4"
  583. }
  584. $http.post(apiurljs.login + "g2work/desktop/queryFavoriteFunc", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  585. .success(function (obj) {
  586. var res = strToJson(s4.decryptData_CBC(obj.data));
  587. self.func.favoriteList = res.data;
  588. })
  589. }
  590. //获取用户最近访问列表
  591. self.getUserRecentFunc = function () {
  592. var postData = {
  593. userid: self.userId,
  594. ntops: "4"
  595. }
  596. $http.post(apiurljs.login + "g2work/desktop/queryRecentFunc", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  597. .success(function (obj) {
  598. var res = strToJson(s4.decryptData_CBC(obj.data));
  599. self.func.recentList = res.data;
  600. })
  601. }
  602. //固定二级菜单标志
  603. self.tabFixed = false;
  604. //固定二级菜单函数
  605. self.setTabFixed = function () {
  606. self.tabFixed = true;
  607. }
  608. //取消固定二级菜单函数
  609. self.cancelTabFixed = function () {
  610. self.tabFixed = false;
  611. }
  612. //鼠标放入执行的事件
  613. self.openRightMenu = function (index) {
  614. //self.initSearchFunc();
  615. self.userFuncList.forEach(function (item) {
  616. item.showRightMenu = false;
  617. })
  618. self.func.normalTitle = self.userFuncList[index].CNAME;
  619. self.func.nowFuncCode = self.userFuncList[index].PKID;
  620. self.func.nowFuncName = self.userFuncList[index].CNAME;
  621. self.userFuncList[index].showRightMenu = true;
  622. }
  623. //鼠标移除执行的事件
  624. self.closeRightMenu = function () {
  625. if (self.tabFixed) {
  626. } else {
  627. //self.initSearchFunc();
  628. self.userFuncList.forEach(function (item) {
  629. item.showRightMenu = false;
  630. })
  631. self.func.nowFuncCode = "";
  632. self.func.nowFuncName = "";
  633. }
  634. }
  635. self.openMenuTab = function (code, cname) {
  636. if (code == self.func.nowFuncCode && cname == self.func.nowFuncName) {
  637. return;
  638. //$(".sp-menu-tab").hide();
  639. //self.func.keyWord = "";
  640. //self.func.keyCondition = "";
  641. //self.func.nowFuncCode = "close";
  642. //self.func.nowFuncName = "close";
  643. } else {
  644. //code传空表示查看全部功能
  645. self.func.keyWord = "";
  646. self.func.keyCondition = "";
  647. self.func.nowFuncCode = code;
  648. self.func.nowFuncName = cname;
  649. var array = [];
  650. if (code == "") {
  651. self.func.normalTitle = "全部";
  652. self.func.normalList = [];
  653. self.func.allFuncList.forEach(function (item, index) {
  654. array.push(item);
  655. })
  656. } else {
  657. self.func.normalTitle = cname;
  658. self.func.normalList = [];
  659. self.func.allFuncList.forEach(function (item) {
  660. if (item.PARENTID == code) {
  661. array.push(item);
  662. }
  663. })
  664. }
  665. if (array.length > 12) {
  666. self.func.normalList = array.slice(0, 12);
  667. self.func.hideFunc = true;
  668. self.func.showFunc = false;
  669. } else {
  670. self.func.normalList = array;
  671. self.func.hideFunc = false;
  672. self.func.showFunc = false;
  673. }
  674. self.secondMenu = cname == "" ? "全部/" : cname + "/";
  675. $(".sp-menu-tab").show();
  676. }
  677. }
  678. self.closeMenuTab = function () {
  679. self.func.keyWord = "";
  680. self.func.keyCondition = "";
  681. //self.func.nowFuncCode = "close";
  682. //self.func.nowFuncName = "close";
  683. $(".sp-menu-tab").hide();
  684. }
  685. self.selectMenu = function (item) {
  686. if (item.FILEN != undefined && item.FILEN != '' && item.FILEN != null) {
  687. sp.addTabNav(item.PKID, item.CNAME, item.FILEN);
  688. }
  689. }
  690. //初始化搜索
  691. self.initSearchFunc = function () {
  692. self.func.keyWord = "";
  693. self.func.keyCondition = "";
  694. self.func.keyShow = false;
  695. self.func.keyPartList = []; //当前模块下所有符合关键字的模块列表
  696. self.func.keyPartListCopy = []; //当前模块下前12个符合关键字的模块列表
  697. self.func.keyAllList = []; //全局模块下所有符合关键字的模块列表
  698. self.func.keyAllListCopy = []; //全局模块下前12个符合关键字的模块列表
  699. self.func.keyPartShow = false;
  700. self.func.keyPartHide = false;
  701. self.func.keyAllShow = false;
  702. self.func.keyAllHide = false;
  703. }
  704. self.keyWordFunc = function () {
  705. console.log(self.func.allFuncList);
  706. if (self.func.keyWord == "") {
  707. self.initSearchFunc();
  708. } else {
  709. self.func.keyCondition = " 【关键字: " + self.func.keyWord + " 】";
  710. self.func.keyShow = true;
  711. var resultArray1 = [];
  712. var resultArray2 = [];
  713. self.func.allFuncList.forEach(function (item) {
  714. var index = item.CNAME.indexOf(self.func.keyWord);
  715. if (self.func.nowFuncCode == "") {
  716. } else {
  717. //当前模块下的筛选结果
  718. if (index >=0 && item.PARENTID == self.func.nowFuncCode) {
  719. resultArray1.push(item);
  720. }
  721. //其他模块下的全局筛选结果
  722. if (index >= 0 && item.PARENTID != self.func.nowFuncCode) {
  723. resultArray2.push(item);
  724. }
  725. }
  726. })
  727. self.func.keyPartList=angular.copy(resultArray1);
  728. self.func.keyAllList=angular.copy(resultArray2);
  729. if (resultArray1.length > 12) {
  730. self.func.keyPartListCopy = resultArray1.slice(0, 12);
  731. self.func.keyPartHide = true;
  732. self.func.keyPartShow = false;
  733. } else {
  734. self.func.keyPartListCopy = resultArray1;
  735. self.func.keyPartHide = false;
  736. self.func.keyPartShow = false;
  737. }
  738. if (resultArray2.length > 12) {
  739. self.func.keyAllListCopy = resultArray2.slice(0, 12);
  740. self.func.keyAllHide = true;
  741. self.func.keyAllShow = false;
  742. } else {
  743. self.func.keyAllListCopy = resultArray2;
  744. self.func.keyAllHide = false;
  745. self.func.keyAllShow = false;
  746. }
  747. }
  748. }
  749. self.clearKeyWordFunc = function () {
  750. self.func.keyWord = "";
  751. self.func.keyCondition = "";
  752. var resultArray = [];
  753. self.func.allFuncList.forEach(function (item) {
  754. if (self.func.nowFuncName == "") {
  755. resultArray.push(item);
  756. } else {
  757. if (item.PARENTID == self.func.nowFuncCode) {
  758. resultArray.push(item);
  759. }
  760. }
  761. })
  762. if (resultArray.length > 12) {
  763. self.func.normalList = resultArray.slice(0, 12);
  764. self.func.hideFunc = true;
  765. self.func.showFunc = false;
  766. } else {
  767. self.func.normalList = resultArray;
  768. self.func.hideFunc = false;
  769. self.func.showFunc = false;
  770. }
  771. }
  772. self.selectItemFunc = function (item) {
  773. //console.log(item.CNAME);
  774. //console.log(item.FILEN);
  775. //if (item.FILEN.indexOf("@token") > -1) {
  776. // sp.addTabNav(item.PKID, item.CNAME, item.FILEN.replace("@token", self.outToken));
  777. // self.addRecode(item.CNAME, item.FILEN.replace("@token", self.outToken));
  778. //} else {
  779. // sp.addTabNav(item.PKID, item.CNAME, item.FILEN);
  780. // self.addRecode(item.CNAME, item.FILEN);
  781. //}
  782. if (item.OPENTYPE == "1") {
  783. if (item.FILEN.indexOf("@token") > -1) {
  784. window.open(item.FILEN.replace("@token", self.outToken));
  785. } else {
  786. window.open(item.FILEN);
  787. }
  788. } else {
  789. if (item.FILEN.indexOf("@token") > -1) {
  790. sp.addTabNav(item.PKID, item.CNAME, item.FILEN.replace("@token", self.outToken));
  791. } else {
  792. sp.addTabNav(item.PKID, item.CNAME, item.FILEN);
  793. }
  794. }
  795. self.addRecode(item.CNAME, item.FILEN);
  796. self.CrossPage(item);
  797. self.getUserRecentFunc();
  798. self.getUserFavoriteFunc();
  799. ////关闭左侧菜单
  800. $(".sp-menu-switch").addClass("hasClick");
  801. $(".sp-menu-list").fadeOut(200);
  802. }
  803. self.loadAllKindFunc = function (index) {
  804. //console.log(index);
  805. let array = angular.copy(self.userFuncList[index].C_H_I_L_D);
  806. self.userFuncList[index].COPYCHILD = array;
  807. self.userFuncList[index].hideFunc = false;
  808. self.userFuncList[index].showFunc = true;
  809. }
  810. self.loadPartKindFunc = function (index) {
  811. //console.log(index);
  812. let array = angular.copy(self.userFuncList[index].C_H_I_L_D);
  813. self.userFuncList[index].COPYCHILD = array.slice(0, 12);
  814. self.userFuncList[index].hideFunc = true;
  815. self.userFuncList[index].showFunc = false;
  816. }
  817. self.showKeyPartFunc=function(){
  818. self.func.keyPartListCopy=angular.copy(self.func.keyPartList);
  819. self.func.keyPartHide=false;
  820. self.func.keyPartShow=true;
  821. }
  822. self.hideKeyPartFunc=function(){
  823. self.func.keyPartListCopy=angular.copy(self.func.keyPartList).slice(0, 12);
  824. self.func.keyPartHide=true;
  825. self.func.keyPartShow=false;
  826. }
  827. self.showKeyAllFunc=function(){
  828. self.func.keyAllListCopy=angular.copy(self.func.keyAllList);
  829. self.func.keyAllHide=false;
  830. self.func.keyAllShow=true;
  831. }
  832. self.hideKeyAllFunc=function(){
  833. self.func.keyAllListCopy=angular.copy(self.func.keyAllList).slice(0, 12);
  834. self.func.keyAllHide=true;
  835. self.func.keyAllShow=false;
  836. }
  837. //桌面自定义流程人员初始化
  838. self.InitUser = function () {
  839. var data = {"userid": [], "mark": "1"}
  840. $http.post(apiurljs.login + "g2work/desktop/InitWorkflowCandoCustom", {data: s4.encryptData_CBC(JSON.stringify(data))}, postCfg)
  841. .success(function (obj) {
  842. var res = strToJson(s4.decryptData_CBC(obj.data));
  843. if (res.success) {
  844. sp.dialog("初始化成功!")
  845. $timeout(function () {
  846. sp.dialoghide()
  847. }, 1000)
  848. }
  849. })
  850. }
  851. self.usercard = {
  852. id: 0,
  853. userid: self.userId,
  854. username: self.userName,
  855. img: "AFrontEnd/css/icons/photo/02.jpg",
  856. DEPNAME: "",
  857. SBTIME: "",
  858. XBTIME: ""
  859. }
  860. self.addRecode=function (name,url) {
  861. var postData = {
  862. tablename: "SYS_LOG",
  863. data: {
  864. LOGTIME: sp.dateFtt("yyyy-MM-dd hh:mm:ss",new Date()),
  865. LOGIP: sp.myIP(),
  866. LOGUSER:self.userName,
  867. LOGFUNC:name,
  868. LOGFUNCURL:url,
  869. LOGAPI:"insertFormData输入参数",
  870. LOGAPIURL:"g2app/dataabase/insertFormData",
  871. LOGAPIPOST:"",
  872. REMARK:""
  873. }
  874. }
  875. var apiData={
  876. data:s4.encryptData_CBC(JSON.stringify(postData))
  877. }
  878. postData.data.LOGAPIPOST=JSON.stringify(apiData);
  879. $http.post(apiurljs.login + "g2app/Data/insertByDataid", { data: s4.encryptData_CBC(JSON.stringify(postData)) }, postCfg)
  880. .success(function (obj) {
  881. })
  882. }
  883. //跨页面记录日志参数
  884. self.CrossPage = function (obj) {
  885. CrossPage = {
  886. cname: obj.CNAME,
  887. ctime: sp.getLocalDate1(),
  888. type: 0
  889. }
  890. }
  891. //获取上传附件文件格式限制----20230517
  892. uploadformat = [];
  893. function getUploadFormat() {
  894. var data = { tablename: "CODE_UPLOADFORMAT" }
  895. $http.post(apiurljs.login + "g2app/DangAn/queryCodeData", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  896. .success(function (obj) {
  897. var res = strToJson(s4.decryptData_CBC(obj.data));
  898. uploadformat = res.data;
  899. })
  900. };
  901. getUploadFormat()
  902. ////头部关键字搜索---20230905
  903. self.headBtnSearchKeyword = "";
  904. self.headSearchResult = [];
  905. self.headSearchResult_view = false;
  906. self.headBtnSearch = function () {
  907. if (sp.isval(self.headBtnSearchKeyword)) {
  908. if(self.dtslPlaceholder == "图上查"){
  909. //self.headSearchResult = [];
  910. var data = {
  911. "url": "/basic/api/StatSelect/selectCodeList",
  912. "data": { "keyWord": self.headBtnSearchKeyword }
  913. }
  914. //console.log(JSON.stringify(data));
  915. $http.post(apiurljs.login + "g2app/yizhangtu/selectCodeList", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  916. .success(function (obj) {
  917. var res = strToJson(s4.decryptData_CBC(obj.data));
  918. console.log('map',res.data);
  919. self.headSearchResult = res.data.build;
  920. console.log(self.headSearchResult[0])
  921. //if (sp.isval(self.headSearchResult)&&sp.isval(self.headBtnSearchKeyword)) {
  922. // self.headSearchResult_view = true;
  923. //} else {
  924. // self.headSearchResult_view = false;
  925. //}
  926. })
  927. }else if(self.dtslPlaceholder == "查一查"){
  928. // var dptCfg = {
  929. // headers: {
  930. // 'Content-Type': 'application/json',
  931. // 'Access-Token': localStorage.getItem("main-token"),
  932. // }
  933. // };
  934. // $http.get(
  935. // apiurljs.dpt + `graph/open/api/search/appoint/graph/info?name=${self.headBtnSearchKeyword}&modelId=4881885d8a74562f018a81eb2ff02c42&startEntityCodes=jck_qyk_qyjcxx`,
  936. // dptCfg
  937. // ).success(function(obj) {
  938. // if(obj.result&&sp.isval(self.headBtnSearchKeyword)){
  939. // for(let i=0;i<obj.result.length;i++){
  940. // obj.result[i].type = "企业"
  941. // }
  942. // self.headSearchResult = obj.result;
  943. // self.headSearchResult_view = true;
  944. // }else{
  945. // self.headSearchResult_view = false;
  946. // }
  947. // })
  948. }else if(self.dtslPlaceholder=="查项目"){
  949. //window.open(`http://10.149.1.35:8003/#/drms/know-application/enterprise-search/SearchResult?hideMenus=true&name=${self.headBtnSearchKeyword}&type=project&token=${localStorage.getItem("main-token")}`)
  950. // var dptCfg = {
  951. // headers: {
  952. // 'Content-Type': 'application/json',
  953. // 'Access-Token': localStorage.getItem("main-token"),
  954. // }
  955. // };
  956. // $http.get(
  957. // apiurljs.dpt + `graph/open/api/search/appoint/graph/info?name=${self.headBtnSearchKeyword}&modelId=488188578b3367d0018b375db06e2507&startEntityCodes=jck_xmk_jsgcxm`,
  958. // dptCfg
  959. // ).success(function(obj) {
  960. // if(obj.result&&sp.isval(self.headBtnSearchKeyword)){
  961. // for(let i=0;i<obj.result.length;i++){
  962. // obj.result[i].type = "项目"
  963. // }
  964. // self.headSearchResult = obj.result;
  965. // self.headSearchResult_view = true;
  966. // }else{
  967. // self.headSearchResult_view = false;
  968. // }
  969. // })
  970. }
  971. } else {
  972. self.headSearchResult_view = false;
  973. }
  974. };
  975. self.headBtnSearchhc = function(e){
  976. if(e.keyCode==13){
  977. if(self.dtslPlaceholder == "图上查"){
  978. self.headKeywordPage(self.headBtnSearchKeyword)
  979. //$timeout(function(){
  980. // self.headKeywordPage(self.headSearchResult[0])
  981. //},1000)
  982. }else if(self.dtslPlaceholder == "查一查"){
  983. //let set_url = `http://10.149.1.35:8003/#/drms/know-application/enterprise-search/company-detail?hideTitle=true&hideMenus=true&name=${itemdata.name}&id=${itemdata.id}&type=company&token=${localStorage.getItem("main-token")}`
  984. //let set_url = `http://10.149.1.35:8003/#/drms/know-application/enterprise-search/SearchResult?hideTitle=true&hideMenus=true&name=${self.headBtnSearchKeyword}&type=company&token=${localStorage.getItem("main-token")}`
  985. //let set_url = `http://10.149.1.35:8003/cyc/#/drms/know-application/enterprise-search/SearchResult?hideMenus=true&name=${self.headBtnSearchKeyword}&hideTitle=true&Access-Token=${localStorage.getItem("main-token")}`
  986. sp.addTabNav("dtsscqy", "查一查", set_url);
  987. }
  988. //else if(self.dtslPlaceholder == "查项目"){
  989. // let set_url = `http://10.149.1.35:8003/#/drms/know-application/enterprise-search/SearchResult?hideTitle=true&hideMenus=true&name=${self.headBtnSearchKeyword}&type=project&token=${localStorage.getItem("main-token")}`
  990. // sp.addTabNav("dtsscxm", "查项目", set_url);
  991. // }
  992. self.headBtnSearchKeyword = ""
  993. }
  994. }
  995. self.headKeywordPage = function (itemdata) {
  996. if(self.dtslPlaceholder == "图上查"){
  997. var get_token = localStorage.getItem("main-token");
  998. //var set_url = apiurljs.onePic + "wholeProcessPage?token=" + get_token + "&name=" + itemdata.name + "&type=" + itemdata.type + "&id=" + itemdata.id + "";
  999. var set_url = apiurljs.onePic + "wholeProcessPage?token=" + get_token + "&name=" + itemdata + "&type=&id=";
  1000. sp.addTabNav(itemdata.id, '图上查', set_url);
  1001. }else if(self.dtslPlaceholder == "查一查"){
  1002. //window.open(`http://10.149.1.35:8003/#/drms/know-application/enterprise-search/company-detail?hideTitle=false&hideMenus=true&name=${itemdata.name}&id=${itemdata.id}&type=company&token=${localStorage.getItem("main-token")}`)
  1003. //let set_url = `http://10.149.1.35:8003/#/drms/know-application/enterprise-search/company-detail?hideTitle=true&hideMenus=true&name=${itemdata.name}&id=${itemdata.id}&type=company&token=${localStorage.getItem("main-token")}`
  1004. //let set_url = `http://10.149.1.35:8003/cyc/#/drms/know-application/enterprise-search/SearchResult?hideMenus=true&name=${self.headBtnSearchKeyword}&hideTitle=true&Access-Token=${localStorage.getItem("main-token")}`
  1005. sp.addTabNav(itemdata.id, itemdata.name, set_url);
  1006. }
  1007. //else if(self.dtslPlaceholder == "查项目"){
  1008. // //window.open(`http://10.149.1.35:8003/#/drms/know-application/enterprise-search/project-detail?hideMenus=true&name=${itemdata.name}&id=${itemdata.id}&type=project&token=${localStorage.getItem("main-token")}`)
  1009. // let set_url = `http://10.149.1.35:8003/#/drms/know-application/enterprise-search/project-detail?hideTitle=true&hideMenus=true&name=${itemdata.name}&id=${itemdata.id}&type=project&token=${localStorage.getItem("main-token")}`
  1010. // sp.addTabNav(itemdata.id, itemdata.name, set_url);
  1011. //}
  1012. self.headSearchResult_view = false;
  1013. self.headBtnSearchKeyword = ""
  1014. };
  1015. //获取未读消息数量
  1016. self.msgNum = 0;
  1017. self.newMsg = 0
  1018. self.getMsgNum = function (type) {
  1019. var data = {
  1020. userid: self.userId,
  1021. msgkind: "公文事项办理",
  1022. mark: "未读"
  1023. }
  1024. $http.post(apiurljs.login+"g2work/routeinfo/queryDataMessageCount",{ data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  1025. .success(function (obj) {
  1026. var res = strToJson(s4.decryptData_CBC(obj.data));
  1027. // self.newMsg = 200 - self.msgNum;
  1028. self.newMsg = res.data.MSGCOUNT - self.msgNum;
  1029. self.msgNum = res.data.MSGCOUNT;
  1030. $("#onlineUsers").html(res.data.ONLINEUSER + "人");
  1031. $.cookie("GlWorkPlatform-onlineUsers", res.data.ONLINEUSER);
  1032. console.log(res.data)
  1033. // 当人数超过100人时,出现弹窗
  1034. /*var num = 100
  1035. if(res.data.ONLINEUSER > num){
  1036. var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">系统提示</span><span id='closeModal' class=\"sp-dialog-close sp-closeDialog\" title=\"关闭\">×</span></span>";
  1037. var dialogBody = "<div class=\"sp-dialog-body\" style='height: 300px'>当前在线人数已超过" + num + "人!</div>";
  1038. var dialogFoot = "<div class=\"sp-dialog-foot\"><input id='okModal' type='button' value='确 认' class='sp-dialog-btnTrue' /></div>";
  1039. $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
  1040. $('.sp-dialog').css('width', '600px');
  1041. sp.openCenter(".sp-dialog");
  1042. $(".closeDialog").click(function (event) {
  1043. sp.closeCenter(".sp-dialog");
  1044. event.preventDefault();
  1045. event.stopPropagation();
  1046. });
  1047. //关闭
  1048. $("#closeModal").click(function () {
  1049. sp.dialoghide();
  1050. });
  1051. // 下一步操作
  1052. $("#okModal").click(function () {
  1053. sp.dialoghide();
  1054. // 后续逻辑
  1055. });
  1056. }*/
  1057. if(!type){
  1058. // console.log('type', self.newMsg)
  1059. for (var i = 0; (i < self.newMsg && i <5); i++) {
  1060. var popupId = "popup" + i;
  1061. var closeId ="closeModalMsg"+i
  1062. var popupContent = "<div id='" + popupId + "' style='width:600px; height: 150px; background-color: #f5f5f5; ; border: 1px solid #ccc; box-shadow: 0 0 10px rgba(0 0 0 0.3);' class='popupItem'>" +
  1063. "<span class='closeModalMsg' style='cursor:pointer; font-size: 27px;position: absolute;right:20px;display:inline-block;padding:2px;'>×</span>" +
  1064. "<p style='padding: 30px;cursor:pointer;margin-top:32px' class='messageTz'>当前有新消息,请查看</p >" +"</div>";
  1065. $("#popupContainer").append(popupContent);
  1066. }
  1067. $("#popupContainer").fadeIn(500);
  1068. //关闭
  1069. // console.log("所有的关闭标签", $('.closeModalMsg'))
  1070. // 三秒后隐藏弹窗
  1071. setTimeout(function() {
  1072. $("#popupContainer").fadeOut(1000);
  1073. // 移除新增的弹窗项
  1074. $(".popupItem").remove();
  1075. }, 5000);
  1076. }
  1077. $('.closeModalMsg').each(function (index) {
  1078. $(this).on('click', function () {
  1079. console.log("xxxxxx>>", index);
  1080. closeFunc(index)
  1081. // console.log("close")
  1082. })
  1083. })
  1084. function closeFunc(index) {
  1085. $('#popup' + index).remove()
  1086. }
  1087. $('.messageTz').each(function (index) {
  1088. $(this).on('click', function () {
  1089. console.log("跳转页面>>>>", index);
  1090. self.openMsg()
  1091. })
  1092. })
  1093. })
  1094. }
  1095. self.getMsgNum(1)
  1096. $interval(function () {
  1097. self.getMsgNum()
  1098. }, 60000)
  1099. self.openMsg = function () {
  1100. sp.addTabNav("XXJL","消息记录","tpl/deskunit/msgListChat.html")
  1101. }
  1102. //获取上班下班时间规则
  1103. // self.queryRules = function () {
  1104. // var data = {
  1105. // sqlwhere: {}
  1106. // }
  1107. // $http.post(apiurljs.login + "g2app/Attendance/queryRules", {data: s4.encryptData_CBC(JSON.stringify(data))}, postCfg)
  1108. // .success(function (obj) {
  1109. // var res = strToJson(s4.decryptData_CBC(obj.data));
  1110. // self.CARDSTART = res.data.STARTTIEM;
  1111. // self.CARDEND = res.data.ENDTIME;
  1112. // self.getDEPART()
  1113. // })
  1114. // }
  1115. //获得当前人部门
  1116. // self.getDEPART = function () {
  1117. // var data = {
  1118. // userid: self.usercard.userid
  1119. // }
  1120. // $http.post(apiurljs.login + "g2app/dataabase/queryDpName", {data: s4.encryptData_CBC(JSON.stringify(data))}, postCfg)
  1121. // .success(function (obj) {
  1122. // var res = strToJson(s4.decryptData_CBC(obj.data));
  1123. // self.usercard.DEPNAME = res.data.length == 0 ? "" : res.data[0].SECTION;
  1124. // })
  1125. // }
  1126. // self.queryRules()
  1127. // self.card = function (n) {
  1128. // var data = {
  1129. // tablename: "ATTENDANCEMAN",
  1130. // colums: "*,TO_CHAR(SBTIME,'hh24:mi:ss') as SBTIME1,TO_CHAR(XBTIME,'hh24:mi:ss') as XBTIME1",
  1131. // order: "ID",
  1132. // sqlwhere: {
  1133. // CDATE: sp.format(sp.getLocalDate()),
  1134. // CUSERID: self.usercard.userid
  1135. // },
  1136. // sqlinwhere: "",
  1137. // sqllikewhere: ""
  1138. // }
  1139. // $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  1140. // .success(function (obj) {
  1141. // var res = strToJson(s4.decryptData_CBC(obj.data));
  1142. // if (res.data.length != 0) {
  1143. // self.usercard = {
  1144. // id: res.data[0].ID,
  1145. // userid: self.usercard.userid,
  1146. // username: self.usercard.username,
  1147. // DEPNAME: self.usercard.DEPNAME,
  1148. // SBTIME: res.data[0].SBTIME ? res.data[0].SBTIME1 : "",
  1149. // XBTIME: res.data[0].XBTIME ? res.data[0].XBTIME1 : "",
  1150. // DKSTATUS: res.data[0].DKSTATUS.split(",")[0]
  1151. // }
  1152. // }
  1153. // $(".cardtime").html(sp.getLocalDate().slice(11, 19))
  1154. // $interval(function () {
  1155. // $(".cardtime").html(sp.getLocalDate().slice(11, 19))
  1156. // }, 1000)
  1157. // if (n == 0) {
  1158. // sp.layer("#layer_card")
  1159. // }
  1160. // })
  1161. // }
  1162. // self.clickstatus = false;
  1163. // self.clickCard = function () {
  1164. // if (self.clickstatus == true || (self.usercard.SBTIME != '' && self.usercard.XBTIME != '')) {
  1165. // return;
  1166. // }
  1167. // self.clickstatus = true;
  1168. // if (self.usercard.id == 0) {
  1169. // var data = {
  1170. // tablename: "ATTENDANCEMAN",
  1171. // data: {
  1172. // CDATE: sp.format(sp.getLocalDate()),
  1173. // CNAME: self.usercard.username,
  1174. // CUSERID: self.usercard.userid,
  1175. // DEPNAME: self.usercard.DEPNAME,
  1176. // SBTIME: sp.format(sp.getLocalDate()) + " " + $(".cardtime").html(),
  1177. // DKSTATUS: getDKSTATUS($(".cardtime").html(), 1)
  1178. // }
  1179. // }
  1180. // $http.post(apiurljs.login + "g2app/dataabase/insertFormData", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  1181. // .success(function (obj) {
  1182. // var res = strToJson(s4.decryptData_CBC(obj.data));
  1183. // self.clickstatus = false;
  1184. // if (res.success == true) {
  1185. // self.card(1)
  1186. // } else {
  1187. // sp.layerhide()
  1188. // sp.dialog(res.message)
  1189. // }
  1190. // })
  1191. // } else {
  1192. // var data = {
  1193. // id: self.usercard.id,
  1194. // tablename: "ATTENDANCEMAN",
  1195. // data: {
  1196. // CNAME: self.usercard.username,
  1197. // CUSERID: self.usercard.userid,
  1198. // DEPNAME: self.usercard.DEPNAME,
  1199. // XBTIME: sp.format(sp.getLocalDate()) + " " + $(".cardtime").html(),
  1200. // DKSTATUS: self.usercard.DKSTATUS + "," + getDKSTATUS($(".cardtime").html(), 2)
  1201. // }
  1202. // }
  1203. // $http.post(apiurljs.login + "g2app/dataabase/upFormData", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  1204. // .success(function (obj) {
  1205. // var res = strToJson(s4.decryptData_CBC(obj.data));
  1206. // self.clickstatus = false;
  1207. // if (res.success == true) {
  1208. // self.card(1)
  1209. // } else {
  1210. // sp.layerhide()
  1211. // sp.dialog(res.message)
  1212. // }
  1213. // })
  1214. // }
  1215. // }
  1216. //获取服务器时间
  1217. // self.getServerTime = function () {
  1218. // var data = {
  1219. // param: "yyyy-MM-dd HH:mm:ss"
  1220. // }
  1221. // $http.post(apiurljs.login + "g2app/calendar/queryServiceDate", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  1222. // .success(function (obj) {
  1223. // var res = strToJson(s4.decryptData_CBC(obj.data));
  1224. // self.ServerTime = res.data;
  1225. // self.getREMINDTIME()
  1226. // })
  1227. // }
  1228. //获取提醒时间
  1229. // self.getREMINDTIME = function () {
  1230. // var data = {
  1231. // tablename: "CODE_REMINDTIME",
  1232. // colums: "*",
  1233. // order: "ID",
  1234. // sqlwhere: "",
  1235. // sqlinwhere: "",
  1236. // sqllikewhere: ""
  1237. // };
  1238. // $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  1239. // .success(function (obj) {
  1240. // var res = strToJson(s4.decryptData_CBC(obj.data));
  1241. // self.REMINDTIME = res.data;
  1242. // self.getFREQUENCY()
  1243. // })
  1244. // }
  1245. //获取提醒频率
  1246. // self.getFREQUENCY = function () {
  1247. // var data = {
  1248. // tablename: "CODE_FREQUENCY",
  1249. // colums: "*",
  1250. // order: "ID",
  1251. // sqlwhere: "",
  1252. // sqlinwhere: "",
  1253. // sqllikewhere: ""
  1254. // };
  1255. // $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  1256. // .success(function (obj) {
  1257. // var res = strToJson(s4.decryptData_CBC(obj.data));
  1258. // self.FREQUENCY = res.data;
  1259. // self.getRemindList()
  1260. // })
  1261. // }
  1262. // self.getRemindList = function () {
  1263. // self.remindlist = []
  1264. // var data = {
  1265. // STRATDATE: sp.dateFtt("yyyy-MM-dd", new Date()),
  1266. // USERID: self.engName
  1267. // }
  1268. // $http.post(apiurljs.login + "g2app/calendar/queryDayData", {data: s4.encryptData_CBC(JSON.stringify(postData))}, postCfg)
  1269. // .success(function (obj) {
  1270. // var res = strToJson(s4.decryptData_CBC(obj.data));
  1271. // if (res.data.Items[0].task == null || res.data.Items[0].task == undefined || res.data.Items[0].task == "") {
  1272. // } else {
  1273. // self.remindlist = res.data.Items[0].task;
  1274. //
  1275. // self.remindlist.forEach(function (item) {
  1276. // self.REMINDTIME.forEach(function (item1) {
  1277. // if (item.REMINDTIME == item1.CODE) {
  1278. // item.REMINDTIME = item1.NUM * 3600000
  1279. // }
  1280. // })
  1281. // self.FREQUENCY.forEach(function (item1) {
  1282. // if (item.FREQUENCY == item1.CODE) {
  1283. // item.FREQUENCY = item1.NUM
  1284. // }
  1285. // })
  1286. // })
  1287. //
  1288. // //生成事项提醒循环
  1289. // var remindStart = [];
  1290. // $.each(self.remindlist, function (index, item) {
  1291. // remindStart[index] = $interval(function () {
  1292. // remindGoing(index);
  1293. // }, 1000)
  1294. // })
  1295. // var remindGoing = function (n) {
  1296. // remindWarning(self.remindlist[n], n)
  1297. // //判断循环是否停止
  1298. // if (self.ServerTime >= self.remindlist[n].STARTIME) {
  1299. // $interval.cancel(remindStart[n]);
  1300. // }
  1301. // }
  1302. // //到时提醒
  1303. // var remindWarning = function (obj, n) {
  1304. // var n = obj.FREQUENCY - 1;
  1305. // if (self.ServerTime == TimeToDate(obj.STARTIME, obj.REMINDTIME * n)) {
  1306. // sp.dialog(obj.MEETINGNAME + "第" + (obj.FREQUENCY - n) + "次提醒");
  1307. // $timeout(function () {
  1308. // n--
  1309. // sp.dialoghide()
  1310. // }, 5000)
  1311. // remindStart[obj.id + "times"] = $interval(function () {
  1312. // sp.dialog(obj.MEETINGNAME + "第" + (obj.FREQUENCY - n) + "次提醒");
  1313. // $timeout(function () {
  1314. // n--
  1315. // sp.dialoghide()
  1316. // }, 5000)
  1317. // }, obj.REMINDTIME, n)
  1318. // }
  1319. // }
  1320. // }
  1321. // });
  1322. // }
  1323. //self.getServerTime()
  1324. self.onePic = function () {
  1325. self.headBtnSearchhc({keyCode:13})
  1326. //if(self.dtslPlaceholder == "图上查"){
  1327. // sp.addTabNav("DTSS", "图上查", apiurljs.onePic + "wholeProcessPage?token=" + self.outToken)
  1328. // }else{
  1329. // self.headBtnSearchhc({keyCode:13})
  1330. // }
  1331. }
  1332. self.deptAppList = []
  1333. window.deptClick_FJSKECMADWDSCBNHX = function(deptId,deptName){
  1334. self.deptAppListTitle = deptName
  1335. if(deptId){
  1336. self.deptAppList = []
  1337. sp.layer("#dept-app-list")
  1338. var dptCfg = {
  1339. headers: {
  1340. 'Content-Type': 'application/json',
  1341. 'Access-Token': localStorage.getItem("main-token"),
  1342. }
  1343. };
  1344. $http.get(
  1345. apiurljs.dpt+"auth/system/app-list-divisions?deptId="+deptId,
  1346. dptCfg
  1347. ).success(function (obj) {
  1348. console.log(obj.result)
  1349. self.deptAppList = obj.result
  1350. })
  1351. }
  1352. }
  1353. self.goApp = function(obj){
  1354. sp.layerhide()
  1355. if (obj.indexUrl.indexOf("?") > -1) {
  1356. window.top.sp.addTabNav(obj.appCode, obj.appName, obj.indexUrl+'&token='+localStorage.getItem("main-token"));
  1357. } else {
  1358. window.top.sp.addTabNav(obj.appCode, obj.appName, obj.indexUrl+'?token='+localStorage.getItem("main-token"));
  1359. }
  1360. }
  1361. self.dtslPlaceholder = "图上查"
  1362. self.ZhcxMapList = ['图上查']//'查房屋','查从业人员','查项目','查企业',
  1363. self.getZhcxMaoList = function(){
  1364. var dptCfg = {
  1365. headers: {
  1366. 'Content-Type': 'application/json',
  1367. 'Access-Token': localStorage.getItem("main-token"),
  1368. }
  1369. };
  1370. $http.get(
  1371. apiurljs.dpt+"auth/system/app-list-outer?portalShow=1&type=oa",
  1372. dptCfg
  1373. ).success(function (obj) {
  1374. if(obj.result&&obj.result.length>0){
  1375. let appBkList = obj.result
  1376. for(let i=0;i<appBkList.length;i++){
  1377. let appList = appBkList[i].appList
  1378. if(appList&&appList.length>0){
  1379. appList.forEach(function(appItem){
  1380. if(appItem.appCode =='xmqyxx'){
  1381. //self.ZhcxMapList.unshift('查项目')
  1382. self.ZhcxMapList.push('查一查')
  1383. //self.dtslPlaceholder = "查一查"
  1384. }
  1385. })
  1386. }
  1387. }
  1388. }
  1389. })
  1390. }
  1391. self.getZhcxMaoList()
  1392. //综合查询移入
  1393. self.zhxcOnclick = function(){
  1394. let el_zhcxList = document.getElementById("zhcx-map-list")
  1395. if(el_zhcxList.style.display == 'block'){
  1396. el_zhcxList.style.display = 'none'
  1397. }else{
  1398. el_zhcxList.style.display = 'block'
  1399. }
  1400. }
  1401. self.zhxcOnmouseenter = function(){
  1402. let el_zhcxList = document.getElementById("zhcx-map-list")
  1403. el_zhcxList.style.display = 'block'
  1404. }
  1405. self.zhxcOnmouseleave = function () {
  1406. let el_zhcxList = document.getElementById("zhcx-map-list")
  1407. el_zhcxList.style.display = 'none';
  1408. }
  1409. self.zhcxMapClick = function(item){
  1410. if(item != self.dtslPlaceholder){
  1411. self.headSearchResult_view = false;
  1412. self.headBtnSearchKeyword = ""
  1413. self.dtslPlaceholder = item
  1414. }
  1415. }
  1416. //顶部工具栏跳转一张图
  1417. self.GoOnePic=function(){
  1418. var get_token = localStorage.getItem("main-token");
  1419. //sp.addTabNav('F0102', '一张图', apiurljs.onePic + "wholeProcessPage?token=" + get_token + "&name=&type=&id=");
  1420. //sp.addTabNav('F0102', '一张图', apiurljs.onePic + "digitalHousingUrbanRuralCommission?token=" + get_token + "&name=&type=&id=");
  1421. window.open(apiurljs.onePic + "digitalHousingUrbanRuralCommission?token=" + get_token + "&name=&type=&id=", "_blank");
  1422. }
  1423. }])
  1424. var CrossPage = new Object();