b98ba23b912391a1f4cfc479ef47a6cb66207cae.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <template>
  2. <div id="leftLayerMenuContainer" :style="{'height':testHeight+'px','top':testTop+'px'}" class="leftLayerMenuClass">
  3. <div class="left_bar">
  4. <el-tabs type="border-card" :tab-position="tabPosition" @tab-click='tab($event)'>
  5. <el-tab-pane v-for='(it, index) in tabletit' :key='index'>
  6. <span slot="label" class="e-spp" style="color: rgb(255,255,255);">
  7. <i class="el-icon-location"></i>{{it}}
  8. </span>
  9. </el-tab-pane>
  10. </el-tabs>
  11. </div>
  12. <div class="show1" v-for='(it1, index) in menuContent' :key='index' v-show='index == num'
  13. v-if='showMenuContent' :style="{'height':testHeight+'px','top':testTop+'px'}">
  14. <div class="list-tab" v-for='(it2, index2) in it1.pageone' :key='index2'>
  15. <h3 class="river-jc">
  16. <span>
  17. <i class="el-icon-tickets"></i>
  18. <span>{{it2.title}}</span>
  19. </span>
  20. </h3>
  21. <ul class="river-ul">
  22. <li style="cursor:pointer;" :class="{'layerShown':it3.checked}" @click="leftContentClick(it3)"
  23. v-for='(it3, index3) in it2.fil' :key='index3'>
  24. <i :class="it3.icon" v-if="it3.icon"></i>
  25. <img :src="it3.img" v-if="it3.img" alt="" style="width: 30px;">
  26. <span>{{it3.name}}
  27. <span :class="it3.label" @click="childdialog(index3)"></span>
  28. </span>
  29. </li>
  30. </ul>
  31. </div>
  32. </div>
  33. </div>
  34. </template>
  35. <script>
  36. import {mapConfig} from '../config/mapConfig.js'
  37. import {tablecont_M,tablecont,tabNames} from '../config/leftLayerMenuConfig.js'//除矢量底图以外
  38. import { hasPriv } from '../../../utils/gw_hasPriv.js'
  39. export default {
  40. props:[],
  41. components:{
  42. },
  43. data(){
  44. return{
  45. tabPosition:"left",
  46. menuContent:[{
  47. pageone:[]
  48. }],//读取菜单内容
  49. tabletit:[],//左侧分类
  50. showMenuContent:false,
  51. num:null,
  52. testHeight:Number(window.innerHeight) * 1 - 91,
  53. testTop:90,
  54. treeData_per:{
  55. title: '人员',
  56. fil: [
  57. { id: 'personGraphicLayer', name: '督查人员', img:'/src/views/zongHeXinXiNew/assets/offline.png', value: 100, checked: true, comeFrom: 'service', url: '' },
  58. ]
  59. },
  60. treeData_sk:{
  61. title: '水库',
  62. fil: [
  63. { id: 'allSkGraphicLayer', name: '水库', img:'/src/views/zongHeXinXiNew/assets/shuiku_All.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  64. { id: 'skGraphicLayer2018', name: '2018年督查', img:'/src/views/zongHeXinXiNew/assets/shuiku_2018.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  65. { id: 'skGraphicLayer2019', name: '2019年督查', img:'/src/views/zongHeXinXiNew/assets/shuiku2.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  66. { id: 'fcskGraphicLayer', name: '复查', img:'/src/views/zongHeXinXiNew/assets/shuiku0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  67. { id: 'jhwskGraphicLayer', name: '督查计划外', img:'/src/views/zongHeXinXiNew/assets/shuiku_jhw.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  68. ]
  69. },
  70. treeData_ry:{
  71. title: '人饮',
  72. fil: [
  73. { id: 'ncysgcGraphicLayer', name: '农村饮水工程', img:'/src/views/zongHeXinXiNew/assets/ncysgc.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  74. { id: 'sydGraphicLayer', name: '水源地', img:'/src/views/zongHeXinXiNew/assets/syd.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  75. { id: 'country150Layer', name: '督查县', img:'/src/views/zongHeXinXiNew/assets/xian.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  76. { id: 'xzcGraphicLayer', name: '督查行政村', img:'/src/views/zongHeXinXiNew/assets/xzc.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  77. ]
  78. },
  79. treeData_sh:{
  80. title: '其他',
  81. fil: [
  82. { id: 'shgcGraphicLayer', name: '水毁工程', img:'/src/views/zongHeXinXiNew/assets/shuihui0.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  83. ]
  84. },
  85. treeData_172:{
  86. title: '重大水利工程',
  87. fil: [
  88. { id: 'graphicLayer172', name: '重大水利工程', img:'/src/views/zongHeXinXiNew/assets/172.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  89. ]
  90. },
  91. treeData_dxs:{
  92. title: '地下水',
  93. fil: [
  94. { id: 'dxsGraphicLayer', name: '地下水', img:'/src/views/zongHeXinXiNew/assets/dxs.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  95. ]
  96. },
  97. treeData_sz:{
  98. title: '水闸',
  99. fil: [
  100. { id: 'szGraphicLayerAll', name: '水闸', img:'/src/views/zongHeXinXiNew/assets/szAll.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  101. { id: 'szGraphicLayer', name: '督查水闸', img:'/src/views/zongHeXinXiNew/assets/sz.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  102. ]
  103. },
  104. treeData_qsk:{
  105. title: '取水口',
  106. fil: [
  107. { id: 'graphicLayerQsk', name: '取水口', img:'/src/views/zongHeXinXiNew/assets/qsk.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  108. ]
  109. },
  110. treeData_dbssyd:{
  111. title: '地表水水源地',
  112. fil: [
  113. { id: 'graphicLayerDbssyd', name: '地表水水源地', img:'/src/views/zongHeXinXiNew/assets/syd.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  114. ]
  115. },
  116. treeData_swenz:{
  117. title: '水文站',
  118. fil: [
  119. { id: 'graphicLayerSwz', name: '水文站', img:'/src/views/zongHeXinXiNew/assets/swenz.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  120. ]
  121. },
  122. treeData_fupinxian:{
  123. title: '扶贫县',
  124. fil: [
  125. { id: 'mapServer_fpx', name: '扶贫县', img:'/src/views/zongHeXinXiNew/assets/swenz.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  126. { id: 'mapServer_zdx', name: '重点扶贫县', img:'/src/views/zongHeXinXiNew/assets/swenz.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  127. { id: 'mapServer_bjx', name: '边境扶贫县', img:'/src/views/zongHeXinXiNew/assets/swenz.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  128. { id: 'mapServer_tcx', name: '天窗扶贫县', img:'/src/views/zongHeXinXiNew/assets/swenz.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  129. { id: 'mapServer_ddfp', name: '定点扶贫县', img:'/src/views/zongHeXinXiNew/assets/swenz.png', value: 100, checked: false, comeFrom: 'service', url: '' },
  130. ]
  131. },
  132. }
  133. },
  134. watch:{
  135. },
  136. mounted:function(){
  137. if(mapConfig.wkid == '102100' || '3857'){
  138. this.menuContent.push(tablecont_M[0])
  139. }else{
  140. this.menuContent.push(tablecont[0])
  141. }
  142. this.tabletit = tabNames;
  143. this.authentication();//身份验证
  144. },
  145. methods:{
  146. authentication(){
  147. this.menuContent[0].pageone = [];
  148. // if(hasPriv('per_layer')){//督查人员
  149. this.menuContent[0].pageone.push(this.treeData_per);
  150. // }
  151. // if(hasPriv('rsvr_layer')){//小水库
  152. this.menuContent[0].pageone.push(this.treeData_sk);
  153. // }
  154. // if(hasPriv('vill_layer')){//人饮
  155. this.menuContent[0].pageone.push(this.treeData_ry);
  156. // }
  157. // if(hasPriv('rect_layer')){//水毁
  158. this.menuContent[0].pageone.push(this.treeData_sh);
  159. // }
  160. // if(hasPriv('gc_layer')){//172
  161. this.menuContent[0].pageone.push(this.treeData_172);
  162. // }
  163. // if(hasPriv('grw_layer')){//地下水监测站
  164. this.menuContent[0].pageone.push(this.treeData_dxs);
  165. // }
  166. // if(hasPriv('sz_layer')){//水闸
  167. this.menuContent[0].pageone.push(this.treeData_sz);
  168. // }
  169. // if(hasPriv('wint_layer')){//取水口
  170. this.menuContent[0].pageone.push(this.treeData_qsk);
  171. // }
  172. // if(hasPriv('dbssyd_layer')){//地表水水源地
  173. this.menuContent[0].pageone.push(this.treeData_dbssyd);
  174. // }
  175. // if(hasPriv('swenz_layer')){//水文站
  176. this.menuContent[0].pageone.push(this.treeData_swenz);
  177. // }
  178. // if(hasPriv('fpx_layer')){//扶贫县
  179. // this.menuContent[0].pageone.push(this.treeData_fupinxian);
  180. // }
  181. },
  182. tab:function(event) {
  183. if(this.num == event.index){
  184. this.showMenuContent = !this.showMenuContent;
  185. }else{
  186. this.showMenuContent = true;
  187. this.num = event.index;
  188. }
  189. },
  190. childdialog(index3){
  191. console.log(index3)
  192. this.tex_p = !this.tex_p
  193. },
  194. leftContentClick(it3){
  195. var str = it3.id;
  196. if(str.substring(0,7) != 'oneMap_'){
  197. it3.checked = !it3.checked;
  198. }
  199. this.$emit('leftLayerMenuClick',it3);
  200. },
  201. }
  202. }
  203. </script>
  204. <style>
  205. @import url("/src/assets/watericon/iconfont.css");
  206. .leftLayerMenuClass{
  207. /* height: 90%; */
  208. position: fixed;
  209. z-index: 1;
  210. width: 40px;
  211. /* top: 10%; */
  212. }
  213. .left_bar{
  214. width: 40px;
  215. text-align: center;
  216. height: 100%;
  217. position:fixed;
  218. left: 0;
  219. z-index: 100!important;
  220. background-color: rgba(27, 53, 111, 0.6);
  221. }
  222. .show1{
  223. width: 300px;
  224. /* height: 88%; */
  225. border: 1px solid #ccc;
  226. border: 1px solid rgb(204, 204, 204);
  227. /* background-color: #0000cc; */
  228. background-color: rgba(255, 255, 255, 0.8);
  229. border-left: none;
  230. position: fixed;
  231. overflow-y: scroll;
  232. left: 45px;
  233. /* top: 11%; */
  234. z-index: 1;
  235. box-shadow: 7px 11px 15px 0px rgba(0, 0, 0, 0.2)
  236. }
  237. .river-jc{
  238. margin: 0px;
  239. font-size: 14px;
  240. display: flex;
  241. justify-content: space-between;
  242. align-items: center;
  243. padding-left: 15px;
  244. padding-top: 15px;
  245. /* color: #ff5200; */
  246. color: rgb(255, 82, 0)
  247. }
  248. .river-jc .tit-btn{
  249. margin-right: 15px;
  250. font-size: 12px;
  251. width: 40px;
  252. height: 20px;
  253. }
  254. .river-jc i{
  255. font-size: 16px;
  256. padding-right: 5px;
  257. }
  258. .river-ul{
  259. padding: 0px;
  260. margin: 0px;
  261. width: 100%;
  262. list-style: none;
  263. display: flex;
  264. flex-wrap: wrap;
  265. }
  266. .river-ul li{
  267. width: 33%;
  268. margin-top: 10px;
  269. font-size: 14px;
  270. padding: 5px 0;
  271. /* color: #383838; */
  272. color: rgb(56, 56, 56);
  273. display: flex;
  274. flex-direction: column;
  275. justify-content: center;
  276. align-items: center;
  277. }
  278. .river-ul li i{
  279. padding-bottom: 5px;
  280. }
  281. .river-ul li:hover{
  282. /* background: #cccccc; */
  283. background: rgb(204, 204, 204)
  284. }
  285. .river-ul li:checked{
  286. /* background: #ff5200; */
  287. background: rgb(255, 82, 0)
  288. }
  289. .layerShown{
  290. /* background-color:#530133; */
  291. background-color: rgba(255, 82, 0, 0.2)
  292. }
  293. .e-spp:hover{
  294. /* color: red; */
  295. color:rgb(255, 0, 0)
  296. }
  297. #leftLayerMenuContainer .el-tabs{
  298. height: 100%!important;
  299. }
  300. #leftLayerMenuContainer .el-tabs__nav{
  301. height: 100%!important;
  302. }
  303. #leftLayerMenuContainer .el-tabs__nav{
  304. display: flex!important;
  305. flex-direction: column!important;
  306. padding-top: 20px!important;
  307. }
  308. #leftLayerMenuContainer .el-tabs__item{
  309. width: 100%!important;
  310. height: 120px!important;
  311. font-size: 14px!important;
  312. writing-mode: tb-rl!important;
  313. padding: 0!important;
  314. line-height: 50px;
  315. display: flex!important;
  316. justify-content: center!important;
  317. }
  318. #leftLayerMenuContainer .el-tabs__nav-prev{
  319. display: none;
  320. }
  321. #leftLayerMenuContainer .el-tabs__content{
  322. width: 0px;
  323. padding: 0!important;
  324. }
  325. #leftLayerMenuContainer .el-tabs__header{
  326. margin-right: 0!important;
  327. width: 40px;
  328. }
  329. #leftLayerMenuContainer .el-tabs--border-card{
  330. background-color: rgba(27, 53, 111, 0);
  331. border: none;
  332. }
  333. #leftLayerMenuContainer .el-tabs--border-card>.el-tabs__header{
  334. background-color: rgba(27, 53, 111, 0);
  335. }
  336. #leftLayerMenuContainer .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{
  337. color: #ffffff;
  338. background-color: rgba(43,102,223,0.8);
  339. }
  340. </style>