85 Commits

Author SHA1 Message Date
15683799673
228a008f00 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-28 04:51:19 +08:00
95de1debe2 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5 2025-08-28 01:22:28 +08:00
5f32b3141d feat(property): 添加电表趋势分析功能 2025-08-28 01:22:23 +08:00
fyy
abe8a8e79b Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5 2025-08-27 23:50:38 +08:00
fyy
452e16ce2f feat: 通行记录、车辆通行记录 2025-08-27 23:47:35 +08:00
d8a91ff4be Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5 2025-08-27 20:44:12 +08:00
8e61d61fdd feat(energyManagement): 添加水电气树接口 2025-08-27 20:44:00 +08:00
15683799673
263ce25007 Merge branch 'prod' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 20m34s
2025-08-27 20:43:40 +08:00
lxj
cd141d2c79 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5 2025-08-27 20:41:02 +08:00
lxj
6ada18b28b 删除无用代码 2025-08-27 20:40:49 +08:00
fyy
5516e79b5d feat: 通行记录管理 2025-08-27 17:57:22 +08:00
e8d2650f9a Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5 2025-08-26 16:49:59 +08:00
5646112e44 feat(property): 新增抄表记录功能并优化仪表信息管理 2025-08-26 16:46:54 +08:00
82e971d98f feat:会议室预约会议室类型查询 2025-08-26 15:53:38 +08:00
29c20f6403 Merge pull request 'master' (#1) from master into prod
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 12m27s
Reviewed-on: #1
2025-08-26 14:15:20 +08:00
FLL
d6da044b48 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5 2025-08-26 11:25:20 +08:00
FLL
8c062feef0 缴费审核 2025-08-26 11:25:01 +08:00
90b9b2b7a9 发布生产
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 12m36s
2025-08-26 11:07:50 +08:00
lsm
bc59c2c22f 更新 .gitea/workflows/dev.yml 2025-08-25 18:37:11 +08:00
FLL
90eceb508a Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 15m9s
2025-08-25 17:29:51 +08:00
FLL
f794f6a8a9 权限 2025-08-25 17:29:43 +08:00
fyy
6cc969e56a feat: 修改首页数据
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-25 17:28:11 +08:00
fyy
6ca27444e0 feat: 修改首页数据
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 11m28s
2025-08-25 17:12:48 +08:00
fyy
2f2f8fb798 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-25 17:06:25 +08:00
fyy
1de539ddde feat: 隐藏导航页面 2025-08-25 17:04:41 +08:00
67b80d7687 feat:入驻单位入驻位置多选
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-25 17:00:32 +08:00
b44fa6ee7f 更新 .gitea/workflows/dev.yml
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 23m35s
2025-08-25 16:32:44 +08:00
FLL
559bd55153 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-25 16:17:41 +08:00
FLL
cc24027880 权限 2025-08-25 16:17:29 +08:00
fyy
66b7cc44e9 fix: 水电抄表查询抄表类型
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-25 16:14:11 +08:00
5f3ae86698 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-25 15:46:13 +08:00
84ff3d21b4 refactor(property): 重构能源管理相关页面布局 2025-08-25 15:46:05 +08:00
FLL
e88b8b41d8 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-25 15:06:21 +08:00
FLL
48ea62150d 权限 2025-08-25 15:06:10 +08:00
5975d1b94d feat:工单类型添加 处理优先级字段
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
自动派单不显示抢单、派单按钮
2025-08-25 14:43:32 +08:00
FLL
faababd9a4 权限
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-25 11:10:19 +08:00
FLL
c7f52fa107 权限 2025-08-25 10:02:28 +08:00
FLL
28018815b7 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5 2025-08-25 09:31:57 +08:00
FLL
bad1423acd 权限 2025-08-25 09:31:41 +08:00
f6f258c9b7 fix:工单详情图片
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-23 21:32:27 +08:00
559e46dc41 fix:会议室设置详情图片
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 5m19s
2025-08-23 21:21:10 +08:00
67b7e64600 fix:图片显示
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 13m48s
2025-08-23 19:25:11 +08:00
5c40b534f2 feat(authGroup): 暂时移除电梯授权
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 6m24s
2025-08-23 13:18:59 +08:00
99b02c16eb fix:按钮权限
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 5m22s
2025-08-22 20:00:24 +08:00
fyy
c761c8ba0c Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 2m58s
2025-08-22 19:50:03 +08:00
882e1f7452 fix:按钮权限
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-22 19:44:28 +08:00
fyy
553a915027 fix: 修复bug 2025-08-22 19:43:32 +08:00
ff5963b01d 更新 .gitea/workflows/dev.yml
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 5m20s
2025-08-22 18:13:53 +08:00
850b18d34c 更新 .gitea/workflows/dev.yml 2025-08-22 18:13:21 +08:00
2afef1f33d 更新 .gitea/workflows/dev.yml 2025-08-22 18:12:58 +08:00
fyy
29adc052c7 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 11m47s
2025-08-22 17:11:38 +08:00
fyy
418a0a4e54 fix: 车辆收费使用系统用户 2025-08-22 17:08:17 +08:00
FLL
3d934e2e51 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m19s
2025-08-22 17:02:21 +08:00
FLL
18c23a21a0 权限 2025-08-22 17:02:12 +08:00
91f5b33e68 fix:统计分析按钮
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-22 17:01:43 +08:00
fyy
c8bcf9a28d Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m13s
2025-08-22 15:51:33 +08:00
fyy
69d17e29ff fix: 区域管理字段必填校验 2025-08-22 15:47:55 +08:00
fyy
cb0a15e5fb fix: 入驻单位编辑回显授权期限 2025-08-22 15:37:13 +08:00
FLL
b153c88cd5 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m23s
2025-08-22 14:31:43 +08:00
FLL
7c55152cc3 权限 2025-08-22 14:31:33 +08:00
fyy
3cad95d185 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m51s
2025-08-22 13:03:57 +08:00
fyy
060fd5485e feat: 处理权限 2025-08-22 12:59:03 +08:00
5fa41f6d85 fix:按钮权限
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m51s
2025-08-22 12:58:16 +08:00
a599e72a6b fix:按钮权限
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m44s
2025-08-22 11:14:07 +08:00
FLL
06a710d1f8 权限
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m54s
2025-08-22 11:07:08 +08:00
7b2c8e47dd fix:按钮权限
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m52s
2025-08-22 09:21:25 +08:00
a43cb1b390 feat:工单处理权重修改为处理优先级
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m21s
2025-08-21 17:11:47 +08:00
FLL
ee9b7017f4 热门活动
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m15s
2025-08-21 16:05:22 +08:00
FLL
29df30ee82 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 11m7s
2025-08-21 14:25:19 +08:00
FLL
76fa9960e0 热门活动 2025-08-21 14:25:04 +08:00
e750414f02 feat(property): 物业灯控信息页面增加左侧社区树
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m21s
2025-08-21 12:36:41 +08:00
006471bb1e 解决表格刷新bug
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m22s
2025-08-21 12:07:34 +08:00
c4d503f9b8 Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m15s
2025-08-20 17:23:25 +08:00
81fc3bf2ca feat(property): 添加灯控开关功能 2025-08-20 17:23:13 +08:00
3d1681e811 更新 .gitea/workflows/dev.yml
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 8m41s
2025-08-20 15:11:14 +08:00
4b3ed5c2d5 更新 .gitea/workflows/dev.yml
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m38s
2025-08-20 14:53:47 +08:00
28d6a77848 更新 .gitea/workflows/dev.yml
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m35s
2025-08-20 14:42:45 +08:00
4139af5673 fix:预览问卷
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 6m53s
2025-08-20 14:26:59 +08:00
FLL
fc08c5525c Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Has been cancelled
2025-08-20 14:25:59 +08:00
FLL
5c7080a3da 热门活动 2025-08-20 14:25:51 +08:00
c090779319 feat(property): 添加灯控开关信息管理功能
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 9m42s
2025-08-19 18:04:22 +08:00
FLL
36f93721ad Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m28s
2025-08-19 14:41:28 +08:00
FLL
957827e0e4 热门活动 2025-08-19 14:41:18 +08:00
fyy
87fc96500a fix: 修复编辑考勤组人员展示bug
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m22s
2025-08-19 11:50:57 +08:00
fyy
1a9927e60a fix: 修复切换视图未重新获取数据
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 5m57s
2025-08-19 11:15:19 +08:00
200 changed files with 5557 additions and 107680 deletions

View File

@@ -2,36 +2,43 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches:
- master
- prod
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu
steps:
- name: 拉取代码仓库
uses: http://git.missmoc.top/mocheng/checkout@v4
with:
fetch-depth: 0 # 只拉取最新的1个提交浅克隆
- name: Set up Node.js ${{ matrix.node-version }}
- name: Set up Node.js
uses: http://git.missmoc.top/mocheng/setup-node@v3
with:
node-version: 20.x
- name: pnpm
- name: 安装pnpm
run: npm i pnpm -g
- name: node
run: |
pnpm config set registry https://registry.npmmirror.com
pnpm install
- name: Build
- name: 安装依赖
run: pnpm install
continue-on-error: false # 依赖安装失败则终止工作流
- name: 构建项目
run: pnpm build:antd
- name: copy file via ssh password
uses: http://git.missmoc.top/mocheng/scp-action@v0.1.7
with:
host: 127.0.0.1
username: ${ { SERVER_NAME } }
password: ${{ SERVER_PWD}}
port: 11001
source: "./apps/web-antd/dist"
target: "/www/wwwroot/183.230.235.66_11010/property"
continue-on-error: false # 构建失败则终止工作流
- name: 检查构建结果
run: |
if [ ! -d "./apps/web-antd/dist" ]; then
echo "构建目录不存在,构建失败"
exit 1
fi
if [ -z "$(ls -A ./apps/web-antd/dist)" ]; then
echo "构建目录为空,构建失败"
exit 1
fi
- name: 通过SSH复制文件
run: cp -rf ./apps/web-antd/dist/* /www/wwwroot/183.230.235.66_11010/property

View File

@@ -20,7 +20,7 @@ export interface AttendanceAreaVO {
* 备注
*/
reamark: string;
areaDevice?: any[];
}
export interface AttendanceAreaForm extends BaseEntity {
@@ -43,7 +43,6 @@ export interface AttendanceAreaForm extends BaseEntity {
* 备注
*/
reamark?: string;
}
export interface AttendanceAreaQuery extends PageQuery {
@@ -63,7 +62,7 @@ export interface AttendanceAreaQuery extends PageQuery {
reamark?: string;
/**
* 日期范围参数
*/
* 日期范围参数
*/
params?: any;
}

View File

@@ -59,3 +59,19 @@ export function workOrdersUpdate(data: WorkOrdersForm) {
export function workOrdersRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/workOrders/${id}`);
}
/**
* 派单
* @param data
*/
export function workOrdersDispatch(data: WorkOrdersForm) {
return requestClient.putWithMsg<void>('/property/workOrders/dispatch', data);
}
/**
* 抢单
* @param data
*/
export function workOrdersGrab(data: WorkOrdersForm) {
return requestClient.putWithMsg<void>('/property/workOrders/grab', data);
}

View File

@@ -64,7 +64,7 @@ export interface WorkOrdersVO {
/**
* 评价
*/
serviceEvalua: string;
serviceEvalua: number;
/**
* 是否超时
@@ -82,6 +82,8 @@ export interface WorkOrdersVO {
* 评价图片
*/
imgUrl: string;
evaluateImgPath: string[];
/**
* 评价内容
*/
@@ -99,6 +101,12 @@ export interface WorkOrdersVO {
*/
orderImgUrl: string;
orderImgPath: string[];
reportingType: string;
processingWeight: string;
}
export interface HandleRecords {

View File

@@ -37,6 +37,11 @@ export interface WorkOrdersTypeVO {
isTransfers: string;
excludeId: string;
/**
* 处理优先级
*/
processingWeight: string;
}
export interface WorkOrdersTypeForm extends BaseEntity {
@@ -79,6 +84,11 @@ export interface WorkOrdersTypeForm extends BaseEntity {
* 上级类型id
*/
parentId?: string;
/**
* 处理优先级
*/
processingWeight: string;
}
export interface WorkOrdersTypeQuery extends PageQuery {

View File

@@ -144,6 +144,16 @@ export interface Clean_orderForm extends BaseEntity {
*/
phone?: string;
/**
* 签到图片
*/
signImgUrl?: string;
/**
* 评价图片
*/
imgUrl?: string;
}
export interface Clean_orderQuery extends PageQuery {

View File

@@ -0,0 +1,61 @@
import type { ActivitiesVO, ActivitiesForm, ActivitiesQuery } 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 activitiesList(params?: ActivitiesQuery) {
return requestClient.get<PageResult<ActivitiesVO>>('/property/activities/list', { params });
}
/**
* 导出热门活动列表
* @param params
* @returns 热门活动列表
*/
export function activitiesExport(params?: ActivitiesQuery) {
return commonExport('/property/activities/export', params ?? {});
}
/**
* 查询热门活动详情
* @param id id
* @returns 热门活动详情
*/
export function activitiesInfo(id: ID) {
return requestClient.get<ActivitiesVO>(`/property/activities/${id}`);
}
/**
* 新增热门活动
* @param data
* @returns void
*/
export function activitiesAdd(data: ActivitiesForm) {
return requestClient.postWithMsg<void>('/property/activities', data);
}
/**
* 更新热门活动
* @param data
* @returns void
*/
export function activitiesUpdate(data: ActivitiesForm) {
return requestClient.putWithMsg<void>('/property/activities', data);
}
/**
* 删除热门活动
* @param id id
* @returns void
*/
export function activitiesRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/activities/${id}`);
}

View File

@@ -0,0 +1,129 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface ActivitiesVO {
/**
* 主键
*/
id: string | number;
/**
* 标题
*/
title: string;
/**
* 头部照片
*/
headImgUrl: string;
/**
* 开始时间
*/
startTime: string;
/**
* 结束时间
*/
endTime: string;
/**
* 活动内容
*/
activeContent: string;
/**
* 状态1.未开始 2.进行中 3.已结束)
*/
status: string;
/**
* 搜索值
*/
searchValue: string;
}
export interface ActivitiesForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 标题
*/
title?: string;
/**
* 头部照片
*/
headImgUrl?: string;
/**
* 开始时间
*/
startTime?: string;
/**
* 结束时间
*/
endTime?: string;
/**
* 活动内容
*/
activeContent?: string;
/**
* 状态1.未开始 2.进行中 3.已结束)
*/
status?: string;
/**
* 搜索值
*/
searchValue?: string;
}
export interface ActivitiesQuery extends PageQuery {
/**
* 标题
*/
title?: string;
/**
* 头部照片
*/
headImgUrl?: string;
/**
* 开始时间
*/
startTime?: string;
/**
* 结束时间
*/
endTime?: string;
/**
* 活动内容
*/
activeContent?: string;
/**
* 状态1.未开始 2.进行中 3.已结束)
*/
status?: string;
/**
* 搜索值
*/
searchValue?: string;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -10,6 +10,7 @@ export interface FeedbacksVO {
* 反馈类型(0保修1保洁2会议)
*/
feedbackType: string;
feedbackTypeName: string;
/**
* 反馈人
@@ -21,6 +22,11 @@ export interface FeedbacksVO {
*/
feedbackPersionPhone: string;
/**
* 反馈人名称
*/
feedbackPersionName: string;
/**
* 反馈内容
*/
@@ -50,6 +56,10 @@ export interface FeedbacksVO {
* 客服电话
*/
serviceName: string;
/**
* 工单id
*/
orderId: string;
}

View File

@@ -0,0 +1,79 @@
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<PageResult<LightInfoVO>>('/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<LightInfoVO>(`/property/lightInfo/${id}`);
}
/**
* 新增灯控开关信息
* @param data
* @returns void
*/
export function lightInfoAdd(data: LightInfoForm) {
return requestClient.postWithMsg<void>('/property/lightInfo', data);
}
/**
* 更新灯控开关信息
* @param data
* @returns void
*/
export function lightInfoUpdate(data: LightInfoForm) {
return requestClient.putWithMsg<void>('/property/lightInfo', data);
}
/**
* 删除灯控开关信息
* @param id id
* @returns void
*/
export function lightInfoRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/lightInfo/${id}`);
}
/**
* 更新灯控开关状态
* @param data
* @returns void
*/
export function switchSingleLight(data: LightInfoForm) {
return requestClient.postWithMsg<void>('/property/lightInfo/switch', data);
}
/**
* 批量更新灯控开关状态
* @param data
* @returns void
*/
export function switchBatchLight(data: LightInfoForm) {
return requestClient.postWithMsg<void>('/property/lightInfo/switch', data);
}

View File

@@ -0,0 +1,134 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface LightInfoVO {
/**
* 主键id
*/
id: string | number;
/**
* 位置描述
*/
locationRemark: string;
/**
* 开关状态01
*/
isOn: boolean;
/**
* 灯控模块编码
*/
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;
/**
* 开关状态01
*/
isOn: boolean;
/**
* 灯控模块编码
*/
code?: number;
/**
* 园区编码
*/
communityId?: string | number;
/**
* 建筑名称
*/
buildingId?: string | number;
/**
* 单元编码
*/
unitId?: string | number;
/**
* 所属楼层ID
*/
floorId?: string | number;
}
export interface LightInfoQuery extends PageQuery {
/**
* 位置描述
*/
locationRemark?: string;
/**
* 开关状态01
*/
isOn?: number;
/**
* 灯控模块编码
*/
code?: number;
/**
* 园区编码
*/
communityId?: string | number;
/**
* 建筑名称
*/
buildingId?: string | number;
/**
* 单元编码
*/
unitId?: string | number;
/**
* 所属楼层ID
*/
floorId?: string | number;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -1,10 +1,9 @@
import type { MeterInfoVO, MeterInfoForm, MeterInfoQuery } from './model';
import type { MeterInfoVO, MeterInfoForm, MeterInfoQuery } from './model'
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
import type { ID, IDS, PageResult, TreeNode } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
import { commonExport } from '#/api/helper'
import { requestClient } from '#/api/request'
/**
*
@@ -12,7 +11,7 @@ import { requestClient } from '#/api/request';
* @returns
*/
export function meterInfoList(params?: MeterInfoQuery) {
return requestClient.get<PageResult<MeterInfoVO>>('/property/meterInfo/list', { params });
return requestClient.get<PageResult<MeterInfoVO>>('/property/meterInfo/list', { params })
}
/**
@@ -21,7 +20,7 @@ export function meterInfoList(params?: MeterInfoQuery) {
* @returns
*/
export function meterInfoExport(params?: MeterInfoQuery) {
return commonExport('/property/meterInfo/export', params ?? {});
return commonExport('/property/meterInfo/export', params ?? {})
}
/**
@@ -30,7 +29,7 @@ export function meterInfoExport(params?: MeterInfoQuery) {
* @returns
*/
export function meterInfoInfo(id: ID) {
return requestClient.get<MeterInfoVO>(`/property/meterInfo/${id}`);
return requestClient.get<MeterInfoVO>(`/property/meterInfo/${id}`)
}
/**
@@ -39,7 +38,7 @@ export function meterInfoInfo(id: ID) {
* @returns void
*/
export function meterInfoAdd(data: MeterInfoForm) {
return requestClient.postWithMsg<void>('/property/meterInfo', data);
return requestClient.postWithMsg<void>('/property/meterInfo', data)
}
/**
@@ -48,7 +47,7 @@ export function meterInfoAdd(data: MeterInfoForm) {
* @returns void
*/
export function meterInfoUpdate(data: MeterInfoForm) {
return requestClient.putWithMsg<void>('/property/meterInfo', data);
return requestClient.putWithMsg<void>('/property/meterInfo', data)
}
/**
@@ -57,5 +56,14 @@ export function meterInfoUpdate(data: MeterInfoForm) {
* @returns void
*/
export function meterInfoRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/meterInfo/${id}`);
return requestClient.deleteWithMsg<void>(`/property/meterInfo/${id}`)
}
/**
*
* @param level
* @returns
*/
export function queryTree(meterType: number | string) {
return requestClient.get<TreeNode<Number>[]>(`/property/meterInfo/tree/${meterType}`)
}

