Headside.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. <template>
  2. <div id="headside">
  3. <nav class="navbar user-info-navbar" role="navigation">
  4. <!--<i :class="[{'icon-head':true},{'iconleft':left_panel_state}]" @click="left_hide"></i>-->
  5. <div class="watching">
  6. <i class="dot"></i>
  7. <em>检测中</em>
  8. </div>
  9. <div class="center">
  10. 保密会议室无线信号安全监控系统
  11. </div>
  12. <ul class="user-info-menu right-links list-inline list-unstyled" v-if="false">
  13. <li class="dropdown user-profile">
  14. <el-dropdown>
  15. <i class="icon-user"></i>
  16. <span class="el-dropdown-link customer_serve">
  17. {{user.name}}<i class="el-icon-arrow-down el-icon--right"></i>
  18. </span>
  19. <el-dropdown-menu slot="dropdown">
  20. <el-dropdown-item icon="el-icon-plus" @click.native="logoutClick">退出登录</el-dropdown-item>
  21. </el-dropdown-menu>
  22. </el-dropdown>
  23. </li>
  24. </ul>
  25. </nav>
  26. </div>
  27. </template>
  28. <script>
  29. import axios from 'axios';
  30. let qs = require('qs');
  31. export default {
  32. data() {
  33. return {
  34. user: {
  35. name: localStorage.userName,
  36. },
  37. newnum: '',
  38. newnumState: false,
  39. left_panel_state: false
  40. }
  41. },
  42. mounted() {
  43. this.readNewNum();
  44. // 定时轮询news
  45. //设置10s刷新一次数据
  46. // if (this.timer) {
  47. // clearInterval(this.timer);
  48. // }else{
  49. // this.timer = setInterval(() => {
  50. // this.readNewNum();
  51. // },10000)
  52. // }
  53. },
  54. methods: {
  55. // 隐藏左侧和显示
  56. left_hide: function () {
  57. let that = this;
  58. that.left_panel_state = !that.left_panel_state;
  59. console.log(223);
  60. this.$emit('lefthide');
  61. // if (!that.left_panel_state) {
  62. // this.$emit('left_hide_func');
  63. // } else {
  64. // this.$emit('right_hide_func');
  65. // }
  66. },
  67. // 打开消息提示
  68. checkNews: function () {
  69. let that = this;
  70. const h = this.$createElement;
  71. this.$notify({
  72. title: '标题名称',
  73. position: 'top-left',
  74. message: h('i', {style: 'color: teal'}, '这是提示文案这是提示文案这是提示文案这是提示文案这是提示文案这是提示文案这是提示文案这是提示文案'),
  75. onClose: function () {
  76. //关闭时调用已读接口
  77. },
  78. onClick: function () {
  79. //关闭时调用已读接口
  80. this.close();//关闭notify
  81. let thisdata = {name: 'message', link: '/#/message'};
  82. that.$emit('navOpen', thisdata);//跳转新的message
  83. }
  84. });
  85. },
  86. // 读取消息提示数量
  87. readNewNum: function () {
  88. this.newnum = 0;
  89. this.newnumState = false;
  90. // ajax todo
  91. },
  92. // 退出登录
  93. logoutClick: function () {
  94. let that = this;
  95. that.$confirm('此操作将退出当前账号, 是否继续?', '提示', {
  96. confirmButtonText: '确定',
  97. cancelButtonText: '取消',
  98. type: 'warning'
  99. }).then(() => {
  100. let url = headapi + '?ctl=ajax&mod=index&act=logout';
  101. let param = {};
  102. let postdata = qs.stringify(param);
  103. axios.post(url, postdata).then(function (data) {
  104. that.$router.push({path: '/login', query: {status: 1}});
  105. }, function (response) {
  106. console.info(response);
  107. })
  108. }).catch(() => {
  109. });
  110. },
  111. },
  112. components: {}
  113. }
  114. </script>
  115. <!-- Add "scoped" attribute to limit CSS to this component only -->
  116. <style scoped>
  117. ul, li {
  118. list-style: none;
  119. padding: 0;
  120. margin: 0;
  121. }
  122. #headside {
  123. width: 100%;
  124. height: 48px;
  125. overflow: hidden;
  126. float: right;
  127. z-index: 1111;
  128. /*border-bottom: 1px solid #efefef;*/
  129. }
  130. .user-info-navbar {
  131. width: 100%;
  132. overflow: hidden;
  133. display: block;
  134. margin: 0 auto;
  135. background-color: none;
  136. min-height: 0;
  137. height: 41px;
  138. border: 0;
  139. padding: 0;
  140. margin-bottom: 0;
  141. }
  142. .user-info-navbar .user-info-menu > li > a {
  143. position: relative;
  144. display: block;
  145. padding: 12px 20px;
  146. color: #979898;
  147. border-bottom: 1px solid #ffffff;
  148. top: 1px;
  149. z-index: 5;
  150. }
  151. .user-info-navbar .user-info-menu > li > a .badge {
  152. font-size: 9px;
  153. position: absolute;
  154. top: 3px;
  155. right: 10px;
  156. padding: 4px;
  157. min-width: 18px;
  158. line-height: 1;
  159. }
  160. .user-info-navbar .user-info-menu > li > form {
  161. position: relative;
  162. display: block;
  163. padding: 12px 20px;
  164. padding-bottom: 5px;
  165. margin: 0;
  166. border-bottom: 1px solid #ffffff;
  167. }
  168. .user-info-navbar .user-info-menu > li.search-form .search-field,
  169. .navbar.horizontal-menu .navbar-inner > .nav > li.search-form .search-field {
  170. position: absolute;
  171. top: 25%;
  172. right: 15px;
  173. margin-top: 0px;
  174. line-height: 1;
  175. height: 25px;
  176. border: 1px solid #dddddd;
  177. border: 0;
  178. padding: 0 10px;
  179. width: 170px;
  180. padding-right: 30px;
  181. font-size: 12px;
  182. z-index: 1;
  183. visibility: hidden;
  184. background: #f3f3f3;
  185. zoom: 1;
  186. filter: alpha(opacity=0);
  187. -webkit-opacity: 0;
  188. -moz-opacity: 0;
  189. opacity: 0;
  190. }
  191. .frm-body {
  192. background-color: #eeeeee;
  193. }
  194. .sidebar-menu {
  195. display: table-cell;
  196. position: relative;
  197. width: 230px;
  198. background: #2c2e2f;
  199. z-index: 1;
  200. }
  201. footer.main-footer {
  202. padding: 8px 20px 0px 20px;
  203. border-top: 1px solid #dddddd;
  204. font-size: 12px;
  205. margin-left: -30px;
  206. margin-right: -30px;
  207. margin-top: 10px;
  208. margin-bottom: -10px;
  209. background-color: #eeeeee;
  210. }
  211. .panel {
  212. position: relative;
  213. background: #ffffff;
  214. padding: 10px 10px;
  215. border: 0;
  216. margin-top: 5px;
  217. margin-bottom: 0px;
  218. -webkit-box-shadow: none;
  219. -moz-box-shadow: none;
  220. box-shadow: none;
  221. }
  222. .panel .panel-body {
  223. padding: 0;
  224. padding-top: 20px;
  225. color: #000000;
  226. }
  227. .panel-title {
  228. margin-top: 5px;
  229. margin-bottom: 5px;
  230. }
  231. .panel .panel-heading {
  232. position: relative;
  233. padding: 0;
  234. margin: 0;
  235. background: none;
  236. font-size: 17px;
  237. padding-bottom: 0px;
  238. border-bottom: 2px solid #f5f5f5;
  239. }
  240. .panel.panel-color .panel-heading {
  241. margin-top: -10px;
  242. margin-left: -10px;
  243. margin-right: -10px;
  244. padding: 10px 10px;
  245. border-bottom: 0;
  246. }
  247. .panel.panel-color.collapsed > .panel-heading {
  248. margin-bottom: -10px;
  249. }
  250. .xe-widget.xe-progress-counter.xe-progress-counter-huise {
  251. background-color: #d7d7d7
  252. }
  253. .xe-widget.xe-progress-counter.xe-progress-counter-huise .xe-background {
  254. color: #fff
  255. }
  256. .xe-widget.xe-progress-counter.xe-progress-counter-huise .xe-upper {
  257. background-color: transparent
  258. }
  259. .table > thead > tr > td, .table > tbody > tr > td, .table > tfood > tr > td, .table > thead > tr > th, .table > tbody > tr > th, .table > tfood > tr > th {
  260. padding: 5px 5px 5px 5px;
  261. }
  262. .input-sm {
  263. height: 26px;
  264. padding: 5px 10px;
  265. font-size: 12px;
  266. line-height: 1.5;
  267. border-radius: 0;
  268. }
  269. .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
  270. position: relative;
  271. min-height: 1px;
  272. padding-left: 5px;
  273. padding-right: 5px;
  274. }
  275. .form-horizontal .form-group {
  276. margin-left: 0px;
  277. margin-right: 0px;
  278. }
  279. .btn-sm, .btn-group-sm > .btn {
  280. font-size: 14px;
  281. line-height: 1.5;
  282. padding: 2px 6px;
  283. border-radius: 0px;
  284. }
  285. .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate {
  286. padding-top: 10px;
  287. padding-left: 5px;
  288. padding-right: 5px;
  289. }
  290. .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter {
  291. padding-bottom: 5px;
  292. padding-left: 5px;
  293. padding-right: 5px;
  294. }
  295. .comm_style {
  296. max-width: 200px;
  297. overflow: hidden;
  298. text-overflow: ellipsis;
  299. white-space: nowrap;
  300. margin: 0 auto;
  301. }
  302. .img_style {
  303. width: 40px;
  304. /*height: 40px;*/
  305. overflow: hidden;
  306. display: block;
  307. margin: 0 auto;
  308. }
  309. #modal_img {
  310. width: 300px;
  311. height: 300px;
  312. overflow: hidden;
  313. display: block;
  314. margin: 0 auto;
  315. }
  316. .modal-content {
  317. margin: 0 auto;
  318. /*width: 50%;*/
  319. /*20170623 mefisto*/
  320. }
  321. .customer_serve {
  322. float: right;
  323. margin-right: 20px;
  324. font-size: 14px;
  325. color: #6DC1FF;
  326. line-height: 45px;
  327. text-align: right;
  328. }
  329. #about_us {
  330. color: #03B1FF;
  331. cursor: pointer;
  332. }
  333. .dropdown-menu-list a img {
  334. width: 30px;
  335. height: 30px;
  336. }
  337. .user-info-navbar .user-info-menu > li .dropdown-menu .dropdown-menu-list li a .line.desc, .navbar.horizontal-menu .navbar-inner > .nav > li .dropdown-menu .dropdown-menu-list li a .line.desc {
  338. margin-right: 0;
  339. }
  340. .user-info-navbar .user-info-menu > li .dropdown-menu .dropdown-menu-list li, .navbar.horizontal-menu .navbar-inner > .nav > li .dropdown-menu .dropdown-menu-list li {
  341. min-height: 50px;
  342. }
  343. .empty_li_noti {
  344. text-align: center;
  345. line-height: 50px !important;
  346. }
  347. .disagree_invite {
  348. background-color: #FF0000;
  349. }
  350. .agree_invite {
  351. background-color: #25CC42;
  352. }
  353. .disagree_invite:hover {
  354. background-color: #d20000;
  355. }
  356. .agree_invite:hover {
  357. background-color: #25CC42;
  358. }
  359. .invite_msg {
  360. width: 95%;
  361. overflow: hidden;
  362. display: block;
  363. margin: 0 auto;
  364. margin-top: 34px;
  365. margin-top: 10px;
  366. }
  367. .invite_time {
  368. width: 95%;
  369. overflow: hidden;
  370. display: block;
  371. margin: 0 auto;
  372. margin-top: 10px;
  373. }
  374. .left_hide_icon {
  375. margin-top: 7px;
  376. border: 1px solid #ccc;
  377. padding: 5px;
  378. float: left;
  379. margin-left: 15px;
  380. cursor: pointer;
  381. }
  382. .left_hide_icon:hover {
  383. background: #ccc;
  384. color: #fff;
  385. }
  386. .left_show_icon {
  387. margin-top: 7px;
  388. border: 1px solid #ccc;
  389. padding: 5px;
  390. float: left;
  391. margin-left: 15px;
  392. cursor: pointer;
  393. }
  394. .left_show_icon:hover {
  395. background: #ccc;
  396. color: #fff;
  397. }
  398. .item {
  399. float: left;
  400. margin-left: 10px;
  401. margin-top: 10px;
  402. }
  403. .el-button--small, .el-button--small.is-round {
  404. padding: 4px 8px;
  405. }
  406. .user-profile {
  407. float: right;
  408. cursor: pointer;
  409. }
  410. .el-dropdown-menu__item {
  411. padding: 5px;
  412. }
  413. .icon-head {
  414. width: 18px;
  415. height: 18px;
  416. float: left;
  417. margin-left: 17px;
  418. margin-top: 15px;
  419. background: url("../assets/img/icon/header.png") top center no-repeat;
  420. background-size: 100%;
  421. }
  422. .watching {
  423. float: left;
  424. margin-left: 20px;
  425. }
  426. .watching .dot {
  427. width: 12px;
  428. height: 12px;
  429. background: #6DC1FF;
  430. border-radius: 250px;
  431. float: left;
  432. margin-top: 16px;
  433. transform: scale(0.5);
  434. animation: bulge 2s infinite ease-in-out;
  435. animation-delay: 0s;
  436. }
  437. .watching em {
  438. line-height: 45px;
  439. font-size: 14px;
  440. color: #6DC1FF;
  441. font-style: normal;
  442. padding-left: 10px;
  443. }
  444. .watching .dot::after {
  445. z-index: -1;
  446. transform: scale(1);
  447. animation: blow 2s infinite ease-in-out;
  448. }
  449. @keyframes bulge {
  450. 50% {
  451. transform: scale(1);
  452. }
  453. }
  454. @keyframes blow {
  455. 25% {
  456. opacity: 0.5;
  457. }
  458. 50% {
  459. opacity: 0.5;
  460. }
  461. 90% {
  462. opacity: 0;
  463. }
  464. 100% {
  465. transform: scale(2);
  466. opacity: 0;
  467. }
  468. }
  469. .center {
  470. position: absolute;
  471. top: 0;
  472. left: 0;
  473. right: 0;
  474. text-align: center;
  475. margin-top: 20px;
  476. padding-bottom: 20px;
  477. font-size: 26px;
  478. color: #FFFFFF;
  479. background: url("../assets/img/headbotter.png")bottom center no-repeat;
  480. }
  481. .icon-user {
  482. width: 28px;
  483. height: 28px;
  484. float: left;
  485. margin-top: 10px;
  486. margin-right: 10px;
  487. background: url("../assets/img/icon/user.png") top center no-repeat;
  488. background-size: 100%;
  489. }
  490. </style>