king
2020-05-09 aaaf56d7ca060f7c681d6b8a67aac46aa89a4dbc
2020-05-09
12个文件已修改
416 ■■■■ 已修改文件
src/tabviews/commontable/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/managetable/index.jsx 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/dategroup/index.jsx 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/dategroup/index.scss 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/searchform/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/customscript/index.jsx 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx
@@ -567,12 +567,15 @@
  async loadmaindata () {
    const { setting, BIDs, search } = this.state
    let param = ''
    let requireFields = search.filter(item => item.required && !item.value)
    let requireFields = search.filter(item => item.required && (!item.value || item.value.length === 0))
    if (requireFields.length > 0) {
      let labels = requireFields.map(item => item.label)
      labels = Array.from(new Set(labels))
      notification.warning({
        top: 92,
        message: this.state.dict['form.required.input'] + requireFields.map(item => item.label).join('、') + ' !',
        message: this.state.dict['form.required.input'] + labels.join('、') + ' !',
        duration: 3
      })
      return
@@ -690,20 +693,22 @@
      _dataresource = '(' + _dataresource + ') tb'
    }
    if (setting.queryType === 'statistics') { // 统计数据源,内容替换
    let regoptions = null
    if (setting.queryType === 'statistics' || param.custom_script) {
      let allSearch = Utils.getAllSearchOptions(search)
      let options = allSearch.map(item => {
      regoptions = allSearch.map(item => {
        return {
          reg: new RegExp('@' + item.key + '@', 'ig'),
          value: item.value
          value: `'${item.value}'`
        }
      })
    }
      options.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, `'${item.value}'`)
    if (setting.queryType === 'statistics') { // 统计数据源,内容替换
      regoptions.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, item.value)
      })
      _search = ''
    }
@@ -715,7 +720,28 @@
      DateCount = ''
    }
    if (param.custom_script) {
      regoptions.push({
        reg: new RegExp('@orderBy@', 'ig'),
        value: _orderBy
      })
      if (setting.laypage !== 'false') {
        regoptions.push({
          reg: new RegExp('@pageSize@', 'ig'),
          value: pageSize
        }, {
          reg: new RegExp('@pageIndex@', 'ig'),
          value: pageIndex
        })
      }
      regoptions.forEach(item => {
        param.custom_script = param.custom_script.replace(item.reg, item.value)
      })
    param.custom_script = Utils.formatOptions(param.custom_script)
    }
    param.LText = Utils.formatOptions(LText)
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
src/tabviews/managetable/index.jsx
@@ -410,7 +410,9 @@
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
      arr_field: arr_field
      arr_field: arr_field,
      custom_script: setting.customScript || '',
      default_sql: setting.default || 'true'
    }
    
    let _orderBy = orderBy || setting.order
@@ -420,25 +422,55 @@
      _dataresource = '(' + _dataresource + ') tb'
    }
    if (setting.queryType === 'statistics') { // 统计数据源,内容替换
    let regoptions = null
    if (setting.queryType === 'statistics' || param.custom_script) {
      let allSearch = Utils.getAllSearchOptions(search)
      let options = allSearch.map(item => {
      regoptions = allSearch.map(item => {
        return {
          reg: new RegExp('@' + item.key + '@', 'ig'),
          value: item.value
          value: `'${item.value}'`
        }
      })
    }
      options.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, `'${item.value}'`)
    if (setting.queryType === 'statistics') { // 统计数据源,内容替换
      regoptions.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, item.value)
      })
      _search = ''
    }
    let LText = `select top ${pageSize} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${_orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows`
    let DateCount = `select count(1) as total from ${_dataresource} ${_search}`
    if (setting.laypage === 'false') {
      LText = `select ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${_orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows`
      DateCount = ''
    }
    if (param.custom_script) {
      regoptions.push({
        reg: new RegExp('@orderBy@', 'ig'),
        value: _orderBy
      })
      if (setting.laypage !== 'false') {
        regoptions.push({
          reg: new RegExp('@pageSize@', 'ig'),
          value: pageSize
        }, {
          reg: new RegExp('@pageIndex@', 'ig'),
          value: pageIndex
        })
      }
      regoptions.forEach(item => {
        param.custom_script = param.custom_script.replace(item.reg, item.value)
      })
      param.custom_script = Utils.formatOptions(param.custom_script)
    }
    param.LText = Utils.formatOptions(LText)
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
src/tabviews/subtable/index.jsx
@@ -451,12 +451,15 @@
    let param = ''
    let _BID = this.props.BID
    let requireFields = search.filter(item => item.required && !item.value)
    let requireFields = search.filter(item => item.required && (!item.value || item.value.length === 0))
    if (requireFields.length > 0) {
      let labels = requireFields.map(item => item.label)
      labels = Array.from(new Set(labels))
      notification.warning({
        top: 92,
        message: this.state.dict['form.required.input'] + requireFields.map(item => item.label).join('、') + ' !',
        message: this.state.dict['form.required.input'] + labels.join('、') + ' !',
        duration: 3
      })
      return
@@ -593,20 +596,22 @@
      _dataresource = '(' + _dataresource + ') tb'
    }
    if (setting.queryType === 'statistics') { // 统计数据源,内容替换
    let regoptions = null
    if (setting.queryType === 'statistics' || param.custom_script) {
      let allSearch = Utils.getAllSearchOptions(search)
      let options = allSearch.map(item => {
      regoptions = allSearch.map(item => {
        return {
          reg: new RegExp('@' + item.key + '@', 'ig'),
          value: item.value
          value: `'${item.value}'`
        }
      })
    }
      options.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, `'${item.value}'`)
    if (setting.queryType === 'statistics') { // 统计数据源,内容替换
      regoptions.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, item.value)
      })
      _search = ''
    }