View File

@@ -1,65 +1,65 @@
import type { PageQuery, BaseEntity } from '#/api/common';
import type { PageQuery, BaseEntity } from '#/api/common'
export interface MeterInfoVO {
/**
* id
*/
id: string | number;
id: string | number
/**
*
*/
meterName: string;
meterName: string
/**
*
*/
meterCode: string;
meterCode: string
/**
*
*/
factoryNo: string;
factoryNo: string
/**
* (1-2-3-)
*/
meterType: number;
meterType: number | String
/**
* (1-2-3-)
*/
meterUnit: number;
meterUnit: number | String
/**
*
*/
installLocation: string;
installLocation: string
/**
*
*/
initReading: number;
initReading: number
/**
*
*/
maxRang: number;
maxRang: number
/**
*
*/
communicationState: number;
communicationState: number | String
/**
*
*/
runningState: number;
runningState: number | String
/**
*
*/
remark: string;
remark: string
}
@@ -67,62 +67,67 @@ export interface MeterInfoForm extends BaseEntity {
/**
* id
*/
id?: string | number;
id?: string | number
/**
*
*/
meterName?: string;
meterName?: string
/**
*
*/
meterCode?: string;
meterCode?: string
/**
*
*/
factoryNo?: string;
factoryNo?: string
/**
* (1-2-3-)
*/
meterType?: number;
meterType?: number
/**
* (1-2-3-)
*/
meterUnit?: number;
meterUnit?: number
/**
*
*/
installLocation?: string;
installLocation?: string
/**
*
*/
initReading?: number;
initReading?: number
/**
*
*/
maxRang?: number;
maxRang?: number
/**
*
*/
communicationState?: number;
communicationState?: number
/**
*
*/
runningState?: number;
runningState?: number
/**
* IP
*/
hostIp?: string
/**
*
*/
remark?: string;
remark?: string
}
@@ -130,55 +135,55 @@ export interface MeterInfoQuery extends PageQuery {
/**
*
*/
meterName?: string;
meterName?: string
/**
*
*/
meterCode?: string;
meterCode?: string
/**
*
*/
factoryNo?: string;
factoryNo?: string
/**
* (1-2-3-)
*/
meterType?: number;
meterType?: number
/**
* (1-2-3-)
*/
meterUnit?: number;
meterUnit?: number
/**
*
*/
installLocation?: string;
installLocation?: string
/**
*
*/
initReading?: number;
initReading?: number
/**
*
*/
maxRang?: number;
maxRang?: number
/**
*
*/
communicationState?: number;
communicationState?: number
/**
*
*/
runningState?: number;
runningState?: number
/**
*
*/
params?: any;
params?: any
}

View File

@@ -0,0 +1,71 @@
import type { MeterRecordVO, MeterRecordForm, MeterRecordQuery, MeterRecordTrend } 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 meterRecordList(params?: MeterRecordQuery) {
return requestClient.get<PageResult<MeterRecordVO>>('/property/meterRecord/list', { params });
}
/**
* 导出抄表记录列表
* @param params
* @returns 抄表记录列表
*/
export function meterRecordExport(params?: MeterRecordQuery) {
return commonExport('/property/meterRecord/export', params ?? {});
}
/**
* 查询抄表记录详情
* @param id id
* @returns 抄表记录详情
*/
export function meterRecordInfo(id: ID) {
return requestClient.get<MeterRecordVO>(`/property/meterRecord/${id}`);
}
/**
* 新增抄表记录
* @param data
* @returns void
*/
export function meterRecordAdd(data: MeterRecordForm) {
return requestClient.postWithMsg<void>('/property/meterRecord', data);
}
/**
* 更新抄表记录
* @param data
* @returns void
*/
export function meterRecordUpdate(data: MeterRecordForm) {
return requestClient.putWithMsg<void>('/property/meterRecord', data);
}
/**
* 删除抄表记录
* @param id id
* @returns void
*/
export function meterRecordRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/meterRecord/${id}`);
}
/**
* 获取用电/气/水趋势分析数据
*
* @param params
* @returns 用电/气/水趋势分析数据
*/
export function meterRecordTrend(params: MeterRecordTrend) {
return requestClient.get<void>('/property/meterRecord/trend', { params });
}

View File

@@ -0,0 +1,182 @@
import type { PageQuery, BaseEntity } from '#/api/common'
export interface MeterRecordVO {
/**
* 记录ID
*/
id: string | number
/**
* 仪表编号
*/
meterId: string | number
/**
* 仪表类型
*/
meterType: string | number
/**
* 抄表员ID
*/
readerId: string | number
/**
* 抄表时间
*/
readingTime: string
/**
* 当前读数
*/
currentReading: number
/**
* 上次读数
*/
previousReading: number
/**
* 用量
*/
consumption: number
/**
* 抄表方式(1手动 2自动 3用户上报)
*/
readingMethod: number
/**
* 抄表照片
*/
imgOssid: string | number
}
export interface MeterRecordForm extends BaseEntity {
/**
* 记录ID
*/
id?: string | number
/**
* 仪表编号
*/
meterId?: string | number
/**
* 抄表员ID
*/
readerId?: string | number
/**
* 抄表时间
*/
readingTime?: string
/**
* 当前读数
*/
currentReading?: number
/**
* 上次读数
*/
previousReading?: number
/**
* 用量
*/
consumption?: number
/**
* 抄表方式(1手动 2自动 3用户上报)
*/
readingMethod?: number
/**
* 抄表照片
*/
imgOssid?: string | number
}
export interface MeterRecordQuery extends PageQuery {
/**
* 仪表编号
*/
meterId?: string | number
/**
* 抄表员ID
*/
readerId?: string | number
/**
* 抄表时间
*/
readingTime?: string
/**
* 当前读数
*/
currentReading?: number
/**
* 上次读数
*/
previousReading?: number
/**
* 用量
*/
consumption?: number
/**
* 抄表方式(1手动 2自动 3用户上报)
*/
readingMethod?: number
/**
* 抄表照片
*/
imgOssid?: string | number
/**
* 日期范围参数
*/
params?: any
}
export interface MeterRecordTrend {
/**
* 仪表类型
*/
meterType?: string | number
/**
* 仪表ID
*/
meterId: string | number
/**
* 楼层ID
*/
floorId: string | number
/**
* 日期
*/
day?: string
/**
* 月份
*/
month?: string
/**
* 年份
*/
year?: string
}

View File

@@ -21,6 +21,8 @@ export interface KnowledgeVO {
*/
covers: string;
coversPath: string|undefined;
/**
* 内容
*/

View File

@@ -26,6 +26,8 @@ export interface PropertyVO {
*/
imgPath: string;
plantImg: string;
/**
* 规格
*/
@@ -102,7 +104,6 @@ export interface PropertyForm extends BaseEntity {
* 备注
*/
remark?: string;
}
export interface PropertyQuery extends PageQuery {
@@ -178,6 +179,8 @@ export interface plantsProduct extends BaseEntity {
*/
imgPath?: string;
plantImg: string |undefined;
/**
* 规格
*/

View File

@@ -0,0 +1,11 @@
import { requestClient } from '#/api/request';
import type { PageResult } from '#/api/common';
/**
* 通行记录列表
* @param data
* @returns void
*/
export function getVisitorList(params?: any) {
return requestClient.get<PageResult<any>>('/sis/visitor/list', { params });
}

View File

@@ -31,6 +31,8 @@ export interface PersonVO {
*/
img: string
imgPath?: string
/**
* 所属单位id
*/
@@ -79,6 +81,10 @@ export interface PersonVO {
rosterType?: string | number
email?: string
idCard?: string
}
export interface PersonForm extends BaseEntity {

View File

@@ -35,6 +35,7 @@ export interface Resident_unitVO {
* 入驻位置
*/
location: string;
locations: string[];
/**
* 入驻时间
@@ -65,6 +66,9 @@ export interface Resident_unitVO {
* 权限组名称
*/
authGroupName?: string;
// 授权期限
authBegDate?:string;//开始
authEndDate?:string;//结束
}

View File

@@ -61,5 +61,5 @@ export function meetRemove(id: ID | IDS) {
}
export function notlist(params?: MeetBo) {
return requestClient.get<PageResult<MeetVO>>('/property/meet/notlist', { params });
return requestClient.get<MeetVO[]>('/property/meet/notlist', { params });
}

View File

@@ -67,6 +67,29 @@ export interface MeetVO {
* 图片
*/
picture: string;
pictureArr: string[];
/**
* 开放时段开始时间
*/
openStartHours: string;
/**
* 开放时段结束时间
*/
openEndHours: string;
/**
* 会议室类型
*/
meetingRoomType: string;
/**
* 位置
*/
locationName: string;
/**
* 负责人
*/
principalsName: string;
}
export interface MeetForm extends BaseEntity {
@@ -153,6 +176,17 @@ export interface MeetForm extends BaseEntity {
*/
picture: string;
pictureArr: string[];
/**
* 开放时段开始时间
*/
openStartHours: string;
/**
* 开放时段结束时间
*/
openEndHours: string;
}
export interface MeetQuery extends PageQuery {
@@ -240,7 +274,7 @@ export interface MeetQuery extends PageQuery {
picture: string;
}
export interface conferenceSettingsDetail extends BaseEntity {
export interface ConferenceSettingsDetail{
/**
* 主键
*/
@@ -329,6 +363,16 @@ export interface conferenceSettingsDetail extends BaseEntity {
* 图片
*/
picture: string;
/**
* 开放时段开始时间
*/
openStartHours: string;
/**
* 开放时段结束时间
*/
openEndHours: string;
}
export interface MeetBo{

View File

@@ -1,18 +1,24 @@
import type { AlarmEventProcessVO, AlarmEventProcessForm, AlarmEventProcessQuery } from './model';
import type {
AlarmEventProcessForm,
AlarmEventProcessQuery,
AlarmEventProcessVO,
} from './model';
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
import type { ID, IDS, PageResult } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询告警信息处理流程记录列表
* @param params
* @returns 告警信息处理流程记录列表
*/
* 查询告警信息处理流程记录列表
* @param params
* @returns 告警信息处理流程记录列表
*/
export function alarmEventProcessList(params?: AlarmEventProcessQuery) {
return requestClient.get<PageResult<AlarmEventProcessVO>>('/sis/alarmEventProcess/list', { params });
return requestClient.get<PageResult<AlarmEventProcessVO>>(
'/sis/alarmEventProcess/list',
{ params },
);
}
/**
@@ -59,3 +65,14 @@ export function alarmEventProcessUpdate(data: AlarmEventProcessForm) {
export function alarmEventProcessRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/sis/alarmEventProcess/${id}`);
}
/**
* 删除告警信息处理流程记录
* @param id id
* @returns void
*/
export function queryResult(id: ID | IDS) {
return requestClient.get<AlarmEventProcessVO>(
`/sis/alarmEventProcess/query/result/${id}`,
);
}

View File

@@ -3,13 +3,8 @@ import { computed } from 'vue';
import { useAntdDesignTokens } from '@vben/hooks';
import { preferences, usePreferences } from '@vben/preferences';
import { App, ConfigProvider, theme } from 'ant-design-vue';
import { antdLocale } from '#/locales';
import { useUploadTip } from './upload-tip';
defineOptions({ name: 'App' });
const { isDark } = usePreferences();
@@ -30,8 +25,6 @@ const tokenTheme = computed(() => {
token: tokens,
};
});
useUploadTip();
</script>
<template>

View File

@@ -84,13 +84,13 @@ const menus = computed(() => {
// icon: CircleHelp,
// text: $t('ui.widgets.qa'),
// },
{
handler: () => {
router.push('/navigation');
},
// icon: TagOutlined,
text: '返回导航',
},
// {
// handler: () => {
// router.push('/navigation');
// },
// // icon: TagOutlined,
// text: '返回导航',
// },
];
/**
* 租户选中状态 不显示个人中心

View File

@@ -56,9 +56,7 @@ export const useAuthStore = defineStore('auth', () => {
if (accessStore.loginExpired) {
accessStore.setLoginExpired(false);
} else {
onSuccess
? await onSuccess?.()
: await router.push('/navigation');
onSuccess ? await onSuccess?.() : await router.push('/analytics');
}
if (userInfo?.realName) {

View File

@@ -1,36 +0,0 @@
import { onMounted } from 'vue';
import { useLocalStorage } from '@vueuse/core';
import { Modal } from 'ant-design-vue';
export function useUploadTip() {
const readTip = useLocalStorage<boolean>('__upload_tip_read_5.4.0', false);
onMounted(() => {
if (readTip.value || !import.meta.env.DEV) {
return;
}
const modalInstance = Modal.info({
title: '提示',
centered: true,
content:
'如果你的版本是从低版本升级到后端>5.4.0, 记得执行升级sql, 否则跳转页面(如oss 代码生成配置)等会404',
okButtonProps: { disabled: true },
onOk() {
modalInstance.destroy();
readTip.value = true;
},
});
let time = 3;
const interval = setInterval(() => {
modalInstance.update({
okText: time === 0 ? '我知道了, 不再弹出' : `${time}秒后关闭`,
okButtonProps: { disabled: time > 0 },
});
if (time <= 0) {
clearInterval(interval);
}
time--;
}, 1000);
});
}

View File

@@ -26,7 +26,7 @@ onMounted(() => {
{ name: '搜索引擎', value: 1048 },
{ name: '直接访问', value: 735 },
{ name: '邮件营销', value: 580 },
{ name: '联盟广告', value: 484 },
// { name: '联盟广告', value: 484 },
],
emphasis: {
label: {

View File

@@ -25,29 +25,29 @@ const overviewItems: AnalysisOverviewItem[] = [
icon: SvgCardIcon,
title: '用户量',
totalTitle: '总用户量',
totalValue: 120_000,
value: 2000,
totalValue: 78,
value: 15,
},
{
icon: SvgCakeIcon,
title: '访问量',
totalTitle: '总访问量',
totalValue: 500_000,
value: 20_000,
totalValue: 2_278,
value: 461,
},
{
icon: SvgDownloadIcon,
title: '下载量',
totalTitle: '总下载量',
totalValue: 120_000,
value: 8000,
totalValue: 17,
value: 2,
},
{
icon: SvgBellIcon,
title: '使用量',
totalTitle: '总使用量',
totalValue: 50_000,
value: 5000,
totalValue: 6_652,
value: 3_739,
},
];

View File

@@ -1,60 +0,0 @@
import type { DemoForm, DemoQuery, DemoVO } from './model';
import type { ID, IDS, PageResult } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询测试单表列表
* @param params
* @returns 测试单表列表
*/
export function demoList(params?: DemoQuery) {
return requestClient.get<PageResult<DemoVO>>('/demo/demo/list', { params });
}
/**
* 导出测试单表列表
* @param params
* @returns 测试单表列表
*/
export function demoExport(params?: DemoQuery) {
return commonExport('/demo/demo/export', params ?? {});
}
/**
* 查询测试单表详情
* @param id id
* @returns 测试单表详情
*/
export function demoInfo(id: ID) {
return requestClient.get<DemoVO>(`/demo/demo/${id}`);
}
/**
* 新增测试单表
* @param data
* @returns void
*/
export function demoAdd(data: DemoForm) {
return requestClient.postWithMsg<void>('/demo/demo', data);
}
/**
* 更新测试单表
* @param data
* @returns void
*/
export function demoUpdate(data: DemoForm) {
return requestClient.putWithMsg<void>('/demo/demo', data);
}
/**
* 删除测试单表
* @param id id
* @returns void
*/
export function demoRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/demo/demo/${id}`);
}

View File

@@ -1,82 +0,0 @@
import type { BaseEntity, PageQuery } from '#/api/common';
export interface DemoVO {
/**
* 主键
*/
id: number | string;
/**
* 排序号
*/
orderNum: number;
/**
* key键
*/
testKey: string;
/**
* 值
*/
value: string;
/**
* 版本
*/
version: number;
}
export interface DemoForm extends BaseEntity {
/**
* 主键
*/
id?: number | string;
/**
* 排序号
*/
orderNum?: number;
/**
* key键
*/
testKey?: string;
/**
* 值
*/
value?: string;
/**
* 版本
*/
version?: number;
}
export interface DemoQuery extends PageQuery {
/**
* 排序号
*/
orderNum?: number;
/**
* key键
*/
testKey?: string;
/**
* 值
*/
value?: string;
/**
* 版本
*/
version?: number;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -1,93 +0,0 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'orderNum',
label: '排序号',
},
{
component: 'Input',
fieldName: 'testKey',
label: 'key键',
},
{
component: 'Input',
fieldName: 'value',
label: '值',
},
{
component: 'Input',
fieldName: 'version',
label: '版本',
},
];
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '主键',
field: 'id',
},
{
title: '排序号',
field: 'orderNum',
},
{
title: 'key键',
field: 'testKey',
},
{
title: '值',
field: 'value',
},
{
title: '版本',
field: 'version',
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
resizable: false,
width: 'auto',
},
];
export const modalSchema: FormSchemaGetter = () => [
{
label: '主键',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
label: '排序号',
fieldName: 'orderNum',
component: 'Input',
rules: 'required',
},
{
label: 'key键',
fieldName: 'testKey',
component: 'Input',
rules: 'required',
},
{
label: '值',
fieldName: 'value',
component: 'Input',
rules: 'required',
},
{
label: '版本',
fieldName: 'version',
component: 'Input',
rules: 'required',
},
];

View File

@@ -1,165 +0,0 @@
<script setup lang="ts">
import type { VbenFormProps } from '@vben/common-ui';
import type { Recordable } from '@vben/types';
import type { VxeGridProps } from '#/adapter/vxe-table';
import { ref } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui';
import { getPopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue';
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
import { commonDownloadExcel } from '#/utils/file/download';
import { demoExport, demoList, demoRemove } from './api';
import { columns, querySchema } from './data';
import demoModal from './demo-modal.vue';
const formOptions: VbenFormProps = {
commonConfig: {
labelWidth: 80,
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
};
const gridOptions: VxeGridProps = {
checkboxConfig: {
// 高亮
highlight: true,
// 翻页时保留选中状态
reserve: true,
// 点击行选中
// trigger: 'row',
},
columns,
height: 'auto',
keepSource: true,
pagerConfig: {},
proxyConfig: {
ajax: {
query: async ({ page }, formValues = {}) => {
return await demoList({
pageNum: page.currentPage,
pageSize: page.pageSize,
...formValues,
});
},
},
},
rowConfig: {
isHover: true,
keyField: 'id',
},
};
const checked = ref(false);
const [BasicTable, tableApi] = useVbenVxeGrid({
formOptions,
gridOptions,
});
const [DemoModal, modalApi] = useVbenModal({
connectedComponent: demoModal,
});
function handleAdd() {
modalApi.setData({});
modalApi.open();
}
async function handleEdit(record: Recordable<any>) {
modalApi.setData({ id: record.id });
modalApi.open();
}
async function handleDelete(row: Recordable<any>) {
await demoRemove(row.id);
await tableApi.query();
}
function handleMultiDelete() {
const rows = tableApi.grid.getCheckboxRecords();
const ids = rows.map((row: any) => row.id);
Modal.confirm({
title: '提示',
okType: 'danger',
content: `确认删除选中的${ids.length}条记录吗?`,
onOk: async () => {
await demoRemove(ids);
await tableApi.query();
checked.value = false;
},
});
}
</script>
<template>
<Page :auto-content-height="true">
<BasicTable>
<template #toolbar-actions>
<span class="pl-[7px] text-[16px]">测试单列表</span>
</template>
<template #toolbar-tools>
<Space>
<a-button
v-access:code="['system:demo:export']"
@click="
commonDownloadExcel(
demoExport,
'测试单数据',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>
<a-button
:disabled="!vxeCheckboxChecked(tableApi)"
danger
type="primary"
v-access:code="['system:demo:remove']"
@click="handleMultiDelete"
>
{{ $t('pages.common.delete') }}
</a-button>
<a-button
type="primary"
v-access:code="['system:demo:add']"
@click="handleAdd"
>
{{ $t('pages.common.add') }}
</a-button>
</Space>
</template>
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['system:demo:edit']"
@click.stop="handleEdit(row)"
>
{{ $t('pages.common.edit') }}
</ghost-button>
<Popconfirm
:get-popup-container="getPopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"
>
<ghost-button
danger
v-access:code="['system:demo:remove']"
@click.stop=""
>
{{ $t('pages.common.delete') }}
</ghost-button>
</Popconfirm>
</Space>
</template>
</BasicTable>
<DemoModal @reload="tableApi.query()" />
</Page>
</template>

View File

@@ -1,50 +0,0 @@
import type { TreeForm, TreeQuery, TreeVO } from './model';
import type { ID, IDS } from '#/api/common';
import { requestClient } from '#/api/request';
/**
* 查询测试树列表
* @param params
* @returns 测试树列表
*/
export function treeList(params?: TreeQuery) {
return requestClient.get<TreeVO[]>('/demo/tree/list', { params });
}
/**
* 查询测试树详情
* @param id id
* @returns 测试树详情
*/
export function treeInfo(id: ID) {
return requestClient.get<TreeVO>(`/demo/tree/${id}`);
}
/**
* 新增测试树
* @param data
* @returns void
*/
export function treeAdd(data: TreeForm) {
return requestClient.postWithMsg<void>('/demo/tree', data);
}
/**
* 更新测试树
* @param data
* @returns void
*/
export function treeUpdate(data: TreeForm) {
return requestClient.putWithMsg<void>('/demo/tree', data);
}
/**
* 删除测试树
* @param id id
* @returns void
*/
export function treeRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/demo/tree/${id}`);
}

