预约记录
This commit is contained in:
parent
af0cfc3804
commit
15581de676
@ -12,7 +12,7 @@ import { requestClient } from '#/api/request';
|
|||||||
* @returns 巡检项目列表
|
* @returns 巡检项目列表
|
||||||
*/
|
*/
|
||||||
export function inspectionItemList(params?: InspectionItemQuery) {
|
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 巡检项目详情
|
* @returns 巡检项目详情
|
||||||
*/
|
*/
|
||||||
export function inspectionItemInfo(id: ID) {
|
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
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function inspectionItemAdd(data: InspectionItemForm) {
|
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
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function inspectionItemUpdate(data: InspectionItemForm) {
|
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
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function inspectionItemRemove(id: ID | IDS) {
|
export function inspectionItemRemove(id: ID | IDS) {
|
||||||
return requestClient.deleteWithMsg<void>(`/property/inspectionItem/${id}`);
|
return requestClient.deleteWithMsg<void>(`/property/item/${id}`);
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import { requestClient } from '#/api/request';
|
|||||||
* @returns 巡检点列表
|
* @returns 巡检点列表
|
||||||
*/
|
*/
|
||||||
export function inspectionPointList(params?: InspectionPointQuery) {
|
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 巡检点详情
|
* @returns 巡检点详情
|
||||||
*/
|
*/
|
||||||
export function inspectionPointInfo(id: ID) {
|
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
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function inspectionPointAdd(data: InspectionPointForm) {
|
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
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function inspectionPointUpdate(data: InspectionPointForm) {
|
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
|
* @returns void
|
||||||
*/
|
*/
|
||||||
export function inspectionPointRemove(id: ID | IDS) {
|
export function inspectionPointRemove(id: ID | IDS) {
|
||||||
return requestClient.deleteWithMsg<void>(`/property/inspectionPoint/${id}`);
|
return requestClient.deleteWithMsg<void>(`/property/point/${id}`);
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,6 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
|
|||||||
|
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'id',
|
|
||||||
label: '编号',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
fieldName: 'itemName',
|
fieldName: 'itemName',
|
||||||
@ -20,7 +15,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
{
|
||||||
title: '编号',
|
title: '项目编号',
|
||||||
field: 'id',
|
field: 'id',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -130,10 +130,11 @@ function handleDownloadExcel() {
|
|||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<Space>
|
<Space>
|
||||||
<a-button
|
<a-button
|
||||||
|
type="primary"
|
||||||
v-access:code="['property:inspectionItem:export']"
|
v-access:code="['property:inspectionItem:export']"
|
||||||
@click="handleDownloadExcel"
|
@click="handleDownloadExcel"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.export') }}
|
{{ '文档' }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
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 = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'itemId',
|
|
||||||
label: '巡检项目id',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
fieldName: 'pointName',
|
fieldName: 'pointName',
|
||||||
@ -16,44 +14,17 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('inspection_point_type'),
|
||||||
},
|
},
|
||||||
fieldName: 'pointType',
|
fieldName: 'pointType',
|
||||||
label: '巡检点类型',
|
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形式 否则切换语言不会刷新
|
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
|
||||||
title: '主键id',
|
|
||||||
field: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '巡检项目id',
|
|
||||||
field: 'itemId',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '巡检点名称',
|
title: '巡检点名称',
|
||||||
field: 'pointName',
|
field: 'pointName',
|
||||||
@ -61,27 +32,28 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{
|
{
|
||||||
title: '巡检点类型',
|
title: '巡检点类型',
|
||||||
field: 'pointType',
|
field: 'pointType',
|
||||||
|
slots: {
|
||||||
|
default: ({ row }) => {
|
||||||
|
return renderDict(row.pointType, 'inspection_point_type');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '巡检项目',
|
||||||
|
field: 'itemId',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'nfc编码',
|
title: 'nfc编码',
|
||||||
field: 'nfcCode',
|
field: 'nfcCode',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
field: 'createTime',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '备注',
|
title: '备注',
|
||||||
field: 'remark',
|
field: 'remark',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '创建人id',
|
|
||||||
field: 'createById',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '更新人id',
|
|
||||||
field: 'updateById',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '搜索值',
|
|
||||||
field: 'searchValue',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@ -101,12 +73,6 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
triggerFields: [''],
|
triggerFields: [''],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '巡检项目id',
|
|
||||||
fieldName: 'itemId',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '巡检点名称',
|
label: '巡检点名称',
|
||||||
fieldName: 'pointName',
|
fieldName: 'pointName',
|
||||||
@ -118,9 +84,22 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
fieldName: 'pointType',
|
fieldName: 'pointType',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
options: getDictOptions('inspection_point_type'),
|
||||||
},
|
},
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '巡检项目',
|
||||||
|
fieldName: 'itemId',
|
||||||
|
component: 'ApiSelect',
|
||||||
|
componentProps: {
|
||||||
|
api: inspectionItemList,
|
||||||
|
resultField: 'rows',
|
||||||
|
labelField: 'itemName',
|
||||||
|
valueField: 'id',
|
||||||
|
},
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'nfc编码',
|
label: 'nfc编码',
|
||||||
fieldName: 'nfcCode',
|
fieldName: 'nfcCode',
|
||||||
@ -131,19 +110,4 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
fieldName: 'remark',
|
fieldName: 'remark',
|
||||||
component: 'Textarea',
|
component: 'Textarea',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '创建人id',
|
|
||||||
fieldName: 'createById',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '更新人id',
|
|
||||||
fieldName: 'updateById',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '搜索值',
|
|
||||||
fieldName: 'searchValue',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
@ -21,7 +21,7 @@ const title = computed(() => {
|
|||||||
const [BasicForm, formApi] = useVbenForm({
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
// 默认占满两列
|
// 默认占满两列
|
||||||
formItemClass: 'col-span-2',
|
formItemClass: 'col-span-1',
|
||||||
// 默认label宽度 px
|
// 默认label宽度 px
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
// 通用配置项 会影响到所有表单项
|
// 通用配置项 会影响到所有表单项
|
||||||
@ -43,7 +43,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
|||||||
|
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
// 在这里更改宽度
|
// 在这里更改宽度
|
||||||
class: 'w-[550px]',
|
class: 'w-[60%]',
|
||||||
fullscreenButton: false,
|
fullscreenButton: false,
|
||||||
onBeforeClose,
|
onBeforeClose,
|
||||||
onClosed: handleClosed,
|
onClosed: handleClosed,
|
||||||
|
Loading…
Reference in New Issue
Block a user