| | |
| | | |
| | | <el-table :data="list"> |
| | | <el-table-column type="index" label="序号" align="center" width="60" /> |
| | | <el-table-column label="姓名" prop="name" align="center" min-width="120" /> |
| | | <el-table-column label="名称" prop="name" align="center" min-width="120" /> |
| | | <el-table-column label="账号" prop="account" align="center" min-width="120" /> |
| | | <el-table-column label="角色" prop="roleName" align="center" min-width="120" /> |
| | | <!-- <el-table-column label="最近登录时间" prop="loginTime" align="center" min-width="180" /> --> |
| | |
| | | |
| | | <!-- 新增&编辑 --> |
| | | <el-dialog :title="adminDialogData.type=='add'?'新增管理员':'编辑管理员'" width="500px" :visible.sync="isShowadminDialog" append-to-body> |
| | | <el-form ref="adminDialog" :model="adminDialogData" label-width="80px" :rules="rules"> |
| | | <el-form ref="adminDialog" :model="adminDialogData" label-width="80px" :rules="rules" size="small"> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="adminDialogData.name" placeholder="请输入名称" /> |
| | | </el-form-item> |
| | |
| | | v-model="adminDialogData.sysRoleId" |
| | | clearable |
| | | placeholder="角色" |
| | | class="com-edit-input" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in roleArr" :key="item.id" :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="是否启用" prop="sysRoleId"> |
| | | <el-switch |
| | | v-model="adminDialogData.isUse" |
| | | :active-value="1" |
| | | :inactive-value="0" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | |
| | | url: 'admin/list', |
| | | params: { |
| | | pageNum: pageNum, |
| | | rowCount: pageSize, |
| | | pageSize: pageSize, |
| | | keyWord: keyWord |
| | | }, |
| | | mockData: { |
| | |
| | | account: '', |
| | | password: '', |
| | | passwordSure: '', |
| | | sysRoleId: '' |
| | | sysRoleId: '', |
| | | isUse: 1 |
| | | } |
| | | this.adminDialogData = adminDialogData |
| | | this.isShowadminDialog = true |
| | |
| | | password: '', |
| | | passwordSure: '', |
| | | sysRoleId: item.roId, |
| | | id: item.id |
| | | id: item.id, |
| | | isUse: item.isUse |
| | | } |
| | | this.adminDialogData = adminDialogData |
| | | this.isShowadminDialog = true |
| | |
| | | name: adminDialogData.name, |
| | | account: adminDialogData.account, |
| | | password: adminDialogData.password, |
| | | sysAdRoleId: adminDialogData.sysRoleId |
| | | sysAdRoleId: adminDialogData.sysRoleId, |
| | | isUse: adminDialogData.isUse |
| | | } |
| | | var isAdd = adminDialogData.type === 'add' |
| | | var url = isAdd ? 'admin/add' : 'admin/update' |