资产审批
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
import {
|
||||
personExport,
|
||||
personList,
|
||||
personRemove, personUpdate,
|
||||
personRemove,
|
||||
} from '#/api/property/resident/person';
|
||||
import type { PersonForm } from '#/api/property/resident/person/model';
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
@@ -22,8 +22,7 @@ import { commonDownloadExcel } from '#/utils/file/download';
|
||||
import personModal from './person-modal.vue';
|
||||
import personDetail from './person-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import {useAccess} from "@vben/access";
|
||||
import {TableSwitch} from "#/components/table";
|
||||
// import {TableSwitch} from "#/components/table";
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
@@ -45,6 +44,8 @@ const gridOptions: VxeGridProps = {
|
||||
// 点击行选中
|
||||
// trigger: 'row',
|
||||
},
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// columns: columns(),
|
||||
columns,
|
||||
height: 'auto',
|
||||
keepSource: true,
|
||||
@@ -79,7 +80,6 @@ const [PersonDetail, personDetailApi] = useVbenModal({
|
||||
connectedComponent: personDetail,
|
||||
});
|
||||
|
||||
const { hasAccessByCodes } = useAccess();
|
||||
|
||||
function handleAdd() {
|
||||
modalApi.setData({});
|
||||
@@ -120,6 +120,7 @@ function handleInfo(row: Required<PersonForm>) {
|
||||
personDetailApi.setData({ id: row.id });
|
||||
personDetailApi.open();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -153,16 +154,16 @@ function handleInfo(row: Required<PersonForm>) {
|
||||
<template #img="{ row }">
|
||||
<Avatar :src="row.img" />
|
||||
</template>
|
||||
<template #state="{ row }">
|
||||
<TableSwitch
|
||||
:checkedValue="1"
|
||||
:unCheckedValue="0"
|
||||
v-model:value="row.state"
|
||||
:api="() => personUpdate(row)"
|
||||
:disabled="!hasAccessByCodes(['property:person:edit'])"
|
||||
@reload="() => tableApi.query()"
|
||||
/>
|
||||
</template>
|
||||
<!-- <template #state="{ row }">-->
|
||||
<!-- <TableSwitch-->
|
||||
<!-- v-model:value="row.status"-->
|
||||
<!-- :api="() => personStatusChange(row)"-->
|
||||
<!-- :disabled="-->
|
||||
<!-- row.userId === 1 || !hasAccessByCodes(['system:user:edit'])-->
|
||||
<!-- "-->
|
||||
<!-- @reload="() => tableApi.query()"-->
|
||||
<!-- />-->
|
||||
<!-- </template>-->
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
|
Reference in New Issue
Block a user