|
|
|
@ -1029,15 +1029,15 @@ function showOrHide(data: any) { |
|
|
|
//console.log(data) |
|
|
|
|
|
|
|
/* |
|
|
|
企管部有当前用户, |
|
|
|
当前用户是什么权限角色. |
|
|
|
某表单某字段值大于等于小于不等于某个值 |
|
|
|
|
|
|
|
所需接口 |
|
|
|
接口1:当前用户是不是指定的权限角色 |
|
|
|
接口2:当前用户是否在指定的机构下或机构的祖先机构下 |
|
|
|
接口3:本表单(关联关联表单的表单)的某字段的当前值大于等于小于不等于指定的值???也许不需要接口呢? |
|
|
|
|
|
|
|
企管部有当前用户, |
|
|
|
当前用户是什么权限角色. |
|
|
|
某表单某字段值大于等于小于不等于某个值 |
|
|
|
|
|
|
|
所需接口 |
|
|
|
接口1:当前用户是不是指定的权限角色 |
|
|
|
接口2:当前用户是否在指定的机构下或机构的祖先机构下 |
|
|
|
接口3:本表单(关联关联表单的表单)的某字段的当前值大于等于小于不等于指定的值???也许不需要接口呢? |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
//关联表单隐藏条件判定 start |
|
|
|
@ -1231,11 +1231,11 @@ function showOrHide(data: any) { |
|
|
|
|
|
|
|
//liwenxuan 关联选项设置效果实现 start |
|
|
|
/* console.log("监听表单-1-constControlChange-->",props.formData) |
|
|
|
console.log("监听表单-2-constControlChange-->",key) |
|
|
|
console.log("监听表单-3-constControlChange-->", value) |
|
|
|
console.log("监听表单-4-constControlChange-->",data) |
|
|
|
console.log("监听表单-5-constControlChange-->",type) |
|
|
|
console.log("监听表单-6-constControlChange-->",attribute) */ |
|
|
|
console.log("监听表单-2-constControlChange-->",key) |
|
|
|
console.log("监听表单-3-constControlChange-->", value) |
|
|
|
console.log("监听表单-4-constControlChange-->",data) |
|
|
|
console.log("监听表单-5-constControlChange-->",type) |
|
|
|
console.log("监听表单-6-constControlChange-->",attribute) */ |
|
|
|
|
|
|
|
//得到当前表单各选项的值 |
|
|
|
//props.formData.config.hideField.push("nin2yuan4yi4wei4wo3menda3fen1ma101939") |
|
|
|
@ -1615,9 +1615,7 @@ const recursionToGetFinallyHideFields = ( |
|
|
|
for (let i = 0; i < radioSelectArr3.length; i++) { |
|
|
|
for (let j = 0; j < radioSelectArr3[i].toShowFieldKey.length; j++) { |
|
|
|
for (let n = 0; n < hideFieldConditionArr.length; n++) { |
|
|
|
/* console.log(i) |
|
|
|
console.log(j) |
|
|
|
console.log(n) */ |
|
|
|
|
|
|
|
if (radioSelectArr3[i].toShowFieldKey[j] == hideFieldConditionArr[n].toShow) { |
|
|
|
if (Array.isArray(radioSelectArr3[i].conditionFieldValue)) { |
|
|
|
let valStr = ""; |
|
|
|
@ -1694,11 +1692,7 @@ const recursionToGetFinallyHideFields = ( |
|
|
|
if (flag == false) { |
|
|
|
x++; |
|
|
|
hideFieldsFromCheckbox.push(toshow); |
|
|
|
//console.log(hideFieldArr) |
|
|
|
/* for(let i = 0;i<hideFieldsFromCheckbox.length;i++){ |
|
|
|
hideFieldArr = hideFieldArr.filter((item: string) => item!=hideFieldsFromCheckbox[i]) |
|
|
|
//emits('refresh') |
|
|
|
} */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1710,27 +1704,11 @@ const recursionToGetFinallyHideFields = ( |
|
|
|
if (modelKeyArr[n] == conditionField) { |
|
|
|
//let count_1 = 0; |
|
|
|
let trueValue = model.value[modelKeyArr[n]]; |
|
|
|
//console.log(modelKeyArr[n]) |
|
|
|
/* console.log("conditionField====="+conditionField) |
|
|
|
console.log("trueValue====="+trueValue) |
|
|
|
console.log("conditionFieldValue-----"+conditionFieldValue) */ |
|
|
|
|
|
|
|
|
|
|
|
if (trueValue == conditionFieldValue) { |
|
|
|
//此时满足了条件,但是必须看一下conditionField有没有被隐藏.如果被隐藏了,则x不能增加. |
|
|
|
|
|
|
|
let flag = false; //其依赖的选项的父字段是否被隐藏.默认没被隐藏, |
|
|
|
//如果此时的conditionField有可能被隐藏且已被隐藏,x不能++ |
|
|
|
/* for(let a = 0;a<hideFieldConditionArr.length;a++){ |
|
|
|
if(hideFieldConditionArr[a].toShow==conditionField){//当conditions.length>1说明时多选,=1说明是单选. |
|
|
|
for(let b = 0;b<hideFieldConditionArr[a].conditions.length;b++){ |
|
|
|
for(let c = 0;c<hideFieldConditionArr[a].conditions[b].condition.length;c++){ |
|
|
|
if(hideFieldConditionArr[a].conditions[b].condition[c]==conditionField){ |
|
|
|
//暂时写到这里,先去组装多选条件数组. |
|
|
|
console.log(1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} */ |
|
|
|
|
|
|
|
if (flag == false) { |
|
|
|
x++; |
|
|
|
} |
|
|
|
|