Compare commits
42 Commits
V1.2
...
a64edace55
| Author | SHA1 | Date | |
|---|---|---|---|
| a64edace55 | |||
| 4afe0d107c | |||
|
|
d8af11412f | ||
|
|
00816c9834 | ||
|
|
4fb7bea80a | ||
|
|
0fc72cb270 | ||
|
|
eadf521903 | ||
| f786fdbc3f | |||
| 92c4c938a3 | |||
|
|
a94a1b7b69 | ||
|
|
48755c2d9e | ||
|
|
f99f8eb560 | ||
|
|
ddc7ce2fe7 | ||
|
|
c9899c62d2 | ||
| 8b9837d7dc | |||
| 2cba41331a | |||
| 4da5ca427b | |||
| f4605b1af7 | |||
|
|
d2babdc9ed | ||
| 4d0599eac1 | |||
|
|
35d99df274 | ||
|
|
ce76b2f98d | ||
| 8fbca1a898 | |||
| d548215123 | |||
| 953d17dc8c | |||
|
|
b71a21ea5c | ||
|
|
0a20b5e34e | ||
| 388425084e | |||
| 51ee8d1b43 | |||
|
|
d29d56e712 | ||
|
|
9084ddaa98 | ||
|
|
be6d5c1ccc | ||
| 1bba9e598a | |||
| d58a5e8ab3 | |||
| e6ffb7101f | |||
|
|
48b2188cf9 | ||
|
|
8bc5d45976 | ||
| 04f6e7e960 | |||
| 8fb58bdab8 | |||
|
|
fdfe5334a1 | ||
|
|
66b99009e6 | ||
|
|
2c7456531d |
@@ -4,11 +4,11 @@
|
||||
|
||||

