leftMenu.jsp 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8" %>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
  5. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
  6. <!-- 左侧导航区域 -->
  7. <div id="leftMenu">
  8. <!-- <div class="top_menu" @click="changeSide" v-if="collapse"></div> -->
  9. <div class="layui-side left_menu" :class="{close: collapse}">
  10. <!-- <div :class="['top_menu', {collapse}]" @click="changeSide" v-if="!collapse"></div> -->
  11. <div class="layui-side-scroll" style="width: 200px">
  12. <ul class="layui-nav layui-nav-tree" style="width: 200px" lay-filter="test">
  13. <li :class="['layui-nav-item', {'layui-nav-itemed layui-nav-itemed-hand': active === index}]"
  14. v-for="(item, index) in navLs" :key="index" v-if="menuCode.indexOf(item.code) >= 0"
  15. >
  16. <a :title="item.txt" @click="onSelectItem(index)" class='icon' style="color: #ffffff !important;"
  17. :class="active === index? item.activeIcon :item.icon" href="javascript:;">{{item.txt}}</a>
  18. <!-- <a v-else :title="item.txt" @click="onSelectItem(index)" :class="['icon', ]" href="javascript:;">{{item.txt}}</a> -->
  19. <dl class="layui-nav-child" v-if="item.child != null">
  20. <dd v-for="(it,ind) in item.child" :key="ind" v-if="menuCode.indexOf(it.code) >= 0">
  21. <a :title="it.txt" href="javascript:;" :class="['icon', it.icon]"
  22. style="font-size: 12px;text-indent: 1rem" @click="onSelectItem(index,ind)">{{it.txt}}</a>
  23. </dd>
  24. </dl>
  25. </li>
  26. </ul>
  27. </div>
  28. </div>
  29. <!-- 内容区域 -->
  30. <div class="layui-body">
  31. <iframe id="rightContent"></iframe>
  32. </div>
  33. </div>
  34. <script type="text/javascript">
  35. var year = new Date().getFullYear();
  36. new Vue({
  37. el: "#leftMenu",
  38. data: {
  39. winH: 0,
  40. collapse: false,
  41. tabActive: 1,
  42. isDialog: '${isDialog}',
  43. active: 0, // 左侧菜单选中项
  44. buttonActive: 1,
  45. buttonActive2: 1,
  46. menuCode: "${menuCode}".split(","),
  47. navLs: [
  48. /* {icon: 'icon_big_screen_active',activeIcon:'icon_big_screen_active', code: '101', txt: '分析大屏',url: 'statics/analysisScreen'}, */
  49. {
  50. icon: 'icon_big_screen_active',
  51. activeIcon: 'icon_big_screen_active',
  52. code: '101',
  53. txt: '智慧分析大屏',
  54. url: 'statics/analysisScreenTwo'
  55. },
  56. {
  57. icon: 'icon_work_bench_active',
  58. activeIcon: 'icon_work_bench_active',
  59. code: '201',
  60. txt: '互动工作台',
  61. url: 'workBench/zrWorkBench',
  62. kind: ["1", "4"]
  63. },
  64. {
  65. icon: 'icon_project_active',
  66. activeIcon: 'icon_project_active',
  67. code: '4',
  68. txt: '项目四库管理',
  69. child: [
  70. {
  71. txt: '储备库',
  72. code: '402',
  73. url: 'subject/subInfo/projTz?type=3',
  74. before: function () {
  75. window.localStorage.removeItem("TzQueryParam_cb_${loginUserId}")
  76. }
  77. },
  78. {
  79. txt: '新建库',
  80. code: '408',
  81. url: 'subject/subInfo/projTz?type=0',
  82. before: function () {
  83. window.localStorage.removeItem("TzQueryParam_xj_${loginUserId}")
  84. }
  85. },
  86. {
  87. txt: '在建库',
  88. code: '401',
  89. url: 'subject/subInfo/projTz?type=1',
  90. before: function () {
  91. window.localStorage.removeItem("TzQueryParam_main_${loginUserId}")
  92. }
  93. },
  94. {
  95. txt: '投产库',
  96. code: '403',
  97. url: 'subject/subInfo/projTz?type=4',
  98. before: function () {
  99. window.localStorage.removeItem("TzQueryParam_end_${loginUserId}")
  100. }
  101. }
  102. ,
  103. {
  104. txt: '项目总库',
  105. code: '404',
  106. url: 'subject/subInfo/projTz?type=5',
  107. before: function () {
  108. window.localStorage.removeItem("TzQueryParam_end_${loginUserId}")
  109. }
  110. }
  111. ]
  112. },
  113. {
  114. icon: 'icon_organ_manage_active',
  115. activeIcon: 'icon_organ_manage_active',
  116. code: '3',
  117. txt: '项目前期管理',
  118. child: [
  119. {
  120. txt: '项目信息申报',
  121. code: '301',
  122. url: 'subject/subInfo/report'
  123. },
  124. // {
  125. // txt: '项目审核',
  126. // code: '302',
  127. // url: 'subject/apply/spList'/* ?type=qx */
  128. // },
  129. // {
  130. // code: '304',
  131. // txt: '前期手续办理情况评价',
  132. // url: 'subject/subInfo/projTz?type=prePj',
  133. // },
  134. {
  135. txt: '前期手续办理情况',
  136. code: '303',
  137. url: 'subject/subInfo/pre'/* ?type=qx */
  138. }
  139. ]
  140. },
  141. {
  142. icon: 'icon_project_active',
  143. activeIcon: 'icon_project_active',
  144. code: '1999',
  145. txt: '重点项目调度',
  146. child: [
  147. {
  148. txt: '储备项目',
  149. code: '1103',
  150. url: 'subject/subInfo/projTz?type=yearReserve',
  151. before: function () {
  152. window.localStorage.removeItem("TzQueryParam_yearReserve_${loginUserId}")
  153. }
  154. },
  155. {
  156. txt: '新建项目',
  157. code: '1101',
  158. url: 'subject/subInfo/projTz?type=yearNew',
  159. before: function () {
  160. window.localStorage.removeItem("TzQueryParam_yearNew_${loginUserId}")
  161. }
  162. },
  163. {
  164. txt: '在建项目',
  165. code: '1102',
  166. url: 'subject/subInfo/projTz?type=yearExtend',
  167. before: function () {
  168. window.localStorage.removeItem("TzQueryParam_yearExtend_${loginUserId}")
  169. }
  170. },
  171. {
  172. txt: '投产项目',
  173. code: '1101',
  174. url: 'subject/subInfo/projTz?type=yearSum',
  175. before: function () {
  176. window.localStorage.removeItem("TzQueryParam_yearSum_${loginUserId}")
  177. }
  178. },
  179. <%-- <c:forEach items="${zjlyList}" var="li" varStatus="lis">--%>
  180. <%-- {--%>
  181. <%-- txt: '${li.title}',--%>
  182. <%-- code: '${li.code}',--%>
  183. <%-- url: 'subject/subInfo/projZj?code=${li.code}&title=${li.title}',--%>
  184. <%-- },--%>
  185. <%-- </c:forEach>--%>
  186. <%-- <c:forEach items="${zjlyList}" var="li" varStatus="lis">--%>
  187. <%-- <c:choose>--%>
  188. <%-- <c:when test="${li.code == '1999' && li.title == '重点投资项目'}">--%>
  189. <%-- {--%>
  190. <%-- txt: '重点投资项目',--%>
  191. <%-- code: '1999',--%>
  192. <%-- url: 'subject/subInfo/projTz?type=major',--%>
  193. <%-- },--%>
  194. <%-- </c:when>--%>
  195. <%-- <c:when test="${li.code == '104' && li.title == '援疆资金'}">--%>
  196. <%-- {--%>
  197. <%-- txt: '${li.title}',--%>
  198. <%-- code: '${li.code}',--%>
  199. <%-- url: 'non/fixed/investment/yjzj',--%>
  200. <%-- },--%>
  201. <%-- </c:when>--%>
  202. <%-- <c:otherwise>--%>
  203. <%-- {--%>
  204. <%-- txt: '${li.title}',--%>
  205. <%-- code: '${li.code}',--%>
  206. <%-- /* url: 'subject/subInfo/projZjTab?code=${li.code}&title=${li.title}',*/--%>
  207. <%-- url: 'subject/subInfo/projZjTab?code=${li.code}&title=${li.title}&statusZj=1',--%>
  208. <%-- },--%>
  209. <%-- </c:otherwise>--%>
  210. <%-- </c:choose>--%>
  211. <%-- </c:forEach>--%>
  212. /* {
  213. txt: '重点投资项目',
  214. code: '404',
  215. url: 'subject/subInfo/projTz?type=major',
  216. },*/
  217. /* {
  218. txt: '中央预算内资金项目',
  219. code: '404',
  220. url: 'subject/subInfo/projTz?type=6',
  221. },
  222. {
  223. txt: '援疆资金项目',
  224. code: '405',
  225. url: 'subject/subInfo/projTz?type=7',
  226. },
  227. {
  228. txt: '总投资10亿元以上项目',
  229. code: '1001',
  230. url: 'subject/subInfo/projTz?type=9',
  231. },
  232. {
  233. txt: '以工代赈项目',
  234. code: '1002',
  235. url: 'subject/subInfo/projTz?type=10',
  236. },/!*, {
  237. txt: (year-1)+'年增发国债',
  238. code: '1003',
  239. url: 'subject/subInfo/projTz?type=11',
  240. },*!/
  241. {
  242. txt: year+'年超长期国债',
  243. code: '1004',
  244. url: 'subject/subInfo/projTz?type=12',
  245. }
  246. ,
  247. {
  248. txt: '地方政府专项债资金',
  249. code: '1005',
  250. url: 'subject/subInfo/projTz?type=13',
  251. }*/
  252. ]
  253. },
  254. <%--{--%>
  255. <%-- icon: 'icon_project_active',--%>
  256. <%-- activeIcon: 'icon_project_active',--%>
  257. <%-- code: '11',--%>
  258. <%-- txt: '年度固定资产项目库',--%>
  259. <%-- child: [--%>
  260. <%-- {--%>
  261. <%-- txt: '汇总项目',--%>
  262. <%-- code: '1101',--%>
  263. <%-- url: 'subject/subInfo/projTz?type=yearSum',--%>
  264. <%-- before: function () {--%>
  265. <%-- window.localStorage.removeItem("TzQueryParam_yearSum_${loginUserId}")--%>
  266. <%-- }--%>
  267. <%-- },--%>
  268. <%-- {--%>
  269. <%-- txt: '新建项目',--%>
  270. <%-- code: '1101',--%>
  271. <%-- url: 'subject/subInfo/projTz?type=yearNew',--%>
  272. <%-- before: function () {--%>
  273. <%-- window.localStorage.removeItem("TzQueryParam_yearNew_${loginUserId}")--%>
  274. <%-- }--%>
  275. <%-- },--%>
  276. <%-- {--%>
  277. <%-- txt: '续建项目',--%>
  278. <%-- code: '1102',--%>
  279. <%-- url: 'subject/subInfo/projTz?type=yearExtend',--%>
  280. <%-- before: function () {--%>
  281. <%-- window.localStorage.removeItem("TzQueryParam_yearExtend_${loginUserId}")--%>
  282. <%-- }--%>
  283. <%-- },--%>
  284. <%-- {--%>
  285. <%-- txt: '储备项目',--%>
  286. <%-- code: '1103',--%>
  287. <%-- url: 'subject/subInfo/projTz?type=yearReserve',--%>
  288. <%-- before: function () {--%>
  289. <%-- window.localStorage.removeItem("TzQueryParam_yearReserve_${loginUserId}")--%>
  290. <%-- }--%>
  291. <%-- }--%>
  292. <%-- ]--%>
  293. <%--},--%>
  294. // {
  295. // icon: 'icon_over_time_active',
  296. // activeIcon: 'icon_over_time_active',
  297. // code: '2000',
  298. // txt: '竣工验收及项目后评价',
  299. // url: 'subject/subInfo/projTz?type=8',
  300. // },
  301. /* {
  302. icon: 'icon_over_time_active', activeIcon: 'icon_over_time_active',
  303. code: '5',
  304. txt: '重点投资项目',
  305. url: 'subject/subInfo/projTz?type=major',
  306. },*/
  307. {
  308. icon: 'icon_over_time_active', activeIcon: 'icon_over_time_active',
  309. code: '5',
  310. txt: '统计分析',
  311. url: 'tjfx/index'
  312. // url: 'register/underConstruction'
  313. },
  314. {
  315. icon: 'icon_over_time_active',
  316. activeIcon: 'icon_over_time_active',
  317. code: '6',
  318. txt: '预警问题督办',
  319. child: [
  320. {
  321. txt: '问题统计分析',
  322. code: '602',
  323. icon: 'icon_question_gz',
  324. url: 'problem/info/index'
  325. // url: 'register/underConstruction'
  326. },
  327. {
  328. txt: '问题推送处理',
  329. code: '603',
  330. url: "problemtrack/index"
  331. // url: 'register/underConstruction'
  332. }
  333. ]
  334. },
  335. {
  336. icon: 'icon_zjfwk_active',
  337. activeIcon: 'icon_zjfwk_active',
  338. txt: '智联工地',
  339. code: '7',
  340. child: [
  341. /* {
  342. code: '701',
  343. txt: '智慧工地总览',
  344. url: 'smart/index'
  345. }, */
  346. {
  347. code: '702',
  348. txt: '项目地图',
  349. // url: 'smart/query'
  350. url: 'register/underConstruction'
  351. },
  352. {
  353. code: '703',
  354. txt: '实时视频',
  355. // url: 'smart/vedio'
  356. url: 'register/underConstruction'
  357. },
  358. {
  359. txt: '周调度图片',
  360. code: '706',
  361. // url: 'graphicProgress/list'
  362. url: 'register/underConstruction'
  363. },
  364. {
  365. txt: '月航拍全景',
  366. code: '707',
  367. // url: 'aerial/list'
  368. url: 'register/underConstruction'
  369. }
  370. ]
  371. },
  372. // {
  373. // icon: 'icon_project_active',
  374. // activeIcon: 'icon_project_active',
  375. // code: '8',
  376. // txt: '产业链共享服务',
  377. // url: 'intermediary/list'
  378. // /* child: [
  379. // {
  380. // txt: '产业链服务库列表',
  381. // code: '801',
  382. // url: 'intermediary/list'
  383. // },{
  384. // txt: '产业链服务库统计',
  385. // code: '802',
  386. // url: 'intermediary/statics'
  387. // },
  388. // ] */
  389. // },
  390. // ,{
  391. // icon: 'icon_project_zjfwk_active',
  392. // activeIcon:'icon_project_zjfwk_active',
  393. // txt: '产业链服务库',
  394. // code: '11',
  395. // url: 'intermediary/list'
  396. // },
  397. // {
  398. // icon: 'icon_project_active',
  399. // activeIcon:'icon_project_active',
  400. // code: '5',
  401. // txt: '项目申报管理',
  402. // child: [
  403. // {
  404. // txt: '项目信息申报',
  405. // code: '501',
  406. // url: 'subject/subInfo/report'
  407. // },
  408. // /* {
  409. // txt: '项目申报',
  410. // code: '502',
  411. // url: 'subject/subPre/records_list'
  412. // }, */
  413. // /* {
  414. // txt: '分配审核单位',
  415. // code: '502',
  416. // url: 'subject/subInfo/manage'
  417. // }, */
  418. // {
  419. // txt: '项目手续办理',
  420. // code: '503',
  421. // url: '/subPreNew/index'
  422. // },
  423. // {
  424. // txt: '项目审核',
  425. // code: '504',
  426. // url: 'subject/apply/spList'/* ?type=qx */
  427. // },
  428. // /* {
  429. // txt: '项目审核-市发改委',
  430. // code: '505',
  431. // url: 'subject/apply/spList?type=sj'
  432. // }, */
  433. // /* {
  434. // txt: '项目核准备案',
  435. // code: '505',
  436. // url: 'subject/hzba/list'
  437. // }, */
  438. // ]
  439. // },
  440. {
  441. icon: 'icon_project_xtgl_active',
  442. activeIcon: 'icon_project_xtgl_active',
  443. code: '9',
  444. txt: '系统管理',
  445. child: [
  446. // {
  447. // txt: '角色管理',
  448. // code: '901',
  449. // url: "Rolemeun/view"
  450. // },
  451. // {
  452. // txt: '用户管理',
  453. // code: '902',
  454. // url: "user/view"
  455. // },
  456. // {
  457. // txt: '用户管理-项目单位',
  458. // code: '903',
  459. // url: "userapply/view"
  460. // },
  461. {
  462. txt: '项目单位信息',
  463. code: '904',
  464. url: 'register/query'
  465. },
  466. // {
  467. // txt: '审核项目单位信息',
  468. // code: '905',
  469. // url: 'register/queryCheck'
  470. // },
  471. {
  472. txt: '行业部门信息',
  473. code: '906',
  474. url: 'junit/index'
  475. },
  476. // {
  477. // txt: '部门科室信息',
  478. // code: '907',
  479. // url: 'jdepart/index'
  480. // }
  481. // ,
  482. // {
  483. // txt: '监管单位设置',
  484. // code: '908',
  485. // url: 'mainjunit/index'
  486. // },
  487. {
  488. txt: '字典管理',
  489. code: '909',
  490. url: 'dicsystable/index',
  491. },
  492. {
  493. txt: '行业设置',
  494. code: '918',
  495. url: 'subIndu/index',
  496. },
  497. /* {
  498. txt: 'APP轮播图设置',
  499. code: '607',
  500. url: 'picture/index'
  501. }, */
  502. /* {
  503. txt: '项目文档的单位设置',
  504. code: '608',
  505. url: 'approvalUnit/index'
  506. }, */
  507. {
  508. txt: '公告管理',
  509. code: '910',
  510. url: 'notice/index'
  511. },
  512. {
  513. txt: '系统参数设置',
  514. code: '911',
  515. url: 'sysTable/index'
  516. },
  517. // {
  518. // txt: '项目前期批复单位设置',
  519. // code: '912',
  520. // url: 'subPreFlow/setUnit'
  521. // },
  522. // {
  523. // txt: '同步日志查询',
  524. // code: '913',
  525. // url: 'syncLog/index'
  526. // },
  527. {
  528. txt: '项目日志查询',
  529. code: '913',
  530. url: 'subDataLog/index'
  531. },
  532. {
  533. txt: '登录日志',
  534. code: '911',
  535. url: 'loginlog/index'
  536. },
  537. // {
  538. // code: '914',
  539. // txt: '政策文件分类',
  540. // url: 'policy/column/index'
  541. // },
  542. // {
  543. // code: '1002',
  544. // txt: '文件内容',
  545. // url: 'policy/document/index'
  546. // },
  547. // {
  548. // txt: '项目删除',
  549. // code: '515',
  550. // url: 'subject/subInfo/delView'
  551. // },
  552. {
  553. txt: '短信日志查询',
  554. code: '915',
  555. url: 'msgLog/index'
  556. },
  557. // {
  558. <%-- txt: '项目总库',--%>
  559. <%-- code: '916',--%>
  560. <%-- url: 'subject/subInfo/projTz?type=5',--%>
  561. <%-- before: function () {--%>
  562. <%-- window.localStorage.removeItem("TzQueryParam_zk_${loginUserId}")--%>
  563. <%-- }--%>
  564. <%--},--%>
  565. {
  566. code: '917',
  567. txt: 'A项目年度计划',
  568. // url: 'annualPlan/index'
  569. url: 'register/underConstruction'
  570. },
  571. {
  572. txt: 'B项目周报',
  573. code: '406',
  574. // url: 'weekReport/view'
  575. url: 'register/underConstruction'
  576. },
  577. {
  578. txt: 'C项目月报',
  579. code: '407',
  580. // url: 'monthReport/view'
  581. url: 'register/underConstruction'
  582. },
  583. {
  584. txt: 'D每个月项目转换情况',
  585. code: '407',
  586. // url: 'monthReport/view'
  587. url: 'register/underConstruction'
  588. },
  589. <%--{--%>
  590. <%-- txt: '逾期项目',--%>
  591. <%-- code: '601',--%>
  592. <%-- url: 'overdue/view?overStatus=1'--%>
  593. <%--},--%>
  594. <%--{--%>
  595. <%-- code: '604',--%>
  596. <%-- txt: '重大事件记录专栏',--%>
  597. <%-- url: 'meetingRecords/list'--%>
  598. <%--},--%>
  599. <%--{--%>
  600. <%-- txt: '经纬度设置',--%>
  601. <%-- code: '704',--%>
  602. <%-- url: 'subject/subInfo/latitudeAndLongitude'--%>
  603. <%--},--%>
  604. <%--{--%>
  605. <%-- txt: '摄像头绑定',--%>
  606. <%-- code: '705',--%>
  607. <%-- url: 'camera/index'--%>
  608. <%--},--%>
  609. ]
  610. }
  611. // ,{
  612. // icon: 'icon_big_screen_active',
  613. // activeIcon:'icon_big_screen_active',
  614. // code: '8',
  615. // txt: '统计分析',
  616. // child: [
  617. // /* {
  618. // code: '811',
  619. // txt: '项目预测分析',
  620. // url: 'prediction/index',
  621. // }, */{
  622. // code: '812',
  623. // txt: '同比',
  624. // url: 'yoy/index'
  625. //
  626. // },{
  627. // code: '813',
  628. // txt: '环比',
  629. // url: 'qoq/view'
  630. // },{
  631. // code: '814',
  632. // txt: '年度投资分析',
  633. // url: 'yoy/tjfx'
  634. // }
  635. // ]
  636. // }
  637. // {
  638. // icon: 'icon_big_screen_active',
  639. // activeIcon:'icon_big_screen_active',
  640. // txt: '政策文件管理',
  641. // code: '10',
  642. // child: [
  643. // {
  644. // code: '1001',
  645. // txt: '政策文件分类',
  646. // url: 'policy/column/index'
  647. // },
  648. // {
  649. // code: '1002',
  650. // txt: '文件内容',
  651. // url: 'policy/document/index'
  652. // }
  653. // ]
  654. // }
  655. ],
  656. imgLs: 10
  657. },
  658. mounted: function () {
  659. this.init();
  660. window.addEventListener("message", e => {
  661. this.changeSide(e.data.collapse)
  662. });
  663. window.toWorkBench = this.toWorkBench;
  664. window.toTask = this.toTask;
  665. },
  666. methods: {
  667. init: function () {
  668. if (this.isDialog === '1') {
  669. this.toTask();
  670. }
  671. const $ = layui.jquery
  672. // $('#rightContent').width(document.body.clientWidth - 190).height(document.body.clientHeight - 50);
  673. window.addEventListener('resize', function () {
  674. // $('#rightContent').height(document.body.clientHeight - 50);
  675. })
  676. //通过hash值的索引定位应该加载哪个页面
  677. var href = window.location.href;
  678. var toUrl = href.replace(App.getUrl("index"), "");
  679. if (toUrl.indexOf("#") == 0 && toUrl.length >= 2) {
  680. var hashIndex = toUrl.replace("#", "").split("_");
  681. for (var i = 0; i < hashIndex.length; i++) {
  682. if (!isNumber(hashIndex[i])) {
  683. return;
  684. }
  685. }
  686. if (hashIndex.length > 1) {
  687. this.onSelectItem(hashIndex[0], hashIndex[1]);
  688. } else {
  689. this.onSelectItem(hashIndex[0]);
  690. }
  691. //页面选中
  692. /* for(var i =0;i<this.navLs.length;i++){
  693. if (this.navLs[i].child != null){
  694. //再次循环
  695. for (var j=0;j<this.navLs[i].child.length;j++){
  696. if(toUrl.indexOf(this.navLs[i].child[j].url) >= 0){
  697. $("#rightContent").attr("src",App.getUrl(toUrl.substring(2,toUrl.length)));
  698. this.active = i;
  699. break;
  700. }
  701. }
  702. }else{
  703. if(toUrl.indexOf(this.navLs[i].url) >= 0){
  704. $("#rightContent").attr("src",App.getUrl(toUrl.substring(2,toUrl.length)));
  705. this.active = i;
  706. break;
  707. }
  708. }
  709. } */
  710. } else {
  711. //初始化选中第一个菜单
  712. for (var i = 0; i < this.navLs.length; i++) {
  713. if (this.menuCode.indexOf(this.navLs[i].code) >= 0) {
  714. if (this.navLs[i].child) {
  715. var child = this.navLs[i].child;
  716. for (var j = 0; j < child.length; j++) {
  717. if (this.menuCode.indexOf(child[j].code) >= 0) {
  718. this.onSelectItem(i, j);
  719. return;
  720. }
  721. }
  722. } else {
  723. this.onSelectItem(i);
  724. return;
  725. }
  726. }
  727. }
  728. }
  729. },
  730. changeSide: function (status = true) {
  731. this.collapse = !status
  732. if (this.collapse) {
  733. $("#rightContent").parent().addClass("close");
  734. } else {
  735. $("#rightContent").parent().removeClass("close");
  736. }
  737. $("#rightContent").width("100%");
  738. },
  739. toWorkBench: function () {
  740. var index = this.navLs.findIndex(item => {
  741. return item.txt === '工作台';
  742. });
  743. this.onSelectItem(index)
  744. },
  745. toTask: function () {
  746. /* top.App.openLayer({
  747. title : "项目调度情况",
  748. content : App.getUrl("meetingRecords/show"),
  749. height : "700",
  750. width : "90%"
  751. });*/
  752. //详情
  753. var index = top.layer.open({
  754. type: 2,
  755. area: ['95%', '100%'],
  756. content: App.getUrl("taskRecords/show"),
  757. shade: 0.5,
  758. shadeClose: true
  759. });
  760. //top.layer.full(index);
  761. },
  762. onSelectItem: function (index, ind) {
  763. this.active = index;
  764. if (ind != undefined) {
  765. var chooseNode = this.navLs[index]["child"][ind];
  766. if (chooseNode.url) {
  767. if (chooseNode.before && typeof (chooseNode.before) == 'function') {
  768. chooseNode.before();
  769. }
  770. window.location.hash = index + "_" + ind;
  771. var parentNodeText = this.navLs[index].txt;
  772. var arrowHtml = '<div class="top-arrow-html"></div>';
  773. $("#rightContent").attr("src", App.getUrl(chooseNode.url));
  774. $(".top-breadcrumb").html(parentNodeText + arrowHtml + chooseNode.txt);
  775. } else {
  776. App.msg.warn("正在建设中");
  777. }
  778. } else if (this.navLs[index].url) {
  779. var chooseNode = this.navLs[index];
  780. if (chooseNode.before && typeof (chooseNode.before) == 'function') {
  781. chooseNode.before();
  782. }
  783. window.location.hash = index;
  784. $("#rightContent").attr("src", App.getUrl(this.navLs[index].url));
  785. $(".top-breadcrumb").text(this.navLs[index].txt);
  786. }
  787. },
  788. onChangeActive: function (index) {
  789. this.tabActive = index
  790. },
  791. onButtonActive: function (index) {
  792. this.buttonActive = index
  793. },
  794. onView: function () {
  795. const $ = layui.jquery
  796. layer.open({
  797. type: 1,
  798. title: '确认信息',
  799. skin: 'pop_info_class',
  800. id: 'layerPop1', //防止重复弹出
  801. content: $('#popInfo'),
  802. btn: ['取消', '提交'],
  803. btnAlign: 'c', //按钮居中
  804. yes: function () {
  805. layer.closeAll();
  806. },
  807. btn2: function () {
  808. },
  809. cancel: function () {
  810. layer.closeAll();
  811. }
  812. })
  813. }
  814. }
  815. });
  816. window.onresize = function () {
  817. $("#rightContent").css("width", "100%");
  818. }
  819. </script>
  820. <style>
  821. #rightContent {
  822. width: 100%;
  823. border: none;
  824. height: calc(100% - 6px);
  825. }
  826. .left_menu {
  827. width: 200px;
  828. }
  829. </style>