king
2022-12-27 c78e2e555201789537bf176a349bbb34f8c0ca8f
2022-12-27
25个文件已修改
5个文件已添加
505 ■■■■ 已修改文件
public/options.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/main.scss 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/account/index.jsx 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/account/index.scss 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/account/options.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/voucher/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/voucher/options.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/columns/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/index.jsx 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/options.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/options.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/options.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/menushell/card.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/menushell/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modulesource/option.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/account/index.jsx 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/account/index.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/base-table/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/updatetable/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,12 +1,12 @@
{
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "appId": "202111141127408033E3114885F864B619CF5",
  "appkey": "20211114112719750F93B1E64FD79486C8E92",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "",
  "lineColor": "",
  "filter": "false",
  "defaultApp": "mkindustry",
  "defaultApp": "",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "WXminiAppID": "",
@@ -18,5 +18,5 @@
  "keepPassword": "true",
  "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
  "service": "cr_mes/"
}
src/assets/css/main.scss
@@ -473,3 +473,14 @@
    background-size: cover;
  }
}
.table-vertical-top {
  table td {
    vertical-align: top;
  }
}
.table-vertical-bottom {
  table td {
    vertical-align: bottom;
  }
}
src/menu/components/module/account/index.jsx
New file
@@ -0,0 +1,129 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover } from 'antd'
import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined, CaretDownOutlined } from '@ant-design/icons'
import moment from 'moment'
import asyncIconComponent from '@/utils/asyncIconComponent'
import MKEmitter from '@/utils/events.js'
import getWrapForm from './options'
import './index.scss'
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
class Account extends Component {
  static propTpyes = {
    card: PropTypes.object,
    deletecomponent: PropTypes.func,
    updateConfig: PropTypes.func,
  }
  state = {
    card: null,
    date: moment().format('YYYY年MM月')
  }
  UNSAFE_componentWillMount () {
    const { card } = this.props
    if (card.isNew) {
      let _card = {
        uuid: card.uuid,
        type: card.type,
        format: 'array',    // 组件属性 - 数据格式
        pageable: false,    // 组件属性 - 是否可分页
        switchable: true,   // 组件属性 - 数据是否可切换
        width: card.width || 24,
        name: '账套',
        subtype: card.subtype,
        wrap: { name: '账套', width: card.width || 24 },
        style: { paddingLeft: '20px', paddingRight: '20px', paddingTop: '10px', paddingBottom: '10px' },
      }
      this.updateComponent(_card)
    } else {
      this.setState({
        card: fromJS(card).toJS()
      })
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
   * @description 组件销毁,清除state更新,清除快捷键设置
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  /**
   * @description 卡片行外层信息更新(数据源,样式等)
   */
  updateComponent = (card) => {
    card.width = card.wrap.width
    card.name = card.wrap.name
    this.setState({
      card: card
    })
    this.props.updateConfig(card)
  }
  changeStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle)
  }
  getStyle = (style) => {
    let _card = {...this.state.card, style}
    this.updateComponent(_card)
  }
  getWrapForms = () => {
    const { card } = this.state
    return getWrapForm(card.wrap)
  }
  updateWrap = (res) => {
    let _card = {...this.state.card, wrap: res}
    this.updateComponent(_card)
  }
  render() {
    const { card, date } = this.state
    return (
      <div className="menu-account-box" style={card.style} id={card.uuid}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <NormalForm title="基本设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
          </div>
        } trigger="hover">
          <ToolOutlined />
        </Popover>
        <div className="account-box">
          <div className="company">北京明科普华信息技术有限公司 <CaretDownOutlined /></div>
          <div className="date">{date}</div>
        </div>
      </div>
    )
  }
}
export default Account
src/menu/components/module/account/index.scss
New file
@@ -0,0 +1,52 @@
.menu-account-box {
  position: relative;
  box-sizing: border-box;
  background: #ffffff;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #000000;
  .anticon-tool {
    position: absolute;
    z-index: 2;
    font-size: 16px;
    right: 1px;
    top: 1px;
    cursor: pointer;
    padding: 5px;
    background: rgba(255, 255, 255, 0.55);
  }
  .account-box {
    display: flex;
    .company {
      border: 1px solid #d9d9d9;
      padding: 3px 10px 3px 5px;
      border-radius: 4px;
      margin-right: 15px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      .anticon-caret-down {
        margin-left: 20px;
      }
    }
    .date {
      padding-top: 3px;
      flex: 1;
    }
  }
}
.menu-account-box::after {
  display: block;
  content: ' ';
  clear: both;
}
.menu-account-box:hover {
  z-index: 1;
  box-shadow: 0px 0px 4px #1890ff;
}
src/menu/components/module/account/options.jsx
New file
@@ -0,0 +1,28 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap) {
  const wrapForm = [
    {
      type: 'text',
      field: 'name',
      label: '组件名称',
      initval: wrap.name || '',
      tooltip: '用于组件间的区分。',
      required: true
    },
    {
      type: 'number',
      field: 'width',
      label: '宽度',
      initval: wrap.width || 24,
      tooltip: '栅格布局,每行等分为24列。',
      min: 1,
      max: 24,
      precision: 0,
      required: true
    }
  ]
  return wrapForm
}
src/menu/components/module/voucher/index.scss
@@ -18,13 +18,6 @@
    padding: 5px;
    background: rgba(255, 255, 255, 0.55);
  }
  .empty-content {
    text-align: center;
    font-size: 30px;
    margin: 0;
    line-height: 90px;
    color: #bcbcbc;
  }
}
.menu-voucher-box::after {
  display: block;
src/menu/components/module/voucher/options.jsx
@@ -4,21 +4,8 @@
 * @description Wrap表单配置信息
 */
export default function (wrap, id) {
  let roleList = sessionStorage.getItem('sysRoles')
  let appType = sessionStorage.getItem('appType')
  let menu = window.GLOB.customMenu
  let modules = MenuUtils.getSupModules(menu.components, id, menu.interfaces)
  if (roleList) {
    try {
      roleList = JSON.parse(roleList)
    } catch (e) {
      roleList = []
    }
  } else {
    roleList = []
  }
  const wrapForm = [
    // {
@@ -66,15 +53,6 @@
      required: false,
      options: modules,
      allowClear: true,
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
      initval: wrap.blacklist || [],
      required: false,
      options: roleList,
      forbid: !!appType
    },
  ]
src/menu/components/search/main-search/index.scss
@@ -102,6 +102,9 @@
    }
  }
  .mk-search-item-wrap.action {
    .ant-form-item {
      white-space: nowrap;
    }
    .ant-form-item-label, .ant-form-item-control-wrapper {
      display: inline-block;
    }
src/menu/components/table/base-table/columns/index.jsx
@@ -68,7 +68,7 @@
              }
              <EditOutlined className="edit" title="编辑" onClick={() => this.props.editColumn(column)} />
              {column && column.type === 'custom' ? <PasteComponent options={['customCardElement']} updateConfig={(res, resolve) => this.props.pasteCell(column, res, resolve)} /> : null}
              {column && column.type === 'custom' ? <FontColorsOutlined className="style" title="调整样式" onClick={() => this.props.changeStyle(column)}/> : null}
              {column && (column.type === 'custom' || column.type === 'action') ? <FontColorsOutlined className="style" title="调整样式" onClick={() => this.props.changeStyle(column)}/> : null}
              <DeleteOutlined className="close" title="删除" onClick={this.deleteCol} />
              {column && ['text', 'number', 'formula'].includes(column.type) ? <MarkColumn field={column.field || ''} columns={fields} marks={column.marks} onSubmit={this.updateMarks} /> : null }
            </div>
