pengjun 2 years ago
parent
commit
daf2891dcc
  1. 4
      src/components/doctorCheck/PatientRegisterBase.vue
  2. 110
      src/components/sumDoctorCheck/SumItems.vue
  3. 1
      src/store/index.js
  4. 7
      src/views/doctorCheck/sumDoctorCheck.vue

4
src/components/doctorCheck/PatientRegisterBase.vue

@ -131,7 +131,8 @@ export default {
console.log(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
getapi(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
.then((res) => {
if (res.code != -1) {
if (res.code != -1) {
this.doctorCheckPrBaseInit()
this.doctorCheck.prBase.patientRegisterNo = val
objCopy(res.data,this.doctorCheck.prBase)
@ -149,6 +150,7 @@ export default {
getapi(`/api/app/patient-register/patient-register-or-patient?SType=2&PatientNo=${val}`)
.then((res) => {
if (res.code != -1) {
console.log('按条码号查个人数据',res.data)
this.doctorCheckPrBaseInit()
this.doctorCheck.prBase.patientNo = val
objCopy(res.data,this.doctorCheck.prBase)

110
src/components/sumDoctorCheck/SumItems.vue

@ -0,0 +1,110 @@
<template>
<div style="display: flex;width:100%;">
<el-table :data="tableData" width="1000px" height="680" border :row-style="{ height: '40px' }" >
<el-table-column prop="itemTypeName" label="项目" width="150"/>
<el-table-column v-for="(item,index) of tableCols" :label="item" :prop="item" :key="index" width="200">
</el-table-column>
</el-table>
</div>
</template>
<script lang="ts">
import { mapState } from 'vuex';
import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj } from '@/utlis/proFunc';
export default {
components: {},
data() {
return {
orgData:[], //
tableData:[], //
tableRows:[], //
tableCols:[], //
};
},
created() { },
//
mounted() {
},
computed: {
...mapState(['dict', 'doctorCheck', 'sumDoctorCheck']),
},
methods: {
// 3a0c6589-9989-4d7f-ba54-61e5b0138220
SumItems(patientId) {
console.log(`/api/app/sum-summary-report/item-type-contrast-list/${patientId}`)
getapi(`/api/app/sum-summary-report/item-type-contrast-list/${patientId}`)
.then((res) => {
console.log("获取项目对比 SumItems", res.data);
if (res.code != -1) {
this.orgData = res.data;
this.crossTable(this.orgData);
}
})
.catch((err) => {
this.$message({ type: "error", message: `操作失败,原因:${err}` });
});
},
//
// "itemTypeName": "",
// "registerDate": "2023-07-14",
// "summarys": ":"
crossTable(tableData){
this.tableData=[] //
this.tableRows=[] //
this.tableCols=[] //
console.log('tableData',tableData)
tableData.forEach(e => {
if(this.tableRows.indexOf(e.itemTypeName) == - 1) this.tableRows.push(e.itemTypeName)
if(this.tableCols.indexOf(e.registerDate) == - 1) this.tableCols.push(e.registerDate)
});
this.tableCols.sort();
this.tableRows.forEach(r => {
let item = {}
let summarys = ''
item['itemTypeName'] = r
this.tableCols.forEach(c => {
for(let i=0;i<tableData.length;i++){
if(tableData[i].itemTypeName == r && tableData[i].registerDate == c){
summarys = tableData[i].summarys
break;
}
}
item[c] = summarys
});
this.tableData.push(item)
});
console.log('this.tableRows',this.tableRows)
console.log('this.tableCols',this.tableCols)
console.log('this.tableData',this.tableData)
}
},
//
watch: {
//
"sumDoctorCheck.sumPREdit.patientId"(newVal, oldVal) {
console.log("watch sumDoctorCheck.sumPREdit.patientId newVal:", newVal, " oldVal:", oldVal);
if (newVal != oldVal && newVal != '') {
this.SumItems(newVal)
}
},
},
};
</script>
<style scoped>
::v-deep .el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
padding: 0;
}
</style>

1
src/store/index.js

@ -236,6 +236,7 @@ export default new Vuex.Store({
auditDoctor:'', //审核医生
auditDate:'', //审核日期
isLock:'', //锁定状态
patientId:'', //人员档案ID
} //人员体检登记显示基本信息
},
},

7
src/views/doctorCheck/sumDoctorCheck.vue

@ -25,7 +25,7 @@
</el-tab-pane>
<el-tab-pane label="项目对比" name="4">
<SumItems/>
</el-tab-pane>
<el-tab-pane label="横向对比" name="5">
@ -47,12 +47,10 @@ import { tcdate } from "../../utlis/proFunc";
import PatientRegisterBase from "../../components/doctorCheck/PatientRegisterBase.vue";
import ButtonList from "../../components/sumDoctorCheck/ButtonList.vue";
import SumSug from "../../components/sumDoctorCheck/SumSug.vue";
import SumPREdit from "../../components/sumDoctorCheck/SumPREdit.vue";
import CheckDetails from "../../components/sumDoctorCheck/CheckDetails.vue";
import SumItems from "../../components/sumDoctorCheck/SumItems.vue";
export default {
components: {
PatientRegisterBase,
@ -60,6 +58,7 @@ export default {
SumSug,
SumPREdit,
CheckDetails,
SumItems,
},
data() {
return {

Loading…
Cancel
Save