From 98fe9f33018f07d0e0abf107ad59a8ad6e52771e Mon Sep 17 00:00:00 2001 From: chenqi Date: Sun, 1 Feb 2026 15:05:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(router):=20=E6=B7=BB=E5=8A=A0=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99=E7=AD=89=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增医生工作站路由,包含待写病历功能 - 添加全部功能模块路由,支持功能列表和配置页面 - 集成待办事项模块路由,完善工作流功能 - 配置相关API接口和服务类,实现用户配置管理 - 实现待写病历列表展示和相关业务逻辑 - 完善首页统计数据显示功能 --- .../controller/SysUserConfigController.java | 113 +++ .../com/core/system/domain/SysUserConfig.java | 60 ++ .../system/mapper/SysUserConfigMapper.java | 15 + .../system/service/ISysUserConfigService.java | 81 ++ .../impl/SysUserConfigServiceImpl.java | 178 +++++ .../mapper/system/SysUserConfigMapper.xml | 38 + .../controller/PendingEmrController.java | 69 ++ .../web/system/controller/HomeController.java | 38 + openhis-ui-vue3/src/api/system/userConfig.js | 62 ++ openhis-ui-vue3/src/api/workflow/task.js | 153 ++++ openhis-ui-vue3/src/router/index.js | 49 ++ .../components/pendingEmr/index.vue | 186 +++++ .../src/views/doctorstation/pendingEmr.vue | 219 +++++ openhis-ui-vue3/src/views/features/config.vue | 746 ++++++++++++++++++ openhis-ui-vue3/src/views/features/index.vue | 386 +++++++++ openhis-ui-vue3/src/views/todo/index.vue | 418 ++++++++++ 16 files changed, 2811 insertions(+) create mode 100644 openhis-server-new/core-system/src/main/java/com/core/system/controller/SysUserConfigController.java create mode 100644 openhis-server-new/core-system/src/main/java/com/core/system/domain/SysUserConfig.java create mode 100644 openhis-server-new/core-system/src/main/java/com/core/system/mapper/SysUserConfigMapper.java create mode 100644 openhis-server-new/core-system/src/main/java/com/core/system/service/ISysUserConfigService.java create mode 100644 openhis-server-new/core-system/src/main/java/com/core/system/service/impl/SysUserConfigServiceImpl.java create mode 100644 openhis-server-new/core-system/src/main/resources/mapper/system/SysUserConfigMapper.xml create mode 100644 openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/PendingEmrController.java create mode 100644 openhis-server-new/openhis-application/src/main/java/com/openhis/web/system/controller/HomeController.java create mode 100644 openhis-ui-vue3/src/api/system/userConfig.js create mode 100644 openhis-ui-vue3/src/api/workflow/task.js create mode 100644 openhis-ui-vue3/src/views/doctorstation/components/pendingEmr/index.vue create mode 100644 openhis-ui-vue3/src/views/doctorstation/pendingEmr.vue create mode 100644 openhis-ui-vue3/src/views/features/config.vue create mode 100644 openhis-ui-vue3/src/views/features/index.vue create mode 100644 openhis-ui-vue3/src/views/todo/index.vue diff --git a/openhis-server-new/core-system/src/main/java/com/core/system/controller/SysUserConfigController.java b/openhis-server-new/core-system/src/main/java/com/core/system/controller/SysUserConfigController.java new file mode 100644 index 00000000..957f84e5 --- /dev/null +++ b/openhis-server-new/core-system/src/main/java/com/core/system/controller/SysUserConfigController.java @@ -0,0 +1,113 @@ +package com.core.system.controller; + +import com.core.common.annotation.Log; +import com.core.common.core.controller.BaseController; +import com.core.common.core.domain.AjaxResult; +import com.core.common.core.page.TableDataInfo; +import com.core.common.enums.BusinessType; +import com.core.system.domain.SysUserConfig; +import com.core.system.service.ISysUserConfigService; +import com.core.common.utils.SecurityUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 用户配置Controller + * + * @author + * @date 2026-01-30 + */ +@Api(tags = "用户配置") +@RestController +@RequestMapping("/system/userConfig") +public class SysUserConfigController extends BaseController +{ + @Autowired + private ISysUserConfigService sysUserConfigService; + + /** + * 查询用户配置列表 + */ + @PreAuthorize("@ss.hasPermi('system:userConfig:list')") + @GetMapping("/list") + public TableDataInfo list(SysUserConfig sysUserConfig) + { + startPage(); + List list = sysUserConfigService.selectSysUserConfigList(sysUserConfig); + return getDataTable(list); + } + + /** + * 获取用户配置详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:userConfig:query')") + @GetMapping(value = "/{configId}") + public AjaxResult getInfo(@PathVariable("configId") Long configId) + { + return AjaxResult.success(sysUserConfigService.selectSysUserConfigById(configId)); + } + + /** + * 新增用户配置 + */ + @PreAuthorize("@ss.hasPermi('system:userConfig:add')") + @Log(title = "用户配置", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysUserConfig sysUserConfig) + { + return AjaxResult.success(sysUserConfigService.insertSysUserConfig(sysUserConfig)); + } + + /** + * 修改用户配置 + */ + @PreAuthorize("@ss.hasPermi('system:userConfig:edit')") + @Log(title = "用户配置", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysUserConfig sysUserConfig) + { + return toAjax(sysUserConfigService.updateSysUserConfig(sysUserConfig)); + } + + /** + * 删除用户配置 + */ + @PreAuthorize("@ss.hasPermi('system:userConfig:remove')") + @Log(title = "用户配置", businessType = BusinessType.DELETE) + @DeleteMapping("/{configIds}") + public AjaxResult remove(@PathVariable Long[] configIds) + { + return toAjax(sysUserConfigService.deleteSysUserConfigByIds(configIds)); + } + + /** + * 获取当前用户的指定配置 + */ + @ApiOperation("获取当前用户的指定配置") + @GetMapping("/currentUserConfig") + public AjaxResult getCurrentUserConfig(@RequestParam String configKey) + { + Long userId = SecurityUtils.getUserId(); + String configValue = sysUserConfigService.selectConfigValueByUserIdAndKey(userId, configKey); + // 返回原始配置值,不需要额外编码,由前端处理 + return AjaxResult.success(configValue); + } + + /** + * 保存当前用户的配置 + */ + @ApiOperation("保存当前用户的配置") + @Log(title = "用户配置", businessType = BusinessType.UPDATE) + @PostMapping("/saveCurrentUserConfig") + public AjaxResult saveCurrentUserConfig(@RequestParam String configKey, @RequestParam String configValue) + { + Long userId = SecurityUtils.getUserId(); + int result = sysUserConfigService.saveConfigValueByUserIdAndKey(userId, configKey, configValue); + return result > 0 ? AjaxResult.success() : AjaxResult.error("保存失败"); + } +} \ No newline at end of file diff --git a/openhis-server-new/core-system/src/main/java/com/core/system/domain/SysUserConfig.java b/openhis-server-new/core-system/src/main/java/com/core/system/domain/SysUserConfig.java new file mode 100644 index 00000000..4c49500d --- /dev/null +++ b/openhis-server-new/core-system/src/main/java/com/core/system/domain/SysUserConfig.java @@ -0,0 +1,60 @@ +package com.core.system.domain; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.core.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户配置对象 sys_user_config + * + * @author + * @date 2026-01-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("sys_user_config") +public class SysUserConfig extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 配置ID */ + @TableId + private Long configId; + + /** 用户ID */ + private Long userId; + + /** 配置键名 */ + private String configKey; + + /** 配置值 */ + private String configValue; + + /** 备注 */ + private String remark; + + /** 创建者 - 标记为非数据库字段 */ + @TableField(exist = false) + private String createBy; + + /** 创建时间 - 使用自动填充 */ + @TableField(fill = FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** 更新者 - 标记为非数据库字段 */ + @TableField(exist = false) + private String updateBy; + + /** 更新时间 - 使用自动填充 */ + @TableField(fill = FieldFill.INSERT_UPDATE) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; +} \ No newline at end of file diff --git a/openhis-server-new/core-system/src/main/java/com/core/system/mapper/SysUserConfigMapper.java b/openhis-server-new/core-system/src/main/java/com/core/system/mapper/SysUserConfigMapper.java new file mode 100644 index 00000000..25d3e421 --- /dev/null +++ b/openhis-server-new/core-system/src/main/java/com/core/system/mapper/SysUserConfigMapper.java @@ -0,0 +1,15 @@ +package com.core.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.core.system.domain.SysUserConfig; + +/** + * 用户配置Mapper接口 + * + * @author + * @date 2026-01-30 + */ +public interface SysUserConfigMapper extends BaseMapper +{ + +} \ No newline at end of file diff --git a/openhis-server-new/core-system/src/main/java/com/core/system/service/ISysUserConfigService.java b/openhis-server-new/core-system/src/main/java/com/core/system/service/ISysUserConfigService.java new file mode 100644 index 00000000..dd87bd79 --- /dev/null +++ b/openhis-server-new/core-system/src/main/java/com/core/system/service/ISysUserConfigService.java @@ -0,0 +1,81 @@ +package com.core.system.service; + +import com.core.system.domain.SysUserConfig; + +import java.util.List; + +/** + * 用户配置Service接口 + * + * @author + * @date 2026-01-30 + */ +public interface ISysUserConfigService +{ + /** + * 查询用户配置 + * + * @param configId 用户配置ID + * @return 用户配置 + */ + public SysUserConfig selectSysUserConfigById(Long configId); + + /** + * 查询用户配置列表 + * + * @param sysUserConfig 用户配置 + * @return 用户配置集合 + */ + public List selectSysUserConfigList(SysUserConfig sysUserConfig); + + /** + * 新增用户配置 + * + * @param sysUserConfig 用户配置 + * @return 结果 + */ + public int insertSysUserConfig(SysUserConfig sysUserConfig); + + /** + * 修改用户配置 + * + * @param sysUserConfig 用户配置 + * @return 结果 + */ + public int updateSysUserConfig(SysUserConfig sysUserConfig); + + /** + * 批量删除用户配置 + * + * @param configIds 需要删除的用户配置ID + * @return 结果 + */ + public int deleteSysUserConfigByIds(Long[] configIds); + + /** + * 删除用户配置信息 + * + * @param configId 用户配置ID + * @return 结果 + */ + public int deleteSysUserConfigById(Long configId); + + /** + * 根据用户ID和配置键获取配置值 + * + * @param userId 用户ID + * @param configKey 配置键 + * @return 配置值 + */ + public String selectConfigValueByUserIdAndKey(Long userId, String configKey); + + /** + * 根据用户ID和配置键保存配置 + * + * @param userId 用户ID + * @param configKey 配置键 + * @param configValue 配置值 + * @return 结果 + */ + public int saveConfigValueByUserIdAndKey(Long userId, String configKey, String configValue); +} \ No newline at end of file diff --git a/openhis-server-new/core-system/src/main/java/com/core/system/service/impl/SysUserConfigServiceImpl.java b/openhis-server-new/core-system/src/main/java/com/core/system/service/impl/SysUserConfigServiceImpl.java new file mode 100644 index 00000000..e78a8acb --- /dev/null +++ b/openhis-server-new/core-system/src/main/java/com/core/system/service/impl/SysUserConfigServiceImpl.java @@ -0,0 +1,178 @@ +package com.core.system.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.core.system.domain.SysUserConfig; +import com.core.common.utils.StringUtils; +import com.core.system.mapper.SysUserConfigMapper; +import com.core.system.service.ISysUserConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 用户配置Service业务层处理 + * + * @author + * @date 2026-01-30 + */ +@Service +public class SysUserConfigServiceImpl extends ServiceImpl implements ISysUserConfigService +{ + @Autowired + private SysUserConfigMapper sysUserConfigMapper; + + /** + * 查询用户配置 + * + * @param configId 用户配置ID + * @return 用户配置 + */ + @Override + public SysUserConfig selectSysUserConfigById(Long configId) + { + return sysUserConfigMapper.selectById(configId); + } + + /** + * 查询用户配置列表 + * + * @param sysUserConfig 用户配置 + * @return 用户配置集合 + */ + @Override + public List selectSysUserConfigList(SysUserConfig sysUserConfig) + { + LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); + lqw.eq(StringUtils.isNotEmpty(sysUserConfig.getConfigKey()), SysUserConfig::getConfigKey, sysUserConfig.getConfigKey()) + .eq(sysUserConfig.getUserId() != null, SysUserConfig::getUserId, sysUserConfig.getUserId()); + return sysUserConfigMapper.selectList(lqw); + } + + /** + * 新增用户配置 + * + * @param sysUserConfig 用户配置 + * @return 结果 + */ + @Override + public int insertSysUserConfig(SysUserConfig sysUserConfig) + { + return sysUserConfigMapper.insert(sysUserConfig); + } + + /** + * 修改用户配置 + * + * @param sysUserConfig 用户配置 + * @return 结果 + */ + @Override + public int updateSysUserConfig(SysUserConfig sysUserConfig) + { + return sysUserConfigMapper.updateById(sysUserConfig); + } + + /** + * 根据用户ID和配置键更新配置值 + * + * @param userId 用户ID + * @param configKey 配置键 + * @param configValue 配置值 + * @return 结果 + */ + private int updateConfigValueByUserIdAndKey(Long userId, String configKey, String configValue) + { + SysUserConfig config = new SysUserConfig(); + config.setConfigValue(configValue); + + LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); + lqw.eq(SysUserConfig::getUserId, userId) + .eq(SysUserConfig::getConfigKey, configKey); + + return sysUserConfigMapper.update(config, lqw); + } + + /** + * 批量删除用户配置 + * + * @param configIds 需要删除的用户配置ID + * @return 结果 + */ + @Override + public int deleteSysUserConfigByIds(Long[] configIds) + { + return sysUserConfigMapper.deleteBatchIds(java.util.Arrays.asList(configIds)); + } + + /** + * 删除用户配置信息 + * + * @param configId 用户配置ID + * @return 结果 + */ + @Override + public int deleteSysUserConfigById(Long configId) + { + return sysUserConfigMapper.deleteById(configId); + } + + /** + * 根据用户ID和配置键获取配置值 + * + * @param userId 用户ID + * @param configKey 配置键 + * @return 配置值 + */ + @Override + public String selectConfigValueByUserIdAndKey(Long userId, String configKey) + { + LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); + lqw.eq(SysUserConfig::getUserId, userId) + .eq(SysUserConfig::getConfigKey, configKey); + SysUserConfig config = sysUserConfigMapper.selectOne(lqw); + return config != null ? config.getConfigValue() : null; + } + + /** + * 根据用户ID和配置键保存配置 + * + * @param userId 用户ID + * @param configKey 配置键 + * @param configValue 配置值 + * @return 结果 + */ + @Override + public int saveConfigValueByUserIdAndKey(Long userId, String configKey, String configValue) + { + // 参数验证 + if (userId == null || configKey == null) { + throw new IllegalArgumentException("用户ID和配置键不能为空"); + } + + try { + LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); + lqw.eq(SysUserConfig::getUserId, userId) + .eq(SysUserConfig::getConfigKey, configKey); + SysUserConfig config = sysUserConfigMapper.selectOne(lqw); + + if (config != null) { + // 更新现有配置,只更新配置值,避免更新审计字段 + return updateConfigValueByUserIdAndKey(userId, configKey, configValue); + } else { + // 插入新配置 + SysUserConfig newConfig = new SysUserConfig(); + newConfig.setUserId(userId); + newConfig.setConfigKey(configKey); + newConfig.setConfigValue(configValue); + return sysUserConfigMapper.insert(newConfig); + } + } catch (Exception e) { + // 记录错误日志以便调试 + System.err.println("保存用户配置时发生错误: " + e.getMessage()); + e.printStackTrace(); + throw e; // 重新抛出异常让上层处理 + } + } +} \ No newline at end of file diff --git a/openhis-server-new/core-system/src/main/resources/mapper/system/SysUserConfigMapper.xml b/openhis-server-new/core-system/src/main/resources/mapper/system/SysUserConfigMapper.xml new file mode 100644 index 00000000..e2741736 --- /dev/null +++ b/openhis-server-new/core-system/src/main/resources/mapper/system/SysUserConfigMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + UPDATE sys_user_config + SET config_value = #{configValue}, update_time = CURRENT_TIMESTAMP + WHERE user_id = #{userId} AND config_key = #{configKey} + + + \ No newline at end of file diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/PendingEmrController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/PendingEmrController.java new file mode 100644 index 00000000..d2818c91 --- /dev/null +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/PendingEmrController.java @@ -0,0 +1,69 @@ +package com.openhis.web.doctorstation.controller; + +import com.core.common.core.domain.R; +import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService; +import com.openhis.web.doctorstation.dto.PatientEmrDto; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * 待写病历控制器 + * 用于处理医生待写病历的相关操作 + */ +@RestController +@RequestMapping("/doctor-station/pending-emr") +@Slf4j +@AllArgsConstructor +public class PendingEmrController { + + private final IDoctorStationEmrAppService iDoctorStationEmrAppService; + + /** + * 获取待写病历列表 + * + * @param doctorId 医生ID + * @return 待写病历列表 + */ + @GetMapping("/pending-list") + public R getPendingEmrList(@RequestParam(required = false) Long doctorId) { + // 如果没有传递医生ID,则使用当前登录用户ID + if (doctorId == null) { + doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getUserId(); + } + + // 调用服务获取待写病历列表 + return iDoctorStationEmrAppService.getPendingEmrList(doctorId); + } + + /** + * 获取待写病历数量 + * + * @param doctorId 医生ID + * @return 待写病历数量 + */ + @GetMapping("/pending-count") + public R getPendingEmrCount(@RequestParam(required = false) Long doctorId) { + // 如果没有传递医生ID,则使用当前登录用户ID + if (doctorId == null) { + doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getUserId(); + } + + // 调用服务获取待写病历数量 + return iDoctorStationEmrAppService.getPendingEmrCount(doctorId); + } + + /** + * 检查患者是否需要写病历 + * + * @param encounterId 就诊ID + * @return 患者是否需要写病历 + */ + @GetMapping("/need-write-emr") + public R checkNeedWriteEmr(@RequestParam Long encounterId) { + return iDoctorStationEmrAppService.checkNeedWriteEmr(encounterId); + } +} \ No newline at end of file diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/system/controller/HomeController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/system/controller/HomeController.java new file mode 100644 index 00000000..ffcb4719 --- /dev/null +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/system/controller/HomeController.java @@ -0,0 +1,38 @@ +package com.openhis.web.system.controller; + +import com.core.common.core.domain.R; +import com.core.common.utils.SecurityUtils; +import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 系统首页控制器 + */ +@Api(tags = "系统首页") +@RestController +@RequestMapping("/system/home") +@AllArgsConstructor +public class HomeController { + + private final IDoctorStationEmrAppService doctorStationEmrAppService; + + @ApiOperation("获取首页统计数据") + @GetMapping("/statistics") + public R getStatistics() { + // 这里可以返回各种统计数据 + // 为了简化,我们只返回待写病历数量 + Long userId = SecurityUtils.getLoginUser().getUserId(); + R pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(userId); + + // 构建返回数据 + java.util.Map data = new java.util.HashMap<>(); + data.put("pendingEmr", pendingEmrCount.getData()); + + return R.ok(data); + } +} \ No newline at end of file diff --git a/openhis-ui-vue3/src/api/system/userConfig.js b/openhis-ui-vue3/src/api/system/userConfig.js new file mode 100644 index 00000000..10b20fb7 --- /dev/null +++ b/openhis-ui-vue3/src/api/system/userConfig.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 查询用户配置列表 +export function listUserConfig(query) { + return request({ + url: '/system/userConfig/list', + method: 'get', + params: query + }) +} + +// 查询用户配置详细 +export function getUserConfig(configId) { + return request({ + url: '/system/userConfig/' + configId, + method: 'get' + }) +} + +// 新增用户配置 +export function addUserConfig(data) { + return request({ + url: '/system/userConfig', + method: 'post', + data: data + }) +} + +// 修改用户配置 +export function updateUserConfig(data) { + return request({ + url: '/system/userConfig', + method: 'put', + data: data + }) +} + +// 删除用户配置 +export function delUserConfig(configId) { + return request({ + url: '/system/userConfig/' + configId, + method: 'delete' + }) +} + +// 获取当前用户的指定配置 +export function getCurrentUserConfig(configKey) { + return request({ + url: '/system/userConfig/currentUserConfig', + method: 'get', + params: { configKey } + }) +} + +// 保存当前用户的配置 +export function saveCurrentUserConfig(configKey, configValue) { + return request({ + url: '/system/userConfig/saveCurrentUserConfig', + method: 'post', + params: { configKey, configValue } + }) +} \ No newline at end of file diff --git a/openhis-ui-vue3/src/api/workflow/task.js b/openhis-ui-vue3/src/api/workflow/task.js new file mode 100644 index 00000000..46554888 --- /dev/null +++ b/openhis-ui-vue3/src/api/workflow/task.js @@ -0,0 +1,153 @@ +import request from '@/utils/request' + +// 查询待办任务列表 +export function listTodo(query) { + return request({ + url: '/flowable/task/todoList', + method: 'get', + params: query + }) +} + +// 查询已办任务列表 +export function listFinished(query) { + return request({ + url: '/flowable/task/finishedList', + method: 'get', + params: query + }) +} + +// 查询我发起的流程 +export function myListProcess(query) { + return request({ + url: '/flowable/task/myProcess', + method: 'get', + params: query + }) +} + +// 完成任务 +export function completeTask(data) { + return request({ + url: '/flowable/task/complete', + method: 'post', + data: data + }) +} + +// 驳回任务 +export function rejectTask(data) { + return request({ + url: '/flowable/task/reject', + method: 'post', + data: data + }) +} + +// 退回任务 +export function returnTask(data) { + return request({ + url: '/flowable/task/return', + method: 'post', + data: data + }) +} + +// 认领/签收任务 +export function claimTask(data) { + return request({ + url: '/flowable/task/claim', + method: 'post', + data: data + }) +} + +// 取消认领/签收任务 +export function unClaimTask(data) { + return request({ + url: '/flowable/task/unClaim', + method: 'post', + data: data + }) +} + +// 委派任务 +export function delegateTask(data) { + return request({ + url: '/flowable/task/delegateTask', + method: 'post', + data: data + }) +} + +// 任务归还 +export function resolveTask(data) { + return request({ + url: '/flowable/task/resolveTask', + method: 'post', + data: data + }) +} + +// 转办任务 +export function assignTask(data) { + return request({ + url: '/flowable/task/assignTask', + method: 'post', + data: data + }) +} + +// 取消申请 +export function stopProcess(data) { + return request({ + url: '/flowable/task/stopProcess', + method: 'post', + data: data + }) +} + +// 撤回流程 +export function revokeProcess(data) { + return request({ + url: '/flowable/task/revokeProcess', + method: 'post', + data: data + }) +} + +// 删除任务 +export function deleteTask(data) { + return request({ + url: '/flowable/task/delete', + method: 'delete', + data: data + }) +} + +// 获取流程变量 +export function getProcessVariables(taskId) { + return request({ + url: `/flowable/task/processVariables/${taskId}`, + method: 'get' + }) +} + +// 获取下一节点 +export function getNextFlowNode(data) { + return request({ + url: '/flowable/task/nextFlowNode', + method: 'post', + data: data + }) +} + +// 获取任务表单 +export function getTaskForm(taskId) { + return request({ + url: '/flowable/task/getTaskForm', + method: 'get', + params: { taskId } + }) +} \ No newline at end of file diff --git a/openhis-ui-vue3/src/router/index.js b/openhis-ui-vue3/src/router/index.js index 2dd34163..0f57df7e 100644 --- a/openhis-ui-vue3/src/router/index.js +++ b/openhis-ui-vue3/src/router/index.js @@ -237,6 +237,55 @@ export const dynamicRoutes = [ }, ], }, + { + path: '/doctorstation', + component: Layout, + redirect: '/doctorstation/index', + name: 'DoctorStation', + meta: { title: '医生工作站', icon: 'operation' }, + children: [ + { + path: 'pending-emr', + component: () => import('@/views/doctorstation/pendingEmr.vue'), + name: 'PendingEmr', + meta: { title: '待写病历', icon: 'document', permissions: ['doctorstation:pending-emr:view'] } + } + ] + }, + { + path: '/features', + component: Layout, + name: 'Features', + meta: { title: '全部功能', icon: 'menu' }, + children: [ + { + path: '', + component: () => import('@/views/features/index.vue'), + name: 'FeaturesIndex', + meta: { title: '功能列表', icon: 'menu' } + }, + { + path: 'config', + component: () => import('@/views/features/config.vue'), + name: 'FeaturesConfig', + meta: { title: '功能配置', icon: 'setting' } + } + ] + }, + { + path: '/todo', + component: Layout, + name: 'Todo', + meta: { title: '待办事项', icon: 'todo' }, + children: [ + { + path: '', + component: () => import('@/views/todo/index.vue'), + name: 'TodoIndex', + meta: { title: '待办列表', icon: 'todo' } + } + ] + }, ]; // 合并常量路由和动态路由,确保所有路由都能被访问 diff --git a/openhis-ui-vue3/src/views/doctorstation/components/pendingEmr/index.vue b/openhis-ui-vue3/src/views/doctorstation/components/pendingEmr/index.vue new file mode 100644 index 00000000..36049b1b --- /dev/null +++ b/openhis-ui-vue3/src/views/doctorstation/components/pendingEmr/index.vue @@ -0,0 +1,186 @@ + + + + + \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/doctorstation/pendingEmr.vue b/openhis-ui-vue3/src/views/doctorstation/pendingEmr.vue new file mode 100644 index 00000000..71215b41 --- /dev/null +++ b/openhis-ui-vue3/src/views/doctorstation/pendingEmr.vue @@ -0,0 +1,219 @@ + + + + + \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/features/config.vue b/openhis-ui-vue3/src/views/features/config.vue new file mode 100644 index 00000000..df084751 --- /dev/null +++ b/openhis-ui-vue3/src/views/features/config.vue @@ -0,0 +1,746 @@ + + + + + \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/features/index.vue b/openhis-ui-vue3/src/views/features/index.vue new file mode 100644 index 00000000..abd24063 --- /dev/null +++ b/openhis-ui-vue3/src/views/features/index.vue @@ -0,0 +1,386 @@ + + + + + \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/todo/index.vue b/openhis-ui-vue3/src/views/todo/index.vue new file mode 100644 index 00000000..0381a490 --- /dev/null +++ b/openhis-ui-vue3/src/views/todo/index.vue @@ -0,0 +1,418 @@ + + + + + \ No newline at end of file