king
2022-01-27 8d95d80fa697580dadca3a95280b3c9f9c0044db
2022-01-27
7个文件已修改
71 ■■■■ 已修改文件
src/menu/datasource/verifycard/settingform/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/exceloutbutton/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editTable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx
@@ -27,7 +27,8 @@
    modules: [],
    usefulFields: [],
    useMSearch: this.props.setting.useMSearch || 'false',
    supModule: this.props.setting.supModule || []
    supModule: this.props.setting.supModule || [],
    appType: sessionStorage.getItem('appType')
  }
  UNSAFE_componentWillMount () {
@@ -55,11 +56,17 @@
  }
  handleConfirm = () => {
    const { appType } = this.state
    // 表单提交时检查输入值是否正确
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          values.sync = values.sync || 'false'
          if (appType === 'mob' && values.useMSearch === 'true') {
            values.syncRefresh = 'true'
          }
          // 数据源前端验证
          if (values.interType === 'system' && values.execute !== 'false' && !values.dataresource) {
            notification.warning({
@@ -150,7 +157,7 @@
  render() {
    const { setting, columns, config } = this.props
    const { getFieldDecorator } = this.props.form
    const { interType, modules, useMSearch, laypage, supModule, usefulFields } = this.state
    const { interType, modules, useMSearch, laypage, supModule, usefulFields, appType } = this.state
    const formItemLayout = {
      labelCol: {
@@ -433,7 +440,7 @@
                )}
              </Form.Item>
            </Col> : null}
            {!['navbar', 'balcony', 'menubar'].includes(config.type) && useMSearch === 'true' ? <Col span={8}>
            {!['navbar', 'balcony', 'menubar'].includes(config.type) && useMSearch === 'true' && appType !== 'mob' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'外层搜索条件改变时,是否刷新当前组件数据。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
src/tabviews/custom/components/card/data-card/index.jsx
@@ -402,9 +402,11 @@
      }
      if (bid !== this.state.BID || bid !== '') {
        this.setState({ BID: bid, BData: _data, pageIndex: 1 }, () => {
        this.setState({ BID: bid, BData: _data, pageIndex: 1, supNodes }, () => {
          this.loadData()
        })
      } else {
        this.setState({ supNodes })
      }
    } else {
      if (!config.setting.supModule || config.setting.supModule !== MenuID) return
src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -478,11 +478,13 @@
  exportExcel = (data) => {
    const { btn } = this.props
    
    let columns = btn.verify.columns.filter(col => col.output !== 'false')
    try {
      let imgCol = btn.verify.columns.filter(col => col.type === 'image')[0]
      let imgCol = columns.filter(col => col.type === 'image')[0]
      if (imgCol) {
        const column = btn.verify.columns.map(item => {
        const column = columns.map(item => {
          let col = {
            title: item.Text, 
            key: item.Column,
@@ -503,7 +505,7 @@
  
          item.$Index = index + 1 + ''
  
          btn.verify.columns.forEach((col, i) => {
          columns.forEach((col, i) => {
            if (item[col.Column] && col.abs === 'true') {
              _row[col.Column] = Math.abs(item[col.Column])
            } else {
@@ -528,7 +530,7 @@
        let colwidth = []
        let abses = []
  
        btn.verify.columns.forEach(col => {
        columns.forEach(col => {
          if (_topRow[col.Column]) return
  
          _header.push(col.Column)
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -49,16 +49,16 @@
        min: 5,
        max: 200,
        editable: true,
        width: '20%',
        width: '14%',
        render: (text) => text || 20
      },
      {
        title: '类型',
        dataIndex: 'type',
        inputType: 'select',
        inputType: 'radio',
        editable: true,
        required: false,
        width: '20%',
        width: '18%',
        render: (text) => {
          if (text === 'image') {
            return '图片'
@@ -74,12 +74,31 @@
      {
        title: '取绝对值',
        dataIndex: 'abs',
        inputType: 'select',
        inputType: 'radio',
        editable: true,
        required: false,
        width: '20%',
        width: '14%',
        render: (text) => {
          if (text === 'true') {
            return '是'
          } else {
            return '否'
          }
        },
        options: [
          {value: 'true', text: '是'},
          {value: 'false', text: '否'}
        ]
      },
      {
        title: '导出',
        dataIndex: 'output',
        inputType: 'radio',
        editable: true,
        required: false,
        width: '14%',
        render: (text) => {
          if (text !== 'false') {
            return '是'
          } else {
            return '否'
@@ -107,9 +126,10 @@
    if (card.intertype !== 'system') {
      _verify.enable = 'false'
    }
    if (_verify.columns[0] && !_verify.columns[0].type) {
    if (_verify.columns[0] && (!_verify.columns[0].type || !_verify.columns[0].output)) {
      _verify.columns = _verify.columns.map(col => {
        col.type = col.type || 'text'
        col.output = col.output || 'true'
        return col
      })
    }
@@ -192,6 +212,7 @@
    }
    values.uuid = Utils.getuuid()
    values.abs = 'false'
    values.output = 'true'
    verify.columns.push(values)
    this.setState({
@@ -398,6 +419,7 @@
        Text: item.label,
        Width: 20,
        abs: 'false',
        output: 'true',
        type: 'text',
        uuid: Utils.getuuid()
      })
@@ -437,6 +459,7 @@
          Text: col.Text,
          Width: 20,
          abs: 'false',
          output: 'true',
          type: 'text',
        }
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss
@@ -78,4 +78,9 @@
      z-index: 1;
    }
  }
  .modal-edit-table {
    .ant-radio-group {
      width: 50px;
    }
  }
}
src/templates/zshare/editTable/index.jsx
@@ -110,7 +110,7 @@
      )
    } else if (inputType === 'radio') {
      return (
        <Radio.Group>
        <Radio.Group style={{whiteSpace: 'nowrap'}}>
          {options.map((item, i) => (<Radio key={i} value={item.field || item.value}> {item.label || item.text} </Radio>))}
        </Radio.Group>
      )
src/templates/zshare/formconfig.jsx
@@ -3066,7 +3066,7 @@
      type: 'radio',
      key: 'interception',
      label: '截取空格',
      initVal: card.interception || 'false',
      initVal: card.interception || 'true',
      tooltip: '提交时,是否截取首尾的空白字符。',
      options: [{
        value: 'true',