FANGLH 7 years ago
parent
commit
e5508accdb

+ 2 - 2
frontend/wechat-web/src/configs/api.config.js

@@ -7,8 +7,8 @@ import store from './../redux/store/store'
  * Created by RaoMeng on 2018/11/21
  * Desc: 项目接口
  */
-export const _host = 'https://school-api.ubtob.com'
-// export const _host = 'http://10.1.80.36:9520'
+// export const _host = 'https://school-api.ubtob.com'
+export const _host = 'http://10.1.80.180:9520'
 export const _baseURL = _host + '/api/school'
 // export const _baseURL = _host
 

+ 11 - 5
frontend/wechat-web/src/modules/hiPages/approvel-detail/ApprovelDetail.js

@@ -22,6 +22,7 @@ class ApprovelDetail extends Component{
     constructor(){
         super();
         this.state = {
+            approveOpinion:'',
             showButton:false,
             AMvisible: false,
             AMTitle:null,
@@ -79,7 +80,7 @@ class ApprovelDetail extends Component{
         return(
             <div ref={node => this.node = node}>
                 <div className="headerDiv">
-                    <img className="headerImg" src={this.props.userInfo.userAvatar.length == 0 ? hi1_img : this.props.userInfo.userAvatar} alt=""/>
+                    <img className="headerImg" src={hi1_img} alt=""/>
                     <div style={{marginTop:10}}>
                         <div style={{color:"#333333",fontSize:18}}>{this.state.docModel.proposer.value}</div>
                         <div style={{color:"#666666",fontSize:12,marginTop:10}}>{this.state.docModel.oaApprove.creatDate}</div>
@@ -103,8 +104,9 @@ class ApprovelDetail extends Component{
                         </TransitionGroup>
                     </div>
                 </div>
-
-                <div className="comhline_sty"></div>
+                {
+                    pictureItems.length > 0 ? <div className="comhline_sty"></div> : ''
+                }
 
                 <div style={{marginBottom:50}}>
                     {/*{this.state.docModel.approver.map((itemdata,index) => <ItemApprovel key ={index} itemdata = {itemdata}></ItemApprovel>)}*/}
@@ -132,7 +134,7 @@ class ApprovelDetail extends Component{
                     onCancel={this.doApprovel.bind(this,0)}>
                     <div onChange={this.handelValueCom}>
                         <div style={{textAlign:'center',fontSize:15,color:'#292929',marginBottom:10}}>{this.state.AMTitle}</div>
-                        <textarea autoFocus="autoFocus" ref='approveOpinion' className="form-control" rows="5" placeholder="填写意见说明(非必填)"  maxLength={50}></textarea>
+                        <textarea autoFocus="autoFocus" ref='approveOpinion'  value={this.state.approveOpinion} className="form-control" rows="5" placeholder="填写意见说明(非必填)"  maxLength={50}></textarea>
                        <div style={{display:'flex',flexDirection:'row',marginTop:20}}>
                            <div style={{width:'50%',textAlign:'center'}}>
                                <Button className="disagree_sty"  style={{borderRadius:5}} onClick={this.doApprovel.bind(this,0)} >取消</Button>
@@ -179,7 +181,7 @@ class ApprovelDetail extends Component{
         if(order == 0){
             return
         }
-        if(this.state.approveOpinion.length == 0 || this.state.approveOpinion == ''){
+        if(this.state.approveOpinion == '' || this.state.approveOpinion.length == 0){
             this.setState({
                 approveOpinion:'-'
             })
@@ -236,6 +238,10 @@ class ApprovelDetail extends Component{
             approveId:this.props.match.params.approveId,
             isMyApply:this.props.match.params.isMyApply
         },function () {
+
+            if(this.state.isMyApply == true){
+                hi1_img = this.props.userInfo.userAvatar.length > 0 ? this.props.userInfo.userAvatar : hi1_img
+            }
             if(this.state.approveId == null || this.state.approveId == ''){
                 return
             }else {

+ 1 - 1
frontend/wechat-web/src/modules/hiPages/approvel-detail/ItemApprovel.js

@@ -21,7 +21,7 @@ export default class ItemApprovel extends Component{
                     <div style={{width:10,height:10,background:'#BDBDBD',borderRadius:'30px'}}></div>
                     <div style={{marginLeft:10,width:"62%"}}>
                         <div ><span style={{color:'#000000',fontSize:15}}>{this.props.itemdata.value }</span><span style={{color:'#666666',fontSize:12,marginLeft:10}}>{this.props.approveDate}</span></div>
-                        <div style={{color:"#666666",fontSize:12,marginTop:5,wordWrap:'break-word'}}><span>{(this.props.suggest.value == null || this.props.suggest.value == undefined)?"":"(审批语:"+this.props.suggest.value+")"}</span></div>
+                        <div style={{color:"#666666",fontSize:12,marginTop:5,wordWrap:'break-word'}}><span>{(this.props.suggest.value == null || this.props.suggest.value == undefined || this.props.suggest.value == '')?"(审批语:无)":"(审批语:"+this.props.suggest.value+")"}</span></div>
                     </div>
                     <div style={{fontSize:12,textAlign:'right'}} className={this.props.approveStatus == 1?'doing':'done'}>
                         {this.props.approveStatus == 1 ? '等待审批' : (this.props.approveStatus == 2 ? '已同意' : '已拒绝')}</div>

+ 3 - 3
frontend/wechat-web/src/modules/hiPages/approvel/Approvel.js

@@ -146,7 +146,7 @@ class Approvel extends Component {
                         <List dataSource={this.state.approvelList}
                         renderItem={(approvelListBean,index) => (
                         <List.Item>
-                            <ApprovelItem itemdata={approvelListBean}isMyApply={false}  index={index} onItemClick={this.onItemClick.bind(this)}/>
+                            <ApprovelItem itemdata={approvelListBean} isMyApply={false}  index={index} onItemClick={this.onItemClick.bind(this)}/>
                         </List.Item>
                     )}/>
                     }
@@ -206,7 +206,7 @@ class Approvel extends Component {
             applyList.length = 0
             applyIndex = 0
             applyScroll = 0
-        } else {
+        } else if(applyList.length > 10){
             applyIndex = myApplypageIndex
             applyScroll = ReactDOM.findDOMNode(this.myApplyTab).scrollTop
         }
@@ -214,7 +214,7 @@ class Approvel extends Component {
             approvelList.length = 0
             approveleIndex = 0
             approvelScroll = 0
-        } else {
+        } else if (approvelList.length > 10){
             approveleIndex = myApprovepageIndex
             approvelScroll = ReactDOM.findDOMNode(this.myApproveTab).scrollTop
         }