From 6677b3b0b8261c749da55444c6ee7bebc04de2a5 Mon Sep 17 00:00:00 2001 From: zhangjunwen Date: Wed, 30 Oct 2024 17:42:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=B7=A5=E5=8D=95=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=97=B6=E6=8E=A8=E9=80=81=E7=94=A8=E6=88=B7=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=8A=9F=E8=83=BD=EF=BC=9B=E7=BB=B4=E4=BF=AE=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E6=96=B0=E5=A2=9E=E6=97=B6=E8=A1=A8=E5=8D=95=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96=E4=BF=AE=E6=94=B9=EF=BC=9A=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=A0=91=E5=8F=8D=E9=A6=88=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/system/constant/NoticeType.java | 28 + .../admin/notice/vo/NoticeRespVO.java | 5 +- .../admin/notice/vo/NoticeSaveReqVO.java | 7 +- .../vo/message/NotifyMessageRespVO.java | 3 + .../equip/ComponentInfoController.java | 4 +- .../controller/equip/EquipInfoController.java | 2 +- .../dal/dataobject/notice/NoticeDO.java | 6 +- .../dataobject/notify/NotifyMessageDO.java | 7 +- .../dal/mysql/equip/ComponentInfoMapper.java | 12 +- .../service/equip/ComponentInfoService.java | 2 +- .../equip/ComponentInfoServiceImpl.java | 4 +- .../MaintenanceOrderServiceImpl.java | 28 +- imt-ui/src/api/system/equip/componentInfo.js | 55 +- .../VueOkrTree/vue-okr-tree/OkrTreeNode.vue | 1 + .../inspectionPlan/inspectionPlanTree.vue | 61 ++ .../RemoteMaintenanceOrderForm.vue | 253 ++++--- .../maintenance/maintenanceInfo/index.vue | 617 +++++++++++++----- imt-ui/src/views/system/notify/my/index.vue | 25 +- 18 files changed, 820 insertions(+), 300 deletions(-) create mode 100644 imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/constant/NoticeType.java diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/constant/NoticeType.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/constant/NoticeType.java new file mode 100644 index 0000000..c2a0d6b --- /dev/null +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/constant/NoticeType.java @@ -0,0 +1,28 @@ +package com.inspur.module.system.constant; + +/** + * @Author zhangjunwen + * @create 2024/10/30 + */ +public class NoticeType { + /** + * 通知 + */ + public static final Integer NOTICE = 1; + + /** + * 公告 + */ + public static final Integer BULLETIN = 2; + + /** + * 维修工单通知 + */ + public static final Integer MAINTENANCE_ORDER = 3; + + /** + * 点检工单通知 + */ + public static final Integer INSPECTION_ORDER = 4; + +} diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notice/vo/NoticeRespVO.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notice/vo/NoticeRespVO.java index 8cc8d95..f27ee1f 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notice/vo/NoticeRespVO.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notice/vo/NoticeRespVO.java @@ -28,5 +28,8 @@ public class NoticeRespVO { private LocalDateTime createTime; @Schema(description = "租户编号") - private Integer tenantId; + private Long tenantId; + + @Schema(description = "工单编号") + private String orderId; } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notice/vo/NoticeSaveReqVO.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notice/vo/NoticeSaveReqVO.java index 917a243..3aa825c 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notice/vo/NoticeSaveReqVO.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notice/vo/NoticeSaveReqVO.java @@ -1,6 +1,7 @@ package com.inspur.module.system.controller.admin.notice.vo; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -9,6 +10,7 @@ import javax.validation.constraints.Size; @Schema(description = "管理后台 - 通知公告创建/修改 Request VO") @Data +@AllArgsConstructor public class NoticeSaveReqVO { @Schema(description = "岗位公告编号", example = "1024") @@ -30,5 +32,8 @@ public class NoticeSaveReqVO { private Integer status; @Schema(description = "租户编号") - private Integer tenantId; + private Long tenantId; + + @Schema(description = "工单编号") + private String orderId; } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java index c21e151..6c36d06 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/admin/notify/vo/message/NotifyMessageRespVO.java @@ -57,4 +57,7 @@ public class NotifyMessageRespVO { @Schema(description = "租户编号") private Integer tenantId; + + @Schema(description = "工单编号") + private String orderId; } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/ComponentInfoController.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/ComponentInfoController.java index 2563b7c..9c351ba 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/ComponentInfoController.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/ComponentInfoController.java @@ -117,8 +117,8 @@ public class ComponentInfoController { @GetMapping("/selection") @Operation(summary = "机床组件信息下拉") @PreAuthorize("@ss.hasPermission('imt:component-info:query')") - public List selection(){ - return componentInfoService.selection(); + public List selection(String equipId){ + return componentInfoService.selection(equipId); } } \ No newline at end of file diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/EquipInfoController.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/EquipInfoController.java index eb578ec..f81ff8b 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/EquipInfoController.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/EquipInfoController.java @@ -86,7 +86,7 @@ public class EquipInfoController { @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('imt:equip-info:query')") public CommonResult getEquipInfo(@RequestParam("id") String id) { - EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(id);// + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(id); return success(BeanUtils.toBean(equipInfo, EquipInfoRespVO.class)); } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/notice/NoticeDO.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/notice/NoticeDO.java index e806361..dbce361 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/notice/NoticeDO.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/notice/NoticeDO.java @@ -46,5 +46,9 @@ public class NoticeDO extends BaseDO { /** * 租户编号 */ - private Integer tenantId; + private Long tenantId; + /** + * 工单编号 + */ + private String orderId; } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/notify/NotifyMessageDO.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/notify/NotifyMessageDO.java index 9082840..eefd623 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/notify/NotifyMessageDO.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/notify/NotifyMessageDO.java @@ -115,5 +115,10 @@ public class NotifyMessageDO extends BaseDO { /** * 租户编号 */ - private Integer tenantId; + private Long tenantId; + + /** + * 工单ID + */ + private String orderId; } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/mysql/equip/ComponentInfoMapper.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/mysql/equip/ComponentInfoMapper.java index 591030a..ab24d13 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/mysql/equip/ComponentInfoMapper.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/mysql/equip/ComponentInfoMapper.java @@ -2,6 +2,7 @@ package com.inspur.module.system.dal.mysql.equip; import com.inspur.framework.common.pojo.PageResult; import com.inspur.framework.common.util.object.BeanUtils; +import com.inspur.framework.common.util.string.StrUtils; import com.inspur.framework.mybatis.core.mapper.BaseMapperX; import com.inspur.framework.mybatis.core.query.LambdaQueryWrapperX; import com.inspur.module.system.controller.equip.vo.ComponentInfoPageReqVO; @@ -9,7 +10,9 @@ import com.inspur.module.system.controller.equip.vo.ComponentSelectionVO; import com.inspur.module.system.dal.dataobject.equip.ComponentInfoDO; import org.apache.ibatis.annotations.Mapper; +import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * 机床组件信息 Mapper @@ -29,8 +32,13 @@ public interface ComponentInfoMapper extends BaseMapperX { .orderByDesc(ComponentInfoDO::getCreateTime)); } - default List selection(){ - List componentInfoDOS = selectList(); + default List selection(String equipId){ + List componentInfoDOS; + if (equipId != null && !"".equals(equipId.trim())) { + componentInfoDOS = selectList("equip_id", equipId); + }else { + componentInfoDOS = selectList(); + } return BeanUtils.toBean(componentInfoDOS, ComponentSelectionVO.class); } } \ No newline at end of file diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoService.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoService.java index ab46b57..668e9f6 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoService.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoService.java @@ -61,5 +61,5 @@ public interface ComponentInfoService { * @Date 11:20 2024/9/4 * @return java.util.List */ - List selection(); + List selection(String equipId); } \ No newline at end of file diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoServiceImpl.java index f87519e..65285fc 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoServiceImpl.java @@ -96,7 +96,7 @@ public class ComponentInfoServiceImpl implements ComponentInfoService { } @Override - public List selection() { - return componentInfoMapper.selection(); + public List selection(String equipId) { + return componentInfoMapper.selection(equipId); } } \ No newline at end of file diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/maintenance/MaintenanceOrderServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/maintenance/MaintenanceOrderServiceImpl.java index e674e88..2207ae3 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/maintenance/MaintenanceOrderServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/maintenance/MaintenanceOrderServiceImpl.java @@ -9,9 +9,12 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.inspur.framework.common.enums.CommonStatusEnum; import com.inspur.framework.common.pojo.PageResult; import com.inspur.framework.common.util.spring.SpringUtils; +import com.inspur.framework.security.core.util.SecurityFrameworkUtils; import com.inspur.framework.tenant.core.aop.TenantIgnore; import com.inspur.module.bpm.api.task.BpmProcessInstanceApi; import com.inspur.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; +import com.inspur.module.system.constant.NoticeType; +import com.inspur.module.system.controller.admin.notice.vo.NoticeSaveReqVO; import com.inspur.module.system.controller.baseData.vo.CustomerInfoSelectionVO; import com.inspur.module.system.controller.equip.vo.ComponentSelectionVO; import com.inspur.module.system.controller.equip.vo.EquipSelectionVO; @@ -23,6 +26,7 @@ import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.dal.dataobject.inspection.InspectionInfoDO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceReportDO; +import com.inspur.module.system.dal.dataobject.notify.NotifyMessageDO; import com.inspur.module.system.dal.dataobject.user.AdminUserDO; import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderMapper; import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderRecordMapper; @@ -33,6 +37,8 @@ import com.inspur.module.system.service.equip.ComponentInfoService; import com.inspur.module.system.service.equip.EquipInfoService; import com.inspur.module.system.service.inspection.InspectionInfoService; import com.inspur.module.system.service.inspection.InspectionInfoServiceImpl; +import com.inspur.module.system.service.notice.NoticeService; +import com.inspur.module.system.service.notify.NotifyMessageService; import com.inspur.module.system.service.user.AdminUserService; import org.flowable.engine.TaskService; import org.flowable.task.api.Task; @@ -90,6 +96,9 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService { @Resource private AlarmDataService alarmDataService; + @Resource + private NotifyMessageService notifyMessageService; + /** * OA 请假对应的流程定义 KEY */ @@ -145,6 +154,19 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService { // 将工作流的编号,更新到 业务表 中 maintenanceOrderMapper.updateById(new MaintenanceOrderDO().setMaintenanceOrderId(remoteMaintenanceOrder.getMaintenanceOrderId()).setProcessInstanceId(processInstanceId)); } + //消息推送 +// NoticeSaveReqVO noticeSaveReqVO = new NoticeSaveReqVO(null, "维修工单", NoticeType.MAINTENANCE_ORDER,"您有一个新的维修工单,请及时处理!", 0, remoteMaintenanceOrder.getTenantId(), remoteMaintenanceOrder.getMaintenanceOrderId()); +// noticeService.createNotice(noticeSaveReqVO); + NotifyMessageDO noticeMessageDO = new NotifyMessageDO(); + noticeMessageDO.setOrderId(remoteMaintenanceOrder.getMaintenanceOrderId()); + noticeMessageDO.setTitle("新增维修工单通知"); + noticeMessageDO.setContent("您有一个新的维修工单,请及时处理!"); + noticeMessageDO.setType(NoticeType.MAINTENANCE_ORDER); + noticeMessageDO.setReadStatus(false); + noticeMessageDO.setUserId(SecurityFrameworkUtils.getLoginUserId()); + noticeMessageDO.setTemplateNickname(SecurityFrameworkUtils.getLoginUserNickname()); + noticeMessageDO.setTenantId(remoteMaintenanceOrder.getTenantId()); + notifyMessageService.createNotifyMessage(noticeMessageDO); // 返回 return remoteMaintenanceOrder.getMaintenanceOrderId(); } @@ -203,7 +225,7 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService { if (CollUtil.isNotEmpty(list)){ List equipList = equipInfoService.selection(); Map equipMap = equipList.stream().collect(Collectors.toMap(EquipSelectionVO::getEquipId, EquipSelectionVO::getEquipNo)); - List componentList = componentInfoService.selection(); + List componentList = componentInfoService.selection(null); Map componentMap = componentList.stream().collect(Collectors.toMap(ComponentSelectionVO::getComponentId, ComponentSelectionVO::getComponentName)); List customerList = customerInfoService.selection(true); Map customerMap = customerList.stream().collect(Collectors.toMap(CustomerInfoSelectionVO::getCustomerId, CustomerInfoSelectionVO::getCustomerName)); @@ -248,7 +270,7 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService { if (CollUtil.isNotEmpty(list)){ List equipList = equipInfoService.selection(); Map equipMap = equipList.stream().collect(Collectors.toMap(EquipSelectionVO::getEquipId, EquipSelectionVO::getEquipNo)); - List componentList = componentInfoService.selection(); + List componentList = componentInfoService.selection(null); Map componentMap = componentList.stream().collect(Collectors.toMap(ComponentSelectionVO::getComponentId, ComponentSelectionVO::getComponentName)); List customerList = customerInfoService.selection(true); Map customerMap = customerList.stream().collect(Collectors.toMap(CustomerInfoSelectionVO::getCustomerId, CustomerInfoSelectionVO::getCustomerName)); @@ -272,7 +294,7 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService { MaintenanceOrderRespVO vo = BeanUtils.toBean(remoteMaintenanceOrder, MaintenanceOrderRespVO.class); List equipList = equipInfoService.selection(); Map equipMap = equipList.stream().collect(Collectors.toMap(EquipSelectionVO::getEquipId, EquipSelectionVO::getEquipNo)); - List componentList = componentInfoService.selection(); + List componentList = componentInfoService.selection(null); Map componentMap = componentList.stream().collect(Collectors.toMap(ComponentSelectionVO::getComponentId, ComponentSelectionVO::getComponentName)); List customerList = customerInfoService.selection(true); Map customerMap = customerList.stream().collect(Collectors.toMap(CustomerInfoSelectionVO::getCustomerId, CustomerInfoSelectionVO::getCustomerName)); diff --git a/imt-ui/src/api/system/equip/componentInfo.js b/imt-ui/src/api/system/equip/componentInfo.js index 9605e40..1415c61 100644 --- a/imt-ui/src/api/system/equip/componentInfo.js +++ b/imt-ui/src/api/system/equip/componentInfo.js @@ -1,61 +1,62 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 创建机床组件信息 export function createComponentInfo(data) { return request({ - url: '/equip/component/create', - method: 'post', - data: data - }) + url: "/equip/component/create", + method: "post", + data: data, + }); } // 更新机床组件信息 export function updateComponentInfo(data) { return request({ - url: '/equip/component/update', - method: 'put', - data: data - }) + url: "/equip/component/update", + method: "put", + data: data, + }); } // 删除机床组件信息 export function deleteComponentInfo(id) { return request({ - url: '/equip/component/delete?id=' + id, - method: 'delete' - }) + url: "/equip/component/delete?id=" + id, + method: "delete", + }); } // 获得机床组件信息 export function getComponentInfo(id) { return request({ - url: '/equip/component/get?id=' + id, - method: 'get' - }) + url: "/equip/component/get?id=" + id, + method: "get", + }); } // 获得机床组件信息分页 export function getComponentInfoPage(params) { return request({ - url: '/equip/component/page', - method: 'get', - params - }) + url: "/equip/component/page", + method: "get", + params, + }); } // 导出机床组件信息 Excel export function exportComponentInfoExcel(params) { return request({ - url: '/equip/component/export-excel', - method: 'get', + url: "/equip/component/export-excel", + method: "get", params, - responseType: 'blob' - }) + responseType: "blob", + }); } // 机床组件下拉 -export function getComponentSelection() { +export function getComponentSelection(params) { return request({ - url: '/equip/component/selection', - method: 'get' - }) + url: "/equip/component/selection", + method: "get", + params: params, + }); } diff --git a/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTreeNode.vue b/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTreeNode.vue index 7e0fb3d..cd085dc 100644 --- a/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTreeNode.vue +++ b/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTreeNode.vue @@ -275,6 +275,7 @@ export default { } }, leftChildNodes() { + console.log("treeNode:", this.node); if (this.tree.store.onlyBothTree) { if (this.isLeftChildNode) { return this.node.childNodes; diff --git a/imt-ui/src/views/system/inspectionPlan/inspectionPlanTree.vue b/imt-ui/src/views/system/inspectionPlan/inspectionPlanTree.vue index 57c3333..7e1be36 100644 --- a/imt-ui/src/views/system/inspectionPlan/inspectionPlanTree.vue +++ b/imt-ui/src/views/system/inspectionPlan/inspectionPlanTree.vue @@ -47,6 +47,7 @@ default-expand-all :isClickInput="true" :current-lable-class-name="renderCurrentClass" + :render-content="renderContent" @node-click="nodeClick" @comment-submitted="handleCommentSubmitted" > @@ -150,6 +151,45 @@ export default { this.eventBus.$off("inputCompleted"); }, methods: { + renderContent(h, node) { + // console.log("h:", h); + // console.log("node:", node); + + const title = h("div", { class: "title" }, [node.data.inspectionName]); + + // 创建“反馈:”前缀 + const feedbackPrefix = h( + "span", + { + style: { color: "blue", fontWeight: "bold" }, // 使用内联样式 + class: "feedback-prefix", + }, + ["反馈:"] + ); + + // 创建反馈内容 + const feedbackText = h( + "span", + { + style: { + whiteSpace: "nowrap", + overflow: "hidden", + textOverflow: "ellipsis", + }, + domProps: { title: `反馈:${node.data.inspectionName}` }, + }, + [node.data.inspectionName] + ); + + // 将前缀和内容组合在一起 + const feedback = h("div", { class: "feedback" }, [ + feedbackPrefix, + feedbackText, + ]); + + // 返回整个节点的内容 + return h("div", { class: "node-content" }, [title, h("hr"), feedback]); + }, handleGlobalInputCompleted({ node, inputValue }) { // 在这里处理全局的输入值 console.log("全局节点信息:", node); @@ -258,4 +298,25 @@ export default { background: #1989fa; color: #fff; } +.node-content { + display: flex; + flex-direction: column; +} + +.title { + /* 标题样式 */ +} + +.feedback { + /* 反馈文本样式 */ + cursor: help; /* 鼠标移到上面时变为帮助图标 */ +} + +/* 分割线样式 */ +.node-content hr { + margin: 4px 0; /* 调整间距 */ + border: none; + height: 1px; + background-color: #ccc; /* 线的颜色 */ +} diff --git a/imt-ui/src/views/system/maintenance/maintenanceInfo/RemoteMaintenanceOrderForm.vue b/imt-ui/src/views/system/maintenance/maintenanceInfo/RemoteMaintenanceOrderForm.vue index 8de1fd2..13c7353 100644 --- a/imt-ui/src/views/system/maintenance/maintenanceInfo/RemoteMaintenanceOrderForm.vue +++ b/imt-ui/src/views/system/maintenance/maintenanceInfo/RemoteMaintenanceOrderForm.vue @@ -1,65 +1,142 @@ diff --git a/imt-ui/src/views/system/maintenance/maintenanceInfo/index.vue b/imt-ui/src/views/system/maintenance/maintenanceInfo/index.vue index 2eb09a9..7287080 100644 --- a/imt-ui/src/views/system/maintenance/maintenanceInfo/index.vue +++ b/imt-ui/src/views/system/maintenance/maintenanceInfo/index.vue @@ -1,195 +1,420 @@ diff --git a/imt-ui/src/views/system/notify/my/index.vue b/imt-ui/src/views/system/notify/my/index.vue index 41c7da2..8f75e3e 100644 --- a/imt-ui/src/views/system/notify/my/index.vue +++ b/imt-ui/src/views/system/notify/my/index.vue @@ -117,13 +117,19 @@ - @@ -280,6 +293,12 @@ export default { this.getList(); }); }, + handle2MaintenanceOrder(orderId) { + this.$router.push({ + path: "/maintenance/remote-maintenance-order", + query: { orderId: orderId }, + }); + }, }, };