View File

@@ -1,102 +0,0 @@
import type { BaseEntity } from '#/api/common';
export interface TreeVO {
/**
* 主键
*/
id: number | string;
/**
* 父id
*/
parentId: number | string;
/**
* 部门id
*/
deptId: number | string;
/**
* 用户id
*/
userId: number | string;
/**
* 值
*/
treeName: string;
/**
* 版本
*/
version: number;
/**
* 子对象
*/
children: TreeVO[];
}
export interface TreeForm extends BaseEntity {
/**
* 主键
*/
id?: number | string;
/**
* 父id
*/
parentId?: number | string;
/**
* 部门id
*/
deptId?: number | string;
/**
* 用户id
*/
userId?: number | string;
/**
* 值
*/
treeName?: string;
/**
* 版本
*/
version?: number;
}
export interface TreeQuery {
/**
* 父id
*/
parentId?: number | string;
/**
* 部门id
*/
deptId?: number | string;
/**
* 用户id
*/
userId?: number | string;
/**
* 值
*/
treeName?: string;
/**
* 版本
*/
version?: number;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -1,108 +0,0 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'parentId',
label: '父id',
},
{
component: 'Input',
fieldName: 'deptId',
label: '部门id',
},
{
component: 'Input',
fieldName: 'userId',
label: '用户id',
},
{
component: 'Input',
fieldName: 'treeName',
label: '值',
},
{
component: 'Input',
fieldName: 'version',
label: '版本',
},
];
export const columns: VxeGridProps['columns'] = [
{
title: '主键',
field: 'id',
treeNode: true,
},
{
title: '父id',
field: 'parentId',
},
{
title: '部门id',
field: 'deptId',
},
{
title: '用户id',
field: 'userId',
},
{
title: '值',
field: 'treeName',
},
{
title: '版本',
field: 'version',
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
resizable: false,
width: 'auto',
},
];
export const modalSchema: FormSchemaGetter = () => [
{
label: '主键',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
label: '父id',
fieldName: 'parentId',
component: 'TreeSelect',
rules: 'required',
},
{
label: '部门id',
fieldName: 'deptId',
component: 'Input',
rules: 'required',
},
{
label: '用户id',
fieldName: 'userId',
component: 'Input',
rules: 'required',
},
{
label: '值',
fieldName: 'treeName',
component: 'Input',
rules: 'required',
},
{
label: '版本',
fieldName: 'version',
component: 'Input',
rules: 'required',
},
];

View File

