authRole.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  1. <script>
  2. import publicFunc from "@/utils/publicFunc";
  3. import { requireImg } from "@/utils/requireImg";
  4. export default {
  5. data() {
  6. const columns = [
  7. {
  8. title: "终端类型",
  9. dataIndex: "deviceType",
  10. },
  11. {
  12. title: "模块名称",
  13. dataIndex: "modelName",
  14. },
  15. {
  16. title: "功能权限",
  17. dataIndex: "functionAuth",
  18. },
  19. ];
  20. return {
  21. visible: {
  22. roleGroup: false,
  23. user: false,
  24. },
  25. inputName: "",
  26. columns,
  27. checkedObj: {
  28. groupChecked: "",
  29. systemChecked: "",
  30. },
  31. checkedUsers: [],
  32. userListGroup: [],
  33. systemModelCollection: {},
  34. roleListData: [
  35. {
  36. id: publicFunc.buildGuid("group"),
  37. label: "普通员工角色组",
  38. type: "group",
  39. },
  40. ],
  41. systemListData: [
  42. {
  43. id: publicFunc.buildGuid("system"),
  44. label: "空间管理系统",
  45. type: "system",
  46. modelList: [
  47. {
  48. id: publicFunc.buildGuid("system"),
  49. deviceType: "PC",
  50. modelName: "智能看板",
  51. functionAuth: "信息查看,组织添加,人员更新,人员删除",
  52. },
  53. {
  54. id: publicFunc.buildGuid("system"),
  55. deviceType: "PC",
  56. modelName: "智享生活",
  57. functionAuth: "全部功能",
  58. },
  59. {
  60. id: publicFunc.buildGuid("system"),
  61. deviceType: "PC",
  62. modelName: "数智双探",
  63. functionAuth: "全部功能",
  64. },
  65. {
  66. id: publicFunc.buildGuid("system"),
  67. deviceType: "移动端",
  68. modelName: "智慧安防",
  69. functionAuth: "信息查看,组织添加,人员更新,人员删除",
  70. },
  71. ],
  72. },
  73. {
  74. id: publicFunc.buildGuid("system"),
  75. type: "system",
  76. label: "停车管理系统",
  77. modelList: [
  78. {
  79. id: publicFunc.buildGuid("system"),
  80. deviceType: "PC",
  81. modelName: "智能看板",
  82. functionAuth: "信息查看,组织添加,人员更新,人员删除",
  83. },
  84. {
  85. id: publicFunc.buildGuid("system"),
  86. deviceType: "PC",
  87. modelName: "智享生活",
  88. functionAuth: "信息查看,组织添加,人员更新,人员删除",
  89. },
  90. {
  91. id: publicFunc.buildGuid("system"),
  92. deviceType: "移动端",
  93. modelName: "智慧安防",
  94. functionAuth: "全部功能",
  95. },
  96. ],
  97. },
  98. {
  99. id: publicFunc.buildGuid("system"),
  100. type: "system",
  101. label: "能源管理系统",
  102. modelList: [
  103. {
  104. id: publicFunc.buildGuid("system"),
  105. deviceType: "PC",
  106. modelName: "智能看板",
  107. functionAuth: "全部功能",
  108. },
  109. {
  110. id: publicFunc.buildGuid("system"),
  111. deviceType: "PC",
  112. modelName: "智享生活",
  113. },
  114. {
  115. id: publicFunc.buildGuid("system"),
  116. deviceType: "移动端",
  117. modelName: "智慧安防",
  118. functionAuth: "全部功能",
  119. },
  120. {
  121. id: publicFunc.buildGuid("system"),
  122. deviceType: "移动端",
  123. modelName: "智慧安防",
  124. functionAuth: "全部功能",
  125. },
  126. ],
  127. },
  128. {
  129. id: publicFunc.buildGuid("system"),
  130. type: "system",
  131. label: "中枢",
  132. modelList: [
  133. {
  134. id: publicFunc.buildGuid("system"),
  135. deviceType: "PC",
  136. modelName: "智享生活",
  137. functionAuth: "全部功能",
  138. },
  139. {
  140. id: publicFunc.buildGuid("system"),
  141. deviceType: "移动端",
  142. modelName: "智慧安防",
  143. functionAuth: "全部功能",
  144. },
  145. ],
  146. },
  147. ],
  148. userListData: [
  149. {
  150. id: publicFunc.buildGuid("user"),
  151. label: "超级管理员",
  152. type: "user",
  153. },
  154. {
  155. id: publicFunc.buildGuid("user"),
  156. label: "普通管理员",
  157. type: "user",
  158. },
  159. {
  160. id: publicFunc.buildGuid("user"),
  161. label: "决策组",
  162. type: "user",
  163. },
  164. {
  165. id: publicFunc.buildGuid("user"),
  166. label: "普通用户",
  167. type: "user",
  168. },
  169. ],
  170. tableData: [],
  171. // 选中后添加的角色权限组
  172. addedRoleMap: new Map(),
  173. addedRoleArr: [],
  174. // 树选择
  175. treeData: [
  176. {
  177. title: "中讯邮电咨询设计院",
  178. value: "中讯邮电咨询设计院",
  179. key: publicFunc.buildGuid("unit"),
  180. children: [
  181. {
  182. title: "智网研究院",
  183. value: "智网研究院",
  184. key: publicFunc.buildGuid("department"),
  185. children: [
  186. {
  187. title: "Alice [普通VIP组]",
  188. value: "Alice [普通VIP组]",
  189. key: publicFunc.buildGuid("name"),
  190. children: [],
  191. },
  192. ],
  193. },
  194. ],
  195. },
  196. {
  197. title: "北京电信规划设计院",
  198. value: "北京电信规划设计院",
  199. key: publicFunc.buildGuid("unit"),
  200. children: [
  201. {
  202. title: "销售部",
  203. value: "销售部",
  204. key: publicFunc.buildGuid("department"),
  205. children: [
  206. {
  207. title: "Linda [超级VIP组]",
  208. value: "Linda [超级VIP组]",
  209. key: publicFunc.buildGuid("name"),
  210. children: [],
  211. },
  212. ],
  213. },
  214. ],
  215. },
  216. {
  217. title: "创新产品研发中心",
  218. value: "创新产品研发中心",
  219. key: publicFunc.buildGuid("unit"),
  220. children: [
  221. {
  222. title: "市场部",
  223. value: "市场部",
  224. key: publicFunc.buildGuid("department"),
  225. children: [
  226. {
  227. title: "Jacob [超级VIP组]",
  228. value: "Jacob [超级VIP组]",
  229. key: publicFunc.buildGuid("name"),
  230. children: [],
  231. },
  232. ],
  233. },
  234. ],
  235. },
  236. ],
  237. value: undefined,
  238. };
  239. },
  240. created() {
  241. this.initData();
  242. },
  243. mounted() {
  244. // this.initRoleData();
  245. },
  246. watch: {
  247. checkedObj: {
  248. handler(value) {
  249. if (value.groupChecked != "" && value.systemChecked != "") {
  250. // 显示右侧的权限列表数据
  251. this.tableData = [];
  252. this.systemListData.forEach((v) => {
  253. if (v.label === value.systemChecked) {
  254. v.modelList.forEach((ele) => {
  255. this.tableData.push({
  256. key: ele.id,
  257. deviceType: ele.deviceType || "--",
  258. modelName: ele.modelName || "--",
  259. functionAuth: ele.functionAuth || "--",
  260. });
  261. });
  262. }
  263. });
  264. if (
  265. this.addedRoleMap.has(
  266. `${value.groupChecked}-${value.systemChecked}`
  267. )
  268. ) {
  269. this.checkedUsers = this.addedRoleMap.get(
  270. `${value.groupChecked}-${value.systemChecked}`
  271. );
  272. } else {
  273. this.checkedUsers = [];
  274. }
  275. }
  276. },
  277. deep: true,
  278. // immediate: true,
  279. },
  280. checkedUsers(data) {
  281. if (
  282. this.checkedObj.groupChecked != "" &&
  283. this.checkedObj.systemChecked != ""
  284. ) {
  285. // group-system,作为key单独存
  286. this.addedRoleMap.set(
  287. `${this.checkedObj.groupChecked}-${this.checkedObj.systemChecked}`,
  288. data
  289. );
  290. this.addedRoleArr = [];
  291. if (data.length > 0) {
  292. this.addedRoleMap.forEach((v, i) => {
  293. v.forEach((ele, index) => {
  294. this.addedRoleArr.push({
  295. id: publicFunc.buildGuid("checked"),
  296. group: i.split("-")[0],
  297. system: i.split("-")[1],
  298. role: ele,
  299. modelName: this.systemModelCollection[i.split("-")[1]],
  300. });
  301. });
  302. });
  303. }
  304. }
  305. },
  306. },
  307. methods: {
  308. requireImg,
  309. groupClick(data) {
  310. this.checkedObj.groupChecked = data;
  311. },
  312. systemClick(data) {
  313. this.checkedObj.systemChecked = data;
  314. },
  315. // 删除添加的角色权限组列
  316. deleteEvent(data) {
  317. let targetArr = this.addedRoleMap
  318. .get(`${data.group}-${data.system}`)
  319. .filter((v) => {
  320. return v !== data.role;
  321. });
  322. // 删除后该系统还有别的角色
  323. if (targetArr.length > 0) {
  324. this.addedRoleMap.set(`${data.group}-${data.system}`, targetArr);
  325. // 同步配置权限列表
  326. this.checkedUsers = this.addedRoleMap.get(
  327. `${this.checkedObj.groupChecked}-${this.checkedObj.systemChecked}`
  328. );
  329. } else {
  330. // 删除全部角色
  331. this.addedRoleMap.delete(`${data.group}-${data.system}`);
  332. this.checkedObj.groupChecked = "";
  333. this.checkedObj.systemChecked = "";
  334. this.checkedUsers = [];
  335. }
  336. this.addedRoleArr = this.addedRoleArr.filter((v) => {
  337. return v.id !== data.id;
  338. });
  339. },
  340. initData() {
  341. // 获取key及其对应的数据
  342. this.userListGroup = this.userListData.map((v) => {
  343. // this.systemDictObj[v.label] = v.id;
  344. return {
  345. content: v.label,
  346. value: v.label,
  347. };
  348. });
  349. this.systemListData.forEach((v) => {
  350. let data = v.modelList.map((ele) => {
  351. return `[${ele.modelName}]`;
  352. });
  353. this.systemModelCollection[v.label] = data.join(" ");
  354. });
  355. },
  356. onChange(checkedValues) {
  357. console.log(checkedValues);
  358. },
  359. // 打开新建角色权限组对话框
  360. createRoleDialog() {
  361. this.visible.roleGroup = true;
  362. console.log("添加角色权限组");
  363. },
  364. // 打开添加用户对话框
  365. createUserDialog() {
  366. this.visible.user = true;
  367. console.log("添加用户事件");
  368. },
  369. addRoleGroupEvent() {
  370. console.log("保存新建的角色权限组");
  371. this.visible.roleGroup = false;
  372. },
  373. addUserEvent() {
  374. this.visible.user = false;
  375. },
  376. onTreeSelectChange() {},
  377. onTreeSearch() {},
  378. cancelEvent() {},
  379. confirmEvent() {},
  380. },
  381. };
  382. </script>
  383. <template>
  384. <div class="auth-role">
  385. <div class="auth-role-title">配置权限</div>
  386. <div class="auth-role-content">
  387. <div class="auth-role-content-innerbox">
  388. <div class="left-box">
  389. <div class="left-box-inner">
  390. <div class="left-box-inner-list">
  391. <div class="add-role-group-box">
  392. <div class="add-role-group-btn" @click="createRoleDialog">
  393. 新建角色权限组
  394. </div>
  395. <a-modal
  396. v-model="visible.roleGroup"
  397. title="新建角色权限组"
  398. @ok="addRoleGroupEvent"
  399. >
  400. <div class="dialog-content">
  401. <div class="dialog-content-title">组名:</div>
  402. <div class="dialog-content-input">
  403. <a-input
  404. placeholder="请输入名称"
  405. v-model="inputName"
  406. ></a-input>
  407. </div>
  408. </div>
  409. <!-- 组名:<a-input
  410. placeholder="请输入名称"
  411. v-model="inputName"
  412. ></a-input> -->
  413. </a-modal>
  414. </div>
  415. <div
  416. class="left-box-inner-list-item"
  417. v-for="item in roleListData"
  418. :key="item.id"
  419. :class="{ active: checkedObj.groupChecked === item.label }"
  420. @click="groupClick(item.label)"
  421. >
  422. <img
  423. v-if="checkedObj.groupChecked === item.label"
  424. :src="requireImg('auth/group_blue.png')"
  425. class="icon-img"
  426. />
  427. <img
  428. v-else
  429. :src="requireImg('auth/group_gray.png')"
  430. class="icon-img"
  431. />
  432. <div class="text">{{ item.label }}</div>
  433. </div>
  434. </div>
  435. <div class="left-box-inner-list">
  436. <div
  437. class="left-box-inner-list-item"
  438. v-for="item in systemListData"
  439. :key="item.id"
  440. :class="{ active: checkedObj.systemChecked === item.label }"
  441. @click="systemClick(item.label)"
  442. >
  443. <img
  444. class="icon-img"
  445. v-if="checkedObj.systemChecked === item.label"
  446. :src="requireImg('auth/system_blue.png')"
  447. />
  448. <img
  449. class="icon-img"
  450. v-else
  451. :src="requireImg('auth/system_gray.png')"
  452. />
  453. <div class="text">{{ item.label }}</div>
  454. </div>
  455. </div>
  456. <div class="left-box-inner-list">
  457. <a-checkbox-group
  458. :options="userListGroup"
  459. v-model="checkedUsers"
  460. @change="onChange"
  461. >
  462. <template #label="value">
  463. <img
  464. v-if="checkedUsers.includes(value.content)"
  465. :src="requireImg('auth/role_blue.png')"
  466. class="icon-img"
  467. />
  468. <img
  469. v-else
  470. :src="requireImg('auth/role_gray.png')"
  471. class="icon-img"
  472. />
  473. <span
  474. :style="{
  475. color: checkedUsers.includes(value.content)
  476. ? '#66beff'
  477. : '#7f7f7f',
  478. }"
  479. >{{ value.content }}</span
  480. >
  481. </template>
  482. </a-checkbox-group>
  483. </div>
  484. </div>
  485. </div>
  486. <div class="right-box">
  487. <div class="title">权限列表</div>
  488. <a-table
  489. :data-source="tableData"
  490. :columns="columns"
  491. :scroll="{ y: 230 }"
  492. bordered
  493. ></a-table>
  494. </div>
  495. </div>
  496. </div>
  497. <div class="auth-role-infolist">
  498. <div class="auth-role-infolist-inner">
  499. <div
  500. class="auth-role-infolist-inner-item"
  501. v-for="item in addedRoleArr"
  502. :key="item.id"
  503. >
  504. <div class="left-content">
  505. <a-breadcrumb separator=">">
  506. <a-breadcrumb-item>
  507. <img
  508. :src="requireImg('auth/group_blue.png')"
  509. class="icon-img"
  510. />
  511. <span class="selected-item">{{ item.group }}</span>
  512. </a-breadcrumb-item>
  513. <a-breadcrumb-item>
  514. <img
  515. :src="requireImg('auth/system_blue.png')"
  516. class="icon-img"
  517. />
  518. <span class="selected-item">{{ item.system }}</span>
  519. </a-breadcrumb-item>
  520. <a-breadcrumb-item>
  521. <img :src="requireImg('auth/role_blue.png')" class="icon-img" />
  522. <span class="selected-item">{{ item.role }}</span>
  523. </a-breadcrumb-item>
  524. <a-breadcrumb-item>
  525. <span class="selected-item" style="color: #7f7f7f">{{
  526. item.modelName
  527. }}</span>
  528. </a-breadcrumb-item>
  529. </a-breadcrumb>
  530. </div>
  531. <div class="close-btn" @click="deleteEvent(item)"></div>
  532. </div>
  533. </div>
  534. </div>
  535. <div class="auth-role-select">
  536. <div class="auth-role-select-inner">
  537. <div class="top-section">
  538. <div class="top-section-inner">
  539. <div class="top-section-inner-title">选择人员</div>
  540. <div class="top-section-inner-select">
  541. <a-tree-select
  542. show-search
  543. v-model="value"
  544. multiple
  545. :dropdown-style="{ maxHeight: '200px', overflow: 'auto' }"
  546. placeholder="请选择查询内容"
  547. style="width: 100%"
  548. tree-checkable
  549. allow-clear
  550. :tree-data="treeData"
  551. tree-default-expand-all
  552. ></a-tree-select>
  553. </div>
  554. <div class="top-section-inner-button">
  555. <div class="add-user-btn" @click="createUserDialog">
  556. <div class="add-user-btn-icon"><div class="img"></div></div>
  557. <div class="add-user-btn-text">添加用户</div>
  558. </div>
  559. <a-modal
  560. v-model="visible.user"
  561. title="添加用户"
  562. @ok="addUserEvent"
  563. ></a-modal>
  564. </div>
  565. </div>
  566. </div>
  567. <div class="bottom-section">
  568. <div class="bottom-section-extra-box"></div>
  569. </div>
  570. </div>
  571. </div>
  572. <div class="auth-role-footer">
  573. <div class="auth-role-footer-inner">
  574. <div class="cancel-btn" @click="cancelEvent">取消</div>
  575. <div class="confirm-btn" @click="confirmEvent">确认</div>
  576. </div>
  577. </div>
  578. </div>
  579. </template>
  580. <style lang="less" scoped>
  581. @fontDefaultColor: #7f7f7f;
  582. @fontColor: #66beff;
  583. .ant-modal-body {
  584. .dialog-content {
  585. width: 100%;
  586. height: 100%;
  587. display: flex;
  588. align-items: center;
  589. &-title {
  590. width: 20%;
  591. height: 100%;
  592. display: flex;
  593. align-items: center;
  594. justify-content: center;
  595. font-size: 16px;
  596. }
  597. &-input {
  598. width: 75%;
  599. height: 100%;
  600. display: flex;
  601. align-items: center;
  602. justify-content: center;
  603. }
  604. }
  605. }
  606. .auth-role {
  607. width: 100%;
  608. height: 100%;
  609. background: #fff;
  610. border-radius: 4px;
  611. &-title {
  612. width: 100%;
  613. height: 5%;
  614. // background: rgba(200, 200, 255, 0.5);
  615. display: flex;
  616. align-items: center;
  617. justify-content: flex-start;
  618. font-size: 16px;
  619. font-weight: bold;
  620. text-indent: 30px;
  621. }
  622. &-content {
  623. width: 100%;
  624. height: 50%;
  625. display: flex;
  626. align-items: center;
  627. justify-content: center;
  628. &-innerbox {
  629. background: #fafafa;
  630. width: calc(96% - 5px);
  631. height: calc(100% - 5px);
  632. border: 1px solid rgba(240, 241, 242, 0.3);
  633. display: flex;
  634. align-items: center;
  635. justify-content: space-around;
  636. .left-box {
  637. height: 100%;
  638. width: 50%;
  639. display: flex;
  640. align-items: center;
  641. justify-content: center;
  642. &-inner {
  643. width: calc(100% - 2px);
  644. height: calc(100% - 10px);
  645. display: flex;
  646. align-items: center;
  647. justify-content: space-around;
  648. &-list {
  649. height: 100%;
  650. width: 32%;
  651. border: 1px solid #f0f1f2;
  652. background: #fff;
  653. overflow: auto;
  654. position: relative;
  655. .ant-checkbox-group {
  656. display: flex;
  657. flex-direction: column;
  658. /deep/ .ant-checkbox-group-item {
  659. width: 100%;
  660. height: 40px;
  661. display: flex;
  662. align-items: center;
  663. margin-bottom: 10px;
  664. // background: rgba(100, 100, 150, 0.2);
  665. color: @fontDefaultColor;
  666. padding-left: 30px;
  667. .icon-img {
  668. width: 19.5px;
  669. height: 19.5px;
  670. margin-left: 10px;
  671. margin-right: 10px;
  672. }
  673. }
  674. }
  675. .add-role-group-box {
  676. position: absolute;
  677. bottom: 10px;
  678. width: 100%;
  679. height: 40px;
  680. display: flex;
  681. align-items: center;
  682. justify-content: center;
  683. .add-role-group-btn {
  684. position: absolute;
  685. bottom: 5px;
  686. width: 150px;
  687. height: 25px;
  688. background: #2ea8e6;
  689. color: #fff;
  690. border-radius: 5px;
  691. display: flex;
  692. align-items: center;
  693. justify-content: center;
  694. cursor: pointer;
  695. }
  696. }
  697. &-item {
  698. width: 100%;
  699. height: 40px;
  700. padding-left: 10px;
  701. color: @fontDefaultColor;
  702. display: flex;
  703. align-items: center;
  704. margin-bottom: 10px;
  705. cursor: pointer;
  706. .icon-img {
  707. width: 22px;
  708. height: 22px;
  709. margin-left: 10px;
  710. margin-right: 10px;
  711. }
  712. &.active {
  713. background: rgb(224, 239, 250, 0.8);
  714. color: @fontColor;
  715. }
  716. .text {
  717. width: calc(100% - 35px);
  718. height: 40px;
  719. display: flex;
  720. align-items: center;
  721. justify-content: flex-start;
  722. }
  723. }
  724. }
  725. }
  726. }
  727. .right-box {
  728. height: 100%;
  729. width: 45%;
  730. // background: rgb(255, 165, 0, 0.1);
  731. .title {
  732. width: 100%;
  733. height: 12%;
  734. display: flex;
  735. align-items: center;
  736. justify-content: flex-start;
  737. font-weight: 400;
  738. font-size: 16px;
  739. }
  740. .table {
  741. width: 100%;
  742. height: 88%;
  743. display: flex;
  744. align-items: center;
  745. justify-content: center;
  746. }
  747. }
  748. }
  749. }
  750. &-infolist {
  751. width: 100%;
  752. height: 15%;
  753. display: flex;
  754. align-items: center;
  755. justify-content: center;
  756. margin-top: 10px;
  757. &-inner {
  758. background: #fafafa;
  759. width: calc(96% - 5px);
  760. height: calc(100% - 5px);
  761. border: 1px solid rgba(240, 241, 242, 0.3);
  762. overflow: auto;
  763. &-item {
  764. width: 100%;
  765. height: 40px;
  766. font-size: 16px;
  767. position: relative;
  768. .left-content {
  769. width: 60%;
  770. height: 40px;
  771. display: flex;
  772. align-items: center;
  773. position: absolute;
  774. left: 0;
  775. .selected-item {
  776. color: @fontColor;
  777. }
  778. .icon-img {
  779. width: 19.5px;
  780. height: 19.5px;
  781. margin-left: 10px;
  782. margin-right: 10px;
  783. }
  784. }
  785. .close-btn {
  786. position: absolute;
  787. top: 9px;
  788. right: 30px;
  789. width: 25px;
  790. height: 25px;
  791. display: flex;
  792. align-items: center;
  793. justify-content: center;
  794. cursor: pointer;
  795. background: url("@/assets/images/auth/close.png") no-repeat center;
  796. }
  797. }
  798. }
  799. }
  800. &-select {
  801. width: 100%;
  802. height: 19%;
  803. display: flex;
  804. align-items: center;
  805. justify-content: center;
  806. margin-top: 10px;
  807. &-inner {
  808. width: calc(96% - 5px);
  809. height: calc(100% - 10px);
  810. background: #fafafa;
  811. border: 1px solid rgba(240, 241, 242, 0.3);
  812. overflow: auto;
  813. .top-section {
  814. width: 100%;
  815. height: 30%;
  816. display: flex;
  817. align-items: center;
  818. justify-content: center;
  819. &-inner {
  820. height: 100%;
  821. width: 98%;
  822. display: flex;
  823. align-items: center;
  824. justify-content: center;
  825. &-title {
  826. width: 8%;
  827. height: 100%;
  828. display: flex;
  829. align-items: center;
  830. justify-content: center;
  831. }
  832. &-select {
  833. width: 82%;
  834. height: 100%;
  835. display: flex;
  836. align-items: center;
  837. }
  838. &-button {
  839. width: 10%;
  840. height: 100%;
  841. display: flex;
  842. align-items: center;
  843. justify-content: center;
  844. .add-user-btn {
  845. width: 70%;
  846. height: 100%;
  847. display: flex;
  848. align-items: center;
  849. justify-content: center;
  850. cursor: pointer;
  851. &-icon {
  852. width: 30%;
  853. height: 100%;
  854. display: flex;
  855. align-items: center;
  856. justify-content: center;
  857. .img {
  858. width: 22px;
  859. height: 22px;
  860. background: url("@/assets/images/auth/plus-square.png")
  861. no-repeat center;
  862. }
  863. }
  864. &-text {
  865. width: 70%;
  866. height: 100%;
  867. display: flex;
  868. align-items: center;
  869. justify-content: center;
  870. color: #2ea8e6;
  871. }
  872. }
  873. }
  874. }
  875. }
  876. .bottom-section {
  877. width: 100%;
  878. height: 70%;
  879. display: flex;
  880. align-items: center;
  881. justify-content: center;
  882. &-extra-box {
  883. background: #fff;
  884. width: calc(90% - 10px);
  885. height: calc(90% - 10px);
  886. border: 1px solid rgba(240, 241, 242, 0.3);
  887. }
  888. }
  889. }
  890. }
  891. &-footer {
  892. margin-top: 10px;
  893. width: 100%;
  894. height: 5%;
  895. display: flex;
  896. align-items: center;
  897. justify-content: center;
  898. &-inner {
  899. width: 20%;
  900. height: 100%;
  901. display: flex;
  902. align-items: center;
  903. justify-content: space-around;
  904. .cancel-btn,
  905. .confirm-btn {
  906. width: 80px;
  907. height: 25px;
  908. border-radius: 5px;
  909. display: flex;
  910. align-items: center;
  911. justify-content: center;
  912. cursor: pointer;
  913. color: #fff;
  914. }
  915. .cancel-btn {
  916. background: #b3b3b3;
  917. }
  918. .confirm-btn {
  919. background: #2ea8e6;
  920. }
  921. }
  922. }
  923. }
  924. </style>