king
2023-09-28 76251922200560a63d0703ce2f936246ce8bc46e
2023-09-28
10个文件已修改
166 ■■■■■ 已修改文件
src/menu/components/form/simple-form/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/paste/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/paste/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/fileupload/index.jsx 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/menuelement/index.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/simple-form/index.jsx
@@ -539,6 +539,7 @@
    _card.subcards[0].setting.align = _card.wrap.align
    _card.subcards[0].setting.enable = _card.wrap.enable
    _card.subcards[0].setting.verticalSpace = _card.wrap.verticalSpace
    _card.subcards[0].subButton.enable = _card.wrap.enable
    if (_card.wrap.closeEnable === 'true' && !_card.subcards[0].closeButton) {
      _card.subcards[0].closeButton = {label: '关闭', enable: 'true', type: 'close', style: {backgroundColor: '#ffffff', color: 'rgba(0,0,0,0.65)', borderColor: '#d9d9d9', borderWidth: '1px', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px', marginLeft: '10px'}}
src/menu/components/group/paste/index.jsx
@@ -20,7 +20,7 @@
  pasteSubmit = () => {
    let appType = sessionStorage.getItem('appType')
    let options = ['datacard', 'propcard', 'balcony', 'timeline', 'simpleform', 'stepform', 'tabform', 'normaltable', 'tablecard', 'editor', 'line', 'bar', 'pie', 'scatter', 'sandbox']
    let options = ['datacard', 'propcard', 'balcony', 'timeline', 'simpleform', 'stepform', 'tabform', 'basetable', 'normaltable', 'tablecard', 'editor', 'line', 'bar', 'pie', 'scatter', 'sandbox']
    let types = {
      login: '登录',
      navbar: '导航栏',
@@ -53,6 +53,11 @@
        return
      }
      if (res.copyType === 'basetable') {
        res.copyType = 'normaltable'
        res.subtype = 'normaltable'
      }
      res = MenuUtils.resetComponentConfig(res, appType)
      delete res.copyType
src/menu/components/tabs/paste/index.jsx
@@ -53,7 +53,7 @@
  pasteSubmit = () => {
    const { Tab } = this.props
    let appType = sessionStorage.getItem('appType')
    let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'editor', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox']
    let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'basetable', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'editor', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox']
    let types = {
      login: '登录',
      navbar: '导航栏',
@@ -83,6 +83,11 @@
        return
      }
      if (res.copyType === 'basetable') {
        res.copyType = 'normaltable'
        res.subtype = 'normaltable'
      }
      res = this.resetconfig(res, appType)
      delete res.copyType
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1604,6 +1604,7 @@
      }
      if (window.GLOB.debugger === true) {
        console.info('%c' + btn.logLabel + '(回调)', 'color: blue')
        console.info(sql.replace(/\n\s{8}/ig, '\n'))
      }
src/tabviews/zshare/fileupload/index.jsx
@@ -5,7 +5,9 @@
import { Upload, Button, Progress, notification } from 'antd'
import { UploadOutlined } from '@ant-design/icons'
import SparkMD5 from 'spark-md5'
import Api from '@/api'
import MKEmitter from '@/utils/events.js'
import './index.scss'
class FileUpload extends Component {
@@ -129,7 +131,9 @@
    this.props.onChange(vals.join(','))
  }
  onUpdate = (url) => {
  onUpdate = (url, file_name) => {
    const { config } = this.props
    let filelist = fromJS(this.state.filelist).toJS()
    if (filelist[filelist.length -1]) {
@@ -151,7 +155,20 @@
    })
    this.setState({filelist})
    this.props.onChange(vals.join(','))
    if (config.subFields) {
      let other = {}
      config.subFields.forEach((n, i) => {
        other[n.field] = file_name
        setTimeout(() => {
          MKEmitter.emit('mkFC', 'input', n.uuid, file_name)
        }, i * 5)
      })
      this.props.onChange(vals.join(','), other)
    } else {
      this.props.onChange(vals.join(','))
    }
  }
  onFail = (msg) => {
@@ -171,7 +188,7 @@
    })
  }
  shardupload = (param) => {
  shardupload = (param, file_name) => {
    let form = new FormData()
    form.append('file', param.binary)
@@ -189,7 +206,7 @@
    Api.getLargeFileUpload(form).then(res => {
      if (res.status) {
        if (res.urlPath) {
          this.onUpdate(res.urlPath)
          this.onUpdate(res.urlPath, file_name)
        } else {
          this.onFail()
        }
@@ -253,6 +270,8 @@
      percent: 0
    })
    let file_name = file.name.replace(/\.{1}[^.]*$/ig, '')
    if (compress === 'true' || compress === 'base64') {
      let reader = new FileReader()
      let fileSize = file.size / 1024 / 1024
@@ -292,7 +311,7 @@
          let param = {Base64Img: cvs.toDataURL('image/jpeg', compressRate)}
          if (this.props.config.compress === 'base64') {
            this.onUpdate(param.Base64Img)
            this.onUpdate(param.Base64Img, file_name)
  
            this.setState({
              percent: 100
@@ -317,7 +336,7 @@
                  url = rduri.replace(/webapi(.*)$/, '') + result.Images
                }
  
                this.onUpdate(url)
                this.onUpdate(url, file_name)
  
                this.setState({
                  percent: 100
@@ -358,7 +377,7 @@
        if (res.status) {
          if (res.urlPath) {
            let path = (/^\/\//.test(res.urlPath) ? 'https:' : '') + res.urlPath
            this.onUpdate(path)
            this.onUpdate(path, file_name)
            this.setState({
              percent: 100
            }, () => {
@@ -403,7 +422,7 @@
      
      Api.getFilePreUpload(_param).then(res => {
        if (res.status && res.urlPath) {
          this.onUpdate(res.urlPath)
          this.onUpdate(res.urlPath, file_name)
          this.setState({
            percent: 100
          }, () => {
@@ -415,7 +434,7 @@
            }, 200)
          })
        } else {
          this.shardupload(param)
          this.shardupload(param, file_name)
        }
      })
    }
src/tabviews/zshare/mutilform/index.jsx
@@ -486,47 +486,42 @@
      let item = fieldMap.get(cell.field)
      // 下级表单控制-字段写入
      if ((['select', 'radio', 'link'].includes(item.type) || (item.type === 'checkcard' && item.multiple !== 'true') || (item.type === 'cascader' && item.resourceType !== '2')) && item.linkSubField) {
        item.subFields = []
        item.linkSubField.forEach(m => {
          let n = fieldMap.get(m)
          if (n && ['text', 'number', 'textarea'].includes(n.type)) {
            item.subFields.push({
              uuid: n.uuid,
              field: m
            })
          }
        })
        if (item.subFields.length === 0) {
          item.subFields = null
        } else if (item.oriOptions.length > 0) {
          item.oriOptions = item.oriOptions.map(cell => {
            item.subFields.forEach(m => {
              cell[m.field] = cell[m.field] === undefined ? '' : cell[m.field]
            })
            return cell
      if (item.linkSubField && item.linkSubField.length > 0) {
        if ((['select', 'radio', 'link'].includes(item.type) || (item.type === 'checkcard' && item.multiple !== 'true') || (item.type === 'cascader' && item.resourceType !== '2'))) {
          item.subFields = []
          item.linkSubField.forEach(m => {
            let n = fieldMap.get(m)
            if (n && ['text', 'number', 'textarea'].includes(n.type)) {
              item.subFields.push({
                uuid: n.uuid,
                field: m
              })
            }
          })
          item.options = fromJS(item.oriOptions).toJS()
        }
        item.linkSubField = null
      } else if (item.type === 'switch' && item.linkSubField) {
        item.options = []
        item.subFields = []
        item.linkSubField.forEach(m => {
          let n = fieldMap.get(m)
          if (n && ['text', 'number', 'textarea'].includes(n.type)) {
            item.subFields.push({
              uuid: n.uuid,
              field: m
          if (item.oriOptions.length > 0) {
            item.oriOptions = item.oriOptions.map(cell => {
              item.subFields.forEach(m => {
                cell[m.field] = cell[m.field] === undefined ? '' : cell[m.field]
              })
              return cell
            })
            item.options = fromJS(item.oriOptions).toJS()
          }
        })
        if (item.subFields.length === 0) {
          item.subFields = null
        } else {
        } else if (item.type === 'switch') {
          item.options = []
          item.subFields = []
          item.linkSubField.forEach(m => {
            let n = fieldMap.get(m)
            if (n && ['text', 'number', 'textarea'].includes(n.type)) {
              item.subFields.push({
                uuid: n.uuid,
                field: m
              })
            }
          })
          reFieldsVal = reFieldsVal || {}
          let val = item.initval === item.openVal ? item.openText : item.closeText
@@ -534,7 +529,20 @@
          item.subFields.forEach(n => {
            reFieldsVal[n.field] = val || ''
          })
        } else if (item.type === 'fileupload') {
          item.options = []
          item.subFields = []
          item.linkSubField.forEach(m => {
            let n = fieldMap.get(m)
            if (n && ['text', 'number', 'textarea'].includes(n.type)) {
              item.subFields.push({
                uuid: n.uuid,
                field: m
              })
            }
          })
        }
        item.linkSubField = null
      }
@@ -1136,7 +1144,7 @@
        } else if (item.type === 'fileupload') {
          className = item.readonly ? 'readonly' : ''
          className += item.fileType === 'picture-card' ? ' file-upload' : ''
          content = (<MKFileUpload config={item} onChange={(val) => this.recordChange({[item.field]: val})} />)
          content = (<MKFileUpload config={item} onChange={(val, other = {}) => this.recordChange({[item.field]: val, ...other})} />)
        } else if (item.type === 'textarea') {
          content = (<MKTextArea config={item} onChange={(val, defer) => !defer && this.recordChange({[item.field]: val})}/>)
        } else if (item.type === 'rate') {
src/templates/zshare/formconfig.jsx
@@ -4094,9 +4094,10 @@
      type: 'multiselect',
      key: 'linkSubField',
      label: '填充表单',
      tooltip: '在切换选项时会把信息自动填入关联的表单(文本或数字表单)中,开关会将提示文本填入此表单。',
      tooltip: '在切换选项时会把信息自动填入关联的表单(文本或数字表单)中,开关会将提示文本填入此表单,文件上传会将原文件名填入此表单。',
      initVal: card.linkSubField || [],
      options: inputfields
      options: inputfields,
      allowClear: true
    },
    // {
    //   type: 'number',
src/templates/zshare/modalform/index.jsx
@@ -27,7 +27,7 @@
  checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'place', 'width', 'multiple', 'splitline', 'marginTop', 'marginBottom'],
  multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'dropdown'],
  link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkField', 'linkSubField', 'span', 'place', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom', 'pickerMode'],
  fileupload: ['readonly', 'required', 'hidden', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'],
  fileupload: ['readonly', 'required', 'hidden', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'linkSubField', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'],
  switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'linkSubField', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'],
  check: ['initval', 'openVal', 'closeVal', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom', 'checkTip'],
  date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'place', 'marginTop', 'marginBottom', 'minDate', 'maxDate', 'precision'],
src/utils/utils.js
@@ -1170,6 +1170,7 @@
    sql = sql.replace(/\n\s{6}/ig, '\n')
    if (window.GLOB.debugger === true) {
      console.info('%c' + item.logLabel, 'color: blue')
      console.info(sql)
    }
  } else {
@@ -1376,6 +1377,7 @@
    sql = sql.replace(/\n\s{6}/ig, '\n')
    if (window.GLOB.debugger === true) {
      console.info('%c' + btn.logLabel, 'color: blue')
      console.info(sql)
    }
  } else {
@@ -1580,7 +1582,7 @@
      Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50)${_declarefields}
    `
  let userName = sessionStorage.getItem('User_Name') || ''
  let userName = sessionStorage.getItem('User_Name') || ''
  let fullName = sessionStorage.getItem('Full_Name') || ''
  let RoleID = sessionStorage.getItem('role_id') || ''
  let departmentcode = sessionStorage.getItem('departmentcode') || ''
@@ -2281,7 +2283,7 @@
  }
  if (window.GLOB.debugger === true) {
    // _sql = _sql.replace(/\n\s{8}/ig, '\n')
    console.info('%c' + btn.logLabel, 'color: blue')
    console.info(_sql)
  }
src/views/design/sidemenu/menuelement/index.scss
@@ -21,7 +21,6 @@
  width: 98%;
  div {
    padding: 0px 0px 0px 30px;
    margin-right: 20px;
    height: 40px;
    line-height: 40px;
    cursor: move;
@@ -57,3 +56,16 @@
    }
  }
}
.side-card div:first-child::before {
  position: absolute;
  content: ' ';
  display: block;
  width: 100%;
  height: 8px;
  top: -8px;
  left: 0px;
}
.side-card:first-child div:first-child::before {
  height: 15px;
  top: -15px;
}