From f36141f3075edf9d41928d64f759ad6bd1b1ac60 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 14 七月 2020 17:43:34 +0800 Subject: [PATCH] 2020-07-14 --- src/tabviews/zshare/actionList/newpagebutton/index.jsx | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx index a323132..c6b298a 100644 --- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx +++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx @@ -1,11 +1,13 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Button, notification } from 'antd' +import { Button, notification, Modal } from 'antd' import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' import './index.scss' + +const { confirm } = Modal class NewPageButton extends Component { static propTpyes = { @@ -13,11 +15,13 @@ btn: PropTypes.object, // 鎸夐挳 selectedData: PropTypes.any, // 瀛愯〃涓�夋嫨鏁版嵁 setting: PropTypes.any, // 椤甸潰閫氱敤璁剧疆 + updateStatus: PropTypes.func, // 鎸夐挳鐘舵�佹洿鏂� triggerBtn: PropTypes.any, } state = { - dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS + dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, + visible: false } /** @@ -82,9 +86,25 @@ let src = '#/print/' + window.btoa('ID=' + Id + msg + cloudmsg) window.open(src) } else if (btn.pageTemplate === 'pay') { - let _p = `ID=${Id}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID')}&logo=${window.GLOB.mainlogo}&name=${sessionStorage.getItem('Full_Name')}&suid=${sessionStorage.getItem('SessionUid')}&icp=${window.GLOB.ICP}©Right=${window.GLOB.copyRight}` + let _p = `ID=${Id}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID')}&logo=${window.GLOB.doclogo}&name=${sessionStorage.getItem('Full_Name')}&suid=${sessionStorage.getItem('SessionUid')}&icp=${window.GLOB.ICP}©Right=${window.GLOB.copyRight}` let url = '#/pay/' + window.btoa(window.encodeURIComponent(_p)) + let _this = this + _this.props.updateStatus('start') + confirm({ + title: '璇峰湪浠樻椤甸潰瀹屾垚璁㈠崟鏀粯銆�', + content: '', + className: 'pay-query', + okText: '鏀粯鎴愬姛', + cancelText: '鏀粯閬囧埌闂', + onOk() { + _this.props.updateStatus('refresh', 'grid') + }, + onCancel() { + _this.props.updateStatus('refresh', 'grid') + // _this.props.updateStatus('over') + }, + }) window.open(url) } else if (btn.pageTemplate === 'custom') { let url = btn.url -- Gitblit v1.8.0