Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
commit
0a56fa2194
1
apps/web-antd/src/api/common.d.ts
vendored
1
apps/web-antd/src/api/common.d.ts
vendored
@ -51,5 +51,6 @@ export interface TreeNode<T = any> {
|
||||
|
||||
title?: string;
|
||||
key?:any
|
||||
disabled: boolean
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import { requestClient } from '#/api/request';
|
||||
* @returns 绿植租赁-订单收费列表
|
||||
*/
|
||||
export function orderChargeList(params?: OrderChargeQuery) {
|
||||
return requestClient.get<PageResult<OrderChargeVO>>('/system/orderCharge/list', { params });
|
||||
return requestClient.get<PageResult<OrderChargeVO>>('/property/orderCharge/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
@ -19,7 +19,7 @@ export function orderChargeList(params?: OrderChargeQuery) {
|
||||
* @returns 绿植租赁-订单收费列表
|
||||
*/
|
||||
export function orderChargeExport(params?: OrderChargeQuery) {
|
||||
return commonExport('/system/orderCharge/export', params ?? {});
|
||||
return commonExport('/property/orderCharge/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -28,7 +28,7 @@ export function orderChargeExport(params?: OrderChargeQuery) {
|
||||
* @returns 绿植租赁-订单收费详情
|
||||
*/
|
||||
export function orderChargeInfo(id: ID) {
|
||||
return requestClient.get<OrderChargeVO>(`/system/orderCharge/${id}`);
|
||||
return requestClient.get<OrderChargeVO>(`/property/orderCharge/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -37,7 +37,7 @@ export function orderChargeInfo(id: ID) {
|
||||
* @returns void
|
||||
*/
|
||||
export function orderChargeAdd(data: OrderChargeForm) {
|
||||
return requestClient.postWithMsg<void>('/system/orderCharge', data);
|
||||
return requestClient.postWithMsg<void>('/property/orderCharge', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -46,7 +46,7 @@ export function orderChargeAdd(data: OrderChargeForm) {
|
||||
* @returns void
|
||||
*/
|
||||
export function orderChargeUpdate(data: OrderChargeForm) {
|
||||
return requestClient.putWithMsg<void>('/system/orderCharge', data);
|
||||
return requestClient.putWithMsg<void>('/property/orderCharge', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -55,5 +55,5 @@ export function orderChargeUpdate(data: OrderChargeForm) {
|
||||
* @returns void
|
||||
*/
|
||||
export function orderChargeRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/system/orderCharge/${id}`);
|
||||
return requestClient.deleteWithMsg<void>(`/property/orderCharge/${id}`);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ export function authRecordInfo(id: ID) {
|
||||
* @returns void
|
||||
*/
|
||||
export function authRecordAdd(data: AuthRecordForm) {
|
||||
return requestClient.postWithMsg<void>('/sis/authRecord', data);
|
||||
return requestClient.postWithMsg<void>('/sis/authRecord/add', data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
10
apps/web-antd/src/api/sis/authRecord/model.d.ts
vendored
10
apps/web-antd/src/api/sis/authRecord/model.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
import type { BaseEntity, PageQuery } from '#/api/common';
|
||||
|
||||
export interface AuthRecordVO {
|
||||
/**
|
||||
@ -15,25 +15,25 @@ export interface AuthRecordVO {
|
||||
* 门禁id
|
||||
*/
|
||||
acdId: string | number;
|
||||
|
||||
}
|
||||
|
||||
export interface AuthRecordForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
libId?: string | number;
|
||||
|
||||
/**
|
||||
* 人像id
|
||||
*/
|
||||
imgId?: string | number;
|
||||
imgIds?: string[] | number[];
|
||||
|
||||
/**
|
||||
* 门禁id
|
||||
*/
|
||||
acdId?: string | number;
|
||||
acIds?: string[] | number[];
|
||||
|
||||
issue: boolean;
|
||||
}
|
||||
|
||||
export interface AuthRecordQuery extends PageQuery {
|
||||
|
@ -51,7 +51,7 @@ const gridOptions: VxeGridProps = {
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
},
|
||||
id: 'system-orderCharge-index'
|
||||
id: 'property-orderCharge-index'
|
||||
};
|
||||
|
||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
@ -105,7 +105,7 @@ function handleDownloadExcel() {
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
v-access:code="['system:orderCharge:export']"
|
||||
v-access:code="['property:orderCharge:export']"
|
||||
@click="handleDownloadExcel"
|
||||
>
|
||||
{{ $t('pages.common.export') }}
|
||||
@ -114,13 +114,13 @@ function handleDownloadExcel() {
|
||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||
danger
|
||||
type="primary"
|
||||
v-access:code="['system:orderCharge:remove']"
|
||||
v-access:code="['property:orderCharge:remove']"
|
||||
@click="handleMultiDelete">
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
v-access:code="['system:orderCharge:add']"
|
||||
v-access:code="['property:orderCharge:add']"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t('pages.common.add') }}
|
||||
@ -130,7 +130,7 @@ function handleDownloadExcel() {
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
v-access:code="['system:orderCharge:edit']"
|
||||
v-access:code="['property:orderCharge:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
>
|
||||
{{ $t('pages.common.edit') }}
|
||||
@ -143,7 +143,7 @@ function handleDownloadExcel() {
|
||||
>
|
||||
<ghost-button
|
||||
danger
|
||||
v-access:code="['system:orderCharge:remove']"
|
||||
v-access:code="['property:orderCharge:remove']"
|
||||
@click.stop=""
|
||||
>
|
||||
{{ $t('pages.common.delete') }}
|
||||
|
@ -134,12 +134,12 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '订单号',
|
||||
fieldName: 'orderNo',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
// {
|
||||
// label: '订单号',
|
||||
// fieldName: 'orderNo',
|
||||
// component: 'Input',
|
||||
// rules: 'required',
|
||||
// },
|
||||
{
|
||||
label: '客户名称',
|
||||
fieldName: 'customerName',
|
||||
@ -170,25 +170,20 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
format: 'YYYY-MM-DD',
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '应付总额',
|
||||
fieldName: 'totalAmount',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '租赁方式',
|
||||
fieldName: 'rentalType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options:getDictOptions('wy_sf')
|
||||
options:getDictOptions('wy_zlfs')
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
formItemClass:'col-span-2'
|
||||
},
|
||||
{
|
||||
label: '租赁方案id',
|
||||
@ -200,6 +195,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
triggerFields: ['rentalType'],
|
||||
},
|
||||
rules: 'required',
|
||||
formItemClass:'col-span-2'
|
||||
},
|
||||
{
|
||||
label: '绿植产品id',
|
||||
@ -213,9 +209,14 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '租赁产品数量',
|
||||
label: '租赁数量',
|
||||
fieldName: 'productNum',
|
||||
component: 'Input',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min: 1,
|
||||
precision: 0,
|
||||
step: 1
|
||||
},
|
||||
dependencies: {
|
||||
// 仅当 租赁方式 为 1(单点) 时显示
|
||||
show: (formValues) => formValues.rentalType === '1',
|
||||
@ -223,6 +224,12 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '应付总额',
|
||||
fieldName: 'totalAmount',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '支付状态',
|
||||
fieldName: 'paymentStatus',
|
||||
@ -231,21 +238,22 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '是否续租',
|
||||
fieldName: 'isRelet',
|
||||
component: 'RadioGroup',
|
||||
componentProps: {
|
||||
buttonStyle: 'solid',
|
||||
optionType: 'button',
|
||||
options: getDictOptions('wy_sf'),
|
||||
},
|
||||
},
|
||||
// {
|
||||
// label: '是否续租',
|
||||
// fieldName: 'isRelet',
|
||||
// component: 'RadioGroup',
|
||||
// componentProps: {
|
||||
// buttonStyle: 'solid',
|
||||
// optionType: 'button',
|
||||
// options: getDictOptions('wy_sf'),
|
||||
// },
|
||||
// },
|
||||
{
|
||||
label: '合同状态',
|
||||
fieldName: 'contractStatus',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_htzt'),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -153,16 +153,6 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
// rules:'required',
|
||||
// formItemClass: 'col-span-2',
|
||||
// },
|
||||
{
|
||||
label: '人脸图片',
|
||||
fieldName: 'img',
|
||||
component: 'ImageUpload',
|
||||
componentProps: {
|
||||
// accept: 'image/*', // 可选拓展名或者mime类型 ,拼接
|
||||
maxCount: 1, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型
|
||||
},
|
||||
formItemClass: 'col-span-2',
|
||||
},
|
||||
{
|
||||
label: '入驻时间',
|
||||
fieldName: 'time',
|
||||
@ -179,6 +169,16 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'carNumber',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '人脸图片',
|
||||
fieldName: 'img',
|
||||
component: 'ImageUpload',
|
||||
componentProps: {
|
||||
// accept: 'image/*', // 可选拓展名或者mime类型 ,拼接
|
||||
maxCount: 1, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型
|
||||
},
|
||||
formItemClass: 'col-span-2',
|
||||
},
|
||||
{
|
||||
label: '人员状态',
|
||||
fieldName: 'state',
|
||||
|
@ -28,13 +28,16 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
label: '预约状态',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
showTime: {
|
||||
format: 'HH:mm:ss'
|
||||
},
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
placeholder: ['开始时间', '结束时间']
|
||||
},
|
||||
fieldName: 'visitingBeginTime',
|
||||
fieldName: 'visitingTimeRange',
|
||||
label: '拜访时间',
|
||||
},
|
||||
{
|
||||
@ -178,12 +181,15 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
{
|
||||
label: '拜访时间',
|
||||
fieldName: 'visitingBeginTime',
|
||||
component: 'DatePicker',
|
||||
fieldName: 'visitingTimeRange',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
showTime: {
|
||||
format: 'HH:mm:ss'
|
||||
},
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
placeholder: ['开始时间', '结束时间']
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@ -203,7 +209,6 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '车牌号',
|
||||
fieldName: 'licensePlate',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
// {
|
||||
// label: '人脸图片',
|
||||
|
@ -40,6 +40,12 @@ const gridOptions: VxeGridProps = {
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
...formValues,
|
||||
// visitingBeginTime: new Date(formValues.visitingTimeRange[0]).getTime(),
|
||||
// visitingEndTime: new Date(formValues.visitingTimeRange[1]).getTime(),
|
||||
// visitingTimeRange: undefined,
|
||||
visitingBeginTime: formValues.visitingTimeRange?.[0],
|
||||
visitingEndTime: formValues.visitingTimeRange?.[1],
|
||||
visitingTimeRange: undefined
|
||||
});
|
||||
},
|
||||
},
|
||||
|
@ -14,11 +14,11 @@ dayjs.extend(relativeTime);
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
unitDetail.value = null;
|
||||
visitorInvitationDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const unitDetail = shallowRef<null | VisitorManagementDetail>(null);
|
||||
const visitorInvitationDetail = shallowRef<null | VisitorManagementDetail>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
@ -27,50 +27,53 @@ async function handleOpenChange(open: boolean) {
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await visitorManagementInfo(id);
|
||||
unitDetail.value = response;
|
||||
visitorInvitationDetail.value = response;
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="访客管理信息" class="w-[70%]">
|
||||
<Descriptions v-if="unitDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<Descriptions v-if="visitorInvitationDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="访客姓名">
|
||||
{{ unitDetail.visitorName }}
|
||||
{{ visitorInvitationDetail.visitorName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="访客电话">
|
||||
{{ unitDetail.visitorPhone }}
|
||||
{{ visitorInvitationDetail.visitorPhone }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="所属公司">
|
||||
{{ unitDetail.visitorUnit}}
|
||||
{{ visitorInvitationDetail.visitorUnit}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="被访人">
|
||||
{{ unitDetail.interviewedPerson }}
|
||||
{{ visitorInvitationDetail.interviewedPerson }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="联系电话">
|
||||
{{ unitDetail.interviewedPhone }}
|
||||
{{ visitorInvitationDetail.interviewedPhone }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="被访单位">
|
||||
{{ unitDetail.interviewedUnit }}
|
||||
{{ visitorInvitationDetail.interviewedUnit }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="拜访事由">
|
||||
{{ unitDetail.visitingReason }}
|
||||
{{ visitorInvitationDetail.visitingReason }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="拜访时间">
|
||||
{{ unitDetail.visitingBeginTime+' - '+unitDetail.visitingBeginTime }}
|
||||
{{ visitorInvitationDetail.visitingBeginTime+' - '+visitorInvitationDetail.visitingBeginTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="是否预约车位" v-if="unitDetail.bookingParkingSpace!=null">
|
||||
<DescriptionsItem label="是否预约车位" v-if="visitorInvitationDetail.bookingParkingSpace!=null">
|
||||
<component
|
||||
:is="renderDict(unitDetail.bookingParkingSpace,'wy_parking_spot')"
|
||||
:is="renderDict(visitorInvitationDetail.bookingParkingSpace,'wy_parking_spot')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="预约状态" v-if="unitDetail.serveStatus!=null">
|
||||
<DescriptionsItem label="车牌号">
|
||||
{{ visitorInvitationDetail.licensePlate }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="预约状态" v-if="visitorInvitationDetail.serveStatus!=null">
|
||||
<component
|
||||
:is="renderDict(unitDetail.serveStatus,'wy_appointment_tatus')"
|
||||
:is="renderDict(visitorInvitationDetail.serveStatus,'wy_appointment_tatus')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="提交时间">
|
||||
{{ unitDetail.createTime }}
|
||||
{{ visitorInvitationDetail.createTime }}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
|
@ -70,8 +70,19 @@ async function handleConfirm() {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 获取原始表单值
|
||||
const formValues = await formApi.getValues();
|
||||
|
||||
// 自定义深拷贝
|
||||
const data = {
|
||||
...cloneDeep(formValues),
|
||||
facePictures: 1,
|
||||
visitingBeginTime: formValues.visitingTimeRange?.[0],
|
||||
visitingEndTime: formValues.visitingTimeRange?.[1],
|
||||
visitingTimeRange: undefined
|
||||
};
|
||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
// const data = cloneDeep(await formApi.getValues());
|
||||
await (isUpdate.value ? visitorManagementUpdate(data) : visitorManagementAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
|
@ -28,13 +28,16 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
label: '预约状态',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
showTime: {
|
||||
format: 'HH:mm:ss'
|
||||
},
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
placeholder: ['开始时间', '结束时间']
|
||||
},
|
||||
fieldName: 'visitingBeginTime',
|
||||
fieldName: 'visitingTimeRange',
|
||||
label: '拜访时间',
|
||||
},
|
||||
{
|
||||
@ -44,7 +47,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
fieldName: 'createTime',
|
||||
fieldName: 'updateTime',
|
||||
label: '提交时间',
|
||||
},
|
||||
];
|
||||
@ -119,7 +122,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
{
|
||||
title: '提交时间',
|
||||
field: 'createTime',
|
||||
field: 'updateTime',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
|
@ -0,0 +1,106 @@
|
||||
<script setup lang="ts">
|
||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||
import { getVxePopupContainer } from '@vben/utils';
|
||||
import { Popconfirm, Space } from 'ant-design-vue';
|
||||
import {
|
||||
useVbenVxeGrid,
|
||||
type VxeGridProps
|
||||
} from '#/adapter/vxe-table';
|
||||
import {
|
||||
visitorManagementList,
|
||||
visitorManagementUpdate,
|
||||
} from '#/api/property/visitorManagement';
|
||||
import type { VisitorManagementForm } from '#/api/property/visitorManagement/model';
|
||||
import visitorTodoDetail from './visitorTodo-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
labelWidth: 80,
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
schema: querySchema(),
|
||||
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||
};
|
||||
|
||||
const gridOptions: VxeGridProps = {
|
||||
checkboxConfig: {
|
||||
highlight: true,
|
||||
reserve: true,
|
||||
},
|
||||
columns,
|
||||
height: 'auto',
|
||||
keepSource: true,
|
||||
pagerConfig: {},
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async ({ page }, formValues = {}) => {
|
||||
return await visitorManagementList({
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
...formValues,
|
||||
visitingBeginTime: formValues.visitingTimeRange?.[0],
|
||||
visitingEndTime: formValues.visitingTimeRange?.[1],
|
||||
visitingTimeRange: undefined
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
},
|
||||
id: 'property-visitorManagement-index'
|
||||
};
|
||||
|
||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
formOptions,
|
||||
gridOptions,
|
||||
});
|
||||
|
||||
const [visitorTodoDetailModal, visitorTodoApi] = useVbenModal({
|
||||
connectedComponent: visitorTodoDetail,
|
||||
});
|
||||
|
||||
async function handleInfo(row: Required<VisitorManagementForm>) {
|
||||
visitorTodoApi.setData({ id: row.id });
|
||||
visitorTodoApi.open();
|
||||
}
|
||||
|
||||
async function handleDelete(row: Required<VisitorManagementForm>) {
|
||||
row.serveStatus=1
|
||||
await visitorManagementUpdate(row);
|
||||
await tableApi.query();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable table-title="访客待办列表">
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<Popconfirm
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
title="确认审核状态?"
|
||||
@confirm="handleDelete(row)"
|
||||
>
|
||||
<ghost-button
|
||||
@click.stop=""
|
||||
>
|
||||
{{ '审核' }}
|
||||
</ghost-button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<visitorTodoDetailModal/>
|
||||
</Page>
|
||||
</template>
|
@ -14,11 +14,11 @@ dayjs.extend(relativeTime);
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
onOpenChange: handleOpenChange,
|
||||
onClosed() {
|
||||
unitDetail.value = null;
|
||||
visitorTodoDetail.value = null;
|
||||
},
|
||||
});
|
||||
|
||||
const unitDetail = shallowRef<null | VisitorManagementDetail>(null);
|
||||
const visitorTodoDetail = shallowRef<null | VisitorManagementDetail>(null);
|
||||
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
@ -27,50 +27,53 @@ async function handleOpenChange(open: boolean) {
|
||||
modalApi.modalLoading(true);
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await visitorManagementInfo(id);
|
||||
unitDetail.value = response;
|
||||
visitorTodoDetail.value = response;
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal :footer="false" :fullscreen-button="false" title="访客管理信息" class="w-[70%]">
|
||||
<Descriptions v-if="unitDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<Descriptions v-if="visitorTodoDetail" size="small" :column="2" bordered :labelStyle="{width:'100px'}">
|
||||
<DescriptionsItem label="访客姓名">
|
||||
{{ unitDetail.visitorName }}
|
||||
{{ visitorTodoDetail.visitorName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="访客电话">
|
||||
{{ unitDetail.visitorPhone }}
|
||||
{{ visitorTodoDetail.visitorPhone }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="所属公司">
|
||||
{{ unitDetail.visitorUnit}}
|
||||
{{ visitorTodoDetail.visitorUnit}}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="被访人">
|
||||
{{ unitDetail.interviewedPerson }}
|
||||
{{ visitorTodoDetail.interviewedPerson }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="联系电话">
|
||||
{{ unitDetail.interviewedPhone }}
|
||||
{{ visitorTodoDetail.interviewedPhone }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="被访单位">
|
||||
{{ unitDetail.interviewedUnit }}
|
||||
{{ visitorTodoDetail.interviewedUnit }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="拜访事由">
|
||||
{{ unitDetail.visitingReason }}
|
||||
{{ visitorTodoDetail.visitingReason }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="拜访时间">
|
||||
{{ unitDetail.visitingBeginTime+' - '+unitDetail.visitingBeginTime }}
|
||||
{{ visitorTodoDetail.visitingBeginTime+' - '+visitorTodoDetail.visitingBeginTime }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="是否预约车位" v-if="unitDetail.bookingParkingSpace!=null">
|
||||
<DescriptionsItem label="是否预约车位" v-if="visitorTodoDetail.bookingParkingSpace!=null">
|
||||
<component
|
||||
:is="renderDict(unitDetail.bookingParkingSpace,'wy_parking_spot')"
|
||||
:is="renderDict(visitorTodoDetail.bookingParkingSpace,'wy_parking_spot')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="预约状态" v-if="unitDetail.serveStatus!=null">
|
||||
<DescriptionsItem label="车牌号">
|
||||
{{ visitorTodoDetail.licensePlate }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="预约状态" v-if="visitorTodoDetail.serveStatus!=null">
|
||||
<component
|
||||
:is="renderDict(unitDetail.serveStatus,'wy_appointment_tatus')"
|
||||
:is="renderDict(visitorTodoDetail.serveStatus,'wy_appointment_tatus')"
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="提交时间">
|
||||
{{ unitDetail.createTime }}
|
||||
{{ visitorTodoDetail.createTime }}
|
||||
</DescriptionsItem>
|
||||
</Descriptions>
|
||||
</BasicModal>
|
||||
|
@ -5,11 +5,12 @@ import { useVbenModal } from '@vben/common-ui';
|
||||
import { useBeforeCloseDiff } from '#/utils/popup';
|
||||
import { Switch, Transfer, Tree } from 'ant-design-vue';
|
||||
import { queryTree } from '#/api/sis/accessControl';
|
||||
import { authRecordAdd } from '#/api/sis/authRecord';
|
||||
import type { TreeNode } from '#/api/common';
|
||||
import type { AuthRecordForm } from '#/api/sis/authRecord/model';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
const title = ref('门禁授权');
|
||||
|
||||
const { onBeforeClose } = useBeforeCloseDiff({});
|
||||
|
||||
const [BasicModal, modalApi] = useVbenModal({
|
||||
@ -19,20 +20,29 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
onBeforeClose,
|
||||
onClosed: handleClosed,
|
||||
onConfirm: handleConfirm,
|
||||
onOpenChange: async (isOpen) => {
|
||||
if (!isOpen) {
|
||||
checked.value = false;
|
||||
targetKeys.value = []
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
async function handleConfirm() {
|
||||
try {
|
||||
modalApi.lock(true);
|
||||
|
||||
/*const { valid } = await formApi.validate();
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
await (isUpdate.value ? personLibImgUpdate(data) : personLibImgAdd(data));*/
|
||||
|
||||
// resetInitialized();
|
||||
const { ids, libId } = modalApi.getData() as {
|
||||
ids?: number[] | string[];
|
||||
libId: number | string;
|
||||
};
|
||||
const params: AuthRecordForm = {
|
||||
libId,
|
||||
imgIds: ids,
|
||||
acIds: targetKeys.value,
|
||||
issue: checked.value
|
||||
};
|
||||
const res = await authRecordAdd(params);
|
||||
console.log(res);
|
||||
emit('reload');
|
||||
modalApi.close();
|
||||
} catch (error) {
|
||||
@ -60,6 +70,10 @@ function handleTreeData(treeData: TreeNode[] | any[], datasource: TreeNode[]) {
|
||||
treeData.forEach((item) => {
|
||||
item.title = item.label;
|
||||
item.key = item.code;
|
||||
// 如果不是门禁,则
|
||||
if (item.level != 5) {
|
||||
item.disabled = true;
|
||||
}
|
||||
datasource.push(item);
|
||||
if (item.children) {
|
||||
handleTreeData(item.children, datasource);
|
||||
@ -102,7 +116,7 @@ function isChecked(
|
||||
<div class="p-4">
|
||||
<Transfer
|
||||
v-model:target-keys="targetKeys"
|
||||
class="tree-transfer h-[400px]"
|
||||
class="tree-transfer h-[400px] overflow-auto"
|
||||
:data-source="dataSource"
|
||||
:render="(item) => item.title"
|
||||
>
|
||||
|
@ -129,7 +129,9 @@ function handleDownloadExcel() {
|
||||
* 对图像进行门禁授权
|
||||
*/
|
||||
function accessControlAuth() {
|
||||
authModalApi.setData({});
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Required<PersonLibImgForm>) => row.id);
|
||||
authModalApi.setData({ ids, libId: rows[0].libId });
|
||||
authModalApi.open();
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user