king
2022-03-02 023895591327d0c210eec054d2c1d7991cefd413
2022-03-02
4个文件已修改
107 ■■■■■ 已修改文件
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/search/single-search/options.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -170,6 +170,23 @@
        text: '是'
      }]
    },
    // {
    //   type: 'radio',
    //   key: 'editType',
    //   label: '编辑类型',
    //   initVal: card.editType || 'text',
    //   required: true,
    //   options: [{
    //     value: 'text',
    //     text: '文本'
    //   }, {
    //     value: 'select',
    //     text: '下拉'
    //   }, {
    //     value: 'switch',
    //     text: '开关'
    //   }]
    // },
    {
      type: 'radio',
      key: 'required',
src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -32,8 +32,10 @@
  state = {
    visible: false,
    formlist: null
    formlist: null,
  }
  column = null
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.column && !is(fromJS(this.props.column), fromJS(nextProps.column))) {
@@ -41,22 +43,29 @@
    }
  }
  editColumn = (column) => {
    let formlist = getColumnForm(column, this.props.fields, this.props.columns)
    let _options = fromJS(columnTypeOptions[column.type]).toJS()
  getOptions = () => {
    let _options = fromJS(columnTypeOptions[this.column.type]).toJS()
    if (column.editable === 'true') {
      if (column.type === 'text') {
        _options.push('required', 'enter', 'footEnter')
      } else if (column.type === 'number') {
    if (this.column.editable === 'true') {
      if (this.column.type === 'text') {
        _options.push('editType', 'required', 'enter', 'footEnter')
      } else if (this.column.type === 'number') {
        _options.push('max', 'min', 'enter', 'footEnter')
      }
    }
    return _options
  }
  editColumn = (column) => {
    let formlist = getColumnForm(column, this.props.fields, this.props.columns)
    this.column = fromJS(column).toJS()
    let _options = this.getOptions()
    this.setState({
      visible: true,
      editable: column.editable || 'false',
      type: column.type,
      formlist: formlist.map(item => {
        item.hidden = !_options.includes(item.key)
@@ -76,23 +85,15 @@
  }
  typeChange = (key, value, option) => {
    const { editable, type } = this.state
    if (key === 'type') {
      let _options = fromJS(columnTypeOptions[value]).toJS()
    this.column[key] = value
      if (editable === 'true') {
        if (value === 'text') {
          _options.push('required', 'enter', 'footEnter')
        } else if (value === 'number') {
          _options.push('max', 'min', 'enter', 'footEnter')
        }
      }
    if (key === 'type') {
      let _options = this.getOptions()
      this.setState({
        type: value,
        formlist: this.state.formlist.map(item => {
          if (item.key === 'editable') {
            item.initVal = editable
            item.initVal = this.column.editable || 'false'
          }
          item.hidden = !_options.includes(item.key)
@@ -116,22 +117,16 @@
        values.type = 'text'
      }
      if (values.type !== this.state.type) {
        let _options = fromJS(columnTypeOptions[values.type]).toJS()
      let _type = this.column.type
      this.column.type = values.type
        if (editable === 'true') {
          if (values.type === 'text') {
            _options.push('required', 'enter', 'footEnter')
          } else if (values.type === 'number') {
            _options.push('max', 'min', 'enter', 'footEnter')
          }
        }
      if (values.type !== _type) {
        let _options = this.getOptions()
        this.setState({
          type: values.type,
          formlist: this.state.formlist.map(item => {
            if (item.key === 'editable') {
              item.initVal = editable
              item.initVal = this.column.editable || 'false'
            }
            item.hidden = !_options.includes(item.key)
@@ -146,18 +141,9 @@
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    } else if (key === 'editable') {
      let _options = fromJS(columnTypeOptions[type]).toJS()
      if (value === 'true') {
        if (type === 'text') {
          _options.push('required', 'enter', 'footEnter')
        } else if (type === 'number') {
          _options.push('max', 'min', 'enter', 'footEnter')
        }
      }
      let _options = this.getOptions()
      this.setState({
        editable: value,
        formlist: this.state.formlist.map(item => {
          item.hidden = !_options.includes(item.key)
src/mob/components/search/single-search/options.jsx
@@ -46,6 +46,18 @@
    },
    {
      type: 'radio',
      field: 'focus',
      label: '自动聚焦',
      initval: wrap.focus || 'false',
      tooltip: '注:ios系统中无效。',
      required: false,
      options: [
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ]
    },
    {
      type: 'radio',
      field: 'required',
      label: '必填',
      initval: wrap.required || 'false',
src/views/login/index.jsx
@@ -361,10 +361,12 @@
            keys[char] = (offset + i) % 10
          }
  
          let lictime = +key2.replace(/[A-Z]/ig, (s) => {
          let lictime = key2.replace(/[A-Z]/ig, (s) => {
            return keys[s]
          })
          let curtime = +moment().format('YYYYMMDD')
          lictime = lictime.slice(0,4) + '/' + lictime.slice(4,6) + '/' + lictime.slice(6)
          lictime = Math.floor(new Date(lictime).getTime() / 86400000)
          let curtime = Math.floor(new Date().getTime() / 86400000)
          let licday = lictime - curtime
          let _mindUrl = window.location.href.split('#')[0] + 'notMind'