预约记录

This commit is contained in:
FLL 2025-07-11 14:50:19 +08:00
parent af0cfc3804
commit 15581de676
6 changed files with 45 additions and 85 deletions

View File

@ -12,7 +12,7 @@ import { requestClient } from '#/api/request';
* @returns
*/
export function inspectionItemList(params?: InspectionItemQuery) {
return requestClient.get<PageResult<InspectionItemVO>>('/property/inspectionItem/list', { params });
return requestClient.get<PageResult<InspectionItemVO>>('/property/item/list', { params });
}
/**
@ -30,7 +30,7 @@ export function inspectionItemExport(params?: InspectionItemQuery) {
* @returns
*/
export function inspectionItemInfo(id: ID) {
return requestClient.get<InspectionItemVO>(`/property/inspectionItem/${id}`);
return requestClient.get<InspectionItemVO>(`/property/item/${id}`);
}
/**
@ -39,7 +39,7 @@ export function inspectionItemInfo(id: ID) {
* @returns void
*/
export function inspectionItemAdd(data: InspectionItemForm) {
return requestClient.postWithMsg<void>('/property/inspectionItem', data);
return requestClient.postWithMsg<void>('/property/item', data);
}
/**
@ -48,7 +48,7 @@ export function inspectionItemAdd(data: InspectionItemForm) {
* @returns void
*/
export function inspectionItemUpdate(data: InspectionItemForm) {
return requestClient.putWithMsg<void>('/property/inspectionItem', data);
return requestClient.putWithMsg<void>('/property/item', data);
}
/**
@ -57,5 +57,5 @@ export function inspectionItemUpdate(data: InspectionItemForm) {
* @returns void
*/
export function inspectionItemRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/inspectionItem/${id}`);
return requestClient.deleteWithMsg<void>(`/property/item/${id}`);
}

View File

@ -12,7 +12,7 @@ import { requestClient } from '#/api/request';
* @returns
*/
export function inspectionPointList(params?: InspectionPointQuery) {
return requestClient.get<PageResult<InspectionPointVO>>('/property/inspectionPoint/list', { params });
return requestClient.get<PageResult<InspectionPointVO>>('/property/point/list', { params });
}
/**
@ -30,7 +30,7 @@ export function inspectionPointExport(params?: InspectionPointQuery) {
* @returns
*/
export function inspectionPointInfo(id: ID) {
return requestClient.get<InspectionPointVO>(`/property/inspectionPoint/${id}`);
return requestClient.get<InspectionPointVO>(`/property/point/${id}`);
}
/**
@ -39,7 +39,7 @@ export function inspectionPointInfo(id: ID) {
* @returns void
*/
export function inspectionPointAdd(data: InspectionPointForm) {
return requestClient.postWithMsg<void>('/property/inspectionPoint', data);
return requestClient.postWithMsg<void>('/property/point', data);
}
/**
@ -48,7 +48,7 @@ export function inspectionPointAdd(data: InspectionPointForm) {
* @returns void
*/
export function inspectionPointUpdate(data: InspectionPointForm) {
return requestClient.putWithMsg<void>('/property/inspectionPoint', data);
return requestClient.putWithMsg<void>('/property/point', data);
}
/**
@ -57,5 +57,5 @@ export function inspectionPointUpdate(data: InspectionPointForm) {
* @returns void
*/
export function inspectionPointRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/inspectionPoint/${id}`);
return requestClient.deleteWithMsg<void>(`/property/point/${id}`);
}

View File

@ -3,11 +3,6 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'id',
label: '编号',
},
{
component: 'Input',
fieldName: 'itemName',
@ -20,7 +15,7 @@ export const querySchema: FormSchemaGetter = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '编号',
title: '项目编号',
field: 'id',
},
{

View File

@ -130,10 +130,11 @@ function handleDownloadExcel() {
<template #toolbar-tools>
<Space>
<a-button
type="primary"
v-access:code="['property:inspectionItem:export']"
@click="handleDownloadExcel"
>
{{ $t('pages.common.export') }}
{{ '文档' }}
</a-button>
<a-button
:disabled="!vxeCheckboxChecked(tableApi)"

View File

@ -1,13 +1,11 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import {getDictOptions} from "#/utils/dict";
import {inspectionItemList} from "#/api/property/inspectionManagement/inspectionItem";
import {renderDict} from "#/utils/render";
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'itemId',
label: '巡检项目id',
},
{
component: 'Input',
fieldName: 'pointName',
@ -16,44 +14,17 @@ export const querySchema: FormSchemaGetter = () => [
{
component: 'Select',
componentProps: {
options: getDictOptions('inspection_point_type'),
},
fieldName: 'pointType',
label: '巡检点类型',
},
{
component: 'Input',
fieldName: 'nfcCode',
label: 'nfc编码',
},
{
component: 'Input',
fieldName: 'createById',
label: '创建人id',
},
{
component: 'Input',
fieldName: 'updateById',
label: '更新人id',
},
{
component: 'Input',
fieldName: 'searchValue',
label: '搜索值',
},
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '主键id',
field: 'id',
},
{
title: '巡检项目id',
field: 'itemId',
},
{
title: '巡检点名称',
field: 'pointName',
@ -61,27 +32,28 @@ export const columns: VxeGridProps['columns'] = [
{
title: '巡检点类型',
field: 'pointType',
slots: {
default: ({ row }) => {
return renderDict(row.pointType, 'inspection_point_type');
},
},
},
{
title: '巡检项目',
field: 'itemId',
},
{
title: 'nfc编码',
field: 'nfcCode',
},
{
title: '创建时间',
field: 'createTime',
},
{
title: '备注',
field: 'remark',
},
{
title: '创建人id',
field: 'createById',
},
{
title: '更新人id',
field: 'updateById',
},
{
title: '搜索值',
field: 'searchValue',
},
{
field: 'action',
fixed: 'right',
@ -101,12 +73,6 @@ export const modalSchema: FormSchemaGetter = () => [
triggerFields: [''],
},
},
{
label: '巡检项目id',
fieldName: 'itemId',
component: 'Input',
rules: 'required',
},
{
label: '巡检点名称',
fieldName: 'pointName',
@ -118,9 +84,22 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'pointType',
component: 'Select',
componentProps: {
options: getDictOptions('inspection_point_type'),
},
rules: 'selectRequired',
},
{
label: '巡检项目',
fieldName: 'itemId',
component: 'ApiSelect',
componentProps: {
api: inspectionItemList,
resultField: 'rows',
labelField: 'itemName',
valueField: 'id',
},
rules: 'required',
},
{
label: 'nfc编码',
fieldName: 'nfcCode',
@ -131,19 +110,4 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'remark',
component: 'Textarea',
},
{
label: '创建人id',
fieldName: 'createById',
component: 'Input',
},
{
label: '更新人id',
fieldName: 'updateById',
component: 'Input',
},
{
label: '搜索值',
fieldName: 'searchValue',
component: 'Input',
},
];

View File

@ -21,7 +21,7 @@ const title = computed(() => {
const [BasicForm, formApi] = useVbenForm({
commonConfig: {
//
formItemClass: 'col-span-2',
formItemClass: 'col-span-1',
// label px
labelWidth: 80,
//
@ -43,7 +43,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
const [BasicModal, modalApi] = useVbenModal({
//
class: 'w-[550px]',
class: 'w-[60%]',
fullscreenButton: false,
onBeforeClose,
onClosed: handleClosed,