|
|
@ -619,13 +619,48 @@ function showOrHide (data:any){ |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
//接口3 |
|
|
//接口3 |
|
|
console.log(1) |
|
|
console.log(leftOperatorsAndRight) |
|
|
|
|
|
console.log(data) |
|
|
|
|
|
if(data.name==leftArr[2]){ |
|
|
|
|
|
console.log("ghasdhasdfhhsadhasd") |
|
|
|
|
|
console.log(props.formData.list[i].name) |
|
|
|
|
|
nextTick(()=>{ |
|
|
|
|
|
console.log(model.value[leftArr[2]]) |
|
|
|
|
|
if(leftOperatorsAndRight.operator == "=="){ |
|
|
|
|
|
if(model.value[leftArr[2]]==leftOperatorsAndRight.right){ |
|
|
|
|
|
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name) |
|
|
|
|
|
} |
|
|
|
|
|
}else if(leftOperatorsAndRight.operator == "!="){ |
|
|
|
|
|
if(model.value[leftArr[2]]!=leftOperatorsAndRight.right){ |
|
|
|
|
|
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name) |
|
|
|
|
|
} |
|
|
|
|
|
}else if(leftOperatorsAndRight.operator == ">="){ |
|
|
|
|
|
if(model.value[leftArr[2]]>=leftOperatorsAndRight.right){ |
|
|
|
|
|
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name) |
|
|
|
|
|
} |
|
|
|
|
|
}else if(leftOperatorsAndRight.operator == ">"){ |
|
|
|
|
|
if(model.value[leftArr[2]]>leftOperatorsAndRight.right){ |
|
|
|
|
|
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name) |
|
|
} |
|
|
} |
|
|
|
|
|
}else if(leftOperatorsAndRight.operator == "<"){ |
|
|
|
|
|
if(model.value[leftArr[2]]<leftOperatorsAndRight.right){ |
|
|
|
|
|
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name) |
|
|
} |
|
|
} |
|
|
|
|
|
}else if(leftOperatorsAndRight.operator == "<="){ |
|
|
|
|
|
if(model.value[leftArr[2]]<=leftOperatorsAndRight.right){ |
|
|
|
|
|
props.formData.config.hideField = addStringIfNotExists(props.formData.config.hideField,props.formData.list[i].name) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -895,15 +930,7 @@ function showOrHide (data:any){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function removeDuplicates(arr:any) { |
|
|
|
|
|
//alert(1) |
|
|
|
|
|
return arr.reduce((accumulator: any[], currentValue: any) => { |
|
|
|
|
|
if (!accumulator.includes(currentValue)) { |
|
|
|
|
|
accumulator.push(currentValue); |
|
|
|
|
|
} |
|
|
|
|
|
return accumulator; |
|
|
|
|
|
}, []); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function addStringIfNotExists(arr: string[], str: string) { |
|
|
function addStringIfNotExists(arr: string[], str: string) { |
|
|
if (!arr.includes(str)) { |
|
|
if (!arr.includes(str)) { |
|
|
@ -921,6 +948,15 @@ function queryIfOrgOrPerson(obj: { left: string; operator: string; right: string |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* function queryHideFieldCondition(obj: { left: string; operator: string; right: string }) { |
|
|
|
|
|
|
|
|
|
|
|
return request({ |
|
|
|
|
|
url: '/javasys/lowCode/AssociatedForms/queryHideFieldCondition', |
|
|
|
|
|
method: 'post', |
|
|
|
|
|
data: obj, |
|
|
|
|
|
}); |
|
|
|
|
|
} */ |
|
|
|
|
|
|
|
|
function splitString(str:string) { |
|
|
function splitString(str:string) { |
|
|
const operators = ['==', '>', '>=', '<', '<=', '!=', '不包含' ,'包含']; |
|
|
const operators = ['==', '>', '>=', '<', '<=', '!=', '不包含' ,'包含']; |
|
|
for (let operator of operators) { |
|
|
for (let operator of operators) { |
|
|
@ -931,7 +967,6 @@ function splitString(str:string) { |
|
|
return { left,operator, right }; |
|
|
return { left,operator, right }; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//return { left: str, right: '' }; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const dictForm = computed(() => { |
|
|
const dictForm = computed(() => { |
|
|
|