diff --git a/public/react/src/common/components/comment/util.js b/public/react/src/common/components/comment/util.js index 2b4f36a85..8694161a3 100644 --- a/public/react/src/common/components/comment/util.js +++ b/public/react/src/common/components/comment/util.js @@ -1,7 +1,7 @@ /* * @Description: quill delta -> html * @Author: tangjiang - * @Github: + * @Github: * @Date: 2019-12-24 08:51:25 * @LastEditors : tangjiang * @LastEditTime : 2019-12-26 09:30:11 @@ -55,7 +55,7 @@ export const formatDelta = (deltas) => { */ export const operate = (text, key, value) => { let operatedText = null; - debugger; + switch (key) { case 'bold': operatedText = `${text}`; @@ -72,7 +72,7 @@ export const operate = (text, key, value) => { case 'link': operatedText = `${text}`; break; - default: + default: operatedText = text; } diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js index 9ea972177..0cae1e2a6 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js +++ b/public/react/src/modules/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/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js index 8bfef819c..c92c3e50a 100644 --- a/public/react/src/modules/courses/busyWork/PublishRightnow.js +++ b/public/react/src/modules/courses/busyWork/PublishRightnow.js @@ -94,7 +94,8 @@ class PublishRightnow extends Component { }) } - homeworkstartend = (arg_group_ids, endtime) => { + homeworkstartend=(arg_group_ids,endtime)=>{ + if (this.usingCheckBeforePost && this.props.checkBeforePost) { const goOn = this.props.checkBeforePost(); if (!goOn) { @@ -109,8 +110,9 @@ class PublishRightnow extends Component { return item.id }) } - if (this.state.course_groups.length > 0) { - if (this.state.course_groups.length && (!group_ids || group_ids && group_ids.length == 0)) { + + if(this.state.course_groups.length>0){ + if (this.state.course_groups.length && (!group_ids || group_ids&&group_ids.length == 0)) { this.props.showNotification('请至少选择一个分班'); return; } diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index b31412470..bfa9b3520 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -130,7 +130,7 @@ class UseBank extends Component{ }) } onSave = () => { - debugger + const { checkBoxValues } = this.state; const { object_type,category_id } = this.props if(checkBoxValues.length==0){ 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/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 ( - +

@@ -443,15 +443,15 @@ class EditableCourseSupportSetting extends Component { 对应毕业要求指标点 { !addOrDeleting && - { this.add(-1, 0) }} data-tip-down="添加"> } -

+

{formItems}
{/* - diff --git a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js index 19076d13d..e8a57b3dc 100644 --- a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js +++ b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js @@ -270,26 +270,26 @@ class EcStudentList extends Component { if (studentall === true || studentalltype === 1) { this.setState({ Modallist: '确定删除这些学生吗?', - Modallisttype: true, - Modallisttypess: 1 + Modallisttype:true, + Modallisttypess:1 }) - } else { + }else{ this.setState({ Modallist: '请选择学生!', - Modallisttype: true + Modallisttype:true }) } }; //删除学生 - deletelistbthenters = () => { - debugger - let { Myschoolstudents, studentall } = this.state; - let major_id = this.props.match.params.majorId; - let year_id = this.props.match.params.yearId; - let newstudent_id = []; - if (studentall === false) { - for (var i = 0; i < Myschoolstudents.length; i++) { - if (Myschoolstudents[i].istrue === true) { + deletelistbthenters=()=>{ + + let {Myschoolstudents,studentall} =this.state; + let major_id=this.props.match.params.majorId; + let year_id=this.props.match.params.yearId; + let newstudent_id=[]; + if(studentall===false){ + for(var i=0; i } - let _current_user = {} - if (current_user) { - _current_user = current_user + // --------------------------------------------------------------------------------------------帖子獎勵 END + showCommentInput = () => { + + + if (window.__useKindEditor === true) { + this.refs.editor.showEditor(); + } else { + this.refs.editor.showEditor(); + } } (_current_user.user_url = `/users/${_current_user.login}`); memo.isDetailPage = true; diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 9193e513b..6e5b171e3 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -373,6 +373,20 @@ class LoginDialog extends Component { if (response === undefined) { return } + let newloginValue=loginValue.replace(/(^\s*)|(\s*$)/g, ""); + let newpassValue=passValue.replace(/(^\s*)|(\s*$)/g, ""); + + let url='/accounts/login.json' + axios.post(url, { + login:newloginValue, + password:newpassValue, + autologin:isGoingValue + } + ).then((response) => { + + if(response===undefined){ + return + } if (response.status === 200) { if (response.data.status === 402) { 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/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 ab5eb2e22..b15e59f84 100644 --- a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js +++ b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js @@ -475,7 +475,6 @@ 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 d81856b03..a88ac9c64 100644 --- a/public/react/src/modules/tpm/Audit_situationComponent.js +++ b/public/react/src/modules/tpm/Audit_situationComponent.js @@ -104,8 +104,8 @@ class Audit_situationComponent extends Component { }); } - showModal = (id, status) => { - debugger + showModal = (id,status) => { + this.setState({ visible: true, editid: id, diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index c4a6b39d0..8ec401f09 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/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index baf099909..85f0285a8 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -94,7 +94,7 @@ class LoginRegisterComponent extends Component { } //倒计时 getverificationcode = () => { - debugger + if(this.state.login === undefined || this.state.login.length===0){ this.openNotification("请输入手机号或邮箱"); return; diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 394e509a9..8129787e1 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -337,7 +337,7 @@ class LoginRegisterComponent extends Component { login: this.state.login, password: this.state.password, }).then((response) => { - debugger + if (response === undefined) { return }