From 2245384d97d69e36d09cd6baa877e50a81d9aff9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 29 十二月 2021 21:59:09 +0800 Subject: [PATCH] 2021-12-29 --- src/components/normalform/modalform/index.jsx | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx index 91fe3e5..010160f 100644 --- a/src/components/normalform/modalform/index.jsx +++ b/src/components/normalform/modalform/index.jsx @@ -197,10 +197,17 @@ this.setState({ formlist: this.state.formlist.map(cell => { - if (cell.field) { - return map.get(cell.field) + if (!cell.field) return cell + + let item = map.get(cell.field) + + if (item && item.linkField) { + let supInitVal = this.record[item.linkField] || '' + + item.options = item.oriOptions.filter(option => option.ParentID === supInitVal) } - return cell + + return item || cell }) }) } -- Gitblit v1.8.0