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