| | |
| | | <template> |
| | | <div class="power_box"> |
| | | <My-bread |
| | | :list="[ |
| | | `${$t('userManage.userManage')}`, |
| | | <My-bread :list="[ |
| | | `${$t('operatManage.operatManage')}`, |
| | | `${$t('userManage.authorityManage')}`, |
| | | ]" |
| | | ></My-bread> |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="power_quire"> |
| | | <el-form ref="form" :model="ruleForm" label-width="100px" :inline="true"> |
| | | <el-form-item :label="$t('common.username')"> |
| | | <div class="power_quire subpage_Div"> |
| | | <el-form |
| | | ref="form" |
| | | :model="ruleForm" |
| | | label-width="100px" |
| | | :inline="true" |
| | | > |
| | | <el-form-item > |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="submitForm('ruleForm')" icon="el-icon-search" type="primary">{{ |
| | | <el-form-item style="float: right;"> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | @click="InsertFormdialog = true" |
| | | icon="el-icon-edit" |
| | | type="success" size="small" |
| | | >{{ $t('common.append') }}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.delete" |
| | | @click="DelFromData" |
| | | icon="el-icon-delete" |
| | | type="danger" size="small" |
| | | >{{ $t('common.delete') }}</el-button> |
| | | <el-button |
| | | @click="submitForm('ruleForm')" |
| | | icon="el-icon-search" size="small" |
| | | type="primary" |
| | | >{{ |
| | | $t('common.iquery') |
| | | }}</el-button> |
| | | <el-button |
| | | @click="resetForm('ruleForm')" |
| | | icon="el-icon-refresh" |
| | | type="info" |
| | | >{{ $t('common.empty') }}</el-button |
| | | > |
| | | <el-button v-if="menuStatus.insert" |
| | | @click="InsertFormdialog = true" |
| | | icon="el-icon-edit" |
| | | type="success" |
| | | >{{ $t('common.append') }}</el-button |
| | | > |
| | | <el-button v-if="menuStatus.delete" |
| | | @click="DelFromData" |
| | | icon="el-icon-delete" |
| | | type="danger" |
| | | >{{ $t('common.delete') }}</el-button |
| | | > |
| | | type="info" size="small" |
| | | >{{ $t('common.empty') }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box"> |
| | | <div class="table_box subpage_Div"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | fit |
| | | height="85%" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | |
| | | type="primary" |
| | | plain |
| | | size="small" |
| | | >{{ $t('common.see') }}</el-button |
| | | > |
| | | <el-button v-if="menuStatus.update" |
| | | >{{ $t('common.see') }}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | @click="handleEdit(scope.$index, scope.row)" |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | >{{ $t('common.edit') }}</el-button |
| | | > |
| | | >{{ $t('common.edit') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <div class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | <div class="infoBox" v-show="showinfoBox"> |
| | | |
| | | <div |
| | | class="infoBox subpage_Div box_div" |
| | | v-show="showinfoBox" |
| | | > |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <div |
| | | slot="header" |
| | | class="clearfix" |
| | | > |
| | | <span>{{ $t('dataManage.styleObj.deInformation') }}</span> |
| | | <div style="float: right; cursor: pointer" @click="closeDetial" > |
| | | <div |
| | | style="float: right; cursor: pointer" |
| | | @click="closeDetial" |
| | | > |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="contentBox"> |
| | | <div class="contentBox"> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.name') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.name }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <p> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.tag') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.tag }}</label> |
| | | </p> |
| | |
| | | <label class="boxlabel">{{ itemdetail.createUser }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.createTime') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.createTime }}</label> |
| | | </p> |
| | |
| | | <label> {{ $t('userManage.userInfoObj.updateTime') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.updateTime }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.bak') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.bak }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <el-divider></el-divider> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | |
| | | :props="defaultProps" |
| | | > |
| | | </el-tree> |
| | | <el-button type="primary" size="small">{{ |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | >{{ |
| | | $t('common.confirm') |
| | | }}</el-button> |
| | | <el-button type="info" size="small">{{ $t('common.close') }}</el-button> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | >{{ $t('common.close') }}</el-button> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :title="$t('userManage.userInfoObj.addPermission')" |
| | |
| | | :label="$t('userManage.userInfoObj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="insertform.name" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="insertform.name" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.userInfoObj.tag')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="insertform.tag" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="insertform.tag" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.userInfoObj.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="insertform.bak" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="insertform.bak" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="insertFromDataClose">{{ |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button size="small" @click="insertFromDataClose">{{ |
| | | $t('common.close') |
| | | }}</el-button> |
| | | <el-button type="primary" @click="insertFromData">{{ |
| | | <el-button |
| | | size="small" type="primary" |
| | | @click="insertFromData" |
| | | >{{ |
| | | $t('common.confirm') |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | <el-dialog |
| | | :title="$t('userManage.userInfoObj.editPermission')" |
| | | style="overflow: hidden" |
| | | :visible.sync="EditFormdialog" |
| | |
| | | :label="$t('userManage.userInfoObj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.name" ></el-input> |
| | | <el-input v-model="upform.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.userInfoObj.tag')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.tag" ></el-input> |
| | | <el-input v-model="upform.tag"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.userInfoObj.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.bak" ></el-input> |
| | | <el-input v-model="upform.bak"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="EditFromDataClose" >{{ |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button size="small" @click="EditFromDataClose">{{ |
| | | $t('common.close') |
| | | }}</el-button> |
| | | <el-button @click="EditFromData" type="primary" >{{ |
| | | <el-button |
| | | @click="EditFromData" |
| | | size="small" type="primary" |
| | | >{{ |
| | | $t('common.confirm') |
| | | }}</el-button> |
| | | </div> |
| | |
| | | <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, |
| | |
| | | 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; |
| | |
| | | break; |
| | | } |
| | | }, |
| | | async DelFromData(){ |
| | | async DelFromData() { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await deleteAuths({ ids: std.toString() }); |
| | | if (data.code == 200) { |
| | | this.$confirm('此操作将永久删除该权限, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const data = await deleteAuths({ ids: std.toString() }); |
| | | |
| | | if (data.code == 200) { |
| | | this.InsertFormdialog = false; |
| | | this.$message({ |
| | | message: '删除成功!', |
| | | type: 'success', |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败!', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | }).catch(() => { |
| | | this.$message({ |
| | | message: '删除成功!', |
| | | type: 'success', |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败!', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | }); |
| | | // const data = await deleteAuths({ ids: std.toString() }); |
| | | // if (data.code == 200) { |
| | | // this.$message({ |
| | | // message: '删除成功!', |
| | | // type: 'success', |
| | | // }); |
| | | // this.getRoleTabelData(); |
| | | // } else { |
| | | // this.$message({ |
| | | // message: '删除失败!', |
| | | // type: 'warning', |
| | | // }); |
| | | // } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | submitForm(formName) { |
| | |
| | | |
| | | }, |
| | | 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({ |
| | |
| | | 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('列表调用失败'); |
| | |
| | | |
| | | <style lang="less" scoped> |
| | | .power_box { |
| | | border-radius: 10px; |
| | | height: 100%; |
| | | |
| | | box-sizing: border-box; |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 1%; |
| | | |
| | | .el-input { |
| | | width: 300px; |
| | | } |
| | | .power_quire { |
| | | overflow: auto; |
| | | padding: 8px; |
| | | margin-top: 20px; |
| | | /deep/ .el-input__inner { |
| | | background-color: transparent !important; |
| | | border: 1px solid; |
| | | color: white; |
| | | } |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | padding-top: 25px; |
| | | margin-bottom: 20px; |
| | | |
| | | margin-bottom: 10px; |
| | | } |
| | | .table_box { |
| | | height: 68%; |
| | | height: 72%; |
| | | padding: 10px; |
| | | |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | /*修改table 表体的背景颜色和文字颜色*/ |
| | | /deep/ .el-table { |
| | | background-color: transparent; |
| | | |
| | | th, |
| | | td { |
| | | background-color: transparent; |
| | | } |
| | | .el-table__expanded-cell { |
| | | background-color: transparent !important; |
| | | } |
| | | |
| | | // 表头背景色 |
| | | th.el-table__cell { |
| | | background-color: #303030; |
| | | color: #fff; |
| | | } |
| | | tr > td { |
| | | background-color: #303030; |
| | | color: #fff; |
| | | } |
| | | |
| | | // hover效果 |
| | | tr:hover > td { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | } |
| | | |
| | | tbody tr:hover { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | // text-align: center; |
| | | } |
| | | |
| | | // 滚动条宽高 |
| | | .el-table__body-wrapper::-webkit-scrollbar { |
| | | width: 5px; |
| | | height: 5px; |
| | | } |
| | | |
| | | .el-table__body-wrapper::-webkit-scrollbar { |
| | | width: 5px; |
| | | /*滚动条宽度*/ |
| | | height: 10px; |
| | | /*滚动条高度*/ |
| | | } |
| | | /*定义滚动条轨道 内阴影+圆角*/ |
| | | .el-table__body-wrapper::-webkit-scrollbar-track { |
| | | box-shadow: 0px 1px 3px #216fe6 inset; |
| | | /*滚动条的背景区域的内阴影*/ |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | /*定义滑块 内阴影+圆角*/ |
| | | .el-table__body-wrapper::-webkit-scrollbar-thumb { |
| | | box-shadow: 0px 1px 3px #216fe6 inset; |
| | | border-radius: 6px; |
| | | background-color: #216fe6; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | .pagination_box { |
| | | margin-top: 20px; |
| | | /deep/.el-input__inner { |
| | | background-color: transparent !important; |
| | | border: 1px solid; |
| | | color: white; |
| | | } |
| | | /deep/.el-pagination__total { |
| | | color: white; |
| | | } |
| | | /deep/.el-pagination__jump { |
| | | color: white; |
| | | } |
| | | /deep/.el-pager li.active { |
| | | color: #1890ff; |
| | | } |
| | | /deep/.el-pager li { |
| | | color: white; |
| | | background: transparent; |
| | | } |
| | | /deep/.el-pager li { |
| | | color: white; |
| | | } |
| | | /deep/.btn-prev { |
| | | background: transparent; |
| | | } |
| | | /deep/.btn-next { |
| | | background: transparent; |
| | | } |
| | | } |
| | | .infoBox { |
| | | width: 500px; |
| | | border: 1px solid #eee; |
| | | position: absolute; |
| | | z-index: 100; |
| | | top: 25%; |
| | | right: 12%; |
| | | background-color: #fff; |
| | | .el-card { |
| | | background-color: transparent; |
| | | span { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | .contentBox { |
| | | margin: 0 aotu 10px; |
| | | height: 485px; |
| | | overflow: auto; |
| | | p { |
| | | // background-color: #bfa; |
| | | // margin-bottom: 10px; |
| | | font-size: 14px; |
| | | } |
| | | .boxlabel { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | /* 整体样式 */ |
| | | .contentBox::-webkit-scrollbar { |
| | | width: 6px; |
| | | height: 6px; |
| | | } |
| | | |
| | | /* 滚动条 */ |
| | | .contentBox::-webkit-scrollbar-thumb { |
| | | background-color: #b3d8ff; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | /* 滚动条鼠标经过样式 */ |
| | | .contentBox::-webkit-scrollbar-thumb:hover { |
| | | background-color: #b3d8ff; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | /* 滚动条轨道 */ |
| | | .contentBox::-webkit-scrollbar-track-piece { |
| | | -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | border-radius: 10px; |
| | | background: #ededed; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | </style> |
| | | <style> |
| | | .el-select-dropdown { |
| | | background: #303030; |
| | | border-color: 1px solid; |
| | | } |
| | | |
| | | .el-scrollbar__wrap { |
| | | margin-bottom: -20px !important; |
| | | margin-right: -20px !important; |
| | | } |
| | | .el-select-dropdown__item.hover, |
| | | .el-select-dropdown__item:hover { |
| | | background: rgba(255, 255, 255, 0.3); |
| | | } |
| | | .el-select-dropdown__item { |
| | | color: white !important; |
| | | } |
| | | </style> |
| | | |