From f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 07 四月 2021 23:25:29 +0800 Subject: [PATCH] 2021-04-07 --- src/templates/sharecomponent/columncomponent/index.jsx | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/templates/sharecomponent/columncomponent/index.jsx b/src/templates/sharecomponent/columncomponent/index.jsx index a43d19b..a37af66 100644 --- a/src/templates/sharecomponent/columncomponent/index.jsx +++ b/src/templates/sharecomponent/columncomponent/index.jsx @@ -24,7 +24,7 @@ } state = { - dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, + dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, columnlist: null, // 鏄剧ず鍒� showField: false, // 鏄剧ず鍒楀瓧娈� modaltype: '', // 妯℃�佹鎺у埗 @@ -73,6 +73,7 @@ */ handleColumn = (card) => { const { menu } = this.props + const { columnlist } = this.state if (card.type !== 'colspan') { let menulist = [] @@ -99,11 +100,20 @@ return fst }) } + + let fields = [] + columnlist.forEach(col => { + if (!col.field) return + fields.push({ + value: col.field, + text: col.label + }) + }) this.setState({ modaltype: 'columns', card: card, - formlist: getColumnForm(card, menulist) + formlist: getColumnForm(card, menulist, fields) }) } else { this.setState({ @@ -176,7 +186,7 @@ _columnlist = _columnlist.filter(item => !item.origin || item.uuid === res.uuid) // 鍘婚櫎鍒濆鍒� _columnlist = _columnlist.map(item => { if (item.uuid !== res.uuid && res.field && item.field) { - if (item.field === res.field) { + if (item.field.toLowerCase() === res.field.toLowerCase()) { fieldrepet = true } } @@ -549,7 +559,6 @@ visible={modaltype === 'mark'} width={'75vw'} maskClosable={false} - style={{minWidth: '900px', maxWidth: '1200px'}} okText={dict['model.submit']} onOk={this.markSubmit} onCancel={() => { this.setState({ modaltype: '' }) }} -- Gitblit v1.8.0