king
2021-03-08 75f3fd6e67851b9079e0b82c8cd94bf7649fe8bd
2021-03-08
26个文件已修改
6个文件已添加
1030 ■■■■ 已修改文件
src/components/Image/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/model.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/model.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/card.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.jsx 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.scss 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/picturecontroller/editform/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/picturecontroller/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/linksetting/index.jsx 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/linksetting/index.scss 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/linksetting/linkform/index.jsx 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/linksetting/linkform/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/linksetting/linktable/index.jsx 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/linksetting/linktable/index.scss 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/menusetting/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/menusetting/menuform/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/navbar/normal-navbar/wrapsetting/settingform/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/fileupload/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/fileupload/index.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/menuconfig/editthdmenu/menuform/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Image/index.jsx
@@ -22,6 +22,7 @@
  }
  setSize = (width, height) => {
    if (!this.ImageWrapDom) return
    const { clientWidth, clientHeight } = this.ImageWrapDom
    if (!clientWidth || !clientHeight || !width || !height) return
src/locales/en-US/model.js
@@ -155,7 +155,7 @@
  'model.form.excelOut': 'Export excel',
  'model.form.newpage': 'The new page',
  'model.form.newpage.type': 'Page type',
  'model.form.newpage.url': 'Page address',
  'model.pageUrl': 'Page address',
  'model.form.prompt': 'Prompt',
  'model.form.exec': 'Direct execution',
  'model.form.paramJoint': 'Joint param',
src/locales/zh-CN/model.js
@@ -155,7 +155,7 @@
  'model.form.excelOut': '导出Excel',
  'model.form.newpage': '新页面',
  'model.form.newpage.type': '页面类型',
  'model.form.newpage.url': '页面地址',
  'model.pageUrl': '页面地址',
  'model.form.prompt': '提示框',
  'model.form.exec': '直接执行',
  'model.form.paramJoint': '拼接参数',
src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -19,7 +19,7 @@
const Video = asyncComponent(() => import('@/components/video'))
const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent'))
const Card = ({ id, parent, fields, card, moveCard, findCard, editCard, delCard, copyCard, changeStyle, updateMarks }) => {
const Card = ({ id, parent, fields, card, moveCard, findCard, editCard, delCard, copyCard, changeStyle, updateMarks, doubleClickCard }) => {
  const originalIndex = findCard(id).index
  const [{ isDragging }, drag] = useDrag({
    item: { type: 'action', id, originalIndex },
@@ -55,7 +55,7 @@
    } else if (card.eleType === 'text' || card.eleType === 'number') {
      let val = `${card.prefix || ''}${card.datatype === 'static' ? (card.value || '') : (card.field || '')}${card.postfix || ''}`
      return (
        <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>{val}</div>
        <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div>
      )
    } else if (card.eleType === 'icon') {
      return (<Icon type={card.icon}/>)
@@ -150,7 +150,7 @@
      </div>
    } trigger="hover">
      <div ref={node => drag(drop(node))} className={'ant-col card-cell ant-col-' + card.width}>
        <div style={_style} onClick={clickComponent} id={card.uuid}>
        <div style={_style} onClick={clickComponent} onDoubleClick={() => doubleClickCard(id)} id={card.uuid}>
          {getContent()}
        </div>
      </div>
src/menu/components/card/cardcellcomponent/dragaction/index.jsx
@@ -80,6 +80,11 @@
  const doubleClickCard = id => {
    const { card } = findCard(id)
    if (card.eleType !== 'button' && card.eleType !== 'text' && card.eleType !== 'picture') {
      return
    }
    handleSubConfig(card)
  }
@@ -129,6 +134,7 @@
              editCard={editCard}
              updateMarks={updateMarks}
              changeStyle={changeStyle}
              doubleClickCard={doubleClickCard}
              delCard={delCard}
              findCard={findCard}
            />
src/menu/components/card/cardcellcomponent/dragaction/index.scss
@@ -4,7 +4,7 @@
    font-weight: inherit;
    text-decoration: inherit;
  }
  .ant-mk-text:not(.line1) {
  .ant-mk-text:not(.line1):not(.line) {
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -7,6 +7,7 @@
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const { TextArea } = Input
const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
@@ -79,7 +80,7 @@
          item.required = card.eleType !== 'qrcode'
        }
        if (item.key === 'linkurl') {
          item.type = card.link === 'dynamic' ? 'select' : 'text'
          item.type = card.link === 'dynamic' ? 'select' : 'textarea'
        }
        return item
@@ -100,7 +101,13 @@
      }
      if (['text', 'picture'].includes(eleType) && link) {
        _options.push('linkurl', 'joint')
        if (link === 'dynamic' || link === 'static' || link === 'custom') {
          _options.push('linkurl', 'joint')
        } else if (link === 'page') {
          _options.push('copyMenuId', 'joint')
        } else if (link === 'linkpage') {
          _options.push('linkmenu', 'joint')
        }
      }
    } else if (eleType === 'icon') {
      if (datatype === 'dynamic') {
@@ -121,7 +128,7 @@
   */
  selectChange = (key, value, option) => {
    const { config } = this.props
    const { datatype } = this.state
    const { datatype, eleType } = this.state
    if (key === 'eleType') {
      let _options = this.getOptions(value, datatype, '')
@@ -185,6 +192,18 @@
      if (this.props.form.getFieldValue('value') !== undefined) {
        this.props.form.setFieldsValue({value: option.props.title})
      }
    } else if (key === 'link') {
      let _options = this.getOptions(eleType, this.state.datatype, value)
      this.setState({
        link: value,
        formlist: this.state.formlist.map(item => {
          item.hidden = !_options.includes(item.key)
          if (item.key === 'linkurl') {
            item.type = value === 'dynamic' ? 'select' : 'textarea'
          }
          return item
        })
      })
    }
  }
@@ -210,7 +229,7 @@
        formlist: this.state.formlist.map(item => {
          item.hidden = !_options.includes(item.key)
          if (item.key === 'linkurl') {
            item.type = value === 'dynamic' ? 'select' : 'text'
            item.type = value === 'dynamic' ? 'select' : 'textarea'
          }
          return item
        })
@@ -231,15 +250,13 @@
    const fields = []
    this.state.formlist.forEach((item, index) => {
      if (item.hidden) return
      if (item.hidden || item.forbid) return
      if (item.type === 'text') { // 文本搜索
        let rules = []
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}>
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
@@ -254,39 +271,17 @@
                  {
                    max: formRule.input.max,
                    message: formRule.input.message
                  },
                  ...rules
                  }
                ]
              })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'number') {
      } else if (item.type === 'textarea') { // 文本搜索
        fields.push(
          <Col span={12} key={index}>
          <Col span={24} className="textarea" key={index}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal,
                rules: [
                  {
                    required: item.readonly ? false : !!item.required,
                    message: this.props.dict['form.required.input'] + item.label + '!'
                  }
                ]
              })(<InputNumber min={item.min || 0} max={item.max || 10000} precision={item.precision || 0} onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'select') { // 下拉搜索
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}>
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
@@ -295,10 +290,52 @@
                initialValue: item.initVal || '',
                rules: [
                  {
                    required: !!item.required,
                    message: this.props.dict['form.required.select'] + item.label + '!'
                    required: item.readonly ? false : !!item.required,
                    message: this.props.dict['form.required.input'] + item.label + '!'
                  },
                  {
                    max: formRule.input.max,
                    message: formRule.input.message
                  }
                ]
              })(<TextArea rows={2} disabled={item.readonly} />)}
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'number') {
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal,
                rules: [{
                  required: item.readonly ? false : !!item.required,
                  message: this.props.dict['form.required.input'] + item.label + '!'
                }]
              })(<InputNumber min={item.min || 0} max={item.max || 10000} precision={item.precision || 0} onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'select') { // 下拉搜索
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal || '',
                rules: [{
                  required: !!item.required,
                  message: this.props.dict['form.required.select'] + item.label + '!'
                }]
              })(
                <Select
                  showSearch
@@ -319,24 +356,25 @@
      } else if (item.type === 'radio') {
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.label}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal,
                rules: [
                  {
                    required: !!item.required,
                    message: this.props.dict['form.required.select'] + item.label + '!'
                  }
                ]
                rules: [{
                  required: !!item.required,
                  message: this.props.dict['form.required.select'] + item.label + '!'
                }]
              })(
                <Radio.Group onChange={(e) => {this.onChange(e, item.key)}} disabled={item.readonly}>
                  {
                    item.options.map(option => {
                      return (
                        <Radio key={option.value} value={option.value}>{option.text}</Radio>
                      )
                    })
                  }
                  {item.options.map(option => {
                    return (
                      <Radio key={option.value} value={option.value}>{option.text}</Radio>
                    )
                  })}
                </Radio.Group>
              )}
            </Form.Item>
