Browse Source

doct

master
pengjun 2 years ago
parent
commit
55a8523f6c
  1. 288
      src/components/doctorCheck/ButtonList.vue

288
src/components/doctorCheck/ButtonList.vue

@ -1,24 +1,24 @@
<template>
<div style="margin-left: 5px;z-index: 2001;">
<div v-show="checkPagePriv(pagePriv.privs,'人员列表')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '人员列表')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="prList">人员列表</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'体检日期')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '体检日期')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="dialogVisibleSetStartDate = true">体检日期</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'增加人员')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '增加人员')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="btnAddPr">增加人员</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'编辑人员')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '编辑人员')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="btnEditPr">编辑人员</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'删除人员')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '删除人员')" class="divBtnClass">
<el-button type="primary" class="deleteButton" @click="btnDelPr">删除人员</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'上一人')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '上一人')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="btnStep(-1)">上一人</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'下一人')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '下一人')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="btnStep(1)">下一人</el-button>
</div>
<!--
@ -26,28 +26,28 @@
<el-button type="primary" class="btnClass" @click="save">保存结果</el-button>
</div>
-->
<div v-show="checkPagePriv(pagePriv.privs,'修改结果')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '修改结果')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="btnEdit">修改结果</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'删除结果')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '删除结果')" class="divBtnClass">
<el-button type="primary" class="deleteButton" @click="btnDel">删除结果</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'放弃明细项目检查')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '放弃明细项目检查')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="refuseItem" style="font-size:11px;">放弃明细项目检查</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'删除明细项目')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '删除明细项目')" class="divBtnClass">
<el-button type="primary" class="deleteButton" @click="delItem">删除明细项目</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'取消审核')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '取消审核')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="unAudit">取消审核</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'历次结果')" class="divBtnClass">
</div>
<div v-show="checkPagePriv(pagePriv.privs, '历次结果')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="btnCheckHistory">历次结果</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'体检报告')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="report">体检报告</el-button>
<div v-show="checkPagePriv(pagePriv.privs, '体检报告')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="btnReport">体检报告</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'总检')" class="divBtnClass">
<div v-show="checkPagePriv(pagePriv.privs, '总检')" class="divBtnClass">
<el-button type="primary" class="commonbutton" @click="toSumDoctorCheck">总检</el-button>
</div>
@ -65,13 +65,13 @@
<el-button type="primary" class="btnClass">排队</el-button>
</div>
-->
<div v-show="doctorCheck.doctorCheckDialogVisible"
:style="`z-index:2;border-radius: 10px;border: 1px solid #ddd;background-color:#FFF; position: absolute;top:50px;right:0px;width:300px;height: ${window.pageHeight - 42 - 10}px;opacity:1;`">
<PatientRegisterList win="doctorCheck" :winAbsolute="true"/>
<div v-show="doctorCheck.doctorCheckDialogVisible"
:style="`z-index:2;border-radius: 10px;border: 1px solid #ddd;background-color:#FFF; position: absolute;top:50px;right:0px;width:300px;height: ${window.pageHeight - 42 - 10}px;opacity:1;`">
<PatientRegisterList win="doctorCheck" :winAbsolute="true" />
</div>
<!-- 抽屉方式遮罩层不能操作
@ -83,30 +83,18 @@
<!-- 体检人员登记 -->
<el-dialog
:title="doctorCheck.prBase.id ? '体检人员--编辑' : '体检人员--新增'"
:visible.sync="dialogWin.PatientRegisterEdit"
:close-on-click-modal="false"
fullscreen @close="closeDialogWinPatientRegisterEdit"
>
<el-dialog :title="doctorCheck.prBase.id ? '体检人员--编辑' : '体检人员--新增'" :visible.sync="dialogWin.PatientRegisterEdit"
:close-on-click-modal="false" fullscreen @close="closeDialogWinPatientRegisterEdit">
<!-- :formInitData="formData" -->
<PatientRegisterEdit style="z-index:30001;"
:isDoctor="'1'"
:patientRegisterId = "doctorCheck.prBase.id"
:editTimes="editTimes"
:refreshRegister="refreshRegister"
/>
<PatientRegisterEdit style="z-index:30001;" :isDoctor="'1'" :patientRegisterId="doctorCheck.prBase.id"
:editTimes="editTimes" :refreshRegister="refreshRegister" />
</el-dialog>
<el-dialog
title="设置体检日期" style="z-index:30002;"
:visible.sync="dialogVisibleSetStartDate"
:close-on-click-modal="false" :show-close="false"
width="300px"
>
<el-dialog title="设置体检日期" style="z-index:30002;" :visible.sync="dialogVisibleSetStartDate"
:close-on-click-modal="false" :show-close="false" width="300px">
<div style="padding: 0 20px;">
<span style="margin-right:5px ;">体检日期</span>
<el-date-picker v-model="medicalStartDateTemp" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="出生日期"
prefix-icon="" size="small" style="width:150px;"/>
<el-date-picker v-model="medicalStartDateTemp" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="出生日期" prefix-icon="" size="small" style="width:150px;" />
</div>
<span slot="footer" class="dialog-footer">
<el-button class="commonbutton" @click="dialogVisibleSetStartDate = false"> </el-button>
@ -114,17 +102,12 @@
</span>
</el-dialog>
<el-dialog
title="历次结果"
:visible.sync="dialogVisibleCheckHistory"
:close-on-click-modal="false"
width="800px"
>
<el-dialog title="历次结果" :visible.sync="dialogVisibleCheckHistory" :close-on-click-modal="false" width="800px">
<div style="padding: 0 20px;">
<el-tabs v-model="tabChoosed">
<el-tabs v-model="tabChoosed">
<el-tab-pane label="明细结果" name="2">
<CheckDetails :patientRegisterId="doctorCheck.prBase.id" />
</el-tab-pane>
</el-tab-pane>
<el-tab-pane label="项目对比" name="4">
<SumItemsType :patientId="doctorCheck.prBase.patientId" />
</el-tab-pane>
@ -136,13 +119,13 @@
</el-tab-pane>
</el-tabs>
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
import { mapState, mapActions, mapMutations} from "vuex";
import { mapState, mapActions, mapMutations } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv,checkPagePriv, deepCopy, arrayExistObj,objCopy } from "../../utlis/proFunc";
import { getPagePriv, checkPagePriv, deepCopy, arrayExistObj, objCopy } from "../../utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import PatientRegisterList from "./PatientRegisterList.vue";
@ -163,27 +146,27 @@ export default {
SumItems,
SumHistory
},
props:["optGrant","addSummary","btnMakeDiagnosis","save","audit","unAudit"],
props: ["optGrant", "addSummary", "btnMakeDiagnosis", "save", "audit", "unAudit"],
data() {
return {
pagePriv:{
routeUrlorPageName:'doctorCheck', //
privs:[] //
},
medicalStartDate:'', //
medicalStartDateTemp:'', //
refreshPatientRegisterList:0, // // /
medicalStartDateDatas:[], // ()
dialogVisibleSetStartDate:false, //
editTimes:0,
nextTodialogVisible:false, //
dialogVisible:false, //
formData:{
registerManType:'doctor', //customer doctor
pagePriv: {
routeUrlorPageName: 'doctorCheck', //
privs: [] //
},
medicalStartDate: '', //
medicalStartDateTemp: '', //
refreshPatientRegisterList: 0, // // /
medicalStartDateDatas: [], // ()
dialogVisibleSetStartDate: false, //
editTimes: 0,
nextTodialogVisible: false, //
dialogVisible: false, //
formData: {
registerManType: 'doctor', //customer doctor
id: "", //id
photo:'', //
photo: '', //
patientId: "00000000-0000-0000-0000-000000000000", //ID 00000-0000...
patientNo: "", //
customerOrgId: ["00000000-0000-0000-0000-000000000001"], //
@ -230,28 +213,28 @@ export default {
isLockBox: false, //
customerOrgRegisterId: null,
isMaxMedicalTimes: 'N',
medicalStartDate:null,
medicalStartDate: null,
}, //
formInitData:{},
formInitData: {},
medicalStartDateLoadOpts:{ //
totalCount:0,
skipCount:0,
maxResultCount:50000,
medicalStartDateLoadOpts: { //
totalCount: 0,
skipCount: 0,
maxResultCount: 50000,
},
displayPrList:false, //
dialogVisibleCheckHistory:false, //
tabChoosed:'2',
displayPrList: false, //
dialogVisibleCheckHistory: false, //
tabChoosed: '2',
};
},
created() {
created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
this.formInitData = Object.assign({},this.formData)
this.formInitData = Object.assign({}, this.formData)
this.medicalStartDateTemp = new Date()
},
@ -261,7 +244,7 @@ export default {
},
computed: {
...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "doctorCheck","sumDoctorCheck"]),
...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "doctorCheck", "sumDoctorCheck"]),
},
methods: {
@ -269,40 +252,40 @@ export default {
...mapMutations(['doctorCheckPrBaseInit']),
checkPagePriv,
prList() {
prList() {
this.doctorCheck.doctorCheckDialogVisible = true
},
//
btnSetStartDate(){
this.medicalStartDate = this.medicalStartDateTemp
btnSetStartDate() {
this.medicalStartDate = this.medicalStartDateTemp
this.dialogVisibleSetStartDate = false
setTimeout(() => {
this.refreshPatientRegisterList++
}, 20);
if(this.nextTodialogVisible) this.btnAddPr()
if (this.nextTodialogVisible) this.btnAddPr()
},
//
btnAddPr(){
btnAddPr() {
// debugger
if(this.medicalStartDate){
if (this.medicalStartDate) {
//this.formData = Object.assign({},this.formInitData,{medicalStartDate:moment(this.medicalStartDate).format('yyyy-MM-DD')})
this.dataTransOpts.tableS.patient_register.id = ''
this.dialogWin.PatientRegisterEdit = true
setTimeout(() => {
this.dataTransOpts.refresh.patient_register.S++
}, 20);
this.patientRegister.photo = ''
}else{
this.patientRegister.photo = ''
} else {
this.nextTodialogVisible = true
this.dialogVisibleSetStartDate = true
}
},
//
btnDelPr(){
if(!this.dataTransOpts.tableS.patient_register.id){
btnDelPr() {
if (!this.dataTransOpts.tableS.patient_register.id) {
this.$message.warning("未选中要删除的人员记录")
return
}
@ -313,17 +296,17 @@ export default {
type: "warning",
}).then(() => {
//console.log('{patientRegisterIds}',{patientRegisterIds})
return postapi(`/api/app/patient-register/delete-many`, {patientRegisterIds:[id]})
return postapi(`/api/app/patient-register/delete-many`, { patientRegisterIds: [id] })
}).then((res) => {
if(res.code != -1){
if (res.code != -1) {
console.log("操作成功!")
// this.doctorCheckPrBaseInit();
this.dataTransOpts.tableS.patient_register.id = ''
setTimeout(() => {
// /
this.closeDialogWinPatientRegisterEdit()
}, 20);
}
}, 20);
}
}).catch((err) => {
if (err == "cancel") {
// this.$message.info("");
@ -336,14 +319,14 @@ export default {
//
btnEditPr() {
if(!this.dataTransOpts.tableS.patient_register.id){
if (!this.dataTransOpts.tableS.patient_register.id) {
this.$message.warning("未选中要编辑的人员记录")
return
}
// this.patientRegister.patientRegisterRd = Object.assign({},this.doctorCheck.prBase)
// this.formData = Object.assign({},this.doctorCheck.prBase)
//console.log(this.patientRegister.patientRegisterRd,this.patientRegister.prList)
this.dialogWin.PatientRegisterEdit = true;
setTimeout(() => {
@ -352,60 +335,60 @@ export default {
},
// / /
closeDialogWinPatientRegisterEdit(){
closeDialogWinPatientRegisterEdit() {
this.dataTransOpts.refresh.patient_register.S++ //
this.refreshPatientRegisterList++ // /
},
// () step 1 -1
btnStep(step){
if(!this.medicalStartDate){
btnStep(step) {
if (!this.medicalStartDate) {
this.$message.warning("请先设置体检日期")
return
}
if(this.medicalStartDateDatas.length == 0) {
if (this.medicalStartDateDatas.length == 0) {
this.$message.warning("当前设置的体检日期,无体检人员信息")
return
}
let lstep = -1
if(step && step > 0) lstep = 1
if (step && step > 0) lstep = 1
let lfind = -1
let patientRegisterId = this.dataTransOpts.tableS.patient_register.id
if(patientRegisterId){
lfind = arrayExistObj(this.medicalStartDateDatas,'id',patientRegisterId)
if(lfind > - 1){
if(lstep < 0 && lfind == 0){
if (patientRegisterId) {
lfind = arrayExistObj(this.medicalStartDateDatas, 'id', patientRegisterId)
if (lfind > - 1) {
if (lstep < 0 && lfind == 0) {
this.$message.warning("已是第一个人")
return
}else if(lstep > 0 && lfind == this.medicalStartDateDatas.length - 1){
} else if (lstep > 0 && lfind == this.medicalStartDateDatas.length - 1) {
this.$message.warning("已是最后一人")
return
}
lfind = Number(lfind) + Number(lstep)
this.dataTransOpts.tableS.patient_register = deepCopy(this.medicalStartDateDatas[lfind])
}
}else{
if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){
this.dataTransOpts.tableS.patient_register = deepCopy(this.medicalStartDateDatas[0])
} else {
if (this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0) {
this.dataTransOpts.tableS.patient_register = deepCopy(this.medicalStartDateDatas[0])
}
}
this.dataTransOpts.refresh.patient_register.S++
this.dataTransOpts.refresh.patient_register.S++
},
//
findPR(rd){
this.doctorCheck.prBase = Object.assign({},this.doctorCheck.prBase,rd)
findPR(rd) {
this.doctorCheck.prBase = Object.assign({}, this.doctorCheck.prBase, rd)
this.patientRegister.photo = rd.photo
},
//
refreshRegister(patientRegister){
console.log('编辑/新增的 form :',patientRegister)
this.doctorCheck.prBase = Object.assign({},patientRegister)
refreshRegister(patientRegister) {
console.log('编辑/新增的 form :', patientRegister)
this.doctorCheck.prBase = Object.assign({}, patientRegister)
this.patientRegister.photo = patientRegister.photo
},
@ -432,8 +415,8 @@ export default {
console.log("del", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckEdit.completeFlag = '0';
let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList,'id',this.doctorCheck.RegisterCheckEdit.id)
if(lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '0'
let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList, 'id', this.doctorCheck.RegisterCheckEdit.id)
if (lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '0'
//
this.dataTransOpts.refresh.register_check_item.M++
this.dataTransOpts.refresh.register_check.S++
@ -450,15 +433,15 @@ export default {
return
}
// console.log('this.doctorCheck.checkItem',this.doctorCheck.checkItem)
if(!this.doctorCheck.checkItem){
if (!this.doctorCheck.checkItem) {
this.$message.warning("请选择要操作的明细项目")
return
}
if(!this.doctorCheck.checkItem.itemId){
if (!this.doctorCheck.checkItem.itemId) {
this.$message.warning("请选择要操作的明细项目")
return
}
let lfind = arrayExistObj(this.doctorCheck.checkItemList, 'itemId', this.doctorCheck.checkItem.itemId)
if (lfind == -1) {
this.$message.warning("请选择要操作的明细项目")
@ -477,11 +460,11 @@ export default {
return
}
if(!this.doctorCheck.checkItem){
if (!this.doctorCheck.checkItem) {
this.$message.warning("请选择要删除的明细项目")
return
}
if(!this.doctorCheck.checkItem.itemId){
if (!this.doctorCheck.checkItem.itemId) {
this.$message.warning("请选择要删除的明细项目")
return
}
@ -506,25 +489,25 @@ export default {
}).catch((err) => {
if (err == "cancel") {
this.$message.info("已取消");
}else{
} else {
this.$message({ type: "error", message: `项目明细删除失败,原因:${err}` });
}
});
},
//
btnCheckHistory() {
if(!this.doctorCheck.prBase.id) return;
if (!this.doctorCheck.prBase.id) return;
this.dialogVisibleCheckHistory = true;
},
//
report() {
if(!this.$peisAPI) {
btnReport() {
if (!this.$peisAPI) {
this.$message.info("此功能,需要在壳客户端才可运行!")
return
return
}
///3a0c990e-5756-2dc0-19d5-69a617fe4048
let ReportCode = '0005';
@ -543,27 +526,32 @@ export default {
],
};
postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.doctorCheck.prBase.id}`)
.then((res) => {
if (res.code != -1) {
if (res.code > -1) {
toOutShell.ReportTable = res.data;
console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
return this.$peisAPI.printPre(JSON.stringify(toOutShell));
}
})
.then(res => {
if (res) {
let lres = JSON.parse(res)
if (lres.code < 0) this.$message.error({ showClose: true, message: lres.message })
}
})
.catch(err => {
this.$message.warning(err);
});
},
//
toSumDoctorCheck() {
this.dataTransOpts.tableS.patient_register = Object.assign({},this.doctorCheck.prBase)
this.dataTransOpts.tableS.patient_register = Object.assign({}, this.doctorCheck.prBase)
this.$router.push({ path: "/sumDoctorCheck" });
},
},
//()
@ -582,11 +570,11 @@ export default {
},
//
"refreshPatientRegisterList":{
"refreshPatientRegisterList": {
// immediate:true,
handler(newVal,oldVal){
if(newVal != oldVal){
if(!this.medicalStartDate) return
handler(newVal, oldVal) {
if (newVal != oldVal) {
if (!this.medicalStartDate) return
let body = {
customerOrgs: [
{
@ -598,11 +586,11 @@ export default {
maxResultCount: 1000
}
postapi('/api/patientregister/getpeisrecordlist',body).then(res => {
if(res.code != -1) this.medicalStartDateDatas = res.data.items
postapi('/api/patientregister/getpeisrecordlist', body).then(res => {
if (res.code != -1) this.medicalStartDateDatas = res.data.items
})
}else{
} else {
this.medicalStartDateDatas = []
}
}
@ -614,6 +602,6 @@ export default {
@import '../../assets/css/global_button.css';
.divBtnClass {
margin-top: 5px;
margin-top: 5px;
}
</style>
Loading…
Cancel
Save