king
2021-07-27 4d08cb2fa0daad4b7593a2b8282466b000194344
2021-07-27
11个文件已修改
253 ■■■■ 已修改文件
src/menu/components/share/sourcecomponent/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/transfer/index.jsx 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/transfer/settingform/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/printbutton/index.jsx 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.jsx 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/scriptform/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/printTemplate/mutilform/index.jsx 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/printTemplate/mutilform/index.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/printTemplate/option.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/printTemplate/print.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rolemanage/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/sourcecomponent/index.jsx
@@ -78,6 +78,8 @@
          width={visible !== 'system' ? 600 : 1000}
          closable={false}
          maskClosable={false}
          okText="确定"
          cancelText="取消"
          onOk={this.popSubmit}
          onCancel={() => {this.setState({visible: ''})}}
          destroyOnClose
src/pc/transfer/index.jsx
@@ -2,11 +2,9 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Button, Modal, notification } from 'antd'
// import moment from 'moment'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
// import Utils from '@/utils/utils.js'
import SettingForm from './settingform'
import Api from '@/api'
import './index.scss'
@@ -28,10 +26,48 @@
  }
  verifySubmit = () => {
    const { MenuID } = this.props
    this.verifyRef.handleConfirm().then(res => {
      let param = {
        func: 's_sVersionDetail_CloudAdd',
        kei_no: sessionStorage.getItem('kei_no'),
        kei_no_detail: sessionStorage.getItem('typename'),
        lang: sessionStorage.getItem('lang'),
        BID: res.VersionName,
        VType: 'mob_menu',
        TrdMenuID: MenuID
      }
      this.setState({
        // loading: true,
        visible: false
        loading: true
      })
      Api.getCloudConfig(param).then(result => {
        if (result.status) {
          notification.success({
            top: 92,
            message: '操作成功!',
            duration: 3
          })
          this.setState({
            loading: false,
            visible: false
          })
        } else {
          this.setState({
            loading: false
          })
          notification.warning({
            top: 92,
            message: result.message,
            duration: 5
          })
        }
      }, () => {
        this.setState({
          loading: false
        })
      })
    })
  }
src/pc/transfer/settingform/index.jsx
@@ -32,18 +32,18 @@
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 8 }
        sm: { span: 6 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
        sm: { span: 18 }
      }
    }
    return (
      <Form {...formItemLayout}>
        <Row gutter={24}>
          <Col span={20}>
          <Col span={22}>
            <Form.Item label="传输号">
              {getFieldDecorator('VersionName', {
                initialValue: '',
@@ -54,7 +54,7 @@
              })(
                <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}>
                  {translist.map(option =>
                    <Select.Option key={option.VersionName} value={option.VersionName}>{option.ProgramName}</Select.Option>
                    <Select.Option key={option.VersionName} value={option.VersionName}>{`${option.ProgramName}(${option.VersionName})`}</Select.Option>
                  )}
                </Select>
              )}
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -302,6 +302,7 @@
      let errorMsg = ''
      let _temps = {}
      let images = []
      result.forEach(res => {
        if (res.status && !errorMsg) {
@@ -315,6 +316,7 @@
              status: false
            }
          } else {
            images = [...images, ..._temp.imgs]
            _temps[res.tempId] = _temp
          }
        } else if (!errorMsg) {
@@ -323,7 +325,38 @@
      })
      if (!errorMsg) {
        this.execPrint(printlist, _temps, formdata)
        if (images.length > 0) {
          let errorUrls = []
          images.forEach(url => {
            let img = new Image()
            img.onerror = () => {
              errorUrls.push(url)
            }
            img.src = url
          })
          setTimeout(() => {
            if (errorUrls.length > 0) {
              notification.warning({
                top: 92,
                message: '模板中图片 ' + errorUrls.join(',') + ' 已失效!',
                duration: 5
              })
              Object.keys(_temps).forEach(key => {
                _temps[key].config.ReportHeader.Control = _temps[key].config.ReportHeader.Control.map(item => {
                  if (item.Type === 'image' && errorUrls.includes(item.Value)) {
                    item.Value = ''
                  }
                  return item
                })
              })
            }
            this.execPrint(printlist, _temps, formdata)
          }, 500)
        } else {
          this.execPrint(printlist, _temps, formdata)
        }
      } else {
        this.execError(errorMsg)
      }
