dev_new_shixunsrepository
cxt 5 years ago
commit 512bf16866

@ -68,6 +68,23 @@ class PollDetailIndex extends Component{
}
}
newgetPollInfo=()=>{
// console.log(this.props);
let pollId=this.props.match.params.pollId;
let url=`/polls/${pollId}/common_header.json`
axios.get(url).then((result)=>{
if(result.status==200){
this.setState({
pollDetail:result.data,
user_permission:result.data.user_permission,
polls_status:result.data.polls_status,
})
}
}).catch((error)=>{
console.log(error);
})
}
componentDidMount(){
const query =this.props.location.search;
@ -259,7 +276,7 @@ class PollDetailIndex extends Component{
}
{
//设置
parseInt(tab[0])==3 && <PollTabForth {...this.props} {...this.state} triggerRef={this.bindRef} user_permission={user_permission} getPollInfo={this.getPollInfo}></PollTabForth>
parseInt(tab[0])==3 && <PollTabForth {...this.props} {...this.state} triggerRef={this.bindRef} user_permission={user_permission} getPollInfo={this.getPollInfo} newgetPollInfo={this.newgetPollInfo}></PollTabForth>
}
</div>

@ -112,7 +112,7 @@ class PollDetailTabForth extends Component{
// 已有设置数据的查询
getSettingInfo=()=>{
this.props.getPollInfo();
this.props.newgetPollInfo();
let pollId=this.props.match.params.pollId;
let url=`/polls/${pollId}/poll_setting.json`;
axios.get(url).then((result)=>{
@ -197,6 +197,7 @@ class PollDetailTabForth extends Component{
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
// 第一次进行问卷设置或者勾选了统一设置
let{unitSetting}=this.state
if(unitSetting==true){

Loading…
Cancel
Save