|
@@ -18,7 +18,7 @@
|
|
|
<template slot="title">
|
|
|
<span>{{year}}年</span>
|
|
|
</template>
|
|
|
- <el-submenu v-for="(days,month) in mouths" :key="month" :index="month.toString()">
|
|
|
+ <el-submenu v-for="(days,month) in mouths" :key="month" :index="year.toString() + month.toString()">
|
|
|
<template slot="title">
|
|
|
<span>{{month}}月</span>
|
|
|
</template>
|
|
@@ -62,7 +62,7 @@
|
|
|
</div>
|
|
|
<!-- 患者亲属 -->
|
|
|
<div class="patient-nk" style="margin-top: 10px">
|
|
|
- <el-table height="calc(75vh - 190px)" width="69vw" :data="nkList">
|
|
|
+ <el-table height="calc(75vh - 270px)" width="67vw" :data="nkList">
|
|
|
<el-table-column label="姓名" align="center" prop="name"></el-table-column>
|
|
|
<el-table-column label="所属关系" align="center" prop="kinship"></el-table-column>
|
|
|
<el-table-column label="近亲地址" align="center" prop="address"></el-table-column>
|
|
@@ -102,7 +102,7 @@
|
|
|
</div>
|
|
|
<!-- 诊断结果列表 -->
|
|
|
<div class="dg" style="margin-top: 10px">
|
|
|
- <el-table width="69vw" height="calc(75vh - 190px)" :data="dgList">
|
|
|
+ <el-table width="67vw" height="calc(75vh - 270px)" :data="dgList">
|
|
|
<el-table-column label="诊断名称" align="center" prop="diagnosticCode"></el-table-column>
|
|
|
<el-table-column label="诊断时间" align="center" prop="diagnosisTime"></el-table-column>
|
|
|
<el-table-column label="诊断类型" align="center" prop="diagnosticType">
|
|
@@ -131,6 +131,10 @@ export default {
|
|
|
data(){
|
|
|
return{
|
|
|
isGrouped: false,
|
|
|
+ year:undefined,
|
|
|
+ month:undefined,
|
|
|
+ day:undefined,
|
|
|
+ id:undefined,
|
|
|
active:1,
|
|
|
timeList:null,
|
|
|
groupedDates: {},
|
|
@@ -158,13 +162,13 @@ export default {
|
|
|
watch:{
|
|
|
},
|
|
|
created() {
|
|
|
- this.activePatient(1);
|
|
|
this.getTime();
|
|
|
+ this.getPatient();
|
|
|
+ this.activePatient(1);
|
|
|
},
|
|
|
methods:{
|
|
|
- async activePatient(sign) {
|
|
|
+ activePatient(sign) {
|
|
|
if (sign === 1) {
|
|
|
- this.getPatient();
|
|
|
this.getNkList();
|
|
|
this.active = sign;
|
|
|
}
|
|
@@ -186,39 +190,43 @@ export default {
|
|
|
},
|
|
|
/** 查询某科室某个病人的就诊记录 */
|
|
|
getTime(){
|
|
|
- this.ajax({
|
|
|
+ console.log("1")
|
|
|
+ this.get({
|
|
|
url:'/work/pv1/list',
|
|
|
data:{
|
|
|
patientId:this.param.id,
|
|
|
department:this.param.department
|
|
|
}
|
|
|
- }).then((response)=>{
|
|
|
+ }).then( (response) => {
|
|
|
this.timeList = response.rows;
|
|
|
this.groupDates(this.timeList);
|
|
|
})
|
|
|
},
|
|
|
- groupDates(dates){
|
|
|
+ groupDates(dates) {
|
|
|
+ console.log("2")
|
|
|
+ console.log(this.isGrouped)
|
|
|
if (this.isGrouped) {
|
|
|
- // 如果已经获取了就诊日期数据,直接返回
|
|
|
return;
|
|
|
}
|
|
|
dates.forEach(date => {
|
|
|
- let year = date.admissionTime.substring(0, 4);
|
|
|
- let month = date.admissionTime.substring(4, 6);
|
|
|
- let day = date.admissionTime.substring(6, 8);
|
|
|
- let id = date.id;
|
|
|
- if (!this.groupedDates[year]) {
|
|
|
- this.groupedDates[year] = {};
|
|
|
+ this.year = date.admissionTime.substring(0, 4);
|
|
|
+ this.month = date.admissionTime.substring(4, 6);
|
|
|
+ this.day = date.admissionTime.substring(6, 8);
|
|
|
+ this.id = date.id;
|
|
|
+ if (!this.groupedDates[this.year]) {
|
|
|
+ this.groupedDates[this.year] = {};
|
|
|
}
|
|
|
- if (!this.groupedDates[year][month]) {
|
|
|
- this.groupedDates[year][month] = [];
|
|
|
+ if (!this.groupedDates[this.year][this.month]) {
|
|
|
+ this.groupedDates[this.year][this.month] = [];
|
|
|
}
|
|
|
- this.groupedDates[year][month].push({id: id, day: day});
|
|
|
+ this.groupedDates[this.year][this.month].push({id: this.id, day: this.day});
|
|
|
})
|
|
|
this.isGrouped = true;
|
|
|
+ this.$forceUpdate();
|
|
|
},
|
|
|
/** 查询患者信息 */
|
|
|
getPatient(){
|
|
|
+ console.log("3")
|
|
|
this.get({
|
|
|
url:'/work/patient/detail/'+this.param.id,
|
|
|
}).then((response)=>{
|
|
@@ -226,19 +234,9 @@ export default {
|
|
|
console.log(this.patientInfo)
|
|
|
})
|
|
|
},
|
|
|
- /** 查询某一次就诊信息 */
|
|
|
- getPvList(){
|
|
|
- this.get({
|
|
|
- url:'/work/pv1/list',
|
|
|
- data:{
|
|
|
- cardId:this.param.cardId
|
|
|
- }
|
|
|
- }).then((response)=>{
|
|
|
- this.pvList = response.rows[0];
|
|
|
- })
|
|
|
- },
|
|
|
/** 查询亲属表 */
|
|
|
getNkList() {
|
|
|
+ console.log("4")
|
|
|
this.get({
|
|
|
url:'/work/nk/list',
|
|
|
data:{
|
|
@@ -252,6 +250,7 @@ export default {
|
|
|
},
|
|
|
/** 查询诊断记录表 */
|
|
|
getDgList(){
|
|
|
+ console.log("5")
|
|
|
this.get({
|
|
|
url:'/work/dg/list',
|
|
|
data:{
|
|
@@ -266,8 +265,3 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
-
|
|
|
-<style scoped lang="scss">
|
|
|
-
|
|
|
-</style>
|