|
|
@ -4,36 +4,36 @@ |
|
|
|
<BasicTable @register="registerTable" :rowSelection="rowSelection"> |
|
|
|
<BasicTable @register="registerTable" :rowSelection="rowSelection"> |
|
|
|
<!--插槽:table标题--> |
|
|
|
<!--插槽:table标题--> |
|
|
|
<template #tableTitle> |
|
|
|
<template #tableTitle> |
|
|
|
<!-- <a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleCreate"> 新增</a-button>--> |
|
|
|
<!-- <a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleCreate"> 新增</a-button>--> |
|
|
|
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" :disabled="isDisabledAuth('system:user:export')"> 导出</a-button>--> |
|
|
|
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" :disabled="isDisabledAuth('system:user:export')"> 导出</a-button>--> |
|
|
|
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>--> |
|
|
|
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>--> |
|
|
|
<!-- <a-button type="primary" @click="openModal(true, {})" preIcon="ant-design:hdd-outlined"> 回收站</a-button>--> |
|
|
|
<!-- <a-button type="primary" @click="openModal(true, {})" preIcon="ant-design:hdd-outlined"> 回收站</a-button>--> |
|
|
|
<!-- <a-dropdown v-if="selectedRowKeys.length > 0"> |
|
|
|
<!-- <a-dropdown v-if="selectedRowKeys.length > 0"> |
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
|
<a-menu> |
|
|
|
<a-menu> |
|
|
|
<a-menu-item key="1" @click="batchHandleDelete"> |
|
|
|
<a-menu-item key="1" @click="batchHandleDelete"> |
|
|
|
<Icon icon="ant-design:delete-outlined"></Icon> |
|
|
|
<Icon icon="ant-design:delete-outlined"></Icon> |
|
|
|
删除 |
|
|
|
删除 |
|
|
|
</a-menu-item> |
|
|
|
</a-menu-item> |
|
|
|
<a-menu-item key="2" @click="batchFrozen(2)"> |
|
|
|
<a-menu-item key="2" @click="batchFrozen(2)"> |
|
|
|
<Icon icon="ant-design:lock-outlined"></Icon> |
|
|
|
<Icon icon="ant-design:lock-outlined"></Icon> |
|
|
|
驳回 |
|
|
|
驳回 |
|
|
|
</a-menu-item> |
|
|
|
</a-menu-item> |
|
|
|
<a-menu-item key="3" @click="batchFrozen(1)"> |
|
|
|
<a-menu-item key="3" @click="batchFrozen(1)"> |
|
|
|
<Icon icon="ant-design:unlock-outlined"></Icon> |
|
|
|
<Icon icon="ant-design:unlock-outlined"></Icon> |
|
|
|
通过 |
|
|
|
通过 |
|
|
|
</a-menu-item> |
|
|
|
</a-menu-item> |
|
|
|
</a-menu> |
|
|
|
</a-menu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<a-button |
|
|
|
<a-button |
|
|
|
>批量操作 |
|
|
|
>批量操作 |
|
|
|
<Icon icon="mdi:chevron-down"></Icon> |
|
|
|
<Icon icon="mdi:chevron-down"></Icon> |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
</a-dropdown>--> |
|
|
|
</a-dropdown>--> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<!--操作栏--> |
|
|
|
<!--操作栏--> |
|
|
|
<template #action="{ record }"> |
|
|
|
<template #action="{ record }"> |
|
|
|
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" /> |
|
|
|
<TableAction :actions="getTableAction(record)"/> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</BasicTable> |
|
|
|
</BasicTable> |
|
|
|
<!--用户抽屉--> |
|
|
|
<!--用户抽屉--> |
|
|
@ -69,7 +69,9 @@ |
|
|
|
import { columns, searchFormSchema } from './user.data'; |
|
|
|
import { columns, searchFormSchema } from './user.data'; |
|
|
|
import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch} from './user.api'; |
|
|
|
import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch} from './user.api'; |
|
|
|
import {usePermission} from "/@/hooks/web/usePermission"; |
|
|
|
import {usePermission} from "/@/hooks/web/usePermission"; |
|
|
|
|
|
|
|
import {useUserStore} from "@/store/modules/user"; |
|
|
|
|
|
|
|
const userStore = useUserStore(); |
|
|
|
|
|
|
|
console.log("the current user role:",userStore.getUserInfo.roleCode); |
|
|
|
const { createMessage, createConfirm } = useMessage(); |
|
|
|
const { createMessage, createConfirm } = useMessage(); |
|
|
|
const { isDisabledAuth } = usePermission(); |
|
|
|
const { isDisabledAuth } = usePermission(); |
|
|
|
//注册drawer |
|
|
|
//注册drawer |
|
|
@ -84,7 +86,6 @@ |
|
|
|
const [registerQuitAgentModal, { openModal: openQuitAgentModal }] = useModal(); |
|
|
|
const [registerQuitAgentModal, { openModal: openQuitAgentModal }] = useModal(); |
|
|
|
//离职用户列表model |
|
|
|
//离职用户列表model |
|
|
|
const [registerQuitModal, { openModal: openQuitModal }] = useModal(); |
|
|
|
const [registerQuitModal, { openModal: openQuitModal }] = useModal(); |
|
|
|
|
|
|
|
|
|
|
|
// 列表页面公共参数、方法 |
|
|
|
// 列表页面公共参数、方法 |
|
|
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ |
|
|
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ |
|
|
|
designScope: 'user-list', |
|
|
|
designScope: 'user-list', |
|
|
@ -233,7 +234,7 @@ |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 操作栏 |
|
|
|
* 操作栏 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function getTableAction(record): ActionItem[] { |
|
|
|
/*function getTableAction(record): ActionItem[] { |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: '编辑', |
|
|
|
label: '编辑', |
|
|
@ -241,31 +242,25 @@ |
|
|
|
// ifShow: () => hasPermission('system:user:edit'), |
|
|
|
// ifShow: () => hasPermission('system:user:edit'), |
|
|
|
}, |
|
|
|
}, |
|
|
|
]; |
|
|
|
]; |
|
|
|
} |
|
|
|
}*/ |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 下拉操作栏 |
|
|
|
* 下拉操作栏 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function getDropDownAction(record): ActionItem[] { |
|
|
|
// function getDropDownAction(record): ActionItem[] { |
|
|
|
|
|
|
|
function getTableAction(record): ActionItem[] { |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: '详情', |
|
|
|
label: '详情', |
|
|
|
onClick: handleDetail.bind(null, record), |
|
|
|
onClick: handleDetail.bind(null, record), |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
/*{ |
|
|
|
label: '密码', |
|
|
|
label: '密码', |
|
|
|
//auth: 'user:changepwd', |
|
|
|
//auth: 'user:changepwd', |
|
|
|
onClick: handleChangePassword.bind(null, record.username), |
|
|
|
onClick: handleChangePassword.bind(null, record.username), |
|
|
|
}, |
|
|
|
},*/ |
|
|
|
{ |
|
|
|
|
|
|
|
label: '删除', |
|
|
|
|
|
|
|
popConfirm: { |
|
|
|
|
|
|
|
title: '是否确认删除', |
|
|
|
|
|
|
|
confirm: handleDelete.bind(null, record), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
label: '驳回', |
|
|
|
label: '驳回', |
|
|
|
ifShow: record.status == 1, |
|
|
|
ifShow: userStore.getUserInfo.roleCode =='faren_admin' && record.status == 1, |
|
|
|
popConfirm: { |
|
|
|
popConfirm: { |
|
|
|
title: '确定驳回吗?', |
|
|
|
title: '确定驳回吗?', |
|
|
|
confirm: handleFrozen.bind(null, record, 2), |
|
|
|
confirm: handleFrozen.bind(null, record, 2), |
|
|
@ -273,12 +268,20 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: '通过', |
|
|
|
label: '通过', |
|
|
|
ifShow: record.status == 2, |
|
|
|
ifShow: userStore.getUserInfo.roleCode =='faren_admin' && record.status == 2, |
|
|
|
popConfirm: { |
|
|
|
popConfirm: { |
|
|
|
title: '确定通过吗?', |
|
|
|
title: '确定通过吗?', |
|
|
|
confirm: handleFrozen.bind(null, record, 1), |
|
|
|
confirm: handleFrozen.bind(null, record, 1), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: '删除', |
|
|
|
|
|
|
|
ifShow: userStore.getUserInfo.roleCode != 'shenbaoren_role', |
|
|
|
|
|
|
|
popConfirm: { |
|
|
|
|
|
|
|
title: '是否确认删除', |
|
|
|
|
|
|
|
confirm: handleDelete.bind(null, record), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
// { |
|
|
|
// { |
|
|
|
// label: '代理人', |
|
|
|
// label: '代理人', |
|
|
|
// onClick: handleAgentSettings.bind(null, record.username), |
|
|
|
// onClick: handleAgentSettings.bind(null, record.username), |
|
|
|