@@ -618,7 +623,28 @@
      DateCount = ''
    }
    if (param.custom_script) {
      regoptions.push({
        reg: new RegExp('@orderBy@', 'ig'),
        value: _orderBy
      })
      if (setting.laypage !== 'false') {
        regoptions.push({
          reg: new RegExp('@pageSize@', 'ig'),
          value: pageSize
        }, {
          reg: new RegExp('@pageIndex@', 'ig'),
          value: pageIndex
        })
      }
      regoptions.forEach(item => {
        param.custom_script = param.custom_script.replace(item.reg, item.value)
      })
    param.custom_script = Utils.formatOptions(param.custom_script)
    }
    param.LText = Utils.formatOptions(LText)
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
src/tabviews/subtabtable/index.jsx
@@ -358,12 +358,15 @@
    const { setting, search } = this.state
    let param = ''
    let requireFields = search.filter(item => item.required && !item.value)
    let requireFields = search.filter(item => item.required && (!item.value || item.value.length === 0))
    if (requireFields.length > 0) {
      let labels = requireFields.map(item => item.label)
      labels = Array.from(new Set(labels))
      notification.warning({
        top: 92,
        message: this.state.dict['form.required.input'] + requireFields.map(item => item.label).join('、') + ' !',
        message: this.state.dict['form.required.input'] + labels.join('、') + ' !',
        duration: 3
      })
      return
@@ -469,20 +472,22 @@
      _dataresource = '(' + _dataresource + ') tb'
    }
    if (setting.queryType === 'statistics') { // 统计数据源,内容替换
    let regoptions = null
    if (setting.queryType === 'statistics' || param.custom_script) {
      let allSearch = Utils.getAllSearchOptions(search)
      let options = allSearch.map(item => {
      regoptions = allSearch.map(item => {
        return {
          reg: new RegExp('@' + item.key + '@', 'ig'),
          value: item.value
          value: `'${item.value}'`
        }
      })
    }
      options.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, `'${item.value}'`)
    if (setting.queryType === 'statistics') { // 统计数据源,内容替换
      regoptions.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, item.value)
      })
      _search = ''
    }
