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

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

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

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

Loading…
Cancel
Save