Navbar.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807
  1. <template>
  2. <div>
  3. <div class="navbar">
  4. <!-- 菜单展开缩起 -->
  5. <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
  6. <div class="menu_module">
  7. <div class="menu_module_view">
  8. <v-scroll-view
  9. :x="true"
  10. :y="false"
  11. slidingBgClassName="slidingBgClassName"
  12. slidingBlockClassName="slidingBlockClassName"
  13. >
  14. <div class="menu_module_fj">
  15. <div
  16. v-for="(item, index) in routes"
  17. :key="index"
  18. :class="{ item: true, select: path === item.path }"
  19. @click="path = item.path"
  20. >
  21. {{ item.meta.title }}
  22. </div>
  23. </div>
  24. </v-scroll-view>
  25. </div>
  26. </div>
  27. <!-- 右侧 -->
  28. <div class="right-menu">
  29. <!-- <div class="right-menu-item">
  30. <el-autocomplete
  31. v-model="pathurl"
  32. :fetch-suggestions="querySearchAsync"
  33. placeholder="搜索菜单"
  34. @select="handleSelect"
  35. ></el-autocomplete>
  36. </div> -->
  37. <div
  38. style="margin-right: 20px; cursor: pointer"
  39. @click="
  40. getList()
  41. isShow = true
  42. "
  43. >
  44. <i class="el-icon-message-solid"></i>
  45. <el-badge :is-dot="isDot1 || isDot2"></el-badge>
  46. </div>
  47. <shortcut />
  48. <template v-if="device !== 'mobile'">
  49. <!-- 全屏控制 -->
  50. <screenfull id="screenfull" class="right-menu-item hover-effect" />
  51. </template>
  52. <el-dropdown class="user-container" trigger="click">
  53. <div class="user right-menu-item hover-effect">
  54. <div class="flex">
  55. <i class="el-icon-user-solid" />
  56. <span :class="name.length > 5 ? 'ellipsis' : ''">{{ name }}</span>
  57. </div>
  58. </div>
  59. <el-dropdown-menu slot="dropdown" class="user-dropdown">
  60. <router-link :to="{ name: 'profile' }">
  61. <el-dropdown-item>个人信息</el-dropdown-item>
  62. </router-link>
  63. <el-dropdown-item divided @click.native="logout">
  64. <span style="display: block">退出登录</span>
  65. </el-dropdown-item>
  66. </el-dropdown-menu>
  67. </el-dropdown>
  68. </div>
  69. </div>
  70. <notice-bar />
  71. <el-drawer
  72. title="系统消息"
  73. :visible.sync="isShow"
  74. :append-to-body="true"
  75. :with-header="false"
  76. direction="rtl"
  77. size="25%"
  78. >
  79. <div class="message">
  80. <div class="head">
  81. <div class="flex_asb">
  82. <el-radio-group size="small" v-model="messageType" @change="getList">
  83. <el-badge :is-dot="isDot1" class="item">
  84. <el-radio-button :label="['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES']"
  85. >系统消息</el-radio-button
  86. >
  87. </el-badge>
  88. <el-badge :is-dot="isDot2" class="item">
  89. <el-radio-button :label="['NOTICE']">平台公告</el-radio-button>
  90. </el-badge>
  91. </el-radio-group>
  92. <el-switch
  93. v-model="isOpen"
  94. @change="updateIsNotice"
  95. inactive-text="消息弹窗"
  96. active-color="#13ce66"
  97. inactive-color="#ff4949"
  98. >
  99. </el-switch>
  100. </div>
  101. <el-radio-group size="mini" v-model="dateType" @change="getList" style="margin: 10px 0">
  102. <el-radio-button label="">全部</el-radio-button>
  103. <el-radio-button :label="0">今天</el-radio-button>
  104. <el-radio-button :label="1">昨天</el-radio-button>
  105. <el-radio-button :label="6">近7天</el-radio-button>
  106. <el-radio-button :label="29">近30天</el-radio-button>
  107. </el-radio-group>
  108. <div class="flex_asb">
  109. <el-radio-group size="mini" v-model="readFlag" @change="getList">
  110. <el-radio-button label="">全部</el-radio-button>
  111. <el-badge :hidden="count > 0 ? false : true" :value="count" class="item" style="margin: 0 10px">
  112. <el-radio-button label="NO">未读</el-radio-button>
  113. </el-badge>
  114. <el-badge :value="count" :hidden="true" class="item">
  115. <el-radio-button label="YES">已读</el-radio-button>
  116. </el-badge>
  117. </el-radio-group>
  118. <div style="color: #409eff; cursor: pointer" @click="confirmRead">
  119. <i class="el-icon-message-solid"></i>
  120. <span style="font-size: 14px">全部已读</span>
  121. </div>
  122. </div>
  123. </div>
  124. <el-card class="box-card" v-for="(item, index) in messageData" style="margin-top: 10px">
  125. <div
  126. @click="
  127. isShow = false
  128. toDetail(
  129. item.adminNoticeType,
  130. item.paidType,
  131. item.adminNoticeType == 'NOTICE' ? item.noticeId : item.orderId,
  132. item.id
  133. )
  134. "
  135. >
  136. <div v-if="item.adminNoticeType == 'NOTICE'">
  137. <div class="flex_asb item">
  138. <div>
  139. <span>公告类型:</span>
  140. <span>{{ statusFilter(item.adminNoticeType) }}</span>
  141. </div>
  142. <div class="read1" v-if="item.readFlag == 'NO'">未读</div>
  143. <div class="read2" v-if="item.readFlag == 'YES'">已读</div>
  144. </div>
  145. <div class="item">
  146. <div>
  147. <span>文件标题:</span>
  148. <span style="color: #409eff">{{ item.title }}</span>
  149. </div>
  150. </div>
  151. <div class="item">
  152. <div>
  153. <span>发布人:</span>
  154. <span>{{ item.issueNickName | '' }}</span>
  155. </div>
  156. </div>
  157. <div class="item">
  158. <div>
  159. <span>发布时间:</span>
  160. <span>{{ item.issueTime }}</span>
  161. </div>
  162. </div>
  163. <div v-if="item.readFlag == 'YES'" class="item">
  164. <span>阅读人:</span>
  165. <span>{{ item.adminNickName }} {{ item.readTime }}</span>
  166. </div>
  167. </div>
  168. <div v-else>
  169. <div class="flex_asb item">
  170. <div>
  171. <span>消息类型:</span>
  172. <span>{{ statusFilter(item.adminNoticeType) }}</span>
  173. </div>
  174. <div class="read1" v-if="item.readFlag == 'NO'">未读</div>
  175. <div class="read2" v-if="item.readFlag == 'YES'">已读</div>
  176. </div>
  177. <div class="item">
  178. <div>
  179. <span>订单编号:</span>
  180. <span style="color: #409eff">{{ item.orderId }}</span>
  181. </div>
  182. </div>
  183. <div class="item">
  184. <div>
  185. <span>消息内容:</span>
  186. <span>{{ item.content }}</span>
  187. </div>
  188. </div>
  189. <div class="item">
  190. <div>
  191. <span>创建时间:</span>
  192. <span>{{ item.createTime }}</span>
  193. </div>
  194. </div>
  195. <div v-if="item.readFlag == 'YES'" class="item">
  196. <span>阅读人:</span>
  197. <span>{{ item.adminNickName }} {{ item.readTime }}</span>
  198. </div>
  199. </div>
  200. </div>
  201. </el-card>
  202. <el-empty v-if="messageData.length == 0" description="暂无数据"></el-empty>
  203. <div class="flex_ac bottom">
  204. <el-pagination
  205. @current-change="handleCurrentChange"
  206. :current-page="currentPage"
  207. :page-size="pageSize"
  208. layout="prev, pager, next"
  209. background
  210. :total="listTotal"
  211. ></el-pagination>
  212. </div>
  213. </div>
  214. </el-drawer>
  215. </div>
  216. </template>
  217. <script>
  218. import { mapGetters } from 'vuex'
  219. import Hamburger from '@/components/Hamburger'
  220. import Shortcut from '@/components/Shortcut'
  221. import Screenfull from '@/components/Screenfull'
  222. import NavMenu from '@/components/NavMenu'
  223. import vScrollView from 'v-scroll-view'
  224. import NoticeBar from '@/components/NoticeBar'
  225. import { pages } from '@/settings'
  226. import request from '@/utils/request'
  227. function getc(obj) {
  228. if (!obj.children || !obj.children.length) {
  229. return obj
  230. } else {
  231. return getc(obj.children[0])
  232. }
  233. }
  234. export default {
  235. components: {
  236. NoticeBar,
  237. Hamburger,
  238. Screenfull,
  239. NavMenu,
  240. Shortcut,
  241. vScrollView
  242. },
  243. data() {
  244. return {
  245. pathurl: '',
  246. visible: false,
  247. noticeCount: 0,
  248. path: `/${this.$route.path.split('/')[1] || ''}`,
  249. isShow: false,
  250. isOpen: true,
  251. checked: false,
  252. messageType: ['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES'],
  253. messageData: [],
  254. dateType: '',
  255. readFlag: '',
  256. timer: null,
  257. listTotal: 0,
  258. currentPage: 1, // 当前页码
  259. pageSize: 10, // 每页数量
  260. count: 0,
  261. isDot1: false,
  262. isDot2: false
  263. }
  264. },
  265. computed: {
  266. routes() {
  267. return global.antRouter.filter(item => item.meta)
  268. },
  269. noticeVisible() {
  270. return this.noticeCount > 0
  271. },
  272. ...mapGetters(['userid']),
  273. ...mapGetters(['sidebar', 'avatar', 'device', 'name', 'isNotice']),
  274. filterTime() {
  275. if (this.dateType === '') {
  276. return ['', '']
  277. } else {
  278. var date = new Date()
  279. var base = Date.parse(date) // 转换为时间戳
  280. var year = date.getFullYear() //获取当前年份
  281. var mon = date.getMonth() + 1 //获取当前月份
  282. var day = date.getDate() //获取当前日
  283. var oneDay = 24 * 3600 * 1000
  284. var daytimeArr = []
  285. var now = new Date(base - oneDay * this.dateType)
  286. var myear = now.getFullYear()
  287. var month = now.getMonth() + 1
  288. var mday = now.getDate()
  289. if (this.dateType == 1) {
  290. return [
  291. `${myear}-${month > 9 ? month : '0' + month}-${mday > 9 ? mday : '0' + mday} 00:00:00`,
  292. `${myear}-${month > 9 ? month : '0' + month}-${mday > 9 ? mday : '0' + mday} 23:59:59`
  293. ]
  294. } else {
  295. return [
  296. `${myear}-${month > 9 ? month : '0' + month}-${mday > 9 ? mday : '0' + mday} 00:00:00`,
  297. `${year}-${mon > 9 ? mon : '0' + mon}-${day > 9 ? day : '0' + day} 23:59:59`
  298. ]
  299. }
  300. }
  301. },
  302. statusFilter() {
  303. return function (val) {
  304. const MAP = {
  305. NOTICE: '平台公告',
  306. WBI: '维保消息费用申请',
  307. WBK: '维保费用申请审批',
  308. CRE_ORDER: '创建工单',
  309. SEND_MALL: '商城订单发货',
  310. RP_MALL: '商城订单维权',
  311. CR_SALES: '订单支付成功'
  312. }
  313. return MAP[val]
  314. }
  315. },
  316. typeFilter() {
  317. return function (val, paidType) {
  318. const MAP = {
  319. NOTICE: 'systemMessage',
  320. WBI: 'applicationWithoutFee',
  321. WBK: 'applicationWithoutFee',
  322. CRE_ORDER: 'workOrderPool',
  323. SEND_MALL: 'order_detail',
  324. RP_MALL: 'order_pr',
  325. CR_SALES:
  326. paidType == 'M'
  327. ? 'auxiliarySalesOrder'
  328. : paidType == 'P'
  329. ? 'attachmentSalesOrder'
  330. : paidType == 'YB'
  331. ? 'orderSettleManag'
  332. : paidType == 'MALL'
  333. ? 'order_list'
  334. : ''
  335. }
  336. return MAP[val]
  337. }
  338. }
  339. },
  340. watch: {
  341. $route() {
  342. this.path = `/${this.$route.path.split('/')[1] || ''}`
  343. },
  344. path(newVal) {
  345. this.$store.commit('app/SET_L1_PATH', newVal)
  346. if (
  347. !~this.$route.path
  348. .split('/')
  349. .map(str => `/${str}`)
  350. .indexOf(newVal)
  351. ) {
  352. var item = getc(this.routes.find(item => item.path === newVal))
  353. if (item) {
  354. this.$router.push(item.path)
  355. }
  356. }
  357. }
  358. },
  359. created() {
  360. clearInterval(this.timer)
  361. this.getUserInfo()
  362. this.redDot()
  363. },
  364. mounted() {
  365. this.$store.commit('app/SET_L1_PATH', this.path)
  366. },
  367. methods: {
  368. handlePage() {
  369. let link = null
  370. if (process.env.VUE_APP_ENV === 'production') {
  371. link = 'https://fw.gd-jxm.com/#/home'
  372. } else {
  373. link = 'https://jiasm.zfire.top/center/#/home'
  374. }
  375. window.open(link)
  376. },
  377. querySearchAsync(queryString, cb) {
  378. var data = pages.filter(item => ~item.meta.title.indexOf(queryString))
  379. cb(
  380. data.map(item => ({
  381. value: item.meta.title,
  382. path: item.path
  383. }))
  384. )
  385. },
  386. handleSelect(item) {
  387. if (item.path) {
  388. this.$router.push({
  389. path: item.path
  390. })
  391. }
  392. this.pathurl = ''
  393. },
  394. async logout() {
  395. await this.$store.dispatch('user/logout')
  396. this.$store.commit('tagsView/SET_RESET_VIES')
  397. this.$router.push(`/login`)
  398. },
  399. toggleSideBar() {
  400. this.$store.dispatch('app/toggleSideBar')
  401. },
  402. //获取最新消息并弹窗
  403. getMessageTips() {
  404. const that = this
  405. this.timer = setInterval(() => {
  406. request({
  407. url: `/notice/list/out`,
  408. method: 'get',
  409. params: {
  410. num: 30
  411. }
  412. }).then(res => {
  413. res.data.forEach(item => {
  414. this.$notify({
  415. title: '新消息',
  416. position: 'bottom-right',
  417. duration: 30000,
  418. message: that.$createElement(
  419. 'div',
  420. {
  421. style: 'cursor: pointer;',
  422. on: {
  423. click: that.toDetail.bind(
  424. that,
  425. item.adminNoticeType,
  426. item.paidType,
  427. item.adminNoticeType == 'NOTICE' ? item.noticeId : item.orderId,
  428. item.id
  429. )
  430. }
  431. },
  432. [
  433. that.$createElement('span', null, that.statusFilter(item.adminNoticeType) + ' '),
  434. that.$createElement(
  435. 'span',
  436. {
  437. style: 'color: #409EFF;'
  438. },
  439. ' ' + item.adminNoticeType == 'NOTICE' ? item.title : item.orderId
  440. ),
  441. that.$createElement('span', null, item.adminNoticeType == 'NOTICE' ? '' : item.content)
  442. // that.$createElement(
  443. // "el-checkbox",
  444. // {
  445. // on: {
  446. // change: that.updateIsNotice.bind(that)
  447. // },
  448. // }, '不再弹窗新消息'
  449. // )
  450. ]
  451. )
  452. })
  453. })
  454. })
  455. }, 30000)
  456. },
  457. getCount() {
  458. request({
  459. url: `/notice/list/count`,
  460. method: 'get',
  461. params: {
  462. noticeType: this.messageType.join(','),
  463. readFlag: 'NO'
  464. }
  465. }).then(res => {
  466. this.count = res.data
  467. })
  468. },
  469. redDot() {
  470. request({
  471. url: `/notice/list/count`,
  472. method: 'get',
  473. params: {
  474. noticeType: ['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES'].join(','),
  475. readFlag: 'NO'
  476. }
  477. }).then(res => {
  478. this.isDot1 = res.data > 0 ? true : false
  479. })
  480. request({
  481. url: `/notice/list/count`,
  482. method: 'get',
  483. params: {
  484. noticeType: ['NOTICE'].join(','),
  485. readFlag: 'NO'
  486. }
  487. }).then(res => {
  488. this.isDot2 = res.data > 0 ? true : false
  489. })
  490. },
  491. getUserInfo() {
  492. const that = this
  493. request({
  494. url: `/admin/user/detail`,
  495. method: 'get',
  496. params: {
  497. adminUserId: this.userid
  498. }
  499. }).then(res => {
  500. this.isOpen = res.data.isNotice == 'YES' ? true : false
  501. if (res.data.isNotice == 'NO') {
  502. clearInterval(this.timer)
  503. } else {
  504. clearInterval(this.timer)
  505. this.getMessageTips()
  506. }
  507. })
  508. },
  509. //全部已读
  510. confirmRead() {
  511. this.$confirm('是否全部设为已读, 是否继续?', '提示', {
  512. confirmButtonText: '确定',
  513. cancelButtonText: '取消',
  514. type: 'warning'
  515. })
  516. .then(() => {
  517. request({
  518. url: `/notice/mark/read/all`,
  519. method: 'post',
  520. data: {}
  521. }).then(res => {
  522. if (res.code == 200) {
  523. this.getList()
  524. this.$message.success('全部已读成功!')
  525. }
  526. })
  527. })
  528. .catch(() => {
  529. this.$message({
  530. type: 'info',
  531. message: '已取消'
  532. })
  533. })
  534. },
  535. //点击不再弹窗新消息
  536. updateIsNotice(e) {
  537. request({
  538. url: `/notice/updateIsNotice`,
  539. method: 'post',
  540. params: {
  541. isNotice: e ? 'YES' : 'NO'
  542. }
  543. }).then(res => {
  544. if (res.code == 200) {
  545. this.getUserInfo()
  546. this.$message.success(e ? '已开启弹窗消息提醒' : '已关闭弹窗消息提醒')
  547. if (!e) {
  548. clearInterval(this.timer)
  549. }
  550. }
  551. })
  552. },
  553. getList() {
  554. request({
  555. url: `/notice/list`,
  556. method: 'post',
  557. data: {
  558. pageNum: this.currentPage,
  559. pageSize: this.pageSize,
  560. params: [
  561. { param: 'nr.read_flag', compare: '=', value: this.readFlag },
  562. { param: 'nr.admin_notice_type', compare: '=', value: this.messageType },
  563. { param: 'nr.issue_time', compare: '>=', value: this.filterTime[0] },
  564. { param: 'nr.issue_time', compare: '<=', value: this.filterTime[1] }
  565. ]
  566. }
  567. }).then(res => {
  568. this.getCount()
  569. this.redDot()
  570. this.listTotal = res.data.total
  571. this.messageData = res.data.records
  572. })
  573. },
  574. // 更改当前页
  575. handleCurrentChange(val) {
  576. this.currentPage = val
  577. this.getList()
  578. },
  579. toDetail(type, paidType, orderId, id) {
  580. console.log(this.typeFilter(type, paidType))
  581. this.read(id)
  582. this.$router.push({
  583. name: this.typeFilter(type, paidType),
  584. params: {
  585. pageName: orderId,
  586. pageType: 'detail',
  587. pageCode: orderId
  588. },
  589. query: {
  590. id: orderId,
  591. orderId: orderId
  592. }
  593. })
  594. },
  595. read(id) {
  596. request({
  597. url: `/notice/mark/read`,
  598. method: 'post',
  599. params: {
  600. noticeIds: id
  601. }
  602. }).then(res => {})
  603. }
  604. }
  605. }
  606. </script>
  607. <style lang="scss" scoped>
  608. @import '~@/styles/variables.scss';
  609. // ::v-deep .el-drawer__container{
  610. // top: 50px;
  611. // }
  612. ::v-deep .is-fixed {
  613. right: 10px !important;
  614. }
  615. ::v-deep .slidingBgClassName {
  616. background: rgba(0, 0, 0, 0.01) !important;
  617. }
  618. ::v-deep .slidingBlockClassName {
  619. background: rgba(0, 0, 0, 0.05) !important;
  620. }
  621. .flex_asb {
  622. display: flex;
  623. justify-content: space-between;
  624. align-items: center;
  625. }
  626. .flex_ac {
  627. display: flex;
  628. justify-content: center;
  629. }
  630. .message {
  631. padding: 20px;
  632. position: relative;
  633. min-height: 100%;
  634. padding-bottom: 60px;
  635. padding-top: 150px;
  636. box-sizing: border-box;
  637. .head {
  638. width: 25%;
  639. position: fixed;
  640. top: 0;
  641. right: 0;
  642. background: #ffffff;
  643. padding: 20px;
  644. }
  645. .bottom {
  646. width: 25%;
  647. position: fixed;
  648. bottom: 0;
  649. right: 0;
  650. background: #ffffff;
  651. padding: 10px 0;
  652. }
  653. }
  654. .box-card {
  655. .item {
  656. cursor: pointer;
  657. margin-bottom: 6px;
  658. }
  659. .read1 {
  660. color: #f5680e;
  661. background: #fff2da;
  662. padding: 2px 4px;
  663. border-radius: 4px;
  664. font-size: 14px;
  665. }
  666. .read2 {
  667. color: #42b983;
  668. background: #d7fdde;
  669. padding: 2px 4px;
  670. border-radius: 4px;
  671. font-size: 14px;
  672. }
  673. }
  674. .navbar {
  675. width: 100%;
  676. height: 50px;
  677. overflow: hidden;
  678. background: #{$navbarBg};
  679. box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  680. display: flex;
  681. flex-direction: row;
  682. align-items: center;
  683. .hamburger-container {
  684. line-height: 46px;
  685. height: 100%;
  686. color: #{$navbarText};
  687. cursor: pointer;
  688. transition: background 0.3s;
  689. -webkit-tap-highlight-color: transparent;
  690. border-right: 1px solid #eaeaea;
  691. &:hover {
  692. background: rgba(0, 0, 0, 0.025);
  693. }
  694. }
  695. .menu_module {
  696. height: 100%;
  697. flex: 1;
  698. position: relative;
  699. .menu_module_view {
  700. position: absolute;
  701. top: 0;
  702. left: 0;
  703. bottom: 0;
  704. right: 0;
  705. .menu_module_fj {
  706. height: 100%;
  707. width: fit-content;
  708. white-space: nowrap;
  709. box-sizing: border-box;
  710. padding: 0 10px;
  711. .item {
  712. display: inline-block;
  713. height: 100%;
  714. line-height: 50px;
  715. box-sizing: border-box;
  716. padding: 0 10px;
  717. cursor: pointer;
  718. }
  719. .select {
  720. border-bottom: 1px solid #000;
  721. }
  722. }
  723. }
  724. }
  725. .flex {
  726. display: flex;
  727. align-items: center;
  728. }
  729. .ellipsis {
  730. display: inline-block;
  731. width: (16px * 6);
  732. white-space: nowrap;
  733. overflow: hidden;
  734. text-overflow: ellipsis;
  735. }
  736. .right-menu {
  737. height: 100%;
  738. line-height: 50px;
  739. & > div {
  740. float: left;
  741. }
  742. &:focus {
  743. outline: none;
  744. }
  745. .user-container {
  746. height: 50px;
  747. .user {
  748. i {
  749. font-size: 18px;
  750. margin-right: 5px;
  751. }
  752. span {
  753. font-size: 16px;
  754. }
  755. }
  756. }
  757. .right-menu-item {
  758. display: inline-block;
  759. padding: 0 15px;
  760. height: 100%;
  761. font-size: 18px;
  762. color: #{$navbarText};
  763. vertical-align: text-bottom;
  764. border-left: 1px solid #eaeaea;
  765. &.hover-effect {
  766. cursor: pointer;
  767. transition: background 0.3s;
  768. &:hover {
  769. background: rgba(0, 0, 0, 0.025);
  770. }
  771. }
  772. .notice-icon {
  773. padding-top: 0;
  774. padding-bottom: 0;
  775. }
  776. .right-menu-item {
  777. .notice-icon > i {
  778. font-size: 18px;
  779. }
  780. sup {
  781. top: 12px;
  782. right: 25px;
  783. }
  784. }
  785. }
  786. }
  787. }
  788. ::v-deep .el-badge__content.is-fixed {
  789. z-index: 99;
  790. }
  791. </style>