king
2024-06-21 b78198e00a34eaa2b0a761bb6f42bf14e7771883
src/templates/sharecomponent/searchcomponent/index.jsx
@@ -205,7 +205,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 +213,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,
@@ -330,8 +325,13 @@
    const { config } = this.props
    const { searchlist, visible, sqlVerifing, card, showField, setVisible } = this.state
    let size = ''
    if (config.wrap && config.wrap.searchSize) {
      size = ' mk-size-' + config.wrap.searchSize
    }
    return (
      <div className={'model-table-search-list length' + searchlist.length + (showField ? ' show-field' : '')}>
      <div className={'model-table-search-list length' + searchlist.length + (showField ? ' show-field' : '') + size}>
        <FieldsComponent config={{uuid: config.uuid, search: searchlist}} type="search" />
        <Switch className="switch-field-show" checkedChildren="开" unCheckedChildren="关" defaultChecked={showField} onChange={this.onFieldChange} />
        <DragElement
@@ -347,7 +347,7 @@
          title={card && card.copyType === 'search' ?  '搜索条件-复制' : '搜索条件-编辑'}
          wrapClassName="mk-scroll-modal"
          visible={visible}
          width={850}
          width={950}
          maskClosable={false}
          onOk={this.handleSubmit}
          confirmLoading={sqlVerifing}