Skip to content

Commit

Permalink
fix 因为缓存,有时人员字段左侧树无法展开
Browse files Browse the repository at this point in the history
  • Loading branch information
yinlianghui committed Jan 3, 2024
1 parent 3d9845e commit ca4d674
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,15 @@ export function getReferenceToSync(field) {

export function getLookupSapceUserTreeSchema(isMobile){
let apiAdaptor = `
if (payload.data.treeCache == true) {
// console.log("===getLookupSapceUserTreeSchema===", JSON.stringify(payload));
const records = payload.data.options;
let isTreeOptionsComputed = false;
if(records.length === 1 && records[0].children){
isTreeOptionsComputed = true;
}
if(isTreeOptionsComputed){
return payload;
}
const records = payload.data.options;
const treeRecords = [];
const getChildren = (records, childrenIds) => {
if (!childrenIds) {
Expand Down Expand Up @@ -109,7 +114,6 @@ export function getLookupSapceUserTreeSchema(isMobile){
console.log(treeRecords)
payload.data.options = treeRecords;
payload.data.treeCache = true;
return payload;
`;
const treeSchema = {
Expand Down

0 comments on commit ca4d674

Please sign in to comment.