king
2024-03-25 1fa9bbd032749dc07f98d21b7403b041053d0bed
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
@@ -97,12 +97,12 @@
        dataIndex: 'operation',
        render: (text, record) =>
          (<div style={{textAlign: 'center'}}>
            <span className="operation-btn" title="编辑" onClick={() => this.handleEdit(record, 'scripts')} style={{color: '#1890ff'}}><EditOutlined /></span>
            <span className="operation-btn" title="状态切换" onClick={() => this.handleStatus(record, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span>
            <span className="operation-btn" title="编辑" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span>
            <span className="operation-btn" title="状态切换" onClick={() => this.handleStatus(record)} style={{color: '#8E44AD'}}><SwapOutlined /></span>
            <Popconfirm
              overlayClassName="popover-confirm"
              title="确定删除吗?"
              onConfirm={() => this.handleDelete(record, 'scripts')
              onConfirm={() => this.handleDelete(record)
            }>
              <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span>
            </Popconfirm>
@@ -333,14 +333,9 @@
    })
  }
  handleEdit = (record, type) => {
    let node = null
    if (type === 'scripts') {
      this.scriptsForm.edit(record)
      node = document.getElementById('mk-exout-script')
    }
  handleEdit = (record) => {
    this.scriptsForm.edit(record)
    let node = document.getElementById('mk-exout-script')
    if (node && node.scrollTop) {
      let inter = Math.ceil(node.scrollTop / 10)
@@ -356,6 +351,33 @@
    }
  }
  handleStatus = (record) => {
    let verify = fromJS(this.state.verify).toJS()
    record.status = record.status === 'false' ? 'true' : 'false'
    verify.scripts = verify.scripts.map(item => {
      if (item.uuid === record.uuid) {
        return record
      } else {
        return item
      }
    })
    this.setState({
      verify: verify
    })
  }
  handleDelete = (record) => {
    let verify = fromJS(this.state.verify).toJS()
    verify.scripts = verify.scripts.filter(item => item.uuid !== record.uuid)
    this.setState({ verify: verify })
    this.scriptsForm.check(record)
  }
  showError = (errorType) => {
    if (errorType === 'S') {
      notification.success({