| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button @click="openDialog()" icon="Plus" type="primary">新增</el-button> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'addBtn')" |
| | | @click="openDialog()" |
| | | icon="Plus" |
| | | type="primary" |
| | | >新增</el-button |
| | | > |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | | :columns="UserManageColumns" |
| | | :operationBtns="operationBtns" |
| | | > |
| | | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> |
| | | <template #status="{ row }"> |
| | | <FieldSwitch |
| | | v-model="row.status" |
| | |
| | | QueryFilterItem, |
| | | useTable, |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | FieldSwitch, |
| | | } from '@bole-core/components'; |
| | | import * as userServices from '@/services/api/user'; |
| | | import { UserManageColumns } from './constants'; |
| | | import { EnumUserStatus, EnumUserStatusText } from '@/constants'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import { Message } from '@bole-core/core'; |
| | |
| | | name: 'UserManageList', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '编辑', |
| | | }, |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | editBtn: { |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'resetPasswordBtn', |
| | | name: '重置密码', |
| | | }, |
| | | resetPasswordBtn: { |
| | | props: { |
| | | type: 'danger', |
| | | }, |
| | |
| | | onClick: (role) => openResetPasswordDialog(role), |
| | | }, |
| | | }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'resetOperatorPasswordBtn', |
| | | // name: '重置操作密码', |
| | | // }, |
| | | // props: { |
| | | // type: 'danger', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => openResetOperatorPasswordDialog(role), |
| | | // }, |
| | | // }, |
| | | ]); |
| | | resetOperatorPasswordBtn: { |
| | | props: { |
| | | type: 'danger', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openResetOperatorPasswordDialog(role), |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | | operationBtnMap, |
| | | }); |
| | | |
| | | const router = useRouter(); |
| | | const BaseState = { |