Index.vue 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009
  1. <template>
  2. <el-container style="height: 100%">
  3. <el-header class="header" v-show="flag">
  4. <div v-if="userinfo.logo">
  5. <img
  6. :src="userinfo.logo"
  7. alt=""
  8. style="position: absolute; left: 20px; top: 20px; width: 250px"
  9. />
  10. </div>
  11. <div class="navbarBtn">
  12. <!-- 用户 -->
  13. <div class="userinfo">欢迎您,{{ username }}</div>
  14. <!-- 站点 -->
  15. <div class="site" v-if="userinfo.site">
  16. <i class="iconfont icon-jidi"></i>
  17. <span>{{ userinfo.site }}</span>
  18. </div>
  19. <!-- 标题 -->
  20. <div class="caption">
  21. <div v-if="userinfo.user_header" class="tit">
  22. {{ userinfo.user_header }}
  23. </div>
  24. <div v-else class="tit">农业植保监测系统 智慧农业信息化</div>
  25. <div>Agricultural Plant Protection Monitoring System</div>
  26. </div>
  27. </div>
  28. <span class="header_btn" @click="hCheckFun">[隐藏]</span>
  29. </el-header>
  30. <el-header class="header2" v-show="!flag">
  31. <h3 v-if="userinfo.user_header">{{ userinfo.user_header }}</h3>
  32. <h3 v-else>农业植保监测系统</h3>
  33. <div class="site" v-if="userinfo.site && flag">
  34. <i class="iconfont icon-jidi"></i>
  35. <span>{{ userinfo.site }}</span>
  36. </div>
  37. <span class="header_btn" @click="hCheckFun">[展开]</span>
  38. <!-- <ul class="header_ul" style="margin: -55px 85px 0 0">
  39. <li
  40. style="padding: 15px 20px 15px 20px; color: #fff; cursor: pointer"
  41. @click="headerTitle(index)"
  42. :class="{ indexActive: tltIndex == index }"
  43. v-for="(item, index) in menuList1"
  44. :key="index"
  45. >
  46. {{ item.purview_name }}
  47. </li>
  48. </ul> -->
  49. </el-header>
  50. <!-- <div style="background: #166756">
  51. <ul class="header_ul">
  52. <li
  53. style="padding: 15px 20px 15px 20px; color: #fff; cursor: pointer"
  54. @click="headerTitle(index)"
  55. :class="{ indexActive: tltIndex == index }"
  56. v-for="(item, index) in menuList1"
  57. :key="index"
  58. >
  59. {{ item.purview_name }}
  60. </li>
  61. </ul>
  62. </div> -->
  63. <el-container style="overflow: auto">
  64. <!-- 菜单 -->
  65. <el-aside width="200px">
  66. <!-- 站点名称标题 -->
  67. <!-- <div style="display: flex; justify-content: space-between">
  68. <div style="display: flex; margin: 0 0 0 5px">
  69. <img
  70. style="width: 15px; height: 15px; margin: 3px 3px 0 0"
  71. src="../assets/images/zhankai.png"
  72. alt=""
  73. />
  74. <div style="font-weight: 550">站点管理</div>
  75. </div>
  76. <img
  77. style="
  78. width: 16px;
  79. height: 16px;
  80. margin: 3px 0 0 0;
  81. cursor: pointer;
  82. "
  83. src="../assets/images/tianjia.png"
  84. alt=""
  85. @click="addStation()"
  86. v-if="userinfo.staff == 1"
  87. />
  88. </div> -->
  89. <!-- 选中站点标题 -->
  90. <div
  91. style="
  92. background: #0d2c2e;
  93. line-height: 46px;
  94. height: 46px;
  95. color: #fff;
  96. "
  97. >
  98. <img
  99. style="
  100. width: 12px;
  101. height: 16px;
  102. margin: -3.5px 0 0 13.5%;
  103. vertical-align: middle;
  104. cursor: pointer;
  105. "
  106. title="点击获取全部站点名称列表"
  107. src="../assets/images/dingwei.png"
  108. alt=""
  109. @click="allSiteListData()"
  110. />
  111. <span style="font-size: 13px; margin: 0 0 0 11.5px">{{
  112. siteNameTitle
  113. }}</span>
  114. </div>
  115. <el-menu
  116. :default-active="currRouter"
  117. :collapse-transition="false"
  118. class="el-menu-vertical-demo"
  119. unique-opened
  120. :router="isRouter"
  121. text-color="#333"
  122. active-text-color="#fff"
  123. @select="handleOpen"
  124. >
  125. <el-menu-item
  126. :index="'/index/' + item.menu"
  127. v-for="item in menuList1"
  128. :key="item.pur_id"
  129. >
  130. <i :class="iconObj[item.pur_id]"></i>
  131. <span slot="title">{{ item.purview_name }}</span>
  132. </el-menu-item>
  133. </el-menu>
  134. <div v-if="isTree" style="margin: 13px 0 0 0; width: 95%">
  135. <ul>
  136. <li style="display: flex; justify-content: space-between">
  137. <div style="display: flex; margin: 0 0 0 5px">
  138. <img
  139. style="width: 13px; height: 13px; margin: 3px 3px 0 0"
  140. src="../assets/images/zhankai.png"
  141. alt=""
  142. />
  143. <div
  144. style="font-weight: 550; margin: 0 0 0 4px; font-size: 14px"
  145. >
  146. 站点管理
  147. </div>
  148. </div>
  149. <img
  150. style="
  151. width: 16px;
  152. height: 16px;
  153. margin: 3px 0 0 0;
  154. cursor: pointer;
  155. "
  156. src="../assets/images/tianjia.png"
  157. alt=""
  158. @click="addStation()"
  159. v-if="userinfo.staff == 1"
  160. />
  161. </li>
  162. <!-- @node-contextmenu="rightClick" 右键增加事件 -->
  163. <li id="tree">
  164. <el-tree
  165. ref="treeRef"
  166. :data="data"
  167. :props="defaultProps"
  168. node-key="id"
  169. :current-node-key="firstItem"
  170. :default-expand-all="true"
  171. @node-click="handleNodeClick"
  172. @node-contextmenu="rightClick"
  173. highlight-current
  174. ></el-tree>
  175. </li>
  176. </ul>
  177. </div>
  178. </el-aside>
  179. <!-- 右键信息 -->
  180. <div v-show="menuVisible">
  181. <ul id="menuList" class="menu">
  182. <li class="menu_item" @click="addrInformation()">增加</li>
  183. </ul>
  184. </div>
  185. <el-container>
  186. <el-main>
  187. <!-- <router-view ref="mychild" :flag="flag" :siteID="siteID"></router-view> -->
  188. <router-view ref="mychild" :flag="dataObj"></router-view>
  189. </el-main>
  190. </el-container>
  191. </el-container>
  192. <!-- 添加站点 -->
  193. <el-dialog
  194. :close-on-click-modal="false"
  195. :close-on-press-escape="false"
  196. title="新增站点"
  197. :visible.sync="addSite"
  198. width="25%"
  199. >
  200. <ul>
  201. <li style="margin: 10px 0 0 0">
  202. <span>站点名称:</span>
  203. <el-input style="width: 49%" v-model="siteName"></el-input>
  204. </li>
  205. <li style="margin: 10px 0 0 0">
  206. <span>站点地址:</span>
  207. <el-cascader
  208. clearable
  209. v-model="siteAddr"
  210. :options="options"
  211. ></el-cascader>
  212. </li>
  213. </ul>
  214. <span slot="footer" class="dialog-footer">
  215. <el-button @click="addSite = false">取 消</el-button>
  216. <el-button type="primary" @click="addrData()">确 定</el-button>
  217. </span>
  218. </el-dialog>
  219. </el-container>
  220. </template>
  221. <script>
  222. import city from '../components/citydata.js'
  223. export default {
  224. data() {
  225. var validateNewPass = (rule, value, callback) => {
  226. if (value === '') {
  227. callback(new Error('请输入新密码'))
  228. } else {
  229. if (this.resetPassForm.checkPass !== '') {
  230. this.$refs.resetPassFormRef.validateField('checkNewPass')
  231. }
  232. callback()
  233. }
  234. }
  235. var validateCheckPass = (rule, value, callback) => {
  236. if (value === '') {
  237. callback(new Error('请再次输入密码'))
  238. } else if (value !== this.resetPassForm.newPass) {
  239. callback(new Error('两次输入密码不一致!'))
  240. } else {
  241. callback()
  242. }
  243. }
  244. return {
  245. isTree:true,
  246. firstItem:"",
  247. firstShow:true,
  248. isRouter: true,
  249. // 被激活导航地址
  250. // activePath:this.$store.state.activePath,
  251. changeHomedialogVisible: false,
  252. iconObj: {
  253. 1: 'iconfont icon-chouchongbug',
  254. 2: 'iconfont icon-weimingming-34',
  255. 3: 'iconfont icon-cebaoguanli',
  256. 4: 'iconfont icon-fangzhi',
  257. 5: 'iconfont icon-shebei',
  258. 6: 'iconfont icon-xitong'
  259. },
  260. userinfo: '',
  261. currRouter: '/index/bzy',
  262. menuList1: [
  263. {
  264. purview_name: '智能性诱测报',
  265. menu: 'xycb',
  266. parent_perm_id: 1,
  267. pur_id: 1
  268. },
  269. {
  270. purview_name: '植物孢子捕捉仪',
  271. menu: 'bzy',
  272. parent_perm_id: 2,
  273. pur_id: 2
  274. },
  275. {
  276. purview_name: '物联网虫情测报',
  277. menu: 'cbd',
  278. parent_perm_id: 3,
  279. pur_id: 3
  280. },
  281. {
  282. purview_name: '高空测报灯',
  283. menu: 'gkcbd',
  284. parent_perm_id: 9,
  285. pur_id: 3
  286. },
  287. {
  288. purview_name: '物联网杀虫灯',
  289. menu: 'scd',
  290. parent_perm_id: 4,
  291. pur_id: 4
  292. },
  293. {
  294. purview_name: '设备管理',
  295. menu: 'equipList',
  296. parent_perm_id: 5,
  297. pur_id: 5
  298. },
  299. {
  300. purview_name: '用户列表',
  301. menu: 'userManger',
  302. parent_perm_id: 6,
  303. pur_id: 6
  304. }
  305. ], //首页菜单
  306. // activePath:'',
  307. username: '',
  308. userphoto: '',
  309. userHeadImg: '',
  310. resetPassDialogVisible: false,
  311. resetPassForm: {
  312. oldPass: '',
  313. newPass: '',
  314. checkNewPass: ''
  315. },
  316. resetPassFormRules: {
  317. oldPass: [
  318. { required: true, message: '请输入原始密码', trigger: 'blur' }
  319. ],
  320. newPass: [{ validator: validateNewPass, trigger: 'blur' }],
  321. checkNewPass: [{ validator: validateCheckPass, trigger: 'blur' }]
  322. },
  323. // 循环
  324. tltIndex: 0,
  325. data: [],
  326. defaultProps: {
  327. children: 'children',
  328. label: 'label'
  329. },
  330. siteName: '', // 站点名称
  331. siteAddr: [], // 站点地址
  332. options: [],
  333. addSite: false,
  334. menuVisible: false,
  335. operateObj: {}, // 右键点击时获取当前的数据信息
  336. urladdr: this.$route.path, // 当前界面路由
  337. // 站点名称选中
  338. siteNameTitle: '全 部',
  339. dataObj: {
  340. flag: true,
  341. siteID: null,
  342. allList: [],
  343. siteNameTitle:""
  344. },
  345. flag: true,
  346. req: '', // 站点列表是否显示有无设备的站点
  347. equip_type: '', //选中的设备类型
  348. siteID: null, // 需要传递给子组件的站点id
  349. // 保存点击默认树形站点数据
  350. loadData:{}
  351. }
  352. },
  353. created: function () {
  354. this.getuserinfo()
  355. },
  356. computed: {},
  357. watch: {
  358. addSite(val) {
  359. if (val == false) {
  360. this.siteName = ''
  361. this.siteAddr = []
  362. this.operateObj = {}
  363. }
  364. // else if (val == true) {
  365. // if (this.operateObj.label) {
  366. // console.log(this.operateObj)
  367. // } else {
  368. // }
  369. // }
  370. },
  371. // 监听路由变化,如果变化就将展示选中的站点名称归零为全部
  372. $route(to, from) {
  373. this.siteNameTitle = '全 部'
  374. },
  375. equip_type(val) {
  376. console.log(val + '设备类型')
  377. this.siteListData()
  378. }
  379. },
  380. mounted() {
  381. if (sessionStorage.getItem('tltIndex')) {
  382. this.tltIndex = sessionStorage.getItem('tltIndex')
  383. }
  384. this.currRouter = this.$route.path
  385. this.siteListData()
  386. this.options = city
  387. var url = this.$route.path
  388. url = url.split('/index', 2)
  389. if (url[1] == '/xycb') {
  390. sessionStorage.setItem('tltIndex', 0)
  391. this.tltIndex = 0
  392. }
  393. // 获取当前点击的设备类型
  394. if (url[1] == '/xycb') {
  395. // 性诱测报
  396. this.req = 'hide'
  397. this.equip_type = '4'
  398. } else if (url[1] == '/bzy') {
  399. // 孢子仪
  400. this.req = 'hide'
  401. this.equip_type = '7'
  402. } else if (url[1] == '/cbd') {
  403. // 测报灯
  404. this.req = 'hide'
  405. this.equip_type = '3'
  406. } else if (url[1] == '/scd') {
  407. // 杀虫灯
  408. this.req = 'hide'
  409. this.equip_type = '2'
  410. } else {
  411. this.req = ''
  412. this.equip_type = ''
  413. }
  414. },
  415. methods: {
  416. hCheckFun() {
  417. this.flag = !this.flag
  418. console.log(this.flag)
  419. this.dataObj.flag = this.flag
  420. },
  421. getuserinfo() {
  422. this.$axios({
  423. method: 'post',
  424. url: '/userinfo_'
  425. }).then((res) => {
  426. this.username = res.data.username
  427. this.userphoto = res.data.userphoto
  428. localStorage.setItem('username', res.data.username) // 0管理员 1用户
  429. })
  430. this.$axios({
  431. method: 'get',
  432. url: '/user_detail'
  433. }).then((res) => {
  434. this.userinfo = res.data
  435. localStorage.setItem('have_type', this.userinfo.have_type) // 0管理员 1用户 2项目
  436. localStorage.setItem('staff', this.userinfo.staff) // 1是admin
  437. localStorage.setItem('site_id', this.userinfo.site_id) // 站点id
  438. localStorage.setItem('siteName', this.userinfo.site) // 站点name
  439. })
  440. },
  441. headerTitle(i) {
  442. this.tltIndex = i
  443. sessionStorage.setItem('tltIndex', i)
  444. console.log(i)
  445. this.$router.push('/index/' + this.menuList1[i].menu)
  446. },
  447. // 树形插件
  448. handleNodeClick(data) {
  449. console.log(this.$route.path);
  450. console.log("shushushususssssssssssssssssss",data);
  451. this.loadData = data;
  452. if (this.$route.path !== '/index/scdList') {
  453. this.dataObj.siteID = data.id
  454. this.dataObj.allList = this.data
  455. this.dataObj.siteNameTitle = data.label
  456. // this.siteNameTitle = data.label
  457. this.$refs.mychild.getEquipList(data, 1)
  458. } else {
  459. this.$router.push('/index/scd')
  460. this.dataObj.siteID = data.id
  461. this.dataObj.allList = this.data
  462. this.dataObj.siteNameTitle = data.label
  463. // this.siteNameTitle = data.label
  464. var that = this
  465. var time = setTimeout(function() {
  466. that.$refs.mychild.getEquipList(data, 1)
  467. clearInterval(time)
  468. }, 500);
  469. }
  470. },
  471. // 站点列表
  472. siteListData() {
  473. this.$axios({
  474. method: 'GET',
  475. url: '/site_manage',
  476. params: {
  477. req: this.req,
  478. equip_type: this.equip_type
  479. }
  480. })
  481. .then((res) => {
  482. console.log(res.data)
  483. if (res.data) {
  484. var data = res.data
  485. var arrList = []
  486. var list = data.forEach((item) => {
  487. if (
  488. item.self_site_name !== undefined &&
  489. item.self_site_name == ''
  490. ) {
  491. } else {
  492. if (item.self_site_name == undefined) {
  493. if (item.child) {
  494. var obj = {}
  495. var a = []
  496. obj['label'] = item.site_name
  497. obj['id'] = item.site_id
  498. for (var j in item.child) {
  499. var obja = {}
  500. obja['label'] = item.child[j].site_name
  501. obja['id'] = item.child[j].site_id
  502. if (
  503. item.child[j].child &&
  504. item.child[j].child.length == 0
  505. ) {
  506. obja['children'] = item.child[j].child
  507. } else if (
  508. item.child[j].child &&
  509. item.child[j].child.length !== 0
  510. ) {
  511. for (var k in item.child[j].child) {
  512. var objb = {}
  513. objb['label'] = item.child[j].child[k].site_name
  514. objb['id'] = item.child[j].child[k].site_id
  515. }
  516. obja['children'] = [objb]
  517. }
  518. a.push(obja)
  519. obj['children'] = a
  520. }
  521. }
  522. arrList.push(obj)
  523. } else if (item.self_site_name !== undefined) {
  524. }
  525. }
  526. })
  527. this.data = arrList
  528. console.log(arrList)
  529. // 默认子站点
  530. // this.siteNameTitle = data[0].child[0].site_name;
  531. // this.firstItem = data[0].child[0].site_id;
  532. // 默认选中第一个站点
  533. if(localStorage.getItem('siteName')=='超级管理员'){
  534. this.siteNameTitle = "瑞通集团总站"
  535. }else{
  536. this.siteNameTitle = localStorage.getItem('siteName');
  537. }
  538. this.firstItem = localStorage.getItem('site_id');
  539. let data = {};
  540. this.treeIterator(arrList,res => {
  541. if(res.id==this.firstItem){
  542. data = res
  543. }
  544. })
  545. this.$nextTick(()=>{
  546. this.$refs.treeRef.setCurrentKey(this.firstItem);
  547. // if(this.siteNameTitle=="0"){
  548. // data =""
  549. // }
  550. const childrenItem = data;
  551. if(this.firstShow){
  552. this.handleNodeClick(childrenItem);
  553. this.objData.id = childrenItem.id
  554. this.firstShow = false;
  555. }
  556. })
  557. }
  558. })
  559. .catch((err) => {
  560. console.log(err)
  561. })
  562. },
  563. treeIterator(tree, func) {
  564. let node, curTree = [...tree]
  565. while ((node = curTree.shift())) {
  566. func(node)
  567. node.children && curTree.push(...node.children)
  568. }
  569. },
  570. // 全部-添加新站点
  571. addStation() {
  572. this.addSite = true
  573. this.operateObj = {}
  574. },
  575. addrData() {
  576. if (this.siteName == '') {
  577. this.$message({
  578. message: '未填写站点名称,请填写!',
  579. type: 'warning',
  580. duration: 1500
  581. })
  582. } else if (this.siteAddr.length == 0) {
  583. this.$message({
  584. message: '未填写站点地址,请填写!',
  585. type: 'warning',
  586. duration: 1500
  587. })
  588. } else {
  589. if (this.siteAddr.length < 3) {
  590. var sheng = ''
  591. var shi = this.siteAddr[0]
  592. var xian = this.siteAddr[1]
  593. } else {
  594. var sheng = this.siteAddr[0]
  595. var shi = this.siteAddr[1]
  596. var xian = this.siteAddr[2]
  597. }
  598. var postData = this.qs.stringify({
  599. site_name: this.siteName, // 站点名称
  600. site_pro: sheng, // 省
  601. site_city: shi, // 市
  602. site_area: xian, // 县或区
  603. site_parent_id:
  604. this.operateObj.id !== undefined ? this.operateObj.id : '' // id
  605. })
  606. this.$axios({
  607. method: 'POST',
  608. url: '/site_manage',
  609. data: postData
  610. })
  611. .then((res) => {
  612. console.log(res.data)
  613. if (res.data.status == 0) {
  614. this.$message({
  615. message: res.data.msg,
  616. type: 'success',
  617. duration: 1500
  618. })
  619. this.addSite = false
  620. this.siteListData()
  621. } else {
  622. this.$message({
  623. message: res.data.msg,
  624. type: 'error',
  625. duration: 1500
  626. })
  627. }
  628. })
  629. .catch((err) => {
  630. console.log(err)
  631. this.$message({
  632. message: '添加失败请重试!',
  633. type: 'error',
  634. duration: 1500
  635. })
  636. })
  637. }
  638. },
  639. // 树形插件右键点击事件
  640. rightClick(MouseEvent, object, Node, element) {
  641. console.log(object)
  642. this.menuVisible = false // 先把模态框关死,目的是 第二次或者第n次右键鼠标的时候 它默认的是true
  643. this.menuVisible = true // 显示模态窗口,跳出自定义菜单栏
  644. var menu = document.querySelector('#menuList')
  645. document.addEventListener('click', this.foo) // 给整个document添加监听鼠标事件,点击任何位置执行foo方法
  646. menu.style.display = 'block'
  647. menu.style.left = MouseEvent.clientX - 0 + 'px'
  648. menu.style.top = MouseEvent.clientY - 0 + 'px'
  649. this.operateObj = object
  650. },
  651. foo() {
  652. // 取消鼠标监听事件 菜单栏
  653. this.menuVisible = false
  654. document.removeEventListener('click', this.foo) // 要及时关掉监听,不关掉的是一个坑,不信你试试,虽然前台显示的时候没有啥毛病,加一个alert你就知道了
  655. },
  656. // 指定新增
  657. addrInformation() {
  658. this.addSite = true
  659. },
  660. // 获取到当前点击菜单的数据
  661. handleOpen(key, keyPath) {
  662. this.isTree = true
  663. var data = key
  664. var typeIndex = data.split('/index/')
  665. if (typeIndex[1] == 'xycb') {
  666. // 性诱测报
  667. this.req = 'hide'
  668. this.equip_type = '4'
  669. this.$refs.mychild.getEquipList(this.loadData,1)
  670. } else if (typeIndex[1] == 'bzy') {
  671. // 孢子仪
  672. this.req = 'hide'
  673. this.equip_type = '7'
  674. } else if (typeIndex[1] == 'cbd') {
  675. // 测报灯
  676. this.req = 'hide'
  677. this.equip_type = '3'
  678. } else if (typeIndex[1] == 'scd') {
  679. // 杀虫灯
  680. this.req = 'hide'
  681. this.equip_type = '2'
  682. } else if (typeIndex[1] == 'userManger'){
  683. this.isTree = false
  684. }
  685. else if (typeIndex[1] == 'gkcbd') {
  686. // 高空测报
  687. this.req = 'hide'
  688. this.equip_type = '8'
  689. }
  690. else {
  691. this.req = ''
  692. this.equip_type = ''
  693. }
  694. },
  695. // 点击获取全部站点名称列表
  696. allSiteListData() {
  697. this.req = ''
  698. this.equip_type = ''
  699. this.siteListData()
  700. },
  701. }
  702. }
  703. </script>
  704. <style scoped lang="less">
  705. @keyframes ringing {
  706. 0% {
  707. transform: rotate(-15deg);
  708. }
  709. 2% {
  710. transform: rotate(15deg);
  711. }
  712. 12%,
  713. 4% {
  714. transform: rotate(-18deg);
  715. }
  716. 14%,
  717. 6% {
  718. transform: rotate(18deg);
  719. }
  720. 8% {
  721. transform: rotate(-22deg);
  722. }
  723. 10% {
  724. transform: rotate(22deg);
  725. }
  726. 16% {
  727. transform: rotate(-12deg);
  728. }
  729. 18% {
  730. transform: rotate(12deg);
  731. }
  732. 20% {
  733. transform: rotate(0);
  734. }
  735. }
  736. .header {
  737. height: 189px !important;
  738. background: url(../assets/images/headBj.png) no-repeat center;
  739. background-size: 100% 100%;
  740. position: relative;
  741. .navbarBtn {
  742. color: #fff;
  743. .userinfo {
  744. font-size: 12px;
  745. text-align: right;
  746. margin-top: 10px;
  747. .userheadImg {
  748. width: 35px;
  749. height: 35px;
  750. border-radius: 50%;
  751. vertical-align: middle;
  752. margin-right: 6px;
  753. }
  754. }
  755. .caption {
  756. margin-top: 7px;
  757. text-align: center;
  758. font-size: 16px;
  759. letter-spacing: 0.5px;
  760. .tit {
  761. font-size: 26px;
  762. line-height: 46px;
  763. font-weight: 700;
  764. letter-spacing: 7px;
  765. }
  766. }
  767. }
  768. }
  769. // .el-header {
  770. // height: 189px !important;
  771. // background: url(../assets/images/headBj.png) no-repeat center;
  772. // background-size: 100% 100%;
  773. // position: relative;
  774. // .navbarBtn {
  775. // color: #fff;
  776. // .userinfo {
  777. // font-size: 12px;
  778. // text-align: right;
  779. // margin-top: 10px;
  780. // .userheadImg {
  781. // width: 35px;
  782. // height: 35px;
  783. // border-radius: 50%;
  784. // vertical-align: middle;
  785. // margin-right: 6px;
  786. // }
  787. // }
  788. // .caption {
  789. // margin-top: 7px;
  790. // text-align: center;
  791. // font-size: 16px;
  792. // letter-spacing: 0.5px;
  793. // .tit {
  794. // font-size: 26px;
  795. // line-height: 46px;
  796. // font-weight: 700;
  797. // letter-spacing: 7px;
  798. // }
  799. // }
  800. // }
  801. // }
  802. .site {
  803. position: absolute;
  804. right: 16px;
  805. top: 30px;
  806. z-index: 888;
  807. font-size: 14px;
  808. color: #226a4d;
  809. span {
  810. // color: #333;
  811. color: #fff;
  812. letter-spacing: 1px;
  813. font-size: 13px;
  814. }
  815. }
  816. /deep/.el-dropdown-menu__item {
  817. padding: 0 10px;
  818. }
  819. .el-popper.newsDropdown {
  820. padding: 0;
  821. margin: 0;
  822. h5 {
  823. background: #35a478;
  824. color: #fff;
  825. padding: 15px;
  826. text-transform: uppercase;
  827. font-size: 11px;
  828. margin: 0;
  829. }
  830. /deep/.popper__arrow {
  831. border-bottom-color: #35a478;
  832. &::after {
  833. border-bottom-color: #35a478;
  834. }
  835. }
  836. ul {
  837. border: 1px solid #ddd;
  838. border-top: 0;
  839. padding: 0 10px;
  840. .news {
  841. display: block;
  842. margin: 0;
  843. float: none;
  844. background: none;
  845. padding: 5px 5px;
  846. border-bottom: 1px solid #eee;
  847. .txtContent {
  848. max-width: 250px;
  849. white-space: nowrap;
  850. overflow: hidden;
  851. text-overflow: ellipsis;
  852. display: inline-block;
  853. min-width: 250px;
  854. // display: flex;
  855. a {
  856. color: #333;
  857. font-size: 12px;
  858. padding: 7px 10px;
  859. -moz-border-radius: 2px;
  860. -webkit-border-radius: 2px;
  861. border-radius: 2px;
  862. -moz-transition: all 0.2s ease-out 0s;
  863. -webkit-transition: all 0.2s ease-out 0s;
  864. transition: all 0.2s ease-out 0s;
  865. }
  866. a:hover {
  867. background: none;
  868. color: #428bca;
  869. text-decoration: none;
  870. }
  871. }
  872. }
  873. }
  874. }
  875. .sysAside {
  876. position: absolute;
  877. z-index: 999;
  878. left: 0;
  879. top: 60px;
  880. bottom: 0;
  881. z-index: 999;
  882. transition: all 0.5s;
  883. }
  884. .el-aside {
  885. // background-color: #3D4C5A;
  886. color: #333;
  887. // line-height: 200px;
  888. // .el-menu-item.is-active{background:#17BB89!important}
  889. // .el-submenu__title i{color:#fff}
  890. .el-menu {
  891. border: none;
  892. }
  893. .iconfont {
  894. font-size: 18px;
  895. margin-right: 10px;
  896. }
  897. .icon-chouchongbug {
  898. font-size: 22px;
  899. }
  900. }
  901. .changeHomeItem {
  902. text-align: center;
  903. img {
  904. width: 100%;
  905. height: 110px;
  906. }
  907. .tit {
  908. margin-top: 10px;
  909. }
  910. }
  911. // 新改
  912. .header_ul {
  913. display: flex;
  914. justify-content: flex-end;
  915. margin: 0 85px 0 0;
  916. }
  917. .indexActive {
  918. border-bottom: 2px solid #fff;
  919. }
  920. #tree {
  921. margin: 15px 0 0 18px;
  922. }
  923. // 右键信息
  924. #menuList {
  925. height: 40px;
  926. width: 80px;
  927. position: absolute;
  928. border-radius: 10px;
  929. border: 1px solid #d8d6d6;
  930. background-color: #fff;
  931. z-index: 1;
  932. .menu_item {
  933. line-height: 20px;
  934. text-align: center;
  935. margin-top: 10px;
  936. cursor: pointer;
  937. }
  938. li:hover {
  939. background-color: #14a478;
  940. color: white;
  941. }
  942. li {
  943. font-size: 15px;
  944. }
  945. }
  946. // 头部显示隐藏
  947. .header_btn {
  948. position: absolute;
  949. color: #999;
  950. font-size: 14px;
  951. right: 20px;
  952. bottom: 10px;
  953. cursor: pointer;
  954. }
  955. .header_btn:hover {
  956. color: #fff;
  957. }
  958. .header2 {
  959. // border-bottom: 2px solid #397b0c;
  960. border-bottom: 2px solid #0d2c2e;
  961. position: relative;
  962. // background-color: #397b0c;
  963. background-color: rgb(13, 44, 46);
  964. color: #fff;
  965. }
  966. </style>