pengjun 2 years ago
parent
commit
020f0b9483
  1. 4
      src/components/doctorCheck/CheckItemList.vue
  2. 2
      src/components/doctorCheck/CheckSumSug.vue
  3. 4
      src/components/doctorCheck/PatientRegisterBase.vue
  4. 2
      src/components/doctorCheck/RegisterCheckEdit.vue
  5. 10
      src/components/doctorCheck/RegisterCheckList.vue
  6. 93
      src/components/patientRegister/PatientRegisterEdit.vue
  7. 61
      src/components/patientRegister/PatientRegisterList.vue
  8. 21
      src/store/index.js
  9. 6
      src/views/doctorCheck/doctorCheck.vue

4
src/components/doctorCheck/CheckItemList.vue

@ -334,10 +334,10 @@ export default {
// },
//
"dataTransOpts.refresh.register_check_item":{
"dataTransOpts.refresh.register_check_item.S":{
immediate:true,
handler(newVal, oldVal) {
console.log(`watch dataTransOpts.refresh.register_check_item newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.registerCheckId}`);
console.log(`watch dataTransOpts.refresh.register_check_item.S newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.registerCheckId}`);
this.checkItemList(this.registerCheckId);
}
},

2
src/components/doctorCheck/CheckSumSug.vue

@ -221,7 +221,7 @@ export default {
// this.checkSuggestionList(newVal)
// },
//
"dataTransOpts.refresh.register_check_item":{
"dataTransOpts.refresh.register_check_item.S":{
immediate:true,
handler(newVal, oldVal) {
console.log(`watch 小结 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.registerCheckId}`);

4
src/components/doctorCheck/PatientRegisterBase.vue

@ -269,7 +269,7 @@ export default {
objCopy(rd,this.prBase)
this.doctorCheck.prBase = Object.assign({},this.doctorCheck.prBase,rd)
this.dataTransOpts.refresh.register_check++
this.dataTransOpts.refresh.register_check.S++
// objCopy(rd,this.doctorCheck.prBase)
// this.sumPREditInit()
@ -286,7 +286,7 @@ export default {
let val = this.prBase[queryType]
this.doctorCheckPrBaseInit()
this.dataTransOpts.refresh.register_check++
this.dataTransOpts.refresh.register_check.S++
this.sumPREditInit()

2
src/components/doctorCheck/RegisterCheckEdit.vue

@ -82,7 +82,7 @@ export default {
// },
//
"dataTransOpts.refresh.register_check_item":{
"dataTransOpts.refresh.register_check_item.S":{
immediate:true,
handler(newVal, oldVal) {
console.log(`watch dataTransOpts.refresh.register_check_item newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.registerCheckId}`);

10
src/components/doctorCheck/RegisterCheckList.vue

@ -61,9 +61,9 @@ export default {
rowClick(row){
console.log('rowClick')
this.doctorCheck.RegisterCheckId = row.id
this.dataTransOpts.table.register_check.id = row.id
this.dataTransOpts.tableS.register_check.id = row.id
setTimeout(() => { //
this.dataTransOpts.refresh.register_check_item++
this.dataTransOpts.refresh.register_check_item.S++
}, 100);
// this.doctorCheck.RegisterCheckEdit = row
},
@ -85,9 +85,9 @@ export default {
// 1
if(res.data.length > 0) {
this.doctorCheck.RegisterCheckId = res.data[0].id
this.dataTransOpts.table.register_check.id = res.data[0].id
this.dataTransOpts.tableS.register_check.id = res.data[0].id
setTimeout(() => { //
this.dataTransOpts.refresh.register_check_item++
this.dataTransOpts.refresh.register_check_item.S++
}, 100);
// this.doctorCheck.RegisterCheckEdit = res.data[0]
@ -109,7 +109,7 @@ export default {
//
watch: {
//
"dataTransOpts.refresh.register_check":{
"dataTransOpts.refresh.register_check.S":{
immediate:true,
handler(newVal, oldVal) {
console.log("watch doctorCheck.prBase.id newVal:", newVal, " oldVal:", oldVal);

93
src/components/patientRegister/PatientRegisterEdit.vue

@ -355,7 +355,7 @@
</div>
</el-image>
</div>
<!--人员登记组合项目明细-->
<!--人员登记组合项目明细 register_asbitem-->
<div>
<PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts" :triggerHeadSave="triggerHeadSave" :refreshFormId="refreshFormId"/>
</div>
@ -788,7 +788,7 @@ export default {
},
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg", "projPriv"]),
...mapState(["window","dataTransOpts","dict", "patientRegister", "customerOrg", "projPriv"]),
displayPackage(){
@ -828,7 +828,7 @@ export default {
}
});
//
//
getapi("/api/app/for-sex").then((res) => {
if (res.code == 1) {
this.dict.forSex = res.data;
@ -921,30 +921,27 @@ export default {
// }
// });
console.log("dict", this.dict);
// console.log("dict", this.dict);
},
//form
async initFormData(){
// form
async initFormData(patientRegisterId){
try {
// objCopy(this.formInitData, this.form);
this.peisid = window.sessionStorage.getItem('peisid');
if (!this.form.id) {
objCopy(this.formInit, this.form);
this.form.organizationUnitId = this.peisid;
}else{
let res = await getapi(`/api/app/patient-register/${this.form.id}`)
this.form = res.data
}
this.initBox();
this.getPeoplePhoto(this.form.photo)
// /
await this.changeCustomerOrgId(this.form.customerOrgId)
} catch (error) {
console.log(`initFormData ${error}`)
this.peisid = window.sessionStorage.getItem('peisid');
if (!patientRegisterId) {
objCopy(this.formInit, this.form);
this.form.organizationUnitId = this.peisid;
}else{
let res = await getapi(`/api/app/patient-register/${patientRegisterId}`)
this.form = res.data
}
this.initBox();
this.getPeoplePhoto(this.form.photo)
// /
await this.changeCustomerOrgId(this.form.customerOrgId)
},
//
@ -1384,12 +1381,22 @@ export default {
madePrBody(){
//
let body = deepCopy(this.form);
if (this.form.birthDate && this.form.birthDate != "Invalid date") {
body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD")
// console.log('this.form',this.form)
// console.log('body',body)
if (this.form.birthDate) {
try {
body.birthDate = moment(body.birthDate).format("yyyy-MM-DD")
} catch (error) {
// this.form.birthDate != "Invalid date"
body.birthDate = null
}
}else{
body.birthDate = null
}
if(body.birthDate == "Invalid date") body.birthDate = null
if(isNaN(body.age)) body.age = null
// console.log('body',body)
// Invalid date
delete body.registerManType;
delete body.id;
@ -1465,6 +1472,7 @@ export default {
//
this.prAsbOpraOpts.formId = res.data.id
this.dataTransOpts.tableS.patient_register.id = res.data.id
let temp = Object.assign({},res.data,{id:''})
objCopy(temp,this.form)
@ -1473,6 +1481,7 @@ export default {
this.prAsbOpraOpts.prAsbSave++
},100)
//
this.refreshRegister(Object.assign({},res.data))
//
@ -1882,35 +1891,13 @@ export default {
},
//
watch: {
// (id)
"patientRegisterId":{
immediate:true,
// deep:true,
handler(newVal, oldVal) {
console.log('watch:patientRegisterId:',newVal,' oldVal:',oldVal)
if (newVal != oldVal) {
this.form.id = newVal
}
}
},
"form.id":{
watch: {
//ID
"dataTransOpts.refresh.patient_register.S":{
immediate:true,
// deep:true,
handler(newVal, oldVal) {
console.log('watch:form.id:',newVal,' oldVal:',oldVal)
if (newVal != oldVal) {
this.initFormData()
}
}
},
//
"editTimes"(newVal, oldVal) {
console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
if (newVal != oldVal) {
this.initFormData()
console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
this.initFormData(this.dataTransOpts.tableS.patient_register.id)
}
},

61
src/components/patientRegister/PatientRegisterList.vue

@ -202,9 +202,9 @@
-->
</div>
<!-- 体检人员登记 -->
<!-- 体检人员登记 :title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'" -->
<el-dialog
:title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'"
:title="dataTransOpts.tableS.patient_register.id ? '体检人员--编辑' : '体检人员--新增'"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
fullscreen @close="closeDialogPR"
@ -598,6 +598,7 @@ export default {
computed: {
...mapState([
"window",
"dataTransOpts",
"dict",
"elProgress",
"patientRegister",
@ -804,7 +805,7 @@ export default {
this.startPoint = row.index;
}
//
//
console.log('row.index <= this.startPoint',row.index,this.startPoint)
let lfind = -1
for(let i=0;i<this.patientRegister.prList.length;i++){
@ -814,14 +815,20 @@ export default {
}
}
if(lfind > -1 && this.patientRegister.patientRegisterRd.id != this.patientRegister.prList[lfind].id){
this.setForm(this.patientRegister.prList[lfind])
// this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId;
this.patientRegister.customerOrgGroupChange = 0; //0
this.patientRegister.medicalPackageChange = 0; //0
// this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId);
this.dict.asbItem = [...this.dict.asbItemAll];
this.getPatientRegisterAbs(this.patientRegister.prList[lfind].id);
if(lfind > -1){
//
this.dataTransOpts.tableS.patient_register.id = this.patientRegister.prList[lfind].id
//
if(this.patientRegister.patientRegisterRd.id != this.patientRegister.prList[lfind].id){
this.setForm(this.patientRegister.prList[lfind])
// this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId;
this.patientRegister.customerOrgGroupChange = 0; //0
this.patientRegister.medicalPackageChange = 0; //0
// this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId);
this.dict.asbItem = [...this.dict.asbItemAll];
this.getPatientRegisterAbs(this.patientRegister.prList[lfind].id);
}
}
},
@ -838,15 +845,27 @@ export default {
this.$message.warning("请选择单位或个人");
return;
}
this.patientRegister.patientRegisterRdInit.customerOrgId = customerOrgId
this.setForm(this.patientRegister.patientRegisterRdInit)
this.patientRegister.patientRegisterAbs = [];
this.patientRegister.patientRegisterRd.id = ''
// this.patientRegister.patientRegisterRdInit.customerOrgId = customerOrgId
// this.setForm(this.patientRegister.patientRegisterRdInit)
// this.patientRegister.patientRegisterAbs = [];
// this.patientRegister.patientRegisterRd.id = ''
// this.dialogVisible = true;
// this.editTimes++; //
// this.getPatientRegisterAbs();
this.dataTransOpts.tableS.patient_register.id = ''
this.dialogVisible = true;
this.editTimes++; //
this.getPatientRegisterAbs();
setTimeout(() => {
//
this.dataTransOpts.refresh.patient_register.S++ //
this.dataTransOpts.refresh.register_asbitem.M++ //
}, 10);
},
//
refreshRegister(patientRegister){
console.log('编辑/新增的 form :',patientRegister)
@ -889,13 +908,17 @@ export default {
//
btnEdit() {
if (!this.patientRegister.patientRegisterRd.id) {
// if (!this.patientRegister.patientRegisterRd.id) {
if (!this.dataTransOpts.tableS.patient_register.id ) {
this.$message.warning("请选择要操作的记录");
return;
}
//console.log(this.patientRegister.patientRegisterRd,this.patientRegister.prList)
this.dialogVisible = true;
this.editTimes++; //
//
this.dataTransOpts.refresh.patient_register.S++ //
this.dataTransOpts.refresh.register_asbitem.M++ //
},
//

21
src/store/index.js

@ -262,23 +262,26 @@ export default new Vuex.Store({
}, //读取身份证信息
},
//多层数据传递时使用
//多层数据传递时使用(统一归结在此,便于管理)
dataTransOpts: {
//强制刷新(ID值没有变化,但也想强制刷新数据)
//强制刷新(如触发数据刷新的ID值没有变化,但也想强制刷新数据: S--single 单记录刷新,M--more 多记录刷新
refresh: {
patient_register: 0,
register_check: 0,
register_check_item: 0,
patient_register: { S: 0, M: 0 },
register_asbitem: { S: 0, M: 0 },
register_check: { S: 0, M: 0 },
register_check_item: { S: 0, M: 0 },
},
//表当前数据(单条记录)
table: {
//表当前数据(单条记录 S--single
tableS: {
patient_register: { id: '' },
register_asbitem: { id: '' },
register_check: { id: '' },
register_check_item: { id: '' }
},
//表当前数据(多条记录)
tableList: {
//表当前数据(多条记录 M--more
tableM: {
patient_register: [],
register_asbitem: [],
register_check: [],
register_check_item: []
}

6
src/views/doctorCheck/doctorCheck.vue

@ -46,16 +46,16 @@
<div>
<div :style="'margin-left: 2px;width:' + (window.pageWidth - 200 - 110 - 45 - 2) + 'px;'" >
<CheckItemList :isCheckPicture="isCheckPicture" :registerCheckId="dataTransOpts.table.register_check.id"/>
<CheckItemList :isCheckPicture="isCheckPicture" :registerCheckId="dataTransOpts.tableS.register_check.id"/>
</div>
<div v-if="isCheckPicture" class="demo-image__preview" :style="'margin-top: 2px;margin-left: 2px;height:110px;width:' + (window.pageWidth - 200 - 110 - 45 - 2) + 'px;'">
<CheckPicture />
</div>
<div :style="'margin-top: 2px;margin-left: 2px;width:' + (window.pageWidth - 200 - 110 - 45 - 2) + 'px;'">
<CheckSumSug :registerCheckId="dataTransOpts.table.register_check.id" :isCheckPicture="isCheckPicture" :optGrant="optGrant" :addSummary="addSummary" :btnMakeDiagnosis="btnMakeDiagnosis" :save="save" :audit="audit" :unAudit="unAudit" :btnLineUp="btnLineUp"/>
<CheckSumSug :registerCheckId="dataTransOpts.tableS.register_check.id" :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 :registerCheckId="dataTransOpts.table.register_check.id"/>
<RegisterCheckEdit :registerCheckId="dataTransOpts.tableS.register_check.id"/>
</div>
</div>
</div>

Loading…
Cancel
Save