diff --git a/apps/web-antd/src/api/property/meter/lightInfo/index.ts b/apps/web-antd/src/api/property/meter/lightInfo/index.ts new file mode 100644 index 00000000..2fadc30b --- /dev/null +++ b/apps/web-antd/src/api/property/meter/lightInfo/index.ts @@ -0,0 +1,61 @@ +import type { LightInfoVO, LightInfoForm, LightInfoQuery } 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 lightInfoList(params?: LightInfoQuery) { + return requestClient.get>('/property/lightInfo/list', { params }); +} + +/** + * 导出灯控开关信息列表 + * @param params + * @returns 灯控开关信息列表 + */ +export function lightInfoExport(params?: LightInfoQuery) { + return commonExport('/property/lightInfo/export', params ?? {}); +} + +/** + * 查询灯控开关信息详情 + * @param id id + * @returns 灯控开关信息详情 + */ +export function lightInfoInfo(id: ID) { + return requestClient.get(`/property/lightInfo/${id}`); +} + +/** + * 新增灯控开关信息 + * @param data + * @returns void + */ +export function lightInfoAdd(data: LightInfoForm) { + return requestClient.postWithMsg('/property/lightInfo', data); +} + +/** + * 更新灯控开关信息 + * @param data + * @returns void + */ +export function lightInfoUpdate(data: LightInfoForm) { + return requestClient.putWithMsg('/property/lightInfo', data); +} + +/** + * 删除灯控开关信息 + * @param id id + * @returns void + */ +export function lightInfoRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/lightInfo/${id}`); +} diff --git a/apps/web-antd/src/api/property/meter/lightInfo/model.d.ts b/apps/web-antd/src/api/property/meter/lightInfo/model.d.ts new file mode 100644 index 00000000..ef05cda9 --- /dev/null +++ b/apps/web-antd/src/api/property/meter/lightInfo/model.d.ts @@ -0,0 +1,134 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface LightInfoVO { + /** + * 主键id + */ + id: string | number; + + /** + * 位置描述 + */ + locationRemark: string; + + /** + * 开关状态(0:关,1:开) + */ + isOn: number; + + /** + * 灯控模块编码 + */ + code: number; + + /** + * 园区编码 + */ + communityId: string | number; + + /** + * 建筑名称 + */ + buildingId: string | number; + + /** + * 单元编码 + */ + unitId: string | number; + + /** + * 所属楼层ID + */ + floorId: string | number; + + /** + * 楼层 + */ + floorName: string; + +} + +export interface LightInfoForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 位置描述 + */ + locationRemark?: string; + + /** + * 开关状态(0:关,1:开) + */ + isOn?: number; + + /** + * 灯控模块编码 + */ + code?: number; + + /** + * 园区编码 + */ + communityId?: string | number; + + /** + * 建筑名称 + */ + buildingId?: string | number; + + /** + * 单元编码 + */ + unitId?: string | number; + + /** + * 所属楼层ID + */ + floorId?: string | number; + +} + +export interface LightInfoQuery extends PageQuery { + /** + * 位置描述 + */ + locationRemark?: string; + + /** + * 开关状态(0:关,1:开) + */ + isOn?: number; + + /** + * 灯控模块编码 + */ + code?: number; + + /** + * 园区编码 + */ + communityId?: string | number; + + /** + * 建筑名称 + */ + buildingId?: string | number; + + /** + * 单元编码 + */ + unitId?: string | number; + + /** + * 所属楼层ID + */ + floorId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/meter/lightInfo/data.ts b/apps/web-antd/src/views/property/meter/lightInfo/data.ts new file mode 100644 index 00000000..ac1f4be5 --- /dev/null +++ b/apps/web-antd/src/views/property/meter/lightInfo/data.ts @@ -0,0 +1,84 @@ +import type { FormSchemaGetter } from '#/adapter/form' +import type { VxeGridProps } from '#/adapter/vxe-table' + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'locationRemark', + label: '位置描述', + }, +] + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + // { + // title: '主键id', + // field: 'id', + // }, + { + title: '位置描述', + field: 'locationRemark', + }, + + { + title: '楼 层', + field: 'floorName', + }, + { + title: '开关状态', + field: 'isOn', + slots: { default: 'isOn' }, + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +] + +export const drawerSchema: FormSchemaGetter = () => [ + { + label: '主键id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '楼层', + fieldName: 'floorId', + component: 'TreeSelect', + defaultValue: undefined, + rules: 'required', + }, + { + label: '位置描述', + fieldName: 'locationRemark', + component: 'Input', + rules: 'required', + }, + { + label: '开关状态', + fieldName: 'isOn', + component: 'Switch', + rules: 'required', + defaultValue: false, + componentProps: { + class: 'w-auto', + }, + }, + { + label: '灯控模块编码', + fieldName: 'code', + component: 'Input', + rules: 'required', + }, + +] diff --git a/apps/web-antd/src/views/property/meter/lightInfo/index.vue b/apps/web-antd/src/views/property/meter/lightInfo/index.vue new file mode 100644 index 00000000..27854764 --- /dev/null +++ b/apps/web-antd/src/views/property/meter/lightInfo/index.vue @@ -0,0 +1,181 @@ + + + diff --git a/apps/web-antd/src/views/property/meter/lightInfo/lightInfo-drawer.vue b/apps/web-antd/src/views/property/meter/lightInfo/lightInfo-drawer.vue new file mode 100644 index 00000000..7ca503dc --- /dev/null +++ b/apps/web-antd/src/views/property/meter/lightInfo/lightInfo-drawer.vue @@ -0,0 +1,140 @@ + + + + diff --git a/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-modal.vue b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-modal.vue index 830da443..8e5dadef 100644 --- a/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-modal.vue +++ b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/visitorInvitation-modal.vue @@ -76,7 +76,6 @@ async function handleConfirm() { // 自定义深拷贝 const data = { ...cloneDeep(formValues), - facePictures: 1, visitingBeginTime: formValues.visitingTimeRange?.[0], visitingEndTime: formValues.visitingTimeRange?.[1], visitingTimeRange: undefined