|
||||
|
||||
天天开源致⼒于打造中国应⽤管理软件开源⽣态,⾯向医疗、企业、教育三⼤⾏业信息化需求,提供优质的开源软件产品与解决⽅案。平台现已发布OpenHIS、OpenCOM、OpenEDU系列开源产品,并持续招募⽣态合作伙伴,期待共同构建开源创新的⾏业协作模式,加速⾏业的数字化进程。
|
||||
天天开源致⼒于打造中国应⽤管理 软件开源⽣态,⾯向医疗、企业、教育三⼤⾏业信息化需求,提供优质的开源软件产品与解决⽅案。平台现已发布OpenHIS、OpenCOM、OpenEDU系列开源产品,并持续招募⽣态合作伙伴,期待共同构建开源创新的⾏业协作模式,加速⾏业的数字化进程。
|
||||
|
||||
天天开源的前⾝是新致开源,最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn,于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉,新致开源品牌更新为天天开源,我们始终秉持开源、专业、协作的理念,致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
|
||||
|
||||
了解我们:https://open.tntlinking.com/about?site=gitee
|
||||
了解我们a:https://open.tntlinking.com/about?site=gitee
|
||||
|
||||
## 💾【部署包下载】
|
||||
|
||||
|
||||
@@ -119,6 +119,12 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
// 初复诊
|
||||
e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo()
|
||||
: EncounterType.INITIAL.getInfo());
|
||||
// 患者标识
|
||||
PatientIdentifier patientIdentifier = patientIdentifierService
|
||||
.getOne(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, e.getId()));
|
||||
if (patientIdentifier != null) {
|
||||
e.setIdentifierNo(patientIdentifier.getIdentifierNo());
|
||||
}
|
||||
|
||||
});
|
||||
return patientMetadataPage;
|
||||
|
||||
@@ -56,4 +56,8 @@ public class PatientMetadata {
|
||||
*/
|
||||
private String firstEnum_enumText;
|
||||
|
||||
/**
|
||||
* 就诊卡号
|
||||
*/
|
||||
private String identifierNo;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,11 @@ public class PatientInfoDto {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String organizationName;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
|
||||
@@ -53,4 +53,13 @@ public interface IPatientInformationService {
|
||||
*/
|
||||
R<?> addPatient(PatientInformationDto patientInformationDto);
|
||||
|
||||
/**
|
||||
* 检查患者是否存在
|
||||
*
|
||||
* @param name 患者姓名
|
||||
* @param idCardNo 身份证号
|
||||
* @return 是否存在
|
||||
*/
|
||||
boolean checkPatientExists(String name, String idCardNo);
|
||||
|
||||
}
|
||||
|
||||
@@ -257,4 +257,14 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"病人信息"}));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPatientExists(String name, String idCardNo) {
|
||||
QueryWrapper<Patient> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("name", name)
|
||||
.eq("id_card", idCardNo)
|
||||
.eq("delete_flag", "0");
|
||||
return patientService.count(queryWrapper) > 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -78,4 +78,16 @@ public class PatientInformationController {
|
||||
.ok(patientInformationService.getPatientInfo(patientInfoSearchParam, searchKey, pageNo, pageSize, request));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查患者是否存在
|
||||
*
|
||||
* @param name 患者姓名
|
||||
* @param idCardNo 身份证号
|
||||
* @return 是否存在
|
||||
*/
|
||||
@GetMapping("/check-exists")
|
||||
public R<?> checkPatientExists(@RequestParam String name, @RequestParam String idCardNo) {
|
||||
return R.ok(patientInformationService.checkPatientExists(name, idCardNo));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class PatientInformationDto {
|
||||
/**
|
||||
* 死亡时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date deceasedDate;
|
||||
|
||||
/**
|
||||
|
||||
@@ -296,6 +296,7 @@ public class IChargeBillServiceImpl implements IChargeBillService {
|
||||
|
||||
ChargeItemDefinition chargeItemDefinition = iChargeItemDefinitionService.getById(definitionId);
|
||||
|
||||
|
||||
YbMedChrgItmType medChrgItmType =
|
||||
YbMedChrgItmType.getByCode(Integer.parseInt(chargeItemDefinition.getYbType()));
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:postgresql://localhost:5432/openhis?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
|
||||
username: postgres
|
||||
password: root
|
||||
url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
|
||||
username: postgresql
|
||||
password: Jchl1528
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
@@ -62,13 +62,13 @@ spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: 172.0.0.0
|
||||
host: 192.168.110.252
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 1
|
||||
# 密码
|
||||
password: redis
|
||||
password: Jchl1528
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
T10.type_code,
|
||||
T10.contract_name,
|
||||
T10.org_id,
|
||||
T10.organization_name,
|
||||
T10.register_time,
|
||||
T10.reception_time,
|
||||
T10.practitioner_user_id,
|
||||
|
||||
@@ -85,33 +85,33 @@
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
<!-- <build>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <fork>true</fork> <!– 如果没有该配置,devtools不会生效 –>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-war-plugin</artifactId>-->
|
||||
<!-- <version>${maven-war-plugin.version}</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <failOnMissingWebXml>false</failOnMissingWebXml>-->
|
||||
<!-- <warName>${project.artifactId}</warName>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
||||
<!-- </build>-->
|
||||
|
||||
</project>
|
||||
37
openhis-ui-vue3/.env.spug
Normal file
37
openhis-ui-vue3/.env.spug
Normal file
@@ -0,0 +1,37 @@
|
||||
# 开发环境:本地只启动前端项目,依赖开发环境(后端、APP)
|
||||
|
||||
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://192.168.110.252'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER=false
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE=false
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP=true
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist-spug
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=false
|
||||
|
||||
# GoView域名
|
||||
VITE_GOVIEW_URL='http://127.0.0.1:3000'
|
||||
@@ -9,7 +9,8 @@
|
||||
"dev": "vite",
|
||||
"build:prod": "vite build",
|
||||
"build:stage": "vite build --mode staging",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"build:spug": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode spug"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
BIN
openhis-ui-vue3/src/assets/logo/LOGO.jpg
Normal file
BIN
openhis-ui-vue3/src/assets/logo/LOGO.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
@@ -44,6 +44,9 @@ import TreeSelect from '@/components/TreeSelect'
|
||||
// 字典标签组件
|
||||
import DictTag from '@/components/DictTag'
|
||||
|
||||
// 导入请求工具
|
||||
import request from './utils/request'
|
||||
|
||||
import { ElDialog, ElMessage } from 'element-plus';
|
||||
|
||||
import {registerComponents} from './template';
|
||||
@@ -64,6 +67,9 @@ app.config.globalProperties.handleTree = handleTree
|
||||
app.config.globalProperties.addDateRange = addDateRange
|
||||
app.config.globalProperties.selectDictLabel = selectDictLabel
|
||||
app.config.globalProperties.selectDictLabels = selectDictLabels
|
||||
|
||||
// 全局挂载请求实例
|
||||
app.config.globalProperties.$http = request
|
||||
// 全局组件挂载
|
||||
app.component('DictTag', DictTag)
|
||||
app.component('Pagination', Pagination)
|
||||
|
||||
@@ -3,6 +3,10 @@ export default {
|
||||
* 网页标题
|
||||
*/
|
||||
title: import.meta.env.VITE_APP_TITLE,
|
||||
/**
|
||||
* 系统名称
|
||||
*/
|
||||
systemName: import.meta.env.VITE_APP_SYSTEM_NAME || 'XXX医院信息管理系统',
|
||||
/**
|
||||
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
|
||||
*/
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="busNo">
|
||||
<el-input v-model="form.busNo" placeholder="请输入项目编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
@@ -356,7 +361,7 @@ const diagnosisTreatmentList = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
// busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
// statusEnum: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
||||
categoryCode: [{ required: true, message: '诊疗目录不能为空', trigger: 'blur' }],
|
||||
@@ -450,6 +455,7 @@ function setValue(row) {
|
||||
form.value = {
|
||||
name: formatValue(row.medicalServiceName), //医疗服务项目名称
|
||||
ybNo: formatValue(row.medicalCatalogCode), // 医保编码
|
||||
busNo: formatValue(row.medicalCatalogCode), // 项目编码使用医保编码
|
||||
categoryCode: props.currentCategoryEnum,
|
||||
// chrgitmLv: formatValue(
|
||||
// row.insuranceClass == '甲' ? '1' : row.insuranceClass == '乙' ? '2' : '3'
|
||||
|
||||
@@ -80,6 +80,19 @@
|
||||
<el-input v-model="form.countryCode" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出生日期" prop="birthDate">
|
||||
<el-date-picker
|
||||
v-model="form.birthDate"
|
||||
type="date"
|
||||
placeholder="请选择出生日期"
|
||||
format="YYYY年MM月DD日"
|
||||
:disabled="isViewMode"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="handleBirthDateChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-col :span="6">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
@@ -109,8 +122,11 @@
|
||||
<el-input
|
||||
v-model="form.age"
|
||||
:disabled="isViewMode"
|
||||
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
||||
/>
|
||||
@input="handleAgeInput"
|
||||
placeholder="请输入年龄"
|
||||
>
|
||||
<template #suffix>岁</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -286,19 +302,95 @@ const title = ref('新增患者');
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
|
||||
const validateUniquePatient = (rule, value, callback) => {
|
||||
const { name, idCard } = form.value;
|
||||
// 确保姓名和身份证都已填写且身份证为18位
|
||||
if (!name || !idCard || idCard.length !== 18) {
|
||||
return callback(); // 不满足条件,不校验
|
||||
}
|
||||
|
||||
// 使用 axios 直接请求,避免依赖 proxy.$http
|
||||
import('@/utils/request').then(({ default: request }) => {
|
||||
request({
|
||||
url: '/patient-manage/information/check-exists',
|
||||
method: 'get',
|
||||
params: {
|
||||
name: name,
|
||||
idCardNo: idCard
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 200 && res.data === true) {
|
||||
callback(new Error('该患者档案已存在!'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('校验患者是否存在失败:', error);
|
||||
callback(); // 出错时不阻塞表单
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 身份证号码校验函数
|
||||
const validateIdCard = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
// 18位身份证正则
|
||||
const reg = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/;
|
||||
if (!reg.test(value)) {
|
||||
return callback(new Error('请输入正确的18位身份证号码'));
|
||||
}
|
||||
|
||||
// 校验码验证(第18位)
|
||||
const factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
|
||||
const parity = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];
|
||||
let sum = 0;
|
||||
for (let i = 0; i < 17; i++) {
|
||||
sum += parseInt(value.charAt(i)) * factor[i];
|
||||
}
|
||||
const last = parity[sum % 11];
|
||||
if (last !== value.charAt(17).toUpperCase()) {
|
||||
return callback(new Error('身份证校验码错误'));
|
||||
}
|
||||
|
||||
callback(); // 校验通过
|
||||
}
|
||||
|
||||
|
||||
const data = reactive({
|
||||
isViewMode: false,
|
||||
form: {
|
||||
typeCode: '08',
|
||||
birthDate: undefined,
|
||||
age: undefined,
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '姓名不能为空', trigger: 'change' }],
|
||||
name: [{ required: true, message: '姓名不能为空', trigger: 'change' },
|
||||
{ validator: validateUniquePatient, trigger: 'blur' }
|
||||
],
|
||||
genderEnum: [{ required: true, message: '请选择性别', trigger: 'change' }],
|
||||
age: [{ required: true, message: '年龄不能为空', trigger: 'change' }],
|
||||
phone: [{ required: true, message: '联系方式不能为空', trigger: 'change' }],
|
||||
identifierNo: [{ required: true, message: '就诊卡号不能为空', trigger: 'change' }],
|
||||
idCard: [
|
||||
{ required: true, message: '证件号码不能为空', trigger: 'change' },
|
||||
{ validator: validateIdCard, trigger: 'blur' },
|
||||
{ validator: validateUniquePatient, trigger: 'blur' }
|
||||
],
|
||||
birthDate: [{ required: false, message: '请选择出生日期', trigger: 'change' }],
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const { queryParams, form, rules, isViewMode } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
@@ -308,6 +400,46 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
// 处理出生日期变化,自动计算年龄
|
||||
function handleBirthDateChange() {
|
||||
if (form.value.birthDate) {
|
||||
const birthDate = new Date(form.value.birthDate);
|
||||
const today = new Date();
|
||||
|
||||
let age = today.getFullYear() - birthDate.getFullYear();
|
||||
const monthDiff = today.getMonth() - birthDate.getMonth();
|
||||
|
||||
// 计算精确年龄
|
||||
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
|
||||
age--;
|
||||
}
|
||||
|
||||
form.value.age = age;
|
||||
}
|
||||
}
|
||||
|
||||
// 处理年龄输入,自动计算出生日期
|
||||
function handleAgeInput() {
|
||||
// 提取数字部分
|
||||
const ageMatch = form.value.age.match(/\d+/);
|
||||
if (ageMatch) {
|
||||
const age = parseInt(ageMatch[0]);
|
||||
// 移除非数字字符,保留数字和可能的单位
|
||||
form.value.age = age ;
|
||||
|
||||
// 计算出生日期
|
||||
const today = new Date();
|
||||
const birthYear = today.getFullYear() - age;
|
||||
const birthMonth = today.getMonth();
|
||||
const birthDay = today.getDate();
|
||||
|
||||
const birthDate = new Date(birthYear, birthMonth, birthDay);
|
||||
|
||||
// 格式化为YYYY-MM-DD
|
||||
const formattedBirthDate = birthDate.toISOString().split('T')[0];
|
||||
form.value.birthDate = formattedBirthDate;
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => form.value.idCard,
|
||||
(newIdCard) => {
|
||||
@@ -315,7 +447,8 @@ watch(
|
||||
const birthYear = parseInt(newIdCard.substring(6, 10));
|
||||
const birthMonth = parseInt(newIdCard.substring(10, 12));
|
||||
const birthDay = parseInt(newIdCard.substring(12, 14));
|
||||
|
||||
// 设置出生日期
|
||||
form.value.birthDate = `${birthYear}-${birthMonth.toString().padStart(2, '0')}-${birthDay.toString().padStart(2, '0')}`;
|
||||
const today = new Date();
|
||||
const currentYear = today.getFullYear();
|
||||
const currentMonth = today.getMonth() + 1;
|
||||
@@ -331,7 +464,7 @@ watch(
|
||||
age--;
|
||||
}
|
||||
|
||||
form.value.age = age;
|
||||
form.value.age = age ;
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -424,6 +557,7 @@ function reset() {
|
||||
maritalStatusEnum: undefined,
|
||||
busNo: undefined,
|
||||
organizationId: undefined,
|
||||
birthDate: undefined,
|
||||
};
|
||||
proxy.resetForm('patientRef');
|
||||
}
|
||||
|
||||
@@ -49,9 +49,12 @@
|
||||
label="年龄"
|
||||
align="center"
|
||||
key="age"
|
||||
prop="age"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.age ? `${scope.row.age}岁` : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
|
||||
@@ -7,10 +7,15 @@
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="就诊卡号" align="center" prop="identifierNo" />
|
||||
<el-table-column label="性别" align="center" prop="genderEnum_enumText" />
|
||||
<el-table-column label="证件号" align="center" prop="idCard" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<el-table-column label="年龄" align="center" prop="age" />
|
||||
<el-table-column label="年龄" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.age ? `${scope.row.age}` : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<el-form :model="form" :rules="rules" ref="outpatientRegistrationRef" label-width="110px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="病历号/姓名:" prop="searchKey">
|
||||
<el-form-item label="患者身份信息:" prop="searchKey">
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
@@ -22,7 +22,7 @@
|
||||
@blur="handleBlur"
|
||||
@input="handleSearchPatient"
|
||||
v-model="form.searchKey"
|
||||
placeholder="请输入姓名/拼音/身份证"
|
||||
placeholder="请输入姓名/身份证/就诊卡号"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
@@ -88,8 +88,8 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="卡号:" prop="card">
|
||||
<el-input v-model="form.card" placeholder="" :disabled="true" />
|
||||
<el-form-item label="就诊卡号:" prop="card">
|
||||
<el-input v-model="form.identifierNo" placeholder="" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -439,7 +439,11 @@
|
||||
prop="patientName"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column label="年龄" align="center" key="age" prop="age" width="120" />
|
||||
<el-table-column label="年龄" align="center" key="age" prop="age" width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.age ? `${scope.row.age}岁` : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="患者性别"
|
||||
align="center"
|
||||
@@ -1235,6 +1239,7 @@ function selsectPatient(row) {
|
||||
form.value.phone = row.phone;
|
||||
form.value.firstEnum_enumText = row.firstEnum_enumText;
|
||||
form.value.age = row.age;
|
||||
form.value.identifierNo = row.identifierNo;
|
||||
}
|
||||
|
||||
// 设置新增参数
|
||||
|
||||
@@ -67,7 +67,7 @@ import { throttle } from 'lodash-es';
|
||||
const props = defineProps({
|
||||
adviceQueryParams: {
|
||||
type: Object,
|
||||
default: '',
|
||||
required: true
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
@@ -97,39 +97,25 @@ const throttledGetList = throttle(
|
||||
watch(
|
||||
() => props.adviceQueryParams,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
// queryParams.value.adviceType = newValue.adviceType;
|
||||
console.log('adviceBaseList 接收到参数变化:', newValue);
|
||||
|
||||
// 直接更新查询参数
|
||||
queryParams.value.searchKey = newValue.searchKey || '';
|
||||
|
||||
// 处理类型筛选
|
||||
if (newValue.adviceType) {
|
||||
queryParams.value.adviceTypes = [newValue.adviceType].join(',');
|
||||
// 单个类型
|
||||
queryParams.value.adviceTypes = newValue.adviceType.toString();
|
||||
} else {
|
||||
// 全部类型
|
||||
queryParams.value.adviceTypes = '1,2,3';
|
||||
}
|
||||
throttledGetList();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.organizationId = props.patientInfo.orgId;
|
||||
getAdviceBaseInfo(queryParams.value).then((res) => {
|
||||
console.log('ssssssssss', res.data.records);
|
||||
if (res.data.records.length > 0) {
|
||||
adviceBaseList.value = res.data.records.filter((item) => {
|
||||
if (item.adviceType == 1 || item.adviceType == 2) {
|
||||
return handleQuantity(item) != 0;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
total.value = res.data.total;
|
||||
nextTick(() => {
|
||||
currentIndex.value = 0;
|
||||
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log('发送请求参数:', queryParams.value);
|
||||
getList();
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
// 从priceList列表中获取价格
|
||||
function getPriceFromInventory(row) {
|
||||
if (row.priceList && row.priceList.length > 0) {
|
||||
@@ -138,6 +124,38 @@ function getPriceFromInventory(row) {
|
||||
}
|
||||
return '-';
|
||||
}
|
||||
function getList() {
|
||||
queryParams.value.organizationId = props.patientInfo.orgId;
|
||||
|
||||
console.log('发送API请求:', queryParams.value);
|
||||
|
||||
getAdviceBaseInfo(queryParams.value).then((res) => {
|
||||
if (res.data.records && res.data.records.length > 0) {
|
||||
adviceBaseList.value = res.data.records.filter((item) => {
|
||||
if (item.adviceType == 1 || item.adviceType == 2) {
|
||||
return handleQuantity(item) != 0;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
console.log('过滤后数据显示:', adviceBaseList.value.length, '条');
|
||||
|
||||
total.value = res.data.total;
|
||||
nextTick(() => {
|
||||
currentIndex.value = 0;
|
||||
if (adviceBaseList.value.length > 0) {
|
||||
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
adviceBaseList.value = [];
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取数据失败:', error);
|
||||
adviceBaseList.value = [];
|
||||
});
|
||||
}
|
||||
// 处理键盘事件
|
||||
const handleKeyDown = (event) => {
|
||||
const key = event.key;
|
||||
|
||||
@@ -162,10 +162,17 @@ function removeDiagnosis(row, index) {
|
||||
}
|
||||
|
||||
function save() {
|
||||
// 为每个诊断项添加诊断医生和诊断时间
|
||||
const diagnosisChildList = tcmDiagonsisSaveList.value.map(item => ({
|
||||
...item,
|
||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || '',
|
||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||
}));
|
||||
|
||||
saveTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
||||
diagnosisChildList: diagnosisChildList,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<el-form :model="form" :rules="rules" ref="formRef">
|
||||
<el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650">
|
||||
<el-table-column label="序号" type="index" width="50" />
|
||||
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="180">
|
||||
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="120">
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
|
||||
@@ -99,7 +99,7 @@
|
||||
>
|
||||
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
|
||||
<el-option
|
||||
v-for="item in med_type"
|
||||
v-for="item in diag_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -135,9 +135,13 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
|
||||
|
||||
<el-table-column label="诊断医生" align="center" prop="diagnosisDoctor" width="120" />
|
||||
<el-table-column label="诊断时间" align="center" prop="diagnosisTime" width="150" />
|
||||
<el-table-column label="诊断代码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag" width="120">
|
||||
<template #default="scope">
|
||||
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
|
||||
<el-checkbox
|
||||
label="主诊断"
|
||||
:trueLabel="1"
|
||||
@@ -150,7 +154,7 @@
|
||||
<el-select
|
||||
v-model="scope.row.verificationStatusEnum"
|
||||
placeholder=" "
|
||||
style="width: 40%; padding-bottom: 5px; padding-left: 10px"
|
||||
style="width: 100%; padding-bottom: 5px; padding-left: 10px"
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
@@ -160,6 +164,7 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="130">
|
||||
@@ -192,6 +197,7 @@
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {
|
||||
getConditionDefinitionInfo,
|
||||
saveDiagnosis,
|
||||
@@ -228,7 +234,8 @@ const props = defineProps({
|
||||
});
|
||||
const emits = defineEmits(['diagnosisSave']);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { med_type } = proxy.useDict('med_type');
|
||||
const userStore = useUserStore();
|
||||
const { diag_type } = proxy.useDict('diag_type');
|
||||
const rules = ref({
|
||||
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
|
||||
@@ -244,27 +251,45 @@ watch(
|
||||
);
|
||||
|
||||
function getDetail(encounterId) {
|
||||
if (!encounterId) {
|
||||
console.warn('未提供有效的就诊ID,无法获取病历详情');
|
||||
return;
|
||||
}
|
||||
|
||||
getEmrDetail(encounterId).then((res) => {
|
||||
allowAdd.value = res.data ? true : false;
|
||||
});
|
||||
}
|
||||
|
||||
function getList() {
|
||||
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||
console.warn('患者就诊信息不完整,无法获取诊断数据');
|
||||
return;
|
||||
}
|
||||
|
||||
getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
form.value.diagnosisList = res.data;
|
||||
// 为每个诊断项添加默认的诊断医生和时间(如果不存在)
|
||||
form.value.diagnosisList = res.data.map(item => ({
|
||||
...item,
|
||||
diagnosisDoctor: item.diagnosisDoctor || props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||
diagnosisTime: item.diagnosisTime || new Date().toLocaleString('zh-CN')
|
||||
}));
|
||||
emits('diagnosisSave', false);
|
||||
console.log(form.value.diagnosisList);
|
||||
}
|
||||
});
|
||||
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.illness.length > 0) {
|
||||
if (res.data.illness && res.data.illness.length > 0 && res.data.symptom) {
|
||||
res.data.illness.forEach((item, index) => {
|
||||
form.value.diagnosisList.push({
|
||||
name: item.name + '-' + res.data.symptom[index].name,
|
||||
name: item.name + '-' + (res.data.symptom[index]?.name || ''),
|
||||
ybNo: item.ybNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -272,6 +297,7 @@ function getList() {
|
||||
console.log(form.value.diagnosisList);
|
||||
}
|
||||
});
|
||||
|
||||
getTree();
|
||||
}
|
||||
|
||||
@@ -285,21 +311,28 @@ function init() {
|
||||
}
|
||||
|
||||
function handleImport() {
|
||||
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||
console.warn('患者就诊信息不完整,无法导入慢性病信息');
|
||||
return;
|
||||
}
|
||||
|
||||
if (props.patientInfo.contractName != '自费') {
|
||||
// 获取患者慢性病信息
|
||||
getChronicDisease({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.data.length > 0) {
|
||||
if (res.data && res.data.length > 0) {
|
||||
res.data.forEach((item, index) => {
|
||||
form.value.diagnosisList.push({
|
||||
...item,
|
||||
...{
|
||||
medTypeCode: '140104',
|
||||
verificationStatusEnum: 4,
|
||||
definitionId: item.id,
|
||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||
iptDiseTypeCode: 2,
|
||||
diagnosisDesc: '',
|
||||
},
|
||||
...item,
|
||||
...{
|
||||
medTypeCode: '140104',
|
||||
verificationStatusEnum: 4,
|
||||
definitionId: item.id,
|
||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||
iptDiseTypeCode: 2,
|
||||
diagnosisDesc: '',
|
||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -342,7 +375,8 @@ const filterNode = (value, data) => {
|
||||
* 获取诊断树列表
|
||||
*/
|
||||
function getTree() {
|
||||
getConditionDefinitionInfo(props.patientInfo ? props.patientInfo.patientId : '').then((res) => {
|
||||
const patientId = props.patientInfo?.patientId || '';
|
||||
getConditionDefinitionInfo(patientId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
let list = [];
|
||||
list = res.data.patientHistoryList;
|
||||
@@ -391,6 +425,8 @@ function handleAddDiagnosis() {
|
||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||
iptDiseTypeCode: 2,
|
||||
diagnosisDesc: '',
|
||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||
});
|
||||
if (form.value.diagnosisList.length == 1) {
|
||||
form.value.diagnosisList[0].maindiseFlag = 1;
|
||||
@@ -537,6 +573,8 @@ function handleNodeClick(data) {
|
||||
medTypeCode: '11',
|
||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||
definitionId: data.definitionId,
|
||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||
});
|
||||
if (form.value.diagnosisList.length == 1) {
|
||||
form.value.diagnosisList[0].maindiseFlag = 1;
|
||||
|
||||
@@ -15,7 +15,42 @@
|
||||
</el-button> -->
|
||||
</div>
|
||||
<div style="max-height: 650px; overflow-y: auto; overflow-x: hidden">
|
||||
<div style="text-align: center; font-size: 18px; font-weight: bold; margin-bottom: 10px;">
|
||||
{{ visitType === 'FIRST' ? '门诊初诊病历' : '门诊复诊病历' }}
|
||||
</div>
|
||||
<el-form ref="emrRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row :gutter="4">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="就诊卡号" prop="patientId" style="width: 100%">
|
||||
<el-input placeholder="" v-model="patientInfo.patientId" class="input-with-bottom-border"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名" prop="patientName" style="width: 100%">
|
||||
<el-input placeholder="" v-model="patientInfo.patientName" class="input-with-bottom-border"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别" prop="genderEnum_enumText" style="width: 100%">
|
||||
<el-input placeholder="" v-model="patientInfo.genderEnum_enumText" class="input-with-bottom-border"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="年龄" prop="age" style="width: 100%">
|
||||
<el-input placeholder="" v-model="patientInfo.age" class="input-with-bottom-border"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="就诊日期" prop="currentVisitDate" style="width: 100%">
|
||||
<el-input placeholder="" v-model="currentVisitDate" class="input-with-bottom-border"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="就诊科室" prop="organizationName" style="width: 100%">
|
||||
<el-input placeholder="" v-model="patientInfo.organizationName" class="input-with-bottom-border"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="身高" prop="height" style="width: 100%">
|
||||
@@ -168,6 +203,20 @@ import { saveEmr, getEmrDetail, saveEmrTemplate } from '../api';
|
||||
import emrTemplate from '../emr/emrtemplate.vue';
|
||||
import emrhistory from '../emr/emrhistory.vue';
|
||||
|
||||
import { ref, computed } from 'vue';
|
||||
|
||||
// 2. 当前就诊日期(默认为当前时间)
|
||||
const currentVisitDate = computed(() => {
|
||||
return new Date().toLocaleString('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
});
|
||||
});
|
||||
|
||||
const form = ref({});
|
||||
const emrTitle = ref('');
|
||||
const radio = ref(1);
|
||||
@@ -184,6 +233,10 @@ const props = defineProps({
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
visitType: { // ✅ 接收父组件传来的值
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
|
||||
@@ -10,23 +10,15 @@
|
||||
<el-table
|
||||
ref="emrHistoryRef"
|
||||
:data="emrHistory"
|
||||
row-key="patientId"
|
||||
highlight-current-row
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<!-- @cell-click="clickRow" -->
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="主诉" align="left" prop="name" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="时间" align="center" prop="createTime" width="180" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="主诉" align="left" prop="name" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="时间" align="center" prop="createTime" width="180" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" width="80">
|
||||
<template #default="scope">
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
@click.stop="handelDetail(scope.row)"
|
||||
>详情
|
||||
</el-button> -->
|
||||
<el-button link type="primary" @click.stop="clickRow(scope.row)">复用 </el-button>
|
||||
<el-button link type="primary" @click.stop="clickRow(scope.row)">复用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -43,6 +35,7 @@
|
||||
<script setup>
|
||||
import { formatDate, formatDateymd } from '@/utils/index';
|
||||
import { getEmrHistoryList } from '../api';
|
||||
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -51,13 +44,19 @@ const queryParams = ref({
|
||||
const selectRow = ref({});
|
||||
const emrHistory = ref([]);
|
||||
const emits = defineEmits(['selectRow']);
|
||||
const emrHistoryRef = ref(null);
|
||||
const selectedRows = ref([]);
|
||||
|
||||
const total = ref(0);
|
||||
|
||||
getList();
|
||||
|
||||
function getList() {
|
||||
if (sessionStorage.getItem('patientId')) {
|
||||
queryParams.value.patientId = sessionStorage.getItem('patientId');
|
||||
getEmrHistoryList(queryParams.value).then((res) => {
|
||||
emrHistory.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
emrHistory.value.map((k) => {
|
||||
k.name = JSON.parse(k.contextJson).chiefComplaint;
|
||||
k.createTime = formatDate(k.createTime);
|
||||
@@ -66,6 +65,20 @@ function getList() {
|
||||
}
|
||||
}
|
||||
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRows.value = selection;
|
||||
|
||||
// 如果选择的行数大于1,只保留最后一行
|
||||
if (selection.length > 1) {
|
||||
// 清除所有选择
|
||||
emrHistoryRef.value?.clearSelection();
|
||||
// 只选择最后一行
|
||||
const lastSelected = selection[selection.length - 1];
|
||||
emrHistoryRef.value?.toggleRowSelection(lastSelected, true);
|
||||
selectedRows.value = [lastSelected];
|
||||
}
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
selectRow.value = JSON.parse(row.contextJson);
|
||||
emits('selectRow', selectRow.value);
|
||||
|
||||
@@ -43,7 +43,7 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
// getList();
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.useScopeCode = 1;
|
||||
getEmrTemplateList(queryParams.value).then((res) => {
|
||||
|
||||
@@ -200,6 +200,11 @@ const props = defineProps({
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
encounterId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
@@ -284,14 +289,22 @@ function submit() {
|
||||
...submitForm,
|
||||
diagnosisYbNo: diagnosisYbNo,
|
||||
diagnosisDefinitionId: diagnosisDefinitionId,
|
||||
ambEncounterId: props.patientInfo.encounterId,
|
||||
// 优先使用props.encounterId,确保就诊ID正确传递
|
||||
ambEncounterId: props.encounterId || props.patientInfo.encounterId,
|
||||
patientId: props.patientInfo.patientId,
|
||||
};
|
||||
console.log('提交住院数据:', saveData);
|
||||
handleHospitalization(saveData).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('办理成功');
|
||||
close();
|
||||
} else {
|
||||
console.error('办理失败:', res.msg);
|
||||
proxy.$modal.msgError(res.msg || '办理失败,请检查数据后重试');
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('提交出错:', error);
|
||||
proxy.$modal.msgError('提交请求失败');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -561,9 +561,20 @@
|
||||
(value) => {
|
||||
expandOrder = [];
|
||||
prescriptionList[scope.$index].adviceName = undefined;
|
||||
adviceQueryParams.adviceType = value;
|
||||
}
|
||||
"
|
||||
|
||||
// 直接更新查询参数
|
||||
adviceQueryParams.value.adviceType = value;
|
||||
adviceQueryParams.value.searchKey = '';
|
||||
|
||||
console.log('医嘱类型改变为:', value, '查询参数:', adviceQueryParams.value);
|
||||
|
||||
// 确保弹窗重新打开
|
||||
nextTick(() => {
|
||||
row.showPopover = true;
|
||||
handleFocus(scope.row, scope.$index);
|
||||
});
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in adviceTypeList"
|
||||
@@ -735,7 +746,7 @@ import {
|
||||
getAdviceBaseInfo,
|
||||
getActivityBindDevice,
|
||||
} from '../api';
|
||||
import adviceBaseList from '../advicebaselist';
|
||||
import adviceBaseList from '../adviceBaseList.vue';
|
||||
import { computed, getCurrentInstance, nextTick, watch } from 'vue';
|
||||
import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import OrderGroupDrawer from './orderGroupDrawer';
|
||||
@@ -751,7 +762,10 @@ const prescriptionList = ref([]);
|
||||
const form = ref({
|
||||
prescriptionList: prescriptionList.value,
|
||||
});
|
||||
const adviceQueryParams = ref({});
|
||||
const adviceQueryParams = ref({
|
||||
searchKey: '',
|
||||
adviceType: ''
|
||||
});
|
||||
const rowIndex = ref(-1);
|
||||
const groupIndex = ref(1);
|
||||
const groupIndexList = ref([]);
|
||||
@@ -933,6 +947,9 @@ function handleAddPrescription() {
|
||||
return;
|
||||
}
|
||||
isAdding.value = true;
|
||||
// 重置查询参数
|
||||
adviceQueryParams.value = {};
|
||||
|
||||
// 在数组最前方添加一行,让新增行显示在最上边
|
||||
prescriptionList.value.unshift({
|
||||
uniqueKey: nextId.value++,
|
||||
@@ -979,10 +996,17 @@ function handleDiagnosisChange(item) {
|
||||
function handleFocus(row, index) {
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
// 确保查询参数与当前行类型一致
|
||||
adviceQueryParams.value = {
|
||||
adviceType: row.adviceType || '',
|
||||
searchKey: adviceQueryParams.value.searchKey || ''
|
||||
};
|
||||
}
|
||||
|
||||
function handleBlur(row) {
|
||||
row.showPopover = false;
|
||||
setTimeout(() => {
|
||||
row.showPopover = false;
|
||||
}, 200);
|
||||
}
|
||||
|
||||
function handleChange(value) {
|
||||
@@ -993,6 +1017,8 @@ function handleChange(value) {
|
||||
* 选择药品回调
|
||||
*/
|
||||
function selectAdviceBase(key, row) {
|
||||
// 立即关闭当前弹窗
|
||||
prescriptionList.value[rowIndex.value].showPopover = false;
|
||||
if (row.adviceType == 3) {
|
||||
getActivityBindDevice({ activityId: row.adviceDefinitionId }).then((res) => {
|
||||
if (res.data.activityBindDeviceInfos?.length > 0) {
|
||||
@@ -1096,7 +1122,7 @@ function selectAdviceBase(key, row) {
|
||||
prescriptionList.value[rowIndex.value].orgId = JSON.parse(JSON.stringify(row)).positionId;
|
||||
prescriptionList.value[rowIndex.value].unitPrice = row.priceList[0].price;
|
||||
}
|
||||
expandOrder.value = [key];
|
||||
expandOrder.value = [key];
|
||||
nextTick(() => {
|
||||
if (row.adviceType == 1) {
|
||||
if (row.injectFlag == 1) {
|
||||
@@ -1108,6 +1134,7 @@ function selectAdviceBase(key, row) {
|
||||
inputRefs.value['quantity']?.focus();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function getOrgList() {
|
||||
|
||||
@@ -98,35 +98,36 @@
|
||||
<el-descriptions-item label="医生:" width="150">{{
|
||||
userStore.name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="" width="300">
|
||||
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
||||
完诊
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="handleLeave(patientInfo.encounterId)">
|
||||
暂离
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="handleRefund(patientInfo.encounterId)">
|
||||
退费
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="getEnPrescription(patientInfo.encounterId)"
|
||||
>
|
||||
处方单
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="
|
||||
() => {
|
||||
openDialog = true;
|
||||
}
|
||||
"
|
||||
>
|
||||
办理住院
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="" width="350">
|
||||
<!-- 初诊 / 复诊 按钮 -->
|
||||
<el-radio v-model="visitType" label="FIRST">初诊</el-radio>
|
||||
<el-radio v-model="visitType" label="FOLLOW_UP">复诊</el-radio>
|
||||
|
||||
<!-- 原有按钮 -->
|
||||
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
||||
完诊
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="handleLeave(patientInfo.encounterId)">
|
||||
暂离
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="handleRefund(patientInfo.encounterId)">
|
||||
退费
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="getEnPrescription(patientInfo.encounterId)"
|
||||
>
|
||||
处方单
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="openDialog = true"
|
||||
>
|
||||
办理住院
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div style="padding: 10px">
|
||||
@@ -146,6 +147,7 @@
|
||||
saveStatus = value;
|
||||
}
|
||||
"
|
||||
:visitType="visitType"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="诊断" name="diagnosis">
|
||||
@@ -204,6 +206,7 @@ import {
|
||||
leaveEncounter,
|
||||
completeEncounter,
|
||||
getEnPrescriptionInfo,
|
||||
getEmrHistoryList
|
||||
} from './components/api.js';
|
||||
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
||||
import RefundListDialog from './components/prescription/refundListDialog.vue';
|
||||
@@ -260,6 +263,7 @@ const diagnosisRef = ref();
|
||||
const waitCount = ref(0);
|
||||
const loading = ref(false);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const visitType = ref('');
|
||||
const disabled = computed(() => {
|
||||
return Object.keys(patientInfo.value).length === 0;
|
||||
});
|
||||
@@ -282,7 +286,41 @@ function getPatientList() {
|
||||
});
|
||||
});
|
||||
}
|
||||
function setVisitType(type) {
|
||||
visitType.value = type;
|
||||
}
|
||||
function checkPatientHistory(patient) {
|
||||
// 如果患者没有身份证号,无法判断是否为初诊
|
||||
if (!patient.idCard) {
|
||||
// 默认设置为初诊
|
||||
visitType.value = 'FIRST';
|
||||
return;
|
||||
}
|
||||
|
||||
// 查询患者历史就诊记录
|
||||
const params = {
|
||||
patientId: patient.patientId,
|
||||
idCard: patient.idCard
|
||||
};
|
||||
|
||||
getEmrHistoryList(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
// 如果有历史记录,则为复诊
|
||||
if (res.data && res.data.total > 0) {
|
||||
visitType.value = 'FOLLOW_UP';
|
||||
} else {
|
||||
// 如果没有历史记录,则为初诊
|
||||
visitType.value = 'FIRST';
|
||||
}
|
||||
} else {
|
||||
// 请求失败,默认设置为初诊
|
||||
visitType.value = 'FIRST';
|
||||
}
|
||||
}).catch(() => {
|
||||
// 异常情况,默认设置为初诊
|
||||
visitType.value = 'FIRST';
|
||||
});
|
||||
}
|
||||
function getWaitPatient() {
|
||||
queryParams.value.registerTimeSTime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 00:00:00';
|
||||
queryParams.value.registerTimeETime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59';
|
||||
@@ -341,7 +379,7 @@ function handleOpen() {
|
||||
}
|
||||
|
||||
function handleCardClick(item, index) {
|
||||
currentEncounterId.value = '';
|
||||
currentEncounterId.value = '';
|
||||
// if (item.active) {
|
||||
// patientList.value[index].active = false;
|
||||
// return;
|
||||
@@ -351,6 +389,10 @@ function handleCardClick(item, index) {
|
||||
patient.active = patient.encounterId === item.encounterId;
|
||||
});
|
||||
patientInfo.value = item;
|
||||
|
||||
// 检查患者历史记录以确定初诊/复诊
|
||||
checkPatientHistory(item);
|
||||
|
||||
activeTab.value = 'emr';
|
||||
nextTick(() => {
|
||||
prescriptionRef.value.getListInfo();
|
||||
|
||||
@@ -27,7 +27,11 @@
|
||||
<el-table-column type="index" width="54" align="center" label="序号" />
|
||||
<el-table-column prop="patientName" align="center" label="申请患者" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column prop="age" label="年龄" align="center" />
|
||||
<el-table-column label="年龄" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.age ? `${scope.row.age}岁` : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sourceName" align="center" label="申请来源">
|
||||
<template #default="scope">
|
||||
{{ scope.row.sourceName || '-' }}
|
||||
|
||||
@@ -28,7 +28,11 @@
|
||||
<el-table-column type="index" width="54" align="center" label="序号" />
|
||||
<el-table-column prop="patientName" align="center" label="患者姓名" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" align="center" />
|
||||
<el-table-column prop="age" label="年龄" align="center" />
|
||||
<el-table-column label="年龄" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.age ? `${scope.row.age}岁` : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="requestTime" align="center" label="申请时间" />
|
||||
<el-table-column prop="sourceName" align="center" label="申请来源" />
|
||||
<el-table-column prop="wardName" align="center" label="入院病区" />
|
||||
|
||||
@@ -35,12 +35,14 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input
|
||||
v-model="form.age"
|
||||
:disabled="isViewMode"
|
||||
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-input
|
||||
v-model="form.age"
|
||||
:disabled="isViewMode"
|
||||
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
||||
>
|
||||
<template #suffix>岁</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="卡类别" prop="typeCode">
|
||||
@@ -79,7 +81,9 @@
|
||||
</el-row>
|
||||
<!-- <el-col :span="6">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input v-model="form.age" clearable :disabled="isViewMode"/>
|
||||
<el-input v-model="form.age" clearable :disabled="isViewMode">
|
||||
<template #suffix>岁</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-row>
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref, computed } from 'vue';
|
||||
import BloodTransfusion from './bloodTransfusion.vue';
|
||||
import BloodTransfusion from './bloodTransfusion';
|
||||
import { patientInfo } from '../../../store/patient.js';
|
||||
import Surgery from './surgery.vue';
|
||||
import LaboratoryTests from './LaboratoryTests.vue';
|
||||
import laboratoryTests from './laboratoryTests.vue';
|
||||
import MedicalExaminations from './medicalExaminations.vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([]);
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<!-- 顶部 -->
|
||||
<!-- <div class="el-login-top">
|
||||
<el-image :src="logoNew"></el-image>
|
||||
</div> -->
|
||||
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h1 class="title">医院信息管理系统</h1>
|
||||
<div class="el-login-top">
|
||||
<el-image :src="logoNew"></el-image>
|
||||
</div>
|
||||
<h1 class="title">{{ currentTenantName || settings.systemName }}</h1>
|
||||
<p class="login-subtitle">请使用您的账号密码安全登录系统</p>
|
||||
<el-form-item prop="username">
|
||||
<p class="label">用户名</p>
|
||||
<el-input
|
||||
v-model="loginForm.username"
|
||||
type="text"
|
||||
@@ -21,25 +23,35 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<p class="label">密码</p>
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
type="password"
|
||||
:type="passwordVisible ? 'text' : 'password'"
|
||||
size="large"
|
||||
auto-complete="off"
|
||||
placeholder="密码"
|
||||
@keyup.enter="handleLogin"
|
||||
show-password
|
||||
>
|
||||
<template #prefix
|
||||
><svg-icon icon-class="password" class="el-input__icon input-icon"
|
||||
/></template>
|
||||
<template #suffix>
|
||||
<span
|
||||
class="password-toggle"
|
||||
@click="togglePasswordVisibility"
|
||||
style="cursor: pointer; color: #606266; font-size: 14px; padding: 0 10px;"
|
||||
>
|
||||
{{ passwordVisible ? '隐藏' : '显示' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="tenantId">
|
||||
<p class="label">医疗机构</p>
|
||||
<el-select
|
||||
v-model="loginForm.tenantId"
|
||||
size="large"
|
||||
placeholder="所属医院"
|
||||
placeholder="请选择医疗机构"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
@@ -51,6 +63,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="login-options">
|
||||
<el-checkbox v-model="loginForm.rememberMe" class="remember-me">记住我</el-checkbox>
|
||||
<el-link type="primary" class="forgot-password" @click="handleForgotPassword">忘记密码?</el-link>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item prop="tenantId"> -->
|
||||
<!-- <span class="descriptions-item-label" style="margin: 0 10px 0 0">连接医保</span> -->
|
||||
<!-- <el-switch v-model="loginForm.invokeYb" @change="topNavChange" size="large"/> -->
|
||||
@@ -87,8 +104,17 @@
|
||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div class="footer">
|
||||
© 2025 XXX医院信息系统 | 版本 v2.5.1
|
||||
<!-- 公司版权信息(新增) -->
|
||||
<div class="company-copyright">
|
||||
技术支持:上海经创贺联信息技术有限公司
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<!-- 底部 -->
|
||||
|
||||
<div class="el-login-footer">
|
||||
<div class="el-login-footer-link">
|
||||
<span><el-link :underline="false">his账号用户协议</el-link></span>
|
||||
@@ -109,12 +135,15 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, ref, reactive, computed, onMounted, watch } from 'vue';
|
||||
import settings from '@/settings';
|
||||
import { getCodeImg, sign, getUserBindTenantList } from '@/api/login';
|
||||
import { invokeYbPlugin } from '@/api/public';
|
||||
import Cookies from 'js-cookie';
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import logoNew from '@/assets/logo/logoBlack.png';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import logoNew from '@/assets/logo/LOGO.jpg';
|
||||
const userStore = useUserStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
@@ -131,6 +160,7 @@ const loginForm = ref({
|
||||
});
|
||||
|
||||
const tenantOptions = ref([]);
|
||||
const currentTenantName = ref('');
|
||||
|
||||
const loginRules = {
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
|
||||
@@ -146,6 +176,21 @@ const captchaEnabled = ref(true);
|
||||
// 注册开关
|
||||
const register = ref(false);
|
||||
const redirect = ref(undefined);
|
||||
const passwordVisible = ref(false);
|
||||
|
||||
function togglePasswordVisibility() {
|
||||
passwordVisible.value = !passwordVisible.value;
|
||||
}
|
||||
|
||||
// 处理忘记密码功能
|
||||
function handleForgotPassword() {
|
||||
// 这里可以添加忘记密码的逻辑,例如跳转到忘记密码页面或显示忘记密码弹窗
|
||||
// 目前先显示一个提示
|
||||
ElMessage({
|
||||
message: '忘记密码功能正在开发中',
|
||||
type: 'info'
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
route,
|
||||
@@ -155,7 +200,7 @@ watch(
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
// 页面加载时从 localStorage 获取 invokeYb 的值
|
||||
// 页面加载时从 localStorage 获取 invokeYb 的值和从 Cookies 获取记住的登录信息
|
||||
onMounted(() => {
|
||||
const storedInvokeYb = localStorage.getItem('invokeYb');
|
||||
if (storedInvokeYb !== null) {
|
||||
@@ -164,6 +209,38 @@ onMounted(() => {
|
||||
// 如果 localStorage 中没有值,则设置默认值并保存
|
||||
localStorage.setItem('invokeYb', 'true');
|
||||
}
|
||||
|
||||
// 从 Cookies 中恢复记住的登录信息
|
||||
const rememberMe = Cookies.get('rememberMe');
|
||||
if (rememberMe && rememberMe === 'true') {
|
||||
const username = Cookies.get('username');
|
||||
const password = Cookies.get('password');
|
||||
if (username) {
|
||||
loginForm.value.username = username;
|
||||
loginForm.value.rememberMe = true;
|
||||
// 解密密码
|
||||
if (password) {
|
||||
try {
|
||||
loginForm.value.password = decrypt(password);
|
||||
} catch (e) {
|
||||
console.error('密码解密失败:', e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取医疗机构列表
|
||||
getUserBindTenantList().then((res) => {
|
||||
tenantOptions.value = res.data.map(item => ({
|
||||
label: item.tenantName,
|
||||
value: item.id
|
||||
}));
|
||||
// 如果只有一个医疗机构,自动选中
|
||||
if (tenantOptions.value.length === 1) {
|
||||
loginForm.value.tenantId = tenantOptions.value[0].value;
|
||||
currentTenantName.value = tenantOptions.value[0].label;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function handleLogin() {
|
||||
@@ -279,6 +356,14 @@ function getCode() {
|
||||
});
|
||||
}
|
||||
|
||||
// 监听租户选择变化
|
||||
watch(() => loginForm.value.tenantId, (newTenantId) => {
|
||||
const selectedTenant = tenantOptions.value.find(item => item.value === newTenantId);
|
||||
if (selectedTenant) {
|
||||
currentTenantName.value = selectedTenant.label;
|
||||
}
|
||||
});
|
||||
|
||||
// 切换医保连接开关时更新 localStorage
|
||||
function topNavChange(value) {
|
||||
localStorage.setItem('invokeYb', value.toString());
|
||||
@@ -303,6 +388,7 @@ function getTenantList(username) {
|
||||
label: item.tenantName,
|
||||
}));
|
||||
loginForm.value.tenantId = tenantOptions.value[0].value; //默认选中第一个
|
||||
currentTenantName.value = tenantOptions.value[0].label;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -389,27 +475,81 @@ getCookie();
|
||||
getTenantList(loginForm.value.username);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: auto;
|
||||
min-height: 100vh;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background: #f8f9fa;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100px; /* 为底部固定footer留出空间 */
|
||||
//background-image: url("../assets/images/login-background.jpg");
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
margin: 10px auto 15px auto;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
font-family: 'Microsoft Yahei,STHeiti,Simsun,STSong,Helvetica Neue,Helvetica,Arial,sans-serif';
|
||||
}
|
||||
.label{
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.login-options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 8px 0 10px 0;
|
||||
width: 100%; /* 确保容器占满宽度 */
|
||||
}
|
||||
|
||||
.remember-me {
|
||||
margin: 0;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.forgot-password {
|
||||
font-size: 14px;
|
||||
color: var(--primary);
|
||||
cursor: pointer;
|
||||
text-align: right; /* 确保文本右对齐 */
|
||||
margin-left: auto; /* 确保元素右对齐 */
|
||||
}
|
||||
.footer {
|
||||
margin-top: 32px;
|
||||
font-size: 12px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.login-subtitle {
|
||||
font-size: 14px;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.login-form {
|
||||
border-radius: 6px;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 12px var(--shadow);
|
||||
border: 1px solid var(--border);
|
||||
background: #ffffff;
|
||||
width: 400px;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
padding: 40px;
|
||||
padding: 25px 25px 5px 25px;
|
||||
text-align: center;
|
||||
.el-input {
|
||||
height: 50px; // 修改输入框高度
|
||||
input {
|
||||
@@ -438,24 +578,20 @@ getTenantList(loginForm.value.username);
|
||||
}
|
||||
}
|
||||
.el-login-top {
|
||||
height: 80px;
|
||||
line-height: 40px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
background-color: #f1f1f1;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
margin: 0 auto 10px;
|
||||
.el-image {
|
||||
max-width: 120px;
|
||||
max-height: 120px;
|
||||
}
|
||||
}
|
||||
.el-login-footer {
|
||||
height: 100px;
|
||||
line-height: 40px;
|
||||
height: 80px;
|
||||
line-height: 30px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
@@ -463,8 +599,7 @@ getTenantList(loginForm.value.username);
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
background-color: #f1f1f1;
|
||||
|
||||
color: #000;
|
||||
z-index: 100; /* 确保footer在最上层 */
|
||||
span {
|
||||
margin: 0 10px;
|
||||
}
|
||||
@@ -490,6 +625,13 @@ getTenantList(loginForm.value.username);
|
||||
width: 24px !important; // 调整图标的宽度
|
||||
height: 24px !important; // 调整图标的高度
|
||||
font-size: 24px !important; // 调整图标的字体大小
|
||||
color: #606266 !important; // 确保图标颜色可见
|
||||
cursor: pointer !important; // 确保鼠标悬停时显示指针
|
||||
}
|
||||
|
||||
:deep(.password-toggle) {
|
||||
line-height: 50px !important; // 确保文字垂直居中
|
||||
user-select: none; // 禁止选中文字
|
||||
}
|
||||
:deep(.el-select__wrapper) {
|
||||
background-color: #f5f7fa !important;
|
||||
@@ -498,4 +640,8 @@ getTenantList(loginForm.value.username);
|
||||
font-size: 18px !important;
|
||||
height: 50px !important; // 修改输入框高度
|
||||
}
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 15px !important; // 减小输入框之间的距离
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -183,7 +183,9 @@
|
||||
v-model="form.age"
|
||||
:disabled="isViewMode"
|
||||
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
||||
/>
|
||||
>
|
||||
<template #suffix>岁</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
||||
@@ -69,7 +69,11 @@ import bindUser from "./bindUser";
|
||||
import { getTenantUserPage, unbindTenantUser } from "@/api/system/tenant";
|
||||
// 在 <script setup> 顶部添加导入
|
||||
import { ref, reactive, onMounted } from "vue"; // 补充 onMounted 导入
|
||||
import { useRoute, useRouter } from "vue-router"; // 添加 useRouter 导入
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter(); // 创建 router 实例
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
|
||||
|
||||
@@ -100,8 +104,14 @@ function getList() {
|
||||
}
|
||||
// 返回按钮
|
||||
function handleClose() {
|
||||
const obj = { path: "/system/basicmanage/tenant" };
|
||||
proxy.$tab.closeOpenPage(obj);
|
||||
/* const obj = { path: "/system/basicmanage/tenant" };
|
||||
proxy.$tab.closeOpenPage(obj); 目前先注释掉改成返回上一级页面*/
|
||||
// 先关闭当前标签页
|
||||
const obj={ path: "/system/basicmanage/tenant" };
|
||||
proxy.$tab.closeOpenPage(route).then(() => {
|
||||
// 然后返回上一个页面
|
||||
router.go(-1);
|
||||
});
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
|
||||
Reference in New Issue
Block a user