king
2023-04-20 73e68ead29f70638302629c7d8389c02d59bc6d9
2023-04-20
16个文件已修改
202 ■■■■■ 已修改文件
src/api/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/formdragelement/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/excelInbutton/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/printbutton/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/dragelement/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/codemirror/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/codemirror/replaceform/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -751,7 +751,7 @@
      token = JSON.parse(window.decodeURIComponent(window.atob(token)))
    } catch (e) {
      token = null
      _resolve({status: false, ErrCode: 'E', message: '接口信息解析失败!'})
      _resolve({status: false, ErrCode: 'E', message: '接口信息解析失败!', ErrMesg: 'token_error'})
    }
    if (!token) return
@@ -854,7 +854,7 @@
    param.appkey = window.GLOB.appkey || ''
    if (param.$token === '') {
      return Promise.resolve({status: false, ErrCode: 'E', message: '接口地址尚未设置!'})
      return Promise.resolve({status: false, ErrCode: 'E', message: '接口地址尚未设置!', ErrMesg: 'token_error'})
    } else if (param.$token) {
      return new Promise(resolve => this.visitOuterSystem(param, resolve))
    }
src/menu/components/share/actioncomponent/index.jsx
@@ -405,6 +405,7 @@
            }
          } else {
            btn.style = item.style || {}
            if (btn.class) {
            if (btn.class !== item.class || btn.show !== item.show || !btn.style.color || item.focus) {
              if (btn.show === 'icon') {
                btn.style.color = color[btn.class]
@@ -429,6 +430,7 @@
              }
            }
          }
          }
          return btn
        } else {
          return item
src/menu/datasource/verifycard/index.jsx
@@ -679,7 +679,7 @@
    if ((setting.interType === 'system' && setting.execute !== 'false') || _scripts.length > 0) {
      let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      let r = SettingUtils.getDebugSql(setting, _scripts, columns, searches, defaultSearch, timestamp)
      let r = SettingUtils.getDebugSql(setting, _scripts, columns, searches, defaultSearch, '2023-04-20 15:29:37')
      let _debugId = md5(r.sql)
src/menu/modalconfig/index.jsx
@@ -518,7 +518,7 @@
  render () {
    const { btn } = this.props
    const { config, saving } = this.state
    const { config, saving, card } = this.state
    return (
      <div className="modal-form-board">
@@ -583,7 +583,7 @@
          </div>
        </DndProvider>
        <Modal
          title="编辑"
          title={card && card.$copy ? '复制' : '编辑'}
          visible={this.state.visible}
          width={950}
          maskClosable={false}
@@ -593,7 +593,7 @@
          destroyOnClose
        >
          <ModalForm
            card={this.state.card}
            card={card}
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}
            standardform={this.state.standardform}
src/mob/components/formdragelement/index.jsx
@@ -62,6 +62,8 @@
    let val = JSON.parse(JSON.stringify(_card))
    val.copyType = 'form'
    _card.$copy = true
    delete val.$srcId
    
    let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId')
src/mob/modalconfig/index.jsx
@@ -471,7 +471,7 @@
  render () {
    const { btn } = this.props
    const { config, saving } = this.state
    const { config, saving, card } = this.state
    return (
      <div className="mob-form-board">
@@ -520,7 +520,7 @@
          </div>
        </DndProvider>
        <Modal
          title="编辑"
          title={card && card.$copy ? '复制' : '编辑'}
          visible={this.state.visible}
          width={950}
          maskClosable={false}
@@ -530,7 +530,7 @@
          destroyOnClose
        >
          <ModalForm
            card={this.state.card}
            card={card}
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}
            standardform={this.state.standardform}
src/router/index.js
@@ -1,7 +1,5 @@
import React, {Component} from 'react'
import {HashRouter, Switch, Route, Redirect} from 'react-router-dom'
import md5 from 'md5'
import moment from 'moment'
import asyncComponent from '@/utils/asyncComponent'
import asyncLoadComponent from '@/utils/asyncLoadComponent'
@@ -28,59 +26,36 @@
const SystemProc = asyncLoadComponent(() => import('@/views/systemproc'))
const routers = [
  {path: '/login', name: 'login', component: Login, auth: false},
  {path: '/main', name: 'main', component: Main, auth: true},
  {path: '/pay/:param', name: 'pay', component: Pay, auth: false},
  {path: '/print/:param', name: 'print', component: PrintT, auth: false},
  {path: '/ssologin/:param', name: 'ssologin', component: Sso, auth: false},
  {path: '/design', name: 'design', component: Design, auth: true},
  {path: '/appmanage', name: 'appmanage', component: AppManage, auth: true},
  {path: '/appcheck', name: 'appcheck', component: AppCheck, auth: true},
  {path: '/pcdesign/:param', name: 'pcdesign', component: PCDesign, auth: true},
  {path: '/mobdesign/:param', name: 'mobdesign', component: MobDesign, auth: true},
  {path: '/imdesign/:param', name: 'imdesign', component: ImDesign, auth: true},
  {path: '/menudesign/:param', name: 'menudesign', component: MenuDesign, auth: true},
  {path: '/basedesign/:param', name: 'basedesign', component: BaseDesign, auth: true},
  {path: '/tabledesign/:param', name: 'tabledesign', component: TableDesign, auth: true},
  {path: '/billprint/:param', name: 'billprint', component: BillPrint, auth: true},
  {path: '/docprint/:menuId', name: 'docprint', component: BillPrint, auth: false},
  {path: '/docprint/:menuId/:id', name: 'docprint', component: BillPrint, auth: false},
  {path: '/tab/:menuId', name: 'tab', component: MainParams, auth: false},
  {path: '/role/:param', name: 'role', component: RoleManage, auth: true},
  {path: '/hs', name: 'hs', component: SystemFunc, auth: true},
  {path: '/proc', name: 'proc', component: SystemProc, auth: true},
  {path: '/interface', name: 'interface', component: Interface, auth: true}
  {path: '/login', name: 'login', component: Login},
  {path: '/main', name: 'main', component: Main},
  {path: '/pay/:param', name: 'pay', component: Pay},
  {path: '/print/:param', name: 'print', component: PrintT},
  {path: '/ssologin/:param', name: 'ssologin', component: Sso},
  {path: '/design', name: 'design', component: Design},
  {path: '/appmanage', name: 'appmanage', component: AppManage},
  {path: '/appcheck', name: 'appcheck', component: AppCheck},
  {path: '/pcdesign/:param', name: 'pcdesign', component: PCDesign},
  {path: '/mobdesign/:param', name: 'mobdesign', component: MobDesign},
  {path: '/imdesign/:param', name: 'imdesign', component: ImDesign},
  {path: '/menudesign/:param', name: 'menudesign', component: MenuDesign},
  {path: '/basedesign/:param', name: 'basedesign', component: BaseDesign},
  {path: '/tabledesign/:param', name: 'tabledesign', component: TableDesign},
  {path: '/billprint/:param', name: 'billprint', component: BillPrint},
  {path: '/docprint/:menuId', name: 'docprint', component: BillPrint},
  {path: '/docprint/:menuId/:id', name: 'docprint', component: BillPrint},
  {path: '/tab/:menuId', name: 'tab', component: MainParams},
  {path: '/role/:param', name: 'role', component: RoleManage},
  {path: '/hs', name: 'hs', component: SystemFunc},
  {path: '/proc', name: 'proc', component: SystemProc},
  {path: '/interface', name: 'interface', component: Interface}
]
export default class RouteConfig extends Component {
  controlRoute (item, props) {
    if (!item.auth) { // 不需要授权,直接跳转
      return (<item.component {...props}/>)
    }
    let userId = sessionStorage.getItem('UserID') // 判断登录信息是否存在,注用户可能保存主页链接
    let authCode = localStorage.getItem(window.location.href.split('#')[0] + 'AuthCode') // 判断系统是否在授权期限内
    let _s = md5('mksoft' + moment().format('YYYYMMDD'))
    let isauth = authCode && authCode.includes(_s)
    let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6)
    let key1 = window.GLOB.licenseKey ? window.GLOB.licenseKey.substring(0, 6) : ''
    if (key1 === key) {
      isauth = true
    }
    if (userId && isauth) {
      return (<item.component {...props}/>)
    } else {
      return (<Redirect to={{ pathname: '/login'}}/>)
    }
  }
  render () {
    return (
      <HashRouter>
        <Switch>
          {routers.map((item, index) => <Route key={index} path={item.path} name={item.name} exact render={ props => this.controlRoute(item, props)}/>)}
          {routers.map((item, index) => <Route key={index} path={item.path} name={item.name} exact render={ props => <item.component {...props}/>}/>)}
          <Redirect exact from="/" to="login"/>
          <Route component= {NotFound}/>
        </Switch>
src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -426,6 +426,7 @@
      })
    } else if (btn.intertype === 'outer') { // 外部接口
      let _outParam = null
      let ver_token = false
      new Promise(resolve => {
        // 内部请求
@@ -483,6 +484,7 @@
            } else {
              param.$token = btn.exInterface || ''
            }
            ver_token = true
          } else {
            if (window.GLOB.systemType === 'production' && btn.proInterface) {
              param.rduri = btn.proInterface
@@ -511,7 +513,9 @@
      }).then(response => {
        if (!response) return
        // 回调请求
        if (btn.callbackFunc) {
        if (ver_token && response.ErrMesg === 'token_error') {
          this.execError(response)
        } else if (btn.callbackFunc ) {
          // 存在回调函数时,调用
          delete response.message
          delete response.status
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1742,6 +1742,7 @@
  outerOuterRequest = (params, result, record, _resolve) => {
    const { btn } = this.props
    let outParam = JSON.parse(JSON.stringify(result))
    let ver_token = false
    if (btn.outerFunc) {
      result.func = btn.outerFunc
@@ -1780,6 +1781,7 @@
        } else {
          result.$token = btn.exInterface || ''
        }
        ver_token = true
      } else {
        if (window.GLOB.systemType === 'production' && btn.proInterface) {
          result.rduri = btn.proInterface
@@ -1796,6 +1798,10 @@
    Api.genericInterface(result).then(res => {
      if (!res) return // LoginError时中断请求
      if (ver_token && res.ErrMesg === 'token_error') {
        this.execError(res)
        return
      }
      this.outerCallbackRequest(params, res, record, outParam, _resolve)
    }, () => {
      this.outerCallbackRequest(params, {status: false, message: 500, ErrCode: 'E', ErrMesg: 500}, record, outParam, _resolve)
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -1183,6 +1183,7 @@
  printOuterLoopRequest = (params, btn, _list, _resolve) => {
    let param = params.shift()
    let _outParam = null
    let ver_token = false
    new Promise(resolve => {
      // 内部请求
@@ -1240,6 +1241,7 @@
          } else {
            res.$token = btn.exInterface || ''
          }
          ver_token = true
        } else {
          if (window.GLOB.systemType === 'production' && btn.proInterface) {
            res.rduri = btn.proInterface
@@ -1262,7 +1264,10 @@
    }).then(response => {
      if (!response) return
      if (btn.callbackFunc) {
      if (ver_token && response.ErrMesg === 'token_error') {
        this.execError(response)
        _resolve({next: false, list: []})
      } else if (btn.callbackFunc) {
        // 存在回调函数时,调用
        delete response.message
        delete response.status
src/templates/modalconfig/dragelement/index.jsx
@@ -62,6 +62,8 @@
    let val = JSON.parse(JSON.stringify(_card))
    val.copyType = 'form'
    _card.$copy = true
    delete val.$srcId
    
    let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId')
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -1016,7 +1016,7 @@
    }
    let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    let sql = SettingUtils.getDebugSql(verify, scripts, (verify.useSearch === 'true' ? searches : []), Utils, timestamp)
    let sql = SettingUtils.getDebugSql(verify, scripts, (verify.useSearch === 'true' ? searches : []), Utils, '2023-04-20 15:29:37')
    let _debugId = md5(sql)
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
@@ -616,7 +616,7 @@
    const { verify, declareSql, debugId } = this.state
    let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    let sql = SettingUtils.getDebugSql(verify.setting || {}, verify.columns, scripts, declareSql, timestamp)
    let sql = SettingUtils.getDebugSql(verify.setting || {}, verify.columns, scripts, declareSql, '2023-04-20 15:29:37')
    let _debugId = md5(sql)
src/templates/zshare/codemirror/index.jsx
@@ -167,6 +167,9 @@
        return
      }
      let _href = window.location.href.split('#')[0]
      localStorage.setItem(_href + 'sql_char', JSON.stringify([res.origin, res.value]))
      _sql = _sql.replace(reg, res.value)
      this.setState({display: false, defaultVal: _sql}, () => {
src/templates/zshare/codemirror/replaceform/index.jsx
@@ -8,6 +8,25 @@
    inputSubmit: PropTypes.func // 回车事件
  }
  state = {
    orivalue: '',
    value: ''
  }
  UNSAFE_componentWillMount() {
    let _href = window.location.href.split('#')[0]
    let res = localStorage.getItem(_href + 'sql_char')
    if (res) {
      res = JSON.parse(res)
      this.setState({
        orivalue: res[0] || '',
        value: res[1] || ''
      })
    }
  }
  componentDidMount () {
    try {
      let _form = document.getElementById('origin')
@@ -40,6 +59,7 @@
  render() {
    const { getFieldDecorator } = this.props.form
    const { orivalue, value } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -56,7 +76,7 @@
          <Col span={24}>
            <Form.Item label="原字符">
              {getFieldDecorator('origin', {
                initialValue: '',
                initialValue: orivalue,
                rules: [
                  {
                    required: true,
@@ -69,7 +89,7 @@
          <Col span={24}>
            <Form.Item label="替换为">
              {getFieldDecorator('value', {
                initialValue: ''
                initialValue: value
              })(<Input autoComplete="off" onPressEnter={this.enterPress}/>)}
            </Form.Item>
          </Col>
src/views/billprint/index.jsx
@@ -336,6 +336,11 @@
              return cols.map(item => {
                if (item.type === 'colspan') {
                  item.subcols = getColumns(item.subcols)
                } else if (item.type === 'custom') {
                  item.elements = item.elements.map(cell => {
                    cell = this.resetElement(cell)
                    return cell
                  })
                } else {
                  item.IsSort = 'false'
                }
@@ -345,6 +350,41 @@
            }
            component.cols = getColumns(component.cols)
            component.statFields = []
          } else if (['card', 'carousel', 'timeline'].includes(component.type)) {
            component.subcards && component.subcards.forEach(card => {
              if (card.style.boxShadow) {
                delete card.style.hShadow
                delete card.style.vShadow
                delete card.style.shadowBlur
                delete card.style.shadowColor
              }
              card.elements = card.elements.filter(cell => {
                if (cell.eleType === 'button') return false
                cell = this.resetElement(cell)
                return true
              })
              if (!card.backElements || card.backElements.length === 0) return
              card.backElements = card.backElements.filter(cell => {
                if (cell.eleType === 'button') return false
                cell = this.resetElement(cell)
                return true
              })
            })
          } else if (component.type === 'balcony') {
            component.elements = component.elements.filter(cell => {
              if (cell.eleType === 'button') return false
              cell = this.resetElement(cell)
              return true
            })
          }
          if (component.wrap && component.wrap.datatype === 'static') {
@@ -454,6 +494,23 @@
    })
  }
  resetElement = (cell) => {
    cell.style = cell.style || {}
    if (['text', 'number', 'formula'].includes(cell.eleType)) {
      cell.innerHeight = cell.innerHeight || 'auto'
      cell.alignItems = cell.height > 1 ? cell.alignItems : ''
      if (cell.eleType === 'number' && typeof(cell.decimal) === 'number') {
        cell.round = Math.pow(10, cell.decimal)
        if (cell.format === 'percent') {
          cell.decimal = cell.decimal > 2 ? cell.decimal - 2 : 0
        }
      }
    }
    return cell
  }
  reload = () => {
    const { tempId } = this.state