@@ -1,146 +0,0 @@
<script setup lang="ts">
import type { VbenFormProps } from '@vben/common-ui';
import type { Recordable } from '@vben/types';
import type { VxeGridProps } from '#/adapter/vxe-table';
import { nextTick } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui';
import { getPopupContainer, listToTree } from '@vben/utils';
import { Popconfirm, Space } from 'ant-design-vue';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { treeList, treeRemove } from './api';
import { columns, querySchema } from './data';
import treeModal from './tree-modal.vue';
const formOptions: VbenFormProps = {
commonConfig: {
labelWidth: 80,
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
};
const gridOptions: VxeGridProps = {
columns,
height: 'auto',
keepSource: true,
pagerConfig: {
enabled: false,
},
proxyConfig: {
ajax: {
query: async (_, formValues = {}) => {
const resp = await treeList({
...formValues,
});
const treeData = listToTree(resp, {
id: 'id',
pid: 'parentId',
children: 'children',
});
return { rows: treeData };
},
// 默认请求接口后展开全部 不需要可以删除这段
querySuccess: () => {
nextTick(() => {
expandAll();
});
},
},
},
rowConfig: {
keyField: 'id',
},
treeConfig: {
parentField: 'parentId',
rowField: 'id',
transform: false,
},
};
const [BasicTable, tableApi] = useVbenVxeGrid({ formOptions, gridOptions });
const [TreeModal, modalApi] = useVbenModal({
connectedComponent: treeModal,
});
function handleAdd() {
modalApi.setData({ update: false });
modalApi.open();
}
async function handleEdit(row: Recordable<any>) {
modalApi.setData({ id: row.id, update: true });
modalApi.open();
}
async function handleDelete(row: Recordable<any>) {
await treeRemove(row.id);
await tableApi.query();
}
function expandAll() {
tableApi.grid?.setAllTreeExpand(true);
}
function collapseAll() {
tableApi.grid?.setAllTreeExpand(false);
}
</script>
<template>
<Page :auto-content-height="true">
<BasicTable>
<template #toolbar-actions>
<span class="pl-[7px] text-[16px]">测试树列表</span>
</template>
<template #toolbar-tools>
<Space>
<a-button @click="collapseAll">
{{ $t('pages.common.collapse') }}
</a-button>
<a-button @click="expandAll">
{{ $t('pages.common.expand') }}
</a-button>
<a-button
type="primary"
v-access:code="['system:tree:add']"
@click="handleAdd"
>
{{ $t('pages.common.add') }}
</a-button>
</Space>
</template>
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['system:tree:edit']"
@click.stop="handleEdit(row)"
>
{{ $t('pages.common.edit') }}
</ghost-button>
<Popconfirm
:get-popup-container="getPopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"
>
<ghost-button
danger
v-access:code="['system:tree:remove']"
@click.stop=""
>
{{ $t('pages.common.delete') }}
</ghost-button>
</Popconfirm>
</Space>
</template>
</BasicTable>
<TreeModal @reload="tableApi.query()" />
</Page>
</template>

View File

@@ -1,104 +0,0 @@
<script setup lang="ts">
import { computed, ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { cloneDeep, listToTree } from '@vben/utils';
import { useVbenForm } from '#/adapter/form';
import { treeAdd, treeInfo, treeList, treeUpdate } from './api';
import { modalSchema } from './data';
const emit = defineEmits<{ reload: [] }>();
const isUpdate = ref(false);
const title = computed(() => {
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
});
const [BasicForm, formApi] = useVbenForm({
commonConfig: {
// 默认占满两列
formItemClass: 'col-span-2',
// 默认label宽度 px
labelWidth: 80,
// 通用配置项 会影响到所有表单项
componentProps: {
class: 'w-full',
},
},
schema: modalSchema(),
showDefaultActions: false,
wrapperClass: 'grid-cols-2',
});
async function setupTreeSelect() {
const listData = await treeList();
const treeData = listToTree(listData, { id: 'id', pid: 'parentId' });
formApi.updateSchema([
{
fieldName: 'parentId',
componentProps: {
treeData,
treeLine: { showLeafIcon: false },
fieldNames: { label: 'treeName', value: 'id' },
treeDefaultExpandAll: true,
},
},
]);
}
const [BasicModal, modalApi] = useVbenModal({
fullscreenButton: false,
onCancel: handleCancel,
onConfirm: handleConfirm,
onOpenChange: async (isOpen) => {
if (!isOpen) {
return null;
}
modalApi.modalLoading(true);
const { id } = modalApi.getData() as { id?: number | string };
isUpdate.value = !!id;
if (isUpdate.value && id) {
const record = await treeInfo(id);
await formApi.setValues(record);
}
await setupTreeSelect();
modalApi.modalLoading(false);
},
});
async function handleConfirm() {
try {
modalApi.modalLoading(true);
const { valid } = await formApi.validate();
if (!valid) {
return;
}
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
const data = cloneDeep(await formApi.getValues());
await (isUpdate.value ? treeUpdate(data) : treeAdd(data));
emit('reload');
await handleCancel();
} catch (error) {
console.error(error);
} finally {
modalApi.modalLoading(false);
}
}
async function handleCancel() {
modalApi.close();
await formApi.resetForm();
}
</script>
<template>
<BasicModal :close-on-click-modal="false" :title="title" class="w-[550px]">
<BasicForm />
</BasicModal>
</template>

View File

@@ -61,5 +61,11 @@ export const modalSchema: FormSchemaGetter = () => [
label: '排序',
fieldName: 'sort',
component: 'InputNumber',
rules:'required',
componentProps: {
min: 0,
precision: 0,
step: 1
},
},
];

View File

@@ -164,7 +164,7 @@ const { hasAccessByCodes } = useAccess();
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['property:depot:info']"
v-access:code="['property:depot:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}

View File

@@ -5,9 +5,9 @@ import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
import { suppliersList } from '#/api/property/assetManage/suppliers';
import { depotList } from '#/api/property/assetManage/depot';
import { useUserStore } from '@vben/stores';
// import { useUserStore } from '@vben/stores';
const userStore = useUserStore();
// const userStore = useUserStore();
export const querySchema: FormSchemaGetter = () => [
// {
@@ -39,11 +39,13 @@ export const querySchema: FormSchemaGetter = () => [
{
component: 'Select',
componentProps: {},
componentProps: {
options: getDictOptions('wy_zccgfs'),
},
fieldName: 'buyType',
label: '采购方式',
options: getDictOptions('wy_zccgfs'),
},
{
component: 'Select',
componentProps: {

View File

@@ -179,7 +179,7 @@ function handleDownloadExcel() {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['domain:procurementApplication:audit']"
v-access:code="['domain:procurementApplication:edit']"
:disabled="row.state === '1' || row.state === '2'"
type="primary"
@click.stop="handleAudit(row)"
@@ -187,7 +187,7 @@ function handleDownloadExcel() {
审核
</ghost-button>
<ghost-button
v-access:code="['domain:procurementApplication:detail']"
v-access:code="['domain:procurementApplication:query']"
@click.stop="handleDetail(row)"
>
详情

View File

@@ -155,14 +155,14 @@ const { hasAccessByCodes } = useAccess();
:unCheckedValue="0"
v-model:value="row.state"
:api="() => suppliersUpdate(row)"
:disabled="!hasAccessByCodes(['property:suppliers:update'])"
:disabled="!hasAccessByCodes(['property:suppliers:edit'])"
@reload="() => tableApi.query()"
/>
</template>
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['property:suppliers:info']"
v-access:code="['property:suppliers:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}

View File

@@ -1,20 +1,12 @@
<script setup lang="ts">
import type { Recordable } from '@vben/types';
import { ref } from 'vue';
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue';
import dayjs from 'dayjs';
import {
import {
useVbenVxeGrid,
vxeCheckboxChecked,
type VxeGridProps
type VxeGridProps
} from '#/adapter/vxe-table';
import {
assetTypeExport,
assetTypeList,
@@ -35,15 +27,6 @@ const formOptions: VbenFormProps = {
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
// 处理区间选择器RangePicker时间格式 将一个字段映射为两个字段 搜索/导出会用到
// 不需要直接删除
// fieldMappingTime: [
// [
// 'createTime',
// ['params[beginTime]', 'params[endTime]'],
// ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
// ],
// ],
};
const gridOptions: VxeGridProps = {
@@ -138,8 +121,8 @@ function handleDownloadExcel() {
<a-button
:disabled="!vxeCheckboxChecked(tableApi)"
danger
type="primary"
v-access:code="['property:assetType:remove']"
type="primary"
v-access:code="['property:assetType:remove']"
@click="handleMultiDelete">
{{ $t('pages.common.delete') }}
</a-button>

View File

@@ -63,6 +63,9 @@ const [BasicModal, modalApi] = useVbenModal({
if (isUpdate.value && id) {
const record = await attendanceAreaInfo(id);
record.deviceManageId = record.areaDevice
.map((device: any) => device.remoteSisDeviceManage?.id || '')
.filter((id: string) => id);
await formApi.setValues(record);
}
await markInitialized();

View File

@@ -62,11 +62,13 @@ export const modalSchema: FormSchemaGetter = () => [
label: '区域',
fieldName: 'area',
component: 'Input',
rules: 'required',
},
{
label: '摄像机',
fieldName: 'deviceManageId',
component: 'ApiSelect',
rules: 'required',
componentProps: {
api: async () => {
const res = await deviceManageList({

View File

@@ -154,7 +154,7 @@ function handleDownloadExcel() {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['Property:group:info']"
v-access:code="['Property:group:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}
@@ -187,7 +187,7 @@ function handleDownloadExcel() {
:unCheckedValue="0"
v-model:value="row.status"
:api="() => groupUpdate(row)"
:disabled="!hasAccessByCodes(['property:depot:edit'])"
:disabled="!hasAccessByCodes(['Property:group:edit'])"
@reload="() => tableApi.query()"
/>
</template>

View File

@@ -77,7 +77,7 @@ const columns = [
},
{
title: '部门',
dataIndex: ['dept', 'unitName'],
dataIndex: ['dept', 'deptName'],
key: 'dept',
width: 120,
customRender: ({
@@ -443,7 +443,7 @@ onMounted(() => {});
:columns="columns"
:dataSource="tableData"
:pagination="false"
rowKey="dept.unitId"
rowKey="dept.deptId"
bordered
/>
</div>

View File

@@ -160,9 +160,7 @@ const scheduleData: {
date: string;
list: { type: BadgeProps['status']; content: string }[];
}[] = [
{ date: '2025-07-08', list: [{ type: 'warning', content: '7月8日事件' }] },
{ date: '2025-07-06', list: [{ type: 'success', content: '8月8日事件' }] },
// ...
//组件需要数据结构 { date: '2025-07-08', list: [{ type: 'warning', content: '7月8日事件' }] },
];
// 切换视图模式
function handleViewModeChange(e: RadioChangeEvent): void {
@@ -180,45 +178,11 @@ const getListData2 = (
if (found) {
return found.list;
}
}
// 如果没有找到数据,返回空数组
return [];
};
const getListData = (
value: Dayjs,
): { type: BadgeProps['status']; content: string }[] => {
let listData: { type: BadgeProps['status']; content: string }[] | undefined;
switch (value.date()) {
case 8:
listData = [
{ type: 'warning', content: 'This is warning event.' },
{ type: 'success', content: 'This is usual event.' },
];
break;
case 10:
listData = [
{ type: 'warning', content: 'This is warning event.' },
{ type: 'success', content: 'This is usual event.' },
{ type: 'error', content: 'This is error event.' },
];
break;
case 15:
listData = [
{ type: 'warning', content: 'This is warning event' },
{ type: 'success', content: 'This is very long usual event。。....' },
{ type: 'error', content: 'This is error event 1.' },
{ type: 'error', content: 'This is error event 2.' },
{ type: 'error', content: 'This is error event 3.' },
{ type: 'error', content: 'This is error event 4.' },
];
break;
default:
}
return listData || [];
};
function customHeader() {
// 返回想要的VNode或null
return null; // 什么都不显示
@@ -284,6 +248,11 @@ function handleViewDateDetails(date: string) {
onMounted(() => {
fetchCalendarData();
});
// 暴露方法给父组件调用
defineExpose({
fetchCalendarData,
});
</script>
<template>
<div class="flex h-full flex-col">
@@ -307,7 +276,7 @@ onMounted(() => {
</div>
</div>
<div>
<Button type="primary" @click="handleAdd">新增排班</Button>
<Button type="primary" @click="handleAdd" v-access:code="['Property:arrangement:add']">新增排班</Button>
</div>
</div>
<div class="flex-1 p-1">
@@ -326,12 +295,16 @@ onMounted(() => {
<a
style="margin-left: 4px; color: #1890ff; cursor: pointer"
@click.stop="handleEdit(item.item, current)"
v-access:code="['Property:arrangement:edit']"
>
编辑
</a>
<a
style="margin-left: 4px; color: #ff4d4f; cursor: pointer"
@click.stop="handleDelete(item.item)"
v-access:code="['Property:arrangement:remove']"
>
删除
</a>
@@ -342,6 +315,7 @@ onMounted(() => {
v-if="getListData2(current).length > 0"
style="margin-left: 4px; color: #1890ff; cursor: pointer"
@click.stop="handleViewDateDetails(current)"
v-access:code="['Property:userGroup:queryScheduleView']"
>
详情
</a>

View File

@@ -1,22 +1,36 @@
<script setup lang="ts">
import { ref } from 'vue';
import { ref, nextTick } from 'vue';
import calendarView from './calendarView.vue';
import scheduleView from './scheduleView.vue';
const viewMode = ref<'calender' | 'schedule'>('calender');
// const isCalenderView = ref(true);
const calendarViewRef = ref();
const scheduleViewRef = ref();
function handleViewModeChange(mode: 'calender' | 'schedule') {
viewMode.value = mode;
// 切换视图后,需要重新加载对应视图的数据
nextTick(() => {
if (mode === 'calender') {
// 触发日历视图的数据加载
calendarViewRef.value?.fetchCalendarData();
} else if (mode === 'schedule') {
// 触发班表视图的数据加载
scheduleViewRef.value?.tableApi?.query();
}
});
}
</script>
<template>
<div class="h-full p-4">
<div class="h-full bg-white p-4">
<calendarView
ref="calendarViewRef"
v-show="viewMode === 'calender'"
:viewMode="viewMode"
@changeView="handleViewModeChange"
/>
<scheduleView
ref="scheduleViewRef"
v-show="viewMode === 'schedule'"
:viewMode="viewMode"
@changeView="handleViewModeChange"

View File

@@ -82,15 +82,15 @@ function handleAdd() {
modalApi.open();
}
async function handleEdit(row: Required<ArrangementForm>) {
modalApi.setData({ id: row.scheduleId });
modalApi.open();
}
async function handleDelete(row: Required<ArrangementForm>) {
await arrangementRemove(row.scheduleId);
await tableApi.query();
}
// 暴露方法给父组件调用
defineExpose({
tableApi,
});
</script>
<template>
<div class="h-full">
@@ -137,7 +137,7 @@ async function handleDelete(row: Required<ArrangementForm>) {
>
<ghost-button
danger
v-access:code="['property:arrangement:remove']"
v-access:code="['Property:arrangement:remove']"
@click.stop=""
>
移除

View File

@@ -44,7 +44,7 @@ const groupOptions = ref<any[]>([]); //考勤组
const areaOptions = ref<any[]>([]); //区域
const groupMap = ref<Record<string, any>>({}); // 用于快速查找
let tableData = reactive<
{ dept: { unitId: string | number; unitName: string }; users: PersonVO[] }[]
{ dept: { deptId: string | number; deptName: string }; users: PersonVO[] }[]
>([]); //存放考勤组人员列表数据
const columns = [
{
@@ -56,10 +56,10 @@ const columns = [
},
{
title: '部门',
dataIndex: ['dept', 'unitName'],
dataIndex: ['dept', 'deptName'],
key: 'dept',
width: 120,
customRender: ({ record }: { record: any }) => record.dept.unitName,
customRender: ({ record }: { record: any }) => record.dept.deptName,
},
{
title: '已选人数',
@@ -124,12 +124,11 @@ function handleTableData(newTableData: any) {
if (newTableData.length === 0) {
return;
}
// 处理有数据的情况
for (const newItem of newTableData) {
// 查找是否已存在相同部门
const existingDeptIndex = tableData.findIndex(
(item) => item.dept.unitId === newItem.dept.unitId,
(item) => item.dept.deptId === newItem.dept.deptId,
);
if (existingDeptIndex !== -1) {
@@ -191,7 +190,7 @@ const [BasicModal, modalApi] = useVbenModal({
if (!deptMap.has(deptId)) {
deptMap.set(deptId, {
dept: { unitId: deptId, unitName: deptName },
dept: { deptId: deptId, deptName: deptName },
users: [],
});
}
@@ -252,8 +251,8 @@ async function handleConfirm() {
const data = formModal;
data.userGroupList = tableData.flatMap((item) =>
item.users.map((user) => ({
deptId: item.dept.unitId,
deptName: item.dept.unitName,
deptId: item.dept.deptId,
deptName: item.dept.deptName,
employeeId: user.userId,
employeeName: user.userName,
})),
@@ -351,7 +350,7 @@ onMounted(() => {});
:columns="columns"
:dataSource="tableData"
:pagination="false"
rowKey="dept.unitId"
rowKey="dept.deptId"
bordered
/>
</div>

View File

@@ -75,7 +75,7 @@ function handleInfo(row:any) {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['property:workOrders:info']"
v-access:code="['property:workOrders:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}

View File

@@ -8,7 +8,7 @@ import {
import {
workOrdersList,
} from '#/api/property/businessManagement/workOrders';
import workOrdersDetail from './work-orders-detail.vue';
import workOrdersDetail from '../workOrders/work-orders-detail.vue';
import {columns, querySchema} from './data';
const formOptions: VbenFormProps = {
@@ -75,7 +75,7 @@ function handleInfo(row:any) {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['property:workOrders:info']"
v-access:code="['property:workOrders:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}

View File

@@ -2,8 +2,6 @@ import type {FormSchemaGetter} from '#/adapter/form';
import type {VxeGridProps} from '#/adapter/vxe-table';
import {renderDict} from "#/utils/render";
import {getDictOptions} from "#/utils/dict";
import {h} from "vue";
import {Rate} from "ant-design-vue";
export const querySchema: FormSchemaGetter = () => [
{
@@ -30,7 +28,7 @@ export const querySchema: FormSchemaGetter = () => [
options: getDictOptions('pro_processing_weight'),
},
fieldName: 'processingWeight',
label: '处理权重',
label: '处理优先级',
},
];
@@ -56,7 +54,7 @@ export const columns: VxeGridProps['columns'] = [
field: 'reportingType',
slots: {
default: ({row}) => {
return renderDict(row.reportingType, 'wy_gdsblx');
return row.reportingType!=null?renderDict(row.reportingType, 'wy_gdsblx'):'';
},
},
width: 100,
@@ -82,11 +80,11 @@ export const columns: VxeGridProps['columns'] = [
width: 100,
},
{
title: '处理权重',
title: '处理优先级',
field: 'processingWeight',
slots: {
default: ({row}) => {
return renderDict(row.processingWeight, 'pro_processing_weight');
return row.processingWeight!=null?renderDict(row.processingWeight, 'pro_processing_weight'):'';
},
},
width: 100,
@@ -96,34 +94,34 @@ export const columns: VxeGridProps['columns'] = [
// field: 'planCompleTime',
// width: 100,
// },
{
title: '完成时间',
field: 'compleTime',
width: 100,
},
{
title: '评价',
field: 'serviceEvalua',
width: 180,
slots: {
default: ({row}) => {
return h(Rate, {
value: row.serviceEvalua || 0,
disabled: true,
});
},
},
},
{
title: '是否超时',
field: 'isTimeOut',
width: 100,
slots: {
default: ({row}) => {
return row.isTimeOut ? renderDict(row.isTimeOut, 'wy_sf') : '';
},
},
},
// {
// title: '完成时间',
// field: 'compleTime',
// width: 100,
// },
// {
// title: '评价',
// field: 'serviceEvalua',
// width: 180,
// slots: {
// default: ({row}) => {
// return h(Rate, {
// value: row.serviceEvalua || 0,
// disabled: true,
// });
// },
// },
// },
// {
// title: '是否超时',
// field: 'isTimeOut',
// width: 100,
// slots: {
// default: ({row}) => {
// return row.isTimeOut ? renderDict(row.isTimeOut, 'wy_sf') : '';
// },
// },
// },
{
title: '创建时间',
field: 'createTime',
@@ -166,7 +164,7 @@ export const modalSchema: FormSchemaGetter = () => [
rules: 'selectRequired',
},
{
label: '处理权重',
label: '处理优先级',
fieldName: 'processingWeight',
component: 'Select',
componentProps: {

View File

@@ -184,19 +184,21 @@ onMounted(async () => {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['property:workOrders:dispatch']"
@click.stop="handleOrders(row,'group')"
v-if="row.status!=='1' && row.status!=='2'"
v-if="row.status!=='1' && row.status!=='2'&&row.operationMode!=='2'"
>
{{ '派单' }}
</ghost-button>
<ghost-button
v-access:code="['property:workOrders:grab']"
@click.stop="handleOrders(row,'rob')"
v-if="row.status!=='1' && row.status!=='2'"
v-if="row.status!=='1' && row.status!=='2'&&row.operationMode!=='2'"
>
{{ '抢单' }}
</ghost-button>
<ghost-button
v-access:code="['property:workOrders:info']"
v-access:code="['property:workOrders:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}

View File

@@ -3,6 +3,7 @@ import {useVbenModal} from '@vben/common-ui';
import {cloneDeep} from '@vben/utils';
import {useVbenForm} from '#/adapter/form';
import {
workOrdersDispatch, workOrdersGrab,
workOrdersInfo,
workOrdersUpdate
} from '#/api/property/businessManagement/workOrders';
@@ -84,11 +85,15 @@ async function handleConfirm() {
}
const data = cloneDeep(await formApi.getValues());
if(title.value === '派单'){
//派单
record.value.handler = data.handler
await workOrdersDispatch(record.value)
}else{
//抢单
record.value.handler = userStore.userInfo.userId
await workOrdersGrab(record.value)
}
await workOrdersUpdate(record.value)
resetInitialized();
emit('reload');
modalApi.close();

View File

@@ -1,13 +1,21 @@
<script setup lang="ts">
import { ref, shallowRef} from 'vue';
import {ref, shallowRef} from 'vue';
import {useVbenModal} from '@vben/common-ui';
import {Descriptions, DescriptionsItem, Timeline, TimelineItem, Rate,Divider} from 'ant-design-vue';
import {
Descriptions,
DescriptionsItem,
Timeline,
TimelineItem,
Rate,
Divider
} from 'ant-design-vue';
import dayjs from 'dayjs';
import duration from 'dayjs/plugin/duration';
import relativeTime from 'dayjs/plugin/relativeTime';
import {renderDict} from "#/utils/render";
import {workOrdersInfo} from "#/api/property/businessManagement/workOrders";
import type {HandleRecords, WorkOrdersVO} from "#/api/property/businessManagement/workOrders/model";
import {ossInfo} from "#/api/system/oss";
dayjs.extend(duration);
dayjs.extend(relativeTime);
@@ -20,7 +28,8 @@ const [BasicModal, modalApi] = useVbenModal({
});
const orderDetail = shallowRef<null | WorkOrdersVO>(null);
const handleRecords=ref<HandleRecords[]>([])
const handleRecords = ref<HandleRecords[]>([])
async function handleOpenChange(open: boolean) {
if (!open) {
return null;
@@ -28,14 +37,33 @@ async function handleOpenChange(open: boolean) {
modalApi.modalLoading(true);
const {id} = modalApi.getData() as { id: number | string };
orderDetail.value = await workOrdersInfo(id);
if(orderDetail.value){
handleRecords.value = orderDetail.value.workOrdersRecordVoList.map( (item, index) => ({
if (orderDetail.value.workOrdersRecordVoList) {
handleRecords.value = orderDetail.value.workOrdersRecordVoList.map((item, index) => ({
status: item.status,
createTime: item.createTime,
handlerName: index === 0 ? item.initiatorPeople : item.handlerName
}))
}
modalApi.modalLoading(false);
try {
if (orderDetail.value.orderImgUrl) {
const res = await ossInfo([orderDetail.value.orderImgUrl]);
let imgUrls = [] as string[];
res.forEach(item => {
imgUrls.push(item.url)
})
orderDetail.value.orderImgPath = imgUrls;
}
if (orderDetail.value.imgUrl) {
const res = await ossInfo([orderDetail.value.imgUrl]);
let imgUrls = [] as string[];
res.forEach(item => {
imgUrls.push(item.url)
})
orderDetail.value.evaluateImgPath = imgUrls
}
} catch (e) {
}
modalApi.modalLoading(false);
}
</script>
@@ -50,16 +78,16 @@ async function handleOpenChange(open: boolean) {
{{ orderDetail.orderName }}
</DescriptionsItem>
<DescriptionsItem label="工单类型">
{{orderDetail.typeName}}
{{ orderDetail.typeName }}
</DescriptionsItem>
<DescriptionsItem label="上报类型">
<component
:is="renderDict(orderDetail.reportingType,'wy_gdsblx')"
<component v-if="orderDetail.reportingType!=null"
:is="renderDict(orderDetail.reportingType,'wy_gdsblx')"
/>
</DescriptionsItem>
<DescriptionsItem label="处理权重">
<component
:is="renderDict(orderDetail.processingWeight,'pro_processing_weight')"
<DescriptionsItem label="处理优先级">
<component v-if="orderDetail.processingWeight!=null"
:is="renderDict(orderDetail.processingWeight,'pro_processing_weight')"
/>
</DescriptionsItem>
<DescriptionsItem label="发起人">
@@ -74,10 +102,9 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem label="具体位置" :span="2">
{{ orderDetail.location }}
</DescriptionsItem>
<!-- <DescriptionsItem label="计划完成时间">-->
<!-- {{ orderDetail.planCompleTime }}-->
<!-- </DescriptionsItem>-->
<!-- <DescriptionsItem label="计划完成时间">-->
<!-- {{ orderDetail.planCompleTime }}-->
<!-- </DescriptionsItem>-->
<DescriptionsItem label="备注" :span="2">
{{ orderDetail.remark }}
@@ -88,23 +115,24 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem label="完成时间">
{{ orderDetail.compleTime }}
</DescriptionsItem>
<DescriptionsItem label="是否超时" v-if="orderDetail.isTimeOut!=null">
<component
:is="renderDict(orderDetail.isTimeOut,'wy_sf')"
<DescriptionsItem label="是否超时" :span="2">
<component v-if="orderDetail.isTimeOut!=null"
:is="renderDict(orderDetail.isTimeOut,'wy_sf')"
/>
</DescriptionsItem>
<DescriptionsItem label="工单图片" v-if="orderDetail.orderImgPath" :span="2">
<img v-for="item in orderDetail.orderImgPath" :src="item" alt="图片加载失败"
class="orders-img"/>
</DescriptionsItem>
<DescriptionsItem label="服务评价" v-if="orderDetail.serviceEvalua!=null" :span="2">
<Rate :value="orderDetail.serviceEvalua" disabled/>
</DescriptionsItem>
<DescriptionsItem label="评价内容" v-if="orderDetail.serviceEvaluaText" :span="2">
{{ orderDetail.serviceEvaluaText }}
</DescriptionsItem>
<DescriptionsItem label="评价图片" v-if="orderDetail.imgUrl" :span="2">
{{ orderDetail.imgUrl }}
</DescriptionsItem>
<DescriptionsItem label="工单图片" v-if="orderDetail.orderImgUrl" :span="2">
{{ orderDetail.orderImgUrl }}
<DescriptionsItem label="评价图片" v-if="orderDetail.evaluateImgPath" :span="2">
<img v-for="item in orderDetail.evaluateImgPath" :src="item" alt="图片加载失败"
class="orders-img"/>
</DescriptionsItem>
</Descriptions>
<Divider orientation="left" orientation-margin="0px">
@@ -112,14 +140,22 @@ async function handleOpenChange(open: boolean) {
</Divider>
<Timeline>
<TimelineItem v-for="(item,index) in handleRecords" :key="index">
<p style="display: flex;">类型
<component
:is="renderDict(item.status,'wy_gdclzt')"
/></p>
<p>时间{{item.createTime}}</p>
<p>处理人{{item.handlerName}}</p>
<p style="display: flex;">类型
<component v-if="item.status!=null"
:is="renderDict(item.status,'wy_gdclzt')"
/>
</p>
<p>时间{{ item.createTime }}</p>
<p>处理人{{ item.handlerName }}</p>
</TimelineItem>
</Timeline>
</div>
</BasicModal>
</template>
<style scoped lang="scss">
.orders-img {
width: 100px;
margin: 5px 10px;
display: inline-block;
}
</style>

View File

@@ -15,6 +15,7 @@ import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
import {modalSchema} from './data';
import {workOrdersTypeTree} from "#/api/property/businessManagement/workOrdersType";
import type {WorkOrdersTypeVO} from "#/api/property/businessManagement/workOrdersType/model";
const emit = defineEmits<{ reload: [] }>();
@@ -108,7 +109,7 @@ async function queryWorkOrdersType() {
const options = await workOrdersTypeTree()
formApi.updateSchema([
{
componentProps: () => ({
componentProps: (formModel) => ({
class: 'w-full',
fieldNames: {
key: 'id',
@@ -123,16 +124,15 @@ async function queryWorkOrdersType() {
treeLine: { showLeafIcon: false },
treeNodeFilterProp: 'orderTypeName',
treeNodeLabelProp: 'orderTypeName',
async onSelect(type:string,node:WorkOrdersTypeVO) {
formModel.processingWeight = node.processingWeight;
},
}),
fieldName: 'type',
},
]);
}
const filterOption = (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};
</script>
<template>

View File

@@ -46,6 +46,16 @@ export const columns: VxeGridProps['columns'] = [
},
width:180,
},
{
title: '处理优先级',
field: 'processingWeight',
slots: {
default: ({row}) => {
return row.processingWeight!=null?renderDict(row.processingWeight, 'pro_processing_weight'):'';
},
},
width: 100,
},
{
title: '排序值',
field: 'sort',
@@ -105,6 +115,15 @@ export const modalSchema: FormSchemaGetter = () => [
},
rules: 'selectRequired',
},
{
label: '处理优先级',
fieldName: 'processingWeight',
component: 'Select',
componentProps: {
options: getDictOptions('pro_processing_weight'),
},
rules: 'selectRequired',
},
{
label: '完成时效(小时)',
fieldName: 'completionNumber',

View File

@@ -140,6 +140,7 @@ function handleMultiDelete() {
<Space>
<ghost-button
@click.stop="handleInfo(row)"
v-access:code="['property:workOrdersType:query']"
>
{{ $t('pages.common.info') }}
</ghost-button>

View File

@@ -37,11 +37,16 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem label="类型名称">
{{ workOrdersTypeInfoDetail.orderTypeName }}
</DescriptionsItem>
<DescriptionsItem label="运作模式" v-if="workOrdersTypeInfoDetail.operationMode!=null">
<component
<DescriptionsItem label="运作模式" >
<component v-if="workOrdersTypeInfoDetail.operationMode!=null"
:is="renderDict(workOrdersTypeInfoDetail.operationMode,'pro_operation_pattern')"
/>
</DescriptionsItem>
<DescriptionsItem label="处理优先级">
<component v-if="workOrdersTypeInfoDetail.processingWeight!=null"
:is="renderDict(workOrdersTypeInfoDetail.processingWeight,'pro_processing_weight')"
/>
</DescriptionsItem>
<DescriptionsItem label="排序值">
{{ workOrdersTypeInfoDetail.sort }}
</DescriptionsItem>

View File

@@ -26,6 +26,7 @@ import cleanDetailModal from './clean-detail-modal.vue';
// import { modalSchema } from './data';
import { communityTree } from '#/api/property/community';
import { getDictOptions } from '#/utils/dict';
import type {Clean_orderForm} from "#/api/property/clean_order/model";
const emit = defineEmits<{ reload: [] }>();
@@ -190,9 +191,13 @@ const modalSchema = [
{
label: '评价图片',
fieldName: 'imgUrl',
component: 'Input',
component: 'ImageUpload',
componentProps: {
helpMessage: false,
},
dependencies: {
show: () => (isReadonly.value ? true : false),
show: (formValue:Clean_orderForm) =>
isReadonly.value && formValue.imgUrl ? true : false,
triggerFields: [''],
},
},
@@ -201,7 +206,7 @@ const modalSchema = [
fieldName: 'signType',
component: 'Select',
componentProps: {
options:getDictOptions('wy_bjqdfs')
options: getDictOptions('wy_bjqdfs'),
},
dependencies: {
show: () => (isReadonly.value ? true : false),
@@ -213,10 +218,11 @@ const modalSchema = [
fieldName: 'signImgUrl',
component: 'ImageUpload',
componentProps: {
helpMessage:false
helpMessage: false,
},
dependencies: {
show: (formValue) => (isReadonly.value&&formValue.signImgUrl ? true : false),
show: (formValue:Clean_orderForm) =>
isReadonly.value && formValue.signImgUrl ? true : false,
triggerFields: [''],
},
},
@@ -289,7 +295,6 @@ const [BasicModal, modalApi] = useVbenModal({
if (!isOpen) {
return null;
}
console.log(isReadonly.value);
// 查询服务地址树形结构
setupCommunitySelect();
@@ -314,6 +319,7 @@ const [BasicModal, modalApi] = useVbenModal({
}
if ((isUpdate.value || isReadonly.value) && id) {
const record: any = await clean_orderInfo(id);
if (record.starTime) record.starTime = dayjs(record.starTime);
if (record.endTime) record.endTime = dayjs(record.endTime);
editUnitId.value = record.unitId || '';
@@ -496,7 +502,6 @@ async function handleConfirm() {
return;
}
const data = cloneDeep(await formApi.getValues());
console.log(data);
// 单位数据缓存
if (unitListData.length === 0) {
@@ -537,7 +542,6 @@ async function handleClosed() {
// 获取服务地址
async function setupCommunitySelect() {
const areaList = await communityTree(4);
console.log(areaList);
// 选中后显示在输入框的值 即父节点 / 子节点
// addFullName(areaList, 'areaName', ' / ');

View File

@@ -74,8 +74,8 @@ export const columns: VxeGridProps['columns'] = [
},
{
title: '服务地址',
field: 'location',
width: '180',
field: 'locationName',
width: '260',
},
{
title: '合计费用(元)',

View File

@@ -7,8 +7,6 @@ import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
import { costItemSettingList } from '#/api/property/costManagement/costItemSetting';
import { personList } from '#/api/property/resident/person';
import { communityTree } from '#/api/property/community';
import { handleNode } from '@vben/utils';
/**
* 查询表单 schema
@@ -57,7 +55,7 @@ export const columns: VxeGridProps['columns'] = [
},
{ title: '车牌号', field: 'carNumber' },
{ title: '车位', field: 'location' },
{ title: '业主', field: 'personId' },
{ title: '业主', field: 'personName' },
{
title: '缴费状态',
field: 'chargeStatus',
@@ -106,12 +104,12 @@ export const modalSchema: FormSchemaGetter = () => [
rules: 'required',
componentProps: {
api: async () => {
const rows = await personList({ pageSize: 1000000000, pageNum: 1 });
const rows = await userList({ pageSize: 1000000000, pageNum: 1 });
return rows;
},
resultField: 'rows',
labelField: 'userName',
valueField: 'id',
valueField: 'userId',
},
disabled: true,
},
@@ -143,7 +141,11 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'ApiSelect',
componentProps: {
api: async () => {
const rows = await costItemSettingList({ pageSize: 1000000000, pageNum: 1, costType: '2' });
const rows = await costItemSettingList({
pageSize: 1000000000,
pageNum: 1,
costType: '2',
});
return rows;
},
resultField: 'rows',
@@ -244,7 +246,11 @@ export const addModalSchema: FormSchemaGetter = () => [
component: 'ApiSelect',
componentProps: {
api: async () => {
const rows = await costItemSettingList({ pageSize: 1000000000, pageNum: 1, costType: '2' });
const rows = await costItemSettingList({
pageSize: 1000000000,
pageNum: 1,
costType: '2',
});
return rows;
},
resultField: 'rows',

View File

@@ -152,7 +152,7 @@ function handleDownloadExcel() {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['property:carCharge:info']"
v-access:code="['property:carCharge:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}

View File

@@ -140,7 +140,7 @@ const { hasAccessByCodes } = useAccess();
unCheckedValue="0"
v-model:value="row.state"
:api="() => costItemSettingUpdate(row)"
:disabled=" !hasAccessByCodes(['property:unit:edit'])"
:disabled=" !hasAccessByCodes(['property:costItemSetting:edit'])"
@reload="() => tableApi.query()"
/>
</template>

View File

@@ -19,7 +19,7 @@ import { personList } from '#/api/property/resident/person';
const emit = defineEmits<{ reload: [] }>();
const costItemsOptions = ref<any>([]);
const meterTypeOptions = ref<any>([]);
const isMeterType = ref(false);
const isMeterType = ref(false); //是否选择了费用类型
const isUpdate = ref(false);
const title = computed(() => {
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
@@ -48,11 +48,11 @@ const schema = [
componentProps: {
api: async () => {
const res = await personList({ pageSize: 1000000000, pageNum: 1 });
return res.rows.map((item: any) => ({
label: item.userName,
value: item.id,
}));
return res;
},
resultField: 'rows',
labelField: 'userName',
valueField: 'id',
},
},
{
@@ -70,6 +70,7 @@ const schema = [
isMeterType.value = false;
} else {
isMeterType.value = true;
// 获取费用项目
const costItemsRes = await costItemSettingList({
pageSize: 1000000000,
pageNum: 1,
@@ -79,10 +80,11 @@ const schema = [
label: item.chargeItem,
value: item.id,
}));
// 获取抄表类型水费字典为0电费为1
const meterTypeRes = await meterReadingTypeList({
pageSize: 1000000000,
pageNum: 1,
costType: value == '5' ? 0 : 1,
meterType: value == '5' ? '0' : '1',
});
meterTypeOptions.value = (meterTypeRes?.rows || []).map((item) => ({
label: item.name,

View File

@@ -1,8 +1,7 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import { getDictOptions } from '#/utils/dict';
import { costItemSettingList } from '#/api/property/costManagement/costItemSetting';
import {meterReadingTypeList} from '#/api/property/costManagement/meterReadingType';
import {renderDict} from "#/utils/render";
export const querySchema: FormSchemaGetter = () => [
{
@@ -27,11 +26,16 @@ export const columns: VxeGridProps['columns'] = [
},
{
title: '费用类型',
field: 'itemId',
field: 'costType',
slots: {
default: ({ row }) => {
return renderDict(row.costType, 'wy_cbfylx');
},
},
},
{
title: '抄表类型',
field: 'meterTypeId',
field: 'costTypeName',
},
{
title: '本期度数',
@@ -97,7 +101,7 @@ export const modalSchema: FormSchemaGetter = () => [
// return {
// api: async ()=>{
// console.log(values);
// const rows = await costItemSettingList({pageSize:1000000000,pageNum:1,costType:values.costType});
// return rows;
// },
@@ -118,7 +122,7 @@ export const modalSchema: FormSchemaGetter = () => [
// return {
// api: async()=>{
// const rows = await meterReadingTypeList({pageSize:1000000000,pageNum:1,costType:values.costType=='5'?0:1});
// return rows;
// return rows;
// },
// resultField:'rows',
// labelField:'name',

View File

@@ -29,15 +29,6 @@ const formOptions: VbenFormProps = {
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
// 处理区间选择器RangePicker时间格式 将一个字段映射为两个字段 搜索/导出会用到
// 不需要直接删除
// fieldMappingTime: [
// [
// 'createTime',
// ['params[beginTime]', 'params[endTime]'],
// ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
// ],
// ],
};
const gridOptions: VxeGridProps = {

View File

@@ -36,7 +36,7 @@ export const columns: VxeGridProps['columns'] = [
{type: 'checkbox', width: 60},
{
title: '房屋',
field: 'roomId',
field: 'roomName',
minWidth: 150,
},
{

View File

@@ -164,7 +164,7 @@ function handleDownloadExcel() {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['property:houseCharge:info']"
v-access:code="['property:houseCharge:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}

View File

@@ -33,8 +33,13 @@ export const querySchema: FormSchemaGetter = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '房屋',
field: 'roomNumber',
title: '费用类型',
field: 'costType',
slots: {
default: ({ row }) => {
return renderDict(row.costType, 'pro_expense_type');
},
},
},
{
title: '费用项目',

View File

@@ -85,12 +85,14 @@ async function handleEdit(row: Required<PaymentReviewForm>) {
<Space>
<ghost-button
@click.stop="handleInfo(row)"
v-access:code="['property:payFeeAudit:query']"
>
{{ $t('pages.common.info') }}
</ghost-button>
<ghost-button
:disabled="row.state!=='0'"
@click.stop="handleEdit(row)"
v-access:code="['property:payFeeAudit:edit']"
>
{{ '审核' }}
</ghost-button>

View File

@@ -36,7 +36,7 @@ async function handleOpenChange(open: boolean) {
<BasicModal :footer="false" :fullscreen-button="false" title="缴费审核详情" class="w-[70%]">
<Descriptions v-if="paymentReviewDetail" size="small" :column="2" bordered
:labelStyle="{width:'120px'}">
<DescriptionsItem label="房屋">
<DescriptionsItem label="房屋" v-if="paymentReviewDetail.roomNumber">
{{ paymentReviewDetail.roomNumber }}
</DescriptionsItem>
<DescriptionsItem label="费用项目">

View File

@@ -158,7 +158,7 @@ function handleDownloadExcel() {
审核
</ghost-button>
<ghost-button
v-access:code="['property:returnPayFee:info']"
v-access:code="['property:returnPayFee:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}

View File

@@ -1,61 +1,50 @@
<script setup lang="ts">
import { computed, ref } from "vue";
import { computed, ref } from 'vue';
import { useVbenModal } from "@vben/common-ui";
import { $t } from "@vben/locales";
import { cloneDeep } from "@vben/utils";
import { useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { cloneDeep } from '@vben/utils';
import { useVbenForm } from "#/adapter/form";
import {
meterInfoAdd,
meterInfoInfo,
meterInfoUpdate,
} from "#/api/property/meter/meterInfo";
import { defaultFormValueGetter, useBeforeCloseDiff } from "#/utils/popup";
import { useVbenForm } from '#/adapter/form';
import { activitiesAdd, activitiesInfo, activitiesUpdate } from '#/api/property/customerService/activities';
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
const props = defineProps({
meterType: {
type: Number,
required: true,
},
});
import { initMoalForm } from "./data";
const modalSchema = initMoalForm(props.meterType);
import { modalSchema } from './data';
import dayjs from "dayjs";
const emit = defineEmits<{ reload: [] }>();
const isUpdate = ref(false);
const title = computed(() => {
return isUpdate.value ? $t("pages.common.edit") : $t("pages.common.add");
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
});
const [BasicForm, formApi] = useVbenForm({
commonConfig: {
//
formItemClass: "col-span-1",
formItemClass: 'col-span-1',
// label px
labelWidth: 120,
labelWidth: 80,
//
componentProps: {
class: "w-full",
},
class: 'w-full',
}
},
schema: modalSchema(),
showDefaultActions: false,
wrapperClass: "grid-cols-2",
wrapperClass: 'grid-cols-2',
});
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
{
initializedGetter: defaultFormValueGetter(formApi),
currentGetter: defaultFormValueGetter(formApi),
}
},
);
const [BasicModal, modalApi] = useVbenModal({
//
class: "w-[900px]",
class: 'w-[60%]',
fullscreenButton: false,
onBeforeClose,
onClosed: handleClosed,
@@ -70,11 +59,9 @@ const [BasicModal, modalApi] = useVbenModal({
isUpdate.value = !!id;
if (isUpdate.value && id) {
const record = await meterInfoInfo(id);
record.meterType = record.meterType.toString();
record.meterUnit = record.meterUnit.toString();
record.runningState = record.runningState.toString();
record.communicationState = record.communicationState.toString();
const record = await activitiesInfo(id);
dayjs(record.startTime, 'YYYY-MM-DD HH:mm:ss')
dayjs(record.endTime, 'YYYY-MM-DD HH:mm:ss')
await formApi.setValues(record);
}
await markInitialized();
@@ -92,9 +79,11 @@ async function handleConfirm() {
}
// getValuesreadonly
const data = cloneDeep(await formApi.getValues());
await (isUpdate.value ? meterInfoUpdate(data) : meterInfoAdd(data));
data.startTime = dayjs(data.startTime).format('YYYY-MM-DD HH:mm:ss');
data.endTime = dayjs(data.endTime).format('YYYY-MM-DD HH:mm:ss');
await (isUpdate.value ? activitiesUpdate(data) : activitiesAdd(data));
resetInitialized();
emit("reload");
emit('reload');
modalApi.close();
} catch (error) {
console.error(error);

View File

@@ -0,0 +1,128 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'title',
label: '标题',
},
{
component: 'Select',
componentProps: {
options: getDictOptions('pro_activity_status'),
},
fieldName: 'status',
label: '状态',
},
];
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '序号',
field: 'id',
slots: {
default: ({ rowIndex }) => {
return (rowIndex + 1).toString();
},
},
},
{
title: '标题',
field: 'title',
},
{
title: '创建人',
field: 'createName',
},
{
title: '开始时间',
field: 'startTime',
},
{
title: '结束时间',
field: 'endTime',
},
{
title: '状态',
field: 'status',
slots: {
default: ({ row }) => {
// 可选从DictEnum中获取 DictEnum.PRO_ACTIVITY_STATUS 便于维护
return renderDict(row.status, 'pro_activity_status');
},
},
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
width: 180,
},
];
export const modalSchema: FormSchemaGetter = () => [
{
label: '主键',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
label: '标题',
fieldName: 'title',
component: 'Input',
rules: 'required',
},
{
label: '头部照片',
fieldName: 'headImgUrl',
component: 'ImageUpload',
componentProps: {
maxCount: 1,
},
formItemClass: 'col-span-2',
// rules: 'required',
},
{
label: '开始时间',
fieldName: 'startTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
{
label: '结束时间',
fieldName: 'endTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
{
label: '活动内容',
fieldName: 'activeContent',
component: 'RichTextarea',
formItemClass: 'col-span-2',
componentProps: {
// disabled: false, // 是否只读
// height: 400 // 高度 默认400
},
rules: 'required',
},
];

View File

@@ -9,24 +9,22 @@ import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue';
import dayjs from 'dayjs';
import {
import {
useVbenVxeGrid,
vxeCheckboxChecked,
type VxeGridProps
type VxeGridProps
} from '#/adapter/vxe-table';
import {
meterInfoExport,
meterInfoList,
meterInfoRemove,
} from '#/api/property/meter/meterInfo';
import type { MeterInfoForm } from '#/api/property/meterInfo/model';
activitiesExport,
activitiesList,
activitiesRemove,
} from '#/api/property/customerService/activities';
import type { ActivitiesForm } from '#/api/property/customerService/activities/model';
import { commonDownloadExcel } from '#/utils/file/download';
import meterInfoModal from "../components/meterInfo-modal.vue";
import { initQuerySchema, initColumns } from "../components/data";
const columns = initColumns(2);
const querySchema = initQuerySchema(2);
import activitiesModal from './activities-modal.vue';
import { columns, querySchema } from './data';
const formOptions: VbenFormProps = {
commonConfig: {
@@ -66,7 +64,7 @@ const gridOptions: VxeGridProps = {
proxyConfig: {
ajax: {
query: async ({ page }, formValues = {}) => {
return await meterInfoList({
return await activitiesList({
pageNum: page.currentPage,
pageSize: page.pageSize,
...formValues,
@@ -78,7 +76,7 @@ const gridOptions: VxeGridProps = {
keyField: 'id',
},
//
id: 'property-meterInfo-index'
id: 'property-activities-index'
};
const [BasicTable, tableApi] = useVbenVxeGrid({
@@ -86,8 +84,8 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
gridOptions,
});
const [MeterInfoModal, modalApi] = useVbenModal({
connectedComponent: meterInfoModal,
const [ActivitiesModal, modalApi] = useVbenModal({
connectedComponent: activitiesModal,
});
function handleAdd() {
@@ -95,32 +93,32 @@ function handleAdd() {
modalApi.open();
}
async function handleEdit(row: Required<MeterInfoForm>) {
async function handleEdit(row: Required<ActivitiesForm>) {
modalApi.setData({ id: row.id });
modalApi.open();
}
async function handleDelete(row: Required<MeterInfoForm>) {
await meterInfoRemove(row.id);
async function handleDelete(row: Required<ActivitiesForm>) {
await activitiesRemove(row.id);
await tableApi.query();
}
function handleMultiDelete() {
const rows = tableApi.grid.getCheckboxRecords();
const ids = rows.map((row: Required<MeterInfoForm>) => row.id);
const ids = rows.map((row: Required<ActivitiesForm>) => row.id);
Modal.confirm({
title: '提示',
okType: 'danger',
content: `确认删除选中的${ids.length}条记录吗?`,
onOk: async () => {
await meterInfoRemove(ids);
await activitiesRemove(ids);
await tableApi.query();
},
});
}
function handleDownloadExcel() {
commonDownloadExcel(meterInfoExport, '水电气数据', tableApi.formApi.form.values, {
commonDownloadExcel(activitiesExport, '热门活动数据', tableApi.formApi.form.values, {
fieldMappingTime: formOptions.fieldMappingTime,
});
}
@@ -128,11 +126,11 @@ function handleDownloadExcel() {
<template>
<Page :auto-content-height="true">
<BasicTable table-title="水电气列表">
<BasicTable table-title="热门活动列表">
<template #toolbar-tools>
<Space>
<a-button
v-access:code="['property:meterInfo:export']"
v-access:code="['property:activities:export']"
@click="handleDownloadExcel"
>
{{ $t('pages.common.export') }}
@@ -140,14 +138,14 @@ function handleDownloadExcel() {
<a-button
:disabled="!vxeCheckboxChecked(tableApi)"
danger
type="primary"
v-access:code="['property:meterInfo:remove']"
type="primary"
v-access:code="['property:activities:remove']"
@click="handleMultiDelete">
{{ $t('pages.common.delete') }}
</a-button>
<a-button
type="primary"
v-access:code="['property:meterInfo:add']"
v-access:code="['property:activities:add']"
@click="handleAdd"
>
{{ $t('pages.common.add') }}
@@ -157,7 +155,7 @@ function handleDownloadExcel() {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['property:meterInfo:edit']"
v-access:code="['property:activities:edit']"
@click.stop="handleEdit(row)"
>
{{ $t('pages.common.edit') }}
@@ -170,7 +168,7 @@ function handleDownloadExcel() {
>
<ghost-button
danger
v-access:code="['property:meterInfo:remove']"
v-access:code="['property:activities:remove']"
@click.stop=""
>
{{ $t('pages.common.delete') }}
@@ -179,6 +177,6 @@ function handleDownloadExcel() {
</Space>
</template>
</BasicTable>
<MeterInfoModal @reload="tableApi.query()" :meterType="2" />
<ActivitiesModal @reload="tableApi.query()" />
</Page>
</template>

View File

@@ -0,0 +1,88 @@
<script setup lang="ts">
import { ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { cloneDeep } from '@vben/utils';
import { useVbenForm } from '#/adapter/form';
import { contingenPlanInfo, contingenPlanUpdate } from '#/api/property/customerService/contingenPlan';
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
import {schema} from './data';
const emit = defineEmits<{ reload: [] }>();
const [BasicForm, formApi] = useVbenForm({
commonConfig: {
formItemClass: 'col-span-1',
labelWidth: 80,
componentProps: {
class: 'w-full',
}
},
schema: schema(),
showDefaultActions: false,
wrapperClass: 'grid-cols-2',
});
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
{
initializedGetter: defaultFormValueGetter(formApi),
currentGetter: defaultFormValueGetter(formApi),
},
);
const record = ref({})
const [BasicModal, modalApi] = useVbenModal({
// 在这里更改宽度
class: 'w-[550px]',
fullscreenButton: false,
onBeforeClose,
onClosed: handleClosed,
onConfirm: handleConfirm,
onOpenChange: async (isOpen) => {
if (!isOpen) {
return null;
}
modalApi.modalLoading(true);
const { id } = modalApi.getData() as { id?: number | string };
record.value = await contingenPlanInfo(id);
await formApi.setValues(record.value);
await markInitialized();
modalApi.modalLoading(false);
},
});
async function handleConfirm() {
try {
modalApi.lock(true);
const { valid } = await formApi.validate();
if (!valid) {
return;
}
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
const data = cloneDeep(await formApi.getValues());
record.value.status = data.status
await contingenPlanUpdate(record.value)
resetInitialized();
emit('reload');
modalApi.close();
} catch (error) {
console.error(error);
} finally {
modalApi.lock(false);
}
}
async function handleClosed() {
await formApi.resetForm();
resetInitialized();
}
</script>
<template>
<BasicModal title="审核">
<BasicForm />
</BasicModal>
</template>

View File

@@ -39,6 +39,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
},
);
const record = ref({})
const [BasicModal, modalApi] = useVbenModal({
// 在这里更改宽度
class: 'w-[60%]',
@@ -56,8 +57,8 @@ const [BasicModal, modalApi] = useVbenModal({
isUpdate.value = !!id;
if (isUpdate.value && id) {
const record = await contingenPlanInfo(id);
await formApi.setValues(record);
record.value = await contingenPlanInfo(id);
await formApi.setValues(record.value);
}
await markInitialized();
@@ -74,6 +75,8 @@ async function handleConfirm() {
}
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
const data = cloneDeep(await formApi.getValues());
data.status = record.value.status
console.log(data,123)
await (isUpdate.value ? contingenPlanUpdate(data) : contingenPlanAdd(data));
resetInitialized();
emit('reload');

View File

@@ -156,3 +156,27 @@ export const modalSchema: FormSchemaGetter = () => [
rules: 'required',
},
];
export const schema: FormSchemaGetter = () => [
{
label: '主键',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
label: '演练状态',
fieldName: 'status',
component: 'RadioGroup',
componentProps: {
options: [
{ label: '已取消', value: 1 },
{ label: '待进行', value: 2 },
],
},
rules: 'required',
}
];

View File

@@ -18,6 +18,7 @@ import type { ContingenPlanForm } from '#/api/property/customerService/contingen
import { commonDownloadExcel } from '#/utils/file/download';
import contingenPlanModal from './contingenPlan-modal.vue';
import contingenPlanExamine from './contingenPlan-examine.vue';
import contingenPlanDetail from './contingenPlan-detail.vue';
import { columns, querySchema } from './data';
import {personList} from "#/api/property/resident/person";
@@ -96,10 +97,13 @@ async function handleDelete(row: Required<ContingenPlanForm>) {
await tableApi.query();
}
const [ContingenPlanExamine, contingenPlanExamineApi] = useVbenModal({
connectedComponent: contingenPlanExamine,
});
async function handleExamine(row: Required<ContingenPlanForm>) {
row.status = '1'
await contingenPlanUpdate(row);
await tableApi.query();
contingenPlanExamineApi.setData({ id: row.id });
contingenPlanExamineApi.open();
}
function handleMultiDelete() {
@@ -183,19 +187,12 @@ onMounted(async () => {
</template>
<template #action="{ row }">
<Space>
<Popconfirm
<ghost-button
v-if="row.status === '0'"
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认审核?"
@confirm="handleExamine(row)"
@click.stop="handleExamine(row)"
>
<ghost-button
@click.stop=""
>
{{ '审核' }}
</ghost-button>
</Popconfirm>
{{ '审核' }}
</ghost-button>
<ghost-button
@click.stop="handleInfo(row)"
>
@@ -227,5 +224,6 @@ onMounted(async () => {
</BasicTable>
<ContingenPlanModal @reload="tableApi.query()" />
<contingenPlanDetailModal/>
<ContingenPlanExamine @reload="tableApi.query()" />
</Page>
</template>

View File

@@ -90,7 +90,7 @@ export const modalSchema: FormSchemaGetter = () => [
{
label: '反馈类型',
fieldName: 'feedbackType',
component: 'Select',
component: 'TreeSelect',
rules: 'selectRequired',
},
{
@@ -160,7 +160,15 @@ export const modalSchema: FormSchemaGetter = () => [
},
rules:'selectRequired'
},
{
label: '工单id',
fieldName: 'orderId',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
label: '转至工单',//转至工单
fieldName: 'isWorkOrder',
@@ -170,7 +178,11 @@ export const modalSchema: FormSchemaGetter = () => [
options: getDictOptions('wy_sf'),
optionType: 'button',
},
defaultValue:'0',
rules:'selectRequired'
defaultValue:'1',
rules:'selectRequired',
dependencies: {
show: (formValue) => !formValue.orderId,
triggerFields: ['orderId'],
},
},
];

View File

@@ -37,10 +37,12 @@ async function handleOpenChange(open: boolean) {
<Descriptions v-if="feedbacksDetail" size="small" :column="2" bordered
:labelStyle="{width:'120px'}">
<DescriptionsItem label="反馈类型">
{{ feedbacksDetail.feedbackType }}
{{ feedbacksDetail.feedbackTypeName }}
</DescriptionsItem>
<DescriptionsItem label="反馈人">
{{ feedbacksDetail.feedbackPersion+'-'+feedbacksDetail.feedbackPersionPhone }}
<span>
{{ feedbacksDetail.feedbackPersionName||''+'-'+feedbacksDetail.feedbackPersionPhone }}
</span>
</DescriptionsItem>
<DescriptionsItem label="反馈内容" :span="2">
{{ feedbacksDetail.feedbackContent }}

View File

@@ -15,7 +15,9 @@ import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
import {modalSchema} from './data';
import type {FeedbacksVO} from "#/api/property/customerService/feedbacks/model";
import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType";
import {
workOrdersTypeTree
} from "#/api/property/businessManagement/workOrdersType";
const emit = defineEmits<{ reload: [] }>();
@@ -101,28 +103,38 @@ async function handleClosed() {
}
async function initWorkOrderTypeOption() {
let params = {
pageSize: 1000,
pageNum: 1
}
const res = await workOrdersTypeList(params)
formApi.updateSchema([{
componentProps: () => ({
options: res.rows,
showSearch: true,
optionFilterProp: 'orderTypeName',
fieldNames: {label: 'orderTypeName', value: 'id'},
}),
fieldName: 'feedbackType',
}])
const options = await workOrdersTypeTree()
formApi.updateSchema([
{
componentProps: () => ({
class: 'w-full',
fieldNames: {
key: 'id',
label: 'orderTypeName',
value: 'id',
children: 'children',
},
placeholder: '请选择反馈类型',
showSearch: true,
treeData: options,
treeDefaultExpandAll: true,
treeLine: { showLeafIcon: false },
treeNodeFilterProp: 'orderTypeName',
treeNodeLabelProp: 'orderTypeName',
}),
fieldName: 'feedbackType',
},
]);
}
</script>
<template>
<BasicModal :title="title">
<BasicForm>
<template #person>
<span v-if="detail">{{ detail.feedbackPersion + '-' + detail.feedbackPersionPhone }}</span>
<span v-if="detail">
{{ detail.feedbackPersionName||'' + '-' + detail.feedbackPersionPhone }}</span>
</template>
</BasicForm>
</BasicModal>

View File

@@ -122,7 +122,7 @@ function handleDownloadExcel() {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['system:feedbacks:info']"
v-access:code="['system:feedbacks:query']"
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}
@@ -134,7 +134,7 @@ function handleDownloadExcel() {
{{ $t('pages.common.edit') }}
</ghost-button>
<ghost-button
v-access:code="['system:feedbacks:info']"
v-access:code="['system:feedbacks:query']"
@click.stop="handleOrderInfo(row)"
:disabled="row.isWorkOrder=='1'"
>

View File

@@ -12,6 +12,7 @@ import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
import { modalSchema } from './data';
import {personList} from "#/api/property/resident/person";
import {renderDictValue} from "#/utils/render";
import {userList} from "#/api/system/user";
const emit = defineEmits<{ reload: [] }>();
@@ -104,11 +105,11 @@ async function queryPersonData() {
pageSize: 1000,
pageNum: 1,
}
const res = await personList(params);
const res = await userList(params);
const options = res.rows.map((user) => ({
label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex')
+ '-' + user.phone + '-' + user.unitName,
value: user.id,
label: user.nickName + '-' + renderDictValue(user.sex, 'sys_user_sex')
+ '-' + user.phonenumber,
value: user.userId.toString(),
}));
formApi.updateSchema([{
componentProps: () => ({

View File

@@ -147,7 +147,7 @@ async function handleDelete(row: Required<QuestionnaireForm>) {
<template #action="{ row }">
<Space>
<ghost-button
v-access:code="['property:questionnaire:info']"
v-access:code="['property:questionnaire:query']"
@click.stop="handleInfo(row)"
>
预览问卷
@@ -175,8 +175,7 @@ async function handleDelete(row: Required<QuestionnaireForm>) {
</ghost-button>
</Popconfirm>
<ghost-button
v-access:code="['property:questionnaire:info']"
@click.stop="handleEdit(row)"
:disabled="row.status=='1'"
>
统计分析
</ghost-button>

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import {reactive, shallowRef} from 'vue';
import {reactive, ref} from 'vue';
import {useVbenModal} from '@vben/common-ui';
import {questionnaireInfo} from "#/api/property/customerService/questionnaire/questionnaire";
import type {
@@ -33,7 +33,7 @@ const [BasicModal, modalApi] = useVbenModal({
},
});
const questionnaireDetail = shallowRef<null | QuestionnaireVO>(null);
const questionnaireDetail = ref<null | QuestionnaireVO>(null);
async function handleOpenChange(open: boolean) {
if (!open) {
@@ -44,7 +44,6 @@ async function handleOpenChange(open: boolean) {
questionnaireDetail.value = await questionnaireInfo(id);
if (questionnaireDetail.value.questionnaireQuestionVos) {
questionnaireDetail.value.questionnaireQuestionVos.forEach(item => {
item.answer = ''
if (item.questionnaireQuestionItemVos) {
item.options = item.questionnaireQuestionItemVos.map(item => item.itemContent)
}

View File

@@ -1,104 +0,0 @@
<script setup lang="ts">
import type { PropType } from 'vue';
import { onMounted, ref } from 'vue';
import { Empty, Skeleton, Tree } from 'ant-design-vue';
import { communityTree } from "#/api/property/community";
import type { CommunityVO } from "#/api/property/community/model";
defineOptions({ inheritAttrs: false });
withDefaults(defineProps<{ showSearch?: boolean }>(), { showSearch: true });
const emit = defineEmits<{
reload: [];
select: [];
}>();
const selectFloorId = defineModel('selectFloorId', {
type: Array as PropType<string[]>,
});
const searchValue = defineModel('searchValue', {
type: String,
default: '',
});
type TreeArray = CommunityVO[];
const treeArray = ref<TreeArray>([]);
const showTreeSkeleton = ref<boolean>(true);
async function loadTree() {
showTreeSkeleton.value = true;
searchValue.value = '';
selectFloorId.value = [];
treeArray.value = await communityTree(4);
showTreeSkeleton.value = false;
}
async function handleReload() {
await loadTree();
emit('reload');
}
onMounted(loadTree);
</script>
<template>
<div class="h-full flex flex-col">
<Skeleton
:loading="showTreeSkeleton"
:paragraph="{ rows: 8 }"
active
class="p-[8px] flex-1 min-h-0"
>
<div class="bg-background flex flex-col h-full rounded-lg">
<div class="flex-1 overflow-y-auto px-[8px] mt-2.5 min-h-0">
<Tree
class="tree-background"
v-bind="$attrs"
v-if="treeArray.length > 0"
v-model:selected-keys="selectFloorId"
:field-names="{ title: 'label', key: 'id' }"
:show-line="{ showLeafIcon: false }"
:tree-data="treeArray"
:virtual="false"
default-expand-all
@select="$emit('select')"
>
<template #title="{ label }">
<span v-if="label.indexOf(searchValue) > -1">
{{ label.substring(0, label.indexOf(searchValue)) }}
<span style="color: #f50">{{ searchValue }}</span>
{{ label.substring(label.indexOf(searchValue) + searchValue.length) }}
</span>
<span v-else>{{ label }}</span>
</template>
</Tree>
<div v-else class="mt-5">
<Empty
:image="Empty.PRESENTED_IMAGE_SIMPLE"
description="暂无数据"
/>
</div>
</div>
</div>
</Skeleton>
</div>
</template>
<style scoped lang="scss">
:deep(html),
:deep(body),
:deep(#app) {
height: 100%;
margin: 0;
padding: 0;
}
.bg-background{
background-color: white;
:deep(.ant-tree){
background-color: white;
color: #333;
}
}
</style>

View File

@@ -1,336 +0,0 @@
<script setup lang="ts">
import * as echarts from 'echarts';
import {onMounted, ref} from "vue";
import type { Dayjs } from 'dayjs';
import dayjs from 'dayjs';
import { DatePicker } from 'ant-design-vue';
import FloorTree from "#/views/property/electricEnergy/elctricitySituation/floor-tree.vue";
const currentDay = ref<Dayjs>(dayjs());
const currentMonth = ref<Dayjs>(dayjs());
const currentYear = ref<Dayjs>(dayjs());
const disabledDay = (current: Dayjs) => {
return current && current > dayjs().endOf('day');
};
const disabledMonth = (current: Dayjs) => {
return current && current > dayjs().endOf('month');
};
const disabledYear = (current: Dayjs) => {
return current && current > dayjs().endOf('year');
};
onMounted(()=>{
//day
const chartDay = document.getElementById('day');
const myChartDay = echarts.init(chartDay);
const optionDay = {
tooltip: {
trigger: 'axis'
},
legend: {
data: ['当日', '昨日']
},
toolbox: {
show: true,
feature: {
magicType: { show: true, type: ['line', 'bar'] },
restore: { show: true },
}
},
calculable: true,
xAxis: [
{
type: 'category',
name:'时',
data: ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00','12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']
}
],
yAxis: [
{
type: 'value',
name:'KW.h'
}
],
series: [
{
name: '当日',
type: 'bar',
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3, 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
],
markPoint: {
data: [
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
},
{
name: '昨日',
type: 'bar',
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 152.2, 48.7, 18.8, 6.0, 2.3, 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
],
markPoint: {
data: [
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
}
],
dataZoom: [
{
type: 'inside',
xAxisIndex: 0,
zoomOnMouseWheel: true,
filterMode: 'filter',
},
],
};
optionDay && myChartDay.setOption(optionDay);
//month
const chartMonth = document.getElementById('month');
const myChartMonth = echarts.init(chartMonth);
const optionMonth = {
tooltip: {
trigger: 'axis'
},
legend: {
data: ['当月', '上月']
},
toolbox: {
show: true,
feature: {
magicType: { show: true, type: ['line', 'bar'] },
restore: { show: true },
}
},
calculable: true,
xAxis: [
{
type: 'category',
name:'日',
data: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
}
],
yAxis: [
{
type: 'value',
name:'KW.h'
}
],
series: [
{
name: '当月',
type: 'bar',
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3, 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3,2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6
],
markPoint: {
data: [
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
},
{
name: '上月',
type: 'bar',
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3, 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3,2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6
],
markPoint: {
data: [
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
}
],
dataZoom: [
{
type: 'inside',
xAxisIndex: 0,
zoomOnMouseWheel: true,
filterMode: 'filter',
},
],
};
optionMonth && myChartMonth.setOption(optionMonth);
//year
const chartYear = document.getElementById('year');
const myChartYear = echarts.init(chartYear);
const optionYear = {
tooltip: {
trigger: 'axis'
},
legend: {
data: ['当年', '去年']
},
toolbox: {
show: true,
feature: {
magicType: { show: true, type: ['line', 'bar'] },
restore: { show: true },
}
},
calculable: true,
xAxis: [
{
type: 'category',
name:'月',
data: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']
}
],
yAxis: [
{
type: 'value',
name:'KW.h'
}
],
series: [
{
name: '当年',
type: 'bar',
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
],
markPoint: {
data: [
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
},
{
name: '去年',
type: 'bar',
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
],
markPoint: {
data: [
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
}
],
dataZoom: [
{
type: 'inside',
xAxisIndex: 0,
zoomOnMouseWheel: true,
filterMode: 'filter',
},
],
};
optionYear && myChartYear.setOption(optionYear);
// 鼠标悬停时激活缩放
myChartDay.on('mouseover', { seriesIndex: 0 }, () => {
myChartDay.dispatchAction({
type: 'takeGlobalCursor',
key: 'dataZoomSelect',
dataZoomSelectActive: true,
});
});
// 鼠标离开时取消缩放
myChartDay.on('mouseout', { seriesIndex: 0 }, () => {
myChartDay.dispatchAction({
type: 'takeGlobalCursor',
key: 'dataZoomSelect',
dataZoomSelectActive: false,
});
});
// 鼠标悬停时激活缩放
myChartYear.on('mouseover', { seriesIndex: 0 }, () => {
myChartYear.dispatchAction({
type: 'takeGlobalCursor',
key: 'dataZoomSelect',
dataZoomSelectActive: true,
});
});
// 鼠标离开时取消缩放
myChartYear.on('mouseout', { seriesIndex: 0 }, () => {
myChartYear.dispatchAction({
type: 'takeGlobalCursor',
key: 'dataZoomSelect',
dataZoomSelectActive: false,
});
});
// 鼠标悬停时激活缩放
myChartMonth.on('mouseover', { seriesIndex: 0 }, () => {
myChartMonth.dispatchAction({
type: 'takeGlobalCursor',
key: 'dataZoomSelect',
dataZoomSelectActive: true,
});
});
// 鼠标离开时取消缩放
myChartMonth.on('mouseout', { seriesIndex: 0 }, () => {
myChartMonth.dispatchAction({
type: 'takeGlobalCursor',
key: 'dataZoomSelect',
dataZoomSelectActive: false,
});
});
})
</script>
<template>
<div class="box">
<div class="left"><FloorTree></FloorTree></div>
<div class="right">
<div style="background: #fff;border-radius: 8px;padding: 10px">
<div>
<div style="display: flex;justify-content: space-between;">
<DatePicker
v-model:value="currentDay"
:disabled-date="disabledDay"
/>当日能耗总值125.04KW.h</div>
</div>
<div id="day" style="height: 250px;width: 100%;"></div>
</div>
<div style="background: #fff;border-radius: 8px;padding: 10px;margin-top: 16px;">
<div>
<div style="display: flex;justify-content: space-between;">
<DatePicker
v-model:value="currentMonth"
:disabled-date="disabledMonth"
picker="month"
/>当月能耗总值125.04KW.h</div>
</div>
<div id="month" style="height: 250px;width: 100%;"></div>
</div>
<div style="background: #fff;border-radius: 8px;padding: 10px;margin-top: 16px;">
<div>
<div style="display: flex;justify-content: space-between;">
<DatePicker
v-model:value="currentYear"
:disabled-date="disabledYear"
picker="year"
/>当年能耗总值125.04KW.h</div>
</div>
<div id="year" style="height: 250px;width: 100%;"></div>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.box{
display: grid;
grid-template-columns: 1fr 3fr;
gap: 16px;
padding: 16px;
}
</style>

View File

@@ -0,0 +1,97 @@
<script setup lang="ts">
import type { PropType } from "vue";
import { onMounted, ref } from "vue";
import { handleNode } from "@vben/utils";
import { Empty, Skeleton, Tree } from "ant-design-vue";
import { queryTree } from "#/api/property/energyManagement/meterInfo";
import type { TreeNode } from "#/api/common";
defineOptions({ inheritAttrs: false });
withDefaults(defineProps<{ showSearch?: boolean }>(), { showSearch: true });
const emit = defineEmits<{
/**
* 点击刷新按钮的事件
*/
reload: [];
/**
* 点击节点的事件
* @param selectedKeys 选中的节点keys
* @param info 节点信息对象
*/
select: [selectedKeys: string[], info: any];
}>();
const selectTreeId = defineModel("selectTreeId", {
type: Array as PropType<string[]>,
});
const searchValue = defineModel("searchValue", {
type: String,
default: "",
});
const treeArray = ref<TreeNode[]>([]);
/** 骨架屏加载 */
const showTreeSkeleton = ref<boolean>(true);
async function loadTree() {
showTreeSkeleton.value = true;
searchValue.value = "";
const ret = await queryTree(1);
handleNode(ret, 3);
treeArray.value = ret;
showTreeSkeleton.value = false;
}
function handleNode(nodes: any[], level: number) {
nodes.forEach((node) => {
node.key = node.id;
if (node.level < level) {
node.disabled = true;
}
if (node.children) {
handleNode(node.children, level);
}
});
}
onMounted(loadTree);
</script>
<template>
<div :class="$attrs.class">
<Skeleton :loading="showTreeSkeleton"
:paragraph="{ rows: 8 }"
active
class="p-[8px] flex-1 min-h-0">
<div class="bg-background flex h-full flex-col overflow-y-auto rounded-lg">
<div class="h-full overflow-x-hidden px-[8px]">
<Tree v-bind="$attrs"
v-if="treeArray.length > 0"
v-model:selected-keys="selectTreeId"
:show-line="{ showLeafIcon: false }"
:tree-data="treeArray"
:virtual="false"
default-expand-all
@select="(selectedKeys, info) => $emit('select', selectedKeys, info)">
<template #title="{ label }">
<span v-if="label.indexOf(searchValue) > -1">
{{ label.substring(0, label.indexOf(searchValue)) }}
<span style="color: #f50">{{ searchValue }}</span>
{{ label.substring(label.indexOf(searchValue) + searchValue.length) }}
</span>
<span v-else>{{ label }}</span>
</template>
</Tree>
<div v-else
class="mt-5">
<Empty :image="Empty.PRESENTED_IMAGE_SIMPLE"
description="暂无数据" />
</div>
</div>
</div>
</Skeleton>
</div>
</template>

View File

@@ -1,14 +1,16 @@
<script setup lang="ts">
import { Page, type VbenFormProps } from '@vben/common-ui';
import { Page, type VbenFormProps } from '@vben/common-ui'
import {
useVbenVxeGrid,
type VxeGridProps
} from '#/adapter/vxe-table';
} from '#/adapter/vxe-table'
import {
paymentReviewList,
} from '#/api/property/costManagement/paymentReview';
import { columns, querySchema } from './data';
import FloorTree from "#/views/property/electricEnergy/elctricitySituation/floor-tree.vue";
} from '#/api/property/costManagement/paymentReview'
import { columns, querySchema } from './data'
import FloorTree from "../components/floor-tree.vue"
const formOptions: VbenFormProps = {
commonConfig: {
@@ -19,7 +21,7 @@ const formOptions: VbenFormProps = {
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
};
}
const gridOptions: VxeGridProps = {
checkboxConfig: {
@@ -37,7 +39,7 @@ const gridOptions: VxeGridProps = {
pageNum: page.currentPage,
pageSize: page.pageSize,
...formValues,
});
})
},
},
},
@@ -45,7 +47,7 @@ const gridOptions: VxeGridProps = {
keyField: 'id',
},
id: 'property-paymentReview-index'
};
}
const [BasicTable, tableApi] = useVbenVxeGrid({
formOptions,
@@ -54,18 +56,16 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
</script>
<template>
<div class="box">
<div class="left" style="margin: 16px 0 16px 16px"><FloorTree></FloorTree></div>
<div class="right">
<Page :auto-content-height="true">
<BasicTable table-title="用电费用报表"/>
</Page>
<Page :auto-content-height="true">
<div class="flex h-full gap-[8px]">
<FloorTree></FloorTree>
<BasicTable class="flex-1 overflow-hidden" table-title="用电费用报表" />
</div>
</div>
</Page>
</template>
<style scoped lang="scss">
.box{
.box {
display: grid;
grid-template-columns: 1fr 3fr;

View File

@@ -1,120 +1,14 @@
<template>
<div class="energy-monitor-page">
<div class="left-content">
<FloorTree></FloorTree>
</div>
<div class="right-content">
<div class="row">
<div class="comparison-section-container">
<div class="section-header">
<div class="header-title">环比</div>
</div>
<div class="comparison-grid">
<div class="comparison-item">
<div class="item-value">{{ chainData.todayEnergy }}</div>
<div class="item-title">今日用能(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.yesterdaySamePeriodEnergy }}</div>
<div class="item-title">昨日同期(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-top">
<div class="item-percent">{{ chainData.dayTrendPercentage }}</div>
<div>{{ chainData.dayTrendValue }}<span class="item-unit">kW.h</span></div>
</div>
<div class="item-title">趋势</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.currentMonthEnergy }}</div>
<div class="item-title">当月用能(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.lastMonthSamePeriodEnergy }}</div>
<div class="item-title">上月同期(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-top">
<div class="item-percent">{{ chainData.monthTrendPercentage }}</div>
<div>{{ chainData.monthTrendValue }}
<span class="item-title">kW.h</span>
</div>
</div>
<div class="item-title">趋势</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.currentYearEnergy }}</div>
<div class="item-title">当年用能(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.lastYearSamePeriodEnergy }}</div>
<div class="item-title">去年同期(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-top">
<div class="item-percent">{{ chainData.yearTrendPercentage }}</div>
<div>{{ chainData.yearTrendValue }}
<span class="item-title">kW.h</span>
</div>
</div>
<div class="item-title">趋势</div>
</div>
</div>
</div>
<div class="energy-trend-container">
<div class="energy-trend-top">
<div class="section-header">
<div class="header-title">能耗趋势</div>
</div>
<RadioGroup v-model:value="energyTrendTime"
button-style="solid"
size="small" @change="buildingEnergyTrendData(energyTrendTime)">
<RadioButton value="1">当日</RadioButton>
<RadioButton value="2">当月</RadioButton>
<RadioButton value="3">当年</RadioButton>
</RadioGroup>
</div>
<div class="chart-placeholder" ref="energyTrendChart">
</div>
</div>
</div>
<div class="row">
<div class="power-curve-container">
<div class="section-header">
<div class="header-title">日用电功率曲线</div>
</div>
<!-- <div class="chart-placeholder" ref="powerCurveChart">-->
<div class="power-chart" ref="powerCurveChart">
</div>
</div>
<div class="power-peak-container">
<div class="section-header">
<div class="header-title">电功率峰值</div>
</div>
<div class="peak-item">
<p class="value">{{ peakData.todayPeakPower }}</p>
<p class="time">{{ peakData.todayPeakTime }}</p>
<div class="bottom-text">当日(kW)</div>
</div>
<div class="peak-item">
<p class="value">{{ peakData.yesterdayPeakPower }}</p>
<p class="time">{{ peakData.yesterdayPeakTime }}</p>
<div class="bottom-text">昨日(kW)</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import {RadioGroup, RadioButton} from 'ant-design-vue'
import {ref, onMounted, onBeforeUnmount, reactive} from 'vue'
import { RadioGroup, RadioButton } from 'ant-design-vue'
import { Page } from '@vben/common-ui'
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import * as echarts from 'echarts'
import type {ECharts, EChartsOption} from 'echarts'
import FloorTree from "./floor-tree.vue";
import dayjs from "dayjs";
import type { ECharts, EChartsOption } from 'echarts'
import FloorTree from "../components/floor-tree.vue"
import dayjs from "dayjs"
//
const selectFloorId = ref<string[]>([])
const chainData = reactive({
todayEnergy: '231.78',
@@ -166,8 +60,8 @@ const energyTrendOption: EChartsOption = {
type: 'bar',
markPoint: {
data: [
{type: 'max', name: 'Max'},
{type: 'min', name: 'Min'}
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
}
@@ -197,37 +91,37 @@ const initEnergyTrendChart = () => {
}
function buildingEnergyTrendData(val: string) {
const now = new Date();
let timeArr = [];
let valArr = [];
let name = '时间';
const now = new Date()
let timeArr = []
let valArr = []
let name = '时间'
if (val == '1') {
const hour = now.getHours()
for (let i = 0; i < hour; i++) {
timeArr.push(i);
valArr.push(parseFloat((Math.random() * 35).toFixed(2)));
timeArr.push(i)
valArr.push(parseFloat((Math.random() * 35).toFixed(2)))
}
} else if (val == '2') {
const day = now.getDate()
for (let i = 1; i < day; i++) {
timeArr.push(i);
valArr.push(parseFloat((Math.random() * 800).toFixed(2)));
timeArr.push(i)
valArr.push(parseFloat((Math.random() * 800).toFixed(2)))
}
name = '日期';
name = '日期'
} else {
const month = now.getMonth() + 1;
const month = now.getMonth() + 1
for (let i = 1; i < month; i++) {
timeArr.push(i);
valArr.push(parseFloat((Math.random() * 21000).toFixed(2)));
timeArr.push(i)
valArr.push(parseFloat((Math.random() * 21000).toFixed(2)))
}
name = '月份';
name = '月份'
}
if (energyTrendInstance.value) {
energyTrendInstance.value.setOption({
xAxis: {data: timeArr, name},
series: [{data: valArr}],
});
xAxis: { data: timeArr, name },
series: [{ data: valArr }],
})
}
}
@@ -235,7 +129,6 @@ function buildingEnergyTrendData(val: string) {
const powerCurveChart = ref<HTMLElement | null>(null)
const powerCurveInstance = ref<ECharts | null>(null)
const powerCurveOption: EChartsOption = {
tooltip: {
trigger: 'item',
@@ -248,8 +141,8 @@ const powerCurveOption: EChartsOption = {
},
toolbox: {
feature: {
magicType: {show: true, type: ['line', 'bar']},
restore: {show: true},
magicType: { show: true, type: ['line', 'bar'] },
restore: { show: true },
}
},
legend: {
@@ -279,8 +172,8 @@ const powerCurveOption: EChartsOption = {
data: [],
markPoint: {
data: [
{type: 'max',},
{type: 'min',}
{ type: 'max', },
{ type: 'min', }
]
},
},
@@ -291,15 +184,15 @@ const powerCurveOption: EChartsOption = {
data: [],
markPoint: {
data: [
{type: 'max',},
{type: 'min',}
{ type: 'max', },
{ type: 'min', }
]
},
itemStyle: {color: '#cbb0e3'}, //
lineStyle: {color: '#cbb0e3'} // 线
itemStyle: { color: '#cbb0e3' }, //
lineStyle: { color: '#cbb0e3' } // 线
},
]
};
}
const initPowerCurveChart = () => {
if (powerCurveChart.value) {
@@ -324,23 +217,23 @@ const initPowerCurveChart = () => {
}
function buildingPowerCurveData() {
const now = new Date();
const now = new Date()
const hour = now.getHours()
let yesterday = [];
let today = [];
let yesterday = []
let today = []
let timeDate = []
for (let i = 0; i < 24; i++) {
timeDate.push(i);
yesterday.push(parseFloat((Math.random() * 3000).toFixed(2)));
timeDate.push(i)
yesterday.push(parseFloat((Math.random() * 3000).toFixed(2)))
if (hour > i) {
today.push(parseFloat((Math.random() * 3000).toFixed(2)));
today.push(parseFloat((Math.random() * 3000).toFixed(2)))
}
}
if (powerCurveInstance.value) {
powerCurveInstance.value.setOption({
xAxis: {data: timeDate},
series: [{data: today}, {data: yesterday}],
});
xAxis: { data: timeDate },
series: [{ data: today }, { data: yesterday }],
})
}
}
@@ -352,33 +245,125 @@ onMounted(() => {
//
onBeforeUnmount(() => {
energyTrendInstance.value?.dispose();
powerCurveInstance.value?.dispose();
energyTrendInstance.value?.dispose()
powerCurveInstance.value?.dispose()
})
function handleSelectFloor() {
console.log(selectFloorId.value[0])
}
</script>
<template>
<Page :auto-content-height="true">
<div class="flex h-full gap-[8px]">
<FloorTree class="w-[260px]"></FloorTree>
<div class="flex-1 overflow-hidden">
<div class="row">
<div class="comparison-section-container">
<div class="section-header">
<div class="header-title">环比</div>
</div>
<div class="comparison-grid">
<div class="comparison-item">
<div class="item-value">{{ chainData.todayEnergy }}</div>
<div class="item-title">今日用能(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.yesterdaySamePeriodEnergy }}</div>
<div class="item-title">昨日同期(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-top">
<div class="item-percent">{{ chainData.dayTrendPercentage }}</div>
<div>{{ chainData.dayTrendValue }}<span class="item-unit">kW.h</span></div>
</div>
<div class="item-title">趋势</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.currentMonthEnergy }}</div>
<div class="item-title">当月用能(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.lastMonthSamePeriodEnergy }}</div>
<div class="item-title">上月同期(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-top">
<div class="item-percent">{{ chainData.monthTrendPercentage }}</div>
<div>{{ chainData.monthTrendValue }}
<span class="item-title">kW.h</span>
</div>
</div>
<div class="item-title">趋势</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.currentYearEnergy }}</div>
<div class="item-title">当年用能(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-value">{{ chainData.lastYearSamePeriodEnergy }}</div>
<div class="item-title">去年同期(kW.h)</div>
</div>
<div class="comparison-item">
<div class="item-top">
<div class="item-percent">{{ chainData.yearTrendPercentage }}</div>
<div>{{ chainData.yearTrendValue }}
<span class="item-title">kW.h</span>
</div>
</div>
<div class="item-title">趋势</div>
</div>
</div>
</div>
<div class="energy-trend-container">
<div class="energy-trend-top">
<div class="section-header">
<div class="header-title">能耗趋势</div>
</div>
<RadioGroup v-model:value="energyTrendTime" button-style="solid" size="small"
@change="buildingEnergyTrendData(energyTrendTime)">
<RadioButton value="1">当日</RadioButton>
<RadioButton value="2">当月</RadioButton>
<RadioButton value="3">当年</RadioButton>
</RadioGroup>
</div>
<div class="chart-placeholder" ref="energyTrendChart">
</div>
</div>
</div>
<div class="row">
<div class="power-curve-container">
<div class="section-header">
<div class="header-title">日用电功率曲线</div>
</div>
<!-- <div class="chart-placeholder" ref="powerCurveChart">-->
<div class="power-chart" ref="powerCurveChart">
</div>
</div>
<div class="power-peak-container">
<div class="section-header">
<div class="header-title">电功率峰值</div>
</div>
<div class="peak-item">
<p class="value">{{ peakData.todayPeakPower }}</p>
<p class="time">{{ peakData.todayPeakTime }}</p>
<div class="bottom-text">当日(kW)</div>
</div>
<div class="peak-item">
<p class="value">{{ peakData.yesterdayPeakPower }}</p>
<p class="time">{{ peakData.yesterdayPeakTime }}</p>
<div class="bottom-text">昨日(kW)</div>
</div>
</div>
</div>
</div>
</div>
</Page>
</template>
<style scoped>
.energy-monitor-page {
display: flex;
gap: 1rem;
padding: 1rem;
background-color: #f4f4f4;
min-height: 100vh;
}
.left-content {
flex: 1;
}
.right-content {
display: flex;
flex: 4;
flex-direction: column;
gap: 1rem;
}
.row {
display: flex;
gap: 1rem;
@@ -394,10 +379,12 @@ onBeforeUnmount(() => {
}
.power-curve-container {
margin-top: 10px;
flex: 5;
}
.power-peak-container {
margin-top: 10px;
flex: 1;
}
@@ -468,19 +455,21 @@ onBeforeUnmount(() => {
}
.chart-placeholder {
height: 310px;
height: 36vh;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
}
.power-chart{
height: 47vh;
.power-chart {
height: 38vh;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
}
.peak-item {
padding: 15px 0 0 0;
border: 1px solid #3671e8;

View File

@@ -0,0 +1,425 @@
<script setup lang="ts">
import * as echarts from "echarts";
import { onMounted, ref } from "vue";
import type { Dayjs } from "dayjs";
import dayjs from "dayjs";
import { Page } from "@vben/common-ui";
import { DatePicker } from "ant-design-vue";
import FloorTree from "../components/floor-tree.vue";
import { meterRecordTrend } from "#/api/property/energyManagement/meterRecord";
const currentDay = ref<Dayjs>(dayjs());
const currentMonth = ref<Dayjs>(dayjs());
const currentYear = ref<Dayjs>(dayjs());
const disabledDay = (current: Dayjs) => {
return current && current > dayjs().endOf("day");
};
const disabledMonth = (current: Dayjs) => {
return current && current > dayjs().endOf("month");
};
const disabledYear = (current: Dayjs) => {
return current && current > dayjs().endOf("year");
};
onMounted(() => {
//day
const chartDay = document.getElementById("day");
const myChartDay = echarts.init(chartDay);
const optionDay = {
tooltip: {
trigger: "axis",
},
legend: {
data: ["当日", "昨日"],
},
toolbox: {
show: true,
feature: {
magicType: { show: true, type: ["line", "bar"] },
restore: { show: true },
},
},
calculable: true,
xAxis: [
{
type: "category",
name: "时",
data: [
"00:00",
"01:00",
"02:00",
"03:00",
"04:00",
"05:00",
"06:00",
"07:00",
"08:00",
"09:00",
"10:00",
"11:00",
"12:00",
"13:00",
"14:00",
"15:00",
"16:00",
"17:00",
"18:00",
"19:00",
"20:00",
"21:00",
"22:00",
"23:00",
],
},
],
yAxis: [
{
type: "value",
name: "KW.h",
},
],
series: [
{
name: "当日",
type: "bar",
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3,
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3,
],
markPoint: {
data: [
{ type: "max", name: "Max" },
{ type: "min", name: "Min" },
],
},
},
{
name: "昨日",
type: "bar",
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 152.2, 48.7, 18.8, 6.0, 2.3,
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3,
],
markPoint: {
data: [
{ type: "max", name: "Max" },
{ type: "min", name: "Min" },
],
},
},
],
dataZoom: [
{
type: "inside",
xAxisIndex: 0,
zoomOnMouseWheel: true,
filterMode: "filter",
},
],
};
optionDay && myChartDay.setOption(optionDay);
//month
const chartMonth = document.getElementById("month");
const myChartMonth = echarts.init(chartMonth);
const optionMonth = {
tooltip: {
trigger: "axis",
},
legend: {
data: ["当月", "上月"],
},
toolbox: {
show: true,
feature: {
magicType: { show: true, type: ["line", "bar"] },
restore: { show: true },
},
},
calculable: true,
xAxis: [
{
type: "category",
name: "日",
data: [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31",
],
},
],
yAxis: [
{
type: "value",
name: "KW.h",
},
],
series: [
{
name: "当月",
type: "bar",
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3,
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3,
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6,
],
markPoint: {
data: [
{ type: "max", name: "Max" },
{ type: "min", name: "Min" },
],
},
},
{
name: "上月",
type: "bar",
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3,
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3,
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6,
],
markPoint: {
data: [
{ type: "max", name: "Max" },
{ type: "min", name: "Min" },
],
},
},
],
dataZoom: [
{
type: "inside",
xAxisIndex: 0,
zoomOnMouseWheel: true,
filterMode: "filter",
},
],
};
optionMonth && myChartMonth.setOption(optionMonth);
//year
const chartYear = document.getElementById("year");
const myChartYear = echarts.init(chartYear);
const optionYear = {
tooltip: {
trigger: "axis",
},
legend: {
data: ["当年", "去年"],
},
toolbox: {
show: true,
feature: {
magicType: { show: true, type: ["line", "bar"] },
restore: { show: true },
},
},
calculable: true,
xAxis: [
{
type: "category",
name: "月",
data: [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
],
},
],
yAxis: [
{
type: "value",
name: "KW.h",
},
],
series: [
{
name: "当年",
type: "bar",
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3,
],
markPoint: {
data: [
{ type: "max", name: "Max" },
{ type: "min", name: "Min" },
],
},
},
{
name: "去年",
type: "bar",
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3,
],
markPoint: {
data: [
{ type: "max", name: "Max" },
{ type: "min", name: "Min" },
],
},
},
],
dataZoom: [
{
type: "inside",
xAxisIndex: 0,
zoomOnMouseWheel: true,
filterMode: "filter",
},
],
};
optionYear && myChartYear.setOption(optionYear);
// 鼠标悬停时激活缩放
myChartDay.on("mouseover", { seriesIndex: 0 }, () => {
myChartDay.dispatchAction({
type: "takeGlobalCursor",
key: "dataZoomSelect",
dataZoomSelectActive: true,
});
});
// 鼠标离开时取消缩放
myChartDay.on("mouseout", { seriesIndex: 0 }, () => {
myChartDay.dispatchAction({
type: "takeGlobalCursor",
key: "dataZoomSelect",
dataZoomSelectActive: false,
});
});
// 鼠标悬停时激活缩放
myChartYear.on("mouseover", { seriesIndex: 0 }, () => {
myChartYear.dispatchAction({
type: "takeGlobalCursor",
key: "dataZoomSelect",
dataZoomSelectActive: true,
});
});
// 鼠标离开时取消缩放
myChartYear.on("mouseout", { seriesIndex: 0 }, () => {
myChartYear.dispatchAction({
type: "takeGlobalCursor",
key: "dataZoomSelect",
dataZoomSelectActive: false,
});
});
// 鼠标悬停时激活缩放
myChartMonth.on("mouseover", { seriesIndex: 0 }, () => {
myChartMonth.dispatchAction({
type: "takeGlobalCursor",
key: "dataZoomSelect",
dataZoomSelectActive: true,
});
});
// 鼠标离开时取消缩放
myChartMonth.on("mouseout", { seriesIndex: 0 }, () => {
myChartMonth.dispatchAction({
type: "takeGlobalCursor",
key: "dataZoomSelect",
dataZoomSelectActive: false,
});
});
});
function handleSelectFloor(selectedKeys, info) {
let data = {
day: currentDay.value.format("YYYY-MM-DD"),
month: currentMonth.value.format("YYYY-MM"),
year: currentYear.value.format("YYYY"),
meterType: 1,
};
if (info.node.level == 3) {
data.floorId = selectedKeys[0];
} else {
data.meterId = selectedKeys[0];
}
meterRecordTrend(data);
}
</script>
<template>
<Page :auto-content-height="true">
<div class="flex h-full gap-[8px]">
<FloorTree class="w-[260px]"
@select="handleSelectFloor"></FloorTree>
<div class=" flex-1 overflow-hidden">
<div style="background: #fff;border-radius: 8px;padding: 10px;height: 33%">
<div>
<div style="display: flex;justify-content: space-between;">
<DatePicker v-model:value="currentDay"
:disabled-date="disabledDay" />当日能耗总值125.04KW.h
</div>
</div>
<div id="day"
style="height: 100%;width: 100%;"></div>
</div>
<div style="background: #fff;border-radius: 8px;padding: 10px;margin-top: 16px;height: 33%">
<div>
<div style="display: flex;justify-content: space-between;">
<DatePicker v-model:value="currentMonth"
:disabled-date="disabledMonth"
picker="month" />当月能耗总值125.04KW.h
</div>
</div>
<div id="month"
style="height: 100%;width: 100%;"></div>
</div>
<div style="background: #fff;border-radius: 8px;padding: 10px;margin-top: 16px;height: 33%">
<div>
<div style="display: flex;justify-content: space-between;">
<DatePicker v-model:value="currentYear"
:disabled-date="disabledYear"
picker="year" />当年能耗总值125.04KW.h
</div>
</div>
<div id="year"
style="height: 100%;width: 100%;"></div>
</div>
</div>
</div>
</Page>
</template>

View File

@@ -1,14 +1,14 @@
<script setup lang="ts">
import { Page, type VbenFormProps } from '@vben/common-ui';
import { Page, type VbenFormProps } from '@vben/common-ui'
import {
useVbenVxeGrid,
type VxeGridProps
} from '#/adapter/vxe-table';
} from '#/adapter/vxe-table'
import {
paymentReviewList,
} from '#/api/property/costManagement/paymentReview';
import { columns, querySchema } from './data';
import FloorTree from "#/views/property/electricEnergy/elctricitySituation/floor-tree.vue";
} from '#/api/property/costManagement/paymentReview'
import { columns, querySchema } from './data'
import FloorTree from "../components/floor-tree.vue"
const formOptions: VbenFormProps = {
commonConfig: {
@@ -19,7 +19,7 @@ const formOptions: VbenFormProps = {
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
};
}
const gridOptions: VxeGridProps = {
checkboxConfig: {
@@ -37,7 +37,7 @@ const gridOptions: VxeGridProps = {
pageNum: page.currentPage,
pageSize: page.pageSize,
...formValues,
});
})
},
},
},
@@ -45,7 +45,7 @@ const gridOptions: VxeGridProps = {
keyField: 'id',
},
id: 'property-paymentReview-index'
};
}
const [BasicTable, tableApi] = useVbenVxeGrid({
formOptions,
@@ -54,18 +54,16 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
</script>
<template>
<div class="box">
<div class="left" style="margin: 16px 0 16px 16px"><FloorTree></FloorTree></div>
<div class="right">
<Page :auto-content-height="true">
<BasicTable table-title="用电环比分析列表"/>
</Page>
<Page :auto-content-height="true">
<div class="flex h-full gap-[8px]">
<FloorTree class="w-[260px]"></FloorTree>
<BasicTable class="flex-1 overflow-hidden" table-title="用电环比分析列表" />
</div>
</div>
</Page>
</template>
<style scoped lang="scss">
.box{
.box {
display: grid;
grid-template-columns: 1fr 3fr;
}

View File

@@ -1,22 +1,22 @@
<script setup lang="ts">
import * as echarts from 'echarts';
import {onMounted, ref} from "vue";
import type { Dayjs } from 'dayjs';
import dayjs from 'dayjs';
import { Table } from 'ant-design-vue'
import { DatePicker } from 'ant-design-vue';
import { SearchOutlined } from '@ant-design/icons-vue';
import FloorTree from "#/views/property/electricEnergy/elctricitySituation/floor-tree.vue";
import * as echarts from 'echarts'
import { onMounted, ref } from "vue"
import type { Dayjs } from 'dayjs'
import dayjs from 'dayjs'
import { Page } from '@vben/common-ui'
import { Table, DatePicker } from 'ant-design-vue'
import { SearchOutlined } from '@ant-design/icons-vue'
import FloorTree from "../components/floor-tree.vue"
const currentYear = ref<Dayjs>(dayjs());
const currentYear = ref<Dayjs>(dayjs())
const disabledYear = (current: Dayjs) => {
return current && current > dayjs().endOf('year');
};
return current && current > dayjs().endOf('year')
}
onMounted(()=>{
onMounted(() => {
//year
const chartYear = document.getElementById('year');
const myChartYear = echarts.init(chartYear);
const chartYear = document.getElementById('year')
const myChartYear = echarts.init(chartYear)
const optionYear = {
tooltip: {
trigger: 'axis'
@@ -35,14 +35,14 @@ onMounted(()=>{
xAxis: [
{
type: 'category',
name:'月',
name: '月',
data: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']
}
],
yAxis: [
{
type: 'value',
name:'KW.h'
name: 'KW.h'
}
],
series: [
@@ -81,8 +81,8 @@ onMounted(()=>{
filterMode: 'filter',
},
],
};
optionYear && myChartYear.setOption(optionYear);
}
optionYear && myChartYear.setOption(optionYear)
//
myChartYear.on('mouseover', { seriesIndex: 0 }, () => {
@@ -90,8 +90,8 @@ onMounted(()=>{
type: 'takeGlobalCursor',
key: 'dataZoomSelect',
dataZoomSelectActive: true,
});
});
})
})
//
myChartYear.on('mouseout', { seriesIndex: 0 }, () => {
@@ -99,8 +99,8 @@ onMounted(()=>{
type: 'takeGlobalCursor',
key: 'dataZoomSelect',
dataZoomSelectActive: false,
});
});
})
})
})
const columns = [
@@ -120,54 +120,39 @@ const columns = [
title: '同比(%)',
dataIndex: 'address',
},
];
]
const data = [...Array(32)].map((_, i) => ({
key: i,
name: `${i+1}`,
name: `${i + 1}`,
age: '--',
address: `--`,
}));
</script>
<template>
<div class="box">
<div class="left"><FloorTree></FloorTree></div>
<div class="right">
<div style="background: #fff;border-radius: 8px;padding: 10px;margin-bottom: 16px;">
<div>
年份
<DatePicker
style="margin: 0 10px;"
v-model:value="currentYear"
:disabled-date="disabledYear"
picker="year"
/>
<a-button type="primary">
<template #icon><SearchOutlined /></template>
查询
</a-button>
<Page :auto-content-height="true">
<div class="flex h-full gap-[8px]">
<FloorTree class="w-[260px]"></FloorTree>
<div class="flex-1 overflow-hidden">
<div style="background: #fff;border-radius: 8px;padding: 10px;margin-bottom: 16px;">
<div>
年份
<DatePicker style="margin: 0 10px;" v-model:value="currentYear" :disabled-date="disabledYear" picker="year" />
<a-button type="primary">
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
</div>
<div id="year" style="height: 250px;width: 100%;"></div>
</div>
<div>
<Table style="border-radius: 8px;" :columns="columns" :data-source="data" :pagination="false"
:scroll="{ y: '50vh' }" />
</div>
<div id="year" style="height: 250px;width: 100%;"></div>
</div>
<div>
<Table
style="border-radius: 8px;"
:columns="columns"
:data-source="data"
:pagination="false"
:scroll="{ y: '50vh' }"
/>
</div>
</div>
</div>
</Page>
</template>
<style scoped lang="scss">
.box{
display: grid;
grid-template-columns: 1fr 3fr;
gap: 16px;
padding: 16px;
}
</style>

Some files were not shown because too many files have changed in this diff Show More