Navbar.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. <template>
  2. <div class="navbar">
  3. <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
  4. <breadcrumb v-if="showBreadcrumb" class="breadcrumb-container" />
  5. <!-- <NavMenu class="navmenu" /> -->
  6. <div class="right-menu">
  7. <!-- <div class="right-menu-item hover-effect">
  8. <el-tooltip effect="dark" content="家用工程机登录" placement="bottom">
  9. <i
  10. class="el-icon-s-platform"
  11. style="font-size: 24px; line-height: 50px"
  12. @click="toEngine"
  13. ></i>
  14. </el-tooltip>
  15. </div> -->
  16. <div v-if="isHongGe" class="right-menu-item" style="display: flex">
  17. <el-select v-model="changeNum" filterable :disabled="!isHongGe" @change="handleChangeArea">
  18. <el-option v-for="item in areaOpti" :key="item.value" :label="item.label" :value="item.value" />
  19. </el-select>
  20. </div>
  21. <!-- <div class="right-menu-item hover-effect" style="display: flex" @click="handleShow">
  22. <el-badge>
  23. <i class="el-icon-message-solid" style="font-size: 24px; line-height: 50px" />
  24. </el-badge>
  25. <span style="font-size: 16px; margin-left: 15px">物流通知</span>
  26. </div> -->
  27. <div class="right-menu-item hover-effect" style="display: flex" @click="handleNotice">
  28. <el-badge value="示">
  29. <i class="el-icon-message-solid" style="font-size: 24px; line-height: 50px" />
  30. </el-badge>
  31. <span style="font-size: 16px; margin-left: 15px">物流到货通知</span>
  32. </div>
  33. <div class="right-menu-item hover-effect" @click="toEngine">
  34. <i class="el-icon-s-platform" style="font-size: 18px" />
  35. <span style="font-size: 16px; margin-left: 6px">家用工程机登录</span>
  36. </div>
  37. <el-badge :value="noticeCount" :max="10" :hidden="!noticeVisible" class="right-menu-item hover-effect">
  38. <el-tooltip effect="dark" content="系统消息" placement="bottom">
  39. <i class="el-icon-message-solid" style="font-size: 24px; line-height: 50px" @click="goNotice" />
  40. </el-tooltip>
  41. <!-- <el-button icon="el-icon-message-solid" type="text" class="notice-icon" @click="goNotice"></el-button> -->
  42. </el-badge>
  43. <template v-if="device !== 'mobile'">
  44. <screenfull id="screenfull" class="right-menu-item hover-effect" />
  45. </template>
  46. <el-dropdown class="user-container" trigger="click">
  47. <div class="user right-menu-item hover-effect">
  48. <i class="el-icon-user-solid" />
  49. <span>{{ name }}</span>
  50. </div>
  51. <el-dropdown-menu slot="dropdown" class="user-dropdown">
  52. <router-link to="/setting/personal">
  53. <el-dropdown-item>个人信息</el-dropdown-item>
  54. </router-link>
  55. <el-dropdown-item divided @click.native="logout">
  56. <span style="display: block">退出登录</span>
  57. </el-dropdown-item>
  58. </el-dropdown-menu>
  59. </el-dropdown>
  60. </div>
  61. <el-dialog title="绑定工程机系统" :visible.sync="dialogFormVisible" :modal="false" width="30%">
  62. <el-form ref="engineForm" :model="engineForm" :rules="engineFormRules">
  63. <el-form-item label="账号" :label-width="formLabelWidth" prop="account">
  64. <el-input v-model="engineForm.account" placeholder="请输入账号" autocomplete="off" />
  65. </el-form-item>
  66. <el-form-item label="密码" :label-width="formLabelWidth" prop="password">
  67. <el-input v-model="engineForm.password" placeholder="请输入密码" autocomplete="off" show-password />
  68. </el-form-item>
  69. </el-form>
  70. <div slot="footer" class="dialog-footer">
  71. <el-button @click="dialogFormVisible = false">取 消</el-button>
  72. <el-button type="primary" @click="submitForm">确 定</el-button>
  73. </div>
  74. </el-dialog>
  75. <!-- 工程机多帐号-->
  76. <!-- <el-dialog-->
  77. <!-- title="绑定工程机系统"-->
  78. <!-- :visible.sync="dialogFormVisible"-->
  79. <!-- :modal="false"-->
  80. <!-- width="60%"-->
  81. <!-- >-->
  82. <!-- <el-form ref="engineForm" :model="engineForm">-->
  83. <!-- <el-row v-for="(row, index) in engineForm.engineList" :key="row.id" :gutter="20">-->
  84. <!-- <el-col :span="8">-->
  85. <!-- <el-form-item-->
  86. <!-- :label="'账号' + (index+1)"-->
  87. <!-- :label-width="formLabelWidth"-->
  88. <!-- :prop="'engineList.' + index + '.enginUserName'"-->
  89. <!-- :rules="{required: true, message: '请输入工程机账号', trigger: 'blur'}"-->
  90. <!-- >-->
  91. <!-- <el-input v-model="row.enginUserName" placeholder="请输入账号" autocomplete="off"></el-input>-->
  92. <!-- </el-form-item>-->
  93. <!-- </el-col>-->
  94. <!-- <el-col :span="8">-->
  95. <!-- <el-form-item-->
  96. <!-- :label="'密码' + (index+1)"-->
  97. <!-- :label-width="formLabelWidth"-->
  98. <!-- :prop="'engineList.' + index + '.enginPassword'"-->
  99. <!-- :rules="{required: true, message: '请输入工程机密码', trigger: 'blur'}"-->
  100. <!-- >-->
  101. <!-- <el-input v-model="row.enginPassword" placeholder="请输入密码" autocomplete="off" show-password></el-input>-->
  102. <!-- </el-form-item>-->
  103. <!-- </el-col>-->
  104. <!-- <el-col :span="8">-->
  105. <!-- <template v-if="row.adminUserId">-->
  106. <!-- <el-button @click="submitForm(index)">重验</el-button>-->
  107. <!-- </template>-->
  108. <!-- <template v-else>-->
  109. <!-- <el-button @click="submitForm(index)">验证</el-button>-->
  110. <!-- </template>-->
  111. <!-- <el-button v-if="row.adminUserId" @click="toEngine(index)">打开</el-button>-->
  112. <!-- <el-button @click="delAccountForm(index)">删除</el-button>-->
  113. <!-- </el-col>-->
  114. <!-- </el-row>-->
  115. <!-- </el-form>-->
  116. <!-- <div slot="footer" class="dialog-footer">-->
  117. <!-- <el-button @click="addRowEngine">新增账号</el-button>-->
  118. <!-- <el-button @click="dialogFormVisible = false">取 消</el-button>-->
  119. <!-- </div>-->
  120. <!-- </el-dialog>-->
  121. </div>
  122. </template>
  123. <script>
  124. import { mapGetters } from 'vuex'
  125. import Breadcrumb from '@/components/Breadcrumb'
  126. import Hamburger from '@/components/Hamburger'
  127. import Screenfull from '@/components/Screenfull'
  128. import NavMenu from '@/components/NavMenu'
  129. import { getNoticeListCount } from '@/api/notice'
  130. import { getNoticeList } from '@/api/stock'
  131. import { getListOrderTrack } from '@/api/supply/pickup'
  132. import { getListInvoiceOrder } from '@/api/dashboard'
  133. import { bindEngineAccount, checkEngineAccount, setUserChanging } from '@/api/setting'
  134. import mixin from '@/mixin'
  135. export default {
  136. components: {
  137. Breadcrumb,
  138. Hamburger,
  139. Screenfull,
  140. // eslint-disable-next-line vue/no-unused-components
  141. NavMenu
  142. },
  143. mixins: [mixin],
  144. data() {
  145. return {
  146. noticeType: 1,
  147. intivalId: '',
  148. timer: '',
  149. noticeCount: 0,
  150. userInfo: '',
  151. engineForm: {
  152. account: '',
  153. password: ''
  154. // engineList: []
  155. },
  156. engineFormRules: {
  157. account: [{ required: true, message: '请输入工程机账号', trigger: 'blur' }],
  158. password: [{ required: true, message: '请输入工程机密码', trigger: 'blur' }]
  159. },
  160. formLabelWidth: '100px',
  161. dialogFormVisible: false,
  162. // websocket错误连接次数
  163. wsConnectErrorTime: 1,
  164. websock: null,
  165. lockReconnect: false,
  166. noticeList: [],
  167. form: {
  168. specification: ''
  169. },
  170. isLogistics: false,
  171. visible: false,
  172. orderId: '',
  173. logisticsDetail: [],
  174. invoiceOrderList: [],
  175. currentPage: 1, // 当前页码
  176. pageSize: 10, // 每页数量
  177. listTotal: 0, // 列表总数
  178. currentPage2: 1, // 当前页码
  179. pageSize2: 10, // 每页数量
  180. listTotal2: 0, // 列表总数
  181. myType: '',
  182. changeNum: 1,
  183. areaOpti: [
  184. { label: '弘格', value: 1 },
  185. { label: '广州', value: 2 },
  186. { label: '佛山', value: 3 }
  187. ]
  188. }
  189. },
  190. mounted() {
  191. // 浏览器不同标签页监听
  192. // window.addEventListener('storage', event => {
  193. // if (event.key === 'user_auto_num') {
  194. // this.$router.go(0)
  195. // }
  196. // })
  197. this.changeNum = this.autoChangeNum
  198. // const that = this
  199. // 开定时器轮询未读消息接口(写在全局vuex里比较好)
  200. // that.initNotice();
  201. // that.tcMessage();
  202. // this.intivalId = setInterval(function () {
  203. // that.tcMessage();
  204. // }, 5000);
  205. // this.timer = setInterval(function () {
  206. // that.initNotice();
  207. // }, 3000);
  208. // 长链接
  209. // this.initWebSocket();
  210. },
  211. created() {
  212. this.userInfo = JSON.parse(localStorage.getItem('supply_user'))
  213. },
  214. beforeDestroy() {
  215. window.clearInterval(this.intivalId)
  216. window.clearInterval(this.timer)
  217. this.websocketOnclose()
  218. },
  219. // eslint-disable-next-line vue/order-in-components
  220. computed: {
  221. showBreadcrumb() {
  222. return this.$store.state.settings.breadcrumb
  223. },
  224. noticeVisible() {
  225. return this.noticeCount > 0
  226. },
  227. hasNotice: {
  228. get() {
  229. // 数据为空是不展示消息通知弹框
  230. if (!this.noticeList.length && !this.myType) {
  231. return false
  232. } else {
  233. // if (this.noticeList.length) {
  234. // return true
  235. // }
  236. return this.isNotice
  237. }
  238. },
  239. set(e) {
  240. return e
  241. }
  242. },
  243. ...mapGetters(['sidebar', 'avatar', 'device', 'name', 'isNotice', 'isCustomer', 'isHongGe', 'autoChangeNum'])
  244. },
  245. methods: {
  246. getList() {
  247. // this.getNoticeList()
  248. },
  249. handleChangeNotice(e) {
  250. if (e === 2) {
  251. this.currentPage2 = 1
  252. this.pageSize2 = 10
  253. this.listTotal2 = 0
  254. this.getNoticeList()
  255. } else {
  256. this.pageSize = 10
  257. this.currentPage = 1
  258. this.listTotal = 0
  259. this.getListInvoiceOrder()
  260. }
  261. },
  262. getNoticeList() {
  263. // this.listLoading = true
  264. getNoticeList({
  265. pageNum: this.currentPage2,
  266. pageSize: this.pageSize2,
  267. specification: this.form.specification
  268. }).then(res => {
  269. console.log(res.data.records, '999')
  270. this.noticeList = res.data.records
  271. this.listTotal2 = res.data.total
  272. // this.listLoading = false
  273. })
  274. },
  275. getNoticeLists() {
  276. // this.listLoading = true
  277. getNoticeList({
  278. pageNum: 1,
  279. pageSize: this.pageSize2,
  280. specification: this.form.specification
  281. }).then(res => {
  282. this.noticeList = res.data.records
  283. this.listTotal2 = res.data.total
  284. // this.listLoading = false
  285. })
  286. },
  287. // 获取物流列表
  288. getListInvoiceOrder(data) {
  289. // this.listLoading = true
  290. getListInvoiceOrder({
  291. pageSize: this.pageSize,
  292. pageNum: this.currentPage
  293. }).then(res => {
  294. this.invoiceOrderList = res.data.records
  295. this.listTotal = res.data.total
  296. // this.listLoading = false
  297. })
  298. },
  299. handleNotice() {
  300. this.$store.commit('user/showMessage', 'yes')
  301. },
  302. toggleSideBar() {
  303. this.$store.dispatch('app/toggleSideBar')
  304. },
  305. async logout() {
  306. await this.$store.dispatch('user/logout')
  307. // this.$router.push(`/login?redirect=${this.$route.fullPath}`)
  308. this.$store.commit('tagsView/SET_RESET_VIES')
  309. this.$router.push(`/login`)
  310. },
  311. initNotice() {
  312. getNoticeListCount().then(res => {
  313. if (res.data > 0 && this.noticeCount !== res.data) {
  314. this.noticeCount = res.data
  315. } else if (res.data === 0 && this.noticeCount !== res.data) {
  316. this.noticeCount = 0
  317. }
  318. })
  319. },
  320. // async tcMessage() {
  321. // // 长链接
  322. // // let data = {
  323. // // type: 'RebateOrderMsg',
  324. // // params: {
  325. // // }
  326. // // }
  327. // // this.websocketSend(JSON.stringify(data))
  328. // let res = await getRebateOrderMsg();
  329. // if (res.data.hasMessage) {
  330. // this.$notify.info({
  331. // title: "消息",
  332. // message: res.data.messages,
  333. // position: "bottom-right",
  334. // duration: 4000,
  335. // showClose: false,
  336. // });
  337. // }
  338. // },
  339. goNotice() {
  340. this.$router.push('/notice')
  341. },
  342. openEngineAccount() {
  343. this.engineForm.engineList = this.userInfo.bindEnginList
  344. this.dialogFormVisible = true
  345. },
  346. toEngine() {
  347. const userInfoCopy = this.userInfo
  348. if (userInfoCopy && userInfoCopy.bindEngin) {
  349. checkEngineAccount().then(res => {
  350. if (res.code === 200) {
  351. // this.$refs.engineSubmit.click()
  352. const { href } = this.$router.resolve({
  353. name: 'open_engin'
  354. })
  355. window.open(href, '_blank')
  356. } else {
  357. this.$errorMsg('账号密码错误,请重新绑定')
  358. this.dialogFormVisible = true
  359. }
  360. })
  361. } else {
  362. this.dialogFormVisible = true
  363. }
  364. },
  365. // toEngine(index) {
  366. // 工程机多帐号
  367. // const { href } = this.$router.resolve({
  368. // name: "open_engin",
  369. // query: {
  370. // index: index
  371. // }
  372. // });
  373. // window.open(href, "_blank");
  374. // },
  375. // addRowEngine() {
  376. // this.engineForm.engineList.push({
  377. // adminUserId: '',
  378. // enginPassword: '',
  379. // enginUserName: '',
  380. // status: '',
  381. // })
  382. // },
  383. submitForm() {
  384. this.$refs.engineForm.validate(valid => {
  385. if (valid) {
  386. const params = {
  387. enginUserName: this.engineForm.account,
  388. enginPassword: this.engineForm.password
  389. }
  390. bindEngineAccount(params).then(res => {
  391. if (res.code === 200) {
  392. this.$successMsg('绑定成功,正在打开工程机系统')
  393. this.dialogFormVisible = false
  394. this.$store.dispatch('user/getInfo').then(() => {
  395. this.userInfo = JSON.parse(localStorage.getItem('supply_user'))
  396. const { href } = this.$router.resolve({
  397. name: 'open_engin'
  398. })
  399. window.open(href, '_blank')
  400. })
  401. } else {
  402. this.$errorMsg(res.message)
  403. }
  404. })
  405. }
  406. })
  407. },
  408. // submitForm(index) {
  409. // 工程机多帐号
  410. // this.$refs.engineForm.validate((valid) => {
  411. // if (valid) {
  412. // const params = {
  413. // enginUserName: this.engineForm.engineList[index].enginUserName,
  414. // enginPassword: this.engineForm.engineList[index].enginPassword,
  415. // isReset: this.engineForm.engineList[index].adminUserId !== ''
  416. // };
  417. // bindEngineAccount(params).then((res) => {
  418. // if (res.code === 200) {
  419. // this.$successMsg("绑定成功,工程机系统");
  420. // this.$store.dispatch("user/getInfo").then(() => {
  421. // this.userInfo = JSON.parse(localStorage.getItem("supply_user"));
  422. // this.engineForm.engineList = this.userInfo.bindEnginList
  423. // });
  424. // } else {
  425. // this.$errorMsg(res.message);
  426. // }
  427. // });
  428. // }
  429. // });
  430. // },
  431. // delAccountForm(index) {
  432. // if (this.engineForm.engineList[index].id) {
  433. // this.$confirm('此操作将删除账号, 是否继续?', '提示', {
  434. // confirmButtonText: '确定',
  435. // cancelButtonText: '取消',
  436. // type: 'warning',
  437. // center: true
  438. // }).then(() => {
  439. // delEngineAccount({id: this.engineForm.engineList[index].id}).then(() => {
  440. // this.$store.dispatch("user/getInfo").then(() => {
  441. // this.userInfo = JSON.parse(localStorage.getItem("supply_user"));
  442. // this.engineForm.engineList = this.userInfo.bindEnginList
  443. // });
  444. // this.$successMsg("删除成功");
  445. // })
  446. // }).catch(() => {
  447. // });
  448. // } else {
  449. // this.engineForm.engineList.splice(index, 1)
  450. // }
  451. // }
  452. initWebSocket: function() {
  453. // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
  454. // var userId = this.$store.getters.userid;
  455. //
  456. // var url = process.env.VUE_APP_BASE_API.replace("https://","wss://").replace("http://","ws://").replace("api","supply")+"websocket/"+userId;
  457. // console.debug(userId, url);
  458. // let token = getToken()
  459. // this.websock = new WebSocket(url, [token]);
  460. // this.websock.onopen = this.websocketOnopen;
  461. // this.websock.onerror = this.websocketOnerror;
  462. // this.websock.onmessage = this.websocketOnmessage;
  463. // this.websock.onclose = this.websocketOnclose;
  464. },
  465. websocketOnopen: function() {
  466. console.debug('WebSocket连接成功')
  467. // 心跳检测重置
  468. // this.heartCheck.reset().start();
  469. },
  470. websocketOnerror: function(e) {
  471. console.debug('WebSocket连接发生错误,第%s次', this.wsConnectErrorTime)
  472. this.wsConnectErrorTime = this.wsConnectErrorTime + 1
  473. if (this.wsConnectErrorTime > 5) {
  474. console.debug('WebSocket连接错误超过5次,就不再重新连了!')
  475. this.lockReconnect = true
  476. return
  477. }
  478. this.reconnect()
  479. },
  480. websocketOnmessage: function(e) {
  481. console.debug('-----接收消息-------', e.data)
  482. // eslint-disable-next-line no-eval
  483. const data = eval('(' + e.data + ')') // 解析对象
  484. if (data.type === 'RebateOrderMsg') {
  485. if (data.res.hasMessage) {
  486. this.$notify.info({
  487. title: '消息',
  488. // eslint-disable-next-line no-undef
  489. message: res.data.messages,
  490. position: 'bottom-right',
  491. duration: 4000,
  492. showClose: false
  493. })
  494. }
  495. }
  496. },
  497. websocketOnclose: function(e) {
  498. console.debug('connection closed (' + e + ')')
  499. if (e) {
  500. console.debug('connection closed (' + e.code + ')')
  501. }
  502. this.reconnect()
  503. },
  504. websocketSend(text) {
  505. // 数据发送
  506. try {
  507. this.websock.send(text)
  508. } catch (err) {
  509. console.debug('send failed (' + err.code + ')')
  510. }
  511. },
  512. reconnect() {
  513. var that = this
  514. if (that.lockReconnect) return
  515. that.lockReconnect = true
  516. // 没连接上会一直重连,设置延迟避免请求过多
  517. setTimeout(function() {
  518. console.debug('尝试重连...')
  519. that.initWebSocket()
  520. that.lockReconnect = false
  521. }, 20000)
  522. },
  523. // handleShow() {
  524. // ;(this.isLogistics = true), this.getListInvoiceOrder()
  525. // },
  526. // 更改每页数量
  527. handleSizeChange2(val) {
  528. this.pageSize2 = val
  529. this.currentPage2 = 1
  530. this.getNoticeList()
  531. },
  532. // 更改当前页
  533. handleCurrentChange2(val) {
  534. this.currentPage2 = val
  535. this.getNoticeList()
  536. },
  537. // 更改每页数量
  538. handleSizeChange(val) {
  539. this.pageSize = val
  540. this.currentPage = 1
  541. this.getListInvoiceOrder()
  542. },
  543. // 更改当前页
  544. handleCurrentChange(val) {
  545. this.currentPage = val
  546. this.getListInvoiceOrder()
  547. },
  548. handLogistics(row) {
  549. getListOrderTrack({ orderId: row.id }).then(res => {
  550. this.logisticsDetail = res.data
  551. })
  552. this.orderId = row.id
  553. this.visible = true
  554. },
  555. onClose() {
  556. this.logisticsDetail = []
  557. this.orderId = ''
  558. this.visible = false
  559. },
  560. handleJump(id) {
  561. this.$router.push({ path: `/supply/pickup/sum_list?id=${id}` })
  562. this.$store.commit('user/SET_STATUS', false)
  563. },
  564. handleChangeArea(changeNum) {
  565. setUserChanging({ changeNum }).then(res => {
  566. this.$router.go(0)
  567. this.$successMsg('切换成功')
  568. })
  569. }
  570. }
  571. }
  572. </script>
  573. <style lang="scss" scoped>
  574. @import '~@/styles/variables.scss';
  575. .right-menu-item {
  576. ::v-deep .el-input__inner {
  577. width: 80px;
  578. font-size: 16px;
  579. color: #333333;
  580. border: 0 !important;
  581. }
  582. }
  583. ::v-deep .is-fixed {
  584. right: 10px !important;
  585. }
  586. .flex {
  587. margin-top: 30px;
  588. display: flex;
  589. align-items: center;
  590. justify-content: space-between;
  591. }
  592. .navbar {
  593. width: 100%;
  594. height: 50px;
  595. overflow: hidden;
  596. background: #{$navbarBg};
  597. box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  598. .hamburger-container {
  599. line-height: 46px;
  600. height: 100%;
  601. color: #{$navbarText};
  602. float: left;
  603. cursor: pointer;
  604. transition: background 0.3s;
  605. -webkit-tap-highlight-color: transparent;
  606. border-right: 1px solid #eaeaea;
  607. &:hover {
  608. background: rgba(0, 0, 0, 0.025);
  609. }
  610. }
  611. .navmenu {
  612. float: left;
  613. }
  614. .breadcrumb-container {
  615. float: left;
  616. }
  617. .right-menu {
  618. float: right;
  619. height: 100%;
  620. line-height: 50px;
  621. & > div {
  622. float: left;
  623. }
  624. &:focus {
  625. outline: none;
  626. }
  627. .user-container {
  628. height: 50px;
  629. .user {
  630. i {
  631. font-size: 18px;
  632. margin-right: 5px;
  633. }
  634. span {
  635. font-size: 16px;
  636. }
  637. }
  638. }
  639. .right-menu-item {
  640. display: inline-block;
  641. padding: 0 15px;
  642. height: 100%;
  643. font-size: 18px;
  644. color: #{$navbarText};
  645. vertical-align: text-bottom;
  646. border-left: 1px solid #eaeaea;
  647. &.hover-effect {
  648. cursor: pointer;
  649. transition: background 0.3s;
  650. &:hover {
  651. background: rgba(0, 0, 0, 0.025);
  652. }
  653. }
  654. .notice-icon {
  655. padding-top: 0;
  656. padding-bottom: 0;
  657. }
  658. }
  659. }
  660. }
  661. </style>
  662. <style lang="scss">
  663. .navbar {
  664. .right-menu {
  665. .right-menu-item {
  666. .notice-icon > i {
  667. font-size: 18px;
  668. }
  669. sup {
  670. top: 12px;
  671. right: 25px;
  672. }
  673. }
  674. }
  675. }
  676. .tip {
  677. margin: 50px auto;
  678. text-align: center;
  679. }
  680. </style>