@@ -494,7 +499,28 @@
      DateCount = ''
    }
    if (param.custom_script) {
      regoptions.push({
        reg: new RegExp('@orderBy@', 'ig'),
        value: _orderBy
      })
      if (setting.laypage !== 'false') {
        regoptions.push({
          reg: new RegExp('@pageSize@', 'ig'),
          value: pageSize
        }, {
          reg: new RegExp('@pageIndex@', 'ig'),
          value: pageIndex
        })
      }
      regoptions.forEach(item => {
        param.custom_script = param.custom_script.replace(item.reg, item.value)
      })
    param.custom_script = Utils.formatOptions(param.custom_script)
    }
    param.LText = Utils.formatOptions(LText)
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
src/tabviews/zshare/dategroup/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { DatePicker, Tooltip } from 'antd'
import { DatePicker, Tooltip, Icon } from 'antd'
import moment from 'moment'
import Utils from '@/utils/utils.js'
@@ -12,14 +12,17 @@
class DateGroup extends Component {
  static propTpyes = {
    card: PropTypes.object    // 字典项
    card: PropTypes.object,         // 搜索条件
    onGroupChange: PropTypes.func   // 搜索内容切换
  }
  state = {
    active: '',
    quarterId: Utils.getuuid(),
    yearId: Utils.getuuid(),
    dateRange: ''
    dateRange: '',
    initDateRange: '',
    initType: ''
  }
  UNSAFE_componentWillMount() {
@@ -77,13 +80,11 @@
      }
      this.setState({
        active: card.initval[0],
        dateRange: _dateRange
        dateRange: _dateRange,
        initDateRange: _dateRange,
        initType: card.initval[0]
      })
    }
  }
  changeTab = () => {
  }
  onChange = (date, type) => {
@@ -107,7 +108,55 @@
    this.setState({
      active: type,
      dateRange: values
    }, () => {
      this.props.onGroupChange()
    })
  }
  clearTime = () => {
    this.setState({
      active: '',
      dateRange: ''
    }, () => {
      this.props.onGroupChange()
    })
  }
  reset = () => {
    const { initDateRange, initType } = this.state
    this.setState({
      active: initType,
      dateRange: initDateRange
    })
  }
  getSearchItems = () => {
    const { card } = this.props
    const { dateRange, active } = this.state
    let items = []
    items.push({
      type: 'daterange',
      key: card.datefield,
      value: dateRange,
      label: card.label,
      match: 'between',
      required: card.required === 'true'
    })
    if (card.transfer === 'true') {
      items.push({
        type: card.type,
        key: card.field,
        value: active,
        label: card.label,
        match: '=',
        required: card.required === 'true'
      })
    }
    return items
  }
  render() {
@@ -164,7 +213,12 @@
            </span>)
          }
        })}
        <div className="table-search-date-group-value">{dateRange ? dateRange.join(' ~ ') : ''}</div>
        {dateRange ? <div className="table-search-date-group-value">
          {dateRange.join(' ~ ')}
          <Icon type="close-circle" onClick={this.clearTime} className="ant-calendar-picker-clear" />
        </div> : null}
        {!dateRange && card.required === 'true' ? <div className="ant-form-explain">请选择{card.label}!</div> : null}
      </div>
    )
  }
src/tabviews/zshare/dategroup/index.scss
@@ -44,6 +44,9 @@
    margin-right: 2px;
    padding: 2px 7px;
  }
  .ant-tag-checkable:active {
    background-color: #ffffff;
  }
  .ant-tag-checkable-checked {
    border-color: #1890ff;
  }
@@ -52,13 +55,27 @@
    line-height: 20px;
    font-size: 12px;
    bottom: -15px;
    color: rgba(0, 0, 0, 0.45);
    padding-right: 25px;
    .ant-calendar-picker-clear {
      cursor: pointer;
      right: 5px;
      pointer-events: unset;
  }
}
// .group-week-picker {
//   .ant-calendar {
//     margin-top: -15px;
//   }
// }
  .table-search-date-group-value:hover {
    .ant-calendar-picker-clear {
      opacity: 0.8;
    }
  }
  .ant-form-explain {
    color: #f5222d;
    position: absolute;
    bottom: -18px;
  }
}
@media screen and (min-width: 1600px) {
  .table-search-date-group {
    .ant-tag-checkable {
src/tabviews/zshare/topSearch/index.jsx
@@ -21,6 +21,7 @@
    label: null,            // 提示文字
    required: null,         // 是否必填
    searchlist: null,       // 搜索项
    groups: null,           // 组合搜索项
    formId: Utils.getuuid() // 搜索表单Id
  }
@@ -51,6 +52,7 @@
      _list.push(item)
    })
    let _groups = []
    _list = _list.map(item => {
      if (item.type === 'link') {
        let supItem = _list.filter(form => form.field === item.linkField)[0]
@@ -64,6 +66,8 @@
        } else {
          item.options = item.oriOptions.filter(option => option.parentId === supItem.initval)
        }
      } else if (item.type === 'group') {
        _groups.push(JSON.parse(JSON.stringify(item)))
      }
      return item
@@ -74,7 +78,8 @@
      label: label,
      style: style,
      required: required,
      searchlist: _list
      searchlist: _list,
      groups: _groups
    })
  }
@@ -240,6 +245,7 @@
                <Select
                  showSearch
                  mode="multiple"
                  onChange={this.searchChange}
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  getPopupContainer={() => document.getElementById(this.state.formId)}
                >
@@ -343,8 +349,8 @@
      } else if (item.type === 'group') {
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.label} className={item.required ? 'group-required' : ''}>
              <DateGroup card={item} />
            <Form.Item label={item.label} className={item.required === 'true' ? 'group-required' : ''}>
              <DateGroup ref={item.uuid} card={item} onGroupChange={this.searchChange} />
            </Form.Item>
          </Col>
        )
