king
2022-10-17 e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5
src/menu/components/search/main-search/index.jsx
@@ -7,8 +7,6 @@
import Api from '@/api'
import Utils from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import { getSearchForm } from '@/templates/zshare/formconfig'
import { resetStyle } from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
@@ -34,7 +32,6 @@
  }
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    appType: sessionStorage.getItem('appType'),
    searchlist: null,    // 搜索条件集
    sqlVerifing: false,  // sql验证中
@@ -318,11 +315,10 @@
   * @description 搜索条件删除
   */
  deleteElement = (cell) => {
    const { dict } = this.state
    let _this = this
    confirm({
      content: dict['model.confirm'] + dict['model.delete'] + ` - ${cell.label} ?`,
      content: `确定删除 - ${cell.label} ?`,
      onOk() {
        let _card = fromJS(_this.state.card).toJS()
        _card.search = _card.search.filter(item => item.uuid !== cell.uuid)
@@ -406,13 +402,13 @@
  }
  render() {
    const { dict, card, visible, sqlVerifing, showField } = this.state
    const { card, visible, sqlVerifing, showField } = this.state
    let _style = resetStyle(card.style)
    return (
      <div className={`main-search-edit-list ${card.wrap.float} ${showField ? 'show-field' : ''}`} onClick={this.clickComponent} id={card.uuid} style={_style}>
        <FieldsComponent config={card} type="search" />
        <Switch checkedChildren={dict['model.switch.open']} size="small" unCheckedChildren={dict['model.switch.close']} defaultChecked={showField} onChange={this.onFieldChange} />
        <Switch checkedChildren="开" size="small" unCheckedChildren="关" defaultChecked={showField} onChange={this.onFieldChange} />
        <DragElement
          list={card.search}
          setting={card.wrap}
@@ -447,7 +443,6 @@
          destroyOnClose
        >
          <SearchForm
            dict={dict}
            card={this.state.editcard}
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}