From 3c4151ce65a3031fe0b29494fb37f3e556d5f499 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Thu, 27 Jun 2019 10:09:19 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TraineetraininginformationModal.js | 2 ++
public/react/src/modules/tpm/NewHeader.js | 2 +-
.../src/modules/tpm/newshixuns/Newshixuns.js | 36 +++++++++++++------
3 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js
index 10db61e1b..a0486095e 100644
--- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js
+++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js
@@ -80,6 +80,8 @@ class TraineetraininginformationModal extends Component {
}
render() {
var columns;
+ console.log(83);
+ console.log(this.props.boolgalist);
if(this.props.boolgalist&&this.props.boolgalist === true) {
columns = [
{
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 294339b54..f43991599 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -625,7 +625,7 @@ submittojoinclass=(value)=>{
{/* />*/}
{/* :""*/}
{/*}*/}
-
+ this.cancelModulationModels()} >
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
index aa5b62a0a..3dca1ad2b 100644
--- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js
+++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
@@ -181,6 +181,7 @@ class Newshixuns extends Component {
systemenvironment:undefined,
testcoderunmode:undefined,
file:undefined,
+ deleteisnot:true,
}
}
@@ -547,7 +548,7 @@ class Newshixuns extends Component {
// if (id) {
if(this.state.file !== undefined){
console.log("549");
- this.deleteAttachment(this.state.file);
+ // this.deleteAttachment(this.state.file);
this.setState({
file:undefined,
languagewrite:"",
@@ -579,7 +580,7 @@ class Newshixuns extends Component {
})
if(this.state.file !== undefined){
console.log("580");
- this.deleteAttachment(this.state.file);
+ // this.deleteAttachment(this.state.file);
this.setState({
file:undefined,
languagewrite:"",
@@ -655,7 +656,8 @@ class Newshixuns extends Component {
handleChange = (info) => {
console.log("handleChange1");
let fileList = info.fileList;
- this.setState({ fileList });
+ this.setState({ fileList:fileList,
+ deleteisnot:false});
}
onAttachmentRemove = (file) => {
confirm({
@@ -686,11 +688,13 @@ class Newshixuns extends Component {
// console.log('--- success')
this.setState((state) => {
+
const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice();
newFileList.splice(index, 1);
return {
fileList: newFileList,
+ deleteisnot:true
};
});
}
@@ -736,7 +740,7 @@ class Newshixuns extends Component {
render() {
const { getFieldDecorator } = this.props.form;
const thiss=this;
- let {testcoderunmode ,systemenvironment,languagewrite, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, operss, onSearchvalue} = this.state;
+ let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, operss, onSearchvalue} = this.state;
let options
if (departmentslist != undefined) {
options = this.state.departmentslist.map((d, k) => {
@@ -764,7 +768,7 @@ class Newshixuns extends Component {
}
if(thiss.state.file !== undefined){
console.log("763")
- thiss.deleteAttachment(thiss.state.file);
+ // thiss.deleteAttachment(thiss.state.file);
thiss.setState({
file:file
})
@@ -797,6 +801,7 @@ class Newshixuns extends Component {
// return isLt50M;
// },
// };
+
return (
@@ -934,12 +939,23 @@ class Newshixuns extends Component {
{/* rules:[{*/}
{/* }]*/}
{/* })(*/}
-
-
- 上传附件
- (单个文件50M以内)
+ {
+ deleteisnot=== true?
+
+
+ 上传附件
+ (单个文件50M以内)
+
+
+ :
+
+
+ 上传附件
+ (单个文件50M以内)
+
+
+ }
-
{/* )*/}
{/* }*/}
{/**/}