@@ -195,7 +195,7 @@
      )
    } else if (column && column.type === 'action') {
      return (
        <td style={{padding: '0 5px', textAlign: column.Align}} className={'action-column ' + className}>
        <td style={{padding: 0, textAlign: column.Align, ...(column.style || {})}} className={'action-column ' + className}>
          <CardCellComponent cards={config} cardCell={column} elements={column.elements} updateElement={this.updateCard}/>
        </td>
      )
@@ -424,8 +424,10 @@
    if (col.type === 'colspan') {
      col.subcols = card.subcols || []
    } else if (col.type === 'custom') {
      col.style = card.style || {}
      col.elements = card.type === 'custom' ? (card.elements || []) : []
    } else if (col.type === 'action') {
      col.style = card.style || {}
      col.elements = card.type === 'action' ? (card.elements || []) : []
    }
@@ -648,7 +650,7 @@
    }
    return (
      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''}`} id={tableId}>
      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''} table-vertical-${config.wrap.vertical || ''}`} id={tableId}>
        <div className="col-control">
          <FieldsComponent config={config} type="columns" />
          <CopyOutlined title="复制显示列" onClick={this.copycolumn} />
src/menu/components/table/base-table/index.jsx
@@ -99,6 +99,39 @@
    MKEmitter.removeListener('completeSave', this.completeSave)
  }
  // updateFix = (card) => {
  //   let fixs = {}
  //   card.cols.forEach(col => {
  //     if (!col.field) return
  //     if (col.postfix || col.prefix) {
  //       fixs[col.field] = col
  //     }
  //   })
  //   card.cols.forEach(col => {
  //     if (col.type === 'custom') {
  //       col.elements.forEach(cell => {
  //         if (cell.datatype === 'dynamic') {
  //           cell.height = ''
  //           cell.innerHeight = 'auto'
  //           if (fixs[cell.field]) {
  //             if (!cell.prefix && fixs[cell.field].prefix) {
  //               cell.prefix = fixs[cell.field].prefix
  //             }
  //             if (!cell.postfix && fixs[cell.field].postfix) {
  //               cell.postfix = fixs[cell.field].postfix
  //             }
  //           }
  //         }
  //       })
  //     }
  //   })
  //   return card
  // }
  completeSave = () => {
    const { card } = this.state
src/menu/components/table/base-table/options.jsx
@@ -100,6 +100,19 @@
      required: false
    },
    {
      type: 'radio',
      field: 'vertical',
      label: '垂直对齐',
      initval: wrap.vertical || 'middle',
      tooltip: '单元格的垂直对齐方式。',
      required: false,
      options: [
        {value: 'top', label: '向上'},
        {value: 'middle', label: '居中'},
        {value: 'bottom', label: '向下'},
      ]
    },
    {
      type: 'number',
      field: 'btnlimit',
      label: '按钮限制',
src/menu/components/table/edit-table/columns/index.jsx
@@ -75,7 +75,7 @@
            <EditOutlined className="edit" title="编辑" onClick={() => this.props.editColumn(column)} />
            {column.type === 'custom' ? <PasteComponent options={['customCardElement']} updateConfig={(res, resolve) => this.props.pasteCell(column, res, resolve)} /> : null}
            {column.type === 'action' ? <PasteComponent options={['action']} updateConfig={(res, resolve) => this.props.pasteCell(column, res, resolve)} /> : null}
            {column.type === 'custom' ? <FontColorsOutlined className="style" title="调整样式" onClick={() => this.props.changeStyle(column)}/> : null}
            {column.type === 'custom' || column.type === 'action' ? <FontColorsOutlined className="style" title="调整样式" onClick={() => this.props.changeStyle(column)}/> : null}
            <DeleteOutlined className="close" title="删除" onClick={this.deleteCol} />
            {['text', 'number', 'formula'].includes(column.type) ? <MarkColumn field={column.field || ''} columns={fields} marks={column.marks} onSubmit={this.updateMarks} /> : null }
          </div>
@@ -148,7 +148,7 @@
      )
    } else if (column && column.type === 'action') {
      return (
        <td style={{padding: '0 5px', textAlign: column.Align}} className={'action-column ' + className}>
        <td style={{padding: 0, textAlign: column.Align, ...(column.style || {})}} className={'action-column ' + className}>
          <CardCellComponent cards={config} cardCell={column} elements={column.elements} updateElement={this.updateCard}/>
        </td>
      )
@@ -359,8 +359,10 @@
    const { card } = this.state
    
    if (col.type === 'custom') {
      col.style = card.style || {}
      col.elements = card.type === 'custom' ? (card.elements || []) : []
    } else if (col.type === 'action') {
      col.style = card.style || {}
      col.elements = card.type === 'action' ? (card.elements || []) : []
    }
@@ -592,7 +594,7 @@
    })
    return (
      <div className={`edit-table-columns ${config.setting.laypage} ${config.wrap.mode || ''}`} id={tableId}>
      <div className={`edit-table-columns ${config.setting.laypage} ${config.wrap.mode || ''} table-vertical-${config.wrap.vertical || ''}`} id={tableId}>
        <div className="col-control">
          <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
            <div className="mk-popover-control">
src/menu/components/table/edit-table/options.jsx
@@ -225,6 +225,19 @@
      tooltip: '默认值 #e8e8e8。',
      required: false
    },
    {
      type: 'radio',
      field: 'vertical',
      label: '垂直对齐',
      initval: wrap.vertical || 'middle',
      tooltip: '单元格的垂直对齐方式。',
      required: false,
      options: [
        {value: 'top', label: '向上'},
        {value: 'middle', label: '居中'},
        {value: 'bottom', label: '向下'},
      ]
    },
    // {
    //   type: 'color',
    //   field: 'color',
