Browse Source

doctor

master
pengjun 2 years ago
parent
commit
fe656504b7
  1. 394
      src/components/doctorCheck/ButtonList.vue
  2. 4
      src/components/doctorCheck/CheckItemList.vue
  3. 181
      src/components/doctorCheck/CheckPicture.vue
  4. 67
      src/components/doctorCheck/CheckSumSug.vue
  5. 30
      src/components/doctorCheck/PatientRegisterList.vue
  6. 2
      src/components/sumDoctorCheck/ButtonList.vue
  7. 366
      src/views/doctorCheck/doctorCheck.vue

394
src/components/doctorCheck/ButtonList.vue

@ -21,9 +21,11 @@
<div>
<el-button type="primary" class="btnClass" @click="btnNext">下一人</el-button>
</div>
<!--
<div>
<el-button type="primary" class="btnClass" @click="save">保存结果</el-button>
</div>
-->
<div>
<el-button type="primary" class="btnClass" @click="edit">修改结果</el-button>
</div>
@ -36,39 +38,49 @@
<div>
<el-button type="primary" class="btnClass" @click="delItem">删除明细项目</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" @click="unAudit">取消审核</el-button>
</div>
<div>
<el-button type="primary" class="btnClass">历次结果</el-button>
</div>
<div>
<el-button type="primary" class="btnClass">体检报告</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" @click="btnMakeDiagnosis">生成小结</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" @click="toSumDoctorCheck">总检</el-button>
</div>
<!--
<div>
<el-button type="primary" class="btnClass" @click="audit">审核</el-button>
</div>
<el-button type="primary" class="btnClass" @click="btnMakeDiagnosis">生成小结</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" @click="unAudit">取消审核</el-button>
<el-button type="primary" class="btnClass" @click="addSummary">新增小结</el-button>
</div>
<div>
<el-button type="primary" class="btnClass">排队</el-button>
</div>
<el-button type="primary" class="btnClass" @click="audit">审核</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" @click="addSummary">新增小结</el-button>
<el-button type="primary" class="btnClass">排队</el-button>
</div>
<!-- 体检人员列表
<el-dialog title="体检人员列表" :visible.sync="doctorCheck.doctorCheckDialogVisible" width="1000px">
<PatientRegisterList win="doctorCheck" />
</el-dialog>
-->
<div v-if="doctorCheck.doctorCheckDialogVisible"
:style="`border-radius: 10px;border: 1px solid #000;background-color:#FFF; position: absolute;top:70px;right:10px;width:300px;height: ${window.pageHeight - 42 - 5 - 30}px;opacity:1;`">
<PatientRegisterList win="doctorCheck" :winAbsolute="true"/>
</div>
<!-- 抽屉方式遮罩层不能操作
<el-drawer title="体检人员列表" :visible.sync="doctorCheck.doctorCheckDialogVisible" direction="rtl"
:wrapperClosable="false" :modal="false" :size="300">
<PatientRegisterList win="doctorCheck" />
</el-drawer>
-->
<!-- 体检人员登记 -->
<el-dialog style="z-index:30001;"
@ -115,6 +127,8 @@ export default {
PatientRegisterEdit,
PatientRegisterList,
},
props:["optGrant","addSummary","btnMakeDiagnosis","save","audit","unAudit"],
data() {
return {
medicalStartDate:'', //
@ -185,6 +199,7 @@ export default {
maxResultCount:50000,
},
displayPrList:false, //
};
},
@ -200,7 +215,7 @@ export default {
},
computed: {
...mapState(["dict", "patientRegister", "doctorCheck","sumDoctorCheck"]),
...mapState(["window", "dict", "patientRegister", "doctorCheck","sumDoctorCheck"]),
},
methods: {
@ -356,64 +371,6 @@ export default {
this.doctorCheck.prBase = Object.assign({},patientRegister)
this.patientRegister.photo = patientRegister.photo
},
//
optGrant(optType) {
let ret = ''
if (!this.doctorCheck.RegisterCheckEdit.id) return '请选择组合项目'
if (this.doctorCheck.RegisterCheckEdit.isLock == 'Y') return '组合项目已锁定,不可执行此操作'
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '2') return '组合项目已弃检,不可执行此操作'
if (optType == 'save') {
// if (!this.doctorCheck.RegisterCheckEdit.checkDoctorId) return ""
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '1') return "该项目项目已保存,不可再执行此操作,如需操作请点【修改结果】"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'edit') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'del') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'audit') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return "该检查项目已审核,无需再执行此操作"
}
if (optType == 'unAudit') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'N') return "该检查项目尚未审核,无需执行此操作"
}
if (optType == 'delItem' || optType == 'refuseItem' || optType == 'makeDiagnosis' ) {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '1') return "该项目项目已保存,不可再执行此操作,如需操作请点【修改结果】"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return "该检查项目已审核,请先取消审核"
}
return ret
},
//
save() {
let ret = this.optGrant('save')
if (ret) {
this.$message.warning(ret)
return
}
//
this.updateCheckItemList();
//
this.updateDoctorCheck();
//
this.saveCheckSummary();
//
this.saveCheckSuggestion(true);
},
//
edit() {
@ -517,300 +474,15 @@ export default {
},
//
audit() {
let ret = this.optGrant('audit')
if (ret) {
this.$message.warning(ret)
return
}
let body = {
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
//auditorUserId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditTime: "string"
}
console.log(`/api/app/registercheck/updateauditordoctor`, body)
postapi(`/api/app/registercheck/updateauditordoctor`, body)
.then((res) => {
console.log("audit", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckEdit.isAudit = 'Y';
this.$message({ type: "success", message: `组合项目审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `组合项目审核失败,原因:${err}` });
});
},
//
unAudit() {
let ret = this.optGrant('unAudit')
if (ret) {
this.$message.warning(ret)
return
}
console.log(`/api/app/registercheck/updateisaudit?RegisterCheckId=${this.doctorCheck.RegisterCheckEdit.id}&IsAudit=N`)
postapi(`/api/app/registercheck/updateisaudit?RegisterCheckId=${this.doctorCheck.RegisterCheckEdit.id}&IsAudit=N`)
.then((res) => {
console.log("unAudit", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckEdit.isAudit = 'N';
this.$message({ type: "success", message: `组合项目取消审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `组合项目取消审核失败,原因:${err}` });
});
},
//
btnMakeDiagnosis(){
let ret = this.optGrant('makeDiagnosis')
if (ret) {
this.$message.warning(ret)
return
}
console.log('生成小结');
let back = false
if(this.doctorCheck.checkSummaryList.length > 0){
this.$confirm("已经有小结,是否重新生成小结?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
}).then(() => {
back = false
}).catch((err) => {
if (err == "cancel") {
this.$message.info("已取消");
back = true
}
});
}
if(back) return
// /api/app/diagnosisfunction/getdiagnosisresult
// {
// "registerCheckId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "items": [
// {
// "itemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "result": "string"
// }
// ]
// }
if(this.doctorCheck.checkItemList.length == 0){
this.$message.warning("系统错误,组合项目没有明细")
return
}
let registerCheckId = this.doctorCheck.checkItemList
let body = {
registerCheckId:'',
items:[]
}
this.doctorCheck.checkItemList.forEach((e,index) =>{
if(index == 0) body.registerCheckId = e.registerCheckId
body.items.push({
itemId:e.itemId,
result:e.result
})
})
console.log(`/api/app/diagnosisfunction/getdiagnosisresult`, body)
this.doctorCheck.checkSummaryList = []
this.doctorCheck.checkSuggestionList = []
postapi(`/api/app/diagnosisfunction/getdiagnosisresult`, body)
.then((res) => {
if (res.code != -1) {
// console.log(res.data)
// {
// "diagnosisResultDetails": [
// {
// "diagnosisResult": ""
// }
// ],
// "diagnosisSuggestionDetails": [
// {
// "diagnosisSuggestion": ""
// },
// {
// "diagnosisSuggestion": ""
// }
// ]
// }
//
res.data.diagnosisResultDetails.forEach(e =>{
this.doctorCheck.checkSummaryList.push({
id:Math.random(),
registerCheckId:body.registerCheckId,
summary:e.diagnosisResult,
summaryFlag:'Y'
})
})
//
res.data.diagnosisSuggestionDetails.forEach(e =>{
this.doctorCheck.checkSuggestionList.push({
id:Math.random(),
registerCheckId:body.registerCheckId,
suggestion:e.diagnosisSuggestion
})
})
this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `生成小结失败,原因:${err}` });
});
},
//
toSumDoctorCheck() {
this.sumDoctorCheck.sumPREdit = Object.assign({},this.doctorCheck.prBase)
this.$router.push({ path: "/sumDoctorCheck" });
},
//
updateDoctorCheck(successTip) {
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate||new Date();
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD'); //yyyy-MM-DD HH:mm:ss
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId||window.sessionStorage.getItem("user");
let body = {
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
checkDoctorId,
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';
//
let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList,'id',body.registerCheckId)
if(lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '1'
if(successTip) this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` });
});
},
//
updateCheckItemList(successTip) {
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate||new Date();
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD'); //yyyy-MM-DD HH:mm:ss
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId||window.sessionStorage.getItem("user");
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: checkDoctorId,
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) {
if(successTip) this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` });
});
},
//
saveCheckSummary(successTip) {
let details = []
this.doctorCheck.checkSummaryList.forEach(item => {
details.push({
registerCheckId: item.registerCheckId,
summary: item.summary,
summaryFlag: item.summaryFlag,
})
});
let body = {
registerCheckId:this.doctorCheck.RegisterCheckEdit.id,
details
}
console.log(`/api/app/registerchecksummary/createregisterchecksummarymany`, body)
postapi(`/api/app/registerchecksummary/createregisterchecksummarymany`, body)
.then((res) => {
console.log("saveCheckSummary", res.data);
if (res.code != -1) {
if(successTip) this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` });
});
},
//
saveCheckSuggestion(successTip) {
let details = []
this.doctorCheck.checkSuggestionList.forEach(item => {
details.push({
registerCheckId: item.registerCheckId,
suggestion: item.suggestion
})
});
let body = {
registerCheckId:this.doctorCheck.RegisterCheckEdit.id,
details
}
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';
if(successTip) this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` });
});
},
addSummary() {
if (!this.doctorCheck.RegisterCheckEdit.id) {
this.$message.warning("请选择检查项目")
return
}
this.doctorCheck.checkSummaryList.push({
id:Math.random(),
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
summary: '',
summaryFlag: 'N',
})
this.doctorCheck.checkSuggestionList.push({
id:Math.random(),
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
suggestion: '',
})
},
},
//()
@ -863,6 +535,6 @@ export default {
margin-top: 1px;
width: 100px;
height: 26px;
padding: 5px 5px; /*原始 默认值 500 */
padding: 5px 5px; /*原始 默认值 10px 10px */
}
</style>

