| | |
| | | { |
| | | "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": "", |
| | |
| | | "keepPassword": "true", |
| | | "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], |
| | | "host": "http://demo.mk9h.cn", |
| | | "service": "erp_new/" |
| | | "service": "cr_mes/" |
| | | } |
| | |
| | | background-size: cover; |
| | | } |
| | | } |
| | | |
| | | .table-vertical-top { |
| | | table td { |
| | | vertical-align: top; |
| | | } |
| | | } |
| | | .table-vertical-bottom { |
| | | table td { |
| | | vertical-align: bottom; |
| | | } |
| | | } |
New file |
| | |
| | | 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 |
New file |
| | |
| | | .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; |
| | | } |
| | | |
| | | |
New file |
| | |
| | | /** |
| | | * @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 |
| | | } |
| | |
| | | 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; |
| | |
| | | * @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 = [ |
| | | // { |
| | |
| | | required: false, |
| | | options: modules, |
| | | allowClear: true, |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | field: 'blacklist', |
| | | label: '黑名单', |
| | | initval: wrap.blacklist || [], |
| | | required: false, |
| | | options: roleList, |
| | | forbid: !!appType |
| | | }, |
| | | ] |
| | | |
| | |
| | | } |
| | | } |
| | | .mk-search-item-wrap.action { |
| | | .ant-form-item { |
| | | white-space: nowrap; |
| | | } |
| | | .ant-form-item-label, .ant-form-item-control-wrapper { |
| | | display: inline-block; |
| | | } |
| | |
| | | } |
| | | <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> |
| | |
| | | ) |
| | | } 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> |
| | | ) |
| | |
| | | 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 || []) : [] |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | 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} /> |
| | |
| | | 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 |
| | | |
| | |
| | | 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: '按钮限制', |
| | |
| | | <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> |
| | |
| | | ) |
| | | } 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> |
| | | ) |
| | |
| | | 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 || []) : [] |
| | | } |
| | | |
| | |
| | | }) |
| | | |
| | | 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"> |
| | |
| | | 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', |
| | |
| | | <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> |
| | |
| | | ) |
| | | } 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> |
| | | ) |
| | |
| | | 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 || []) : [] |
| | | } |
| | | |
| | |
| | | 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} /> |
| | |
| | | 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', |
| | |
| | | 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')) |
| | | |
| | |
| | | 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 ( |
| | |
| | | timeline: '时间轴', |
| | | antvG6: '树图', |
| | | iframe: 'iframe', |
| | | module: '模块', |
| | | card: '卡片' |
| | | } |
| | | let i = 1 |
| | |
| | | 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 = [ |
| | |
| | | { 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'] }, |
| | | ] |
New file |
| | |
| | | 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 |
New file |
| | |
| | | .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; |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | func: 's_get_fcc_account_data' |
| | | } |
| | | Api.genericInterface(param) |
| | | |
| | | let _param = { |
| | | func: 's_get_fcc_book_data' |
| | | } |
| | | Api.genericInterface(_param) |
| | | } |
| | | |
| | | triggeradd = () => { |
| | |
| | | <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}/> |
| | | ) |
| | |
| | | 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 |
| | | } |
| | |
| | | // vertical-align: top; |
| | | |
| | | .card-cell-list { |
| | | color: rgba(0, 0, 0, 0.85); |
| | | color: var(--mk-table-color); |
| | | } |
| | | .ant-mk-picture { |
| | | position: relative; |
| | |
| | | } |
| | | .top-search { |
| | | border-bottom: 1px solid #efefef; |
| | | padding-top: 10px; |
| | | } |
| | | >.button-list.toolbar-button { |
| | | min-height: 60px; |
| | |
| | | } |
| | | .top-search { |
| | | border-bottom: 1px solid #efefef; |
| | | padding-top: 10px; |
| | | } |
| | | >.button-list.toolbar-button { |
| | | padding: 0; |
| | |
| | | <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}/> |
| | | ) |
| | |
| | | {!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} |
| | |
| | | } |
| | | .top-search { |
| | | border-bottom: 1px solid #efefef; |
| | | padding-top: 10px; |
| | | } |
| | | >.button-list.toolbar-button { |
| | | min-height: 60px; |
| | |
| | | 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')) |
| | |
| | | <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}> |
| | |
| | | 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() |
| | |
| | | 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; |
| | | } |