master
杨树林 5 years ago
parent 64cab73cf7
commit d0153307f8

@ -66,6 +66,7 @@ class CommonWorkDetailIndex extends Component{
this.state = { this.state = {
DownloadType:false, DownloadType:false,
DownloadMessageval:undefined, DownloadMessageval:undefined,
donwloading:false,
} }
} }
initWorkDetailCommonState = (data) => { initWorkDetailCommonState = (data) => {
@ -104,17 +105,11 @@ class CommonWorkDetailIndex extends Component{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url,child){ confirmysl(url){
let params = {} axios.get(url+ '&export=true').then((response) => {
if (isListModule) { if(response===undefined){
// TODO return
if(child!=undefined) { }
params = child._getRequestParams() !== undefined ? child._getRequestParams() : {};
}
}
axios.get(url+ '&export=true',{
params
}).then((response) => {
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){
@ -138,7 +133,6 @@ class CommonWorkDetailIndex extends Component{
this.setState({ donwloading: true }) this.setState({ donwloading: true })
downloadFile({ downloadFile({
url: url, url: url,
params,
successCallback: (url) => { successCallback: (url) => {
this.setState({ donwloading: false }) this.setState({ donwloading: false })
console.log('successCallback') console.log('successCallback')
@ -324,13 +318,13 @@ class CommonWorkDetailIndex extends Component{
<li> <li>
<a href={"javascript:void(0)"} className="color-dark" <a href={"javascript:void(0)"} className="color-dark"
onClick={() => this.confirmysl(exportResultUrl,this.child)} onClick={() => this.confirmysl(exportResultUrl)}
>导出成绩</a> >导出成绩</a>
</li> </li>
<li> <li>
<a href={"javascript:void(0)"} className="color-dark" <a href={"javascript:void(0)"} className="color-dark"
onClick={() => this.confirmysl(exportUrl,this.child)} onClick={() => this.confirmysl(exportUrl)}
>导出作品附件</a> >导出作品附件</a>
</li> </li>
</ul> </ul>

@ -1990,6 +1990,9 @@ class Studentshavecompletedthelist extends Component {
}).then((response) => { }).then((response) => {
// console.log("528"); // console.log("528");
// console.log(JSON.stringify(response)); // console.log(JSON.stringify(response));
if(response===undefined){
return
}
this.setState({ this.setState({
loadingstate: false, loadingstate: false,
}) })

@ -19,7 +19,7 @@ import Ecerciseallbackagain from './Ecerciseallbackagain';
const polls_status={1:"未发布",2:"提交中",3:"已截止",4:"已结束"} const polls_status={1:"未发布",2:"提交中",3:"已截止",4:"已结束"}
const start_Value={0:"继续答题",1:"查看答题",2:"开始答题"} const start_Value={0:"继续答题",1:"查看答题",2:"开始答题"}
const qs = require('qs');
//试卷主要设置页面 //试卷主要设置页面
class Testpapersettinghomepage extends Component{ class Testpapersettinghomepage extends Component{
constructor(props) { constructor(props) {
@ -171,8 +171,14 @@ class Testpapersettinghomepage extends Component{
console.log("170"); console.log("170");
console.log(params); console.log(params);
axios.get(url,{ axios.get(url,{
params params,
paramsSerializer: function(params) {
return qs.stringify(params, {arrayFormat: 'brackets'})
}
}).then((response) => { }).then((response) => {
if(response===undefined){
return
}
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){

Loading…
Cancel
Save