4
src/components/doctorCheck/CheckItemList.vue

@ -19,11 +19,11 @@
style="width: 480px"
class="inline-input"
type="textarea"
v-model="doctorCheck.checkItemList[scope.$index].result"
v-model="scope.row.result"
:fetch-suggestions="querySearch"
placeholder="请输入结果值"
@select="handleSelect"
:disabled="
:disabled=" scope.row.isCalculationItem == 'Y' ||
doctorCheck.RegisterCheckEdit.completeFlag == '1' ||
doctorCheck.RegisterCheckEdit.completeFlag == '2'
"

181
src/components/doctorCheck/CheckPicture.vue

@ -1,13 +1,41 @@
<template>
<div style="display: flex;">
<div class="demo-image__preview" v-for="item in checkPictures" :key="item.id" style="padding: 0 0 0 2px;">
<el-image
style="width: 80px; height: 80px;border-radius:5px;"
:src="item.pictureFilename"
:preview-src-list="[item.pictureFilename]">
</el-image>
<div style="margin: -6px 0 0 15px;">
<el-checkbox v-model="item.isPrintTrans">打印</el-checkbox>
<div>
<div>
<el-button type="primary" class="btnClass" @click="btnGetPic" size="small">采图</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" @click="btnExpPic" size="small">导图</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" @click="btnSavePic" size="small">保存</el-button>
</div>
</div>
<div class="demo-image__preview" v-for="(item,index) in checkPictures" :key="item.id" style="padding: 0 0 0 2px;">
<div style="position: relative;font-size:24px;margin: -6px 0 0 55px;z-index:2;">
<el-tooltip content="删除该图" placement="bottom" effect="light">
<i class="el-icon-close" @click="btnDelImage(index)"
style="color: red;cursor:pointer;"></i>
</el-tooltip>
</div>
<div style="margin-top: -25px;">
<el-image
style="width: 80px; height: 80px;border-radius:5px;"
:src="item.pictureFilename"
:preview-src-list="[item.pictureFilename]">
</el-image>
</div>
<div style="display: flex;">
<div style="margin: -6px 0 0 1px;">
<el-checkbox v-model="item.isPrintTrans"></el-checkbox>
</div>
<div style="font-size:12px;margin: -2px 0 0 1px;">打印</div>
<div style="font-size:15px;margin: -5px 0 0 2px;">
<el-tooltip content="保存后,图片将按序号从小到大排序" placement="bottom" effect="light">
<input placeholder="排序" v-model="item.displayOrder" @onkeyup="validateInteger(e,index)"
style="width: 35px" />
</el-tooltip>
</div>
</div>
</div>
</div>
@ -16,6 +44,7 @@
import moment from "moment";
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { deepCopy } from '@/utlis/proFunc';
export default {
components: {},
@ -49,23 +78,142 @@ export default {
},
},
methods: {
// checkId
getCheckPictures(registerCheckId){
if(!registerCheckId){
this.checkPictures = []
this.checkPictures = []
if(!registerCheckId){
return
}
// {
// "registerCheckId": "3a0f6a3c-88a5-d5f7-d59b-ef3b3807490b",
// "pictureFilename": "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
// "isPrint": "N",
// "displayOrder": 1,
// "creatorName": "admin",
// "lastModifierName": "admin",
// "lastModificationTime": "2023-12-15T15:24:08",
// "lastModifierId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
// "creationTime": "2023-12-15T15:24:06",
// "creatorId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
// "id": "3a0f6a3c-88a5-d5f7-d59b-ef3b38074901"
// }
getapi(`/api/app/registercheckpicture/getregistercheckpictureinregistercheckid?RegisterCheckId=${registerCheckId}`)
.then(res =>{
if(res.code != -1){
res.data.forEach(e => {
this.checkPictures.push(Object.assign({isPrintTrans:e.isPrint == 'Y' ? true:false},e))
});
}
})
},
btnGetPic(){
console.log('采图,开发中……')
},
btnExpPic(){
console.log('导图,开发中……')
},
btnSavePic(){
let body = []
// [
// {
// "registerCheckPictureId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", //
// "registerCheckId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "pictureFilename": "string",
// "isPrint": "string",
// "displayOrder": 0
// }
// ]
if(this.checkPictures.length == 0){
this.$message.warning("没有可保存的图片数据!")
return
}
let checkPictures = deepCopy(this.checkPictures)
checkPictures.sort((a,b) =>{
let seq1 = 0
let seq2 = 0
try {
seq1 = parseInt(a.displayOrder)
} catch (error) {
seq1 = 0
}
try {
seq2 = parseInt(b.displayOrder)
} catch (error) {
seq2 = 0
}
return seq1 - seq2
})
checkPictures.forEach(e => {
let item = {
registerCheckId:e.registerCheckId,
pictureFilename:e.pictureFilename
}
if(e.id) item.registerCheckPictureId = e.id
if(e.isPrintTrans){
item.isPrint = 'Y'
}else{
item.isPrint = 'N'
}
body.push(item);
});
postapi('/api/app/registercheckpicture/createregistercheckpicturemany',body)
.then(res =>{
if(res.code != -1){
this.$message.success("操作成功!")
this.getCheckPictures(checkPictures[0].registerCheckId);
}
})
},
//
btnDelImage(index){
let body = [this.checkPictures[index].id]
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
}).then(() => {
return postapi(`/api/app/registercheckpicture/deleteregistercheckpicturemany`, body)
}).then((res) => {
if(res.code != -1){
this.$message.success("操作成功!")
this.checkPictures.splice(index,1)
}
}).catch((err) => {
if (err == "cancel") {
this.$message.info("已取消");
}
});
},
validateInteger(e,index){
var regex = /^[0-9]*$/;
console.log(e,index)
if (!regex.test(e.value)) {
//
e.value = "";
}
}
},
//
watch: {
//
"doctorCheck.prBase.id":{
"doctorCheck.RegisterCheckId":{
immediate:true,
handler(newVal, oldVal) {
console.log("watch doctorCheck.prBase.id newVal:", newVal, " oldVal:", oldVal);
console.log("watch:doctorCheck.RegisterCheckId:", newVal, " oldVal:", oldVal);
this.getCheckPictures(newVal)
}
},
@ -78,4 +226,11 @@ export default {
margin-right: 2px;
padding: 1px 1px;
}
.btnClass{
margin: 2px 2px 0;
height: 26px;
min-width: 40px;
padding: 5px 5px; /*原始 默认值 10px 10px */
}
</style>

67
src/components/doctorCheck/CheckSumSug.vue

@ -1,16 +1,43 @@
<template>
<div style="display: flex;">
<div :style="'width:'+Math.floor((window.pageWidth - 200 - 110 - 45 - 4)/2) + 'px;'">
<el-table id="tableSummary" row-key="id" :data="doctorCheck.checkSummaryList" size="samll"
<el-table id="tableSummary" row-key="id" :data="doctorCheck.checkSummaryList" size="samll"
:height="window.pageHeight < 600 ? Math.floor((395 - (isCheckPicture ? 100:0))*2/5):Math.floor((window.pageHeight - 205 - (isCheckPicture ? 100:0))*2/5)"
width="100%" border @row-click="rowClick">
<el-table-column prop="summary" label="小结" >
<el-table-column prop="summary" label="小结">
<template slot="header">
<div style="display: flex;justify-content:space-between;">
<div>小结</div>
<div style="display: flex;">
<div>
<el-button type="primary" class="btnClass" @click="btnMakeDiagnosis">生成小结</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" @click="addSummary">新增小结</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" @click="save">保存结果</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" style="min-width: 40px;" @click="audit">审核</el-button>
</div>
<div>
<el-button type="primary" class="btnClass" style="min-width: 40px;" @click="btnLineUp">排队</el-button>
</div>
</div>
</div>
</template>
<template slot-scope="scope">
<el-input type="textarea" v-model="scope.row.summary" :autosize="{ minRows: 1, maxRows: 100 }"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'" placeholder="请输入小结">
</el-input>
<div style="display: flex;">
<el-input type="textarea" v-model="scope.row.summary" :autosize="{ minRows: 1, maxRows: 100 }"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'" placeholder="请输入小结">
</el-input>
<el-button type="danger" style="min-width:30px;" icon="el-icon-delete" @click="delSum(scope.$index)"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'"
size="small"></el-button>
</div>
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
<div :style="'margin-left:2px;width:'+Math.floor((window.pageWidth - 200 - 110 - 45 - 4)/2) + 'px;'">
@ -19,9 +46,14 @@
width="100%" border @row-click="rowClick">
<el-table-column prop="suggestion" label="建议" >
<template slot-scope="scope">
<el-input type="textarea" v-model="scope.row.suggestion" :autosize="{ minRows: 1, maxRows: 100 }"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'" placeholder="请输入建议">
</el-input>
<div style="display: flex;">
<el-input type="textarea" v-model="scope.row.suggestion" :autosize="{ minRows: 1, maxRows: 100 }"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'" placeholder="请输入建议">
</el-input>
<el-button type="danger" style="min-width:30px;" icon="el-icon-delete" @click="delSug(scope.$index)"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'"
size="small"></el-button>
</div>
</template>
</el-table-column>
</el-table>
@ -34,7 +66,7 @@ import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
export default {
components: {},
props:["isCheckPicture"],
props:["isCheckPicture","optGrant","addSummary","btnMakeDiagnosis","save","audit","unAudit","btnLineUp"],
data() {
return {
@ -134,6 +166,16 @@ export default {
});
},
//
delSum(index) {
this.doctorCheck.checkSummaryList.splice(index, 1);
},
//
delSug(index) {
this.doctorCheck.checkSuggestionList.splice(index, 1);
},
},
//
@ -149,5 +191,10 @@ export default {
</script>
<style scoped>
@import '../../assets/css/global_table.css';
.btnClass {
margin-left: 2px;
height: 22px;
padding: 2px 2px; /*原始 默认值 500 */
}
</style>

30
src/components/doctorCheck/PatientRegisterList.vue

@ -2,11 +2,18 @@
<div>
<!-- 查询条件 -->
<div style="display: flex; flex-wrap: wrap; width: 100%;height:140px; " >
<div v-if="winAbsolute" style="position: absolute;top:3px;right:0px;">
<el-tooltip content="关闭人员列表窗口" placement="bottom" effect="light">
<i class="el-icon-close" @click="doctorCheck.doctorCheckDialogVisible = false;sumDoctorCheck.sumDoctorCheckDialogVisible = false;"
style="font-size: 24px;color: red;cursor:pointer;"></i>
</el-tooltip>
</div>
<div class="query">
<el-input placeholder="请选择体检单位" v-model="patientRegister.query.cusOrgOCX" style="width:280px;" size="small" disabled>
<el-button slot="append" icon="el-icon-search" @click="report.dialogCusOrgOCX = true" style="font-size: 20px;"></el-button>
<el-input placeholder="请选择体检单位" v-model="patientRegister.query.cusOrgOCX" style="width:268px;" size="small" disabled>
<el-button slot="append" icon="el-icon-search" @click="report.dialogCusOrgOCX = true" style="font-size: 20px;min-width:40px;margin: -10px;"></el-button>
</el-input>
</div>
</div>
<div class="query">
<span>姓名</span>
<el-input placeholder="姓名" v-model="patientRegister.query.patientName" size="small" clearable
@ -49,7 +56,7 @@
</div>
<!-- 人员列表 -->
<el-table :data="dataList" border width="100%" :height="window.pageHeight - 42 - 140 - 5" row-key="id" size="small"
<el-table :data="dataList" border width="100%" :height="winAbsolute ? (window.pageHeight - 42 - 140 - 5 - 30) : (window.pageHeight - 42 - 140 - 5)" row-key="id" size="small"
highlight-current-row @row-click="rowClick" @row-dblclick="rowDblclick" ref="dataList">
<el-table-column prop="customerOrgParentName" label="单位" width="120">
@ -176,7 +183,7 @@ export default {
components: {
CusOrgOCX,
},
props: ['win'],
props: ['win','winAbsolute'],
data() {
return {
dataList: [], //
@ -321,7 +328,7 @@ export default {
if(this.local.query.checkAsb) body.asbitems = [this.local.query.checkAsb]
if(this.local.query.haveImage) body.isPicture = 'Y'
body.maxResultCount = 500
body.maxResultCount = 1000
// "patientName": "string",
// "sexId": "string",
// "isAudit": "string",
@ -329,11 +336,20 @@ export default {
// "maxResultCount": 0
console.log('/api/patientregister/getpeisrecordlist', body)
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
postapi('/api/patientregister/getpeisrecordlist', body)
.then((res) => {
if(res.code != -1){
this.dataList = res.data.items;
}
}
loading.close();
}).catch(err =>{
loading.close();
});
},

2
src/components/sumDoctorCheck/ButtonList.vue

@ -43,7 +43,7 @@
-->
<el-drawer title="体检人员列表" :visible.sync="sumDoctorCheck.sumDoctorCheckDialogVisible" direction="rtl"
:wrapperClosable="false" :modal="false" :size="300">
<PatientRegisterList :win="sumDoctorCheck" />
<PatientRegisterList :win="sumDoctorCheck" :winAbsolute="false"/>
</el-drawer>
<el-drawer title="诊断列表" :visible.sync="sumDoctorCheck.sumDiagnosisVisible" direction="ltr" :size="300"

366
src/views/doctorCheck/doctorCheck.vue

@ -52,7 +52,7 @@
<CheckPicture />
</div>
<div :style="'margin-top: 2px;margin-left: 2px;width:' + (window.pageWidth - 200 - 110 - 45 - 2) + 'px;'">
<CheckSumSug :isCheckPicture="isCheckPicture"/>
<CheckSumSug :isCheckPicture="isCheckPicture" :optGrant="optGrant" :addSummary="addSummary" :btnMakeDiagnosis="btnMakeDiagnosis" :save="save" :audit="audit" :unAudit="unAudit" :btnLineUp="btnLineUp"/>
</div>
<div :style="'margin-top: 2px;width:' + (window.pageWidth - 200 - 110 - 45 - 2) + 'px;'">
<RegisterCheckEdit/>
@ -61,7 +61,7 @@
</div>
</div>
<div style="width:110px;">
<ButtonList/>
<ButtonList :optGrant="optGrant" :addSummary="addSummary" :btnMakeDiagnosis="btnMakeDiagnosis" :save="save" :audit="audit" :unAudit="unAudit"/>
</div>
</div>
</el-card>
@ -95,7 +95,7 @@ export default {
return {
peoplePhoto:'', //
activeName:'asbitem',
isCheckPicture:false, //
isCheckPicture:true, //
};
},
@ -116,7 +116,7 @@ export default {
},
computed: {
...mapState(["window","dict", "patientRegister", "customerOrg"]),
...mapState(["window","dict", "patientRegister", "customerOrg", "doctorCheck","sumDoctorCheck"]),
},
methods: {
@ -242,6 +242,364 @@ export default {
console.log("dict", this.dict);
},
//
optGrant(optType) {
let ret = ''
if (!this.doctorCheck.RegisterCheckEdit.id) return '请选择组合项目'
if (this.doctorCheck.RegisterCheckEdit.isLock == 'Y') return '组合项目已锁定,不可执行此操作'
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '2') return '组合项目已弃检,不可执行此操作'
if (optType == 'save') {
// if (!this.doctorCheck.RegisterCheckEdit.checkDoctorId) return ""
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '1') return "该项目项目已保存,不可再执行此操作,如需操作请点【修改结果】"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'edit') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'del') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'audit') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return "该检查项目已审核,无需再执行此操作"
}
if (optType == 'unAudit') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'N') return "该检查项目尚未审核,无需执行此操作"
}
if (optType == 'delItem' || optType == 'refuseItem' || optType == 'makeDiagnosis' ) {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '1') return "该项目项目已保存,不可再执行此操作,如需操作请点【修改结果】"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return "该检查项目已审核,请先取消审核"
}
return ret
},
//
btnMakeDiagnosis(){
let ret = this.optGrant('makeDiagnosis')
if (ret) {
this.$message.warning(ret)
return
}
if(this.doctorCheck.checkItemList.length == 0){
this.$message.warning("系统错误,组合项目没有明细")
return
}
console.log('生成小结');
if(this.doctorCheck.checkSummaryList.length > 0){
this.$confirm("已经有小结,是否重新生成小结?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
}).then(() => {
this.makeDiagnosisFun();
}).catch((err) => {
if (err == "cancel") {
this.$message.info("已取消");
}
});
}else{
this.makeDiagnosisFun();
}
},
//
makeDiagnosisFun(){
// /api/app/diagnosisfunction/getdiagnosisresult
// {
// "registerCheckId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "items": [
// {
// "itemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "result": "string"
// }
// ]
// }
let body = {
registerCheckId:'',
items:[]
}
this.doctorCheck.checkItemList.forEach((e,index) =>{
if(index == 0) body.registerCheckId = e.registerCheckId
body.items.push({
itemId:e.itemId,
result:e.result
})
})
console.log(`/api/app/diagnosisfunction/getdiagnosisresult`, body)
this.doctorCheck.checkSummaryList = []
this.doctorCheck.checkSuggestionList = []
postapi(`/api/app/diagnosisfunction/getdiagnosisresult`, body)
.then((res) => {
if (res.code != -1) {
// console.log(res.data)
// {
// "diagnosisResultDetails": [
// {
// "diagnosisResult": ""
// }
// ],
// "diagnosisSuggestionDetails": [
// {
// "diagnosisSuggestion": ""
// },
// {
// "diagnosisSuggestion": ""
// }
// ]
// }
//
res.data.diagnosisResultDetails.forEach(e =>{
this.doctorCheck.checkSummaryList.push({
id:Math.random(),
registerCheckId:body.registerCheckId,
summary:e.diagnosisResult,
summaryFlag:'Y'
})
})
//
res.data.diagnosisSuggestionDetails.forEach(e =>{
this.doctorCheck.checkSuggestionList.push({
id:Math.random(),
registerCheckId:body.registerCheckId,
suggestion:e.diagnosisSuggestion
})
})
this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `生成小结失败,原因:${err}` });
});
},
//
addSummary() {
let ret = this.optGrant('makeDiagnosis')
if (ret) {
this.$message.warning(ret)
return
}
this.doctorCheck.checkSummaryList.push({
id:Math.random(),
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
summary: '',
summaryFlag: 'N',
})
this.doctorCheck.checkSuggestionList.push({
id:Math.random(),
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
suggestion: '',
})
},
//
save() {
let ret = this.optGrant('save')
if (ret) {
this.$message.warning(ret)
return
}
//
this.updateCheckItemList();
//
this.updateDoctorCheck();
//
this.saveCheckSummary();
//
this.saveCheckSuggestion(true);
},
//
updateDoctorCheck(successTip) {
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate||new Date();
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD'); //yyyy-MM-DD HH:mm:ss
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId||window.sessionStorage.getItem("user");
let body = {
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
checkDoctorId,
checkDate
}
console.log(`/api/app/registercheck/updatecheckdoctor`, body)
postapi(`/api/app/registercheck/updatecheckdoctor`, body)
.then((res) => {
console.log("updateDoctorCheck", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckEdit.completeFlag = '1';
//
let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList,'id',body.registerCheckId)
if(lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '1'
if(successTip) this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` });
});
},
//
updateCheckItemList(successTip) {
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate||new Date();
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD'); //yyyy-MM-DD HH:mm:ss
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId||window.sessionStorage.getItem("user");
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: checkDoctorId,
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) {
if(successTip) this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` });
});
},
//
saveCheckSummary(successTip) {
let details = []
this.doctorCheck.checkSummaryList.forEach(item => {
details.push({
registerCheckId: item.registerCheckId,
summary: item.summary,
summaryFlag: item.summaryFlag,
})
});
let body = {
registerCheckId:this.doctorCheck.RegisterCheckEdit.id,
details
}
console.log(`/api/app/registerchecksummary/createregisterchecksummarymany`, body)
postapi(`/api/app/registerchecksummary/createregisterchecksummarymany`, body)
.then((res) => {
console.log("saveCheckSummary", res.data);
if (res.code != -1) {
if(successTip) this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` });
});
},
//
saveCheckSuggestion(successTip) {
let details = []
this.doctorCheck.checkSuggestionList.forEach(item => {
details.push({
registerCheckId: item.registerCheckId,
suggestion: item.suggestion
})
});
let body = {
registerCheckId:this.doctorCheck.RegisterCheckEdit.id,
details
}
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';
if(successTip) this.$message.success("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` });
});
},
//
audit() {
let ret = this.optGrant('audit')
if (ret) {
this.$message.warning(ret)
return
}
let body = {
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
//auditorUserId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditTime: "string"
}
console.log(`/api/app/registercheck/updateauditordoctor`, body)
postapi(`/api/app/registercheck/updateauditordoctor`, body)
.then((res) => {
console.log("audit", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckEdit.isAudit = 'Y';
this.$message({ type: "success", message: `组合项目审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `组合项目审核失败,原因:${err}` });
});
},
//
unAudit() {
let ret = this.optGrant('unAudit')
if (ret) {
this.$message.warning(ret)
return
}
console.log(`/api/app/registercheck/updateisaudit?RegisterCheckId=${this.doctorCheck.RegisterCheckEdit.id}&IsAudit=N`)
postapi(`/api/app/registercheck/updateisaudit?RegisterCheckId=${this.doctorCheck.RegisterCheckEdit.id}&IsAudit=N`)
.then((res) => {
console.log("unAudit", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckEdit.isAudit = 'N';
this.$message({ type: "success", message: `组合项目取消审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `组合项目取消审核失败,原因:${err}` });
});
},
//
btnLineUp(){
console.log('排队')
},
},
//()

Loading…
Cancel
Save