king
2022-07-01 c5b6f6cb5bba7268aaa2496bbf21bf2965277f8b
src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -119,7 +119,6 @@
    openType: null,          // 搜索条件显示类型
    resourceType: null,      // 下拉搜索时,选项来源类型
    formlist: null,          // 表单
    display: null,
    cFields: [],
    textTooltip: '字段名可以使用逗号分隔,进行综合搜索',
  }
@@ -189,17 +188,28 @@
        shows.push('dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database')
      }
    } else if (type === 'checkcard') {
      reRequired.fields = false
      if (this.record.display === 'picture') {
        if (this.record.resourceType === '0') {        // 自定义资源
          shows.push('options', 'picratio')
          shows.push('options', 'fields', 'picratio')
        } else if (this.record.resourceType === '1') { // 数据源
          shows.push('dataSource', 'cardValField', 'urlField', 'orderBy', 'orderType', 'database', 'picratio')
          shows.push('dataSource', 'cardValField', 'fields', 'urlField', 'orderBy', 'orderType', 'database', 'picratio')
        }
      } else if (this.record.display === 'color') {
        if (this.record.resourceType === '0') {        // 自定义资源
          shows.push('options', 'fields')
        } else if (this.record.resourceType === '1') { // 数据源
          shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database')
        }
      } else {
        reRequired.fields = true
        if (this.record.resourceType === '0') {        // 自定义资源
          shows.push('options', 'fields', 'backgroundColor', 'borderColor')
          shows.push('options', 'fields', 'selectStyle')
        } else if (this.record.resourceType === '1') { // 数据源
          shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database', 'backgroundColor', 'borderColor')
          shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database', 'selectStyle')
        }
        if (this.record.selectStyle === 'custom') {
          shows.push('backgroundColor')
        }
      }
      shows.push('linkField')
@@ -509,7 +519,7 @@
          { required: item.required, message: dict['form.required.select'] + item.label + '!' }
        ]
        content = <Radio.Group onChange={(e) => {this.optionChange(item.key, e.target.value)}}>
        content = <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.optionChange(item.key, e.target.value)}}>
          {item.options.map(option => {
            return (
              <Radio key={option.value} value={option.value}>{option.text}</Radio>
@@ -546,6 +556,10 @@
        span = 24
        className = 'text-area'
        rules = [
          { required: item.required, message: '请添加' + item.label + '!' }
        ]
        content = <FieldsTable dict={dict} onChange={this.changeField}/>
      } else if (item.type === 'checkbox') {
        rules = [
@@ -567,6 +581,10 @@
        content = <Cascader options={item.options} placeholder="" />
      } else if (item.type === 'color') {
        className = 'color-form-item'
        rules = [
          { required: item.required, message: dict['form.required.select'] + item.label + '!' }
        ]
        content = <ColorSketch allowClear={true}/>
      }