Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.AjaxResult;
|
||||
import com.core.common.core.domain.entity.SysRole;
|
||||
import com.core.common.core.domain.entity.SysUser;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.core.common.exception.CustomException;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.flowable.common.constant.ProcessConstants;
|
||||
@@ -629,11 +630,20 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
||||
public AjaxResult todoList(FlowQueryVo queryVo) {
|
||||
Page<FlowTaskDto> page = new Page<>();
|
||||
// 只查看自己的数据
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getUser();
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return AjaxResult.success(page);
|
||||
}
|
||||
SysUser sysUser = loginUser.getUser();
|
||||
List<String> roleIds = sysUser.getRoles() != null
|
||||
? sysUser.getRoles().stream().map(role -> role.getRoleId().toString()).collect(Collectors.toList())
|
||||
: Collections.emptyList();
|
||||
TaskQuery taskQuery = taskService.createTaskQuery().active().includeProcessVariables()
|
||||
.taskCandidateGroupIn(
|
||||
sysUser.getRoles().stream().map(role -> role.getRoleId().toString()).collect(Collectors.toList()))
|
||||
.taskCandidateOrAssigned(sysUser.getUserId().toString()).orderByTaskCreateTime().desc();
|
||||
.taskCandidateOrAssigned(sysUser.getUserId().toString());
|
||||
if (!roleIds.isEmpty()) {
|
||||
taskQuery.taskCandidateGroupIn(roleIds);
|
||||
}
|
||||
taskQuery.orderByTaskCreateTime().desc();
|
||||
|
||||
// TODO 传入名称查询不到数据?
|
||||
if (StringUtils.isNotBlank(queryVo.getName())) {
|
||||
|
||||
@@ -136,11 +136,11 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {nextTick, onMounted, ref, watch} from 'vue';
|
||||
import {getCurrentInstance, nextTick, onMounted, reactive, ref, watch} from 'vue';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import {getTreeList} from '@/views/basicmanage/caseTemplates/api';
|
||||
import {addTemplate, getRecordByEncounterIdList, recordPrint, saveOrUpdateRecord} from './api';
|
||||
import {patientInfo} from '../store/patient.js';
|
||||
import {patientInfo as storePatientInfo} from '../store/patient.js';
|
||||
import dayjs from 'dayjs';
|
||||
// 打印工具
|
||||
import {PRINT_TEMPLATE, simplePrint} from '@/utils/printUtils.js';
|
||||
@@ -301,15 +301,15 @@ const handleSubmitOk = async (data) => {
|
||||
if (currentOperate.value === 'add') {
|
||||
//
|
||||
try {
|
||||
if (!patientInfo.value?.encounterId || !patientInfo.value?.patientId) {
|
||||
if (!storePatientInfo.value?.encounterId || !storePatientInfo.value?.patientId) {
|
||||
ElMessage.error('请先选择患者!');
|
||||
return;
|
||||
}
|
||||
editForm.value.definitionId = currentSelectTemplate.value.id;
|
||||
editForm.value.definitionBusNo = currentSelectTemplate.value.busNo;
|
||||
editForm.value.contentJson = JSON.stringify(data);
|
||||
editForm.value.encounterId = patientInfo.value.encounterId;
|
||||
editForm.value.patientId = patientInfo.value.patientId;
|
||||
editForm.value.encounterId = storePatientInfo.value.encounterId;
|
||||
editForm.value.patientId = storePatientInfo.value.patientId;
|
||||
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
// 提交病历
|
||||
await saveOrUpdateRecord(editForm.value);
|
||||
@@ -465,15 +465,15 @@ const selectedHistoryRecordId = ref('');
|
||||
|
||||
// 加载最新的病历数据并回显
|
||||
const loadLatestMedicalRecord = async () => {
|
||||
if (!patientInfo.value.encounterId || !currentSelectTemplate.value.id) return;
|
||||
if (!storePatientInfo.value.encounterId || !currentSelectTemplate.value.id) return;
|
||||
|
||||
loading.value = true;
|
||||
try {
|
||||
// 获取患者的历史病历记录
|
||||
const res = await getRecordByEncounterIdList({
|
||||
isPage: 0,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
patientId: patientInfo.value.patientId,
|
||||
encounterId: storePatientInfo.value.encounterId,
|
||||
patientId: storePatientInfo.value.patientId,
|
||||
definitionId: currentSelectTemplate.value.id,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user