king
2021-06-15 5515a793e08f2c9f0c8116960d3043f5bd32ccad
2021-06-15
16个文件已修改
183 ■■■■ 已修改文件
public/options.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/main.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/normal-form/index.jsx 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/pastecomponent/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/normal-form/index.jsx 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tabmanage/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/checkCard/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/checkCard/index.scss 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/customTextArea/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/checkCard/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -8,6 +8,7 @@
  "filter": "false",
  "defaultApp": "",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "debugger": false,
  "host": "http://qingqiumarket.cn",
  "service": "mkwms/"
src/assets/css/main.scss
@@ -387,3 +387,7 @@
    }
  }
}
.ant-input[disabled] {
  background-color: #fafafa!important;
}
src/menu/components/form/normal-form/index.jsx
@@ -450,6 +450,7 @@
    group.fields = group.fields.filter(item => !item.focus)
    this.setState({group, visible: false, editform: null})
    this.updateGroup(group)
  }
  /**
@@ -622,6 +623,47 @@
    })
  }
  pasteForm = (res) => {
    let _config = fromJS(this.state.group).toJS()
    let fieldrepet = false // 字段重复
    let labelrepet = false // 提示文字重复
    _config.fields.forEach(item => {
      if (res.field && item.field && item.field.toLowerCase() === res.field.toLowerCase()) {
        fieldrepet = true
      } else if (res.label && item.label === res.label) {
        labelrepet = true
      }
    })
    if (fieldrepet) {
      notification.warning({
        top: 92,
        message: '字段已存在!',
        duration: 10
      })
      return
    } else if (labelrepet) {
      notification.warning({
        top: 92,
        message: '名称已存在!',
        duration: 10
      })
      return
    }
    _config.fields.push(res)
    this.updateGroup(_config)
    this.handleForm(res)
    notification.success({
      top: 92,
      message: '粘贴成功!',
      duration: 2
    })
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -639,7 +681,7 @@
            <Icon className="plus" title="添加分组" onClick={this.addCard} type="plus" />
            <WrapComponent config={card} updateConfig={this.updateComponent} />
            <CopyComponent type="propcard" card={card}/>
            <PasteComponent config={card} options={['cardcell']} updateConfig={this.updateComponent} />
            <PasteComponent config={card} options={['form']} updateConfig={this.pasteForm} />
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <UserComponent config={card}/>
            <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
src/menu/components/share/pastecomponent/index.jsx
@@ -129,6 +129,7 @@
  pasteSubmit = () => {
    const { options } = this.props
    this.pasteFormRef.handleConfirm().then(res => {
      if (!options.includes(res.copyType)) {
        notification.warning({ top: 92, message: '配置信息格式错误!', duration: 5 })
        return
@@ -147,7 +148,11 @@
        MKEmitter.emit('copyButtons', copyBtns)
      }
      if (type === 'action') {
      if (config.type === 'form' && config.subtype === 'stepform') {
        this.props.updateConfig(res)
        this.setState({visible: false})
        return
      } else if (type === 'action') {
        config.action = config.action || []
        config.action = config.action.filter(item => !item.origin)
src/tabviews/custom/components/form/normal-form/index.jsx
@@ -33,7 +33,6 @@
    BID: '',                   // 上级ID
    config: null,              // 图表配置信息
    loading: false,            // 数据加载状态
    activeKey: '',             // 选中数据
    sync: false,               // 是否统一请求数据
    data: null,                  // 数据
    group: null,
@@ -66,6 +65,7 @@
      group.subButton.uuid = group.uuid
      group.subButton.$menuId = group.uuid
      group.subButton.Ot = 'requiredSgl'
      group.subButton.$forbid = true
      group.subButton.OpenType = 'formSubmit'
      group.subButton.execError = 'never'
@@ -180,6 +180,26 @@
      MKEmitter.emit('reloadData', btn.syncComponentId)                        // 同级标签刷新
    }
    if (config.wrap.datatype !== 'static' && config.setting) {
      this.loadData(btn)
    } else {
      this.execSuccess(btn)
    }
  }
  resetParentParam = (MenuID, id) => {
    const { config } = this.state
    if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
    if (id !== this.state.BID) {
      this.setState({ BID: id }, () => {
        this.loadData()
      })
    }
  }
  execSuccess = (btn) => {
    const { config, group } = this.state
    if (config.subcards.length > group.sort) {
      let _group = config.subcards.filter(item => item.sort === (group.sort + 1))[0]
  
@@ -217,17 +237,7 @@
    }
  }
  resetParentParam = (MenuID, id) => {
    const { config } = this.state
    if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
    if (id !== this.state.BID) {
      this.setState({ BID: id }, () => {
        this.loadData()
      })
    }
  }
  async loadData () {
  async loadData (btn) {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, BID, group } = this.state
@@ -236,6 +246,7 @@
        data: {},
        loading: false
      })
      btn && this.execSuccess(btn)
      return
    }
@@ -254,6 +265,7 @@
      this.setState({
        loading: false
      })
      btn && this.execSuccess(btn)
      return
    }
@@ -267,20 +279,27 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      if (btn) {
        this.setState({
          data: _data || {},
          loading: false
        })
        this.execSuccess(btn)
      } else {
      let _group = group
      if (config.wrap.statusControl && _data[config.wrap.statusControl]) {
        let _status = _data[config.wrap.statusControl]
        let _groups = config.subcards.filter(item => item.setting.status === _status)[0]
        _group = _groups || _group
      }
      this.setState({
        group: _group,
        step: _group.sort - 1,
        activeKey: '',
        data: _data || {},
        loading: false
      })
      }
    } else {
      this.setState({
        loading: false,
@@ -290,6 +309,7 @@
        message: result.message,
        duration: 10
      })
      btn && this.execSuccess(btn)
    }
  }
src/tabviews/tabmanage/index.jsx
@@ -49,9 +49,9 @@
            return {
              uuid: temp.MenuID,
              value: temp.MenuID,
              MenuName: temp.MenuName,
              MenuName: temp.MenuName || '',
              type: temp.Template,
              MenuNo: temp.MenuNo,
              MenuNo: temp.MenuNo || '',
              Remark: temp.Remark
            }
          })
@@ -504,7 +504,7 @@
    let _tabviews = []
    if (tabviews) {
      _tabviews = tabviews.filter(tab => tab.MenuName.toLowerCase().indexOf(searchKey.toLowerCase()) >= 0)
      _tabviews = tabviews.filter(tab => tab.MenuName.toLowerCase().indexOf(searchKey.toLowerCase()) >= 0 || tab.MenuNo.toLowerCase().indexOf(searchKey.toLowerCase()) >= 0)
    }
    return (
src/tabviews/zshare/mutilform/checkCard/index.jsx
@@ -29,8 +29,10 @@
  }
  changeCard = (item) => {
    const { multiple } = this.props.card
    const { multiple, readonly } = this.props.card
    const { selectKeys } = this.state
    if (readonly) return
    if (multiple === 'true') {
      let keys = []
@@ -107,8 +109,9 @@
  }
  render() {
    const { card } = this.props
    return (
      <div className="check-card-form-box">
      <div className={'check-card-form-box' + (card.readonly ? ' readonly' : '')}>
        <Row gutter={12}>{this.getCards()}</Row>
      </div>
    )
src/tabviews/zshare/mutilform/checkCard/index.scss
@@ -2,6 +2,7 @@
  margin-top: 10px;
  margin-bottom: -10px;
  .card-cell {
    position: relative;
    border: 1px solid #bcbcbc;
    border-radius: 4px;
    padding: 6px;
@@ -16,7 +17,7 @@
      white-space: nowrap;
    }
  }
  .card-cell:hover, .card-cell.active {
  .card-cell.active {
    border-color: #1890ff;
    background: #1890ff;
    span {
@@ -24,6 +25,7 @@
    }
  }
  .card-pic-cell {
    position: relative;
    border: 1px solid #bcbcbc;
    border-radius: 4px;
    background-size: cover;
@@ -32,8 +34,40 @@
    line-height: 1.5;
    cursor: pointer;
  }
  .card-pic-cell:hover, .card-pic-cell.active {
  .card-pic-cell.active {
    border-color: #1890ff;
    box-shadow: 0px 0px 4px #1890ff;
  }
  .card-cell.active::after {
    content: ' ';
    position: absolute;
    display: table;
    border: 2px solid #ffffff;
    border-top: 0;
    border-left: 0;
    bottom: 0;
    right: 12px;
    width: 6px;
    height: 12px;
    transform: rotate(45deg) scale(1) translate(-50%, -50%);
  }
}
.check-card-form-box:not(.readonly) {
  .card-cell:hover {
    border-color: #1890ff;
    background: #1890ff;
    span {
      color: #ffffff!important;
    }
  }
  .card-pic-cell:hover {
    border-color: #1890ff;
    box-shadow: 0px 0px 4px #1890ff;
  }
}
.check-card-form-box.readonly {
  .card-cell, .card-pic-cell {
    cursor: not-allowed;
  }
}
src/tabviews/zshare/mutilform/customTextArea/index.jsx
@@ -80,7 +80,7 @@
    const { value } = this.state
    return (
      <TextArea value={value} autoSize={{ minRows: 2, maxRows: Item.maxRows || 6 }} onChange={this.onChange} disabled={Item.readonly === 'true'} />
      <TextArea value={value} autoSize={{ minRows: 2, maxRows: Item.maxRows || 6 }} onChange={this.onChange} disabled={Item.readonly} />
    )
  }
}
src/tabviews/zshare/mutilform/index.jsx
@@ -380,7 +380,7 @@
              _cell.Text = cell[item.valueText]
              if ((!_cell.Value && _cell.Value !== 0) || (!_cell.Text && _cell.Text !== 0)) return
            } else {
              _cell.$value = cell[item.valueField]
              _cell.$value = cell[item.cardValField]
              _cell = {..._cell, ...cell}
              if (!_cell.$value && _cell.$value !== 0) return
            }
src/templates/modalconfig/checkCard/index.scss
@@ -1,4 +1,5 @@
.check-card-edit-box {
  line-height: 1.5;
  .card-cell {
    border: 1px solid #bcbcbc;
    border-radius: 4px;
src/utils/utils.js
@@ -702,7 +702,7 @@
      arrfield.push(...item.linkSubField)
    } else if (item.type === 'checkcard') {
      arrfield = item.fields.map(f => f.field)
      arrfield.push(item.valueField)
      arrfield.push(item.cardValField)
    }
    arrfield = Array.from(new Set(arrfield))
@@ -1157,7 +1157,7 @@
  }
  // 添加数据中字段,表单值优先(按钮不选行或多行拼接时跳过)
  if (data && btn.Ot !== 'notRequired' && btn.Ot !== 'requiredOnce') {
  if (data && !btn.$forbid && btn.Ot !== 'notRequired' && btn.Ot !== 'requiredOnce') {
    datavars = {...data, ...datavars}
    const setField = (col) => {
src/views/appmanage/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import { fromJS } from 'immutable'
import { Spin, notification, Button, Table, Modal, ConfigProvider } from 'antd'
import { Spin, notification, Button, Table, Modal, ConfigProvider, Typography } from 'antd'
import moment from 'moment'
import md5 from 'md5'
import enUS from 'antd/es/locale/en_US'
@@ -12,11 +12,19 @@
import './index.scss'
const { confirm } = Modal
const { Paragraph } = Typography
const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
const Header = asyncComponent(() => import('@/mob/header'))
const MutilForm = asyncComponent(() => import('./mutilform'))
const SubMutilForm = asyncComponent(() => import('./submutilform'))
let base_url = ''
if (process.env.NODE_ENV === 'production') {
  base_url = document.location.origin + '/' + window.GLOB.service
} else {
  base_url = window.GLOB.location + '/' + window.GLOB.service
}
class AppManage extends Component {
  state = {
@@ -100,11 +108,12 @@
        title: '操作',
        key: 'action',
        align: 'center',
        width: '190px',
        width: '250px',
        render: (text, record) => (
          <div>
            <Button type="link" onClick={() => this.deleteSubApp(record)} style={{color: '#ff4d4f'}}>删除</Button>
            <Button type="link" onClick={() => this.jumpApp(record)}>编辑应用</Button>
            <Paragraph style={{display: 'inline-block', margin: 0}} copyable={{ text: `${base_url}${record.typename}/index.html#/index/${this.state.selectApp.kei_no}/${record.lang}` }}></Paragraph>
          </div>
        )
      },
src/views/menudesign/index.jsx
@@ -845,7 +845,7 @@
          check(item.components)
          return
        }
        if (['propcard', 'brafteditor', 'sandbox'].includes(item.subtype) && item.wrap.datatype === 'static') return
        if (['propcard', 'brafteditor', 'sandbox', 'stepform'].includes(item.subtype) && item.wrap.datatype === 'static') return
  
        if (item.setting) {
          if (item.setting.interType === 'system' && item.setting.execute !== 'false' && !item.setting.dataresource) {
src/views/mobdesign/index.jsx
@@ -1290,7 +1290,7 @@
          error = `导航栏《${item.name}》未设置菜单参数!`
        }
        if (['propcard', 'brafteditor', 'sandbox', 'tabbar'].includes(item.subtype) && item.wrap.datatype === 'static') return
        if (['propcard', 'brafteditor', 'sandbox', 'tabbar', 'stepform'].includes(item.subtype) && item.wrap.datatype === 'static') return
  
        if (item.setting) {
          if (item.setting.interType === 'system' && item.setting.execute !== 'false' && !item.setting.dataresource) {
src/views/pcdesign/index.jsx
@@ -1330,7 +1330,7 @@
          check(item.components)
          return
        }
        if (['propcard', 'brafteditor', 'sandbox'].includes(item.subtype) && item.wrap.datatype === 'static') return
        if (['propcard', 'brafteditor', 'sandbox', 'stepform'].includes(item.subtype) && item.wrap.datatype === 'static') return
  
        if (item.setting) {
          if (item.setting.interType === 'system' && item.setting.execute !== 'false' && !item.setting.dataresource) {