+
}
diff --git a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
index 9ea972177..0cae1e2a6 100644
--- a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
+++ b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
@@ -34,7 +34,7 @@ class CompetitionContentsMd extends Component{
}else{
chart_rules.rule_contents.map((items,keys)=>{
- debugger
+
if(parseInt(this.props.tabkey)===items.competition_stage_id){
console.log(items)
this.contentMdRef.current.setValue(items.content);
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js
index 1c627b78d..eaefd50e9 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js
@@ -142,6 +142,8 @@ class Coursesleftnav extends Component{
off('editshixunmainname',this.editshixunmainname)
off('videoAdd',this.addVideo)
off('editVideo',this.editVideo)
+ off('addcommon_homeworks',this.addcommon_homeworks)
+ off('editcommon_homeworks',this.editcommon_homeworks)
}
addshixunchild=(e, data)=>{
this.Navmodalnames(e,1,"shixun_homework",data);
@@ -149,6 +151,12 @@ class Coursesleftnav extends Component{
editshixunchild=(e, data)=>{
this.Navmodalnames(e,4,"editSecondname",data.id,data.name);
}
+ addcommon_homeworks=(e, data)=>{
+ this.Navmodalnames(e,1,"common_homework",data);
+ }
+ editcommon_homeworks=(e, data)=>{
+ this.Navmodalnames(e,4,"editSecondname",data.id,data.name);
+ }
editshixunmainname=(e, data)=>{
this.Navmodalnames(e,3,"editname",data.id,data.name);
}
@@ -196,7 +204,8 @@ class Coursesleftnav extends Component{
on('editshixunmainname',this.editshixunmainname);
on('videoAdd',this.addVideo);
on('editVideo',this.editVideo)
-
+ on('addcommon_homeworks',this.addcommon_homeworks)
+ on('editcommon_homeworks',this.editcommon_homeworks)
let courstype=this.props.match.url;
@@ -537,7 +546,7 @@ class Coursesleftnav extends Component{
}
saveNavmodapost=(url,value,positiontype,coursesId,type)=>{
-
+ console.log(positiontype)
axios.post(url,
{name:value}).then((result)=>{
if(result!=undefined){
@@ -548,6 +557,23 @@ class Coursesleftnav extends Component{
description:result.data.message
});
+ if(positiontype==="common_homeworks"||positiontype==="common_homework"||positiontype==="group_homeworks"||positiontype==="group_homework"){
+ if(type===true){
+ this.updasaveNavmoda()
+ trigger('updateNavSuccess')
+ }else{
+ this.updasaveNavmoda()
+ if(positiontype==="common_homeworks"){
+ this.props.history.push(`/classrooms/${coursesId}/common_homework/${result.data.category_id}`);
+ }
+ if(positiontype==="group_homeworks"){
+ this.props.history.push(`/classrooms/${coursesId}/group_homework/${result.data.category_id}`);
+ }
+
+ }
+ return
+ }
+
if(positiontype==="shixun_homeworks"||positiontype==="shixun_homework"){
if(type===true){
this.updasaveNavmoda()
@@ -557,6 +583,7 @@ class Coursesleftnav extends Component{
this.props.history.push(`/classrooms/${coursesId}/shixun_homework/${result.data.category_id}`);
}
+ return
}
if(positiontype==="files"||positiontype==="file"){
@@ -569,22 +596,25 @@ class Coursesleftnav extends Component{
this.updasaveNavmoda()
this.props.history.push(`/classrooms/${coursesId}/file/${result.data.category_id}`);
}
-
+ return
}
if(positiontype==="boards"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
this.props.history.push(`/classrooms/${coursesId}/boards/${result.data.category_id}`);
+ return
}
if(positiontype!="course_groups"&&positiontype!="shixun_homeworks"&&positiontype!="shixun_homework"){
this.updasaveNavmoda()
+ return
}
if(positiontype==="course_groups"){
this.props.updataleftNavfun();
this.props.history.push(`/classrooms/${coursesId}/course_groups/${result.data.group_id}`);
+ return
}
}
@@ -864,6 +894,10 @@ class Coursesleftnav extends Component{
{/*公告栏*/}
{/*作业*/}
{item.type==="shixun_homework"?
this.Navmodalnames(e,1,"shixun_homework",item.id)}>新建目录
:""}
+ {/* 普通作业 */}
+ {item.type==="common_homework"?
this.Navmodalnames(e,1,"common_homeworks",item.id)}>新建目录
:""}
+ {/*/!* 分组作业 *!/*/}
+ {item.type==="group_homework"?
this.Navmodalnames(e,1,"group_homeworks",item.id)}>新建目录
:""}
{/*资源*/}
{item.type==="attachment"?
this.Navmodalnames(e,1,"attachment",item.id)}>新建目录
:""}
{/* 视频 */}
@@ -894,8 +928,8 @@ class Coursesleftnav extends Component{
let {twosandiantypes,twosandiantypenum}=this.state;
return (item.type==="graduation"?"":
{/*作业/资源*/}
- {item.type==="shixun_homework"||item.type==="attachment"||item.type==="graduation"?
this.Navmodalnames(e,4,"editSecondname",iem.category_id,iem.category_name)}>重命名
:""}
- {item.type==="shixun_homework"||item.type==="attachment"?
this.deleteSecondary(e,1,iem.category_id)}>删除
:""}
+ {item.type==="shixun_homework"||item.type==="attachment"||item.type==="graduation"||item.type==="common_homework"||item.type==="group_homework"?
this.Navmodalnames(e,4,"editSecondname",iem.category_id,iem.category_name)}>重命名
:""}
+ {item.type==="shixun_homework"||item.type==="attachment"||item.type==="common_homework"||item.type==="group_homework"?
this.deleteSecondary(e,1,iem.category_id)}>删除
:""}
{/*分班*/}
{item.type==="course_group"?
this.Navmodalnames(e,5,"editSecondname",iem.category_id,iem.category_name)}>重命名
:""}
{item.type==="course_group"?
this.deleteSecondary(e,2,iem.category_id)}>删除
:""}
diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js
index 78f56a0f7..f166f3aaa 100644
--- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js
+++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js
@@ -156,7 +156,7 @@ class Bullsubdirectory extends Component{
handleSubmit=(e) => {
e.preventDefault();
this.props.form.validateFields((err, values) => {
- debugger
+
if (!err) {
console.log(values.description);
if(values.eduintits === undefined|| values.eduintits === "" || values.eduintits ===null){
diff --git a/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js
index 70b39241c..3b5d88a3d 100644
--- a/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js
+++ b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js
@@ -20,7 +20,7 @@ let id = 0;
/**
target_id
- position
+ position
target_weight
target_contents
@@ -29,7 +29,7 @@ let id = 0;
subitem_contents
*/
-const data =
+const data =
[{"position":0,"target_weight":0.02,"target_contents":"12","standard_grade":2,"subitem_id":"65"},{"position":3,"target_id":"0","target_weight":0.1,"target_contents":"理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。","standard_grade":60,"subitem_id":"66"},{"position":4,"target_weight":1,"target_contents":"22","standard_grade":33,"subitem_id":"66"},{"position":11,"target_id":"1","target_weight":0.1,"target_contents":"理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。","standard_grade":61,"subitem_id":"65"}]
;
let _data = [
@@ -70,10 +70,10 @@ class EditableCourseSupportSetting extends Component {
let fValues = this.props.form.getFieldsValue();
if (
// fValues.standard_grade[k] && fValues.standard_grade[k] != 75
- // || fValues.subitem_id[k]
- // ||
- fValues.target_contents[k]
- // || fValues.target_weight[k]
+ // || fValues.subitem_id[k]
+ // ||
+ fValues.target_contents[k]
+ // || fValues.target_weight[k]
) {
this.props.showModal('提示', '确定要删除吗?', () => {
this.remove(k)
@@ -129,7 +129,7 @@ class EditableCourseSupportSetting extends Component {
const subitem_id = form.getFieldValue('subitem_id');
keys.splice(index_arg, 0, newKey);
- // position2Target_idMap
+ // position2Target_idMap
// {1:2, 2:3, 3:4, 4:6 } --> {1:2, 2:3, 3:7, 4:4, 5:6 }
// 更新key/position 映射到target_id的map
// 两次revers,用这个结构,达到给position加1的效果
@@ -142,13 +142,13 @@ class EditableCourseSupportSetting extends Component {
reverseMap[target_id] = parseInt(reverseMap[target_id]) + 1;
keys[i] = keys[i] + 1;
}
- for (let i = 0 ; i < keys.length - 1; i++) {
+ for (let i = 0 ; i < keys.length - 1; i++) {
if (keys[i] == keys[i + 1]) {
- debugger;
+
}
}
this.position2Target_idMap = this._reverseMap(reverseMap);
-
+
target_weight.splice(newKey, 0, undefined);
target_contents.splice(newKey, 0, undefined);
@@ -179,7 +179,7 @@ class EditableCourseSupportSetting extends Component {
const keys = form.getFieldValue('keys');
let nextKeys ;
let newKey = k + 1;
-
+
const newKeyIndex = keys.indexOf(newKey)
if (newKeyIndex != -1) {
// 新key存在,将新key位置及以后的row后移,直到找到一个之后的空位置
@@ -213,7 +213,7 @@ class EditableCourseSupportSetting extends Component {
data.push({})
}
for (var valKey in values) {
-
+
let dataIndex = 0
values[valKey].forEach( (item,index) => {
let _val = values[valKey][index];
@@ -228,7 +228,7 @@ class EditableCourseSupportSetting extends Component {
}
console.log('Received values of form: ', values, data);
-
+
let totalWeight = 0;
values.target_weight.forEach(item => {
if (item) {
@@ -264,8 +264,8 @@ class EditableCourseSupportSetting extends Component {
}
}
}
-
-
+
+
});
}
@@ -292,7 +292,7 @@ class EditableCourseSupportSetting extends Component {
subitem_id[item.position] = item.subitem_id ? (item.subitem_id).toString() : item.subitem_id;
this.position2Target_idMap[item.position] = item.target_id
- })
+ })
form.setFieldsValue({
keys
});
@@ -308,9 +308,9 @@ class EditableCourseSupportSetting extends Component {
// this.forceUpdate()
}, 3000)
-
+
}
-
+
render() {
const { getFieldDecorator, getFieldValue } = this.props.form;
@@ -397,7 +397,7 @@ class EditableCourseSupportSetting extends Component {
message: "请先选择毕业要求指标点",
}],
})(
-
)}
- { !addOrDeleting && { this.onRemove(k) }}
className="color-grey-c mr15" data-tip-down="删除">
}
- { !addOrDeleting && { this.add(k, index + 1) }}
- className="color-green show-FillTable"
+ className="color-green show-FillTable"
data-tip-down="添加">
}
-
-
+
+
));
return (
-
+
-
:
}
diff --git a/public/react/src/modules/modals/SendTopics.js b/public/react/src/modules/modals/SendTopics.js
index 96320f201..7a072a843 100644
--- a/public/react/src/modules/modals/SendTopics.js
+++ b/public/react/src/modules/modals/SendTopics.js
@@ -95,7 +95,7 @@ class SendTopics extends Component{
}catch (e) {
}
-debugger
+
if(this.props.mysendall===true){
//详情页面跳过来的
try {
@@ -119,7 +119,7 @@ debugger
}
}else{
//外部多个列表页跳过来的
- debugger
+
try {
var rurls="";
if(this.props.category==="normal"){
diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js
index d542c225e..bf43c0759 100644
--- a/public/react/src/modules/paths/PathDetail/DetailTop.js
+++ b/public/react/src/modules/paths/PathDetail/DetailTop.js
@@ -32,7 +32,10 @@ class DetailTop extends Component{
getappointmenttype:false,
openpathss:false,
cancel_publics:false,
- cancel_has_publics:false
+ cancel_has_publics:false,
+ applyissuePaths:false,
+ cancelText:undefined,
+ okText:undefined
}
}
componentDidMount(){
@@ -110,21 +113,27 @@ class DetailTop extends Component{
applyissuePath=()=>{
+ this.setState({
+ loadtype:true,
+ Modalstype: true,
+ Modalstopval:`课程发布后即可发送课堂使用`,
+ // modalsMidval:"有人公开可见,若仅本人教学使用则无需申请公开,直接发",
+ // Modalsbottomval:"送到课堂即可。",
+ applyissuePaths:true
+ })
+
+ }
+
+ showapplyissuePath=()=>{
let pathid=this.props.match.params.pathId;
let url ="/paths/"+pathid+"/publish.json";
axios.post(url).then((result)=>{
if(result.status===200){
if(result.data.status===0){
- this.setState({
- loadtype:true,
- Modalstype: true,
- Modalstopval: ` 课程需经过平台审核方可公开使用,公开的课程将对平台所`,
- modalsMidval:"有人公开可见。若仅本人教学使用则无需申请公开, 直接发",
- Modalsbottomval:"送到课堂即可.",
- cardsModalsavetype: true,
- })
+
this.props.showNotification(result.data.message)
this.props.getlistdatas();
+ this.cardsModalcancel()
}else if(result.data.status===1){
// window.location.reload();
}
@@ -132,9 +141,7 @@ class DetailTop extends Component{
}).catch((error)=>{
console.log(error);
})
-
-
- }
+ }
postcancelissuePath=()=>{
let pathId=this.props.match.params.pathId;
let url ="/paths/"+pathId+"/cancel_publish.json";
@@ -180,12 +187,15 @@ class DetailTop extends Component{
modalsMidval:'',
modalstyles:'',
cardsModalsavetype:false,
- applyissuePath:false,
+ applyissuePaths:false,
openpathss:false,
cancel_publics:false,
cancel_has_publics:false,
Modalstopval:``,
+ cancelText:undefined,
+ okText:undefined
})
+
}
cardsModalsave=()=>{
@@ -369,13 +379,13 @@ class DetailTop extends Component{
openpaths=()=>{
this.setState({
- loadtype:true,
Modalstype: true,
openpathss:true,
- Modalstopval: "公开申请已提交,请等待管理员的审核",
- modalsMidval:"• 我们将在1-2个工作日内完成审核",
- Loadtype:true,
- modalstyles:"848282"
+ Modalstopval: "公开课程需经过平台标准化审核,审核周期为1-2天,公开",
+ modalsMidval:"的课程将对平台所有人可见。若仅本人教学使用则无需",
+ Modalsbottomval:"申请公开,直接发送到课堂即可",
+ cancelText:"取消申请",
+ okText:"确定申请"
})
}
@@ -433,7 +443,7 @@ class DetailTop extends Component{
render(){
let{detailInfoList}=this.props;
- let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,openpathss,cancel_publics,cancel_has_publics}=this.state;
+ let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,openpathss,cancel_publics,cancel_has_publics,applyissuePaths}=this.state;
const radioStyle = {
display: 'block',
height: '30px',
@@ -470,8 +480,10 @@ class DetailTop extends Component{
modalsTopval={Modalstopval}
modalsBottomval={Modalsbottomval}
modalCancel={cardsModalcancel}
- modalSave={loadtype===true&&openpathss===false?()=>this.cardsModalcancel():cardsModalsavetype===true?()=>this.postcancelissuePath():openpathss===true?()=>this.postopenpaths():cancel_publics===true?()=>this.postcancel_public():cancel_has_publics===true?()=>this.postcancel_has_public():putappointmenttype===true?()=>this.getappointment():()=>this.cardsModalsave()}
+ modalSave={applyissuePaths===true?()=>this.showapplyissuePath():loadtype===true&&openpathss===false?()=>this.cardsModalcancel():cardsModalsavetype===true?()=>this.postcancelissuePath():openpathss===true?()=>this.postopenpaths():cancel_publics===true?()=>this.postcancel_public():cancel_has_publics===true?()=>this.postcancel_has_public():putappointmenttype===true?()=>this.getappointment():()=>this.cardsModalsave()}
loadtype={loadtype}
+ cancelText={this.state.cancelText}
+ okText={this.state.okText}
modalsMidval={this.state.modalsMidval}
modalstyles={this.state.modalstyles}
>
@@ -605,8 +617,8 @@ class DetailTop extends Component{
{
detailInfoList.publish_status===0&&detailInfoList.allow_add_member===true?
发布:""
+ style={{'width':'95px'}}
+ onClick={this.applyissuePath}>申请发布:""
}
diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBanner.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBanner.js
index ffb28d3df..283445ea1 100644
--- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBanner.js
+++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBanner.js
@@ -16,7 +16,7 @@ class PackageIndexNEIBanner extends Component {
}
onChange=(current)=>{
- debugger
+
console.log('onChange:', current);
this.setState({ current });
};
diff --git a/public/react/src/modules/question/component/Newknledpots.js b/public/react/src/modules/question/component/Newknledpots.js
index 7e0a79228..ad2710593 100644
--- a/public/react/src/modules/question/component/Newknledpots.js
+++ b/public/react/src/modules/question/component/Newknledpots.js
@@ -63,7 +63,7 @@ class PaperDeletModel extends Component {
}
NewknTypedeltyoedels=()=>{
- debugger
+
if(this.state.newkntypeinput.length===0){
this.setState({
errorestit:'请输入知识点',
diff --git a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js
index a426e7ea7..447416225 100644
--- a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js
+++ b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js
@@ -475,7 +475,7 @@ class Comthetestpaperst extends Component {
//////console.log('Clicked! But prevent default.');
}
deletesobject = (item, index) => {
- debugger
+
var tmp = this.state.Knowpoints;
for (var i = 0; i < tmp.length; i++) {
if (i ===index) {
diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js
index 58959d745..05dbaec82 100644
--- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js
+++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js
@@ -123,7 +123,7 @@ class Paperreview_item extends Component {
}
axios.post(url, data)
.then((result) => {
- debugger
+
if (result.data.status == 0) {
// this.props.showNotification(`拖动成功`);
this.props.getdata();
diff --git a/public/react/src/modules/tpm/Audit_situationComponent.js b/public/react/src/modules/tpm/Audit_situationComponent.js
index 3739cd6db..1057bc484 100644
--- a/public/react/src/modules/tpm/Audit_situationComponent.js
+++ b/public/react/src/modules/tpm/Audit_situationComponent.js
@@ -106,7 +106,7 @@ class Audit_situationComponent extends Component {
}
showModal = (id,status) => {
- debugger
+
this.setState({
visible: true,
editid:id,
diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js
index 9ba752827..7527357c0 100644
--- a/public/react/src/modules/tpm/TPMBanner.js
+++ b/public/react/src/modules/tpm/TPMBanner.js
@@ -60,7 +60,8 @@ class TPMBanner extends Component {
openshowpublictype:false,
Radiovalue:1,
TextAreaintshow:false,
-
+ cancelText:undefined,
+ okText:undefined,
}
}
@@ -434,6 +435,9 @@ class TPMBanner extends Component {
modalsMidval:undefined,
ModalsBottomval:"",
modalstyles:"",
+ cancelText:undefined,
+ okText:undefined,
+ Loadtype:false,
})
}
ModalSave = () => {
@@ -441,7 +445,10 @@ class TPMBanner extends Component {
let url = "/shixuns/" + id + "/cancel_publish.json";
axios.get(url).then((response) => {
this.props.showSnackbar(response.data.message);
- window.location.reload()
+ // window.location.reload()
+ this.ModalCancel()
+ this.props.getcomponentdidmount()
+
}).catch((error) => {
console.log(error)
});
@@ -461,16 +468,21 @@ class TPMBanner extends Component {
ModalSaveopenpublic= () => {
this.setState({
Modalstype: true,
- Modalstopval: "公开申请已提交,请等待管理员的审核",
- modalsMidval:"• 我们将在1-2个工作日内完成审核",
- ModalCancel: this.eopenpublicupdatadata,
+ Modalstopval:"公开实训需经过平台标准化审核,审核周期为1-2天,",
+ modalsMidval:"公开的实训将对平台所有人可见。若仅本人教学使用",
+ ModalsBottomval:"则无需申请公开, 直接发送到课堂即可。",
+ cancelText:"取消申请",
+ okText:"确定申请",
+ ModalCancel: this.ModalCancel,
ModalSave: this.eopenpublicupdatadata,
- Loadtype:true,
- modalstyles:"848282"
+ // Loadtype:true,
+ // modalstyles:"848282"
})
}
eopenpublicupdatadata=()=>{
- window.location.reload()
+ // window.location.reload()
+ this.ModalCancel()
+ this.props.getcomponentdidmount()
}
openpublic=()=>{
let id = this.props.match.params.shixunId;
@@ -490,7 +502,9 @@ class TPMBanner extends Component {
let url = `/shixuns/${id}/cancel_apply_public.json`;
axios.get(url).then((response) => {
if(response.data.status===0){
- window.location.reload()
+ // window.location.reload()
+ this.ModalCancel()
+ this.props.getcomponentdidmount()
}
}).catch((error) => {
console.log(error)
@@ -522,7 +536,10 @@ class TPMBanner extends Component {
evaluation_set_position = response.data.evaluation_set_position
}
if(response.data.status===0){
- window.location.reload()
+ // window.location.reload()
+ this.applyreleaseopen()
+ // this.ModalCancel()
+ this.props.getcomponentdidmount()
}else{
this.setState({
Issuevisible: true,
@@ -536,13 +553,23 @@ class TPMBanner extends Component {
console.log(error)
});
};
+ applyreleaseopen = () => {
+ this.setState({
+ Modalstype: true,
+ Loadtype:true,
+ Modalstopval: "实训发布后即可发送课堂使用",
+ ModalSave: this.ModalCancel,
+ })
+ }
hiddenIssuevisible = (val) => {
this.setState({
Issuevisible: false
})
if (val === 0 || val === 1) {
- window.location.reload()
+ // window.location.reload()
+ this.ModalCancel()
+ this.props.getcomponentdidmount()
}
}
@@ -803,7 +830,9 @@ class TPMBanner extends Component {
hidestartshixunsreplacevalue,
Forkvisibletype,
AccountProfiletype,
- isIE
+ isIE,
+ cancelText,
+ okText,
} = this.state;
let {shixunsDetails, shixunId, star_info, star_infos} = this.props;
let challengeBtnTipText = '';
@@ -900,6 +929,8 @@ class TPMBanner extends Component {
modalsMidval={this.state.modalsMidval}
loadtype={this.state.Loadtype}
modalstyles={this.state.modalstyles}
+ cancelText={this.state.cancelText}
+ okText={this.state.okText}
/> : ""}
diff --git a/public/react/src/modules/tpm/TPMIndex.js b/public/react/src/modules/tpm/TPMIndex.js
index 7c7a706c5..2a650e3d0 100644
--- a/public/react/src/modules/tpm/TPMIndex.js
+++ b/public/react/src/modules/tpm/TPMIndex.js
@@ -412,6 +412,7 @@ class TPMIndex extends Component {
{...this.props}
{...this.state}
is_jupyter={this.state. is_jupyter}
+ getcomponentdidmount={()=>this.getcomponentdidmount()}
>
}
diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
index 46f45a8a7..71b325986 100644
--- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js
+++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
@@ -97,7 +97,7 @@ class Newshixuns extends Component {
})
const mdContnet = this.contentMdRef.current.getValue().trim();
this.props.form.validateFieldsAndScroll((err, values) => {
- debugger
+
if (!err) {
console.log('Received values of form: ', values);
diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js
index 0e701c00c..32263676f 100644
--- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js
+++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js
@@ -33,7 +33,7 @@ class Challenges extends Component {
isSpin:false,
boxoffsetHeigh:0,
opentitletype:true,
- isopentitletype:"Less",
+ isopentitletype:"Less"
}
}
@@ -357,6 +357,50 @@ class Challenges extends Component {
})
}
+ // 开启挑战
+ beginChallenge=(url)=>{
+ if (this.props.checkIfLogin() === false) {
+ this.props.showLoginDialog()
+ return;
+ }
+ if (this.props.checkIfProfileCompleted() === false) {
+ this.setState({
+ AccountProfiletype: true
+ })
+ return;
+ }
+ this.setState({
+ startbtns:true
+ })
+ if(url.indexOf(".json")>-1){
+ axios.get(url).then((response) => {
+ if (response.data.status === -2) {
+ this.setState({
+ startbtns:false,
+ shixunsreplace:true,
+ hidestartshixunsreplacevalue:response.data.message+".json"
+ })
+ } else if (response.data.status === -1) {
+ this.setState({
+ startbtns: false
+ })
+ }else if(response.data.status===-3){
+ this.setState({
+ shixunsmessage:response.data.message,
+ startshixunCombattype:true,
+ startbtns:false
+ })
+ } else {
+ window.location.href = "/tasks/" + response.data.game_identifier;
+ }
+ }).catch((error) => {
+
+ });
+ }else{
+ window.location.href=url;
+ }
+ }
+
render() {
let { ChallengesDataList, startbtns, sumidtype ,startshixunCombattype,shixunsreplace,shixunsmessage,hidestartshixunsreplacevalue,operationstrue,AccountProfiletype} = this.state;
let { loadingContent } = this.props;
@@ -700,49 +744,60 @@ class Challenges extends Component {
+
+
+
+ {/*onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editquestion")}*/}
+ {this.props.identity<5?
+ item.st === 1 ?
+
{item.name}
+ :
+
{item.name}
:
this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
+ className="font-16 color05101a fonthiddens">{item.name}
+ }
+ {/* onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editcheckpoint")}*/}
+
+
+
+
+
+
+
正在挑战: {item.playing_count}人
+
完成挑战: {item.passed_count}人
+
可获经验: {item.score}点
-
- {/*onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editquestion")}*/}
- {this.props.identity<5?
- item.st === 1 ?
-
{item.name}
- :
-
{item.name}
:
this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
- className="font-16 color05101a fonthiddens">{item.name}
+
+
+ {
+ item.open_game ?
+
this.beginChallenge(item.open_game)} className="challengeBtn blue">开启挑战
+ :
+
开启挑战
}
- {/* onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editcheckpoint")}*/}
-
-
-
-
-
-
-
-
- 正在挑战: {item.playing_count}人
- 完成挑战: {item.passed_count}人
- 可获经验: {item.score}点
-
-
+
)
})}