Navbar.vue 22 KB

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