Forráskód Böngészése

Merge branch 'dev' of ssh://10.10.100.21/source/smartschool-platform into dev

zhuth 6 éve
szülő
commit
6682fe5ac5

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

@@ -226,7 +226,7 @@ class Approvel extends Component {
             scrollTop2: approvelScroll,
             listData2: approvelList,
             pageIndex2: approveleIndex,
-            itemIndex: itemIndex || this.props.listState.itemIndex
+            itemIndex: itemIndex
         })()
     }
     getMyApplyData = () => {

+ 24 - 28
frontend/wechat-web/src/modules/hiPages/class-schedule/ClassSchedule.js

@@ -8,6 +8,7 @@ import line_img from '../../../style/imgs/line_img.png';
 import {fetchPost, fetchGet, fetchGetNoSession} from '../../../utils/fetchRequest';
 import {API} from '../../../configs/api.config';
 import {Toast} from 'antd-mobile';
+import {List} from 'antd'
 import moment from 'moment'
 import {connect} from 'react-redux';
 import hi0_img from '../../../style/imgs/ic_head1.png';
@@ -16,12 +17,12 @@ function HSItem(props) {
     return (
         <div className='common-flex-row' style={{height: '60px', paddingLeft: '26px'}}>
             {/*<div className='common-flex-column'*/}
-                 {/*style={{height: '100%', justifyContent: 'center', alignItems: 'center'}}>*/}
-                {/*{props.isFirst ? <div style={{flex: 1}}></div>*/}
-                    {/*: <div style={{background: '#E9E9E9', flex: '1', width: '2px'}}></div>}*/}
-                {/*<div className="green_point"></div>*/}
-                {/*{props.isLast ? <div style={{flex: 1}}></div>*/}
-                    {/*: <div style={{background: '#E9E9E9', flex: '1', width: '2px'}}></div>}*/}
+            {/*style={{height: '100%', justifyContent: 'center', alignItems: 'center'}}>*/}
+            {/*{props.isFirst ? <div style={{flex: 1}}></div>*/}
+            {/*: <div style={{background: '#E9E9E9', flex: '1', width: '2px'}}></div>}*/}
+            {/*<div className="green_point"></div>*/}
+            {/*{props.isLast ? <div style={{flex: 1}}></div>*/}
+            {/*: <div style={{background: '#E9E9E9', flex: '1', width: '2px'}}></div>}*/}
 
             {/*</div>*/}
             <div className="sch_hang_sty">
@@ -98,28 +99,23 @@ class ClassSchedule extends Component {
                          className={this.state.CurDay == 5 ? "isday_click" : 'each_day_default'}>五
                     </div>
                 </div>
-                <div className="comhline_sty" style={{marginBottom:'20px'}}></div>
-                {courseItems}
-
-                {/*<div style={{fontSize:14,color:"#333333",margin:20}}>11月12日,<span style={{fontSize:12}}>2018年</span></div>*/}
-                {/*<div className="scheedule_sty1">
-                    <div style={{color:"#333333",fontSize:14,marginBottom:10,marginTop:10}}>上午</div>
-                    <p>{this.state.curWeek}</p>
-                    <div className="comhline_sty1" style={{marginBottom: 10}}></div>
-                    <div>
-                        {this.state.curDayData.map((itemdata,index) => <HSItem key ={index} itemdata = {itemdata} handelSItem={this.handelSItem}></HSItem>)}
-                    </div>
-                </div>*/}
-
-                {/*<div className="comhline_sty"></div>*/}
-
-                {/*<div className="scheedule_sty1">*/}
-                {/*<div style={{color:"#333333",fontSize:14,marginBottom:10,marginTop:10}}>下午</div>*/}
-                {/*<div className="comhline_sty1" style={{marginBottom:10}}></div>*/}
-                {/*<div>*/}
-                {/*{this.state.Class_SchData.map((itemata,index) => <HSItem key ={index} itemata = {itemata} handelSItem={this.handelSItem}></HSItem>)}*/}
-                {/*</div>*/}
-                {/*</div>*/}
+                <div className="comhline_sty" style={{marginBottom: '20px'}}></div>
+                <List dataSource={this.state.curDayData} renderItem={(itemata, index) => {
+                    let isFirst = false
+                    let isLast = false
+                    if (index === 0) {
+                        isFirst = true
+                        isLast = false
+                    }
+                    if (index === (this.state.curDayData.length - 1)) {
+                        isFirst = false
+                        isLast = true
+                    }
+                    return <HSItem key={index} itemdata={itemata}
+                                   handelSItem={this.handelSItem}
+                                   isFirst={isFirst} isLast={isLast}/>
+                }}/>
+                {/*{courseItems}*/}
             </div>
         )
     }