|
|
|
@ -7,11 +7,11 @@ |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<span class="query">档案号</span> |
|
|
|
<el-input placeholder="档案号" v-model="prBase.patientNo" size="small" style="width: 100px;" clearable/> |
|
|
|
<el-input placeholder="档案号" v-model="prBase.patientNo" size="small" style="width: 100px;" clearable /> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<span class="query">姓名</span> |
|
|
|
<el-input placeholder="姓名" v-model="prBase.patientName" size="small" style="width: 100px;" clearable/> |
|
|
|
<el-input placeholder="姓名" v-model="prBase.patientName" size="small" style="width: 100px;" clearable /> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<span class="query">性别</span> |
|
|
|
@ -66,18 +66,18 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 体检人员记录列表 --> |
|
|
|
<el-dialog title="体检人员列表" :visible.sync="dialogWin.PatientRegisterForChoose" width="800px" :show-close="false" :close-on-click-modal="false" |
|
|
|
:append-to-body="true"> |
|
|
|
<PatientRegisterForChoose :params="PatientRegisterForChooseParams"/> |
|
|
|
<el-dialog title="体检人员列表" :visible.sync="dialogWin.PatientRegisterForChoose" width="800px" :show-close="false" |
|
|
|
:close-on-click-modal="false" :append-to-body="true"> |
|
|
|
<PatientRegisterForChoose :params="PatientRegisterForChooseParams" /> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import moment from "moment"; |
|
|
|
import { mapState, mapMutations} from "vuex"; |
|
|
|
import { mapState, mapMutations } from "vuex"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { dddw,deepCopy,objCopy, opjCopy } from '../../utlis/proFunc' |
|
|
|
import { dddw, deepCopy, objCopy, opjCopy } from '../../utlis/proFunc' |
|
|
|
import PatientRegisterForChoose from "../../components/patientRegister/PatientRegisterForChoose.vue"; |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -87,7 +87,7 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dialogVisible: false, |
|
|
|
prBase:{ |
|
|
|
prBase: { |
|
|
|
id: '', //体检登记ID |
|
|
|
patientRegisterNo: '', //条码号 |
|
|
|
patientNo: '', //档案号 |
|
|
|
@ -103,65 +103,79 @@ export default { |
|
|
|
nationId: '', //民族 |
|
|
|
mobileTelephone: '', //手机 |
|
|
|
}, |
|
|
|
prBaseInit:{}, |
|
|
|
PatientRegisterForChooseParams:{}, // 参数 |
|
|
|
|
|
|
|
prBaseInit: {}, |
|
|
|
PatientRegisterForChooseParams: {}, // 参数 |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
this.prBaseInit = Object.assign({},this.prBase) |
|
|
|
created() { |
|
|
|
this.prBaseInit = Object.assign({}, this.prBase) |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
// 回车替代查询 |
|
|
|
this.enterToQuery() |
|
|
|
}, |
|
|
|
|
|
|
|
//获取体检登记信息 (检查医生诊台 与 总检医生诊台 切换时用到) |
|
|
|
this.getPatientRegister(this.dataTransOpts.tableS.patient_register.id) |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
...mapState(["dict","dialogWin", "dataTransOpts","patientRegister", "doctorCheck", "sumDoctorCheck"]), |
|
|
|
...mapState(["dict", "dialogWin", "dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck"]), |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapMutations(['doctorCheckPrBaseInit','sumPREditInit']), |
|
|
|
dddw,moment, |
|
|
|
...mapMutations(['doctorCheckPrBaseInit', 'sumPREditInit']), |
|
|
|
dddw, moment, |
|
|
|
|
|
|
|
//查询找到相关信息处理 |
|
|
|
findPR(rd){ |
|
|
|
findPR(rd) { |
|
|
|
// debugger |
|
|
|
// console.log('rd,this.doctorCheck.prBase',rd.id,this.doctorCheck.prBase.id) |
|
|
|
objCopy(rd,this.prBase) |
|
|
|
objCopy(rd, this.prBase) |
|
|
|
this.dataTransOpts.tableS.patient_register.id = rd.id |
|
|
|
this.doctorCheck.prBase = Object.assign({},this.doctorCheck.prBase,rd) |
|
|
|
this.doctorCheck.prBase = Object.assign({}, this.doctorCheck.prBase, rd) |
|
|
|
setTimeout(() => { |
|
|
|
//触发检查医生诊台相关刷新 |
|
|
|
this.dataTransOpts.refresh.register_check.M++ |
|
|
|
}, 20); |
|
|
|
|
|
|
|
//触发总检医生诊台相关刷新 |
|
|
|
this.dataTransOpts.refresh.sumDoctor.M++ |
|
|
|
this.dataTransOpts.refresh.sum_diagnosis.M++ |
|
|
|
}, 20); |
|
|
|
// objCopy(rd,this.doctorCheck.prBase) |
|
|
|
|
|
|
|
// this.sumPREditInit() |
|
|
|
this.sumDoctorCheck.sumPREdit = Object.assign({},this.sumDoctorCheck.sumPREdit,rd) |
|
|
|
this.sumDoctorCheck.sumPREdit = Object.assign({}, this.sumDoctorCheck.sumPREdit, rd) |
|
|
|
// objCopy(rd,this.sumDoctorCheck.sumPREdit) |
|
|
|
|
|
|
|
this.patientRegister.photo = rd.photo |
|
|
|
}, |
|
|
|
|
|
|
|
//查询未找到相关信息处理 |
|
|
|
unfindPR(queryType){ |
|
|
|
unfindPR(queryType) { |
|
|
|
|
|
|
|
this.$message.warning("没有找到相应的数据") |
|
|
|
let val = this.prBase[queryType] |
|
|
|
|
|
|
|
|
|
|
|
this.doctorCheckPrBaseInit() |
|
|
|
this.dataTransOpts.tableS.patient_register.id = '' |
|
|
|
setTimeout(() => { |
|
|
|
//触发检查医生诊台相关刷新 |
|
|
|
this.dataTransOpts.refresh.register_check.M++ |
|
|
|
}, 20); |
|
|
|
|
|
|
|
//触发总检医生诊台相关刷新 |
|
|
|
this.dataTransOpts.refresh.sumDoctor.M++ |
|
|
|
this.dataTransOpts.refresh.sum_diagnosis.M++ |
|
|
|
}, 20); |
|
|
|
|
|
|
|
this.sumPREditInit() |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
this.prBase[queryType] = val |
|
|
|
}, 100); |
|
|
|
|
|
|
|
}, 100); |
|
|
|
|
|
|
|
this.patientRegister.photo = '' |
|
|
|
}, |
|
|
|
|
|
|
|
@ -169,132 +183,147 @@ export default { |
|
|
|
onQueryByPatientRegisterNo() { |
|
|
|
let patientRegisterNo = this.prBase.patientRegisterNo |
|
|
|
let body = { |
|
|
|
sType:1, |
|
|
|
sType: 1, |
|
|
|
patientRegisterNo, |
|
|
|
isFilterPreRegistration:'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) |
|
|
|
} |
|
|
|
console.log(`/api/app/patientregister/getpatientregisterorpatient`,body) |
|
|
|
postapi('/api/app/patientregister/getpatientregisterorpatient',body) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
if(res.data){ |
|
|
|
this.findPR(res.data) |
|
|
|
}else{ |
|
|
|
this.unfindPR('patientRegisterNo') |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
isFilterPreRegistration: 'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) |
|
|
|
} |
|
|
|
console.log(`/api/app/patientregister/getpatientregisterorpatient`, body) |
|
|
|
postapi('/api/app/patientregister/getpatientregisterorpatient', body) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
if (res.data) { |
|
|
|
this.findPR(res.data) |
|
|
|
} else { |
|
|
|
this.unfindPR('patientRegisterNo') |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//按档案号查个人数据 |
|
|
|
onQueryByPatientNo() { |
|
|
|
let patientNo = this.prBase.patientNo |
|
|
|
let body = { |
|
|
|
sType:2, |
|
|
|
sType: 2, |
|
|
|
patientNo, |
|
|
|
isFilterPreRegistration:'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) |
|
|
|
} |
|
|
|
console.log(`/api/app/patientregister/getpatientregisterorpatient`,body) |
|
|
|
postapi('/api/app/patientregister/getpatientregisterorpatient',body) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
if(res.data){ |
|
|
|
this.findPR(res.data) |
|
|
|
}else{ |
|
|
|
this.unfindPR('patientRegisterNo') |
|
|
|
isFilterPreRegistration: 'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) |
|
|
|
} |
|
|
|
console.log(`/api/app/patientregister/getpatientregisterorpatient`, body) |
|
|
|
postapi('/api/app/patientregister/getpatientregisterorpatient', body) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
if (res.data) { |
|
|
|
this.findPR(res.data) |
|
|
|
} else { |
|
|
|
this.unfindPR('patientRegisterNo') |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//按手机号或姓名查找客户信息 |
|
|
|
getlistinfilterByName(v){ |
|
|
|
let body={ |
|
|
|
patientName:v, |
|
|
|
isFilterPreRegistration:'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) |
|
|
|
getlistinfilterByName(v) { |
|
|
|
let body = { |
|
|
|
patientName: v, |
|
|
|
isFilterPreRegistration: 'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效) |
|
|
|
} |
|
|
|
this.PatientRegisterForChooseParams = body // 传参 |
|
|
|
this.dialogWin.PatientRegisterForChoose = true // 弹窗 |
|
|
|
setTimeout(() => { |
|
|
|
this.dataTransOpts.refresh.patient_register.M++ |
|
|
|
}, 10); |
|
|
|
//触发检查医生诊台相关刷新 |
|
|
|
this.dataTransOpts.refresh.register_check.M++ |
|
|
|
|
|
|
|
//触发总检医生诊台相关刷新 |
|
|
|
this.dataTransOpts.refresh.sumDoctor.M++ |
|
|
|
this.dataTransOpts.refresh.sum_diagnosis.M++ |
|
|
|
}, 20); |
|
|
|
}, |
|
|
|
|
|
|
|
//根据ID 获取 人员信息 |
|
|
|
async getPatientRegister(patientRegisterId){ |
|
|
|
if(!patientRegisterId){ |
|
|
|
getPatientRegister(patientRegisterId) { |
|
|
|
if (!patientRegisterId) { |
|
|
|
this.prBase = deepCopy(this.prBaseInit) |
|
|
|
return |
|
|
|
} |
|
|
|
let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${patientRegisterId}`) |
|
|
|
this.prBase = res.data |
|
|
|
postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${patientRegisterId}`) |
|
|
|
.then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.prBase = res.data |
|
|
|
//触发检查医生诊台相关刷新 |
|
|
|
this.dataTransOpts.refresh.register_check.M++ |
|
|
|
|
|
|
|
//触发总检医生诊台相关刷新 |
|
|
|
this.dataTransOpts.refresh.sumDoctor.M++ |
|
|
|
this.dataTransOpts.refresh.sum_diagnosis.M++ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lmoment(date, forMat) { |
|
|
|
return moment(new Date(date)).format(forMat); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//回车替代查询 |
|
|
|
enterToQuery() { |
|
|
|
// console.log('enterToTab'); |
|
|
|
this.$nextTick(() => { |
|
|
|
let inputs = document.querySelectorAll(["input"]); //用数组可以读取多个标签的元素 //.inline-input |
|
|
|
|
|
|
|
|
|
|
|
// 为每个输入框添加键盘事件监听器 |
|
|
|
inputs.forEach((input,i) => { |
|
|
|
inputs.forEach((input, i) => { |
|
|
|
// console.log('input',input); |
|
|
|
input.addEventListener('keydown', (event) => { |
|
|
|
if (event.keyCode === 13){ |
|
|
|
if (event.keyCode === 13) { |
|
|
|
// 阻止回车键的默认行为(换行) |
|
|
|
event.preventDefault(); |
|
|
|
|
|
|
|
// 如果按下的是回车查询 |
|
|
|
console.log(input.getAttribute('placeholder'),input.value) |
|
|
|
console.log(input.getAttribute('placeholder'), input.value) |
|
|
|
let placeholder = input.getAttribute('placeholder') |
|
|
|
switch (placeholder) { |
|
|
|
case '条码号': |
|
|
|
if(input.value) this.onQueryByPatientRegisterNo() |
|
|
|
if (input.value) this.onQueryByPatientRegisterNo() |
|
|
|
break; |
|
|
|
case '档案号': |
|
|
|
if(input.value) this.onQueryByPatientNo() |
|
|
|
if (input.value) this.onQueryByPatientNo() |
|
|
|
break; |
|
|
|
case '姓名': |
|
|
|
if(input.value) this.getlistinfilterByName(input.value) |
|
|
|
break; |
|
|
|
if (input.value) this.getlistinfilterByName(input.value) |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
watch:{ |
|
|
|
"doctorCheck.prBase.id":{ |
|
|
|
immediate:true, |
|
|
|
handler(newVal, oldVal) { |
|
|
|
// debugger |
|
|
|
// console.log("watch 2doctorCheck.prBase.id newVal:", newVal, " oldVal:", oldVal); |
|
|
|
// if (newVal != oldVal) { |
|
|
|
|
|
|
|
objCopy(this.doctorCheck.prBase,this.prBase) |
|
|
|
// this.prBase = Object.assign({},this.doctorCheck.prBase) |
|
|
|
// } |
|
|
|
// console.log(222); |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
// "doctorCheck.prBase.id":{ |
|
|
|
// immediate:true, |
|
|
|
// handler(newVal, oldVal) { |
|
|
|
// // debugger |
|
|
|
// // console.log("watch 2doctorCheck.prBase.id newVal:", newVal, " oldVal:", oldVal); |
|
|
|
// // if (newVal != oldVal) { |
|
|
|
|
|
|
|
// objCopy(this.doctorCheck.prBase,this.prBase) |
|
|
|
// // this.prBase = Object.assign({},this.doctorCheck.prBase) |
|
|
|
// // } |
|
|
|
// // console.log(222); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
|
|
|
|
// 强制刷新人员登记信息 |
|
|
|
"dataTransOpts.refresh.patient_register.S":{ |
|
|
|
immediate:true, |
|
|
|
"dataTransOpts.refresh.patient_register.S": { |
|
|
|
// immediate:true, |
|
|
|
handler(newVal, oldVal) { |
|
|
|
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`); |
|
|
|
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`); |
|
|
|
this.getPatientRegister(this.dataTransOpts.tableS.patient_register.id) |
|
|
|
this.dataTransOpts.refresh.register_check.M++ |
|
|
|
this.dataTransOpts.refresh.register_check.M++ |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -310,7 +339,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
::v-deep .test .el-input__inner { |
|
|
|
background-color: yellow !important; |
|
|
|
background-color: yellow !important; |
|
|
|
color: red !important; |
|
|
|
} |
|
|
|
</style> |