Przeglądaj źródła

上一步显示时机

xy 7 lat temu
rodzic
commit
e5689f8123

+ 3 - 0
src/app/common/deploy/tencent/TencentConfig.js

@@ -363,6 +363,7 @@ class TencentConfig extends Component {
                                                         stepByStep={this.stepByStep}
                                                         userID={this.props.userID}
                                                         projectID={projectID}
+                                                        stepAllShow={this.state.stepAllShow}
                                                     />
                                                 </Card>
                                         }
@@ -381,6 +382,7 @@ class TencentConfig extends Component {
                                                         stepByStep={this.stepByStep}
                                                         userID={this.props.userID}
                                                         projectID={projectID}
+                                                        stepAllShow={this.state.stepAllShow}
                                                     />
                                                 </Card>
                                         }
@@ -400,6 +402,7 @@ class TencentConfig extends Component {
                                                         trialcase={this.props.trialcase}
                                                         stepByStep={this.stepByStep}
                                                         projectID={projectID}
+                                                        stepAllShow={this.state.stepAllShow}
                                                     />
                                                 </Card>
                                         }

+ 1 - 0
src/app/common/deploy/tencent/apiGroupCard/APIGroupCardFetch.js

@@ -46,6 +46,7 @@ class APIGroupCardFetch extends Component {
                                 stepByStep={this.props.stepByStep}
                                 userID={this.props.userID}
                                 projectID={this.props.projectID}
+                                stepAllShow={this.props.stepAllShow}
 
                                 // this
                                 switchConfig={this.switchConfig}

+ 26 - 14
src/app/common/deploy/tencent/apiGroupCard/APIGroupCardRender.js

@@ -340,13 +340,19 @@ class APIGroupCardRender extends Component {
                 {
                     manageUsers.includes(this.props.userID) ?
                         <div>
-                            <Button onClick={()=>{
-                                this.props.stepByStep(0)
-                            }}><FormattedMessage id="previous-step"/></Button>
-                            <Button onClick={() => {
-                                const id = idGen('group');
-                                this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.group);
-                            }} type='primary'><FormattedMessage id="save"/></Button>
+                            <div>
+                                {
+                                    this.props.stepAllShow ? '' :
+                                        <Button onClick={() => {
+                                            this.props.stepByStep(0)
+                                        }}><FormattedMessage id="previous-step"/></Button>
+
+                                }
+                                <Button onClick={() => {
+                                    const id = idGen('group');
+                                    this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.group);
+                                }} type='primary'><FormattedMessage id="save"/></Button>
+                            </div>
                             {
                                 this.state.showOK === true ?
                                     <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
@@ -359,13 +365,19 @@ class APIGroupCardRender extends Component {
                             ''
                             :
                             <div>
-                                <Button onClick={()=>{
-                                    this.props.stepByStep(0)
-                                }}><FormattedMessage id="previous-step"/></Button>
-                                <Button onClick={() => {
-                                    const id = idGen('group');
-                                    this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.group);
-                                }} type='primary'><FormattedMessage id="save"/></Button>
+                                <div>
+                                    {
+                                        this.props.stepAllShow ? '' :
+                                            <Button onClick={() => {
+                                                this.props.stepByStep(0)
+                                            }}><FormattedMessage id="previous-step"/></Button>
+
+                                    }
+                                    <Button onClick={() => {
+                                        const id = idGen('group');
+                                        this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.group);
+                                    }} type='primary'><FormattedMessage id="save"/></Button>
+                                </div>
                                 {
                                     this.state.showOK === true ?
                                         <Icon type="check-circle" theme="twoTone"

+ 1 - 0
src/app/common/deploy/tencent/apiPathCard/APIPathCardFetch.js

@@ -59,6 +59,7 @@ class APIPathCardFetch extends Component {
                                                 stepByStep={this.props.stepByStep}
                                                 userID={this.props.userID}
                                                 projectID={this.props.projectID}
+                                                stepAllShow={this.props.stepAllShow}
 
                                                 // query1
                                                 deployID={deploy.id}

+ 24 - 14
src/app/common/deploy/tencent/apiPathCard/APIPathCardRender.js

@@ -234,13 +234,18 @@ class APIPathCardRender extends Component {
                 {
                     manageUsers.includes(this.props.userID) ?
                         <div>
-                            <Button onClick={()=>{
-                                this.props.stepByStep(1)
-                            }}><FormattedMessage id="previous-step"/></Button>
-                            <Button onClick={()=>{
-                                const id = idGen('path');
-                                this.ok(id, this.props.userID, this.props.projectID, this.props.groupID, this.props.deployID, this.props.path);
-                            }} type='primary'><FormattedMessage id="save"/></Button>
+                            <div>
+                                {
+                                    this.props.stepAllShow? '' :
+                                        <Button onClick={()=>{
+                                            this.props.stepByStep(1)
+                                        }}><FormattedMessage id="previous-step"/></Button>
+                                }
+                                <Button onClick={()=>{
+                                    const id = idGen('path');
+                                    this.ok(id, this.props.userID, this.props.projectID, this.props.groupID, this.props.deployID, this.props.path);
+                                }} type='primary'><FormattedMessage id="save"/></Button>
+                            </div>
                             {
                                 this.state.showOK === true?
                                     <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
@@ -253,13 +258,18 @@ class APIPathCardRender extends Component {
                             ''
                             :
                             <div>
-                                <Button onClick={()=>{
-                                    this.props.stepByStep(1)
-                                }}><FormattedMessage id="previous-step"/></Button>
-                                <Button onClick={()=>{
-                                    const id = idGen('path');
-                                    this.ok(id, this.props.userID, this.props.projectID, this.props.groupID, this.props.deployID, this.props.path);
-                                }} type='primary'><FormattedMessage id="save"/></Button>
+                                <div>
+                                    {
+                                        this.props.stepAllShow? '' :
+                                            <Button onClick={()=>{
+                                                this.props.stepByStep(1)
+                                            }}><FormattedMessage id="previous-step"/></Button>
+                                    }
+                                    <Button onClick={()=>{
+                                        const id = idGen('path');
+                                        this.ok(id, this.props.userID, this.props.projectID, this.props.groupID, this.props.deployID, this.props.path);
+                                    }} type='primary'><FormattedMessage id="save"/></Button>
+                                </div>
                                 {
                                     this.state.showOK === true?
                                         <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>

+ 1 - 0
src/app/common/deploy/tencent/notificationCard/NotificationCardFetch.js

@@ -32,6 +32,7 @@ class NotificationCardFetch extends Component {
                                 stepByStep={this.props.stepByStep}
                                 userID={this.props.userID}
                                 projectID={this.props.projectID}
+                                stepAllShow={this.props.stepAllShow}
 
                                 // query
                                 notification={notification}

+ 12 - 6
src/app/common/deploy/tencent/notificationCard/NotificationCardRender.js

@@ -203,9 +203,12 @@ class NotificationCardFetch extends Component {
                     {
                         manageUsers.includes(this.props.userID) ?
                             <div>
-                                <Button onClick={()=>{
-                                    this.props.stepByStep(2)
-                                }}><FormattedMessage id="previous-step"/></Button>
+                                {
+                                    this.props.stepAllShow? '' :
+                                        <Button onClick={()=>{
+                                            this.props.stepByStep(2)
+                                        }}><FormattedMessage id="previous-step"/></Button>
+                                }
                                 <Button type="primary" onClick={() => {
                                     const id = idGen('notification');
                                     this.ok(id, this.props.userID, this.props.projectID, this.props.notification);
@@ -217,9 +220,12 @@ class NotificationCardFetch extends Component {
                                 ''
                                 :
                                 <div>
-                                    <Button onClick={()=>{
-                                        this.props.stepByStep(2)
-                                    }}><FormattedMessage id="previous-step"/></Button>
+                                    {
+                                        this.props.stepAllShow? '' :
+                                            <Button onClick={()=>{
+                                                this.props.stepByStep(2)
+                                            }}><FormattedMessage id="previous-step"/></Button>
+                                    }
                                     <Button type="primary" onClick={() => {
                                         const id = idGen('notification');
                                         this.ok(id, this.props.userID, this.props.projectID, this.props.notification);