From 400fee62fb40006a9839f1c3a8244b82566b5057 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 08 五月 2025 16:30:39 +0800 Subject: [PATCH] Merge branch 'develop' --- src/templates/sharecomponent/searchcomponent/index.jsx | 33 ++++++++++++++++++++------------- 1 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx index 4a0973a..5e6ae12 100644 --- a/src/templates/sharecomponent/searchcomponent/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/index.jsx @@ -61,6 +61,18 @@ }, () => { this.handleSearch(item) }) + } else if (type === 'replace') { + delete item.focus + this.setState({ + searchlist: searchlist.map(cell => { + if (cell.field && cell.field.toLowerCase() === item.field.toLowerCase()) { + return item + } + return cell + }), + }, () => { + this.handleSearch(item) + }) } else if (type === 'multil') { let list = [...searchlist, ...item] list = list.filter(item => !item.origin) // 鍘婚櫎绯荤粺椤� @@ -205,7 +217,7 @@ return } - if (['checkcard', 'select', 'multiselect', 'link'].includes(res.type) && res.resourceType === '1' && /\s/.test(res.dataSource)) { + if (['checkcard', 'select', 'multiselect', 'link'].includes(res.type) && res.resourceType === '1' && res.database !== 'sso' && /\s/.test(res.dataSource)) { this.setState({ sqlVerifing: true }) @@ -213,13 +225,8 @@ let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) ${res.dataSource}` sql = sql.replace(/@\$|\$@/ig, '') - - let rduri = '' - if (window.GLOB.mainSystemApi && res.database === 'sso') { - rduri = window.GLOB.mainSystemApi - } - Api.sDebug(sql, rduri).then(result => { + Api.sDebug(sql).then(result => { if (result.status || result.ErrCode === '-2') { this.setState({ sqlVerifing: false, @@ -252,19 +259,19 @@ */ deleteElement = (card) => { const { config } = this.props - let _this = this + let that = this confirm({ content: `纭畾鍒犻櫎 - ${card.label} 锛焋, onOk() { - let _searchlist = fromJS(_this.state.searchlist).toJS() + let _searchlist = fromJS(that.state.searchlist).toJS() _searchlist = _searchlist.filter(item => item.uuid !== card.uuid) - _this.setState({ + that.setState({ searchlist: _searchlist }, () => { - _this.props.updatesearch({...config, search: _searchlist}) + that.props.updatesearch({...config, search: _searchlist}) }) }, onCancel() {} @@ -332,7 +339,7 @@ let size = '' if (config.wrap && config.wrap.searchSize) { - size = ' mk-size-' + config.wrap.searchSize + size = ' mk-order-' + config.wrap.searchSize } return ( @@ -352,7 +359,7 @@ title={card && card.copyType === 'search' ? '鎼滅储鏉′欢-澶嶅埗' : '鎼滅储鏉′欢-缂栬緫'} wrapClassName="mk-scroll-modal" visible={visible} - width={850} + width={950} maskClosable={false} onOk={this.handleSubmit} confirmLoading={sqlVerifing} -- Gitblit v1.8.0