|
@@ -55,10 +55,12 @@ const EvaluateSteps = React.createClass({
|
|
|
loading: true,
|
|
|
steps: null,
|
|
|
value: 0,
|
|
|
- step: 0
|
|
|
+ step: 0,
|
|
|
+ dottList:[]
|
|
|
};
|
|
|
},
|
|
|
next(values) {
|
|
|
+ console.log(values)
|
|
|
if (this.state.current == 7) {
|
|
|
this.state.value = values;
|
|
|
return;
|
|
@@ -70,6 +72,9 @@ const EvaluateSteps = React.createClass({
|
|
|
if (this.state.current === 0 && this.props.title) {
|
|
|
this.props.title(values.name);
|
|
|
}
|
|
|
+ if(!this.state.current){
|
|
|
+ this.loadData(this.props.id)
|
|
|
+ }
|
|
|
this.setState({
|
|
|
current: current,
|
|
|
steps: this.state.steps
|
|
@@ -80,6 +85,7 @@ const EvaluateSteps = React.createClass({
|
|
|
this.setState({ current });
|
|
|
},
|
|
|
loadData(id) {
|
|
|
+ this.state.dottList=[];
|
|
|
this.state.step=0;
|
|
|
$.ajax({
|
|
|
url: globalConfig.context + '/api/user/evaluate/info/' + id
|
|
@@ -117,7 +123,7 @@ const EvaluateSteps = React.createClass({
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
if (!this.props.visible && nextProps.visible) {
|
|
|
if (nextProps.id) {
|
|
|
- this.loadData(nextProps.id);
|
|
|
+ this.loadData(nextProps.id);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -126,9 +132,14 @@ const EvaluateSteps = React.createClass({
|
|
|
<span
|
|
|
style={{ cursor: 'pointer' }}
|
|
|
onClick={() => {
|
|
|
+ let dottList=this.state.dottList;
|
|
|
+ if(index>0){
|
|
|
+ dottList.push(index)
|
|
|
+ }
|
|
|
if (index == this.state.step || !!this.state.steps[index]) {
|
|
|
this.setState({
|
|
|
- current: index
|
|
|
+ current: index,
|
|
|
+ dottList:dottList
|
|
|
});
|
|
|
}
|
|
|
}}
|
|
@@ -140,7 +151,7 @@ const EvaluateSteps = React.createClass({
|
|
|
render() {
|
|
|
this.state.StepContent = steps[this.state.current].content;
|
|
|
let loadContent = !!this.state.steps;
|
|
|
- console.log(this.state.step)
|
|
|
+ let dottList =this.state.dottList;
|
|
|
return (
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<div style={{ marginTop: 10 }}>
|
|
@@ -154,7 +165,7 @@ const EvaluateSteps = React.createClass({
|
|
|
prev={this.prev}
|
|
|
id={this.props.id}
|
|
|
visible={this.props.visible}
|
|
|
- data={(this.state.step)?this.state.steps[this.state.current]:{}}
|
|
|
+ data={this.state.step||dottList.length?this.state.steps[this.state.current]:{}}
|
|
|
record={this.state.steps}
|
|
|
value={this.state.value}
|
|
|
/>
|