king
2025-01-24 953dbd7d2a4c15dc39d80260f2ac16441de03c5f
2025-01-24
6个文件已修改
153 ■■■■■ 已修改文件
src/menu/components/form/simple-form/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/index.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/simple-form/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Modal, Button, Switch, message } from 'antd'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined, VerticalRightOutlined } from '@ant-design/icons'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -517,26 +517,6 @@
    })
  }
  toLower = () => {
    let card = fromJS(this.state.card).toJS()
    let that = this
    card.subcards[0].fields = card.subcards[0].fields.map(item => {
      if (item.field) {
        item.field = item.field.toLowerCase()
      }
      return item
    })
    confirm({
      content: `确定将字段转为小写吗?`,
      onOk() {
        that.updateComponent(card)
      },
      onCancel() {}
    })
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -585,7 +565,6 @@
            } trigger="hover">
              <SwapOutlined />
            </Popover> : null}
            <VerticalRightOutlined style={{color: 'orange', transform: 'rotate(270deg)'}} title="字段转小写" onClick={this.toLower}/>
            <FormFork forms={card.subcards[0].fields}/>
            {/* <CopyOutlined title="复制" onClick={this.triggerCopy} /> */}
            <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
src/menu/components/form/step-form/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Modal, Button, Switch, notification, message } from 'antd'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined, VerticalRightOutlined } from '@ant-design/icons'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -615,35 +615,6 @@
    }
  }
  toLower = () => {
    let group = fromJS(this.state.group).toJS()
    let card = fromJS(this.state.card).toJS()
    let that = this
    group.fields = group.fields.map(item => {
      if (item.field) {
        item.field = item.field.toLowerCase()
      }
      return item
    })
    card.subcards = card.subcards.map(item => {
      if (item.uuid === group.uuid) {
        return group
      }
      return item
    })
    confirm({
      content: `确定将字段转为小写吗?`,
      onOk() {
        that.setState({group})
        that.updateComponent(card)
      },
      onCancel() {}
    })
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -707,7 +678,6 @@
            } trigger="hover">
              <SwapOutlined />
            </Popover> : null}
            <VerticalRightOutlined style={{color: 'orange', transform: 'rotate(270deg)'}} title="字段转小写" onClick={this.toLower}/>
            <FormFork forms={group.fields}/>
            {/* <CopyOutlined title="复制" onClick={this.triggerCopy} /> */}
            <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
src/menu/components/form/tab-form/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Modal, Button, Switch, notification, message } from 'antd'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined, VerticalRightOutlined } from '@ant-design/icons'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -617,35 +617,6 @@
    }
  }
  toLower = () => {
    let group = fromJS(this.state.group).toJS()
    let card = fromJS(this.state.card).toJS()
    let that = this
    group.fields = group.fields.map(item => {
      if (item.field) {
        item.field = item.field.toLowerCase()
      }
      return item
    })
    card.subcards = card.subcards.map(item => {
      if (item.uuid === group.uuid) {
        return group
      }
      return item
    })
    confirm({
      content: `确定将字段转为小写吗?`,
      onOk() {
        that.setState({group})
        that.updateComponent(card)
      },
      onCancel() {}
    })
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -710,7 +681,6 @@
            } trigger="hover">
              <SwapOutlined />
            </Popover> : null}
            <VerticalRightOutlined style={{color: 'orange', transform: 'rotate(270deg)'}} title="字段转小写" onClick={this.toLower}/>
            <FormFork forms={group.fields}/>
            {/* <CopyOutlined title="复制" onClick={this.triggerCopy} /> */}
            <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
src/menu/datasource/verifycard/index.jsx
@@ -1217,33 +1217,6 @@
    })
  }
  tolowercase = (type) => {
    const that = this
    confirm({
      content: type === 'sub' ? '确定将子表字段转为小写吗?' : '确定将字段转为小写吗?',
      onOk() {
        that.execlowercase(type)
      },
      onCancel() {}
    })
  }
  execlowercase = (type) => {
    const { subColumns, columns } = this.state
    if (type === 'sub') {
      this.setState({subColumns: fromJS(subColumns).toJS().map(col => {
        col.field = col.field.toLowerCase()
        return col
      })})
    } else {
      this.setState({columns: fromJS(columns).toJS().map(col => {
        col.field = col.field.toLowerCase()
        return col
      })})
    }
  }
  /**
   * @description 组件销毁,清除state更新
   */
@@ -1291,7 +1264,6 @@
              type="fields"
              updatefield={this.updatefields}
            />
            <SwapOutlined className="columns-lowercase" title="转小写" onClick={() => this.tolowercase()}/>
            <ExcelOut data={columns} setting={setting}/>
            <EditTable actions={['edit', 'move', 'copy', 'del', 'clear']} searchKey={searchKey} type="datasourcefield" wrappedComponentRef={(inst) => this.datasource = inst} data={columns} columns={colColumns} onChange={(columns) => this.setState({columns})}/>
          </TabPane> : <TabPane tab={
@@ -1316,7 +1288,6 @@
              type="fields"
              updatefield={this.updateSubfields}
            />
            <SwapOutlined className="columns-lowercase" title="转小写" onClick={() => this.tolowercase('sub')}/>
            <ExcelOut data={subColumns} setting={setting}/>
            <EditTable actions={['edit', 'move', 'copy', 'del', 'clear']} searchKey={searchKey} type="datasourcefield" wrappedComponentRef={(inst) => this.subdatasource = inst} data={subColumns} columns={colColumns} onChange={(subColumns) => this.setState({subColumns})}/>
          </TabPane> : null}
src/menu/datasource/verifycard/index.scss
@@ -146,16 +146,6 @@
      margin-right: 5px;
      cursor: pointer;
    }
    .columns-lowercase {
      float: right;
      position: relative;
      z-index: 2;
      right: 30px;
      height: 0px;
      top: -15px;
      color: orange;
      cursor: pointer;
    }
    .columns-out {
      float: right;
      position: relative;
@@ -169,7 +159,7 @@
      .ant-table-thead {
        .copy-control {
          top: -18px;
          right: 55px;
          right: 35px;
          .anticon-copy {
            margin-right: 12px;
          }
src/menu/modalconfig/index.jsx
@@ -4,7 +4,7 @@
import { DndProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
import { Button, Card, Modal, Collapse, Switch, message, Popover } from 'antd'
import { SettingOutlined, CopyOutlined, SwapOutlined, DeleteOutlined, VerticalRightOutlined } from '@ant-design/icons'
import { SettingOutlined, CopyOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons'
import { getModalForm } from '@/templates/zshare/formconfig'
import SourceElement from '@/templates/modalconfig/dragelement/source'
@@ -334,28 +334,6 @@
    })
  }
  toLower = () => {
    let _config = fromJS(this.state.config).toJS()
    let that = this
    _config.fields = _config.fields.map(item => {
      if (item.field) {
        item.field = item.field.toLowerCase()
      }
      return item
    })
    confirm({
      content: `确定将字段转为小写吗?`,
      onOk() {
        that.setState({
          config: _config
        })
      },
      onCancel() {}
    })
  }
  triggerCopy = () => {
    const { config } = this.state
@@ -435,7 +413,6 @@
                    } trigger="hover">
                      <SwapOutlined />
                    </Popover>
                    <VerticalRightOutlined style={{color: 'orange', transform: 'rotate(270deg)'}} title="字段转小写" onClick={this.toLower}/>
                    <FormFork forms={config.fields}/>
                    <CopyOutlined title="复制" onClick={this.triggerCopy} />
                    <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />