king
2025-02-05 92afa84b91a58ca90327fab62f158d6a40cb01d5
2025-02-05
18个文件已修改
2个文件已添加
166 ■■■■ 已修改文件
public/manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/design.scss 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/normalCopy/index.jsx 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/normalCopy/index.scss 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/normalCss/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/formdragelement/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/dragelement/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/popview/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/popview/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/popview/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/manifest.json
@@ -6,5 +6,5 @@
  "display": "standalone",
  "theme_color": "#000000",
  "background_color": "#ffffff",
  "mk_version": "20250120"
  "mk_version": "20250205"
}
src/assets/css/design.scss
@@ -166,13 +166,17 @@
    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;
}
src/menu/components/card/cardcellcomponent/dragaction/index.jsx
@@ -75,7 +75,7 @@
      message.warning('复制失败。')
    }
    if (card.eleType !== 'button') {
    if (card.eleType !== 'button' && !window.GLOB.CopyOnly) {
      _cards.push(copycard)
  
      handleList(_cards)
src/menu/modalconfig/index.jsx
@@ -19,6 +19,7 @@
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'))
@@ -181,15 +182,21 @@
    })
  }
  submitConfig = () => {
  submitConfig = (type) => {
    const { config } = this.state
    this.setState({originConfig: fromJS(config).toJS(), saving: true})
    this.props.handleSave(config)
    if (type === 'cache') {
      this.setState({originConfig: fromJS(config).toJS()})
      this.props.handleSave(config)
    setTimeout(() => {
      MKEmitter.emit('triggerMenuSave')
    }, 100)
      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 = () => {
@@ -378,6 +385,7 @@
            <Collapse accordion defaultActiveKey="1" bordered={false}>
              <Panel header="基本信息" key="0">
                <TableComponent />
                <NormalCopy />
              </Panel>
              <Panel header="表单" key="1">
                <div className="search-element">
@@ -392,8 +400,9 @@
          <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%' }}>
src/menu/normalCopy/index.jsx
New file
@@ -0,0 +1,33 @@
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
src/menu/normalCopy/index.scss
New file
@@ -0,0 +1,21 @@
.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;
    }
  }
}
src/menu/normalCss/index.scss
@@ -1,5 +1,6 @@
.mk-normal-css {
  padding-left: 18px;
  margin-bottom: 15px;
  .anticon-edit {
    color: #1890ff;
src/mob/components/formdragelement/index.jsx
@@ -1,7 +1,7 @@
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'
@@ -72,11 +72,15 @@
    oInput.style.display = 'none'
    document.body.removeChild(oInput)
    const _cards = update(cards, { $splice: [[overIndex + 1, 0, _card]] })
    if (window.GLOB.CopyOnly) {
      message.success('复制成功。')
    } else {
      const _cards = update(cards, { $splice: [[overIndex + 1, 0, _card]] })
    setCards(_cards)
      setCards(_cards)
    handleList(_cards, _card)
      handleList(_cards, _card)
    }
  }
  const [, drop] = useDrop({
src/mob/modalconfig/index.jsx
@@ -18,6 +18,7 @@
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'))
@@ -339,6 +340,7 @@
            <Collapse accordion defaultActiveKey="1" bordered={false}>
              <Panel header="基本信息" key="0">
                <TableComponent />
                <NormalCopy/>
              </Panel>
              <Panel header="表单" key="1">
                <div className="search-element">
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -225,7 +225,7 @@
    //   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 || ''
@@ -451,7 +451,7 @@
              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)) {
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2909,7 +2909,7 @@
      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()
@@ -3675,7 +3675,7 @@
      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()
src/templates/modalconfig/dragelement/index.jsx
@@ -2,7 +2,7 @@
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'
@@ -72,11 +72,15 @@
    oInput.style.display = 'none'
    document.body.removeChild(oInput)
    const _cards = update(cards, { $splice: [[overIndex + 1, 0, _card]] })
    setCards(_cards)
    handleList(_cards, _card)
    if (window.GLOB.CopyOnly) {
      message.success('复制成功。')
    } else {
      const _cards = update(cards, { $splice: [[overIndex + 1, 0, _card]] })
      setCards(_cards)
      handleList(_cards, _card)
    }
  }
  const [, drop] = useDrop({
src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx
@@ -2,7 +2,7 @@
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'
@@ -68,11 +68,15 @@
      document.body.removeChild(oInput)
    }
    const { index: overIndex } = findCard(id)
    if (window.GLOB.CopyOnly) {
      message.success('复制成功。')
    } else {
      const { index: overIndex } = findCard(id)
    const _cards = update(cards, { $splice: [[overIndex + 1, 0, copycard]] })
      const _cards = update(cards, { $splice: [[overIndex + 1, 0, copycard]] })
    handleList(_cards, copycard)
      handleList(_cards, copycard)
    }
  }
  const [, drop] = useDrop({
src/views/menudesign/index.jsx
@@ -38,6 +38,7 @@
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'))
@@ -1354,9 +1355,10 @@
                      />
                      {/* 表名添加 */}
                      <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>
                  {/* 组件添加 */}
src/views/menudesign/popview/index.jsx
@@ -15,6 +15,7 @@
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'))
@@ -260,6 +261,7 @@
              <Panel header="基本信息" key="basedata">
                {/* 表名添加 */}
                <TableComponent config={config} updatetable={this.updatetable}/>
                <NormalCopy />
              </Panel>
              {/* 组件添加 */}
              <Panel header="组件" key="component">
src/views/mobdesign/index.jsx
@@ -36,6 +36,7 @@
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'))
@@ -2276,10 +2277,11 @@
                    <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>
                {/* 组件添加 */}
src/views/mobdesign/popview/index.jsx
@@ -15,6 +15,7 @@
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'))
@@ -266,6 +267,7 @@
              <Panel header="基本信息" forceRender className="basedata" key="basedata">
                {/* 表名添加 */}
                <TableComponent config={config} updatetable={this.updateConfig}/>
                <NormalCopy />
              </Panel>
              {/* 组件添加 */}
              <Panel header="组件" className="component" key="component">
src/views/pcdesign/index.jsx
@@ -41,6 +41,7 @@
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'))
@@ -1902,9 +1903,10 @@
                      <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>
                  {/* 组件添加 */}
src/views/tabledesign/index.jsx
@@ -38,6 +38,7 @@
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'))
@@ -1067,8 +1068,9 @@
                      />
                      {/* 表名添加 */}
                      <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">
src/views/tabledesign/popview/index.jsx
@@ -15,6 +15,7 @@
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'))
@@ -195,6 +196,7 @@
              <Panel header="基本信息" key="basedata">
                {/* 表名添加 */}
                <TableComponent config={config} updatetable={this.updatetable}/>
                <NormalCopy />
              </Panel>
              {/* 组件添加 */}
              <Panel header="搜索" key="search">