#最新 Javascript技术:React+nodejs提交成功界面

2015-12-20 0 2,085

: + 提交成功界面(包含进度条)。

代码演示

//***frontend/src/pages/businessUser/newPage/newSuccess.js ***
import React from 'react'
import TestTTT from '../../../components/resultPage/testTTT'
import SubmitSuccessPage from '../../../components/resultPage/submitSuccessPage'
import StepProgress, { stepProgress } from '../../../components/resultPage/stepProgress'
export default class NewSuccess extends React.Component {

render(){

	var successItems = { 

		successTitle: "Idea submit Success - RaiseIdea", 
		subTitle: "Idea request number:2020182818828182881 server configuration takes 1-5 minutes, please wait." ,
		homeButtonName:"Return Home",
		gotoButtonName:"Raise New Idea",
		homeRul:"/EUC",
		GotoUrl:"/EUC/NewAutomation/Raiseidea"
	}

	
	var stepItems = [
		
		{ title: "Raise Idea", description: "" },
		{ title: "Prioritize", description: "" },
		{ title: "Pick up Idea", description: "" },
		{ title: "Initial Risk Assessment", description: "" },
		{ title: "Build & Test", description: "" },
		{ title: "UAT", description: "" },
		{ title: "Final Risk Assessment", description: "" },
		{ title: "Go-live", description: "" },
		{ title: "Release", description: "" }
	]
	return (
		<div width='60%'>
			<SubmitSuccessPage successItems ={successItems} />
			<div><br /><br /></div>
			<div><br /><br /></div>
			<StepProgress stepNo='5' stepItems = {stepItems}/>
		</div>
	)
}
}

//**frontend/src/components/resultPage/stepProgress.js **
import React from 'react';
import ReactDOM from 'react-dom';
import 'antd/dist/antd.css';
import './result.css';
import { Steps } from 'antd';

const { Step } = Steps;
export const stepProgress = props => {
    
    const {stepNo} = props
    const {stepItems} = props
    let nStep = stepNo
    var strSteplist = new Array(10)

    for (var i=0;i<stepItems.length;i++){

        strSteplist[i] =  <Step title={stepItems[i]['title']} description={stepItems[i]['description']} />
    }

    return (

       <div>
            <Steps progressDot current={nStep}>
                {strSteplist}
                {/* <Step title={stepItems[0]['title']} description={stepItems[0]['description']} />
                <Step title="Prioritize" description="" />
                <Step title="Pick up Idea" description="" />
                <Step title="Initial Risk Assessment" description="" />
                <Step title="Build & Test" description="" />
                <Step title="Build & Test" description="" />
                <Step title="Final Risk Assessment" description="" />
                <Step title="Go-live" description="" />
                <Step title="Release" description="" /> */}
            </Steps>
       </div>
      
    )
  }
  export default stepProgress

//***frontend/src/components/resultPage/submitSuccessPage.js ***

import React from 'react'
import ReactDOM from 'react-dom'
import 'antd/dist/antd.css'
import './result.css'
import { Result, Button } from 'antd'

export const submitSuccess = props => {

    //const ideaType =  'Idea submit Success'
  
    const {successItems} = props

    let ideaType = successItems['successTitle']
    let strSubTitle = successItems['subTitle']
    //let ideaType1 = ideaType + this.props
  return (
     <div>
         
            <Result
                status="success"
                title={ideaType}
                subTitle= {strSubTitle}
                extra={[
                <Button type="primary" key="returnHome"
                    onClick={() => {
                        window.location.href = successItems['homeRul']
                    }}
                >
                    {successItems['homeButtonName']}
                </Button>,
                <Button key="NewIdea"
                    onClick={() => {
                        window.location.href = successItems['GotoUrl']
                    }}
                
                >
                    {successItems['gotoButtonName']} </Button>,
                ]}
            />

     </div>
    
  )
}
export default submitSuccess
收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

声明: 本站仅提供资源学习下载,资源费用仅为赞助站长的整理费,不代表资源自身价值也不包含任何服务。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
本站提供的资源来自网络,版权争议与本站无关,所有内容及软件的文章仅限用于学习和研究目的。
如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。侵删请致信E-mail:duhaomu@163.com

浩沐资源网 未分类 #最新 Javascript技术:React+nodejs提交成功界面 https://www.haomu.top/30849.html

相关文章

发表评论
暂无评论
  • 0 +

    访问总数

  • 0 +

    会员总数

  • 0 +

    文章总数

  • 0 +

    今日发布

  • 0 +

    本周发布

  • 0 +

    运行天数

你的前景,远超我们想象