@@ -385,16 +391,29 @@
    })
  }
  /**
   * @description 搜索条件重置
   */
  handleReset = () => {
    // 重置
    const { groups } = this.state
    if (groups.length > 0) {
      groups.forEach(item => {
        this.refs[item.uuid].reset()
      })
    }
    this.props.form.resetFields()
    this.props.form.validateFields((err, values) => {
      // 异步获取更新后的时间组
      this.setState({}, () => {
      let searches = this.getFieldsValues(values)
      this.props.refreshdata(searches)
      })
    })
  }
  getFieldsValues = (values) => {
    const { groups } = this.state
    // 获取搜索条件值
    let search = []
    Object.keys(values).forEach(key => {
@@ -432,6 +451,14 @@
        required: this.state.required[key]
      })
    })
    if (groups.length > 0) {
      groups.forEach(item => {
        let items = this.refs[item.uuid].getSearchItems()
        search.push(...items)
      })
    }
    return search
  }
src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -324,7 +324,9 @@
          return form
        })
      })
      if (this.props.form.getFieldValue('initval') !== undefined) {
      let _initval = this.props.form.getFieldValue('initval')
      if (_initval && !values.includes(_initval[0])) {
        this.props.form.setFieldsValue({initval: ''})
      }
    }
src/templates/sharecomponent/settingcomponent/settingform/customscript/index.jsx
@@ -12,7 +12,8 @@
class CustomForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,         // 字典项
    tableName: PropTypes.string,    // 表名
    setting: PropTypes.object,      // 设置
    searches: PropTypes.array,      // 搜索条件
    systemScripts: PropTypes.array, // 系统脚本
    customScripts: PropTypes.array, // 自定义脚本
    scriptsChange: PropTypes.func   // 表单
