From 6f987f29ef61c1e888084da2409768e8ad7ca36b Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Sat, 6 Sep 2025 00:49:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../energyManagement/meterRecord/index.ts | 24 +- .../energyManagement/meterRecord/model.d.ts | 81 +++--- .../dashboard/analytics/analytics-trends.vue | 38 +-- .../analytics/analytics-visits-data.vue | 43 ++- .../analytics/analytics-visits-sales.vue | 44 ++- .../analytics/analytics-visits-source.vue | 50 +++- .../src/views/dashboard/analytics/index.vue | 265 ++++++++---------- .../src/views/property/building/data.tsx | 50 ++-- .../src/views/property/community/data.ts | 55 ++-- .../web-antd/src/views/property/floor/data.ts | 54 ++-- apps/web-antd/src/views/property/room/data.ts | 33 +-- 11 files changed, 388 insertions(+), 349 deletions(-) diff --git a/apps/web-antd/src/api/property/energyManagement/meterRecord/index.ts b/apps/web-antd/src/api/property/energyManagement/meterRecord/index.ts index a9465c99..e0db5b01 100644 --- a/apps/web-antd/src/api/property/energyManagement/meterRecord/index.ts +++ b/apps/web-antd/src/api/property/energyManagement/meterRecord/index.ts @@ -1,4 +1,9 @@ -import type { MeterRecordVO, MeterRecordForm, MeterRecordQuery, MeterRecordTrend } from './model'; +import type { + MeterRecordVO, + MeterRecordForm, + MeterRecordQuery, + MeterRecordTrend, +} from './model'; import type { ID, IDS } from '#/api/common'; import type { PageResult } from '#/api/common'; @@ -7,12 +12,15 @@ import { commonExport } from '#/api/helper'; import { requestClient } from '#/api/request'; /** -* 查询抄表记录列表 -* @param params -* @returns 抄表记录列表 -*/ + * 查询抄表记录列表 + * @param params + * @returns 抄表记录列表 + */ export function meterRecordList(params?: MeterRecordQuery) { - return requestClient.get>('/property/meterRecord/list', { params }); + return requestClient.get>( + '/property/meterRecord/list', + { params }, + ); } /** @@ -62,10 +70,10 @@ export function meterRecordRemove(id: ID | IDS) { /** * 获取用电/气/水趋势分析数据 - * + * * @param params * @returns 用电/气/水趋势分析数据 */ export function meterRecordTrend(params: MeterRecordTrend) { - return requestClient.get('/property/meterRecord/trend', { params }); + return requestClient.get('/property/meterRecord/trend', { params }); } diff --git a/apps/web-antd/src/api/property/energyManagement/meterRecord/model.d.ts b/apps/web-antd/src/api/property/energyManagement/meterRecord/model.d.ts index a5d60084..de68f989 100644 --- a/apps/web-antd/src/api/property/energyManagement/meterRecord/model.d.ts +++ b/apps/web-antd/src/api/property/energyManagement/meterRecord/model.d.ts @@ -1,182 +1,179 @@ -import type { PageQuery, BaseEntity } from '#/api/common' +import type { PageQuery, BaseEntity } from '#/api/common'; export interface MeterRecordVO { /** * 记录ID */ - id: string | number + id: string | number; /** * 仪表编号 */ - meterId: string | number + meterId: string | number; /** - * 仪表类型 - */ - meterType: string | number + * 仪表类型 + */ + meterType: string | number; /** * 抄表员ID */ - readerId: string | number + readerId: string | number; /** * 抄表时间 */ - readingTime: string + readingTime: string; /** * 当前读数 */ - currentReading: number + currentReading: number; /** * 上次读数 */ - previousReading: number + previousReading: number; /** * 用量 */ - consumption: number + consumption: number; /** * 抄表方式(1手动 2自动 3用户上报) */ - readingMethod: number + readingMethod: number; /** * 抄表照片 */ - imgOssid: string | number - + imgOssid: string | number; } export interface MeterRecordForm extends BaseEntity { /** * 记录ID */ - id?: string | number + id?: string | number; /** * 仪表编号 */ - meterId?: string | number + meterId?: string | number; /** * 抄表员ID */ - readerId?: string | number + readerId?: string | number; /** * 抄表时间 */ - readingTime?: string + readingTime?: string; /** * 当前读数 */ - currentReading?: number + currentReading?: number; /** * 上次读数 */ - previousReading?: number + previousReading?: number; /** * 用量 */ - consumption?: number + consumption?: number; /** * 抄表方式(1手动 2自动 3用户上报) */ - readingMethod?: number + readingMethod?: number; /** * 抄表照片 */ - imgOssid?: string | number - + imgOssid?: string | number; } export interface MeterRecordQuery extends PageQuery { /** * 仪表编号 */ - meterId?: string | number + meterId?: string | number; /** * 抄表员ID */ - readerId?: string | number + readerId?: string | number; /** * 抄表时间 */ - readingTime?: string + readingTime?: string; /** * 当前读数 */ - currentReading?: number + currentReading?: number; /** * 上次读数 */ - previousReading?: number + previousReading?: number; /** * 用量 */ - consumption?: number + consumption?: number; /** * 抄表方式(1手动 2自动 3用户上报) */ - readingMethod?: number + readingMethod?: number; /** * 抄表照片 */ - imgOssid?: string | number + imgOssid?: string | number; /** - * 日期范围参数 - */ - params?: any + * 日期范围参数 + */ + params?: any; } - export interface MeterRecordTrend { /** * 仪表类型 */ - meterType?: string | number + meterType?: string | number; /** * 仪表ID */ - meterId: string | number + meterId: any; /** * 楼层ID */ - floorId: string | number + floorId: any; /** * 日期 */ - day?: string + day?: string; /** * 月份 */ - month?: string + month?: string; /** * 年份 */ - year?: string + year?: string; } diff --git a/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue b/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue index 0114fe95..353d4c96 100644 --- a/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue +++ b/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue @@ -2,43 +2,32 @@ import type { EchartsUIType } from '@vben/plugins/echarts'; import { EchartsUI, useEcharts } from '@vben/plugins/echarts'; -import { onMounted, ref } from 'vue'; +import { onMounted, ref, defineExpose } from 'vue'; import { meterRecordTrend } from '#/api/property/energyManagement/meterRecord'; import dayjs from 'dayjs'; - const chartRef = ref(); const { renderEcharts } = useEcharts(chartRef); // 添加日期选择相关逻辑 const selectedDate = ref(dayjs().format('YYYY-MM')); // 获取当月天数 -const getDaysInMonth = (date: string) => { +const getDaysInMonth = (date: any) => { const year = parseInt(date.split('-')[0]); const month = parseInt(date.split('-')[1]); const daysInMonth = new Date(year, month, 0).getDate(); return Array.from({ length: daysInMonth }, (_, i) => i + 1); }; - -const handleDateChange = () => { - console.log('selectedDate', selectedDate.value); - - getMeterRecordTrend(); -}; -const getMeterRecordTrend = async () => { - const res = await meterRecordTrend( - { - day: dayjs().format('YYYY-MM-DD'), - month: selectedDate.value || dayjs().format('YYYY-MM'), +const getMeterRecordTrend = async (selectedDate: any) => { + const res = await meterRecordTrend({ + day: dayjs().format('YYYY-MM-DD'), + month: selectedDate.value, year: dayjs().format('YYYY'), meterType: 1, meterId: null, floorId: null, - } - ); -console.log(res); + }); // 处理返回的数据 const chartData = res.day.nowMonth.data || []; -console.log(chartData); // 创建一个映射,将日期和数值对应起来 const dataMap: Record = {}; @@ -50,7 +39,7 @@ console.log(chartData); const days = getDaysInMonth(selectedDate.value); // 为没有数据的日期填充0,构建完整的数据数组 - const seriesData = days.map(day => { + const seriesData = days.map((day) => { return parseFloat(dataMap[day.toString()] || '0'); }); renderEcharts({ @@ -70,7 +59,7 @@ console.log(chartData); }, smooth: true, type: 'line', - } + }, ], tooltip: { axisPointer: { @@ -120,13 +109,16 @@ console.log(chartData); }); }; onMounted(async () => { -getMeterRecordTrend(); + getMeterRecordTrend(selectedDate); +}); +// 暴露方法给父组件调用 +defineExpose({ + getMeterRecordTrend, }); - diff --git a/apps/web-antd/src/views/dashboard/analytics/analytics-visits-data.vue b/apps/web-antd/src/views/dashboard/analytics/analytics-visits-data.vue index c993f834..e61485e9 100644 --- a/apps/web-antd/src/views/dashboard/analytics/analytics-visits-data.vue +++ b/apps/web-antd/src/views/dashboard/analytics/analytics-visits-data.vue @@ -2,12 +2,35 @@ import type { EchartsUIType } from '@vben/plugins/echarts'; import { EchartsUI, useEcharts } from '@vben/plugins/echarts'; -import { onMounted, ref } from 'vue'; +import { watch, onMounted, ref, defineProps, computed } from 'vue'; const chartRef = ref(); const { renderEcharts } = useEcharts(chartRef); +const props = defineProps<{ + statisticsData?: any[]; // 根据实际数据结构调整类型 +}>(); +// 在组件顶层定义 computed 属性 +const chartData = computed(() => { + if (!props.statisticsData) return []; + return props.statisticsData.map((item) => ({ + name: item.typeName, + value: item.total, + })); +}); -onMounted(() => { +// 监听数据变化,重新渲染图表 +watch( + () => props.statisticsData, + (newData) => { + if (newData) { + updateChart(); + } + }, + { immediate: true }, +); + +// 封装图表更新逻辑 +const updateChart = () => { renderEcharts({ legend: { bottom: '2%', @@ -22,12 +45,7 @@ onMounted(() => { animationType: 'scale', avoidLabelOverlap: false, color: ['#5ab1ef', '#b6a2de', '#67e0e3', '#2ec7c9'], - data: [ - { name: '搜索引擎', value: 1048 }, - { name: '直接访问', value: 735 }, - { name: '邮件营销', value: 580 }, - // { name: '联盟广告', value: 484 }, - ], + data: chartData.value, emphasis: { label: { fontSize: '12', @@ -42,7 +60,7 @@ onMounted(() => { labelLine: { show: false, }, - name: '访问来源', + name: '预警类型', type: 'pie', }, ], @@ -50,6 +68,13 @@ onMounted(() => { trigger: 'item', }, }); +}; + +onMounted(() => { + // 组件挂载时尝试更新图表 + if (props.statisticsData) { + updateChart(); + } }); diff --git a/apps/web-antd/src/views/dashboard/analytics/analytics-visits-sales.vue b/apps/web-antd/src/views/dashboard/analytics/analytics-visits-sales.vue index f38b5c03..b333bb2b 100644 --- a/apps/web-antd/src/views/dashboard/analytics/analytics-visits-sales.vue +++ b/apps/web-antd/src/views/dashboard/analytics/analytics-visits-sales.vue @@ -2,12 +2,34 @@ import type { EchartsUIType } from '@vben/plugins/echarts'; import { EchartsUI, useEcharts } from '@vben/plugins/echarts'; -import { onMounted, ref } from 'vue'; +import { watch, onMounted, ref, defineProps, computed } from 'vue'; +const props = defineProps<{ + workData?: any[]; // 根据实际数据结构调整类型 +}>(); const chartRef = ref(); const { renderEcharts } = useEcharts(chartRef); +const chartData = computed(() => { + if (!props.workData) return []; + return props.workData.map((item) => ({ + name: item.type, + value: item.quantity, + })); +}); -onMounted(() => { +// 监听数据变化,重新渲染图表 +watch( + () => props.workData, + (newData) => { + if (newData) { + updateChart(); + } + }, + { immediate: true }, +); + +// 封装图表更新逻辑 +const updateChart = () => { renderEcharts({ series: [ { @@ -18,15 +40,8 @@ onMounted(() => { animationType: 'scale', center: ['50%', '50%'], color: ['#5ab1ef', '#b6a2de', '#67e0e3', '#2ec7c9'], - data: [ - { name: '外包', value: 500 }, - { name: '定制', value: 310 }, - { name: '技术支持', value: 274 }, - { name: '远程', value: 400 }, - ].sort((a, b) => { - return a.value - b.value; - }), - name: '商业占比', + data: chartData.value, + name: '工单类型', radius: '80%', roseType: 'radius', type: 'pie', @@ -37,6 +52,13 @@ onMounted(() => { trigger: 'item', }, }); +}; + +onMounted(() => { + // 组件挂载时尝试更新图表 + if (props.workData) { + updateChart(); + } }); diff --git a/apps/web-antd/src/views/dashboard/analytics/analytics-visits-source.vue b/apps/web-antd/src/views/dashboard/analytics/analytics-visits-source.vue index fd3bf104..e2025cfb 100644 --- a/apps/web-antd/src/views/dashboard/analytics/analytics-visits-source.vue +++ b/apps/web-antd/src/views/dashboard/analytics/analytics-visits-source.vue @@ -2,12 +2,41 @@ import type { EchartsUIType } from '@vben/plugins/echarts'; import { EchartsUI, useEcharts } from '@vben/plugins/echarts'; -import { onMounted, ref } from 'vue'; +import { watch, onMounted, ref, defineProps, computed } from 'vue'; +const props = defineProps<{ + statusData?: any[]; // 根据实际数据结构调整类型 +}>(); const chartRef = ref(); const { renderEcharts } = useEcharts(chartRef); +const chartData = computed(() => { + if (!props.statusData) return []; + return props.statusData.map((item) => ({ + name: + item.state == 0 + ? '使用中' + : item.state == 1 + ? '停用中' + : item.state == 2 + ? '已报废' + : '闲置中', + value: item.quantity, + })); +}); -onMounted(() => { +// 监听数据变化,重新渲染图表 +watch( + () => props.statusData, + (newData) => { + if (newData) { + updateChart(); + } + }, + { immediate: true }, +); + +// 封装图表更新逻辑 +const updateChart = () => { renderEcharts({ legend: { bottom: '2%', @@ -22,12 +51,7 @@ onMounted(() => { animationType: 'scale', avoidLabelOverlap: false, color: ['#5ab1ef', '#b6a2de', '#67e0e3', '#2ec7c9'], - data: [ - { name: '搜索引擎', value: 1048 }, - { name: '直接访问', value: 735 }, - { name: '邮件营销', value: 580 }, - // { name: '联盟广告', value: 484 }, - ], + data: chartData.value, emphasis: { label: { fontSize: '12', @@ -47,7 +71,7 @@ onMounted(() => { labelLine: { show: false, }, - name: '访问来源', + name: '设备状态', radius: ['40%', '65%'], type: 'pie', }, @@ -56,6 +80,14 @@ onMounted(() => { trigger: 'item', }, }); +}; + +onMounted(() => { + console.log('Child component mounted, props:', props.statusData); + // 组件挂载时尝试更新图表 + if (props.statusData) { + updateChart(); + } }); diff --git a/apps/web-antd/src/views/dashboard/analytics/index.vue b/apps/web-antd/src/views/dashboard/analytics/index.vue index 1f639b2a..b6a90c09 100644 --- a/apps/web-antd/src/views/dashboard/analytics/index.vue +++ b/apps/web-antd/src/views/dashboard/analytics/index.vue @@ -1,12 +1,5 @@ --> -
+
- + 电量 { />
- +
- + - + - +
diff --git a/apps/web-antd/src/views/property/building/data.tsx b/apps/web-antd/src/views/property/building/data.tsx index 29691e90..3c27113c 100644 --- a/apps/web-antd/src/views/property/building/data.tsx +++ b/apps/web-antd/src/views/property/building/data.tsx @@ -13,7 +13,7 @@ let arr: CommunityVO[] = []; const communitySelect: VbenFormSchema = { component: 'ApiSelect', fieldName: 'communityId', - label: '社区', + label: '园区名称', componentProps: { resultField: 'list', // 根据API返回结构调整 labelField: 'communityName', @@ -46,11 +46,11 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { - title: '社区', + title: '园区名称', field: 'communityText', }, { - title: '建筑', + title: '建筑名称', field: 'buildingName', }, { @@ -73,10 +73,10 @@ export const columns: VxeGridProps['columns'] = [ title: '竣工日期', field: 'completionDate', }, - { - title: '地址', - field: 'addr', - }, + // { + // title: '地址', + // field: 'addr', + // }, { title: '建筑面积(㎡)', field: 'area', @@ -123,8 +123,8 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'floorCount', component: 'InputNumber', componentProps: { - min:1, - precision:0, + min: 1, + precision: 0, }, }, { @@ -132,8 +132,8 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'unitCount', component: 'InputNumber', componentProps: { - min:1, - precision:0, + min: 1, + precision: 0, }, }, { @@ -150,8 +150,8 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'elevatorCount', component: 'InputNumber', componentProps: { - min:0, - precision:0, + min: 0, + precision: 0, }, }, { @@ -163,19 +163,19 @@ export const modalSchema: FormSchemaGetter = () => [ valueFormat: 'YYYY-MM-DD', }, }, - { - label: '地址', - fieldName: 'addr', - component: 'Input', - rules: 'required', - }, + // { + // label: '地址', + // fieldName: 'addr', + // component: 'Input', + // rules: 'required', + // }, { label: '建筑面积(㎡)', fieldName: 'area', component: 'InputNumber', componentProps: { - min:0, - precision:2, + min: 0, + precision: 2, }, }, { @@ -183,8 +183,8 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'insideInArea', component: 'InputNumber', componentProps: { - min:0, - precision:2, + min: 0, + precision: 2, }, }, { @@ -192,8 +192,8 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'sharedArea', component: 'InputNumber', componentProps: { - min:0, - precision:2, + min: 0, + precision: 2, }, }, ]; diff --git a/apps/web-antd/src/views/property/community/data.ts b/apps/web-antd/src/views/property/community/data.ts index c7c7988d..e753cb35 100644 --- a/apps/web-antd/src/views/property/community/data.ts +++ b/apps/web-antd/src/views/property/community/data.ts @@ -1,19 +1,24 @@ -import type {FormSchemaGetter} from '#/adapter/form'; -import type {VxeGridProps} from '#/adapter/vxe-table'; -import {getPopupContainer} from '@vben/utils'; -import {getDictOptions} from '#/utils/dict'; -import {DictEnum} from '@vben/constants'; -import {renderDict} from "#/utils/render"; +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; +import { getPopupContainer } from '@vben/utils'; +import { getDictOptions } from '#/utils/dict'; +import { DictEnum } from '@vben/constants'; +import { renderDict } from '#/utils/render'; export const querySchema: FormSchemaGetter = () => [ + // { + // component: 'Select', + // componentProps: { + // getPopupContainer, + // options: getDictOptions(DictEnum.wy_sqlx), + // }, + // fieldName: 'communityType', + // label: '园区类型', + // }, { - component: 'Select', - componentProps: { - getPopupContainer, - options: getDictOptions(DictEnum.wy_sqlx), - }, - fieldName: 'communityType', - label: '园区类型', + component: 'Input', + fieldName: 'communityName', + label: '园区名称', }, { component: 'Input', @@ -25,20 +30,20 @@ export const querySchema: FormSchemaGetter = () => [ // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 // export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ - {type: 'checkbox', width: 60}, + { type: 'checkbox', width: 60 }, { title: '园区名称', field: 'communityName', }, - { - title: '园区类型', - field: 'communityType', - slots: { - default: ({row}) => { - return renderDict(row.communityType, DictEnum.wy_sqlx) - } - }, - }, + // { + // title: '园区类型', + // field: 'communityType', + // slots: { + // default: ({row}) => { + // return renderDict(row.communityType, DictEnum.wy_sqlx) + // } + // }, + // }, { title: '城市', field: 'cityFullName', @@ -78,7 +83,7 @@ export const columns: VxeGridProps['columns'] = [ { field: 'action', fixed: 'right', - slots: {default: 'action'}, + slots: { default: 'action' }, title: '操作', width: 180, }, @@ -182,7 +187,7 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Textarea', }, { - label: '社区/园区图片', + label: '园区图片', fieldName: 'img', component: 'ImageUpload', componentProps: { diff --git a/apps/web-antd/src/views/property/floor/data.ts b/apps/web-antd/src/views/property/floor/data.ts index 5d856420..2da66c83 100644 --- a/apps/web-antd/src/views/property/floor/data.ts +++ b/apps/web-antd/src/views/property/floor/data.ts @@ -5,7 +5,7 @@ export const querySchema: FormSchemaGetter = () => [ { component: 'Input', fieldName: 'floorName', - label: '楼栋号', + label: '楼层名称', }, ]; @@ -14,22 +14,22 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { - title: '社区', + title: '园区名称', field: 'communityText', }, { - title: '建筑', + title: '建筑名称', field: 'buildingText', }, { - title: '楼栋号', + title: '楼层名称', field: 'floorName', }, - { - title: '楼层号', - field: 'floorNumber', - }, - /* { + // { + // title: '楼层号', + // field: 'floorNumber', + // }, + /* { title: '楼层类型', field: 'floorType', },*/ @@ -78,33 +78,21 @@ export const modalSchema: FormSchemaGetter = () => [ defaultValue: undefined, label: '建筑名称', rules: 'selectRequired', - formItemClass:'col-span-2', + formItemClass: 'col-span-2', }, { - label: '楼栋号', + label: '楼层名称', fieldName: 'floorName', component: 'Input', rules: 'required', }, - // { - // label: '楼层号', - // fieldName: 'floorNumber', - // component: 'Input', - // rules: 'required', - // }, - /*{ - label: '楼层类型', - fieldName: 'floorType', - component: 'Select', - componentProps: {}, - },*/ { label: '房间数量', fieldName: 'roomCount', component: 'InputNumber', componentProps: { - min:0, - precision:0, + min: 0, + precision: 0, }, }, { @@ -112,8 +100,8 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'floorHeight', component: 'InputNumber', componentProps: { - min:0, - precision:0, + min: 0, + precision: 0, }, }, { @@ -121,8 +109,8 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'area', component: 'InputNumber', componentProps: { - min:0, - precision:2, + min: 0, + precision: 2, }, }, { @@ -130,8 +118,8 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'insideInArea', component: 'InputNumber', componentProps: { - min:0, - precision:2, + min: 0, + precision: 2, }, }, { @@ -139,8 +127,8 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'sharedArea', component: 'InputNumber', componentProps: { - min:0, - precision:2, + min: 0, + precision: 2, }, }, ]; diff --git a/apps/web-antd/src/views/property/room/data.ts b/apps/web-antd/src/views/property/room/data.ts index 08d35b5b..105dfe34 100644 --- a/apps/web-antd/src/views/property/room/data.ts +++ b/apps/web-antd/src/views/property/room/data.ts @@ -5,11 +5,6 @@ import { getDictOptions } from '#/utils/dict'; import { DictEnum } from '@vben/constants'; import { renderDict } from '#/utils/render'; export const querySchema: FormSchemaGetter = () => [ - { - component: 'Input', - fieldName: 'communityName', - label: '社区', - }, { component: 'Select', componentProps: { @@ -44,11 +39,11 @@ export const columns: VxeGridProps['columns'] = [ { title: '是否重要', field: 'isMatter', - slots:{ - default:({row})=>{ - return renderDict(row.isMatter,'wy_fjzydj') - } - } + slots: { + default: ({ row }) => { + return renderDict(row.isMatter, 'wy_fjzydj'); + }, + }, }, { @@ -96,25 +91,25 @@ export const modalSchema: FormSchemaGetter = () => [ getPopupContainer, options: getDictOptions(DictEnum.wy_room_type), }, - rules:'selectRequired' + rules: 'selectRequired', }, { label: '建筑面积', fieldName: 'area', component: 'InputNumber', - componentProps:{ - min:0, + componentProps: { + min: 0, }, - rules:'required' + rules: 'required', }, { label: '使用面积', fieldName: 'insideInArea', component: 'InputNumber', - componentProps:{ - min:0, + componentProps: { + min: 0, }, - rules:'required' + rules: 'required', }, { label: '是否重要', @@ -123,7 +118,7 @@ export const modalSchema: FormSchemaGetter = () => [ componentProps: { options: getDictOptions('wy_fjzydj'), }, - rules:'selectRequired' + rules: 'selectRequired', }, { label: '状态', @@ -133,7 +128,7 @@ export const modalSchema: FormSchemaGetter = () => [ getPopupContainer, options: getDictOptions(DictEnum.wy_fjzt), }, - rules:'selectRequired' + rules: 'selectRequired', }, { label: '房间图片',