@@ -390,15 +428,6 @@
        if (!err) {
          values.uuid = this.props.card.uuid
          values.marks = this.props.card.marks || null
          // if (values.eleType === 'picture' && values.datatype === 'static' && !values.url) {
          //   notification.warning({
          //     top: 92,
          //     message: '尚未添加图片或图片上传失败,请重新添加!',
          //     duration: 5
          //   })
          //   return
          // }
          resolve(values)
        } else {
src/menu/components/card/cardcellcomponent/elementform/index.scss
@@ -10,8 +10,19 @@
      margin-right: 5px;
    }
  }
  .ant-col {
    height: 65px;
  >.ant-row {
    >.ant-col {
      height: 65px;
    }
    .ant-col.textarea {
      height: 80px;
      .ant-form-item-label {
        width: 14.2%;
      }
      .ant-form-item-control-wrapper {
        width: 85.8%;
      }
    }
  }
  .color-form {
    .ant-form-item-control {
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -25,6 +25,22 @@
  if (type === 'table') {
    _options.push({value: 'sequence', text: '序号'})
  }
  let appMenus = []
  const isApp = sessionStorage.getItem('appType') === 'pc'
  if (isApp) {
    appMenus = sessionStorage.getItem('appMenus')
    if (appMenus) {
      try {
        appMenus = JSON.parse(appMenus)
        appMenus = appMenus.map(item => ({value: item.MenuID, text: item.MenuName}))
      } catch {
        appMenus = []
      }
    } else {
      appMenus = []
    }
  }
  let forms = [
    {
@@ -138,7 +154,9 @@
      key: 'link',
      label: '链接',
      initVal: card.link || '',
      tooltip: '动态地址为绑定字段值。',
      required: false,
      forbid: isApp,
      options: [
        { value: '', text: '无' },
        { value: 'dynamic', text: '动态' },
@@ -147,6 +165,38 @@
    },
    {
      type: 'select',
      key: 'link',
      label: '链接',
      initVal: card.link || '',
      required: false,
      forbid: !isApp,
      options: [
        { value: '', text: '无' },
        { value: 'page', text: '菜单' },
        { value: 'linkpage', text: '关联菜单' },
        { value: 'custom', text: '链接' }
      ]
    },
    {
      type: 'select',
      key: 'linkmenu',
      label: '关联菜单',
      initVal: card.linkmenu || '',
      required: true,
      forbid: !isApp,
      options: appMenus
    },
    {
      type: 'select',
      key: 'copyMenuId',
      label: '复制菜单',
      initVal: card.copyMenuId || '',
      required: false,
      forbid: !isApp,
      options: appMenus
    },
    {
      type: 'select',
      key: 'linkurl',
      label: '链接地址',
      initVal: card.linkurl || '',
src/menu/components/card/cardcellcomponent/index.jsx
@@ -176,7 +176,7 @@
      let fontSize = 14
      let lineHeight = 1.5
      let line = _card.height || 1
      let line = _card.height || null
      if (_card.style.fontSize) {
        fontSize = parseInt(_card.style.fontSize)
@@ -185,7 +185,9 @@
        lineHeight = parseFloat(_card.style.lineHeight)
      }
      _card.innerHeight = fontSize * lineHeight * line
      if (line) {
        _card.innerHeight = fontSize * lineHeight * line
      }
    } else if (_card.eleType === 'barcode') {
      _card.style = style
@@ -351,7 +353,7 @@
          } else if (res.eleType === 'text' || res.eleType === 'number') {
            let fontSize = 14
            let lineHeight = 1.5
            let line = res.height || 1
            let line = res.height || null
      
            if (res.style && res.style.fontSize) {
              fontSize = parseInt(res.style.fontSize)
@@ -359,7 +361,10 @@
            if (res.style && res.style.lineHeight) {
              lineHeight = parseFloat(res.style.lineHeight)
            }
            res.innerHeight = fontSize * lineHeight * line
            if (line) {
              res.innerHeight = fontSize * lineHeight * line
            }
            if (res.eleType === 'text' && res.link && !res.style.color) {
              res.style.color = '#2440B3'
@@ -498,21 +503,33 @@
    const { cards } = this.props
    let btn = fromJS(item).toJS()
    if (btn.eleType !== 'button' || (sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') !== 'false')) return
    if ((sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') !== 'false')) return
    if (btn.OpenType === 'pop') {
      if (!btn.modal) {
        btn.modal = {
          setting: { title: btn.label, width: 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
          tables: [],
          groups: [],
          fields: []
    if (btn.eleType === 'button') {
      if (btn.OpenType === 'pop') {
        if (!btn.modal) {
          btn.modal = {
            setting: { title: btn.label, width: 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' },
            tables: [],
            groups: [],
            fields: []
          }
        }
        MKEmitter.emit('changeModal', cards, btn)
      } else if (btn.OpenType === 'popview') {
        MKEmitter.emit('changePopview', cards, btn)
      } else if (btn.OpenType === 'innerpage' && btn.pageTemplate === 'page') {
        MKEmitter.emit('changeEditMenu', {MenuID: btn.uuid, copyMenuId: btn.copyMenuId})
      } else if (btn.OpenType === 'innerpage' && btn.pageTemplate === 'linkpage') {
        MKEmitter.emit('changeEditMenu', {MenuID: btn.linkmenu})
      }
      MKEmitter.emit('changeModal', cards, btn)
    } else if (btn.OpenType === 'popview') {
      MKEmitter.emit('changePopview', cards, btn)
    } else {
      if (btn.link === 'page') {
        MKEmitter.emit('changeEditMenu', {MenuID: btn.uuid, copyMenuId: btn.copyMenuId})
      } else if (btn.link === 'linkpage') {
        MKEmitter.emit('changeEditMenu', {MenuID: btn.linkmenu})
      }
    }
  }
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -15,7 +15,7 @@
  excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'resetPageIndex', 'pagination', 'search', 'width'],
  popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width'],
  tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width'],
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width'],
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open'],
  funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'width']
}
@@ -89,8 +89,8 @@
    let _opentype = card.OpenType                // 打开方式
    let _intertype = card.intertype || 'system'  // 接口类型
    let _funcType = card.funcType || 'print'     // 功能按钮默认类型
    let _procMode = card.procMode || 'system'     // 参数请求方式
    let _funcType = card.funcType || ''          // 功能按钮默认类型
    let _procMode = card.procMode || 'system'    // 参数请求方式
    let _options = this.getOptions(_opentype, _intertype, _funcType, card.pageTemplate, _procMode)
@@ -143,6 +143,10 @@
    if (_opentype === 'innerpage') {         // 新页面,可选模板(自定义时,可填入外部链接)
      if (_pageTemplate === 'custom') {
        _options.push('url', 'joint')
      } else if (_pageTemplate === 'page') {
        _options.push('copyMenuId', 'joint')
      } else if (_pageTemplate === 'linkpage') {
        _options.push('linkmenu', 'joint')
      }
    } else if (_opentype === 'excelOut') {    // 导入导出
      if (_intertype === 'outer') {
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -12,6 +12,7 @@
 * @param {*} type           按钮类型,用于区分可选的打开方式
 */
export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = []) {
  let appMenus = []
  let opentypes = [
    {
      value: 'pop',
@@ -43,6 +44,43 @@
    }
  ]
  let pageTemps = [
    { value: 'billprint', text: '单据打印' },
    { value: 'pay', text: Formdict['model.pay'] },
    { value: 'custom', text: Formdict['header.form.custom'] }
  ]
  const isApp = sessionStorage.getItem('appType') === 'pc'
  let funTypes = [
    { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
    { value: 'print', text: '标签打印' }
  ]
  if (isApp) {
    opentypes = opentypes.filter(item => item.value !== 'tab')
    pageTemps = [
      { value: 'page', text: '菜单' },
      { value: 'linkpage', text: '关联菜单' },
      { value: 'billprint', text: '单据打印' },
      { value: 'pay', text: Formdict['model.pay'] },
      { value: 'custom', text: '链接' }
    ]
    funTypes = [
      { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
    ]
    appMenus = sessionStorage.getItem('appMenus')
    if (appMenus) {
      try {
        appMenus = JSON.parse(appMenus)
        appMenus = appMenus.map(item => ({value: item.MenuID, text: item.MenuName}))
      } catch {
        appMenus = []
      }
    } else {
      appMenus = []
    }
  }
  if (type === 'chart') {
    opentypes = opentypes.filter(item => item.value === 'excelIn' || item.value === 'excelOut')
  }
@@ -69,15 +107,9 @@
      type: 'radio',
      key: 'funcType',
      label: Formdict['header.form.funcType'],
      initVal: card.funcType || 'print',
      initVal: card.funcType || (isApp ? 'changeuser' : ''),
      required: true,
      options: [{
        value: 'changeuser',
        text: Formdict['header.form.func.changeuser']
      }, {
        value: 'print',
        text: '标签打印'
      }]
      options: funTypes
    },
    {
      type: 'select',
@@ -158,21 +190,43 @@
      label: Formdict['model.form.newpage.type'],
      initVal: card.pageTemplate || '',
      required: true,
      options: pageTemps
    },
    {
      type: 'radio',
      key: 'open',
      label: '链接方式',
      initVal: card.open || 'blank',
      required: true,
      forbid: !isApp,
      options: [{
        value: 'billprint',
        text: '单据打印'
        value: 'blank',
        text: '新窗口'
      }, {
        value: 'pay',
        text: Formdict['model.pay']
      }, {
        value: 'custom',
        text: Formdict['header.form.custom']
        value: 'self',
        text: '当前窗口'
      }]
    },
    {
      type: 'text',
      type: 'select',
      key: 'linkmenu',
      label: '关联菜单',
      initVal: card.linkmenu || '',
      required: true,
      options: appMenus
    },
    {
      type: 'select',
      key: 'copyMenuId',
      label: '复制菜单',
      initVal: card.copyMenuId || '',
      required: false,
      options: appMenus
    },
    {
      type: 'textarea',
      key: 'url',
      label: Formdict['model.form.newpage.url'],
      label: Formdict['model.pageUrl'],
      initVal: card.url || '',
      required: true
    },
@@ -273,6 +327,7 @@
      label: Formdict['model.form.linkmenu'],
      initVal: card.linkmenu || [],
      required: true,
      forbid: isApp,
      options: menulist
    },
    {
src/menu/components/share/actioncomponent/index.jsx
@@ -406,6 +406,10 @@
    
    if (element.OpenType === 'pop' || element.OpenType === 'popview' || element.execMode === 'pop') {
      this.props.setSubConfig(element)
    } else if (element.OpenType === 'innerpage' && element.pageTemplate === 'page') {
      MKEmitter.emit('changeEditMenu', {MenuID: element.uuid, copyMenuId: element.copyMenuId})
    } else if (element.OpenType === 'innerpage' && element.pageTemplate === 'linkpage') {
      MKEmitter.emit('changeEditMenu', {MenuID: element.linkmenu})
    } else {
      notification.warning({
        top: 92,
src/menu/picturecontroller/editform/index.jsx
@@ -31,8 +31,22 @@
              duration: 5
            })
            return
          } else if (values.urls && values.urls[0]) {
          } else if (values.urls && values.urls[0] && values.urls[0].status !== 'done') {
            notification.warning({
              top: 92,
              message: '文件上传中,请稍后!',
              duration: 5
            })
            return
          } else if (values.urls && values.urls[0] && values.urls[0].response) {
            values.linkurl = values.urls[0].response
          } else {
            notification.warning({
              top: 92,
              message: '未获取到文件路径!',
              duration: 5
            })
            return
          }
          resolve(values)
        } else {
@@ -141,7 +155,7 @@
          <Col span={24}>
            <Form.Item label="备注">
              {getFieldDecorator('remark', {
                initialValue: card.remark,
                initialValue: card.remark || '',
                rules: [
                  {
                    max: 50,
src/menu/picturecontroller/index.jsx
@@ -248,7 +248,7 @@
                </Col>
              </Row>
              <Row gutter={16} style={{height: '340px'}}>
                {piclist.length && piclist.map(item => (
                {piclist.length > 0 && piclist.map(item => (
                  <Col span={4} key={item.id}>
                    <div className="image-video-box">
                      <div className="image-video-box-body">
@@ -279,7 +279,7 @@
                </Col>
              </Row>
              <Row gutter={16} style={{height: '340px'}}>
                {vidlist.length && vidlist.map(item => (
                {vidlist.length > 0 && vidlist.map(item => (
                  <Col span={4} key={item.id}>
                    <div className="image-video-box">
                      <div className="image-video-box-body">
src/pc/components/navbar/normal-navbar/index.jsx
@@ -1,23 +1,21 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Icon, Popover, Menu } from 'antd'
import { Icon, Popover, Menu, Button } from 'antd'
import asyncIconComponent from '@/utils/asyncIconComponent'
import MKEmitter from '@/utils/events.js'
// import Utils from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import './index.scss'
const WrapComponent = asyncIconComponent(() => import('./wrapsetting'))
const MenuComponent = asyncIconComponent(() => import('./menusetting'))
// const CardComponent = asyncComponent(() => import('../cardcomponent'))
const LinkComponent = asyncIconComponent(() => import('./linksetting'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
// const { confirm } = Modal
const { SubMenu } = Menu
class NormalNavbar extends Component {
@@ -158,7 +156,10 @@
  }
  changeMenu = (menu) => {
    MKEmitter.emit('changeEditMenu', menu)
    MKEmitter.emit('changeEditMenu', {
      MenuID: menu.property === 'linkmenu' ? menu.linkMenuId : menu.MenuID,
      copyMenuId: menu.property === 'menu' ? menu.copyMenuId : '',
    })
  }
  changeLogoMenu = () => {
@@ -182,6 +183,7 @@
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <MenuComponent config={card} updateConfig={this.updateComponent} />
            <LinkComponent config={card} updateConfig={this.updateComponent} />
            <WrapComponent config={card} updateConfig={this.updateComponent} />
            <CopyComponent type="normalnarbar" card={card}/>
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
@@ -238,7 +240,11 @@
              })}
            </Menu>
          </div>
          <div className="link">asdfds</div>
          <div className="link">
            {card.links.map(link => {
              return <Button type="link" key={link.MenuID} onDoubleClick={() => this.changeMenu(link)}>{link.name}</Button>
            })}
          </div>
        </div>
      </div>
    )
src/pc/components/navbar/normal-navbar/index.scss
@@ -49,6 +49,10 @@
      flex: 1;
      display: inline-block;
      text-align: right;
      color: inherit;
      button {
        color: inherit;
      }
    }
  }
  .card-control {
src/pc/components/navbar/normal-navbar/linksetting/index.jsx
New file
@@ -0,0 +1,61 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Icon, Modal } from 'antd'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import LinkTable from './linktable'
import './index.scss'
class DataSource extends Component {
  static propTpyes = {
    config: PropTypes.any,
    updateConfig: PropTypes.func
  }
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    visible: false
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  verifySubmit = () => {
    const { config } = this.props
    this.props.updateConfig({...config, links: this.mTable.state.data || []})
    this.setState({visible: false})
  }
  render () {
    const { config } = this.props
    const { visible, dict } = this.state
    return (
      <div className="model-link-setting-wrap">
        <Icon type="link" title="链接" onClick={() => this.setState({ visible: true })}/>
        <Modal
          wrapClassName="popview-modal"
          title="链接编辑"
          visible={visible}
          width={950}
          maskClosable={false}
          okText={dict['model.submit']}
          onOk={this.verifySubmit}
          onCancel={() => { this.setState({ visible: false }) }}
          destroyOnClose
        >
          <LinkTable
            links={config.links || []}
            ref={(ref) => { this.mTable = ref }}
          />
        </Modal>
      </div>
    )
  }
}
export default DataSource
src/pc/components/navbar/normal-navbar/linksetting/index.scss
New file
@@ -0,0 +1,11 @@
.model-link-setting-wrap {
  display: inline-block;
  >.anticon-link {
    color: rgb(38, 194, 129);
  }
  >.anticon-edit {
    color: #1890ff;
  }
}
src/pc/components/navbar/normal-navbar/linksetting/linkform/index.jsx
New file
@@ -0,0 +1,172 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Radio, Tooltip, Icon, Select } from 'antd'
import './index.scss'
const { TextArea } = Input
class SettingForm extends Component {
  static propTpyes = {
    menu: PropTypes.object,    // 卡片行信息
    inputSubmit: PropTypes.func  // 回车事件
  }
  state = {
    property: this.props.menu.property || 'link',
    linkIntId: this.props.menu.linkIntId || '',
    appMenus: [],
  }
  UNSAFE_componentWillMount () {
    let appMenus = sessionStorage.getItem('appMenus')
    if (appMenus) {
      try {
        appMenus = JSON.parse(appMenus)
      } catch {
        appMenus = []
      }
    } else {
      appMenus = []
    }
    this.setState({appMenus})
  }
  componentDidMount() {
    const { menu } = this.props
    if (!menu.MenuID) {
      let _form = document.getElementById('name')
      _form && _form.select()
    }
  }
  handleConfirm = () => {
    // 表单提交时检查输入值是否正确
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          if (values.linkmenuid) {
            values.linkIntId = this.state.linkIntId || ''
          }
          resolve(values)
        } else {
          reject(err)
        }
      })
    })
  }
  handleSubmit = (e) => {
    e.preventDefault()
    if (this.props.inputSubmit) {
      this.props.inputSubmit()
    }
  }
  changeProperty = (e) => {
    let val = e.target.value
    this.setState({property: val})
  }
  changeLinkMenu = (val, { props }) => {
    this.setState({linkIntId: props.intid})
  }
  render() {
    const { menu } = this.props
    const { getFieldDecorator } = this.props.form
    const { property, appMenus } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 8 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      }
    }
    return (
      <Form {...formItemLayout}>
        <Row gutter={24}>
          <Col span={22}>
            <Form.Item label="链接名称">
              {getFieldDecorator('name', {
                initialValue: menu.name,
                rules: [
                  {
                    required: true,
                    message: '请输入链接名称!'
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
          <Col span={22}>
            <Form.Item label="链接属性">
              {getFieldDecorator('property', {
                initialValue: menu.property || 'link'
              })(
                <Radio.Group onChange={this.changeProperty}>
                  <Radio value="link">链接</Radio>
                  <Radio value="linkmenu">关联菜单</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          {property === 'link' ? <Col span={22}>
            <Form.Item label="链接地址">
              {getFieldDecorator('link', {
                initialValue: menu.link || '',
                rules: [{
                  required: true,
                  message: '请输入链接地址!'
                }]
              })(<TextArea rows={2} />)}
            </Form.Item>
          </Col> : null}
          <Col span={22}>
            <Form.Item label="打开方式">
              {getFieldDecorator('open', {
                initialValue: menu.open || 'blank'
              })(
                <Radio.Group>
                  <Radio value="blank">新窗口</Radio>
                  <Radio value="self">当前窗口</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          {property === 'linkmenu' ? <Col span={22}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="关联当前app中已有的菜单。">
                <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}}/>
                关联菜单
              </Tooltip>
            }>
              {getFieldDecorator('linkMenuId', {
                initialValue: menu.linkMenuId || '',
                rules: [{
                  required: true,
                  message: '请选择关联菜单!'
                }]
              })(
                <Select onChange={this.changeLinkMenu}>
                  {appMenus.map(item => (<Select.Option key={item.MenuID} intid={item.menuid_int} value={item.MenuID}>{item.MenuName}</Select.Option>))}
                </Select>
              )}
            </Form.Item>
          </Col> : null}
        </Row>
      </Form>
    )
  }
}
export default Form.create()(SettingForm)
src/pc/components/navbar/normal-navbar/linksetting/linkform/index.scss
src/pc/components/navbar/normal-navbar/linksetting/linktable/index.jsx
New file
@@ -0,0 +1,160 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Table, Button, Modal, Icon } from 'antd'
import LinkForm from '../linkform'
import Utils from '@/utils/utils.js'
import './index.scss'
const { confirm } = Modal
class LinkTable extends Component {
  static propTpyes = {
    links: PropTypes.object,    // 卡片行信息
  }
  state = {
    data: [],
    editMenu: null,
    columns: [
      { title: '链接名称', dataIndex: 'name', key: 'name' },
      { title: '链接属性', dataIndex: 'property', key: 'property',  render: text => {
        const trans = {link: '链接', linkmenu: '关联菜单'}
        return trans[text]
      }},
      { title: '链接地址', dataIndex: 'link', key: 'link'},
      { title: '打开方式', dataIndex: 'open', key: 'open',  render: (text, record) => {
        const trans = {blank: '新窗口', self: '当前窗口'}
        return trans[text]
      }},
      { title: '操作', key: 'operation', align: 'center', width: '190px', render: (text, record) =>
        (<div>
          <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>编辑</Button>
          <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>删除</Button>
          <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/>
          <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/>
        </div>)
      }
    ]
  }
  UNSAFE_componentWillMount () {
    const { links } = this.props
    this.setState({data: fromJS(links).toJS()})
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
  moveUp = (record) => {
    let data = fromJS(this.state.data).toJS()
    let dragIndex = data.findIndex(c => c.MenuID === record.MenuID)
    let hoverIndex = dragIndex - 1
    if (hoverIndex === -1) return
    data.splice(hoverIndex, 0, ...data.splice(dragIndex, 1))
    this.setState({data})
  }
  moveDown = (record) => {
    let data = fromJS(this.state.data).toJS()
    let dragIndex = data.findIndex(c => c.MenuID === record.MenuID)
    let hoverIndex = dragIndex + 1
    if (hoverIndex === data.length) return
    data.splice(hoverIndex, 0, ...data.splice(dragIndex, 1))
    this.setState({data})
  }
  delMenu = (record) => {
    const { data } = this.state
    const _this = this
    confirm({
      title: '确定删除吗?',
      content: '',
      onOk() {
        _this.setState({data: data.filter(item => item.MenuID !== record.MenuID)})
      },
      onCancel() {}
    })
  }
  editMenu = (record) => {
    this.setState({editMenu: record, visible: true})
  }
  plusMenu = () => {
    let _menu = {
      name: '链接'
    }
    this.setState({editMenu: _menu, visible: true})
  }
  menuSubmit = () => {
    const { editMenu, data } = this.state
    this.menuRef.handleConfirm().then(res => {
      let _menu = {...editMenu, ...res}
      if (!_menu.MenuID) {
        _menu.MenuID = Utils.getuuid()
        this.setState({data: [...data, _menu], editMenu: null, visible: false})
      } else {
        this.setState({
          editMenu: null,
          visible: false,
          data: data.map(item => {
            if (item.MenuID === _menu.MenuID) {
              return _menu
            } else {
              return item
            }
          })
        })
      }
    })
  }
  render() {
    const { columns, data, visible, editMenu } = this.state
    return (
      <div className="link-control-wrap">
        <Button className="link-plus mk-green" onClick={this.plusMenu}>添加</Button>
        <Table
          rowKey="MenuID"
          columns={columns}
          dataSource={data}
          pagination={false}
        />
        <Modal
          title="编辑"
          visible={visible}
          width={600}
          maskClosable={false}
          onOk={this.menuSubmit}
          onCancel={() => { this.setState({ visible: false }) }}
          destroyOnClose
        >
          <LinkForm
            menu={editMenu}
            inputSubmit={this.menuSubmit}
            wrappedComponentRef={(inst) => this.menuRef = inst}
          />
        </Modal>
      </div>
    )
  }
}
export default LinkTable
src/pc/components/navbar/normal-navbar/linksetting/linktable/index.scss
New file
@@ -0,0 +1,20 @@
.link-control-wrap {
  position: relative;
  .link-plus {
    float: right;
    position: relative;
    z-index: 1;
    margin-bottom: 5px;
  }
  .ant-empty {
    margin: 5px 0;
  }
  thead tr {
    background: #fbfbfb;
  }
  .ant-table-body {
    margin: 0!important;
  }
}
src/pc/components/navbar/normal-navbar/menusetting/index.scss
@@ -1,6 +1,10 @@
.model-menu-setting-wrap {
  display: inline-block;
  >.anticon-menu {
    color: purple;
  }
  >.anticon-edit {
    color: #1890ff;
  }
src/pc/components/navbar/normal-navbar/menusetting/menuform/index.jsx
@@ -116,8 +116,20 @@
                <Radio.Group onChange={this.changeProperty}>
                  <Radio value="menu">菜单</Radio>
                  <Radio value="link">链接</Radio>
                  {menu.level === 1 || menu.level === 2 ? <Radio value="classify">分类</Radio> : null}
                  <Radio value="linkmenu">关联菜单</Radio>
                  {menu.level === 1 || menu.level === 2 ? <Radio value="classify">分类</Radio> : null}
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={22}>
            <Form.Item label="隐藏">
              {getFieldDecorator('hidden', {
                initialValue: menu.hidden || 'false'
              })(
                <Radio.Group>
                  <Radio value="false">否</Radio>
                  <Radio value="true">是</Radio>
                </Radio.Group>
              )}
            </Form.Item>
src/pc/components/navbar/normal-navbar/wrapsetting/settingform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Tooltip, Icon, InputNumber, Select } from 'antd'
import { Form, Row, Col, Input, Tooltip, Icon, InputNumber, Select, Radio } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
@@ -167,6 +167,23 @@
                )}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="存在登录且取到登录信息时,显示用户头像、用户名及退出。">
                  <Icon type="question-circle" />
                  用户信息
                </Tooltip>
              }>
                {getFieldDecorator('user', {
                  initialValue: wrap.user || 'hidden'
                })(
                  <Radio.Group>
                    <Radio value="hidden">隐藏</Radio>
                    <Radio value="show">显示</Radio>
                  </Radio.Group>
                )}
              </Form.Item>
            </Col>
          </Row>
        </Form>
      </div>
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -304,7 +304,7 @@
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={_style} onClick={(e) => {this.openNewView(e, card)}}>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>{val}</div>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 'auto'}}>{val}</div>
          </div>
        </Col>
      )
@@ -356,7 +356,7 @@
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={_style}>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 21}}>{val}</div>
            <div className={'ant-mk-text line' + card.height} style={{height: card.innerHeight || 'auto'}}>{val}</div>
          </div>
        </Col>
      )
src/tabviews/zshare/fileupload/index.jsx
@@ -68,8 +68,12 @@
  }
  onDelete = (msg) => {
    let filelist = this.state.filelist.filter(v => !v.url && !v.response)
    let filelist = this.state.filelist.map(item => {
      if (!item.url && !item.response && !item.status) {
        item.status = 'error'
      }
      return item
    })
    this.setState({filelist, showprogress: false})
    this.props.onChange(filelist)
src/tabviews/zshare/fileupload/index.scss
@@ -16,6 +16,14 @@
}
.fileupload-form-container.limit-fileupload {
  > .ant-upload {
    display: none;
    display: inline;
    >.ant-upload {
      >input {
        display: none;
      }
      >button {
        display: none;
      }
    }
  }
}
src/templates/menuconfig/editthdmenu/menuform/index.jsx
@@ -3,6 +3,7 @@
import { Form, Row, Col, Input, Select } from 'antd'
import './index.scss'
const { TextArea } = Input
class MainSearch extends Component {
  static propTpyes = {
@@ -158,7 +159,7 @@
                    message: '地址最长为1024个字符!'
                  }
                ]
              })(<Input placeholder="" autoComplete="off" />)}
              })(<TextArea rows={2} />)}
            </Form.Item>
          </Col> : null}
        </Row>
src/templates/zshare/formconfig.jsx
@@ -826,7 +826,7 @@
    {
      type: 'text',
      key: 'url',
      label: Formdict['model.form.newpage.url'],
      label: Formdict['model.pageUrl'],
      initVal: card.url || '',
      required: true
    },
src/views/pcdesign/index.jsx
@@ -1,6 +1,7 @@
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { DndProvider } from 'react-dnd'
import { withRouter } from 'react-router'
import { is, fromJS } from 'immutable'
import moment from 'moment'
import HTML5Backend from 'react-dnd-html5-backend'
@@ -81,18 +82,26 @@
          localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS,
          dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
        })
        this.getAppMessage()
      } else if (param.type === 'view') {
        this.setState({
          MenuId: param.MenuID
        }, () => {
          this.getMenuParam()
        })
      }
      this.getAppMessage()
    } catch {
      notification.warning({
        top: 92,
        message: '菜单信息解析错误!',
        duration: 5
      })
    }
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (this.props.match.params.param !== nextProps.match.params.param) {
      window.location.reload()
    }
  }
@@ -142,8 +151,7 @@
      return
    }
    this.props.history.replace('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: menu.MenuID, type: 'view'}))))
    window.location.reload()
    this.props.history.push('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: menu.MenuID, copyMenuId: menu.copyMenuId || '', type: 'view'}))))
  }
  getAppMessage = () => {
@@ -161,67 +169,58 @@
      }
      let homeId = ''
      if (this.state.MenuId) {
        let appViewList = res.data && res.data.length > 0 ? res.data : []
        homeId = this.state.MenuId
        sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
      } else {
        let appViewList = []
        if (res.data && res.data.length > 0) {
          appViewList = res.data
          appViewList.forEach(item => {
            if (item.keys_type === 'index') {
              homeId = item.keys_id
            }
          })
        }
        if (!homeId) {
          homeId = Utils.getuuid()
          let param = {
            func: 's_kei_link_keyids_addupt',
            BID: sessionStorage.getItem('appId'),
            exec_type: 'y',
            LText: ''
      let appViewList = []
      if (res.data && res.data.length > 0) {
        appViewList = res.data
        appViewList.forEach(item => {
          if (item.keys_type === 'index') {
            homeId = item.keys_id
          }
        })
      }
          appViewList.unshift({
            appkey: window.GLOB.appkey || '',
            bid: sessionStorage.getItem('appId') || '',
            kei_no: sessionStorage.getItem('kei_no') || '',
            keys_id: homeId,
            keys_type: 'index',
            remark: '首页'
          })
      if (!homeId) {
        homeId = Utils.getuuid()
          param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`)
          param.LText = param.LText.join(' union all ')
          param.LText = Utils.formatOptions(param.LText)
          param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
          param.secretkey = Utils.encrypt('', param.timestamp)
          Api.getSystemConfig(param).then(result => {
            if (!result.status) {
              notification.warning({
                top: 92,
                message: result.message,
                duration: 5
              })
            }
          })
        let param = {
          func: 's_kei_link_keyids_addupt',
          BID: sessionStorage.getItem('appId'),
          exec_type: 'y',
          LText: ''
        }
        appViewList.unshift({
          appkey: window.GLOB.appkey || '',
          bid: sessionStorage.getItem('appId') || '',
          kei_no: sessionStorage.getItem('kei_no') || '',
          keys_id: homeId,
          keys_type: 'index',
          remark: '首页'
        })
        param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`)
        param.LText = param.LText.join(' union all ')
        param.LText = Utils.formatOptions(param.LText)
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.secretkey = Utils.encrypt('', param.timestamp)
        Api.getSystemConfig(param).then(result => {
          if (!result.status) {
            notification.warning({
              top: 92,
              message: result.message,
              duration: 5
            })
          } else {
            sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
            this.props.history.replace('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: homeId, type: 'view'}))))
          }
        })
      } else {
        sessionStorage.setItem('appViewList', JSON.stringify(appViewList))
        this.props.history.replace('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: homeId, type: 'view'}))))
      }
      this.props.history.replace('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: homeId, type: 'view'}))))
      this.setState({MenuId: homeId}, () => {
        this.getMenuParam()
      })
    })
  }
@@ -1221,4 +1220,4 @@
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(MenuDesign)
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MenuDesign))