@@ -20,7 +21,27 @@
  state = {
    editItem: null,
    loading: false
    loading: false,
    usefulFields: ''
  }
  UNSAFE_componentWillMount() {
    const { searches } = this.props
    let _usefulFields = searches.map(item => {
      if (item.type === 'group') {
        if (item.transfer === 'true') {
          return item.field + ', ' + item.datefield
        } else {
          return item.datefield
        }
      } else {
        return item.field
      }
    })
    this.setState({
      usefulFields: _usefulFields.join(', ')
    })
  }
  edit = (record) => {
@@ -35,6 +56,8 @@
  }
  handleConfirm = () => {
    const { searches, setting } = this.props
    // 表单提交时检查输入值是否正确
    this.props.form.validateFieldsAndScroll((err, values) => {
      if (!err) {
@@ -101,6 +124,34 @@
          LText: _initsql + values.sql + tail
        }
        let allSearch = Utils.initMainSearch(searches)
        allSearch = Utils.getAllSearchOptions(allSearch)
        let regoptions = allSearch.map(item => {
          return {
            reg: new RegExp('@' + item.key + '@', 'ig'),
            value: `'${item.value}'`
          }
        })
        regoptions.push({
          reg: new RegExp('@orderBy@', 'ig'),
          value: setting.order
        })
        if (setting.laypage !== 'false') {
          regoptions.push({
            reg: new RegExp('@pageSize@', 'ig'),
            value: 10
          }, {
            reg: new RegExp('@pageIndex@', 'ig'),
            value: 1
          })
        }
        regoptions.forEach(item => {
          param.LText = param.LText.replace(item.reg, item.value)
        })
        param.LText = Utils.formatOptions(param.LText)
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
@@ -149,8 +200,9 @@
  }
  render() {
    const { systemScripts, tableName } = this.props
    const { systemScripts, setting } = this.props
    const { getFieldDecorator } = this.props.form
    const { usefulFields } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -165,9 +217,9 @@
    return (
      <Form {...formItemLayout} className="modal-menu-setting-script">
        <Row gutter={24}>
          {tableName ? <Col span={8}>
          {setting.tableName ? <Col span={8}>
            <Form.Item label={'表名'} style={{whiteSpace: 'nowrap', margin: 0}}>
              {tableName}
              {setting.tableName}
            </Form.Item>
          </Col> : null}
          <Col span={16}>
@@ -177,7 +229,7 @@
          </Col>
          <Col span={24} className="sqlfield">
            <Form.Item label={'可用字段'}>
              id, bid, loginuid, sessionuid, userid, appkey
              id, bid, loginuid, sessionuid, userid, appkey{usefulFields ? ', ' + usefulFields : ''}
            </Form.Item>
          </Col>
          <Col span={8} style={{whiteSpace: 'nowrap'}}>
src/templates/sharecomponent/settingcomponent/settingform/index.jsx
@@ -408,7 +408,23 @@
        value: search.initval,
        required: search.required === 'true'
      }
      if (item.type === 'date') {
      if (item.type === 'group') {
        let copy = fromJS(item).toJS()
        copy.key = search.datefield
        item.value = search.initval && search.initval[0] ? search.initval[0] : '@$@'
        item.match = '='
        copy.type = 'daterange'
        copy.match = 'between'
        copy.value = [moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
        if (search.transfer === 'true') {
          newsearches.push(item)
        }
        newsearches.push(copy)
        return
      } else if (item.type === 'date') {
        item.value = moment().format('YYYY-MM-DD')
      } else if (item.type === 'datemonth') {
        item.value = moment().format('YYYY-MM')
@@ -483,7 +499,7 @@
          _search = ''
        }
        let LText = `select ${setting.laypage !== 'false' ?  'top 10' : ''} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource} ${_search}) tmptable ${setting.laypage !== 'false' ?  'where rows > 0' : ''} order by tmptable.rows`
        let LText = `select ${setting.laypage !== 'false' ?  'top @pageSize@' : ''} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by @orderBy@) as rows from ${_dataresource} ${_search}) tmptable ${setting.laypage !== 'false' ?  'where rows > (@pageSize@ * (@pageIndex@ - 1))' : ''} order by tmptable.rows`
        let _scripts = fromJS(this.state.systemScripts).toJS()
        _scripts[0].value = LText
@@ -803,6 +819,7 @@
  }
  render() {
    const { config } = this.props
    const { formlist, view, setting, scriptsColumns, systemScripts } = this.state
    const formItemLayout = {
      labelCol: {
@@ -820,8 +837,9 @@
        {view ==='custom' ? <div>
          <CustomScript
            dict={this.props.dict}
            tableName={setting.tableName}
            setting={setting}
            customScripts={setting.scripts}
            searches={config.search}
            systemScripts={systemScripts}
            scriptsChange={this.scriptsChange}
            wrappedComponentRef={(inst) => this.scriptsForm = inst}
src/templates/zshare/formconfig.jsx
@@ -620,7 +620,7 @@
      key: 'transfer',
      label: '传递',
      initVal: card.transfer || 'false',
      tooltip: '数据查询时,类型字段是否作为参数传递。',
      tooltip: '数据查询时,类型字段是否作为参数传递,类型字段对应值为 {"日": "day", "周": "week", "月": "month", "季": "quarter", "年": "year", "自定义": "customized"}。',
      options: [{
        value: 'true',
        text: Formdict['header.form.true']
src/utils/utils.js
@@ -312,14 +312,14 @@
        }
        if (newsearches[item.key]) {
          newsearches[item.key + '1'] = _val ? _val + timetail : null
          newsearches[item.key + '1'] = _val ? _val + timetail : ''
        } else {
          newsearches[item.key] = _val ? _val + timetail : null
          newsearches[item.key] = _val ? _val + timetail : ''
        }
      } else if (item.type === 'datemonth') {
        // 月-过滤条件,从月开始至结束
        let _startval = null
        let _endval = null
        let _startval = ''
        let _endval = ''
        if (item.value) {
          _startval = moment(item.value, 'YYYY-MM').startOf('month').format('YYYY-MM-DD') + ' 00:00:00.000'
@@ -334,16 +334,16 @@
          _endval = moment(item.value[1], 'YYYY-MM-DD').add(1, 'days').format('YYYY-MM-DD')
        }
        newsearches[item.key] = item.value ? item.value[0] + ' 00:00:00.000' : null
        newsearches[item.key + '1'] = item.value ? _endval + ' 00:00:00.000' : null
        newsearches[item.key] = item.value ? item.value[0] + ' 00:00:00.000' : ''
        newsearches[item.key + '1'] = item.value ? _endval + ' 00:00:00.000' : ''
      } else if (item.type === 'daterange') {
        let _endval = ''
        if (item.value) {
          _endval = moment(item.value[1], 'YYYY-MM-DD').add(1, 'days').format('YYYY-MM-DD')
        }
        newsearches[item.key] = item.value ? item.value[0] + ' 00:00:00.000' : null
        newsearches[item.key + '1'] = item.value ? _endval + ' 00:00:00.000' : null
        newsearches[item.key] = item.value ? item.value[0] + ' 00:00:00.000' : ''
        newsearches[item.key + '1'] = item.value ? _endval + ' 00:00:00.000' : ''
      } else if (item.type === 'text') {
        item.key.split(',').forEach(field => { // 综合搜索,所字段拼接
          newsearches[field] = item.value