From e3a8cfa1f235815519d281a2f74590c432818a26 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期六, 12 十一月 2022 09:36:48 +0800 Subject: [PATCH] 123 --- src/views/userManage/authorityManage.vue | 52 +++++++++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/views/userManage/authorityManage.vue b/src/views/userManage/authorityManage.vue index cdd30c7..6e8a4b0 100644 --- a/src/views/userManage/authorityManage.vue +++ b/src/views/userManage/authorityManage.vue @@ -277,12 +277,12 @@ <script> import moment from 'moment'; import MyBread from '../../components/MyBread.vue'; -import { select_Auth_ByPageAndCount, insertAuth,updateAuth,deleteAuths } from '../../api/api.js'; +import { select_Auth_ByPageAndCount, insertAuth, updateAuth, deleteAuths } from '../../api/api.js'; export default { components: { MyBread }, data() { return { - menuStatus: { + menuStatus: { delete: false, insert: false, update: false, @@ -299,32 +299,34 @@ tableData: [], itemdetail: {}, upform: {}, - multipleSelection: [], + multipleSelection: [], count: 0, + listData: { name: null, pageIndex: 1, pageSize: 10, }, + defaultProps: { + children: 'children', + label: 'label', + }, }; }, - defaultProps: { - children: 'children', - label: 'label', - }, + created() { var val = this.$store.state.currentPerms; - var permsEntity = this.$store.state.permsEntity; - for (var i = 0; i < permsEntity.length; i++) { - if (permsEntity[i].perms == val) { - this.showPermsMenu(permsEntity[i]); + var permsEntity = this.$store.state.permsEntity; + for (var i = 0; i < permsEntity.length; i++) { + if (permsEntity[i].perms == val) { + this.showPermsMenu(permsEntity[i]); - } } + } this.getRoleTabelData(); }, methods: { - showPermsMenu(res) { + showPermsMenu(res) { switch (res.tag) { case '/delete': this.menuStatus.delete = true; @@ -337,7 +339,7 @@ break; } }, - async DelFromData(){ + async DelFromData() { var std = []; for (var i in this.multipleSelection) { std.push(this.multipleSelection[i].id); @@ -356,7 +358,7 @@ }); } }, - handleSelectionChange(val) { + handleSelectionChange(val) { this.multipleSelection = val; }, submitForm(formName) { @@ -364,16 +366,16 @@ }, resetForm(formName) { - this.ruleForm ={} + this.ruleForm = {} this.getRoleTabelData(); }, - EditFromDataClose(){ + EditFromDataClose() { this.EditFormdialog = false; - this.upform ={}; - }, - async EditFromData(){ - const data = await updateAuth(this.upform); - if (data.code == 200) { + this.upform = {}; + }, + async EditFromData() { + const data = await updateAuth(this.upform); + if (data.code == 200) { this.EditFormdialog = false; this.upform = {}; this.$message({ @@ -434,7 +436,7 @@ if (this.listData.tab == '') { delete this.listData.tab; } - this.listData.name = this.ruleForm.name; + this.listData.name = this.ruleForm.name; const data = await select_Auth_ByPageAndCount(this.listData); if (data.code != 200) { this.$message.error('鍒楄〃璋冪敤澶辫触'); @@ -490,7 +492,7 @@ border-radius: 5px; border: 1px solid rgb(202, 201, 204); - /*淇敼table 琛ㄤ綋鐨勮儗鏅鑹插拰鏂囧瓧棰滆壊*/ + /*淇敼table 琛ㄤ綋鐨勮儗鏅鑹插拰鏂囧瓧棰滆壊*/ /deep/ .el-table { background-color: transparent; @@ -551,7 +553,7 @@ } .pagination_box { margin-top: 20px; - /deep/.el-input__inner { + /deep/.el-input__inner { background-color: transparent !important; border: 1px solid; color: white; -- Gitblit v1.9.3