From 8d95d80fa697580dadca3a95280b3c9f9c0044db Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 27 一月 2022 21:24:41 +0800 Subject: [PATCH] 2022-01-27 --- src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 10 +++-- src/templates/zshare/editTable/index.jsx | 2 src/templates/zshare/formconfig.jsx | 2 src/menu/datasource/verifycard/settingform/index.jsx | 13 +++++- src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss | 5 ++ src/tabviews/custom/components/card/data-card/index.jsx | 4 + src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 35 ++++++++++++++--- 7 files changed, 55 insertions(+), 16 deletions(-) diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index fe0d88c..72fc91f 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -27,7 +27,8 @@ modules: [], usefulFields: [], useMSearch: this.props.setting.useMSearch || 'false', - supModule: this.props.setting.supModule || [] + supModule: this.props.setting.supModule || [], + appType: sessionStorage.getItem('appType') } UNSAFE_componentWillMount () { @@ -55,11 +56,17 @@ } handleConfirm = () => { + const { appType } = this.state // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� return new Promise((resolve, reject) => { this.props.form.validateFieldsAndScroll((err, values) => { if (!err) { values.sync = values.sync || 'false' + + if (appType === 'mob' && values.useMSearch === 'true') { + values.syncRefresh = 'true' + } + // 鏁版嵁婧愬墠绔獙璇� if (values.interType === 'system' && values.execute !== 'false' && !values.dataresource) { notification.warning({ @@ -150,7 +157,7 @@ render() { const { setting, columns, config } = this.props const { getFieldDecorator } = this.props.form - const { interType, modules, useMSearch, laypage, supModule, usefulFields } = this.state + const { interType, modules, useMSearch, laypage, supModule, usefulFields, appType } = this.state const formItemLayout = { labelCol: { @@ -433,7 +440,7 @@ )} </Form.Item> </Col> : null} - {!['navbar', 'balcony', 'menubar'].includes(config.type) && useMSearch === 'true' ? <Col span={8}> + {!['navbar', 'balcony', 'menubar'].includes(config.type) && useMSearch === 'true' && appType !== 'mob' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'澶栧眰鎼滅储鏉′欢鏀瑰彉鏃讹紝鏄惁鍒锋柊褰撳墠缁勪欢鏁版嵁銆�'}> <QuestionCircleOutlined className="mk-form-tip" /> diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 5d2157e..efb8f0e 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -402,9 +402,11 @@ } if (bid !== this.state.BID || bid !== '') { - this.setState({ BID: bid, BData: _data, pageIndex: 1 }, () => { + this.setState({ BID: bid, BData: _data, pageIndex: 1, supNodes }, () => { this.loadData() }) + } else { + this.setState({ supNodes }) } } else { if (!config.setting.supModule || config.setting.supModule !== MenuID) return diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 891cd34..7c91df8 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -478,11 +478,13 @@ exportExcel = (data) => { const { btn } = this.props + let columns = btn.verify.columns.filter(col => col.output !== 'false') + try { - let imgCol = btn.verify.columns.filter(col => col.type === 'image')[0] + let imgCol = columns.filter(col => col.type === 'image')[0] if (imgCol) { - const column = btn.verify.columns.map(item => { + const column = columns.map(item => { let col = { title: item.Text, key: item.Column, @@ -503,7 +505,7 @@ item.$Index = index + 1 + '' - btn.verify.columns.forEach((col, i) => { + columns.forEach((col, i) => { if (item[col.Column] && col.abs === 'true') { _row[col.Column] = Math.abs(item[col.Column]) } else { @@ -528,7 +530,7 @@ let colwidth = [] let abses = [] - btn.verify.columns.forEach(col => { + columns.forEach(col => { if (_topRow[col.Column]) return _header.push(col.Column) diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index 72cc3a2..dd5a7c2 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -49,16 +49,16 @@ min: 5, max: 200, editable: true, - width: '20%', + width: '14%', render: (text) => text || 20 }, { title: '绫诲瀷', dataIndex: 'type', - inputType: 'select', + inputType: 'radio', editable: true, required: false, - width: '20%', + width: '18%', render: (text) => { if (text === 'image') { return '鍥剧墖' @@ -74,12 +74,31 @@ { title: '鍙栫粷瀵瑰��', dataIndex: 'abs', - inputType: 'select', + inputType: 'radio', editable: true, required: false, - width: '20%', + width: '14%', render: (text) => { if (text === 'true') { + return '鏄�' + } else { + return '鍚�' + } + }, + options: [ + {value: 'true', text: '鏄�'}, + {value: 'false', text: '鍚�'} + ] + }, + { + title: '瀵煎嚭', + dataIndex: 'output', + inputType: 'radio', + editable: true, + required: false, + width: '14%', + render: (text) => { + if (text !== 'false') { return '鏄�' } else { return '鍚�' @@ -107,9 +126,10 @@ if (card.intertype !== 'system') { _verify.enable = 'false' } - if (_verify.columns[0] && !_verify.columns[0].type) { + if (_verify.columns[0] && (!_verify.columns[0].type || !_verify.columns[0].output)) { _verify.columns = _verify.columns.map(col => { col.type = col.type || 'text' + col.output = col.output || 'true' return col }) } @@ -192,6 +212,7 @@ } values.uuid = Utils.getuuid() values.abs = 'false' + values.output = 'true' verify.columns.push(values) this.setState({ @@ -398,6 +419,7 @@ Text: item.label, Width: 20, abs: 'false', + output: 'true', type: 'text', uuid: Utils.getuuid() }) @@ -437,6 +459,7 @@ Text: col.Text, Width: 20, abs: 'false', + output: 'true', type: 'text', } diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss index d44185c..00a2630 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss @@ -78,4 +78,9 @@ z-index: 1; } } + .modal-edit-table { + .ant-radio-group { + width: 50px; + } + } } \ No newline at end of file diff --git a/src/templates/zshare/editTable/index.jsx b/src/templates/zshare/editTable/index.jsx index 347b021..3d8fd2b 100644 --- a/src/templates/zshare/editTable/index.jsx +++ b/src/templates/zshare/editTable/index.jsx @@ -110,7 +110,7 @@ ) } else if (inputType === 'radio') { return ( - <Radio.Group> + <Radio.Group style={{whiteSpace: 'nowrap'}}> {options.map((item, i) => (<Radio key={i} value={item.field || item.value}> {item.label || item.text} </Radio>))} </Radio.Group> ) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 809ca9b..2ec443b 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -3066,7 +3066,7 @@ type: 'radio', key: 'interception', label: '鎴彇绌烘牸', - initVal: card.interception || 'false', + initVal: card.interception || 'true', tooltip: '鎻愪氦鏃讹紝鏄惁鎴彇棣栧熬鐨勭┖鐧藉瓧绗︺��', options: [{ value: 'true', -- Gitblit v1.8.0