From b8e1395f02c929eaa96b949cf6027ee2a43856a6 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 19:03:37 +0800 Subject: [PATCH] 2022-09-06 --- src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 39 ++++++++++++++++++++++++++++++--------- 1 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index b66add0..a1587be 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -39,14 +39,15 @@ inputType: 'input', editable: true, unique: true, - width: '20%' + width: '17%' }, { title: this.props.dict['model.name'], dataIndex: 'Text', inputType: 'input', editable: true, - width: '20%' + unique: true, + width: '17%' }, { title: this.props.dict['model.form.columnWidth'], @@ -55,25 +56,28 @@ min: 5, max: 200, editable: true, - width: '14%', + width: '12%', render: (text) => text || 20 }, { title: '绫诲瀷', dataIndex: 'type', - inputType: 'radio', + inputType: 'select', editable: true, required: false, - width: '18%', + width: '14%', render: (text) => { if (text === 'image') { return '鍥剧墖' + } else if (text === 'number') { + return '鏁板��' } else { return '鏂囨湰' } }, options: [ {value: 'text', text: '鏂囨湰'}, + {value: 'number', text: '鏁板��'}, {value: 'image', text: '鍥剧墖'} ] }, @@ -95,6 +99,16 @@ {value: 'true', text: '鏄�'}, {value: 'false', text: '鍚�'} ] + }, + { + title: '灏忔暟浣�', + dataIndex: 'decimal', + inputType: 'number', + min: 0, + max: 18, + editable: true, + required: false, + width: '12%' }, { title: '瀵煎嚭', @@ -703,7 +717,7 @@ if (fields.includes(item.field) || !item.field) return fields.push(item.field) - columns.push({ + let cell = { Column: item.field, Text: item.label, Width: 20, @@ -711,7 +725,14 @@ output: 'true', type: 'text', uuid: Utils.getuuid() - }) + } + + if (item.type === 'number') { + cell.type = 'number' + cell.decimal = item.decimal + } + + columns.push(cell) }) this.setState({ @@ -740,7 +761,7 @@ changeColumns = (columns) => { const { verify } = this.state - if (columns[0] && (columns[0].type !== 'image' && columns[0].type !== 'text')) { + if (columns[0] && (columns[0].type !== 'image' && columns[0].type !== 'text' && columns[0].type !== 'number')) { columns = columns.map(col => { let _cell = { uuid: Utils.getuuid(), @@ -939,7 +960,7 @@ <Button className="excel-col-add mk-red" title="娓呯┖Excel鍒�" onClick={this.clearField}> 娓呯┖Excel鍒� </Button> - <div style={{color: '#959595', fontSize: '13px', paddingLeft: '10px'}}>濡傞渶瀵煎嚭搴忓彿锛岃浣跨敤瀛楁 $Index銆�</div> + <div style={{color: '#959595', fontSize: '13px', paddingLeft: '10px'}}>濡傞渶瀵煎嚭搴忓彿锛岃浣跨敤瀛楁 $Index锛涙暟鍊肩被鍨嬪鍑烘椂鍙繘琛屾暟鎹鐞嗭紙鍙栫粷瀵瑰�笺�佷繚鐣欏皬鏁颁綅锛夈��</div> <EditTable actions={['edit', 'move', 'copy', 'del']} type="excelcolumn" wrappedComponentRef={(inst) => this.columnRef = inst} data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/> </TabPane> {card.intertype === 'system' ? <TabPane tab={ -- Gitblit v1.8.0