| | |
| | | </el-form-item> |
| | | <br /> |
| | | <el-form-item> |
| | | <el-button @click="InsertFormdialog = true" |
| | | <el-button @click="InsertFormdialog = true" v-if="menuStatus.insert" |
| | | ><i class="el-icon-circle-plus-outline"></i> {{ |
| | | $t('userManage.RM.add') |
| | | }}</el-button |
| | |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="handleDelete()" |
| | | <el-button @click="handleDelete()" v-if="menuStatus.delete" |
| | | ><i class="el-icon-delete"></i> {{ |
| | | $t('common.delete') |
| | | }}</el-button |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | type="warning" |
| | | @click="handleEdit(scope.$index, scope.row)" |
| | | size="small" |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | | menuStatus: { |
| | | delete: false, |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | this.roleForm = {}; |
| | | this.getRoleTabelData(); |
| | | }, |
| | | showPermsMenu(res) { |
| | | switch (res.tag) { |
| | | case '/delete': |
| | | this.menuStatus.delete = true; |
| | | break; |
| | | case '/insert': |
| | | this.menuStatus.insert = true; |
| | | break; |
| | | case '/update': |
| | | this.menuStatus.update = true; |
| | | break; |
| | | } |
| | | }, |
| | | }, |
| | | 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]); |
| | | } |
| | | } |
| | | this.getRoleTabelData(); |
| | | this.getSelectDepTab(); |
| | | }, |