king
2023-12-14 0eb129a9beddbb86ae74d7106a8e60823206b8d5
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -17,6 +17,7 @@
const { TabPane } = Tabs
const { confirm } = Modal
const { Search } = Input
const { Paragraph } = Typography
const EditTable = asyncComponent(() => import('@/templates/zshare/editTable'))
const FullScripts = asyncComponent(() => import('@/templates/zshare/verifycard/fullScripts'))
@@ -31,6 +32,7 @@
    verify: {},
    systemScripts: [],
    activeKey: 'basemsg',
    searchKey: '',
    excelColumns: [
      {
        title: '字段',
@@ -39,6 +41,8 @@
        inputType: 'input',
        unique: true,
        strict: true,
        searchable: true,
        copy: true,
        editable: true
      },
      {
@@ -46,6 +50,7 @@
        dataIndex: 'Text',
        width: '14%',
        inputType: 'input',
        searchable: true,
        editable: true
      },
      {
@@ -297,6 +302,7 @@
    }
    this.setState({
      searchKey: '',
      verify: {
        ..._verify,
        default: _verify.default || 'true',
@@ -833,7 +839,7 @@
  render() {
    const { card } = this.props
    const { getFieldDecorator } = this.props.form
    const { verify, excelColumns, scriptsColumns, uniqueColumns, activeKey } = this.state
    const { verify, excelColumns, scriptsColumns, uniqueColumns, activeKey, searchKey } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -901,13 +907,13 @@
          } key="excelcolumn">
            <ColumnForm columnChange={this.columnChange}/>
            <Button className="excel-col-add mk-green" title="添加显示列字段" onClick={this.columnFieldInput}>
              同步显示列
              同步字段集
            </Button>
            <Button className="excel-col-add mk-red" title="清空Excel列" onClick={this.clearField}>
              清空Excel列
            </Button>
            <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>注:数值类型(int 或 decimal),内容为必填;最大值和最小值在类型为数值时有效。导入-初始化:用于excel中不存在,导入时需要初始化的字段</Col>
            <EditTable actions={['edit', 'move', 'copy', 'del', 'extra:required:是否必填']} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/>
            <EditTable actions={['edit', 'move', 'copy', 'del', 'extra:required:是否必填']} searchKey={searchKey} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/>
          </TabPane>
          {card.intertype === 'system' ? <TabPane tab={
            <span>
@@ -925,7 +931,7 @@
            </span>
          } key="scripts" id="mk-exin-script">
            <FullScripts
              verify={verify}
              scripts={verify.scripts}
              getScriptsFullForm={() => this.scriptsFullForm}
              getScriptsForm={() => this.scriptsForm}
              handleStatus={this.handleStatus}
@@ -951,7 +957,12 @@
            />
            <EditTable actions={['move']} data={verify.scripts} columns={scriptsColumns} onChange={(scripts) => {this.setState({verify: {...verify, scripts}})}}/>
          </TabPane> : null}
          <TabPane tab="信息提示" key="tip">
          <TabPane tab={
            <span>
              信息提示
              {activeKey === 'excelcolumn' ? <span onClick={(e) => {e.stopPropagation()}}><Search className="mk-search-fields" defaultValue={searchKey} allowClear onSearch={(val, e) => {e.stopPropagation();this.setState({searchKey: val})}} /></span> : null}
            </span>
          } key="tip">
            <Form {...formItemLayout}>
              <Row gutter={24}>
                <Col offset={6} span={6}>