authorityHome.vue 25 KB

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