| | |
| | | import { EditOutlined, CloseOutlined, PlusOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import { getCardDetailForm } from '@/templates/zshare/formconfig' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import DragDetail from './dragdetail' |
| | |
| | | } |
| | | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | modaltype: '', |
| | | formlist: null, |
| | | cardwidth: 0, |
| | |
| | | |
| | | deletedetail = (cell) => { |
| | | const { card } = this.props |
| | | const { dict } = this.state |
| | | let _this = this |
| | | |
| | | confirm({ |
| | | content: dict['model.confirm'] + dict['model.delete'] + ` - ${cell.content} ?`, |
| | | content: `确定删除 - ${cell.content} ?`, |
| | | onOk() { |
| | | let _details = fromJS(card.details).toJS() |
| | | |
| | |
| | | } |
| | | |
| | | deleteElem = (type) => { |
| | | const { dict } = this.state |
| | | let _this = this |
| | | |
| | | confirm({ |
| | | content: dict['model.confirm'] + dict['model.delete'] + '?', |
| | | content: '确定删除?', |
| | | onOk() { |
| | | let _subelement = fromJS(_this.props.card.subelement).toJS() |
| | | _subelement = _subelement.filter(_type => _type !== type) |
| | |
| | | |
| | | render() { |
| | | const { card } = this.props |
| | | const { dict, modaltype, cardcell, cardwidth, cardheight } = this.state |
| | | const { modaltype, cardcell, cardwidth, cardheight } = this.state |
| | | let _width = '100%' |
| | | if (card.bottom && card.bottom.actions.length > 0) { |
| | | _width = Math.floor((100 / card.bottom.actions.length) * 10000) / 10000 + '%' |
| | |
| | | destroyOnClose |
| | | > |
| | | <CardDetailForm |
| | | dict={dict} |
| | | card={cardcell} |
| | | inputSubmit={this.handleSubmit} |
| | | formlist={this.state.formlist} |