king
2022-09-29 b883ae5d7d46fc7a3503236f16a250c2264ea7c7
src/menu/components/carousel/data-card/index.jsx
@@ -15,7 +15,6 @@
const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CardSimpleComponent = asyncComponent(() => import('@/menu/components/card/cardsimplecomponent'))
// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const ClockComponent = asyncIconComponent(() => import('@/menu/components/share/clockcomponent'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
@@ -56,7 +55,6 @@
        style: { borderWidth: '1px', borderColor: '#e8e8e8', marginTop: '8px', marginBottom: '8px', height: '300px' },
        columns: [],
        scripts: [],
        btnlog: [],
        subcards: [{
          uuid: Utils.getuuid(),
          setting: {},
@@ -109,24 +107,12 @@
    }
  }
  // logButton = (id, item) => {
  //   const { card } = this.state
  //   if (id !== card.uuid) return
  //   let btnlog = card.btnlog || []
  //   btnlog.push(item)
  //   this.updateComponent({...card, btnlog})
  // }
  /**
   * @description 卡片行外层信息更新(数据源,样式等)
   */
  updateComponent = (card) => {
    card.width = card.wrap.width
    card.name = card.wrap.name
    card.btnlog = []
    if (window.GLOB.styling && card.errors) { // 样式修改时不做筛查
      this.setState({
@@ -215,10 +201,6 @@
      onOk() {
        card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
        // if (card.btnlog) {
        //   card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
        // }
        _this.updateComponent(card)
        if (appType === 'mob') return
@@ -251,36 +233,6 @@
    this.updateComponent(_card)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     card.subcards.forEach(col => {
  //       col.elements = [...col.elements, item]
  //       if (item.$parentId === col.uuid) {
  //         col.elements = [...col.elements, item]
  //       }
  //     })
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '恢复成功!',
  //       duration: 2
  //     })
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  getWrapForms = () => {
    const { card } = this.state
@@ -311,7 +263,6 @@
            </NormalForm>
            <CopyComponent type="datacard" card={card}/>
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog}/> */}
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)}/>