Navbar.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <template>
  2. <div class="navbar">
  3. <!-- <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> -->
  4. <router-link
  5. key="collapse"
  6. style="display: flex; align-items: center; padding-left: 30px"
  7. to="/"
  8. >
  9. <img
  10. v-if="tenantLogo"
  11. :src="tenantLogo"
  12. class="sidebar-logo"
  13. style="width: 36px; height: 36px"
  14. />
  15. <img
  16. v-else
  17. src="@/assets/images/base/logo.png"
  18. class="sidebar-logo"
  19. style="width: 36px; height: 36px"
  20. />
  21. <span class="tenantName" :title="tenantName">{{ tenantName }}</span>
  22. </router-link>
  23. <!-- <breadcrumb class="breadcrumb-container" /> -->
  24. <div class="indexlayout-top-menu">
  25. <!-- :class="{'active': getTopMenuActive === route.path}" -->
  26. <!-- el-scrollbar -->
  27. <el-scrollbar
  28. class="horizontal-scrollbar"
  29. style="overflow: hidden; height: 100%"
  30. >
  31. <template v-for="route in permission_routes">
  32. <app-link
  33. v-if="!route.hidden"
  34. :to="route.path"
  35. :key="route.id"
  36. class="indexlayout-top-menu-li"
  37. :class="{ active: getTopMenuActive === route.path }"
  38. >
  39. <div style="display: flex; align-items: center; justify-content: center; flex-direction: column; height: 76px;">
  40. <i :class="[route.meta.icon, 'menuSize']"></i>
  41. <span style="line-height: 1.2">{{ route.meta.title }}</span>
  42. </div>
  43. </app-link>
  44. </template>
  45. </el-scrollbar>
  46. </div>
  47. <div class="right-menu">
  48. <el-popover
  49. placement="bottom"
  50. trigger="hover"
  51. style="display: flex;"
  52. v-if="tenantForm.tenantId == 1"
  53. >
  54. <div class="popover-container" style="text-align: center">OA审批</div>
  55. <div
  56. class="msginfo right-position"
  57. @click="gotoOa"
  58. slot="reference"
  59. >
  60. <i class="icon_admin_oa operationSize"></i>
  61. </div>
  62. </el-popover>
  63. <!-- <el-popover
  64. v-if="isShowIns"
  65. placement="bottom"
  66. trigger="hover"
  67. style="display: flex;"
  68. >
  69. <div class="popover-container" style="text-align: center">操作手册</div>
  70. <div
  71. class="msginfo right-position"
  72. @click="openIns"
  73. slot="reference"
  74. >
  75. <i class="icon_admin_book operationSize"></i>
  76. </div>
  77. </el-popover> -->
  78. <el-popover
  79. placement="bottom"
  80. trigger="hover"
  81. style="display: flex;"
  82. >
  83. <div class="popover-container" style="text-align: center">系统日志</div>
  84. <div
  85. class="msginfo right-position"
  86. v-permission="'/journal'"
  87. @click="gotoRecode"
  88. slot="reference"
  89. >
  90. <i class="icon_admin_message operationSize"></i>
  91. </div>
  92. </el-popover>
  93. <div class="left-menu" style="margin-right: 12px">
  94. <el-popover
  95. placement="top-start"
  96. width="300"
  97. trigger="hover"
  98. style="display: flex;"
  99. >
  100. <div class="popover-container">
  101. <el-tag
  102. class="navbar_tag"
  103. type="info"
  104. v-for="item in organNameList"
  105. :key="item"
  106. >{{ item }}</el-tag
  107. >
  108. </div>
  109. <span
  110. slot="reference"
  111. class="msginfo right-position"
  112. >
  113. <i class="icon_admin_orgin operationSize"></i>
  114. </span>
  115. </el-popover>
  116. </div>
  117. <el-dropdown class="avatar-container" trigger="hover">
  118. <div class="avatar-wrapper">
  119. <img
  120. v-if="$store.getters.avatar"
  121. :src="$store.getters.avatar"
  122. class="user-avatar"
  123. />
  124. <img
  125. v-else
  126. class="user-avatar"
  127. src="@/assets/images/base/placehorder-icon.png"
  128. />
  129. <span>{{ username }}</span>
  130. </div>
  131. <el-dropdown-menu slot="dropdown" class="user-dropdown">
  132. <div class="drop_userInfo">
  133. <div class="avatar-wrapper">
  134. <img
  135. v-if="$store.getters.avatar"
  136. :src="$store.getters.avatar"
  137. class="user-avatar"
  138. />
  139. <img
  140. v-else
  141. class="user-avatar"
  142. src="@/assets/images/base/placehorder-icon.png"
  143. />
  144. <span>{{ username }}</span>
  145. </div>
  146. </div>
  147. <div class="tenantService" v-if="!tenantStatus">
  148. <div class="serviceName">
  149. <p class="name">{{ tenantInfo.serverName }}</p>
  150. <div class="serviceRenew" @click="onRenew" v-if="$helpers.permission('/productService') && $helpers.permission('/serviceRenew')">立即续费</div>
  151. </div>
  152. <div class="serviceTime" v-if="tenantInfo.validRemaining >= 0">
  153. 剩余{{ tenantInfo.validRemaining }}天({{ tenantInfo.expiryDateEnd }})到期
  154. </div>
  155. <div class="serviceTime" v-else>
  156. 已过期
  157. </div>
  158. </div>
  159. <!-- divided -->
  160. <el-dropdown-item v-if="tenantStatus" @click.native="onTenantChange">
  161. <i class="icon_admin_tenant userSize"></i>
  162. <span class="dropdown-text">{{ tenantName }}</span>
  163. <i style="margin-left: 3px" class="icon_admin_change userSize"></i>
  164. </el-dropdown-item>
  165. <el-dropdown-item @click.native="resetPassWord">
  166. <i class="icon_admin_edit userSize"></i>
  167. <span class="dropdown-text">修改密码</span>
  168. </el-dropdown-item>
  169. <el-dropdown-item @click.native="accountSetting" v-if="$helpers.permission('/tenantInfoSetting')">
  170. <i class="icon_admin_account userSize"></i>
  171. <span class="dropdown-text">账号设置</span>
  172. </el-dropdown-item>
  173. <el-dropdown-item style="border-top: 1px solid #E5E5E5;" @click.native="logout">
  174. <i class="icon_admin_exit userSize"></i>
  175. <span class="dropdown-text">安全退出</span>
  176. </el-dropdown-item>
  177. </el-dropdown-menu>
  178. </el-dropdown>
  179. </div>
  180. <el-dialog
  181. title="修改密码"
  182. width="500px"
  183. append-to-body
  184. :visible.sync="resetVisible"
  185. >
  186. <el-form
  187. :model="resetForm"
  188. label-position="right"
  189. label-width="100px"
  190. ref="pwdForm"
  191. >
  192. <el-form-item label="手机号" prop="phone">
  193. <div>{{ this.$store.getters.phone }}</div>
  194. </el-form-item>
  195. <el-form-item
  196. label="新密码"
  197. :rules="[
  198. { required: true, message: '密码不能为空', trigger: 'blur' },
  199. {
  200. pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/,
  201. message: '密码为6-20位数字和字母组合',
  202. trigger: 'blur',
  203. },
  204. ]"
  205. prop="password"
  206. >
  207. <el-input
  208. v-model.trim="resetForm.password"
  209. type="password"
  210. style="width: 180px"
  211. autocomplete="off"
  212. ></el-input>
  213. </el-form-item>
  214. <el-form-item
  215. label="再次输入"
  216. :rules="[
  217. { required: true, message: '密码不能为空', trigger: 'blur' },
  218. {
  219. pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/,
  220. message: '密码为6-20位数字和字母组合',
  221. trigger: 'blur',
  222. },
  223. ]"
  224. prop="password2"
  225. >
  226. <el-input
  227. v-model.trim="resetForm.password2"
  228. type="password"
  229. style="width: 180px"
  230. autocomplete="off"
  231. ></el-input>
  232. </el-form-item>
  233. <el-form-item
  234. label="验证码"
  235. :rules="[
  236. { required: true, message: '验证码不能为空', trigger: 'blur' },
  237. ]"
  238. prop="authCode"
  239. style=""
  240. >
  241. <el-input
  242. v-model.trim="resetForm.authCode"
  243. style="width: 180px"
  244. autocomplete="off"
  245. ></el-input>
  246. <el-button :disabled="isDisable" @click="getCode">{{
  247. btnName
  248. }}</el-button>
  249. </el-form-item>
  250. </el-form>
  251. <div slot="footer" class="dialog-footer">
  252. <el-button @click="resetVisible = false">取 消</el-button>
  253. <el-button type="primary" @click="submitResetPassWord">确 定</el-button>
  254. </div>
  255. </el-dialog>
  256. <el-dialog
  257. title="切换机构"
  258. width="500px"
  259. append-to-body
  260. v-if="tenantVisible"
  261. :visible.sync="tenantVisible"
  262. >
  263. <el-form
  264. :model="tenantForm"
  265. label-position="right"
  266. label-width="100px"
  267. ref="tenantForm"
  268. >
  269. <el-form-item
  270. label="选择机构"
  271. :rules="[
  272. { required: true, message: '请选择机构', trigger: 'change' }
  273. ]"
  274. prop="tenantId"
  275. >
  276. <el-select
  277. v-model.trim="tenantForm.tenantId"
  278. filterable
  279. placeholder="请选择机构"
  280. clearable
  281. style="width: 100% !important"
  282. >
  283. <el-option v-for="(item, index) in tenantList" :key="index" :label="item.name" :value="item.id"></el-option>
  284. </el-select>
  285. </el-form-item>
  286. </el-form>
  287. <div slot="footer" class="dialog-footer">
  288. <el-button @click="tenantVisible = false">取 消</el-button>
  289. <el-button type="primary" @click="submitTenant">确 定</el-button>
  290. </div>
  291. </el-dialog>
  292. <!-- <portal-target name="AppMain" ref="target">
  293. <instructions ref="instructions" @checkShow="checkShow" />
  294. </portal-target> -->
  295. </div>
  296. </template>
  297. <script>
  298. import qs from "qs";
  299. import Logo from "./Sidebar/Logo";
  300. import { mapGetters } from "vuex";
  301. // import Breadcrumb from '@/components/Breadcrumb'
  302. // import Hamburger from '@/components/Hamburger'
  303. import { resetPassword } from "@/api/buildTeam";
  304. import AppLink from "./Sidebar/Link";
  305. import { getBelongTopMenuPath } from "@/utils/permission";
  306. // import instructions from "./instructions";
  307. import { validOaUrl } from '@/utils/validate'
  308. import { tenantInfoQueryPage } from '@/views/organManager/api'
  309. import Cookies from 'js-cookie'
  310. import axios from 'axios'
  311. export default {
  312. data() {
  313. let tenantConfig = sessionStorage.getItem('tenantConfig')
  314. tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {}
  315. return {
  316. username: "",
  317. organName: this.$store.getters.organName,
  318. organNameList: [],
  319. resetVisible: false,
  320. resetForm: {
  321. phone: "",
  322. authCode: "",
  323. password: "",
  324. password2: "",
  325. },
  326. isDisable: false, // 是否允许发送验证码
  327. timerCount: 60,
  328. btnName: "获取验证码",
  329. isShowIns: false,
  330. tenantVisible: false,
  331. tenantName: tenantConfig.tenantName || null,
  332. tenantForm: {
  333. tenantId: Number(tenantConfig.tenantId) || null,
  334. },
  335. tenantList: [],
  336. tenantLogo: tenantConfig.tenantLogo || null,
  337. };
  338. },
  339. components: {
  340. AppLink,
  341. // instructions,
  342. // Breadcrumb,
  343. // Hamburger
  344. },
  345. computed: {
  346. ...mapGetters(["sidebar", "avatar", "permission_routes", "tenantInfo"]),
  347. getTopMenuActive() {
  348. let route = this.$route;
  349. // (route, getBelongTopMenuPath(route))
  350. return getBelongTopMenuPath(route);
  351. },
  352. tenantStatus() { // 判断是否是平台账号 true 是
  353. const baseTenantId = sessionStorage.getItem('baseTenantId')
  354. return baseTenantId < 0 ? true : false
  355. },
  356. },
  357. mounted() {
  358. // 手动加入
  359. this.toggleSideBar();
  360. this.username = this.$store.getters.name;
  361. this.organNameList = this.organName.split(",") || [];
  362. },
  363. methods: {
  364. toggleSideBar() {
  365. this.$store.dispatch("app/toggleSideBar");
  366. },
  367. async logout() {
  368. await this.$store.dispatch("user/logout");
  369. localStorage.removeItem("firstMenuUrl");
  370. // await this.$store.dispatch("permission/removePermission")
  371. this.$router.push(`/login`);
  372. window.location.reload();
  373. },
  374. async onTenantChange() {
  375. try {
  376. const res = await tenantInfoQueryPage({ page: 1, rows: 999, payState: 1 }, )
  377. this.tenantList = res.data?.rows || []
  378. this.tenantVisible = true
  379. } catch(e) {}
  380. },
  381. onRenew() {
  382. this.$router.push('/productService')
  383. },
  384. accountSetting() {
  385. // 账号设置
  386. this.$router.push('/tenantSetting/tenantInfoSetting')
  387. },
  388. submitTenant() {
  389. this.$refs['tenantForm'].validate((res) => {
  390. if(res) {
  391. const tenantForm = this.tenantForm
  392. let tenantName = null
  393. let tenantLogo = null
  394. this.tenantList.forEach(item => {
  395. if(item.id == tenantForm.tenantId) {
  396. tenantName = item.name
  397. tenantLogo = item.logo
  398. this.tenantName = item.name
  399. this.tenantLogo = item.logo
  400. }
  401. });
  402. let tenantConfig = sessionStorage.getItem('tenantConfig')
  403. tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {}
  404. if(tenantConfig.tenantId != tenantForm.tenantId) {
  405. //判断是否是当前路由
  406. // if(url == this.$route.path) {
  407. tenantConfig.tenantId = tenantForm.tenantId
  408. tenantConfig.tenantName = tenantName
  409. tenantConfig.tenantLogo = tenantLogo
  410. sessionStorage.setItem('tenantConfig', JSON.stringify(tenantConfig))
  411. this.$router.push({
  412. path: '/redirect',
  413. query: this.$route.fullPath
  414. })
  415. // } else {
  416. // this.$router.push({
  417. // path: url
  418. // })
  419. // }
  420. }
  421. }
  422. })
  423. },
  424. gotoRecode() {
  425. this.$router.push("/journal/journal");
  426. },
  427. resetPassWord() {
  428. this.resetVisible = true;
  429. },
  430. submitResetPassWord() {
  431. if (this.resetForm.password !== this.resetForm.password2) {
  432. this.$message.error("两次密码必须相同");
  433. return;
  434. }
  435. this.$refs["pwdForm"].validate((res) => {
  436. if (res) {
  437. // 发请求
  438. resetPassword({
  439. authCode: this.resetForm.authCode,
  440. mobile: this.$store.getters.phone,
  441. newPassword: this.resetForm.password,
  442. }).then((res) => {
  443. if (res.code == 200) {
  444. // 修改成功
  445. this.$message.success("修改成功");
  446. this.logout();
  447. }
  448. });
  449. }
  450. });
  451. },
  452. getCode() {
  453. // 获取验证码
  454. if (!this.$store.getters.phone) {
  455. this.$message.error("请输入正确的手机号");
  456. return;
  457. }
  458. if (!this.isDisable) {
  459. this.isDisable = true;
  460. // 发请求成功后开启定时器
  461. // 发送验证码
  462. axios
  463. .post(
  464. "/api-web/code/sendSms",
  465. qs.stringify({ mobile: this.$store.getters.phone })
  466. )
  467. .then((res) => {
  468. if (res.data.code == 200) {
  469. let timer = setInterval((res) => {
  470. if (this.timerCount <= 0) {
  471. clearInterval(timer);
  472. this.isDisable = false;
  473. this.btnName = "获取验证码";
  474. this.timerCount = 60;
  475. } else {
  476. this.timerCount--;
  477. this.btnName = `${this.timerCount}s后重试`;
  478. }
  479. }, 1000);
  480. }
  481. });
  482. }
  483. },
  484. openIns() {
  485. // this.$refs.instructions.showInstructions();
  486. },
  487. checkShow(val) {
  488. this.isShowIns = val;
  489. },
  490. gotoOa(){
  491. // console.log(validOaUrl())
  492. // const Token = Cookies.get('cross-Token')
  493. // console.log(Token, validOaUrl().split('//')[1])
  494. // Cookies.set('Admin-Token', Token, { domain: `.${validOaUrl().split('//')[1]}`, path: '/' })
  495. // document.cookie = `Adminoken=${Token};domain=oadev.dayaedu.com;`
  496. window.open(validOaUrl())
  497. }
  498. },
  499. watch: {
  500. resetVisible(val) {
  501. if (!val) {
  502. this.resetForm = {
  503. phone: "",
  504. authCode: "",
  505. password: "",
  506. password2: "",
  507. };
  508. }
  509. },
  510. },
  511. };
  512. </script>
  513. <style lang="scss" scoped>
  514. .navbar_tag {
  515. margin: 0 5px 8px;
  516. }
  517. .indexlayout-top-menu {
  518. padding-left: 57px;
  519. height: 76px;
  520. line-height: 76px;
  521. flex: 1;
  522. display: flex;
  523. overflow: hidden;
  524. /* overflow-x: auto; */
  525. .indexlayout-top-menu-li {
  526. display: table-cell;
  527. padding: 0 5px;
  528. height: 76px;
  529. text-decoration: none;
  530. color: #f2f2f2;
  531. font-size: 16px;
  532. transition: all 0.3s ease;
  533. span {
  534. // display: block;
  535. transition: all 0.3s ease;
  536. // padding: 10px 20px;
  537. padding: 8px 20px 3px;
  538. }
  539. &:hover,
  540. &.active {
  541. span {
  542. font-weight: 500;
  543. // border-radius: 6px;
  544. }
  545. }
  546. // &.active span {
  547. // font-weight: bold;
  548. // }
  549. }
  550. .breadcrumb {
  551. line-height: 76px;
  552. margin-left: 10px;
  553. .el-breadcrumb__item {
  554. display: inline-block;
  555. float: none;
  556. }
  557. }
  558. }
  559. .popover-container {
  560. max-height: 350px;
  561. overflow-y: scroll;
  562. }
  563. .navbar {
  564. display: flex;
  565. flex-direction: row;
  566. justify-content: space-between;
  567. height: 76px;
  568. overflow: hidden;
  569. position: relative;
  570. z-index: 2000;
  571. box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.1);
  572. h2 {
  573. font-size: 18px;
  574. line-height: 76px;
  575. margin: 0 0 0 30px;
  576. display: inline-block;
  577. }
  578. .hamburger-container {
  579. line-height: 76px;
  580. height: 100%;
  581. float: left;
  582. cursor: pointer;
  583. transition: background 0.3s;
  584. -webkit-tap-highlight-color: transparent;
  585. &:hover {
  586. background: rgba(0, 0, 0, 0.025);
  587. }
  588. }
  589. .breadcrumb-container {
  590. float: left;
  591. }
  592. .left-menu {
  593. line-height: 76px;
  594. // padding-right: 22px;
  595. font-size: 16px;
  596. .topIcon {
  597. width: 20px;
  598. height: 25px;
  599. }
  600. }
  601. .right-menu {
  602. min-width: 154px;
  603. float: right;
  604. height: 100%;
  605. line-height: 76px;
  606. display: flex;
  607. flex-direction: row;
  608. justify-content: flex-start;
  609. &:focus {
  610. outline: none;
  611. }
  612. .msginfo.ins {
  613. img {
  614. width: 18px;
  615. height: 23px;
  616. }
  617. }
  618. .msginfo {
  619. display: flex;
  620. flex-direction: row;
  621. justify-content: flex-start;
  622. align-items: center;
  623. padding: 0 12px;
  624. position: relative;
  625. cursor: pointer;
  626. img {
  627. width: 24px;
  628. height: 24px;
  629. }
  630. .active {
  631. position: absolute;
  632. width: 7px;
  633. height: 7px;
  634. background-color: #f97215;
  635. border-radius: 50%;
  636. top: 20px;
  637. right: -4px;
  638. }
  639. }
  640. .right-menu-item {
  641. display: inline-block;
  642. padding: 0 8px;
  643. height: 100%;
  644. font-size: 14px;
  645. color: #5a5e66;
  646. vertical-align: text-bottom;
  647. &.hover-effect {
  648. cursor: pointer;
  649. transition: background 0.3s;
  650. &:hover {
  651. background: rgba(0, 0, 0, 0.025);
  652. }
  653. }
  654. }
  655. .avatar-container {
  656. height: 76px;
  657. margin-right: 42px;
  658. cursor: pointer;
  659. .avatar-wrapper {
  660. position: relative;
  661. display: flex;
  662. flex-direction: row;
  663. justify-content: flex-start;
  664. align-items: center;
  665. span {
  666. margin-left: 8px;
  667. font-size: 14px;
  668. font-weight: 500;
  669. // color: rgba(68, 68, 68, 1);
  670. color: #fff;
  671. }
  672. .user-avatar {
  673. cursor: pointer;
  674. width: 32px;
  675. height: 32px;
  676. border: 2px solid #f0f2f5;
  677. border-radius: 50%;
  678. }
  679. .el-icon-caret-bottom {
  680. cursor: pointer;
  681. position: absolute;
  682. right: -20px;
  683. top: 25px;
  684. font-size: 14px;
  685. }
  686. }
  687. }
  688. }
  689. }
  690. .user-dropdown {
  691. width: 258px;
  692. padding-top: 0 !important;
  693. box-shadow: 0px 2px 13px 0px rgba(0, 0, 0, 0.05);
  694. /deep/.popper__arrow {
  695. border-bottom-color: var(--color-primary) !important;
  696. &::after {
  697. border-bottom-color: var(--color-primary) !important;
  698. }
  699. }
  700. .drop_userInfo {
  701. background-color: var(--color-primary);
  702. height: 64px;
  703. color: #fff;
  704. padding: 0 12px;
  705. border-radius: 4px 4px 0 0;
  706. display: flex;
  707. align-items: center;
  708. .avatar-wrapper {
  709. display: flex;
  710. align-items: center;
  711. background: url("../../assets/images/user_tips.png") no-repeat right center;
  712. background-size: 45%;
  713. width: 100%;
  714. .user-avatar {
  715. width: 38px;
  716. height: 38px;
  717. border-radius: 50%;
  718. margin-right: 10px;
  719. }
  720. }
  721. }
  722. .tenantService {
  723. border-bottom: 1px solid #E5E5E5;
  724. padding: 18px 17px 12px;
  725. .serviceName {
  726. display: flex;
  727. align-items: center;
  728. justify-content: space-between;
  729. .name {
  730. font-size: 18px;
  731. font-weight: 600;
  732. color: var(--color-primary);
  733. line-height: 25px;
  734. width: 160px;
  735. overflow: hidden;
  736. text-overflow: ellipsis;
  737. white-space: nowrap;
  738. }
  739. .serviceRenew {
  740. width: 63px;
  741. height: 22px;
  742. background: linear-gradient(270deg, #FFC65E 0%, #FFE8A6 100%);
  743. border-radius: 11px;
  744. line-height: 22px;
  745. font-size: 11px;
  746. font-weight: 400;
  747. color: #981E13;
  748. text-align: center;
  749. cursor: pointer;
  750. }
  751. }
  752. .serviceTime {
  753. margin-top: 15px;
  754. font-size: 13px;
  755. font-weight: 400;
  756. color: #333333;
  757. line-height: 18px;
  758. }
  759. }
  760. .el-dropdown-menu__item {
  761. display: flex;
  762. align-items: center;
  763. // margin: 3px 17px;
  764. padding: 7px 17px;
  765. }
  766. .dropdown-text {
  767. display: block;
  768. width: 180px;
  769. overflow: hidden;
  770. text-overflow: ellipsis;
  771. white-space: nowrap;
  772. }
  773. }
  774. .right-position {
  775. display: flex;
  776. align-items: center;
  777. justify-content: center;
  778. height: 75px;
  779. }
  780. .sidebar-logo {
  781. margin-right: 8px;
  782. }
  783. .tenantName {
  784. font-size: 20px;
  785. font-family: PingFangSC-Semibold, PingFang SC;
  786. font-weight: 600;
  787. color: #FFFFFF;
  788. line-height: 28px;
  789. max-width: 150px;
  790. white-space: nowrap;
  791. text-overflow: ellipsis;
  792. overflow: hidden;
  793. }
  794. </style>