pengjun 2 years ago
parent
commit
0bf4a7b59c
  1. 10
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 2
      src/utlis/tree.js

10
src/components/patientRegister/PatientRegisterEdit.vue

@ -586,9 +586,8 @@ import {
birthdayToAge, ageToBirthday, deepCopy, arrayFilter, arrayReduce, parsIcCardtoLocal,
arrayExistObj
} from "../../utlis/proFunc";
import {
photoParse, savePeoplePhoto,
} from "../../utlis/proApi";
import { getTreePids } from "../../utlis/tree";
import { photoParse, savePeoplePhoto, } from "../../utlis/proApi";
import Camera from "./Camera.vue";
import PatientRegisterItem from "./PatientRegisterItem.vue";
import LisRequest from "./LisRequest.vue";
@ -1018,8 +1017,11 @@ export default {
let customerOrgId = ""
if (Array.isArray(v) && v.length > 0) {
customerOrgId = v[v.length - 1]
this.form.customerOrgParentId = v[0]
} else {
customerOrgId = v
customerOrgId = v // s
let pids = getTreePids(this.patientRegister.customerOrgTreeAll,"treeChildren","parentId","id",customerOrgId)
if(Array.isArray(pids) && pids.length > 0) this.form.customerOrgParentId = pids[1]
}
this.preCustomerOrgId = customerOrgId
// let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId)

2
src/utlis/tree.js

@ -48,7 +48,7 @@ function madeTree(dataSource, childNodeName, pidName, idName, pidVal) {
if(treeNode){
pids.push(treeNode[lpidName]);
getTreePids(tree, lchildNodeName, lpidName, lidName, treeNode[lpidName]).forEach(e =>{
pids.push(e);
pids.unshift(e);
});
}

Loading…
Cancel
Save