src/menu/components/table/normal-table/columns/index.jsx
@@ -70,7 +70,7 @@
              <EditOutlined className="edit" title="编辑" onClick={() => this.props.editColumn(column)} />
              {column && column.type === 'custom' ? <PasteComponent options={['customCardElement']} updateConfig={(res, resolve) => this.props.pasteCell(column, res, resolve)} /> : null}
              {column && column.type === 'action' ? <PasteComponent options={['action']} updateConfig={(res, resolve) => this.props.pasteCell(column, res, resolve)} /> : null}
              {column && column.type === 'custom' ? <FontColorsOutlined className="style" title="调整样式" onClick={() => this.props.changeStyle(column)}/> : null}
              {column && (column.type === 'custom' || column.type === 'action') ? <FontColorsOutlined className="style" title="调整样式" onClick={() => this.props.changeStyle(column)}/> : null}
              <DeleteOutlined className="close" title="删除" onClick={this.deleteCol} />
              {column && ['text', 'number', 'formula'].includes(column.type) ? <MarkColumn field={column.field || ''} columns={fields} marks={column.marks} onSubmit={this.updateMarks} /> : null }
            </div>
@@ -170,7 +170,7 @@
      )
    } else if (column && column.type === 'action') {
      return (
        <td style={{padding: '0 5px', textAlign: column.Align}} className={'action-column ' + className}>
        <td style={{padding: 0, textAlign: column.Align, ...(column.style || {})}} className={'action-column ' + className}>
          <CardCellComponent cards={config} cardCell={column} elements={column.elements} updateElement={this.updateCard}/>
        </td>
      )
@@ -400,8 +400,10 @@
    if (col.type === 'colspan') {
      col.subcols = card.subcols || []
    } else if (col.type === 'custom') {
      col.style = card.style || {}
      col.elements = card.type === 'custom' ? (card.elements || []) : []
    } else if (col.type === 'action') {
      col.style = card.style || {}
      col.elements = card.type === 'action' ? (card.elements || []) : []
    }
@@ -605,7 +607,7 @@
    const columns = this.handlecolumns(this.state.columns, fields, config)
    return (
      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''}`} id={tableId}>
      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''} table-vertical-${config.wrap.vertical || ''}`} id={tableId}>
        <div className="col-control">
          <CopyOutlined title="复制显示列" onClick={this.copycolumn} />
          <MarkColumn columns={fields} type="line" marks={lineMarks} onSubmit={this.updateLineMarks} />
