king
2022-08-29 363e75eed9b5ac96f47ca4093d08eda97a1c134a
2022-08-29
3个文件已修改
56 ■■■■ 已修改文件
src/components/sidemenu/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/printbutton/index.jsx 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/index.jsx
@@ -36,7 +36,7 @@
    let openKey = ''
    if (menu.children[0]) {
      openKey = menu.openId || menu.children[0].MenuID
      openKey = menu.children[0].MenuID
    }
    this.setState({
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -940,6 +940,16 @@
        error = '打印模板解析错误!'
      } else {
        let control = []
        let rotate = configParam.rotate || 0
        let offsetTop = 0
        let offsetLeft = 0
        if (rotate === 90) {
          offsetTop = configParam.width - configParam.height
        } else if (rotate === 270) {
          offsetLeft = configParam.height - configParam.width
        }
        configParam.elements.forEach(element => {
          let _field = element.field
@@ -952,11 +962,11 @@
            Type: element.type,
            Value: element.value || '',
            Field: _field,
            Left: element.left,
            Top: element.top,
            Left: element.left + offsetLeft,
            Top: element.top + offsetTop,
            Width: element.width,
            Height: element.height,
            Rotate: configParam.rotate || 0,
            Rotate: rotate,
            // Rotate: element.rotate,
            BorderSize: element.borderSize / 10,
            BorderColor: element.borderColor,
@@ -1025,6 +1035,12 @@
          control.push(item)
        })
        let down = false
        if (rotate === 90 || rotate === 270) {
          down = true
        }
        _configparam = {
          Version: '',
          Title: configParam.name,
@@ -1032,8 +1048,8 @@
          Description: configParam.remark,
          PrintTempNO: configParam.PrintTempNO,
          PageSetting: {
            Width: configParam.width,
            Height: configParam.height,
            Width: down ? configParam.height : configParam.width,
            Height: down ? configParam.width : configParam.height,
            Left: '0',
            Right: '0',
            Top: '0',
@@ -1163,12 +1179,21 @@
    })
    if (list.length === 0) {
      if (btn.verify.emptyTip === 'false') {
        this.execSuccess({
          ErrCode: '-1',
          message: '未获取到打印信息!',
          ErrMesg: '',
          status: true
        })
      } else {
      this.execError({
        ErrCode: btn.verify.emptyTip === 'false' ? '-1' : 'N',
          ErrCode: 'N',
        message: '未获取到打印信息!',
        ErrMesg: '',
        status: false
      })
      }
      return
    } else if (_errors.length > 0) {
      let lackerror = []
@@ -1324,17 +1349,17 @@
    const { btn } = this.props
    const { autoMatic } = this.state
    if ((res && (res.ErrCode === 'S' || !res.ErrCode)) || autoMatic) { // 执行成功
    if ((res.ErrCode === 'S' || !res.ErrCode) || autoMatic) { // 执行成功
      notification.success({
        top: 92,
        message: res.ErrMesg || this.state.dict['main.action.confirm.success'],
        duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2
      })
    } else if (res && res.ErrCode === 'Y') { // 执行成功
    } else if (res.ErrCode === 'Y') { // 执行成功
      Modal.success({
        title: res.ErrMesg || this.state.dict['main.action.confirm.success']
      })
    } else if (res && res.ErrCode === '-1') { // 完成后不提示
    } else if (res.ErrCode === '-1') { // 完成后不提示
    }
src/views/design/sidemenu/index.jsx
@@ -46,8 +46,15 @@
    menu = fromJS(menu).toJS()
    let openKey = ''
    if (menu.children[0]) {
      openKey = menu.openId || menu.children[0].MenuID
    // 菜单更新时,展开原二级菜单
    if (this.props.mainMenu && menu.MenuID === this.props.mainMenu.MenuID && this.state.openKeys && this.state.openKeys[0]) {
      openKey = this.state.openKeys[0]
      if (menu.children.filter(m => m.MenuID === openKey).length === 0) {
        openKey = ''
      }
    }
    if (!openKey && menu.children[0]) {
      openKey = menu.children[0].MenuID
    }
    this.setState({