From ed2e88b99e597398d291256fcff8cb117418fa42 Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Thu, 10 Jul 2025 08:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=B5=E6=A2=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/sis/elevatorInfo/index.ts | 61 ++++ .../src/api/sis/elevatorInfo/model.d.ts | 294 ++++++++++++++++++ .../src/views/sis/elevatorInfo/data.ts | 231 ++++++++++++++ .../sis/elevatorInfo/elevatorInfo-modal.vue | 142 +++++++++ .../src/views/sis/elevatorInfo/index.vue | 182 +++++++++++ apps/web-antd/vite.config.mts | 3 +- 6 files changed, 912 insertions(+), 1 deletion(-) create mode 100644 apps/web-antd/src/api/sis/elevatorInfo/index.ts create mode 100644 apps/web-antd/src/api/sis/elevatorInfo/model.d.ts create mode 100644 apps/web-antd/src/views/sis/elevatorInfo/data.ts create mode 100644 apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue create mode 100644 apps/web-antd/src/views/sis/elevatorInfo/index.vue diff --git a/apps/web-antd/src/api/sis/elevatorInfo/index.ts b/apps/web-antd/src/api/sis/elevatorInfo/index.ts new file mode 100644 index 00000000..83501334 --- /dev/null +++ b/apps/web-antd/src/api/sis/elevatorInfo/index.ts @@ -0,0 +1,61 @@ +import type { ElevatorInfoVO, ElevatorInfoForm, ElevatorInfoQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询电梯基本信息列表 +* @param params +* @returns 电梯基本信息列表 +*/ +export function elevatorInfoList(params?: ElevatorInfoQuery) { + return requestClient.get>('/sis/elevatorInfo/list', { params }); +} + +/** + * 导出电梯基本信息列表 + * @param params + * @returns 电梯基本信息列表 + */ +export function elevatorInfoExport(params?: ElevatorInfoQuery) { + return commonExport('/sis/elevatorInfo/export', params ?? {}); +} + +/** + * 查询电梯基本信息详情 + * @param elevatorId id + * @returns 电梯基本信息详情 + */ +export function elevatorInfoInfo(elevatorId: ID) { + return requestClient.get(`/sis/elevatorInfo/${elevatorId}`); +} + +/** + * 新增电梯基本信息 + * @param data + * @returns void + */ +export function elevatorInfoAdd(data: ElevatorInfoForm) { + return requestClient.postWithMsg('/sis/elevatorInfo', data); +} + +/** + * 更新电梯基本信息 + * @param data + * @returns void + */ +export function elevatorInfoUpdate(data: ElevatorInfoForm) { + return requestClient.putWithMsg('/sis/elevatorInfo', data); +} + +/** + * 删除电梯基本信息 + * @param elevatorId id + * @returns void + */ +export function elevatorInfoRemove(elevatorId: ID | IDS) { + return requestClient.deleteWithMsg(`/sis/elevatorInfo/${elevatorId}`); +} diff --git a/apps/web-antd/src/api/sis/elevatorInfo/model.d.ts b/apps/web-antd/src/api/sis/elevatorInfo/model.d.ts new file mode 100644 index 00000000..f9fe457a --- /dev/null +++ b/apps/web-antd/src/api/sis/elevatorInfo/model.d.ts @@ -0,0 +1,294 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface ElevatorInfoVO { + /** + * + */ + elevatorId: string | number; + + /** + * 电梯编号 + */ + elevatorCode: string; + + /** + * 电梯名称 + */ + elevatorName: string; + + /** + * 安装位置 + */ + location: string; + + /** + * 品牌 + */ + brand: string; + + /** + * 型号 + */ + model: string; + + /** + * 生产日期 + */ + manufactureDate: string; + + /** + * 安装日期 + */ + installationDate: string; + + /** + * 最大载重(kg) + */ + maxLoad: number; + + /** + * 服务楼层数 + */ + floorsServed: number; + + /** + * 维保公司 + */ + maintenanceCompany: string; + + /** + * 维保电话 + */ + maintenancePhone: string; + + /** + * 上次年检日期 + */ + lastInspectionDate: string; + + /** + * 下次年检日期 + */ + nextInspectionDate: string; + + /** + * 梯控厂商 + */ + controlFactory: string; + + /** + * 梯控设备ip + */ + controlIp: string; + + /** + * 梯控设备编码 + */ + controlPort: number; + + /** + * 梯控设备登录账号 + */ + controlAccount: string; + + /** + * 梯控设备登录密码 + */ + controlPwd: string; + +} + +export interface ElevatorInfoForm extends BaseEntity { + /** + * + */ + elevatorId?: string | number; + + /** + * 电梯编号 + */ + elevatorCode?: string; + + /** + * 电梯名称 + */ + elevatorName?: string; + + /** + * 安装位置 + */ + location?: string; + + /** + * 品牌 + */ + brand?: string; + + /** + * 型号 + */ + model?: string; + + /** + * 生产日期 + */ + manufactureDate?: string; + + /** + * 安装日期 + */ + installationDate?: string; + + /** + * 最大载重(kg) + */ + maxLoad?: number; + + /** + * 服务楼层数 + */ + floorsServed?: number; + + /** + * 维保公司 + */ + maintenanceCompany?: string; + + /** + * 维保电话 + */ + maintenancePhone?: string; + + /** + * 上次年检日期 + */ + lastInspectionDate?: string; + + /** + * 下次年检日期 + */ + nextInspectionDate?: string; + + /** + * 梯控厂商 + */ + controlFactory?: string; + + /** + * 梯控设备ip + */ + controlIp?: string; + + /** + * 梯控设备编码 + */ + controlPort?: number; + + /** + * 梯控设备登录账号 + */ + controlAccount?: string; + + /** + * 梯控设备登录密码 + */ + controlPwd?: string; + +} + +export interface ElevatorInfoQuery extends PageQuery { + /** + * 电梯编号 + */ + elevatorCode?: string; + + /** + * 电梯名称 + */ + elevatorName?: string; + + /** + * 安装位置 + */ + location?: string; + + /** + * 品牌 + */ + brand?: string; + + /** + * 型号 + */ + model?: string; + + /** + * 生产日期 + */ + manufactureDate?: string; + + /** + * 安装日期 + */ + installationDate?: string; + + /** + * 最大载重(kg) + */ + maxLoad?: number; + + /** + * 服务楼层数 + */ + floorsServed?: number; + + /** + * 维保公司 + */ + maintenanceCompany?: string; + + /** + * 维保电话 + */ + maintenancePhone?: string; + + /** + * 上次年检日期 + */ + lastInspectionDate?: string; + + /** + * 下次年检日期 + */ + nextInspectionDate?: string; + + /** + * 梯控厂商 + */ + controlFactory?: string; + + /** + * 梯控设备ip + */ + controlIp?: string; + + /** + * 梯控设备编码 + */ + controlPort?: number; + + /** + * 梯控设备登录账号 + */ + controlAccount?: string; + + /** + * 梯控设备登录密码 + */ + controlPwd?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/sis/elevatorInfo/data.ts b/apps/web-antd/src/views/sis/elevatorInfo/data.ts new file mode 100644 index 00000000..bc9b3a52 --- /dev/null +++ b/apps/web-antd/src/views/sis/elevatorInfo/data.ts @@ -0,0 +1,231 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'elevatorCode', + label: '电梯编号', + }, + { + component: 'Input', + fieldName: 'elevatorName', + label: '电梯名称', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '电梯编号', + field: 'elevatorCode', + }, + { + title: '电梯名称', + field: 'elevatorName', + }, + { + title: '安装位置', + field: 'location', + }, + { + title: '品牌', + field: 'brand', + }, + { + title: '型号', + field: 'model', + }, + { + title: '生产日期', + field: 'manufactureDate', + }, + { + title: '安装日期', + field: 'installationDate', + }, + { + title: '最大载重(kg)', + field: 'maxLoad', + }, + { + title: '服务楼层数', + field: 'floorsServed', + }, + { + title: '维保公司', + field: 'maintenanceCompany', + }, + /*{ + title: '维保电话', + field: 'maintenancePhone', + }, + { + title: '上次年检日期', + field: 'lastInspectionDate', + }, + { + title: '下次年检日期', + field: 'nextInspectionDate', + },*/ + { + title: '梯控厂商', + field: 'controlFactory', + }, + { + title: '梯控ip', + field: 'controlIp', + }, + { + title: '梯控端口', + field: 'controlPort', + }, + { + title: '梯控账号', + field: 'controlAccount', + }, + { + title: '梯控密码', + field: 'controlPwd', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '', + fieldName: 'elevatorId', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '电梯名称', + fieldName: 'elevatorName', + component: 'Input', + rules: 'required', + }, + { + component: 'TreeSelect', + fieldName: 'unitId', + defaultValue: undefined, + label: '社区建筑', + rules: 'selectRequired', + }, + { + label: '安装位置', + fieldName: 'location', + component: 'Input', + rules: 'required', + }, + { + label: '品牌', + fieldName: 'brand', + component: 'Input', + }, + { + label: '型号', + fieldName: 'model', + component: 'Input', + }, + { + label: '生产日期', + fieldName: 'manufactureDate', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '安装日期', + fieldName: 'installationDate', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '最大载重(kg)', + fieldName: 'maxLoad', + component: 'Input', + }, + { + label: '服务楼层数', + fieldName: 'floorsServed', + component: 'Input', + }, + { + label: '维保公司', + fieldName: 'maintenanceCompany', + component: 'Input', + }, + /* { + label: '维保电话', + fieldName: 'maintenancePhone', + component: 'Input', + }, + { + label: '上次年检日期', + fieldName: 'lastInspectionDate', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '下次年检日期', + fieldName: 'nextInspectionDate', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + },*/ + { + label: '梯控厂商', + fieldName: 'controlFactory', + component: 'Input', + rules: 'required', + }, + { + label: '梯控ip', + fieldName: 'controlIp', + component: 'Input', + rules: 'required', + }, + { + label: '梯控端口', + fieldName: 'controlPort', + component: 'Input', + rules: 'required', + }, + { + label: '梯控账号', + fieldName: 'controlAccount', + component: 'Input', + rules: 'required', + }, + { + label: '梯控密码', + fieldName: 'controlPwd', + component: 'Input', + rules: 'required', + }, +]; diff --git a/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue b/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue new file mode 100644 index 00000000..32c2b403 --- /dev/null +++ b/apps/web-antd/src/views/sis/elevatorInfo/elevatorInfo-modal.vue @@ -0,0 +1,142 @@ + + + + diff --git a/apps/web-antd/src/views/sis/elevatorInfo/index.vue b/apps/web-antd/src/views/sis/elevatorInfo/index.vue new file mode 100644 index 00000000..721e23db --- /dev/null +++ b/apps/web-antd/src/views/sis/elevatorInfo/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index b9b62d33..24d61422 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -28,7 +28,8 @@ export default defineConfig(async () => { changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), // mock代理目标地址 - target: 'http://192.168.43.169:8080', + // target: 'http://192.168.43.169:8080', + target: 'http://127.0.0.1:8080', // target: 'http://192.168.0.108:8080', // target: 'http://192.168.0.106:8080', // target: 'http://47.109.37.87:3010',