@@ -601,6 +634,7 @@
    let _configparam = ''  // 打印配置信息
    let fields = []        // 模板中所需字段
    let nonEFields = []    // 非空字段
    let imgs = []
    if (!res.ConfigParam) {
      error = '未获取到打印模板信息!'
@@ -614,7 +648,6 @@
      if (!configParam) {
        error = '打印模板解析错误!'
      } else {
        let control = configParam.elements.map(element => {
          let _field = element.field
@@ -661,6 +694,12 @@
            item.ImageWidth = element.imgWidth
            item.ImageHeight = element.imgHeight
            item.Trimming = ''
            if (element.productValue && window.GLOB.systemType === 'production') {
              item.Value = element.productValue
              imgs.push(item.Value)
            } else if (item.Value) {
              imgs.push(item.Value)
            }
          } else if (item.Type === 'text') {
            item.FontFamily = element.fontFamily
            item.FontSize = element.fontSize
@@ -721,7 +760,8 @@
      error: error,
      config: _configparam,
      fields: fields,
      nonEFields: nonEFields
      nonEFields: nonEFields,
      imgs: imgs
    }
  }
src/views/appmanage/index.jsx
@@ -305,45 +305,66 @@
  }
  submitScript = () => {
    // const { selectTran } = this.state
    const { selectTran } = this.state
    this.scriptRef.handleConfirm().then(res => {
      this.setState({
        confirmloading: true
      })
      // let param = {}
      // s_sVersionDetail_Add
      // s_sVersionDetail_CloudAdd
      // Api.getCloudConfig(param).then(result => {
      //   if (result.status) {
      //     notification.success({
      //       top: 92,
      //       message: '操作成功!',
      //       duration: 3
      //     })
      //     this.setState({
      //       scriptIndex: 1,
      //       confirmloading: false,
      //       scriptVisible: false
      //     }, () => {
      //       this.getScriptList()
      //     })
      //   } else {
      //     this.setState({
      //       confirmloading: false
      //     })
      //     notification.warning({
      //       top: 92,
      //       message: result.message,
      //       duration: 5
      //     })
      //   }
      // }, () => {
      //   this.setState({
      //     confirmloading: false
      //   })
      // })
      let kei_no = res.appId.split(',')[1]
      let lang = res.subAppId.split(',')[1]
      let kei_no_detail = res.subAppId.split(',')[2]
      let param = {
        func: 's_sVersionDetail_CloudAdd',
        kei_no: kei_no,
        kei_no_detail: kei_no_detail,
        lang: lang,
        BID: selectTran.ID
      }
      if (res.VType === 'subapp') {
        param.VType = 'mob_menu'
        param.TrdMenuID = ''
        param.upid = md5(window.GLOB.appkey + kei_no + kei_no_detail + lang)
      } else if (res.VType === 'view') {
        param.VType = 'mob_menu'
        param.TrdMenuID = res.viewId
      } else if (res.VType === 'role') {
        param.VType = 'mob_roletree'
        param.upid = md5(window.GLOB.appkey + kei_no + kei_no_detail + lang)
      }
      Api.getCloudConfig(param).then(result => {
        if (result.status) {
          notification.success({
            top: 92,
            message: '操作成功!',
            duration: 3
          })
          this.setState({
            scriptIndex: 1,
            confirmloading: false,
            scriptVisible: false
          }, () => {
            this.getScriptList()
          })
        } else {
          this.setState({
            confirmloading: false
          })
          notification.warning({
            top: 92,
            message: result.message,
            duration: 5
          })
        }
      }, () => {
        this.setState({
          confirmloading: false
        })
      })
    })
  }
src/views/appmanage/scriptform/index.jsx
@@ -166,6 +166,7 @@
                <Select onChange={this.changeType}>
                  <Select.Option value="subapp">子应用</Select.Option>
                  <Select.Option value="view">页面</Select.Option>
                  <Select.Option value="role">权限树</Select.Option>
                </Select>
              )}
            </Form.Item>
src/views/printTemplate/mutilform/index.jsx
@@ -1,12 +1,14 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Form, Row, Col, Input, InputNumber, Select } from 'antd'
import { Form, Row, Col, Input, InputNumber, Select, Tooltip, Icon } from 'antd'
import { formRule } from '@/utils/option.js'
import FileUpload from '@/tabviews/zshare/fileupload'
// import FileUpload from '@/tabviews/zshare/fileupload'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const { TextArea } = Input
const FileUpload = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
class MainSearch extends Component {
  static propTpyes = {
@@ -114,11 +116,6 @@
        })
      }
    }
    this.handleSubmit()
  }
  updateImg = (val) => {
    this.props.form.setFieldsValue({ value: val })
    this.handleSubmit()
  }
@@ -231,7 +228,12 @@
      } else if (item.type === 'fileupload') {
        fields.push(
          <Col span={24} 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: [
@@ -241,12 +243,7 @@
                  }
                ]
              })(
                <FileUpload config={{
                  initval: item.initval || '',
                  suffix: '',
                  maxfile: 1,
                  fileType: 'text'
                }} onChange={this.updateImg} />
                <FileUpload type="picture" placement="right" onChange={this.handleSubmit} />
              )}
            </Form.Item>
          </Col>
@@ -254,7 +251,12 @@
      } else if (item.type === 'textarea') {
        fields.push(
          <Col span={24} 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: [
src/views/printTemplate/mutilform/index.scss
@@ -21,6 +21,20 @@
  //     width: 89.5%;
  //   }
  // }
  .mk-source-wrap {
    >.ant-radio-group {
      >.ant-radio-button-wrapper:last-child {
        display: none;
      }
      >.ant-radio-button-wrapper:not(:first-child) {
        border-radius: 0 4px 4px 0;
      }
    }
  }
  .anticon-question-circle {
    color: #c49f47;
    margin-right: 3px;
  }
  .ant-input-number {
    width: 100%;
  }
src/views/printTemplate/option.js
@@ -795,6 +795,14 @@
      required: false
    },
    {
      type: 'textarea',
      key: 'productValue',
      label: '正式地址',
      initval: item.productValue || '',
      tooltip: '正式系统使用的图片,为空时使用图片地址。',
      required: false
    },
    {
      type: 'select',
      key: 'field',
      label: '关联字段',
src/views/printTemplate/print.js
@@ -382,7 +382,7 @@
      if (image.complete) {
        context.drawImage(image, _left, _top, element.imgWidth, element.imgHeight)
        context.restore() // 重置画布
        if (elements.length > 0) {
          this.sketchothers(context, elements, selectId, ratio, resolve)
@@ -401,6 +401,14 @@
          }
        }
      }
      image.onerror = () => {
        context.restore() // 重置画布
        if (elements.length > 0) {
          this.sketchothers(context, elements, selectId, ratio, resolve)
        } else {
          this.cachesketch(context, resolve)
        }
      }
    }
  }
src/views/rolemanage/index.jsx
@@ -13,7 +13,6 @@
const { confirm } = Modal
const { TreeNode } = Tree
// const { Paragraph } = Typography
const { Search } = Input
const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS