| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="140"> |
| | | <el-table-column label="操作" width="200"> |
| | | <template #default="scope"> |
| | | <el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary" @click="onOpenUserDialog('查看', scope.row)">查看</el-button> |
| | | <el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary" @click="onOpenUserDialog('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="primary" @click="onCertificate(scope.row)">证书管理</el-button> |
| | | <el-button style="color: red" :disabled="scope.row.userName === 'admin'" size="small" text type="primary" @click="onRowDel(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <br /> |
| | | </el-card> |
| | | <userDialog ref="userRef" @getUserList="initUserTableData" /> |
| | | <dialog-certificate ref="ctfRef" @getUserList="initUserTableData"></dialog-certificate> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue'; |
| | | import { ElMessageBox, ElMessage } from 'element-plus'; |
| | | import userDialog from '/@/views/system/user/component/userDialog.vue'; |
| | | import dialogCertificate from "/@/views/system/user/component/dialogCertificate.vue"; |
| | | import { userApi } from '/@/api/systemManage/user'; |
| | | import { dutyApi } from '/@/api/systemManage/duty'; |
| | | import { departmentApi } from '/@/api/systemManage/department'; |
| | |
| | | |
| | | export default defineComponent({ |
| | | name: 'systemUser', |
| | | components: { userDialog }, |
| | | components: { userDialog,dialogCertificate }, |
| | | setup() { |
| | | const userRef = ref(); |
| | | const ctfRef = ref() |
| | | const state = reactive<TableDataState>({ |
| | | userTableData: { |
| | | data: [], |
| | |
| | | userRef.value.openDialog(type, value, state.departmentList, state.roleList, state.dutyList); |
| | | }; |
| | | |
| | | const onCertificate = (value: any)=>{ |
| | | ctfRef.value.openDialog(value); |
| | | } |
| | | |
| | | // 删除用户 |
| | | const onRowDel = (row: TableDataRow) => { |
| | | ElMessageBox.confirm(`此操作将永久删除账户名称:“${row.realName}”,是否继续?`, '提示', { |
| | |
| | | }); |
| | | return { |
| | | userRef, |
| | | ctfRef, |
| | | onOpenUserDialog, |
| | | onCertificate, |
| | | onRowDel, |
| | | parseNumber, |
| | | onHandleSizeChange, |