diff --git a/apps/web-antd/src/api/analytics/index.ts b/apps/web-antd/src/api/analytics/index.ts index fdfe5a8d..f2f58cbe 100644 --- a/apps/web-antd/src/api/analytics/index.ts +++ b/apps/web-antd/src/api/analytics/index.ts @@ -37,6 +37,10 @@ export function getAccessControl() { export function getCamera() { return requestClient.get('/sis/deviceManage/online'); } +// 访客 +export function getVisitorCount() { + return requestClient.get('/property/screen/todayVisitorCount'); +} //车流 export async function queryTwentyfourRunningDatasByPlNos() { let params = { diff --git a/apps/web-antd/src/api/property/costManagement/houseCharge/model.d.ts b/apps/web-antd/src/api/property/costManagement/houseCharge/model.d.ts index 7abe3229..5d48ef7e 100644 --- a/apps/web-antd/src/api/property/costManagement/houseCharge/model.d.ts +++ b/apps/web-antd/src/api/property/costManagement/houseCharge/model.d.ts @@ -60,6 +60,14 @@ export interface HouseChargeVO { chargeStatus: string; personId: string; + /** + * 单位 + */ + residentUnitText: string; + /** + * 单位面积 + */ + area: number; } export interface HouseChargeForm extends BaseEntity { diff --git a/apps/web-antd/src/api/property/resident/unit/model.d.ts b/apps/web-antd/src/api/property/resident/unit/model.d.ts index 1c6d50df..dfe50c8a 100644 --- a/apps/web-antd/src/api/property/resident/unit/model.d.ts +++ b/apps/web-antd/src/api/property/resident/unit/model.d.ts @@ -36,6 +36,7 @@ export interface Resident_unitVO { */ location: string; locations: string[]; + locationDetail: string; /** * 入驻时间 diff --git a/apps/web-antd/src/assets/property/bg.jpg b/apps/web-antd/src/assets/property/bg.jpg new file mode 100644 index 00000000..1b7e6c45 Binary files /dev/null and b/apps/web-antd/src/assets/property/bg.jpg differ diff --git a/apps/web-antd/src/assets/property/bg.png b/apps/web-antd/src/assets/property/bg.png deleted file mode 100644 index f435684f..00000000 Binary files a/apps/web-antd/src/assets/property/bg.png and /dev/null differ diff --git a/apps/web-antd/src/assets/property/bg1.png b/apps/web-antd/src/assets/property/bg1.png deleted file mode 100644 index 03b7aac0..00000000 Binary files a/apps/web-antd/src/assets/property/bg1.png and /dev/null differ diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts b/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts index a004056d..00b53669 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts @@ -35,8 +35,8 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ {type: 'checkbox', width: 60}, { - title: '房屋', - field: 'roomName', + title: '单位', + field: 'residentUnitText', minWidth: 150, }, { @@ -104,12 +104,33 @@ export const modalSchema: FormSchemaGetter = () => [ }, }, { - label: '房屋', - fieldName: 'roomId', - component: 'TreeSelect', + label: '单位', + fieldName: 'residentUnitId', + component: 'Select', componentProps: { }, rules: 'selectRequired', + formItemClass: 'col-span-2', + }, + { + label: '入驻房间', + fieldName: 'roomInfo', + component: 'Input', + dependencies: { + show: (fromValue) => fromValue.residentUnitId, + triggerFields: ['residentUnitId'], + }, + formItemClass: 'col-span-2', + }, + { + label: '单位面积', + fieldName: 'area', + component: 'Input', + dependencies: { + show: (fromValue) => fromValue.residentUnitId, + triggerFields: ['residentUnitId'], + }, + formItemClass: 'col-span-2', }, { label: '业主', diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-detail.vue b/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-detail.vue index c10c48cf..18da12b9 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-detail.vue +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-detail.vue @@ -59,11 +59,11 @@ async function handleOpenChange(open: boolean) { {{ houseChargeDetail.startTime + ' 至 ' + houseChargeDetail.endTime }} - - {{ room?.roomNumber }} + + {{ houseChargeDetail?.residentUnitText }} - - {{ `建筑面积:${room?.area} 套内面积:${room?.insideInArea}` }} + + {{ `${houseChargeDetail?.area} (㎡)` }} {{ costItem?.unitPrice }} diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-refund.vue b/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-refund.vue index 9a67aad1..dc24e1ac 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-refund.vue +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-refund.vue @@ -121,11 +121,11 @@ async function handleClosed() { {{ record.startTime }} - - {{ room?.roomNumber }} + + {{ record.residentUnitText }} - - {{ `${room?.area} (套内面积:${room?.insideInArea})` }} + + {{ `${record.area} (㎡)` }} {{ costItem?.unitPrice }} diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-add.vue b/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-add.vue index 09442391..9e25ed3e 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-add.vue +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-add.vue @@ -20,6 +20,7 @@ import type { CostItemSettingVO } from '#/api/property/costManagement/costItemSe import { getDictOptions } from '#/utils/dict'; import { personList } from '#/api/property/resident/person'; import { renderDictValue } from '#/utils/render'; +import {resident_unitInfo, resident_unitList} from "#/api/property/resident/unit"; const emit = defineEmits<{ reload: [] }>(); @@ -32,7 +33,7 @@ const title = computed(() => { const [BasicForm, formApi] = useVbenForm({ commonConfig: { // 默认占满两列 - formItemClass: 'col-span-2', + formItemClass: 'col-span-1', // 默认label宽度 px labelWidth: 80, // 通用配置项 会影响到所有表单项 @@ -54,7 +55,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff( const [BasicModal, modalApi] = useVbenModal({ // 在这里更改宽度 - class: 'w-[550px]', + class: 'w-[70%]', fullscreenButton: false, onBeforeClose, onClosed: handleClosed, @@ -64,10 +65,10 @@ const [BasicModal, modalApi] = useVbenModal({ return null; } modalApi.modalLoading(true); - await initRoomOptions(); - await queryCostItemOptions(); + await queryCostItemOptions(null); await initCostTypeOptions(); await queryPersonData(); + await queryUnitData(); const { id } = modalApi.getData() as { id?: number | string }; isUpdate.value = !!id; @@ -111,46 +112,10 @@ async function handleClosed() { resetInitialized(); } -/** - * 房间数据 - */ -async function initRoomOptions() { - const roomList = await communityTree(4); - const splitStr = '/'; - handleNode(roomList, 'label', splitStr, function (node: any) { - if (node.level != 4) { - node.disabled = true; - } - }); - formApi.updateSchema([ - { - componentProps: () => ({ - class: 'w-full', - fieldNames: { - key: 'id', - label: 'label', - value: 'code', - children: 'children', - }, - placeholder: '请选择房间', - showSearch: true, - treeData: roomList, - treeDefaultExpandAll: true, - treeLine: { showLeafIcon: false }, - // 筛选的字段 - treeNodeFilterProp: 'label', - // 选中后显示在输入框的值 - treeNodeLabelProp: 'fullName', - }), - fieldName: 'roomId', - }, - ]); -} - /** * 查询费用项设置 */ -async function queryCostItemOptions(costType: string) { +async function queryCostItemOptions(costType: string|null) { let params = { pageSize: 1000, pageNum: 1, @@ -233,10 +198,57 @@ async function queryPersonData() { }, ]); } +//查询入驻单位数据 +async function queryUnitData() { + let params = { + pageSize: 1000, + pageNum: 1, + }; + const res = await resident_unitList(params); + const options = res.rows.map((unit) => ({ + label:unit.name, + value: unit.id, + })); + formApi.updateSchema([ + { + componentProps: () => ({ + options: options, + showSearch: true, + optionFilterProp: 'label', + optionLabelProp: 'label', + onChange: async (value: string) => { + if (value) { + await queryRoomByUnit(value); + } + }, + }), + fieldName: 'residentUnitId', + }, + ]); +} + +async function queryRoomByUnit(unitId: string) { + let unitInfo = await resident_unitInfo(unitId); + if(unitInfo&&unitInfo.locationDetail){ + await formApi.setFieldValue('roomInfo', unitInfo.locationDetail); + await formApi.setFieldValue('area', unitInfo.area); + } +} diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-update.vue b/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-update.vue index 620cd3ef..ece8fcf4 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-update.vue +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-update.vue @@ -6,7 +6,6 @@ import {cloneDeep} from '@vben/utils'; import {useVbenForm} from '#/adapter/form'; import { - houseChargeAdd, houseChargeInfo, houseChargeUpdate } from '#/api/property/costManagement/houseCharge'; @@ -123,11 +122,11 @@ async function handleClosed() { {{ record.startTime }} - - {{ room?.roomNumber }} + + {{ record.residentUnitText }} - - {{ `${room?.area} (套内面积:${room?.insideInArea})` }} + + {{ `${record.area} (㎡)` }} {{ costItem?.unitPrice }} diff --git a/apps/web-antd/src/views/property/costManagement/paymentReview/data.ts b/apps/web-antd/src/views/property/costManagement/paymentReview/data.ts index f265f3d3..13819166 100644 --- a/apps/web-antd/src/views/property/costManagement/paymentReview/data.ts +++ b/apps/web-antd/src/views/property/costManagement/paymentReview/data.ts @@ -5,11 +5,11 @@ import { getDictOptions } from '#/utils/dict'; import { renderDict } from '#/utils/render'; export const querySchema: FormSchemaGetter = () => [ - { - component: 'Input', - fieldName: 'roomNumber', - label: '房屋', - }, + // { + // component: 'Input', + // fieldName: 'roomNumber', + // label: '房屋', + // }, { component: 'Select', componentProps: { diff --git a/apps/web-antd/src/views/screen/property/analytics-trends.vue b/apps/web-antd/src/views/screen/property/analytics-trends.vue index e7367b62..d1da54a1 100644 --- a/apps/web-antd/src/views/screen/property/analytics-trends.vue +++ b/apps/web-antd/src/views/screen/property/analytics-trends.vue @@ -17,6 +17,7 @@ const getDaysInMonth = (date: any) => { const daysInMonth = new Date(year, month, 0).getDate(); return Array.from({ length: daysInMonth }, (_, i) => i + 1); }; +const emit = defineEmits(['getPowerDate']); const getMeterRecordTrend = async (selectedDate: any) => { const res = await meterRecordTrend({ day: dayjs().format('YYYY-MM-DD'), @@ -26,7 +27,7 @@ const getMeterRecordTrend = async (selectedDate: any) => { meterId: null, floorId: null, }); - + emit('getPowerDate',res); // 处理返回的数据 const chartData = res.day.nowMonth.data || []; @@ -45,11 +46,11 @@ const getMeterRecordTrend = async (selectedDate: any) => { }); renderEcharts({ grid: { - bottom: 125, + bottom: 20, containLabel: true, left: '2%', right: '2%', - top: '2%', + top: '5%', }, series: [ { @@ -133,6 +134,6 @@ defineExpose({ diff --git a/apps/web-antd/src/views/screen/property/index.vue b/apps/web-antd/src/views/screen/property/index.vue index 1a91c5a2..540b8da1 100644 --- a/apps/web-antd/src/views/screen/property/index.vue +++ b/apps/web-antd/src/views/screen/property/index.vue @@ -5,7 +5,7 @@
--:--:--
----
-
南川区综合服务中心数智管理平台物业大屏
+
南川区综合服务中心数智管理平台物业驾驶舱
{{ weekDay }}
@@ -22,13 +22,13 @@
今年用电量 - 180 - 亿kwh + {{powerYear}} + KW·h
本月用电总量 - 1.8 - 亿kwh + {{powerMonth}} + KW·h
今年用水总量 @@ -42,7 +42,7 @@
设备总数 - 500 + {{total}}
@@ -53,14 +53,15 @@
-
+
-
+
@@ -70,6 +71,10 @@
+
+
离线
+
在线
+
- - - - - - - - - - - - - - - - - - - - - -
- -
-
+
{{item.total}}
-
-
- +
会议室总数
{{todayMeetCount?.meetCount}}
@@ -177,8 +158,9 @@ @@ -868,7 +704,7 @@ onBeforeUnmount(() => { } .mian { height: 100vh; - background: url('../../../assets/property/bg1.png'); + background: url('../../../assets/property/bg.png'); background-size: 100% 100%; background-color: #081b3a; display: flex; @@ -945,14 +781,12 @@ onBeforeUnmount(() => { margin-right: 0.5rem; letter-spacing: 0.05em; } - .header-value { font-size: 1.5rem; font-weight: bold; margin: 0 0.2rem; font-family: ShiShangZhongHeiJianTi; } - .header-value.orange { color: #ffb300; } @@ -965,7 +799,6 @@ onBeforeUnmount(() => { .header-value.purple { color: #b388ff; } - .header-unit { color: #fff; font-size: 1rem; @@ -989,43 +822,14 @@ onBeforeUnmount(() => { justify-content: space-between; .first { height: 16.81rem; - .pie3d-title { - color: #fff; - font-size: 1.1rem; - font-weight: bold; - margin-bottom: 0.3rem; - } - .pie3d-water { - color: #fff; - font-size: 0.95rem; - margin-bottom: 0.2rem; - } - .pie3d-water-num { - font-size: 1.3rem; - color: #3ec6ff; - background: #0a1e3a; - border-radius: 0.2rem; - padding: 0 0.2rem; - margin: 0 0.2rem; - letter-spacing: 0.1em; - } - .pie3d-chart { - width: 100%; - height: 176px; - min-height: unset; - margin: 0 auto; - } .bar-chart { margin-top: 35px; } } .second { height: 12rem; - /* margin-top:2.25rem; */ - /* margin-bottom: 2rem; */ .power-chart { height: 100%; - /* margin-top: 0.2rem; */ } } .third { @@ -1055,6 +859,26 @@ onBeforeUnmount(() => { height: 12.5rem; display: flex; justify-content: space-around; + .offline,.online { + display: flex; + align-items: center; + gap: 8px; + color: #fff; + font-size: 14px; + } + .offline::before,.online::before { + content: ""; + width: 30px; + height: 15px; + border-radius: 3px; + border: 1.5px solid #fff; + } + .offline::before{ + background-color: #5470C6; + } + .online::before { + background-color: #9CDB7D; + } } } .content-right { @@ -1064,11 +888,6 @@ onBeforeUnmount(() => { justify-content: space-between; .first { height: 16.81rem; - //background-color: red; - .water-chart { - height: 100%; - /* margin-top: 0.2rem; */ - } } .second { height: 11rem; @@ -1136,45 +955,14 @@ onBeforeUnmount(() => { height: 4rem; background: url('../../../assets/monitor/device-alerts-bg2.png'); background-size: 100% 100%; - font-family: Microsoft YaHei; font-weight: 400; font-size: 1.2rem; color: #ffffff; } } - .device-chart { - height: 10rem; - margin-top: 2rem; - } } } } } -.pie3d-title { - color: #fff; - font-size: 1.1rem; - font-weight: bold; - margin-bottom: 0.3rem; -} -.pie3d-water { - color: #fff; - font-size: 0.95rem; - margin-bottom: 0.2rem; -} -.pie3d-water-num { - font-size: 1.3rem; - color: #3ec6ff; - background: #0a1e3a; - border-radius: 0.2rem; - padding: 0 0.2rem; - margin: 0 0.2rem; - letter-spacing: 0.1em; -} -.pie3d-chart { - width: 100%; - height: 176px; - min-height: unset; - margin: 0 auto; -}