031d40d1c8af13fe69736fa9515b9ef5348d6bfa.svn-base 13 KB

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