|
|
|
@ -1,18 +1,24 @@ |
|
|
|
<template> |
|
|
|
<div style="padding: 0 5px;"> |
|
|
|
<div> |
|
|
|
<el-select v-model="asbItemId" placeholder="快速选择诊断疾病" size="small" filterable clearable remote automatic-dropdown |
|
|
|
:remote-method="remoteMethod" @change="quickChoosedAsb" default-first-option ref="asbItemId" |
|
|
|
<el-select v-model="diagnosis" placeholder="快速选择诊断疾病" size="small" filterable clearable remote automatic-dropdown |
|
|
|
:remote-method="remoteMethod" @change="quickChoosedDiag" default-first-option ref="diagnosises" value-key="id" |
|
|
|
style="width:250px;text-align: left;padding-right: 15px;"> |
|
|
|
<el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" /> |
|
|
|
<el-option v-for="item in diagnosisesCur" :key="item.id" :value="item" :label="item.displayName" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-table :data="report.dataAsbitemOCX" :height="window.pageHeight - 110 " width="100%" @row-dblclick="removeAbs" |
|
|
|
@selection-change="selecteditems" size="small"> |
|
|
|
<el-table :data="sumDoctorCheck.diagnosisList" :height="window.pageHeight - 110" width="100%" size="small"> |
|
|
|
<!-- temporaryselection personnelUnit.nogroupselected--> |
|
|
|
<!-- |
|
|
|
"patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
"diagnosisId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
"sumSuggestionHeaderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
"displayOrder": 0, |
|
|
|
"diagnosisName": "string" |
|
|
|
--> |
|
|
|
<el-table-column type="index" label="序号" align="center" width="60" /> |
|
|
|
<el-table-column label="诊断疾病" width="160" prop="displayName" /> |
|
|
|
<el-table-column label="诊断疾病" width="160" prop="diagnosisName" /> |
|
|
|
<el-table-column fixed="right" label="操作" width="60"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<i class="el-icon-delete" @click="deleteRow(scope.$index)" |
|
|
|
@ -27,82 +33,139 @@ |
|
|
|
import moment from "moment"; |
|
|
|
import { mapState, mapMutations } from "vuex"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc"; |
|
|
|
import { dddw, objCopy, arrayReduce, deepCopy } from "@/utlis/proFunc"; |
|
|
|
|
|
|
|
|
|
|
|
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue"; |
|
|
|
import Camera from "../../components/patientRegister/Camera.vue"; |
|
|
|
import CusOrgOCX from "../../components/report/CusOrgOCX.vue" |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
PatientRegisterEdit, |
|
|
|
Camera, |
|
|
|
CusOrgOCX, |
|
|
|
|
|
|
|
}, |
|
|
|
props: ['win'], |
|
|
|
props: ['patientRegisterId'], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dataList: [], //列表数据 |
|
|
|
multipleSelection: [], //选中的数据列表 |
|
|
|
dialogVisible: false, |
|
|
|
dialogCamera: false, |
|
|
|
|
|
|
|
diagnosis: "", |
|
|
|
diagnosisesCur: [], //疾病列表数据 |
|
|
|
diagnosisesAll: [], //疾病列表数据 |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
created() { }, |
|
|
|
created() { |
|
|
|
this.dictInit(); |
|
|
|
this.getDiagnosisList(this.patientRegisterId); |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { }, |
|
|
|
computed: { |
|
|
|
...mapState(["window", "dict", "patientRegister", "customerOrg", "doctorCheck", "sumDoctorCheck","report"]), |
|
|
|
...mapState(["window", "dict", "patientRegister", "customerOrg", "doctorCheck", "sumDoctorCheck", "report"]), |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
dictInit() { |
|
|
|
postapi('/api/app/diagnosis/getlistinsuggestion', {}).then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.diagnosisesCur = res.data |
|
|
|
this.diagnosisesAll = res.data |
|
|
|
//过滤已选的诊断 |
|
|
|
this.filterDiagnosises() |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//查询 |
|
|
|
query() { |
|
|
|
let body = {} |
|
|
|
|
|
|
|
console.log(`this.patientRegister.query`, this.patientRegister.query) |
|
|
|
|
|
|
|
if (this.patientRegister.query.customerOrgFlag) { |
|
|
|
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId[0] |
|
|
|
//快速选择组合项目时,调整可按拼间简码及简称查找 |
|
|
|
remoteMethod(keyWords) { |
|
|
|
//console.log('remoteMethod',this.dict.asbItemQuick) |
|
|
|
if (keyWords) { |
|
|
|
this.diagnosisesCur = []; |
|
|
|
this.diagnosisesAll.forEach(item => { |
|
|
|
if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
|
|
|
|| item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) { |
|
|
|
this.diagnosisesCur.push(item); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.diagnosisesCur = deepCopy(this.diagnosisesAll) |
|
|
|
} |
|
|
|
|
|
|
|
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex |
|
|
|
//过滤已选的诊断 |
|
|
|
this.filterDiagnosises() |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName |
|
|
|
}, |
|
|
|
|
|
|
|
if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag |
|
|
|
//过滤已选诊断的 |
|
|
|
filterDiagnosises(){ |
|
|
|
let sumDiagnosises = deepCopy(this.sumDoctorCheck.diagnosisList) |
|
|
|
sumDiagnosises.forEach(e =>{ |
|
|
|
e.id = e.diagnosisId |
|
|
|
return e |
|
|
|
}) |
|
|
|
this.diagnosisesCur = arrayReduce(this.diagnosisesCur,sumDiagnosises,'id') |
|
|
|
}, |
|
|
|
|
|
|
|
//StartDate EndDate |
|
|
|
if (this.patientRegister.query.dateRange) { |
|
|
|
body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD") |
|
|
|
body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD") |
|
|
|
quickChoosedDiag(v) { |
|
|
|
if (!v) return |
|
|
|
console.log(v) |
|
|
|
|
|
|
|
this.sumDoctorCheck.diagnosisList.push({ |
|
|
|
patientRegisterId: this.patientRegisterId, |
|
|
|
diagnosisId: v.id, |
|
|
|
diagnosisName: v.displayName, |
|
|
|
}) |
|
|
|
|
|
|
|
let id = String(new Date().getTime()) |
|
|
|
let details = [] |
|
|
|
|
|
|
|
v.suggestions.forEach(e => { |
|
|
|
details.push({ |
|
|
|
sumSuggestionHeaderId: id, |
|
|
|
suggestionContent: e.suggestionContent |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
let pojo = { |
|
|
|
id: id, |
|
|
|
patientRegisterId: this.patientRegisterId, |
|
|
|
suggestionTitle: v.suggestionName || v.displayName, |
|
|
|
diagnosisId: v.id, |
|
|
|
details |
|
|
|
} |
|
|
|
|
|
|
|
this.sumDoctorCheck.suggestionList.push(pojo); |
|
|
|
|
|
|
|
if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo } |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo } |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo } |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
console.log('/api/app/patientregister/getlistinfilter', body) |
|
|
|
postapi('/api/app/patientregister/getlistinfilter', body) |
|
|
|
//查询 |
|
|
|
getDiagnosisList(PatientRegisterId) { |
|
|
|
// /api/app/sumdiagnosis/getsumdiagnosislistinpatientregisterid?PatientRegisterId=3fa85f64-5717-4562-b3fc-2c963f66afa6 |
|
|
|
getapi(`/api/app/sumdiagnosis/getsumdiagnosislistinpatientregisterid?PatientRegisterId=${PatientRegisterId}`) |
|
|
|
.then((res) => { |
|
|
|
this.dataList = res.data; |
|
|
|
if(res.code != - 1) this.sumDoctorCheck.diagnosisList = res.data |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
deleteRow(index) { |
|
|
|
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
cancelButtonText: "否", |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
//删除建议 |
|
|
|
let count = this.sumDoctorCheck.suggestionList.length - 1 |
|
|
|
for (let i = count; i > 0; i--) { |
|
|
|
//console.log(this.sumDoctorCheck.suggestionList[i].diagnosisId, this.sumDoctorCheck.diagnosisList[index].diagnosisId) |
|
|
|
if (this.sumDoctorCheck.suggestionList[i].diagnosisId == this.sumDoctorCheck.diagnosisList[index].diagnosisId) { |
|
|
|
this.sumDoctorCheck.suggestionList.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
deleteRow(index){ |
|
|
|
this.sumDoctorCheck.diagnosisList.splice(index, 1) |
|
|
|
}).catch((err) => { |
|
|
|
// |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
@ -110,7 +173,11 @@ export default { |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
watch: { |
|
|
|
|
|
|
|
"patientRegisterId"(newVal, oldVal){ |
|
|
|
if(newVal && newVal != oldVal){ |
|
|
|
this.getDiagnosisList(newVal) |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
@ -120,13 +187,17 @@ export default { |
|
|
|
padding-left: 2px; |
|
|
|
padding-right: 15px; |
|
|
|
} |
|
|
|
::v-deep .el-input__icon{ |
|
|
|
width: 15px; /* 输入框下拉箭头或清除图标 默认 25 */ |
|
|
|
|
|
|
|
::v-deep .el-input__icon { |
|
|
|
width: 15px; |
|
|
|
/* 输入框下拉箭头或清除图标 默认 25 */ |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-input-group__append{ |
|
|
|
padding: 0 5px; /* 控件默认 0 20px;*/ |
|
|
|
::v-deep .el-input-group__append { |
|
|
|
padding: 0 5px; |
|
|
|
/* 控件默认 0 20px;*/ |
|
|
|
} |
|
|
|
|
|
|
|
.box { |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
|