| | |
| | | "display": "standalone", |
| | | "theme_color": "#000000", |
| | | "background_color": "#ffffff", |
| | | "mk_version": "20250120" |
| | | "mk_version": "20250205" |
| | | } |
| | |
| | | border-radius: 0px; |
| | | border: none; |
| | | border-bottom: 1px solid #e8e8e8!important; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | color: #26C281; |
| | | |
| | | .anticon { |
| | | display: none; |
| | | } |
| | | } |
| | | button:hover { |
| | | color: #1890ff; |
| | | color: #26C281; |
| | | } |
| | | } |
| | | |
| | | .menu-setting .ant-typography-copy { |
| | | margin-left: 0px; |
| | | } |
| | |
| | | message.warning('复制失败。') |
| | | } |
| | | |
| | | if (card.eleType !== 'button') { |
| | | if (card.eleType !== 'button' && !window.GLOB.CopyOnly) { |
| | | _cards.push(copycard) |
| | | |
| | | handleList(_cards) |
| | |
| | | |
| | | const MkIcon = asyncComponent(() => import('@/components/mk-icon')) |
| | | const TableComponent = asyncComponent(() => import('./tablecomponent')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | | const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) |
| | | const PasteForms = asyncComponent(() => import('@/menu/components/share/pasteforms')) |
| | | const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork')) |
| | |
| | | }) |
| | | } |
| | | |
| | | submitConfig = () => { |
| | | submitConfig = (type) => { |
| | | const { config } = this.state |
| | | |
| | | this.setState({originConfig: fromJS(config).toJS(), saving: true}) |
| | | if (type === 'cache') { |
| | | this.setState({originConfig: fromJS(config).toJS()}) |
| | | this.props.handleSave(config) |
| | | |
| | | message.success(<span>表单配置已保存至本地(<span style={{color: 'red'}}>尚未提交至云端</span>)。</span>) |
| | | } else { |
| | | this.setState({originConfig: fromJS(config).toJS(), saving: true}) |
| | | this.props.handleSave(config) |
| | | setTimeout(() => { |
| | | MKEmitter.emit('triggerMenuSave') |
| | | }, 100) |
| | | } |
| | | } |
| | | |
| | | clearConfig = () => { |
| | |
| | | <Collapse accordion defaultActiveKey="1" bordered={false}> |
| | | <Panel header="基本信息" key="0"> |
| | | <TableComponent /> |
| | | <NormalCopy /> |
| | | </Panel> |
| | | <Panel header="表单" key="1"> |
| | | <div className="search-element"> |
| | |
| | | <div className="setting"> |
| | | <Card title="表单配置" bordered={false} extra={ |
| | | <div> |
| | | <Button className="mk-border-green" onClick={() => this.submitConfig('cache')}>存草稿</Button> |
| | | <PasteForms type="toolbar" config={config} update={this.pasteFields}/> |
| | | <Button type="primary" id="save-modal-config" loading={saving} onClick={this.submitConfig}>保存</Button> |
| | | <Button type="primary" id="save-modal-config" loading={saving} onClick={() => this.submitConfig()}>保存</Button> |
| | | <Button disabled={saving} onClick={this.cancelConfig}>返回</Button> |
| | | </div> |
| | | } style={{ width: '100%' }}> |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | import { Radio } from 'antd' |
| | | |
| | | import './index.scss' |
| | | |
| | | class NormalCopy extends Component { |
| | | state = { |
| | | value: window.GLOB.CopyOnly === true ? 'true' : 'false' |
| | | } |
| | | |
| | | selectChange = (val) => { |
| | | if (val === 'true') { |
| | | window.GLOB.CopyOnly = true |
| | | } else { |
| | | window.GLOB.CopyOnly = false |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { value } = this.state |
| | | |
| | | return ( |
| | | <div className="mk-normal-copy"> |
| | | 元素复制:<Radio.Group defaultValue={value} onChange={(e) => {this.selectChange(e.target.value)}}> |
| | | <Radio value="true">仅复制</Radio> |
| | | <Radio value="false">复制+自增</Radio> |
| | | </Radio.Group> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default NormalCopy |
New file |
| | |
| | | .mk-normal-copy { |
| | | padding-left: 18px; |
| | | white-space: nowrap; |
| | | |
| | | .ant-radio-wrapper { |
| | | margin-right: 2px; |
| | | } |
| | | } |
| | | .model-tablename-manage-view + .mk-normal-copy { |
| | | margin-top: 15px; |
| | | } |
| | | .modal-form-board, .mob-form-board { |
| | | .mk-normal-copy { |
| | | padding-left: 0px; |
| | | |
| | | span.ant-radio + * { |
| | | padding-right: 2px; |
| | | padding-left: 2px; |
| | | } |
| | | } |
| | | } |
| | |
| | | .mk-normal-css { |
| | | padding-left: 18px; |
| | | margin-bottom: 15px; |
| | | |
| | | .anticon-edit { |
| | | color: #1890ff; |
| | |
| | | import React, { useState } from 'react' |
| | | import { useDrop } from 'react-dnd' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Col } from 'antd' |
| | | import { Col, message } from 'antd' |
| | | import update from 'immutability-helper' |
| | | import Utils from '@/utils/utils.js' |
| | | import Card from './card' |
| | |
| | | oInput.style.display = 'none' |
| | | document.body.removeChild(oInput) |
| | | |
| | | if (window.GLOB.CopyOnly) { |
| | | message.success('复制成功。') |
| | | } else { |
| | | const _cards = update(cards, { $splice: [[overIndex + 1, 0, _card]] }) |
| | | |
| | | setCards(_cards) |
| | | |
| | | handleList(_cards, _card) |
| | | } |
| | | } |
| | | |
| | | const [, drop] = useDrop({ |
| | | accept: 'form', |
| | |
| | | const { confirm } = Modal |
| | | const TableComponent = asyncComponent(() => import('@/menu/modalconfig/tablecomponent')) |
| | | const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | | const PasteForms = asyncComponent(() => import('@/menu/components/share/pasteforms')) |
| | | const DragElement = asyncComponent(() => import('@/mob/components/formdragelement')) |
| | | const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent')) |
| | |
| | | <Collapse accordion defaultActiveKey="1" bordered={false}> |
| | | <Panel header="基本信息" key="0"> |
| | | <TableComponent /> |
| | | <NormalCopy/> |
| | | </Panel> |
| | | <Panel header="表单" key="1"> |
| | | <div className="search-element"> |
| | |
| | | // return |
| | | // } |
| | | |
| | | if (/^http.+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar|.ppt)$/i.test(url) || card.linkType === 'download') { |
| | | if (/^(http|\/\/).+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar|.ppt)$/i.test(url) || card.linkType === 'download') { |
| | | let name = '' |
| | | if (card.datatype === 'static') { |
| | | name = card.value || '' |
| | |
| | | url = data[card.linkurl] |
| | | } |
| | | |
| | | if (/^http.+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar)$/i.test(url)) { |
| | | if (/^(http|\/\/).+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar)$/i.test(url)) { |
| | | if (/pdf$/i.test(url)) { |
| | | val = <><img src="./media/pdf.png" className="file-image" alt=""/> {val}</> |
| | | } else if (/(.doc|.docx)$/i.test(url)) { |
| | |
| | | res.message = res.message.replace(/\s*<<.*>>\s*/g, '') |
| | | val = val ? val[0].replace(/<<|>>/g, '') : '' |
| | | |
| | | if (/^http/.test(val)) { |
| | | if (/^(http|\/\/)/.test(val)) { |
| | | let audio = document.createElement('audio') |
| | | audio.src = val |
| | | audio.play() |
| | |
| | | res.message = res.message.replace(/\s*<<.*>>\s*/g, '') |
| | | val = val ? val[0].replace(/<<|>>/g, '') : '' |
| | | |
| | | if (/^http/.test(val)) { |
| | | if (/^(http|\/\/)/.test(val)) { |
| | | let audio = document.createElement('audio') |
| | | audio.src = val |
| | | audio.play() |
| | |
| | | import { useDrop } from 'react-dnd' |
| | | import { is, fromJS } from 'immutable' |
| | | import update from 'immutability-helper' |
| | | import { Col } from 'antd' |
| | | import { Col, message } from 'antd' |
| | | import Utils from '@/utils/utils.js' |
| | | import Card from './card' |
| | | import './index.scss' |
| | |
| | | oInput.style.display = 'none' |
| | | document.body.removeChild(oInput) |
| | | |
| | | if (window.GLOB.CopyOnly) { |
| | | message.success('复制成功。') |
| | | } else { |
| | | const _cards = update(cards, { $splice: [[overIndex + 1, 0, _card]] }) |
| | | |
| | | setCards(_cards) |
| | | |
| | | handleList(_cards, _card) |
| | | } |
| | | } |
| | | |
| | | const [, drop] = useDrop({ |
| | | accept: 'form', |
| | |
| | | import { useDrop } from 'react-dnd' |
| | | import { is, fromJS } from 'immutable' |
| | | import update from 'immutability-helper' |
| | | import { Col, Button, Popover } from 'antd' |
| | | import { Col, Button, Popover, message } from 'antd' |
| | | import { EditOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | document.body.removeChild(oInput) |
| | | } |
| | | |
| | | if (window.GLOB.CopyOnly) { |
| | | message.success('复制成功。') |
| | | } else { |
| | | const { index: overIndex } = findCard(id) |
| | | |
| | | const _cards = update(cards, { $splice: [[overIndex + 1, 0, copycard]] }) |
| | | |
| | | handleList(_cards, copycard) |
| | | } |
| | | } |
| | | |
| | | const [, drop] = useDrop({ |
| | | accept: 'search', |
| | |
| | | const LowerField = asyncComponent(() => import('@/menu/lowerField')) |
| | | const Debug = asyncComponent(() => import('@/menu/debug')) |
| | | const NormalCss = asyncComponent(() => import('@/menu/normalCss')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | | const Versions = asyncComponent(() => import('@/menu/versions')) |
| | | const TableNodes = asyncComponent(() => import('@/menu/tablenodes')) |
| | | const SysInterface = asyncComponent(() => import('@/menu/sysinterface')) |
| | |
| | | /> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 37px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '15px 0px 0px 32px'}} copyable={{ text: MenuId }}>菜单ID:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCss config={config} updateConfig={this.updateConfig}/> |
| | | <NormalCopy /> |
| | | </> : null} |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | |
| | | const SourceWrap = asyncComponent(() => import('@/menu/modulesource')) |
| | | const Modulecell = asyncComponent(() => import('@/menu/modulecell')) |
| | | const MenuShell = asyncComponent(() => import('@/menu/menushell')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const BgController = asyncComponent(() => import('@/pc/bgcontroller')) |
| | | const PasteController = asyncComponent(() => import('@/menu/pastecontroller')) |
| | |
| | | <Panel header="基本信息" key="basedata"> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updatetable}/> |
| | | <NormalCopy /> |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | | <Panel header="组件" key="component"> |
| | |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const LowerField = asyncComponent(() => import('@/menu/lowerField')) |
| | | const NormalCss = asyncComponent(() => import('@/menu/normalCss')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | | const SysInterface = asyncComponent(() => import('@/menu/sysinterface')) |
| | | const Quotecomponent = asyncComponent(() => import('@/pc/quotecomponent')) |
| | | const PasteController = asyncComponent(() => import('@/menu/pastecontroller')) |
| | |
| | | <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 37px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 23px'}} copyable={{ text: `${window.GLOB.baseurl}mob/index.html#/index/${sessionStorage.getItem('kei_no')}/${sessionStorage.getItem('typename')}/${sessionStorage.getItem('lang')}/${MenuId}/@BID@` }}>菜单链接</Paragraph> |
| | | <Paragraph style={{padding: '15px 0px 0px 32px'}} copyable={{ text: MenuId }}>菜单ID:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}} copyable={{ text: `${window.GLOB.baseurl}mob/index.html#/index/${sessionStorage.getItem('kei_no')}/${sessionStorage.getItem('typename')}/${sessionStorage.getItem('lang')}/${MenuId}/@BID@` }}>菜单链接:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCss config={config} updateConfig={this.updateConfig}/> |
| | | <NormalCopy /> |
| | | </> : null} |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | |
| | | const MobShell = asyncComponent(() => import('@/mob/mobshell')) |
| | | const SourceWrap = asyncComponent(() => import('@/mob/modulesource')) |
| | | const Modulecell = asyncComponent(() => import('@/menu/modulecell')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | | const BgController = asyncComponent(() => import('@/pc/bgcontroller')) |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const PasteController = asyncComponent(() => import('@/menu/pastecontroller')) |
| | |
| | | <Panel header="基本信息" forceRender className="basedata" key="basedata"> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <NormalCopy /> |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | | <Panel header="组件" className="component" key="component"> |
| | |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const LowerField = asyncComponent(() => import('@/menu/lowerField')) |
| | | const NormalCss = asyncComponent(() => import('@/menu/normalCss')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | | const SysInterface = asyncComponent(() => import('@/menu/sysinterface')) |
| | | const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent')) |
| | | const PictureController = asyncComponent(() => import('@/menu/picturecontroller')) |
| | |
| | | <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 37px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '15px 0px 0px 32px'}} copyable={{ text: MenuId }}>菜单ID:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCss config={config} updateConfig={this.updateConfig}/> |
| | | <NormalCopy /> |
| | | </> : null} |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | |
| | | const Versions = asyncComponent(() => import('@/menu/versions')) |
| | | const Transfer = asyncComponent(() => import('@/menu/transfer')) |
| | | const Unattended = asyncComponent(() => import('@/templates/zshare/unattended')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | | const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent')) |
| | | const ModalController = asyncComponent(() => import('@/menu/modalconfig/controller')) |
| | | const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) |
| | |
| | | /> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 5px'}}>菜单组件 <CopyOutlined onClick={this.copyMenu} style={{marginLeft: '3px', cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <Paragraph style={{padding: '15px 0px 0px 32px'}} copyable={{ text: MenuId }}>菜单ID:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCopy /> |
| | | </> : null} |
| | | </Panel> |
| | | <Panel header="搜索" key="search"> |
| | |
| | | |
| | | const MenuShell = asyncComponent(() => import('@/menu/tableshell')) |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | | const BgController = asyncComponent(() => import('@/pc/bgcontroller')) |
| | | const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) |
| | | |
| | |
| | | <Panel header="基本信息" key="basedata"> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updatetable}/> |
| | | <NormalCopy /> |
| | | </Panel> |
| | | {/* 组件添加 */} |
| | | <Panel header="搜索" key="search"> |