FANGLH hace 6 años
padre
commit
ff0ea81e50

+ 7 - 4
frontend/wechat-web/src/components/HomeWorkItem.jsx

@@ -26,14 +26,17 @@ export default class HomeWorkItem extends Component {
             <div style={{padding: '0 10px'}} onClick={this.onItemClick}>
                 <div className='recharge-item-root'>
                     <div className='common-flex-row homework-item-title-layout'>
-                        <div style={{width:'85%'}} className='homework-item-title'>{homeWork.notifyName}</div>
-                        <div style={{width:'15%',textAlign:'right'}} className={homeWork.taskStatus === 2 ? 'homework-item-done'
-                            : 'homework-item-todo'}>{homeWork.readStatus}</div>
+                        <div style={{width: '85%'}} className='homework-item-title'>{homeWork.notifyName}</div>
+                        <div style={{width: '15%', textAlign: 'right'}}
+                             className={homeWork.taskStatus === 2 ? 'homework-item-done'
+                                 : 'homework-item-todo'}>{homeWork.readStatus}</div>
                     </div>
                     <div className='gray-line' style={{height: '1px', marginBottom: '10px'}}></div>
                     <div className='recharge-item-line'>
                         <div className='recharge-item-caption'>内容:</div>
-                        <div className='recharge-item-value'>{homeWork.notifyDetails}</div>
+                        <div className='recharge-item-value'
+                             dangerouslySetInnerHTML={{ __html: homeWork.notifyDetails.replaceAll('\n', '<br/>') }}>
+                        </div>
                     </div>
                     <div className='recharge-item-line'>
                         <div className='recharge-item-caption'>截止日期:</div>

+ 2 - 2
frontend/wechat-web/src/modules/hiPages/LeaveDetail/LeaveDetail.js

@@ -104,7 +104,7 @@ class LeaveDetail extends Component {
                     </div>
                     <div  style={{marginTop: 10}} className="leave_reason">
                         <div style={{fontSize: 12, color: "#666666",width:'20%'}}>请假事由:</div>
-                        <div style={{fontSize: 12, color: "#333333",width:'80%'}}>{itemdetail.content}</div>
+                        <div style={{fontSize: 12, color: "#333333",width:'80%',wordWrap:'break-word'}}>{itemdetail.content}</div>
                     </div>
                     <div style={{display: 'flex', width: '100%', flexDirection: 'column'}}>
                         <div style={{flex: '1', overflow: 'scroll', padding: '5px', webkitOverflowScrolling: 'touch'}}>
@@ -127,7 +127,7 @@ class LeaveDetail extends Component {
                                 <List.Item>
                                     <div>
                                         <span className=" margin_left_right_20"
-                                              style={{color: '#333333'}}>{item.replyContent}</span>
+                                              style={{color: '#333333',wordWrap:'break-word'}}>{item.replyContent}</span>
                                     </div>
                                 </List.Item>
                             )}

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

@@ -11,11 +11,11 @@ function DetailItem2(props) {
        <div>
            <div style={{ display: 'flex',flexDirection:'row',fontsize:15,marginLeft:10,marginRight:10,marginTop:10}}>
                <span style={{width:"35%",textAlign:'left',color:'#666666'}}>{props.itemdata1[0].key}</span>
-               <span  style={{width:"65%",textAlign:'right',color:'#333333'}}>{props.itemdata1[0].value}</span>
+               <span  style={{width:"65%",textAlign:'right',color:'#333333',wordWrap:'break-word'}}>{props.itemdata1[0].value}</span>
            </div>
            <div style={{ display: 'flex',flexDirection:'row',fontsize:15,marginLeft:10,marginRight:10,marginTop:10}}>
                <span style={{width:"35%",textAlign:'left',color:'#666666'}}>{props.itemdata1[1].key}</span>
-               <span  style={{width:"65%",textAlign:'right',color:'#333333'}}>{props.itemdata1[1].value}</span>
+               <span  style={{width:"65%",textAlign:'right',color:'#333333',wordWrap:'break-word'}}>{props.itemdata1[1].value}</span>
            </div>
            <div className='comhline_sty'></div>
        </div>
@@ -38,7 +38,7 @@ export default class DetailItem extends Component{
                         </div> :<div>
                         <div style={{ display: 'flex',flexDirection:'row',fontsize:15,marginLeft:10,marginRight:10,marginTop:10}}>
                             <span style={{width:"35%",textAlign:'left',color:'#666666'}}>{this.props.itemdata.key}</span>
-                            <span  style={{width:"65%",textAlign:'right',color:'#333333'}}>{this.props.itemdata.value}</span>
+                            <span  style={{width:"65%",textAlign:'right',color:'#333333',wordWrap:'break-word'}}>{this.props.itemdata.value}</span>
                         </div>
                         <div className="comhline_sty1"></div>
                     </div>

+ 1 - 1
frontend/wechat-web/src/modules/homework/AssignmentDetailPage.js

@@ -200,7 +200,7 @@ class AssignmentDetailPage extends React.Component {
                 </div>
                 <div className="homework-detail-title">{this.state.title} </div>
                 <div className="homework-detail-content"
-                     dangerouslySetInnerHTML={{__html: this.state.content}}></div>
+                     dangerouslySetInnerHTML={{__html: this.state.content.replaceAll('\n', '<br/>')}}></div>
                 <div className="margin_top_bottom_10 flex_center">
                     {this.state.previewVisible ?
                         <ImagesViewer onClose={this.handleCancel} urls={this.state.files}

+ 1 - 1
frontend/wechat-web/src/modules/leave/LeaveItem.js

@@ -20,7 +20,7 @@ export default class LeaveItem extends Component {
         return (
             <div style={{padding:10}}>
                 <Link to={'/leavedetail/' + this.props.role + '/' + item.lvId}>
-                    <div style={{backgroundColor:'#FFF',width:'100%',padding:10,borderRadius:10}}>
+                    <div style={{backgroundColor:'#FFF',width:'100%',padding:10,borderRadius:10}} onClick = {this.ItemClick.bind(this,this.props.index)}>
                         <div className="leave_row_sty">
                             <div style={{fontSize: 15, color: "#333333",width:'60%',textAlign:'left'}}> {item.title}</div>
                             <div style={{width:'40%',textAlign:'right'}}>