bb02238ac4c1fe00f508d4df116a20f6d78351d0.svn-base 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. <template>
  2. <div id="layerTreeContainer" class="layerTreeMenuClass">
  3. <div id="layerTreeBar">
  4. <div style="padding-left: 10px;display: flex;flex-direction: row;justify-content: space-between;align-items: center;">
  5. <img src="../assets/ducha.png" style="width: 14px;">
  6. <el-button @click="showDcdxPanelHandler('navi')" style="border-radius: 5px;padding: 5px 5px;color:#2C9EFF;margin-left: 5px;border: 0px;" size="medium ">
  7. 督查对象
  8. <i :class="this.showDcdxPanel ?'el-icon-arrow-up':'el-icon-arrow-down'"></i>
  9. </el-button>
  10. </div>
  11. <div style="width: 1px;height: 10px;background: rgb(190, 190, 190);margin-left: 10px;margin-right: 10px;"></div>
  12. <!-- <div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;">-->
  13. <!-- <img src="../assets/onemap.png" style="width: 14px;">-->
  14. <!-- <el-button @click="showOneMapHandler()" style="border-radius: 5px;padding: 5px 5px;color:#2C9EFF;margin-left: 5px;border: 0px;" size="medium ">-->
  15. <!-- 水利一张图-->
  16. <!-- <i :class="this.showOneMapPanel ?'el-icon-arrow-up':'el-icon-arrow-down'"></i>-->
  17. <!-- </el-button>-->
  18. <!-- </div>-->
  19. </div>
  20. <div class="show1" :style="{'height':+testHeight+'px'}" v-if="showDcdxPanel">
  21. <div class="list-tab" v-for='(it2, index2) in menuContent[0].pageone' :key='index2'>
  22. <h3 class="river-jc">
  23. <span>
  24. <i class="el-icon-menu"></i>
  25. <span>{{it2.title}}</span>
  26. </span>
  27. </h3>
  28. <ul class="river-ul">
  29. <li style="cursor:pointer;" :class="{'layerShown':it3.checked}" @click="leftContentClick(it3)"
  30. v-for='(it3, index3) in it2.fil' :key='index3'>
  31. <i :class="it3.icon" v-if="it3.icon"></i>
  32. <img :src="it3.img" v-if="it3.img" alt="" style="height: 28px;">
  33. <span>{{it3.name}}
  34. <span :class="it3.label"></span>
  35. </span>
  36. </li>
  37. </ul>
  38. </div>
  39. </div>
  40. <div class="show1" :style="{'height':+testHeight+'px'}" v-if="showOneMapPanel">
  41. <div class="list-tab" v-for='(it2, inde2) in menuContent[1].pageone' :key='inde2'>
  42. <h3 class="river-jc">
  43. <span>
  44. <i class="el-icon-menu"></i>
  45. <span>{{it2.title}}</span>
  46. </span>
  47. </h3>
  48. <ul class="river-ul">
  49. <li style="cursor:pointer;" :class="{'layerShown':it3.checked}" @click="leftContentClick(it3)"
  50. v-for='(it3, inde3) in it2.fil' :key='inde3'>
  51. <i :class="it3.icon" v-if="it3.icon"></i>
  52. <img :src="it3.img" v-if="it3.img" alt="" style="height: 28px;width:28px;">
  53. <span>{{it3.name}}
  54. <span :class="it3.label"></span>
  55. </span>
  56. </li>
  57. </ul>
  58. </div>
  59. </div>
  60. </div>
  61. </template>
  62. <script>
  63. import {mapConfig} from '../config/mapConfig.js'
  64. import {tablecont_M,tablecont,tabNames} from '../config/leftLayerMenuConfig.js'//除矢量底图以外
  65. import { hasPriv } from '../../../utils/gw_hasPriv.js'
  66. export default {
  67. props:[],
  68. components:{
  69. },
  70. data(){
  71. return{
  72. tabPosition:"left",
  73. menuContent:[{
  74. pageone:[]
  75. }],//读取菜单内容
  76. tabletit:[],//左侧分类
  77. showDcdxPanel:false,
  78. showOneMapPanel:false,
  79. oneMapMenuList:[],
  80. dcdxMenuList:[],
  81. testHeight:Number(window.innerHeight) * 1 - 251,
  82. testTop:90,
  83. treeData_per:{
  84. title: '人员',
  85. fil: [
  86. { id: 'personGraphicLayer', name: '督查人员', img:'/src/views/zongHeXinXiOl/assets/offline.png', value: 100, checked: true, comeFrom: 'service', url: '' },
  87. ]
  88. },
  89. treeData_sk:{
  90. title: '水库',
  91. fil: [
  92. { id: 'allSkGraphicLayer', name: '水库', img:'/src/views/zongHeXinXiOl/assets/shuiku_All.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  93. // { id: 'skGraphicLayer2018', name: '2018年督查', img:'/src/views/zongHeXinXiOl/assets/shuiku_2018.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  94. // { id: 'skGraphicLayer2019', name: '2019年督查', img:'/src/views/zongHeXinXiOl/assets/shuiku2.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  95. // { id: 'fcskGraphicLayer', name: '复查', img:'/src/views/zongHeXinXiOl/assets/shuiku0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  96. // { id: 'jhwskGraphicLayer', name: '督查计划外', img:'/src/views/zongHeXinXiOl/assets/shuiku_jhw.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  97. ]
  98. },
  99. treeData_sz:{
  100. title: '水闸',
  101. fil: [
  102. { id: 'szGraphicLayerAll', name: '水闸', img:'/src/views/zongHeXinXiOl/assets/szAll.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  103. // { id: 'szGraphicLayer', name: '督查水闸', img:'/src/views/zongHeXinXiOl/assets/sz.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  104. ]
  105. },
  106. // treeData_ry:{
  107. // title: '人饮',
  108. // fil: [
  109. // { id: 'ncysgcGraphicLayer', name: '农村饮水工程', img:'/src/views/zongHeXinXiOl/assets/ncysgc.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  110. // // { id: 'sydGraphicLayer', name: '水源地', img:'/src/views/zongHeXinXiOl/assets/syd.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  111. // // { id: 'country150Layer', name: '督查县', img:'/src/views/zongHeXinXiOl/assets/xian.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  112. // // { id: 'xzcGraphicLayer', name: '督查行政村', img:'/src/views/zongHeXinXiOl/assets/xzc.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  113. // ]
  114. // },
  115. treeData_sh:{
  116. title: '其他',
  117. fil: [
  118. { id: 'shgcGraphicLayer', name: '水毁工程', img:'/src/views/zongHeXinXiOl/assets/shuihui0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  119. ]
  120. },
  121. treeData_172:{
  122. title: '重大水利工程',
  123. fil: [
  124. { id: 'graphicLayer172', name: '重大水利工程', img:'/src/views/zongHeXinXiOl/assets/172.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  125. ]
  126. },
  127. // treeData_dxs:{
  128. // title: '地下水',
  129. // fil: [
  130. // { id: 'dxsGraphicLayer', name: '地下水', img:'/src/views/zongHeXinXiOl/assets/dxs.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  131. // ]
  132. // },
  133. treeData_qsk:{
  134. title: '取水口',
  135. fil: [
  136. { id: 'graphicLayerQsk', name: '取水口', img:'/src/views/zongHeXinXiOl/assets/qsk.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  137. ]
  138. },
  139. treeData_dbssyd:{
  140. title: '地表水水源地',
  141. fil: [
  142. { id: 'graphicLayerDbssyd', name: '地表水水源地', img:'/src/views/zongHeXinXiOl/assets/syd.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  143. ]
  144. },
  145. treeData_swenz:{
  146. title: '水文站',
  147. fil: [
  148. { id: 'graphicLayerSwz', name: '水文站', img:'/src/views/zongHeXinXiOl/assets/swenz.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  149. ]
  150. },
  151. treeData_fupinxian:{
  152. title: '扶贫县',
  153. fil: [
  154. { id: 'mapServer_fpx', name: '扶贫县', img:'/src/views/zongHeXinXiOl/assets/fpx.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  155. { id: 'mapServer_zdx', name: '重点扶贫县', img:'/src/views/zongHeXinXiOl/assets/zdfpx.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  156. { id: 'mapServer_bjx', name: '边境扶贫县', img:'/src/views/zongHeXinXiOl/assets/bjfpx.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  157. { id: 'mapServer_tcx', name: '天窗扶贫县', img:'/src/views/zongHeXinXiOl/assets/tcfpx.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  158. { id: 'mapServer_ddfp', name: '定点扶贫县', img:'/src/views/zongHeXinXiOl/assets/ddfpx.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  159. ]
  160. },
  161. treeData_ydb:{
  162. title: '淤地坝',
  163. fil: [
  164. { id: 'allYdbGraphicLayer', name: '全部淤地坝', img:'/src/views/zongHeXinXiOl/assets/ydb2.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  165. { id: 'ydbGraphicLayer', name: '淤地坝', img:'/src/views/zongHeXinXiOl/assets/ydb1.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  166. ]
  167. },
  168. treeData_szy:{
  169. title: '水资源',
  170. fil: [
  171. { id: 'szy_allQyshGraphicLayer', name: '全部取用水户', img:'/src/views/zongHeXinXiOl/assets/qsk.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  172. { id: 'szy_qyshGraphicLayer', name: '取用水户', img:'/src/views/zongHeXinXiOl/assets/qsk0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  173. { id: 'szy_qskGraphicLayer', name: '取水口', img:'/src/views/zongHeXinXiOl/assets/qsk.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  174. { id: 'szy_allSydGraphicLayer', name: '全部水源地', img:'/src/views/zongHeXinXiOl/assets/syd0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  175. { id: 'szy_sydGraphicLayer', name: '水源地', img:'/src/views/zongHeXinXiOl/assets/syd.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  176. { id: 'szy_jsglGraphicLayer', name: '节水管理', img:'/src/views/zongHeXinXiOl/assets/p0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  177. { id: 'szy_ysdwGraphicLayer', name: '用水单位', img:'/src/views/zongHeXinXiOl/assets/p1.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  178. ]
  179. },
  180. treeData_sb:{
  181. title: '水保',
  182. fil: [
  183. { id: 'graphicLayerSb', name: '水保项目', img:'/src/views/zongHeXinXiOl/assets/shuibao.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  184. { id: 'graphicLayerDcsb', name: '督查水保', img:'/src/views/zongHeXinXiOl/assets/shuibao0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  185. ]
  186. },
  187. treeData_brgj:{
  188. title: '百日攻坚',
  189. fil: [
  190. { id: 'graphicLayerHhsl', name: '河湖四乱', img:'/src/views/zongHeXinXiOl/assets/hhsl0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  191. { id: 'graphicLayerFfcs', name: '非法采砂', img:'/src/views/zongHeXinXiOl/assets/ffcs0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  192. ]
  193. },
  194. treeData_df:{
  195. title: '堤防险工险段',
  196. fil: [
  197. { id: 'xgxdBaseGraphicLayer', name: '堤防基础信息', img:'/src/views/zongHeXinXiOl/assets/p1.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  198. { id: 'xgxdDcGraphicLayer', name: '堤防督查信息', img:'/src/views/zongHeXinXiOl/assets/p2.png', value: 100, checked: false, comeFrom: 'service', url: '' }
  199. ]
  200. },
  201. }
  202. },
  203. watch:{
  204. },
  205. mounted:function(){
  206. if(mapConfig.wkid == ('102100' || '3857')){
  207. this.menuContent.push(tablecont_M[0])
  208. }else{
  209. this.menuContent.push(tablecont[0])
  210. }
  211. this.tabletit = tabNames;
  212. this.authentication();//身份验证
  213. },
  214. methods:{
  215. authentication(){
  216. this.menuContent[0].pageone = [];
  217. if(hasPriv('per_layer')){//督查人员
  218. this.menuContent[0].pageone.push(this.treeData_per);
  219. }
  220. if(hasPriv('rsvr_layer')){//小水库
  221. this.menuContent[0].pageone.push(this.treeData_sk);
  222. }
  223. if(hasPriv('sz_layer')){//水闸
  224. this.menuContent[0].pageone.push(this.treeData_sz);
  225. }
  226. // if(hasPriv('vill_layer')){//人饮
  227. // this.menuContent[0].pageone.push(this.treeData_ry);
  228. // }
  229. if(hasPriv('rect_layer')){//水毁
  230. this.menuContent[0].pageone.push(this.treeData_sh);
  231. }
  232. if(hasPriv('gc_layer')){//172
  233. this.menuContent[0].pageone.push(this.treeData_172);
  234. }
  235. // if(hasPriv('grw_layer')){//地下水监测站
  236. // this.menuContent[0].pageone.push(this.treeData_dxs);
  237. // }
  238. // if(hasPriv('wint_layer')){//取水口
  239. // this.menuContent[0].pageone.push(this.treeData_qsk);
  240. // }
  241. // if(hasPriv('dbssyd_layer')){//地表水水源地
  242. // this.menuContent[0].pageone.push(this.treeData_dbssyd);
  243. // }
  244. // if(hasPriv('swenz_layer')){//水文站
  245. // this.menuContent[0].pageone.push(this.treeData_swenz);
  246. // }
  247. // if(hasPriv('fpx_layer')){//扶贫县
  248. // this.menuContent[0].pageone.push(this.treeData_fupinxian);
  249. // }
  250. // if(hasPriv('ydb_layer')){//淤地坝
  251. // this.menuContent[0].pageone.push(this.treeData_ydb);
  252. // }
  253. // if(hasPriv('szy_layer')){//水资源
  254. // this.menuContent[0].pageone.push(this.treeData_szy);
  255. // }
  256. // if(hasPriv('sb_layer')){//水保
  257. // this.menuContent[0].pageone.push(this.treeData_sb);
  258. // }
  259. // if(hasPriv('brgj_layer')){//百日攻坚
  260. // this.menuContent[0].pageone.push(this.treeData_brgj);
  261. // }
  262. // if(hasPriv('df_layer')){//堤防
  263. // this.menuContent[0].pageone.push(this.treeData_df);
  264. // }
  265. },
  266. leftContentClick(it3){
  267. var str = it3.id;
  268. if(str.substring(0,7) != 'oneMap_'){
  269. it3.checked = !it3.checked;
  270. }
  271. this.$emit('leftLayerMenuClick',it3);
  272. },
  273. showDcdxPanelHandler:function(){
  274. this.showDcdxPanel = !this.showDcdxPanel;
  275. if(this.showDcdxPanel){
  276. this.showOneMapPanel = false;
  277. this.$emit('hide')
  278. }
  279. },
  280. showOneMapHandler(){
  281. this.showOneMapPanel = !this.showOneMapPanel;
  282. if(this.showOneMapPanel){
  283. this.showDcdxPanel = false;
  284. this.$emit('hide')
  285. }
  286. },
  287. hide(){
  288. this.showDcdxPanel = false;
  289. this.showOneMapPanel = false;
  290. },
  291. }
  292. }
  293. </script>
  294. <style scoped>
  295. @import url("/src/assets/watericon/iconfont.css");
  296. [class*=" el-icon-"], [class^=el-icon-]{
  297. font-weight: 600;
  298. color: rgb(189, 189, 189);
  299. }
  300. .layerTreeMenuClass{
  301. position: fixed;
  302. right: 332px;
  303. top: 96px;
  304. z-index: 1;
  305. }
  306. #layerTreeBar{
  307. display: flex;
  308. background-color: white;
  309. height: 46px;
  310. border-radius: 3px;
  311. /*width: 263px;*/
  312. z-index: 1;
  313. align-items: center;
  314. box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.5);
  315. background: rgba(255,255,255,1);
  316. border-radius: 4px;
  317. }
  318. .show1{
  319. width: 231px;
  320. margin-top: 5px;
  321. /* height: 88%; */
  322. border-radius: 3px;
  323. border: 1px solid rgba(220,222,227,1);
  324. /* background-color: #0000cc; */
  325. background-color: rgba(255, 255, 255, 1);
  326. position: fixed;
  327. overflow-y: scroll;
  328. z-index: 1;
  329. box-shadow: 7px 11px 15px 0px rgba(0, 0, 0, 0.2)
  330. }
  331. .river-jc{
  332. margin: 0px;
  333. font-size: 14px;
  334. display: flex;
  335. justify-content: space-between;
  336. align-items: center;
  337. padding-left: 15px;
  338. height: 32px;
  339. background: rgba(242,243,247,1);
  340. /* color: #ff5200; */
  341. color: rgb(189, 189, 189);
  342. }
  343. .river-jc .tit-btn{
  344. margin-right: 15px;
  345. font-size: 12px;
  346. width: 40px;
  347. height: 20px;
  348. }
  349. .river-jc i{
  350. font-size: 16px;
  351. padding-right: 5px;
  352. }
  353. .river-ul{
  354. padding: 0px;
  355. margin: 0px;
  356. width: 100%;
  357. list-style: none;
  358. display: flex;
  359. flex-wrap: wrap;
  360. }
  361. .river-ul li{
  362. width: 50%;
  363. margin-top: 10px;
  364. font-size: 14px;
  365. padding: 5px 0;
  366. /* color: #383838; */
  367. /* color: rgb(56, 56, 56); */
  368. color:#333333;
  369. display: flex;
  370. flex-direction: column;
  371. justify-content: center;
  372. align-items: center;
  373. }
  374. .river-ul li i{
  375. padding-bottom: 5px;
  376. }
  377. .river-ul li:hover{
  378. /* background: #cccccc; */
  379. background: rgb(204, 204, 204)
  380. }
  381. .river-ul li:checked{
  382. /* background: #ff5200; */
  383. background: rgb(255, 82, 0)
  384. }
  385. .layerShown{
  386. /* background-color:#530133; */
  387. background-color: rgba(255, 82, 0, 0.2)
  388. }
  389. .e-spp:hover{
  390. /* color: red; */
  391. color:rgb(255, 0, 0)
  392. }
  393. #layerTreeContainer .el-tabs{
  394. height: 100%!important;
  395. }
  396. #layerTreeContainer .el-tabs__nav{
  397. height: 100%!important;
  398. }
  399. #layerTreeContainer .el-tabs__nav{
  400. display: flex!important;
  401. flex-direction: column!important;
  402. padding-top: 20px!important;
  403. }
  404. #layerTreeContainer .el-tabs__item{
  405. width: 100%!important;
  406. height: 120px!important;
  407. font-size: 14px!important;
  408. writing-mode: tb-rl!important;
  409. padding: 0!important;
  410. line-height: 50px;
  411. display: flex!important;
  412. justify-content: center!important;
  413. }
  414. #layerTreeContainer .el-tabs__nav-prev{
  415. display: none;
  416. }
  417. #layerTreeContainer .el-tabs__content{
  418. width: 0px;
  419. padding: 0!important;
  420. }
  421. #layerTreeContainer .el-tabs__header{
  422. margin-right: 0!important;
  423. width: 40px;
  424. }
  425. #layerTreeContainer .el-tabs--border-card{
  426. background-color: rgba(27, 53, 111, 0);
  427. border: none;
  428. }
  429. #layerTreeContainer .el-tabs--border-card>.el-tabs__header{
  430. background-color: rgba(27, 53, 111, 0);
  431. }
  432. #layerTreeContainer .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{
  433. color: #ffffff;
  434. background-color: rgba(43,102,223,0.8);
  435. }
  436. </style>