src/menu/components/table/normal-table/options.jsx
@@ -161,6 +161,19 @@
      tooltip: '默认值 #e8e8e8。',
      required: false
    },
    {
      type: 'radio',
      field: 'vertical',
      label: '垂直对齐',
      initval: wrap.vertical || 'middle',
      tooltip: '单元格的垂直对齐方式。',
      required: false,
      options: [
        {value: 'top', label: '向上'},
        {value: 'middle', label: '居中'},
        {value: 'bottom', label: '向下'},
      ]
    },
    // {
    //   type: 'color',
    //   field: 'color',
src/menu/menushell/card.jsx
@@ -28,6 +28,7 @@
const CustomChart = asyncComponent(() => import('@/menu/components/chart/chart-custom'))
const Timeline = asyncComponent(() => import('@/menu/components/timeline/normal-timeline'))
const Voucher = asyncComponent(() => import('@/menu/components/module/voucher'))
const Account = asyncComponent(() => import('@/menu/components/module/account'))
const Iframe = asyncComponent(() => import('@/menu/components/iframe'))
const AntvG6 = asyncComponent(() => import('@/menu/components/chart/antv-G6'))
@@ -121,6 +122,8 @@
      return (<AntvG6 card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'module' && card.subtype === 'voucher') {
      return (<Voucher card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'module' && card.subtype === 'account') {
      return (<Account card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    }
  }
  return (
src/menu/menushell/index.jsx
@@ -100,6 +100,7 @@
        timeline: '时间轴',
        antvG6: '树图',
        iframe: 'iframe',
        module: '模块',
        card: '卡片'
      }
      let i = 1
src/menu/modulesource/option.jsx
@@ -30,7 +30,7 @@
import mindmap from '@/assets/mobimg/mindmap.png'
import indent from '@/assets/mobimg/indent.jfif'
import kapmap from '@/assets/mobimg/kapmap.jfif'
import Voucher from '@/assets/mobimg/voucher.jpg'
// import Voucher from '@/assets/mobimg/voucher.jpg'
// 组件配置信息
export const menuOptions = [
@@ -68,5 +68,6 @@
  { type: 'menu', url: SandBox, component: 'code', subtype: 'sandbox', title: '自定义', width: 24 },
  { type: 'menu', url: group, component: 'group', subtype: 'normalgroup', title: '分组', width: 24, forbid: ['billPrint'] },
  { type: 'menu', url: Iframe, component: 'iframe', subtype: 'iframe', title: 'iframe', width: 24, forbid: ['billPrint'] },
  { type: 'menu', url: Voucher, component: 'module', subtype: 'voucher', title: '凭证', width: 24, forbid: ['billPrint'] },
  // { type: 'menu', url: Voucher, component: 'module', subtype: 'account', title: '账套', width: 24, forbid: ['billPrint'] },
  // { type: 'menu', url: Voucher, component: 'module', subtype: 'voucher', title: '凭证', width: 24, forbid: ['billPrint'] },
]
src/tabviews/custom/components/module/account/index.jsx
New file
@@ -0,0 +1,86 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
// import { Button, Select, Input, DatePicker } from 'antd'
// import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import Api from '@/api'
// import MKEmitter from '@/utils/events.js'
import './index.scss'
class AccountModule extends Component {
  static propTpyes = {
    config: PropTypes.object
  }
  state = {
    BID: '',
    type: '',
    config: null
  }
  UNSAFE_componentWillMount () {
    const { config } = this.props
    let BID = ''
    let BData = ''
    if (config.wrap.supModule) {
      BData = window.GLOB.CacheData.get(config.wrap.supModule)
    } else {
      BData = window.GLOB.CacheData.get(config.$pageId)
    }
    if (BData) {
      BID = BData.$BID || ''
    }
    this.setState({
      config: fromJS(config).toJS(),
      BID: BID || '',
      type: config.wrap.type
    }, () => {
      this.loadData()
    })
  }
  componentDidMount () {
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
   * @description 组件销毁,清除state更新,清除快捷键设置
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  loadData = () => {
    let param = {
      func: 's_get_fcc_account_data'
    }
    Api.genericInterface(param)
    let _param = {
      func: 's_get_fcc_book_data'
    }
    Api.genericInterface(_param)
  }
  render() {
    const { config } = this.state
    return (
      <div className="menu-account-wrap" style={config.style}>
      </div>
    )
  }
}
export default AccountModule
src/tabviews/custom/components/module/account/index.scss
New file
@@ -0,0 +1,14 @@
.menu-account-wrap {
  position: relative;
  box-sizing: border-box;
  background: #ffffff;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 150px;
  overflow-y: auto;
  color: #000000;
}
src/tabviews/custom/components/module/voucher/index.jsx
@@ -74,6 +74,11 @@
      func: 's_get_fcc_account_data'
    }
    Api.genericInterface(param)
    let _param = {
      func: 's_get_fcc_book_data'
    }
    Api.genericInterface(_param)
  }
  triggeradd = () => {
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -385,7 +385,10 @@
        <CardCellComponent data={record} cards={config} elements={col.elements}/>
      )
    } else if (col.type === 'action') {
      style.padding = '0px 5px'
      style.padding = '0px'
      if (col.style) {
        style = {...style, ...col.style}
      }
      resProps.children = (
        <CardCellComponent data={record} cards={config} elements={col.elements}/>
      )
@@ -960,7 +963,7 @@
    let height = setting.height || false
    return (
      <div className={`normal-custom-table ${setting.tableHeader || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''}`} id={tableId}>
      <div className={`normal-custom-table ${setting.tableHeader || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''}`} id={tableId}>
        {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && data && data.length > 0 ?
          <Switch title="收起" className="main-pickup" checkedChildren="开" unCheckedChildren="关" checked={pickup} onChange={this.pickupChange} /> : null
        }
src/tabviews/custom/components/share/normalTable/index.scss
@@ -94,7 +94,7 @@
        // vertical-align: top;
        .card-cell-list {
          color: rgba(0, 0, 0, 0.85);
          color: var(--mk-table-color);
        }
        .ant-mk-picture {
          position: relative;
src/tabviews/custom/components/table/base-table/index.scss
@@ -7,6 +7,7 @@
  }
  .top-search {
    border-bottom: 1px solid #efefef;
    padding-top: 10px;
  }
  >.button-list.toolbar-button {
    min-height: 60px;
src/tabviews/custom/components/table/edit-table/index.scss
@@ -7,6 +7,7 @@
  }
  .top-search {
    border-bottom: 1px solid #efefef;
    padding-top: 10px;
  }
  >.button-list.toolbar-button {
    padding: 0;
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -507,7 +507,10 @@
        <CardCellComponent data={record} cards={config} elements={col.elements}/>
      )
    } else if (col.type === 'action') {
      style.padding = '0px 5px'
      style.padding = '0px'
      if (col.style) {
        style = {...style, ...col.style}
      }
      children = (
        <CardCellComponent data={record} cards={config} elements={col.elements}/>
      )
@@ -1988,7 +1991,7 @@
          {!submit.hasAction && pickup ? <Button style={submit.style} onClick={() => setTimeout(() => {this.checkData()}, 10)} loading={loading} className="submit-table" type="link">提交</Button> : null}
          <Switch title="编辑" className="main-pickup" checkedChildren="开" unCheckedChildren="关" disabled={loading || this.props.loading} checked={pickup} onChange={this.pickupChange} />
        </div>
        <div className={`edit-custom-table ${pickup ? 'editable' : ''} ${setting.tableHeader || ''} ${setting.operType || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''}`} id={tableId}>
        <div className={`edit-custom-table ${pickup ? 'editable' : ''} ${setting.tableHeader || ''} ${setting.operType || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''}`} id={tableId}>
          <Table
            rowKey="$$uuid"
            components={components}
src/tabviews/custom/components/table/normal-table/index.scss
@@ -7,6 +7,7 @@
  }
  .top-search {
    border-bottom: 1px solid #efefef;
    padding-top: 10px;
  }
  >.button-list.toolbar-button {
    min-height: 60px;
src/tabviews/custom/index.jsx
@@ -40,6 +40,7 @@
const TimeLine = asyncComponent(() => import('./components/timeline/normal-timeline'))
const AntvG6 = asyncComponent(() => import('./components/chart/antv-G6'))
const Voucher = asyncComponent(() => import('./components/module/voucher'))
const Account = asyncComponent(() => import('./components/module/account'))
const Iframe = asyncComponent(() => import('./components/iframe'))
const DebugTable = asyncComponent(() => import('@/tabviews/debugtable'))
const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes'))
@@ -1276,6 +1277,12 @@
            <Voucher config={item}/>
          </Col>
        )
      } else if (item.type === 'module' && item.subtype === 'account') {
        return (
          <Col span={item.width} style={style} key={item.uuid}>
            <Account config={item}/>
          </Col>
        )
      } else if (item.type === 'iframe') {
        return (
          <Col span={item.width} style={style} key={item.uuid}>
src/templates/comtableconfig/updatetable/index.jsx
@@ -897,10 +897,12 @@
                datatype: 'dynamic',
                eleType: _cols[sub].type !== 'number' ? 'text' : 'number',
                field: sub,
                height: 1,
                innerHeight: 21,
                height: '',
                innerHeight: 'auto',
                marks: _cols[sub].marks || null,
                noValue: 'show',
                prefix: _cols[sub].prefix || '',
                postfix: _cols[sub].postfix || '',
                style: {},
                width: 24,
                uuid: Utils.getuuid()
src/templates/sharecomponent/searchcomponent/index.scss
@@ -26,6 +26,9 @@
    vertical-align: top;
  }
  .mk-search-item-wrap.action {
    .ant-form-item {
      white-space: nowrap;
    }
    .ant-form-item-label, .ant-form-item-control-wrapper {
      display: inline-block;
    }