|
|
|
@ -1,10 +1,10 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary">人员列表</el-button> |
|
|
|
<el-button type="primary" @click="prList">人员列表</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary">保存结果</el-button> |
|
|
|
<el-button type="primary" @click="save">保存结果</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary">修改结果</el-button> |
|
|
|
@ -12,6 +12,9 @@ |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary">删除结果</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary">删除项目</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary">历次结果</el-button> |
|
|
|
</div> |
|
|
|
@ -33,9 +36,207 @@ |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary">排队</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="primary" @click="addSummary"> + 小结</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { tcdate } from "../../utlis/proFunc"; |
|
|
|
|
|
|
|
|
|
|
|
import PatientRegisterBase from "../../components/doctorCheck/PatientRegisterBase.vue"; |
|
|
|
import ButtonList from "../../components/doctorCheck/ButtonList.vue"; |
|
|
|
import RegisterCheckList from "../../components/doctorCheck/RegisterCheckList.vue"; |
|
|
|
import CheckItemList from "../../components/doctorCheck/CheckItemList.vue"; |
|
|
|
import CheckSumSug from "../../components/doctorCheck/CheckSumSug.vue"; |
|
|
|
import RegisterCheckEdit from "../../components/doctorCheck/RegisterCheckEdit.vue"; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
RegisterCheckList, |
|
|
|
PatientRegisterBase, |
|
|
|
ButtonList, |
|
|
|
CheckItemList, |
|
|
|
CheckSumSug, |
|
|
|
RegisterCheckEdit |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
tabChoosed: "1", |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
created() { }, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { |
|
|
|
this.dictInit(); |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
...mapState(["dict", "patientRegister", "doctorCheck"]), |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
...mapActions(["getCustomerOrgGroup"]), |
|
|
|
|
|
|
|
//保存数据 |
|
|
|
save() { |
|
|
|
|
|
|
|
if (!this.doctorCheck.RegisterCheckEdit.id) { |
|
|
|
alert("请选择检查项目") |
|
|
|
return |
|
|
|
} |
|
|
|
if (!this.doctorCheck.RegisterCheckEdit.checkDoctorId) { |
|
|
|
alert("请选择检查医生") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
//更新明细 |
|
|
|
this.updateCheckItemList(); |
|
|
|
|
|
|
|
//更新检查项目与医生 |
|
|
|
this.updateDoctorCheck(); |
|
|
|
|
|
|
|
//更新小结 |
|
|
|
this.saveCheckSummary(); |
|
|
|
|
|
|
|
//更新建议 |
|
|
|
this.saveCheckSuggestion(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//更新检查项目与医生 |
|
|
|
updateDoctorCheck() { |
|
|
|
let body = { |
|
|
|
registerCheckId: this.doctorCheck.RegisterCheckEdit.id, |
|
|
|
checkDoctorId: this.doctorCheck.RegisterCheckEdit.checkDoctorId, |
|
|
|
checkDate: this.doctorCheck.RegisterCheckEdit.checkDate |
|
|
|
} |
|
|
|
console.log(`/api/app/registercheck/updatecheckdoctor`, body) |
|
|
|
postapi(`/api/app/registercheck/updatecheckdoctor`, body) |
|
|
|
.then((res) => { |
|
|
|
console.log("updateCheckItemList", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
this.doctorCheck.RegisterCheckEdit.completeFlag = '1'; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` }); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//更新明细 |
|
|
|
updateCheckItemList() { |
|
|
|
let body = [] |
|
|
|
for (let i = 0; i < this.doctorCheck.checkItemList.length; i++) { |
|
|
|
body.push({ |
|
|
|
registerCheckId: this.doctorCheck.checkItemList[i].registerCheckId, |
|
|
|
itemId: this.doctorCheck.checkItemList[i].itemId, |
|
|
|
result: this.doctorCheck.checkItemList[i].result, |
|
|
|
checkDoctorName: this.doctorCheck.RegisterCheckEdit.checkDoctorId, |
|
|
|
checkDate: this.doctorCheck.RegisterCheckEdit.checkDate, |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(`/api/app/registercheckitem/updateregistercheckitemmany`, body) |
|
|
|
postapi(`/api/app/registercheckitem/updateregistercheckitemmany`, body) |
|
|
|
.then((res) => { |
|
|
|
console.log("updateCheckItemList", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
this.doctorCheck.checkItemList = res.data; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//更新小结 |
|
|
|
saveCheckSummary() { |
|
|
|
let body = [] |
|
|
|
this.doctorCheck.checkSummaryList.forEach(item => { |
|
|
|
body.push({ |
|
|
|
registerCheckId: item.registerCheckId, |
|
|
|
summary: item.summary, |
|
|
|
summaryFlag: item.summaryFlag, |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
console.log(`/api/app/registerchecksummary/createregisterchecksummarymany`, body) |
|
|
|
postapi(`/api/app/registerchecksummary/createregisterchecksummarymany`, body) |
|
|
|
.then((res) => { |
|
|
|
console.log("saveCheckSummary", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
//this.doctorCheck.RegisterCheckEdit.completeFlag = '1'; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` }); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//更新建议 |
|
|
|
saveCheckSuggestion() { |
|
|
|
let body = [] |
|
|
|
this.doctorCheck.checkSuggestionList.forEach(item => { |
|
|
|
body.push({ |
|
|
|
registerCheckId: item.registerCheckId, |
|
|
|
suggestion: item.suggestion |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
console.log(`/api/app/registerchecksuggestion/createregisterchecksuggestionmany`, body) |
|
|
|
postapi(`/api/app/registerchecksuggestion/createregisterchecksuggestionmany`, body) |
|
|
|
.then((res) => { |
|
|
|
console.log("saveCheckSuggestion", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
//this.doctorCheck.RegisterCheckEdit.completeFlag = '1'; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` }); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
addSummary(){ |
|
|
|
if (!this.doctorCheck.RegisterCheckEdit.id) { |
|
|
|
alert("请选择检查项目") |
|
|
|
return |
|
|
|
} |
|
|
|
this.doctorCheck.checkSummaryList.push({ |
|
|
|
registerCheckId: this.doctorCheck.RegisterCheckEdit.id, |
|
|
|
summary: '', |
|
|
|
summaryFlag: 'N', |
|
|
|
}) |
|
|
|
this.doctorCheck.checkSuggestionList.push({ |
|
|
|
registerCheckId: this.doctorCheck.RegisterCheckEdit.id, |
|
|
|
suggestion: '', |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件() |
|
|
|
watch: { |
|
|
|
//1级单位值改变,分组改变 |
|
|
|
"patientRegister.query.CustomerOrgParentld"(newVal, oldVal) { |
|
|
|
console.log( |
|
|
|
"watch patientRegister.query.CustomerOrgParentld newVal:", |
|
|
|
newVal, |
|
|
|
" oldVal:", |
|
|
|
oldVal |
|
|
|
); |
|
|
|
if (newVal != oldVal && newVal !== this.dict.personOrgId) { |
|
|
|
this.getCustomerOrgGroup(newVal); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
.listBtn { |
|
|
|
|