authorityHome.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832
  1. <!--
  2. * @Author: your name
  3. * @Date: 2021-11-29 09:27:43
  4. * @LastEditTime: 2022-03-23 15:59:27
  5. * @LastEditors: your name
  6. * @Description: 权限管理
  7. * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\home.vue
  8. -->
  9. <template>
  10. <div class="authority-home">
  11. <!--状态和搜索-->
  12. <div class="authority-head flex">
  13. <div class="status flex-wrap">
  14. <div class="status1"><span class="icon"></span>应用权限项</div>
  15. <div class="status2"><span class="icon"></span>普通权限项</div>
  16. </div>
  17. <Search @getSearchData="getSearchData" @clearSearchData="clearSearchData" />
  18. </div>
  19. <!--权限树-->
  20. <!-- <div class="authority-content">
  21. <OrgTree :dataList="dataList" :renderContent="renderContent" />
  22. </div> -->
  23. <div class="authority-content">
  24. <!-- <OrgTree :dataList="dataList" :renderContent="renderContent" /> -->
  25. <el-row :gutter="24" class="bodyContent">
  26. <el-col :span="6" class="bodyPart">
  27. <div class="grid-content">
  28. <div class="title">权限树</div>
  29. <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" class="contentTree">
  30. <el-tree ref="tree" :data="dataListTree" :props="defaultProps" node-key="AuthId" :filter-node-method="filterNode" highlight-current :default-expanded-keys="expandedKeys" @node-expand="handleExpand" @node-collapse="handleCollapse" @node-click="handleNodeClick">
  31. </el-tree>
  32. </div>
  33. </div>
  34. </el-col>
  35. <el-col :span="18" class="bodyPart">
  36. <div class="grid-contentTop">
  37. <div class="title">当前</div>
  38. <div class="content">
  39. <template v-if="currDataArr.length">
  40. <el-row>
  41. <el-col :span="6" v-for="data in currDataArr" :key="data.AuthId">
  42. <div class="account-left-content-teams">
  43. <div class="team">
  44. <div class="bg" :class="data.Type == 1 || data.Type == 0 ? 'status1' : 'status2'"></div>
  45. <div class="list" :class="data.QueryTarget == 1 ? 'activeStatus' : ''">
  46. <div class="flex info">
  47. <div :title="data.AuthName" class="name">{{data.AuthName}}</div>
  48. <div class="icon">
  49. <el-tooltip effect="dark" content="新增应用" placement="bottom">
  50. <span v-if="data.Type === 0" @click="renderAdd()" class="cap cap-plus"></span>
  51. </el-tooltip>
  52. <el-tooltip effect="dark" content="修改应用" placement="bottom">
  53. <span v-if="data.Type === 1" @click="renderEdit(data)" class="cap cap-edit"></span>
  54. </el-tooltip>
  55. <el-tooltip v-is="['authtree_btn_add_auth']" effect="dark" content="新增权限项" placement="bottom">
  56. <span v-if="data.Type === 2" @click="renderSub(data)" class="cap cap-sub"></span>
  57. </el-tooltip>
  58. <el-tooltip v-is="['authtree_btn_update_auth']" effect="dark" content="编辑权限项" placement="bottom">
  59. <span v-if="data.Type > 2" @click="renderEdit(data)" class="cap cap-edit"></span>
  60. </el-tooltip>
  61. <el-tooltip v-is="['authtree_btn_add_auth']" effect="dark" content="新增权限项" placement="bottom">
  62. <span v-if="data.Type > 2" @click="renderSub(data)" class="cap cap-sub"></span>
  63. </el-tooltip>
  64. </div>
  65. </div>
  66. <div v-if="data.Type > 0" class="flex details">
  67. <div class="details-msg">状态:<span :class="data.Status === 1 ? 'success' : 'error'">{{data.Status === 1 ? '启用' : '禁用'}}</span></div>
  68. <div v-is="['authtree_btn_state_swatch']" class="details-info">
  69. <el-switch v-model="data.flag" @change="renderChange(data)" active-color="#6F81BC">
  70. </el-switch>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <div v-is="['authtree_btn_del_auth']">
  76. <div v-if="data.Type !== 0 && data.Type !== 2" @click="onNodeClick(data)" class="info-close">
  77. <i class="icon el-icon-close" :class="data.Type === 1 ? 'close1' : data.Type > 2 ? 'close2' : ''"></i>
  78. </div>
  79. </div>
  80. </div>
  81. </el-col>
  82. </el-row>
  83. </template>
  84. <template v-else>
  85. <el-empty :image-size="80" description="暂无数据"></el-empty>
  86. </template>
  87. </div>
  88. </div>
  89. <div class="grid-contentBottom">
  90. <div class="title">拥有权限</div>
  91. <div class="content">
  92. <template v-if="childrenData.length">
  93. <el-row :gutter="24">
  94. <el-col :span="6" v-for="(data,index) in childrenData" :key="data.AuthId">
  95. <div @click.stop="childrenClick(data)" class="account-left-content-teams">
  96. <div class="team">
  97. <div class="bg" :class="data.Type == 1 ? 'status1' : 'status2'"></div>
  98. <div class="list" :class="data.QueryTarget == 1 ? 'activeStatus' : ''">
  99. <div class="flex info">
  100. <div :title="data.AuthName" class="name">{{data.AuthName}}</div>
  101. <div class="icon">
  102. <el-tooltip effect="dark" content="新增应用" placement="bottom">
  103. <span v-if="data.Type === 0" @click.stop="renderAdd()" class="cap cap-plus"></span>
  104. </el-tooltip>
  105. <el-tooltip effect="dark" content="修改应用" placement="bottom">
  106. <span v-if="data.Type === 1" @click.stop="renderEdit(data)" class="cap cap-edit"></span>
  107. </el-tooltip>
  108. <el-tooltip v-is="['authtree_btn_add_auth']" effect="dark" content="新增权限项" placement="bottom">
  109. <span v-if="data.Type === 2" @click.stop="renderSub(data)" class="cap cap-sub"></span>
  110. </el-tooltip>
  111. <el-tooltip v-is="['authtree_btn_update_auth']" effect="dark" content="编辑权限项" placement="bottom">
  112. <span v-if="data.Type > 2" @click.stop="renderEdit(data)" class="cap cap-edit"></span>
  113. </el-tooltip>
  114. <el-tooltip v-is="['authtree_btn_add_auth']" effect="dark" content="新增权限项" placement="bottom">
  115. <span v-if="data.Type > 2" @click.stop="renderSub(data)" class="cap cap-sub"></span>
  116. </el-tooltip>
  117. </div>
  118. </div>
  119. <div v-if="data.Type > 0" class="flex details">
  120. <div class="details-msg">状态:<span :class="data.Status === 1 ? 'success' : 'error'">{{data.Status === 1 ? '启用' : '禁用'}}</span></div>
  121. <div v-is="['authtree_btn_state_swatch']" class="details-info">
  122. <el-switch v-model="data.flag" @click.stop.native @change="childrenRenderChange(data,index)" active-color="#6F81BC">
  123. </el-switch>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <div v-is="['authtree_btn_del_auth']">
  129. <div v-if="data.Type !== 0 && data.Type !== 2" @click.stop="onNodeClick(data)" class="info-close">
  130. <i class="icon el-icon-close" :class="data.Type === 1 ? 'close1' : data.Type > 2 ? 'close2' : ''"></i>
  131. </div>
  132. </div>
  133. <!-- <div v-if="data.Type !== 0 && data.Type !== 2" @click="onNodeClick(data)" class="info-close">
  134. <i class="icon el-icon-close" :class="data.Type === 1 ? 'close1' : data.Type > 2 ? 'close2' : ''"></i>
  135. </div> -->
  136. </div>
  137. </el-col>
  138. </el-row>
  139. </template>
  140. <template v-else>
  141. <el-empty :image-size="80" description="暂无数据"></el-empty>
  142. </template>
  143. </div>
  144. </div>
  145. </el-col>
  146. </el-row>
  147. </div>
  148. <!--删除弹框-->
  149. <Dialog :flag="flag">
  150. <div class="airportInfoDialog">
  151. <div class="title">删除{{ type === 1 ? '应用' : '权限' }}</div>
  152. <div class="content">是否确认删除{{ title }}?</div>
  153. <div class="foot right t30">
  154. <el-button size="medium" class="r24" @click="remove" type="danger">删除</el-button>
  155. <el-button size="medium" @click="flag = false">取消</el-button>
  156. </div>
  157. </div>
  158. </Dialog>
  159. </div>
  160. </template>
  161. <script>
  162. import OrgTree from '@/layout/components/OrgTree'
  163. import Search from '@/layout/components/Search'
  164. import Dialog from '@/layout/components/Dialog'
  165. import { UpdateAppStatus, UpdateAuthStatus, DeleteApp, DeleteAuth } from '@/api/apiAuthority'
  166. import treeData from '../minixs/treeData'
  167. export default {
  168. name: 'Authority',
  169. components: { OrgTree, Search, Dialog },
  170. mixins: [treeData],
  171. data () {
  172. return {
  173. dataIndex: 1,
  174. dataNum: 0,
  175. dataArr: [],
  176. type: null,
  177. title: '', //弹框title
  178. flag: false, //弹框开关
  179. dataId: null, //tree数据id
  180. dataUpId: null,
  181. currDataArr: [],
  182. childrenData: [],
  183. dataListTree: [],
  184. defaultProps: {
  185. children: "children",
  186. label: "AuthName",
  187. },
  188. currentKey: null,
  189. expandedKeys: [-1],
  190. initCurrentKeyStep: [false, false]
  191. }
  192. },
  193. created () {
  194. let keyWords = "";
  195. const treeEx = sessionStorage.getItem('authExpandedKeys');
  196. if (this.$route.query.keyWords) {
  197. keyWords = this.$route.query.keyWords;
  198. }
  199. if (treeEx) {
  200. this.expandedKeys = JSON.parse(treeEx);
  201. }
  202. this.getAuthTree(keyWords);
  203. },
  204. mounted () {
  205. this.initCurrentKeyStep.splice(1, 1, true)
  206. },
  207. watch: {
  208. dataList: {
  209. handler (val) {
  210. this.dataListTree = [];
  211. this.dataListTree.push(_.cloneDeep(val))
  212. },
  213. deep: true
  214. },
  215. currentKey: {
  216. handler (val) {
  217. if (typeof val !== 'number') {
  218. return
  219. }
  220. this.$nextTick(() => {
  221. this.$refs.tree.setCurrentKey(val)
  222. sessionStorage.setItem('authCurrentKey', val)
  223. this.setCards()
  224. })
  225. }
  226. },
  227. expandedKeys: {
  228. handler(arr) {
  229. sessionStorage.setItem('authExpandedKeys', JSON.stringify(arr))
  230. },
  231. deep: true
  232. },
  233. initCurrentKeyStep: {
  234. handler(arr) {
  235. if (arr.every(item => item)) {
  236. this.currentKey = parseInt(sessionStorage.getItem('authCurrentKey') ?? -1)
  237. }
  238. },
  239. deep: true
  240. }
  241. },
  242. methods: {
  243. //树点击
  244. handleNodeClick (data) {
  245. this.currentKey = data.AuthId
  246. },
  247. //下级卡片点击
  248. childrenClick (data) {
  249. this.currentKey = data.AuthId
  250. if (!this.expandedKeys.includes(this.currentKey)) {
  251. this.expandedKeys.push(this.currentKey)
  252. }
  253. // this.setCards()
  254. },
  255. // 根据选中节点获取卡片
  256. setCards() {
  257. this.currDataArr = this.decompose(this.dataArr, "AuthId", this.currentKey);
  258. this.childrenData = this.decompose(this.dataArr, "UpAuthId", this.currentKey);
  259. },
  260. // 节点展开
  261. handleExpand (obj) {
  262. this.expandedKeys.push(obj.AuthId)
  263. },
  264. // 节点收起
  265. handleCollapse (obj) {
  266. const { AuthId, children } = obj
  267. children.length && this.collapseChilren(children)
  268. this.expandedKeys = this.expandedKeys.filter(key => key !== AuthId)
  269. },
  270. // 收起子节点
  271. collapseChilren (children) {
  272. children.forEach(child => {
  273. const { AuthId, children } = child
  274. children.length && this.collapseChilren(children)
  275. this.expandedKeys = this.expandedKeys.filter(key => key !== AuthId)
  276. })
  277. },
  278. //下级切换状态
  279. childrenRenderChange (data, index) {
  280. const { AuthId, flag, Type, UpAuthId } = data
  281. this.dataUpId = UpAuthId
  282. const isChildren = true
  283. this.handleChange(AuthId, flag, Type, index, isChildren)
  284. },
  285. filterNode (value, data) {
  286. if (!value) return true;
  287. return data.AuthName.indexOf(value) !== -1;
  288. },
  289. // 添加应用
  290. renderAdd () {
  291. this.$router.push('/authority/appAdd')
  292. },
  293. // 修改权限
  294. renderEdit (data) {
  295. if (data.Type === 1) {
  296. this.$router.push({ path: '/authority/appEdit', query: { AuthId: data.AuthId, Status: data.Status, UpAuthId: data.UpAuthId } })
  297. } else if (data.Type > 2) {
  298. this.$router.push({ path: '/authority/editPower', query: { AuthId: data.AuthId, Status: data.Status, UpAuthId: data.UpAuthId } })
  299. }
  300. },
  301. // 权限树
  302. renderSub (data) {
  303. this.$router.push({ path: '/authority/addPower', query: { AuthId: data.AuthId, Status: data.Status, UpAuthId: data.UpAuthId } })
  304. },
  305. // 关闭开启
  306. renderChange (data) {
  307. const { AuthId, flag, Type, UpAuthId } = data
  308. this.dataUpId = UpAuthId
  309. this.handleChange(AuthId, flag, Type)
  310. },
  311. //删除
  312. remove () {
  313. if (this.type === 1) {
  314. this.deleteApp(this.dataId)
  315. } else {
  316. this.deleteAuth(this.dataId)
  317. }
  318. },
  319. //查询
  320. getSearchData (val) {
  321. if (val) {
  322. this.$router.replace({ path: '/authority', query: { keyWords: val } })
  323. } else if (this.$route.query) {
  324. this.$router.replace('/authority')
  325. }
  326. this.$refs.tree.filter(val);
  327. // this.getAuthTree(val)
  328. },
  329. //清除查询
  330. clearSearchData () {
  331. this.$router.replace('/authority')
  332. this.getAuthTree()
  333. },
  334. //节点关闭按钮点击
  335. onNodeClick (data) {
  336. this.flag = true
  337. this.dataId = data.AuthId
  338. this.dataUpId = data.UpAuthId
  339. this.title = data.AuthName
  340. this.type = data.Type
  341. },
  342. //获取指定数据
  343. decompose (value, key, id) {
  344. let data = _.cloneDeep(value);
  345. let arr = []
  346. for (let i = 0; i < data.length; i++) {
  347. if (data[i][key] == id) {
  348. arr.push(data[i])
  349. }
  350. }
  351. return arr
  352. },
  353. // 更改下级状态
  354. setChildrenStatus (id, flag) {
  355. this.dataArr.forEach(data => {
  356. if (data.UpAuthId === id) {
  357. data.Status = flag ? 1 : 0
  358. data.flag = flag
  359. this.setChildrenStatus(data.AuthId, flag)
  360. }
  361. })
  362. },
  363. //渲染节点
  364. // renderContent (h, data) {
  365. // return (
  366. // <div class="account-left-content-teams">
  367. // <div class="team">
  368. // <div class={[data.Type <= 1 ? 'status1' : 'status2', 'bg']}></div>
  369. // <div class={[data.QueryTarget == 1 ? 'activeStatus' : '', 'list']}>
  370. // <div class="flex info">
  371. // <div class="name">{data.AuthName}</div>
  372. // <div class="icon">
  373. // <span v-show={data.Type === 0} onClick={() => this.renderAdd()} class="cap cap-plus"></span>
  374. // <span v-show={data.Type === 1} onClick={() => this.renderEdit(data)} class="cap cap-edit"></span>
  375. // <span v-show={data.Type === 2} onClick={() => this.renderSub(data)} class="cap cap-sub"></span>
  376. // <span v-show={data.Type > 2} onClick={() => this.renderEdit(data)} class="cap cap-edit"></span>
  377. // <span v-show={data.Type > 2} onClick={() => this.renderSub(data)} class="cap cap-sub"></span>
  378. // </div>
  379. // </div>
  380. // <div v-show={data.Type > 0} class="flex details">
  381. // <div class="details-msg">状态:<span class={[data.Status === 1 ? 'success' : 'error']}>{data.Status === 1 ? '启用' : '禁用'}</span></div>
  382. // <div class="details-info">
  383. // <el-switch v-model={data.flag} onChange={() => this.renderChange(data)} active-color="#6F81BC">
  384. // </el-switch>
  385. // </div>
  386. // </div>
  387. // </div>
  388. // </div>
  389. // <div v-show={data.Type !== 0 && data.Type !== 2} onClick={() => this.onNodeClick(data)} class="info-close">
  390. // <i class={[data.Type === 1 ? 'close1' : data.Type > 2 ? 'close2' : '', 'icon', 'el-icon-close']}></i>
  391. // </div>
  392. // </div>
  393. // )
  394. // },
  395. //-----------获取数据------------
  396. //应用状态变更
  397. async handleChange (id, flag, type, index = 0, isChildren = false) {
  398. const Status = flag ? 1 : 0
  399. try {
  400. let res = null
  401. if (type === 1) {
  402. res = await UpdateAppStatus({
  403. AppId: id,
  404. Status: Status
  405. })
  406. } else {
  407. res = await UpdateAuthStatus({
  408. AuthId: id,
  409. AuthStatus: Status
  410. })
  411. }
  412. if (res.code === 0) {
  413. this.$message.success(res.message)
  414. // if (!isChildren) {
  415. // this.currDataArr[0].Status = Status
  416. // } else {
  417. // this.childrenData[index].Status = Status
  418. // }
  419. // this.dataArr.find(data => {
  420. // if (data.AuthId === id) {
  421. // data.Status = Status
  422. // data.flag = flag
  423. // return true
  424. // }
  425. // })
  426. // if (type !== 1) {
  427. // if (!isChildren) {
  428. // this.childrenData.forEach(data => {
  429. // data.Status = Status
  430. // data.flag = flag
  431. // })
  432. // }
  433. // this.setChildrenStatus(id, flag)
  434. // }
  435. this.initCurrentKeyStep.splice(0, 1, false)
  436. this.currentKey = null
  437. this.getAuthTree()
  438. } else {
  439. this.$message.error(res.message)
  440. if (!isChildren) {
  441. this.currDataArr[index].flag = !flag;
  442. } else {
  443. this.childrenData[index].flag = !flag;
  444. }
  445. }
  446. } catch (error) {
  447. console.log('出错了', error)
  448. if (!isChildren) {
  449. this.currDataArr[index].flag = !flag;
  450. } else {
  451. this.childrenData[index].flag = !flag;
  452. }
  453. }
  454. },
  455. //应用删除
  456. async deleteApp (id) {
  457. try {
  458. const res = await DeleteApp({
  459. AppId: id,
  460. })
  461. if (res.code === 0) {
  462. this.$message.success(res.message)
  463. this.flag = false
  464. this.initCurrentKeyStep.splice(0, 1, false)
  465. if (this.currentKey === id) {
  466. sessionStorage.setItem('authCurrentKey', this.dataUpId)
  467. } else {
  468. this.currentKey = null
  469. }
  470. this.getAuthTree()
  471. } else {
  472. this.flag = false
  473. this.$message.error(res.message)
  474. }
  475. } catch (error) {
  476. this.flag = false
  477. }
  478. },
  479. //权限项删除
  480. async deleteAuth (id) {
  481. try {
  482. const res = await DeleteAuth({
  483. AuthId: id,
  484. })
  485. if (res.code === 0) {
  486. this.$message.success(res.message || '成功')
  487. this.flag = false
  488. this.initCurrentKeyStep.splice(0, 1, false)
  489. if (this.currentKey === id) {
  490. sessionStorage.setItem('authCurrentKey', this.dataUpId)
  491. } else {
  492. this.currentKey = null
  493. }
  494. this.getAuthTree()
  495. } else {
  496. this.flag = false
  497. this.$message.error(res.message)
  498. }
  499. } catch (error) {
  500. this.flag = false
  501. }
  502. },
  503. }
  504. }
  505. </script>
  506. <style lang="scss" scoped>
  507. .authority-home {
  508. padding: 0 64px;
  509. overflow-x: auto;
  510. .authority-head {
  511. position: fixed;
  512. width: 100%;
  513. padding: 30px 64px;
  514. padding-left: 156px;
  515. left: 0;
  516. display: flex;
  517. flex-direction: row;
  518. justify-content: space-between;
  519. background: #f5f7fa;
  520. z-index: 100;
  521. .status {
  522. & > div {
  523. margin-right: 28px;
  524. .icon {
  525. width: 16px;
  526. height: 16px;
  527. background: #f3c45e;
  528. border-radius: 2px;
  529. display: inline-block;
  530. vertical-align: middle;
  531. margin-right: 10px;
  532. position: relative;
  533. top: -2px;
  534. }
  535. &:last-child {
  536. margin-right: 0;
  537. }
  538. }
  539. .status2 {
  540. .icon {
  541. background: #6f81bc;
  542. }
  543. }
  544. }
  545. }
  546. .authority-content {
  547. // margin-top: 34px;
  548. ::v-deep .orgTreeContent {
  549. padding-top: 110px;
  550. .account-left-content-teams {
  551. .status1 {
  552. background: #f3c45e;
  553. }
  554. .status2 {
  555. background: #6f81bc;
  556. }
  557. .activeStatus {
  558. background: #464960;
  559. .name,
  560. .details-msg,
  561. .success,
  562. .error {
  563. color: #fff;
  564. }
  565. }
  566. .list {
  567. .info {
  568. .name {
  569. max-width: 100px;
  570. white-space: nowrap;
  571. overflow: hidden;
  572. text-overflow: ellipsis;
  573. }
  574. }
  575. }
  576. }
  577. }
  578. }
  579. .authority-content {
  580. padding-top: 110px;
  581. height: calc(100vh - 166px);
  582. box-sizing: border-box;
  583. .bodyContent {
  584. height: 100%;
  585. .bodyPart {
  586. height: 100%;
  587. display: flex;
  588. flex-direction: column;
  589. justify-content: space-between;
  590. }
  591. }
  592. .account-left-content-teams {
  593. position: relative;
  594. margin-top: 24px;
  595. .info-close {
  596. position: absolute;
  597. width: 24px;
  598. height: 24px;
  599. line-height: 24px;
  600. text-align: center;
  601. background: #000000;
  602. border-radius: 50%;
  603. top: -12px;
  604. right: -12px;
  605. z-index: 5;
  606. cursor: pointer;
  607. .icon {
  608. color: #fff;
  609. font-weight: 600;
  610. }
  611. }
  612. .list {
  613. background-color: #f5f7fa;
  614. .info {
  615. line-height: normal;
  616. margin-bottom: 37px;
  617. .name {
  618. font-size: 16px;
  619. font-weight: bold;
  620. max-width: 120px;
  621. white-space: nowrap;
  622. overflow: hidden;
  623. text-overflow: ellipsis;
  624. }
  625. .cap {
  626. width: 24px;
  627. height: 24px;
  628. display: inline-block;
  629. background-repeat: no-repeat;
  630. background-size: cover;
  631. transition: all 0.3s;
  632. margin-left: 16px;
  633. &:first-child {
  634. margin-right: 0;
  635. }
  636. }
  637. .cap-plus {
  638. background-image: url("../../../assets/status/ic_plus.png");
  639. &:hover {
  640. background-image: url("../../../assets/status/ic_plus_hovar.png");
  641. }
  642. }
  643. .cap-edit {
  644. background-image: url("../../../assets/status/ic_edit.png");
  645. &:hover {
  646. background-image: url("../../../assets/status/ic_edit_hovar.png");
  647. }
  648. }
  649. .cap-sub {
  650. background-image: url("../../../assets/status/ic_subordinate.png");
  651. &:hover {
  652. background-image: url("../../../assets/status/ic_subordinate_hovar.png");
  653. }
  654. }
  655. .cap-job {
  656. background-image: url("../../../assets/status/ic_jobs.png");
  657. &:hover {
  658. background-image: url("../../../assets/status/ic_jobs_hovar.png");
  659. }
  660. }
  661. .cap-member {
  662. background-image: url("../../../assets/status/ic_member.png");
  663. &:hover {
  664. background-image: url("../../../assets/status/ic_member_hovar.png");
  665. }
  666. }
  667. }
  668. }
  669. .team {
  670. background: #fff;
  671. border-radius: 5%;
  672. box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
  673. overflow: hidden;
  674. .bg {
  675. height: 4px;
  676. background: #6f81bc;
  677. }
  678. .status1 {
  679. background: #f3c45e;
  680. }
  681. .status2 {
  682. background: #6f81bc;
  683. }
  684. }
  685. .list {
  686. padding: 23px 24px;
  687. position: relative;
  688. min-width: 240px;
  689. min-height: 118px;
  690. .info {
  691. margin-bottom: 20px;
  692. .info-avoutr {
  693. display: flex;
  694. .avoutr {
  695. width: 40px;
  696. height: 40px;
  697. border-radius: 50%;
  698. background: #303133;
  699. img {
  700. max-width: 100%;
  701. }
  702. }
  703. .msg {
  704. margin-left: 20px;
  705. p {
  706. margin: 0;
  707. padding: 0;
  708. height: 20px;
  709. line-height: 20px;
  710. }
  711. .name {
  712. font-weight: bold;
  713. color: #303133;
  714. font-size: 18px;
  715. margin-bottom: 8px;
  716. }
  717. .group {
  718. font-size: 14px;
  719. font-family: Microsoft YaHei;
  720. font-weight: 400;
  721. color: #303133;
  722. }
  723. }
  724. }
  725. .icon {
  726. font-size: 16px;
  727. cursor: pointer;
  728. }
  729. }
  730. .time,
  731. .ip {
  732. height: 16px;
  733. line-height: 16px;
  734. font-size: 16px;
  735. .glr {
  736. color: #909399;
  737. }
  738. }
  739. .ip {
  740. margin-top: 23px;
  741. margin-bottom: 38px;
  742. }
  743. .details {
  744. height: 24px;
  745. line-height: 24px;
  746. .success {
  747. color: #6f80bc;
  748. }
  749. .error {
  750. color: #f25555;
  751. }
  752. }
  753. }
  754. }
  755. .grid-content {
  756. width: 100%;
  757. height: 100%;
  758. background: #ffffff;
  759. border-radius: 16px;
  760. .title {
  761. font-size: 18px;
  762. font-family: Microsoft YaHei;
  763. font-weight: bold;
  764. color: #303133;
  765. height: 40px;
  766. padding: 30px;
  767. }
  768. .contentTree {
  769. height: calc(100% - 60px);
  770. overflow: auto;
  771. padding: 20px;
  772. }
  773. }
  774. .grid-contentTop {
  775. width: 100%;
  776. height: 240px;
  777. background: #ffffff;
  778. border-radius: 16px;
  779. .title {
  780. font-size: 18px;
  781. font-family: Microsoft YaHei;
  782. font-weight: bold;
  783. color: #303133;
  784. height: 40px;
  785. padding: 30px;
  786. }
  787. .content {
  788. width: 100%;
  789. height: calc(100% - 60px);
  790. padding: 0 20px;
  791. }
  792. }
  793. .grid-contentBottom {
  794. width: 100%;
  795. height: calc(100% - 240px - 24px);
  796. background: #ffffff;
  797. border-radius: 16px;
  798. .title {
  799. font-size: 18px;
  800. font-family: Microsoft YaHei;
  801. font-weight: bold;
  802. color: #303133;
  803. height: 40px;
  804. padding: 30px;
  805. }
  806. .content {
  807. width: 100%;
  808. height: calc(100% - 60px);
  809. padding: 0 20px;
  810. overflow-y: auto;
  811. }
  812. }
  813. }
  814. }
  815. ::-webkit-scrollbar-track-piece {
  816. background: #d3dce6;
  817. }
  818. ::-webkit-scrollbar {
  819. width: 6px;
  820. }
  821. ::-webkit-scrollbar-thumb {
  822. background: #99a9bf;
  823. border-radius: 20px;
  824. }
  825. </style>