king
2022-10-17 e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5
src/templates/sharecomponent/columncomponent/index.jsx
@@ -4,8 +4,6 @@
import { Modal, notification, Switch, message } from 'antd'
import { CopyOutlined } from '@ant-design/icons'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import { getColumnForm } from '@/templates/zshare/formconfig'
import ColumnForm from './columnform'
@@ -26,7 +24,6 @@
  }
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    columnlist: null,    // 显示列
    showField: true,     // 显示列字段
    modaltype: '',       // 模态框控制
@@ -283,11 +280,10 @@
   */
  deleteElement = (card) => {
    const { config } = this.props
    const { dict } = this.state
    let _this = this
    confirm({
      content: dict['model.confirm'] + dict['model.delete'] + ` - ${card.label} ?`,
      content: `确定删除 - ${card.label} ?`,
      onOk() {
        let _columnlist = fromJS(_this.state.columnlist).toJS()
@@ -502,12 +498,12 @@
  render() {
    const { config } = this.props
    const { modaltype, columnlist, dict, card } = this.state
    const { modaltype, columnlist, card } = this.state
    return (
      <div className="model-table-column-list">
        {columnlist && columnlist.length > 0 ? <CopyOutlined className="column-copy" title="copy" onClick={this.copycolumn} /> : null}
        <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={this.onFieldChange} />
        <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={this.onFieldChange} />
        <DragElement
          list={columnlist}
          setting={config.setting}
@@ -530,7 +526,6 @@
          destroyOnClose
        >
          <ColumnForm
            dict={dict}
            card={card}
            MenuID={this.props.menu.MenuID}
            inputSubmit={this.handleSubmit}
@@ -540,7 +535,7 @@
        </Modal>
        {/* 合并列编辑 */}
        <Modal
          title={dict['model.form.colspan'] + '-' + dict['model.edit']}
          title="合并列-编辑"
          visible={modaltype === 'colspan'}
          width={850}
          maskClosable={false}
@@ -549,7 +544,6 @@
          destroyOnClose
        >
          <ColspanForm
            dict={dict}
            card={card}
            inputSubmit={this.handleSubmit}
            columns={columnlist}
@@ -567,7 +561,6 @@
          destroyOnClose
        >
          <GridBtnForm
            dict={dict}
            inputSubmit={this.handleSubmit}
            card={config.gridBtn}
            wrappedComponentRef={(inst) => this.gridBtnFormRef = inst}
@@ -580,7 +573,7 @@
          visible={modaltype === 'mark'}
          width={'75vw'}
          maskClosable={false}
          okText={dict['model.submit']}
          okText="提交"
          onOk={this.markSubmit}
          onCancel={() => { this.setState({ modaltype: '' }) }}
          destroyOnClose
@@ -588,7 +581,6 @@
          <MarkColumn
            ref="markRef"
            card={card}
            dict={dict}
            columns={columnlist}
          />
        </Modal>