From e9bb80ce02dd8787d5c6fa5cdeac651c1cc573b5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 18 Jul 2019 15:28:39 +0800 Subject: [PATCH 1/3] css --- public/react/src/modules/user/account/AccountBasicEdit.js | 8 +++++++- public/react/src/modules/user/account/common.css | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 4d2511b38..0e0cd06ea 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -333,9 +333,12 @@ class AccountBasic extends Component { font-size: 14px; } .basicForm .saveBtn { - width: 120px; + width: 100px; margin-left: 100px; } + .basicForm .cancelBtn { + margin-left: 0px; + } .basicForm .ant-input-lg { height: 32px; } @@ -583,6 +586,9 @@ class AccountBasic extends Component { {/*
*/} + + {this.props.basicInfo.base_info_completed && + } {/*
*/} diff --git a/public/react/src/modules/user/account/common.css b/public/react/src/modules/user/account/common.css index 90f45b6b0..d84686f59 100644 --- a/public/react/src/modules/user/account/common.css +++ b/public/react/src/modules/user/account/common.css @@ -66,7 +66,7 @@ button.ant-btn.ant-btn-primary.grayBtn { padding-bottom: 30px; margin-bottom:30px; margin-right:20px; - max-height:430px; + height:418px; } .accountInfo { text-align: center; From b31d77ef09b7734b47d193347f4f5300d7bc00e1 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 18 Jul 2019 17:11:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AD=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/account/AccountBasic.js | 7 +++-- .../modules/user/account/AccountBasicEdit.js | 31 ++++++++++++------- .../user/account/AccountCertification.js | 2 +- .../src/modules/user/account/AccountSecure.js | 2 +- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/user/account/AccountBasic.js b/public/react/src/modules/user/account/AccountBasic.js index 60df5e105..80eee8fc7 100644 --- a/public/react/src/modules/user/account/AccountBasic.js +++ b/public/react/src/modules/user/account/AccountBasic.js @@ -11,6 +11,7 @@ const radioOptions = [ { label: '男', value: 'boy' }, { label: '女', value: 'girl' }, ]; +export const identityMap={"teacher":"教师", "student":"学生", "professional":"专业人士"} class AccountBasicEdit extends Component { constructor(props){ super(props); @@ -84,14 +85,14 @@ class AccountBasicEdit extends Component { label="所在地" className="display formItemInline" > - {basicInfo && basicInfo.location} {basicInfo && basicInfo.location_city} + {basicInfo && basicInfo.location} {basicInfo && basicInfo.location_city} - {basicInfo && basicInfo.technical_title} + { basicInfo && basicInfo.identity && identityMap[basicInfo.identity] } {basicInfo && ( basicInfo.technical_title || basicInfo.student_id)} -
* 我们确保你所提供的信息均处于严格保密状态,不会泄露
+
* 我们确保你所提供的信息均处于严格保密状态,不会泄露
); } diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 0e0cd06ea..7d1986bd0 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -5,11 +5,11 @@ import { Form, Button, Input, Radio, Select, Tooltip, Icon } from 'antd' import ApplyForAddOrgModal from '../modal/ApplyForAddOrgModal' import ApplyForAddChildOrgModal from '../modal/ApplyForAddChildOrgModal' import axios from 'axios' - +import { identityMap } from './AccountBasic' const RadioGroup = Radio.Group; const Option = Select.Option; -const map={"teacher":"教师", "student":"学生", "professional":"专业人士"} +const map = identityMap // {"teacher":"教师", "student":"学生", "professional":"专业人士"} class AccountBasic extends Component { constructor(props){ super(props); @@ -62,10 +62,13 @@ class AccountBasic extends Component { job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者", }) }, 100) + //if(basicInfo.nickname){ this.setState({ + forDisable: true, nameLength:basicInfo.nickname?basicInfo.nickname.length:0, showRealName:basicInfo.show_realname, + realName: basicInfo.name, identity:basicInfo.identity }) //} @@ -116,7 +119,8 @@ class AccountBasic extends Component { axios.put((url),{ nickname:values.nickname, // 认证中的不能修改 - name: basicInfo.authentication == 'uncertified' ? values.name : basicInfo.name, + name: basicInfo.authentication == 'uncertified' ? + (this.state.showRealName ? values.name : this.state.realName ) : basicInfo.name, show_realname:this.state.showRealName, gender:parseInt(values.sex), location:values.city[0], @@ -140,15 +144,16 @@ class AccountBasic extends Component { } // 隐藏或显示真实姓名 - showOrHide=(flag,name)=>{ + showOrHide=(flag)=>{ + const name = this.props.form.getFieldsValue().name || this.props.basicInfo.name this.setState({ showRealName:flag==true?false:true }) - if(flag==true){ + if(flag==true){ // 隐藏真实姓名 this.hideRealName(name); - }else{ + }else{ // 显示 this.props.form.setFieldsValue({ - name + name: this.state.realName }) } } @@ -164,11 +169,13 @@ class AccountBasic extends Component { // 将名字隐藏起来 hideRealName=(name)=>{ + this.setState({ realName: name }) const newName = this.getHiddenName(name) this.props.form.setFieldsValue({ name: newName }) + return newName } // 过滤学校 @@ -387,9 +394,9 @@ class AccountBasic extends Component { message: '请输入您的姓名', }], })( - this.showOrHide(showRealName,basicInfo.name)}> + onClick={()=>this.showOrHide(showRealName)}> }> )} { showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' } @@ -397,7 +404,7 @@ class AccountBasic extends Component {
{showRealName ? this.props.basicInfo.name : this.getHiddenName(this.props.basicInfo.name)} this.showOrHide(showRealName,basicInfo.name)}> + onClick={()=>this.showOrHide(showRealName)}> { showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }
} @@ -565,7 +572,7 @@ class AccountBasic extends Component { { filterDepartments && filterDepartments.map((item,key)=>{ return( - + ) }) } @@ -593,7 +600,7 @@ class AccountBasic extends Component {
*/} -
* 我们确保你所提供的信息均处于严格保密状态,不会泄露
+
* 我们确保你所提供的信息均处于严格保密状态,不会泄露
); } diff --git a/public/react/src/modules/user/account/AccountCertification.js b/public/react/src/modules/user/account/AccountCertification.js index 56381d5fa..bd5c0ce10 100644 --- a/public/react/src/modules/user/account/AccountCertification.js +++ b/public/react/src/modules/user/account/AccountCertification.js @@ -84,7 +84,7 @@ class AccountCertification extends Component { -
* 我们确保你所提供的信息均处于严格保密状态,不会泄露
+
* 我们确保你所提供的信息均处于严格保密状态,不会泄露
); } diff --git a/public/react/src/modules/user/account/AccountSecure.js b/public/react/src/modules/user/account/AccountSecure.js index 19a959de6..6cff4d901 100644 --- a/public/react/src/modules/user/account/AccountSecure.js +++ b/public/react/src/modules/user/account/AccountSecure.js @@ -480,7 +480,7 @@ class AccountSecure extends Component { -
* 我们确保你所提供的信息均处于严格保密状态,不会泄露
+
* 我们确保你所提供的信息均处于严格保密状态,不会泄露
); } From 710732554bb3c50eb7c5d0aeb8ce9d8fab898077 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, 18 Jul 2019 17:24:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Listofworksstudentone.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index b8933f7d5..a832c5f7e 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1468,6 +1468,7 @@ class Listofworksstudentone extends Component { // 获取作品列表 Getalistofworkst = (homeworkid) => { // console.log("获取作品列表");7009 + debugger let urll = `/homework_commons/${homeworkid}/works_list.json`; // console.log(homeworkid); @@ -1487,7 +1488,7 @@ class Listofworksstudentone extends Component { limit:20, } axios.post(urll, data).then((result) => { - + debugger if (result !== undefined) { // console.log(url) // console.log("作品列表6789077") @@ -1582,6 +1583,7 @@ class Listofworksstudentone extends Component { // 设置数据 seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { + debugger let {page, limit} = this.state; let datalist = []; let columns = this.state.columns;