From 0f22c04237fbe746887feafafca36d5cf996d0e0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 26 九月 2021 18:28:26 +0800 Subject: [PATCH] 2021-09-26 --- src/tabviews/custom/components/card/table-card/index.jsx | 8 +- src/tabviews/custom/components/card/prop-card/index.jsx | 9 ++- src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx | 7 ++ src/tabviews/custom/components/share/tabtransfer/index.jsx | 14 ++-- src/tabviews/custom/components/group/normal-group/index.jsx | 14 ++-- src/tabviews/custom/components/tabs/antv-tabs/index.jsx | 4 src/tabviews/zshare/normalTable/index.jsx | 7 ++ src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx | 16 +++++ src/tabviews/custom/components/table/normal-table/index.jsx | 13 ++- src/tabviews/custom/components/carousel/data-card/index.jsx | 6 + src/tabviews/commontable/index.scss | 2 src/menu/components/share/actioncomponent/actionform/index.jsx | 6 ++ src/tabviews/custom/components/carousel/prop-card/index.jsx | 7 + src/tabviews/zshare/actionList/normalbutton/index.jsx | 6 +- src/tabviews/custom/components/card/data-card/index.jsx | 7 + 15 files changed, 89 insertions(+), 37 deletions(-) diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 136d580..0d5c1a6 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -294,6 +294,12 @@ let _options = this.getOptions(openType, this.state.interType, value, pageTemplate, procMode, Ot) let _fieldval = {} + if (value === 'print') { + _fieldval.label = '鎵撳嵃' + } else if (value === 'closetab') { + _fieldval.label = '鍏抽棴' + } + this.setState({ formlist: this.state.formlist.map(item => { item.hidden = !_options.includes(item.key) diff --git a/src/tabviews/commontable/index.scss b/src/tabviews/commontable/index.scss index c7ed74b..b35a9f4 100644 --- a/src/tabviews/commontable/index.scss +++ b/src/tabviews/commontable/index.scss @@ -137,4 +137,4 @@ clear: both; } } -} +} \ No newline at end of file diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 2a91c12..9f8963a 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -45,7 +45,7 @@ } UNSAFE_componentWillMount () { - const { data, initdata, BID } = this.props + const { data, initdata, BID, BData } = this.props let _config = fromJS(this.props.config).toJS() let _card = null @@ -112,6 +112,7 @@ item.key = index item.$$uuid = item[_config.setting.primaryKey] || '' item.$$BID = BID || '' + item.$$BData = BData || '' item.$Index = index + 1 + '' return item }) @@ -150,6 +151,7 @@ sync: _sync, data: _data, BID: BID || '', + BData: BData || '', config: _config, card: _card, search: Utils.initMainSearch(_config.search), @@ -174,7 +176,7 @@ } UNSAFE_componentWillReceiveProps (nextProps) { - const { sync, config, BID, selected } = this.state + const { sync, config, BID, BData, selected } = this.state if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { let _data = [] @@ -184,6 +186,7 @@ item.key = index item.$$uuid = item[config.setting.primaryKey] || '' item.$$BID = BID || '' + item.$$BData = BData || '' item.$Index = index + 1 + '' return item }) diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index bc19ece..848a7f6 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -31,11 +31,11 @@ sync: false, // 鏄惁缁熶竴璇锋眰鏁版嵁 data: {}, // 鏁版嵁 timer: null, // 瀹氭椂鍣ㄦ椂闂撮棿闅� - BData: null + BData: '' } UNSAFE_componentWillMount () { - const { data, initdata, BID } = this.props + const { data, initdata, BID, BData } = this.props let _config = fromJS(this.props.config).toJS() let _cols = new Map() @@ -64,6 +64,7 @@ if (_data) { _data.$$BID = BID || '' + _data.$$BData = BData || '' } _config.columns.forEach(item => { @@ -116,6 +117,7 @@ sync: _sync, data: _data, BID: BID || '', + BData: BData || '', config: _config, arr_field: _config.columns.map(col => col.field).join(','), }, () => { @@ -150,7 +152,7 @@ * @description 鍥捐〃鏁版嵁鏇存柊锛屽埛鏂板唴瀹� */ UNSAFE_componentWillReceiveProps (nextProps) { - const { sync, config, BID } = this.state + const { sync, config, BID, BData } = this.state if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { let _data = {} @@ -163,6 +165,7 @@ if (_data) { _data.$$BID = BID || '' + _data.$$BData = BData || '' } this.setState({sync: false, data: _data}) diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index 60cb283..fc4ef0b 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -32,7 +32,7 @@ total: 0, // 鎬绘暟 sync: false, // 鏄惁缁熶竴璇锋眰鏁版嵁 data: null, // 鏁版嵁 - BData: null + BData: '' } /** @@ -40,7 +40,7 @@ * 1銆� initdata 涓烘墦鍗版椂浣跨敤鐨勬暟鎹泦 */ UNSAFE_componentWillMount () { - const { data, initdata, BID } = this.props + const { data, initdata, BID, BData } = this.props let _config = fromJS(this.props.config).toJS() let _cols = new Map() @@ -92,6 +92,7 @@ this.setState({ sync: _sync, BID: BID || '', + BData: BData || '', data: _data, config: _config, search: Utils.initMainSearch(_config.search), @@ -128,7 +129,7 @@ * @description 鍥捐〃鏁版嵁鏇存柊锛屽埛鏂板唴瀹� */ UNSAFE_componentWillReceiveProps (nextProps) { - const { sync, config, BID } = this.state + const { sync, config, BID, BData } = this.state if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { let _data = [] @@ -140,6 +141,7 @@ item.key = index item.$$uuid = item[config.setting.primaryKey] || '' item.$$BID = BID || '' + item.$$BData = BData || '' item.$Index = index + 1 + '' return item }) diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx index 8594a40..c2740e4 100644 --- a/src/tabviews/custom/components/carousel/data-card/index.jsx +++ b/src/tabviews/custom/components/carousel/data-card/index.jsx @@ -31,7 +31,7 @@ } UNSAFE_componentWillMount () { - const { data, initdata, BID } = this.props + const { data, initdata, BID, BData } = this.props let _config = fromJS(this.props.config).toJS() let _card = _config.subcards[0] let _cols = new Map() @@ -80,6 +80,7 @@ sync: _sync, data: _data, BID: BID || '', + BData: BData || '', config: _config, card: _card, arr_field: _config.columns.map(col => col.field).join(','), @@ -101,7 +102,7 @@ } UNSAFE_componentWillReceiveProps (nextProps) { - const { sync, config, BID } = this.state + const { sync, config, BID, BData } = this.state if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { let _data = [] @@ -113,6 +114,7 @@ item.key = index item.$$uuid = item[config.setting.primaryKey] || '' item.$$BID = BID || '' + item.$$BData = BData || '' item.$Index = index + 1 return item }) diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx index 316a0e5..5750796 100644 --- a/src/tabviews/custom/components/carousel/prop-card/index.jsx +++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx @@ -30,7 +30,7 @@ } UNSAFE_componentWillMount () { - const { data, initdata, BID } = this.props + const { data, initdata, BID, BData } = this.props let _config = fromJS(this.props.config).toJS() let _cols = new Map() @@ -59,6 +59,7 @@ if (_data) { _data.$$BID = BID || '' + _data.$$BData = BData || '' } _config.columns.forEach(item => { @@ -84,6 +85,7 @@ sync: _sync, data: _data, BID: BID || '', + BData: BData || '', config: _config, arr_field: _config.columns.map(col => col.field).join(','), }, () => { @@ -116,7 +118,7 @@ * @description 鍥捐〃鏁版嵁鏇存柊锛屽埛鏂板唴瀹� */ UNSAFE_componentWillReceiveProps (nextProps) { - const { sync, config, BID } = this.state + const { sync, config, BID, BData } = this.state if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { let _data = {} @@ -129,6 +131,7 @@ if (_data) { _data.$$BID = BID || '' + _data.$$BData = BData || '' } this.setState({sync: false, data: _data}) diff --git a/src/tabviews/custom/components/group/normal-group/index.jsx b/src/tabviews/custom/components/group/normal-group/index.jsx index c2f3198..63406b5 100644 --- a/src/tabviews/custom/components/group/normal-group/index.jsx +++ b/src/tabviews/custom/components/group/normal-group/index.jsx @@ -135,8 +135,10 @@ return config.components.map(item => { let _bid = BID || '' + let BData = '' if (item.setting && item.setting.supModule) { _bid = bids ? bids[item.setting.supModule] || '' : '' + BData = bids ? bids[item.setting.supModule + '_data'] || '' : '' } if (item.type === 'bar' || item.type === 'line') { @@ -178,37 +180,37 @@ } else if (item.type === 'carousel' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselDataCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <CarouselDataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'carousel' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselPropCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <CarouselPropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'card' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <DataCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <DataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'card' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <PropCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <PropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'table' && item.subtype === 'tablecard') { return ( <Col span={item.width} key={item.uuid}> - <TableCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <TableCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'table' && item.subtype === 'normaltable') { return ( <Col span={item.width} key={item.uuid}> - <NormalTable config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <NormalTable config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'tree') { diff --git a/src/tabviews/custom/components/share/tabtransfer/index.jsx b/src/tabviews/custom/components/share/tabtransfer/index.jsx index bb74ab9..b74700f 100644 --- a/src/tabviews/custom/components/share/tabtransfer/index.jsx +++ b/src/tabviews/custom/components/share/tabtransfer/index.jsx @@ -157,8 +157,10 @@ return config.components.map(item => { let BID = this.props.BID || '' + let BData = '' if (item.setting && item.setting.supModule) { BID = bids[item.setting.supModule] || '' + BData = bids[item.setting.supModule + '_data'] || '' } if (item.type === 'bar' || item.type === 'line') { @@ -200,37 +202,37 @@ } else if (item.type === 'card' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <DataCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <DataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'card' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <PropCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <PropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'carousel' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselDataCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <CarouselDataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'carousel' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselPropCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <CarouselPropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'table' && item.subtype === 'tablecard') { return ( <Col span={item.width} key={item.uuid}> - <TableCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <TableCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'table' && item.subtype === 'normaltable') { return ( <Col span={item.width} key={item.uuid}> - <NormalTable config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <NormalTable config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'group' && item.subtype === 'normalgroup') { diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index 6fdb93b..9adf4bf 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -56,7 +56,7 @@ * 1銆� initdata 涓烘墦鍗版椂浣跨敤鐨勬暟鎹泦 */ UNSAFE_componentWillMount () { - const { data, initdata, BID } = this.props + const { data, initdata, BID, BData } = this.props let _config = fromJS(this.props.config).toJS() let _cols = new Map() let _data = null @@ -80,6 +80,7 @@ item.key = index item.$$uuid = item[_config.setting.primaryKey] || '' item.$$BID = BID || '' + item.$$BData = BData || '' item.$Index = index + 1 + '' return item }) @@ -124,6 +125,7 @@ this.setState({ BID: BID || '', + BData: BData || '', title: _config.wrap.title, sync: _sync, data: _data, @@ -521,7 +523,7 @@ } UNSAFE_componentWillReceiveProps(nextProps) { - const { sync, config, setting, BID } = this.state + const { sync, config, setting, BID, BData } = this.state if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { let _data = [] @@ -531,6 +533,7 @@ item.key = index item.$$uuid = item[config.setting.primaryKey] || '' item.$$BID = BID || '' + item.$$BData = BData || '' item.$Index = index + 1 + '' return item }) @@ -578,7 +581,7 @@ } render() { - const { BID, setting, searchlist, actions, config, columns, selectedData } = this.state + const { BID, setting, searchlist, actions, config, columns, selectedData, BData } = this.state return ( <div className="custom-normal-table" style={config.style}> @@ -591,7 +594,7 @@ BID={BID} setting={setting} actions={actions} - BData={this.state.BData} + BData={BData} columns={config.columns} selectedData={selectedData} /> @@ -620,7 +623,7 @@ BID={BID} setting={setting} actions={actions} - BData={this.state.BData} + BData={BData} columns={config.columns} selectedData={selectedData} /> diff --git a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx index 61e8418..23aa817 100644 --- a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx +++ b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx @@ -52,13 +52,13 @@ MKEmitter.removeListener('resetSelectLine', this.resetParentParam) } - resetParentParam = (MenuID, id) => { + resetParentParam = (MenuID, id, data) => { const { parentIds, bids } = this.state if (!parentIds.includes(MenuID)) return this.setState({ - bids: {...bids, [MenuID]: id} + bids: {...bids, [MenuID]: id, [MenuID + '_data']: data} }) } diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 0aaf855..90353f7 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -1803,7 +1803,7 @@ * @description 鏄剧ず妯℃�佹 */ getModels = () => { - const { setting, BID, btn } = this.props + const { setting, BID, btn, BData } = this.props const { btnconfig, visible } = this.state if (!btnconfig || !btnconfig.setting) return null @@ -1837,7 +1837,7 @@ action={btnconfig} inputSubmit={this.handleOk} data={this.state.tabledata[0]} - BData={this.props.BData} + BData={BData} wrappedComponentRef={(inst) => this.formRef = inst} /> <div style={{ position: 'absolute', zIndex: 1, right: 0, bottom: 0, width: '100%', borderTop: '1px solid #e9e9e9', padding: '10px 16px', background: '#fff', textAlign: 'right'}}> @@ -1880,7 +1880,7 @@ action={btnconfig} inputSubmit={this.handleOk} data={this.state.tabledata[0]} - BData={this.props.BData} + BData={BData} wrappedComponentRef={(inst) => this.formRef = inst} /> </Modal> diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx index af96ca2..56a792b 100644 --- a/src/tabviews/zshare/normalTable/index.jsx +++ b/src/tabviews/zshare/normalTable/index.jsx @@ -1173,6 +1173,11 @@ style.fontSize = setting.fontSize } + let loading = this.props.loading + if (setting.mask === 'hidden') { + loading = false + } + return ( <div className={'normal-data-table mingke-table ' + (height ? 'fixed-height' : '')}> {offset && <Affix offsetTop={offset} className="fix-header"> @@ -1252,7 +1257,7 @@ return className }} - loading={this.props.loading} + loading={loading} scroll={{ x: '100%', y: height }} onRow={(record, index) => { if (setting.tableMode === 'fast') { diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx index 6327b6a..7b796c3 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx @@ -316,7 +316,12 @@ } ] })( - <Select dropdownClassName="print-template-setting" onChange={this.changeTemplate}> + <Select + showSearch + filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} + dropdownClassName="print-template-setting" + onChange={this.changeTemplate} + > {this.state.templates.map((option, key) => <Select.Option id={key} key={key} value={option.value}> {option.text} diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx index 1d1e1d5..27bdb93 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx @@ -663,6 +663,22 @@ </Col> <Col span={12}> <Form.Item label={ + <Tooltip placement="topLeft" title="鏁版嵁鍔犺浇鏃讹紝鏄惁鏄剧ず鍔犺浇涓殑閬僵銆�"> + <Icon type="question-circle" /> + 閬僵 + </Tooltip> + }> + {getFieldDecorator('mask', { + initialValue: setting.mask || 'show' + })( + <Radio.Group> + <Radio value="show">鏄剧ず</Radio> + <Radio value="hidden">闅愯棌</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label={ <Tooltip placement="topLeft" title="楂樼骇鎼滅储寮圭獥鐨勫搴︼紝娉細褰撳搴﹀�煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺��"> <Icon type="question-circle" /> 楂樼骇鎼滅储 -- Gitblit v1.8.0