This commit is contained in:
@@ -2,6 +2,7 @@ import type {FormSchemaGetter} from '#/adapter/form';
|
||||
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import {renderDict} from "#/utils/render";
|
||||
import {z} from "#/adapter/form";
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@@ -134,7 +135,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '联系电话',
|
||||
fieldName: 'phone',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
rules: z.string().regex(/^1[3-9]\d{9}$/, { message: '格式错误' }),
|
||||
},
|
||||
|
||||
{
|
||||
|
@@ -22,7 +22,7 @@ import { commonDownloadExcel } from '#/utils/file/download';
|
||||
import resident_unitModal from './unit-modal.vue';
|
||||
import unitInfoModal from './unit-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
import {userStatusChange} from "#/api/system/user";
|
||||
import {resident_unitUpdate} from "#/api/property/resident/unit";
|
||||
import {TableSwitch} from "#/components/table";
|
||||
import {useAccess} from "@vben/access";
|
||||
|
||||
@@ -150,10 +150,11 @@ const { hasAccessByCodes } = useAccess();
|
||||
</template>
|
||||
<template #state="{ row }">
|
||||
<TableSwitch
|
||||
:checkedValue="1"
|
||||
:unCheckedValue="0"
|
||||
v-model:value="row.state"
|
||||
:api="() => userStatusChange(row)"
|
||||
:disabled=" !hasAccessByCodes(['property:unit:edit'])
|
||||
"
|
||||
:api="() => resident_unitUpdate(row)"
|
||||
:disabled=" !hasAccessByCodes(['property:unit:edit'])"
|
||||
@reload="() => tableApi.query()"
|
||||
/>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user