1、资产管理
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m27s

This commit is contained in:
2025-06-24 14:52:45 +08:00
parent ed326906f5
commit a107323e36
37 changed files with 521 additions and 454 deletions

View File

@@ -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: '格式错误' }),
},
{

View File

@@ -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>