授权逻辑更改
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import type { VbenFormProps } from '@vben/common-ui';
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import type { PersonLibForm } from '#/api/sis/personLib/model';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { getVxePopupContainer } from '@vben/utils';
|
||||
|
||||
import { Modal, Popconfirm, Space, Tag } from 'ant-design-vue';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
personLibExport,
|
||||
personLibList,
|
||||
@@ -19,6 +17,7 @@ import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
import { columns, querySchema } from './data';
|
||||
import personLibModal from './personLib-modal.vue';
|
||||
import libAuthModal from '#/views/sis/personLib/libAuth-modal.vue';
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@@ -82,6 +81,10 @@ const [PersonLibModal, modalApi] = useVbenModal({
|
||||
connectedComponent: personLibModal,
|
||||
});
|
||||
|
||||
const [LibAuthModal, libAuthModalApi] = useVbenModal({
|
||||
connectedComponent: libAuthModal,
|
||||
});
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
modalApi.open();
|
||||
@@ -121,6 +124,11 @@ function handleDownloadExcel() {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function handleAuth(row: Required<PersonLibForm>) {
|
||||
libAuthModalApi.setData({ id: row.id });
|
||||
libAuthModalApi.open();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -154,6 +162,8 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button @click.stop="handleAuth(row)"> 授权</ghost-button>
|
||||
|
||||
<ghost-button
|
||||
v-access:code="['sis:personLib:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
@@ -183,5 +193,6 @@ function handleDownloadExcel() {
|
||||
</template>
|
||||
</BasicTable>
|
||||
<PersonLibModal @reload="tableApi.query()" />
|
||||
<LibAuthModal @reload="tableApi.query()" />
|
||||
</Page>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user