Jelajahi Sumber

出去详情UI绘制

FANGLH 7 tahun lalu
induk
melakukan
482ff7b52c

+ 1 - 1
frontend/wechat-web/src/configs/router.config.js

@@ -122,7 +122,7 @@ export default class RouteConfig extends Component {
                     <Route path='/chartDemo' component={ChartDemo}/>{/*图表测试页面*/}
 
                     {/*方龙海*/}
-                    <Route path='/access-notice/:stuId?' component={AccessNotice}/> {/*出校通知*/}
+                    <Route path='/access-notice/:stuId?' component={AccessNotice}/> {/*出校通知*/}
                     <Route path='/field-trip' component={FieldTrip}/> {/*//外勤出差*/}
                     <Route path='/res_apply' component={ResApply}/>{/*//用品申请*/}
                     <Route path='/send-vote' component={SendVote}/>{/*//发起投票*/}

+ 2 - 3
frontend/wechat-web/src/modules/hiPages/access-notice/AccessNotice.js

@@ -15,7 +15,7 @@ import ItemComp from './ItemComp';
 
 class AccessNotice extends Component{
     componentWillMount() {
-        document.title = '出校通知'
+        document.title = '出校通知'
     }
 
     constructor(){
@@ -32,11 +32,10 @@ class AccessNotice extends Component{
             stuId = this.props.userInfo.user.student.stuId
         }
         this.setState({
-            studentName:this.props.userInfo.user.student.stuId,
+            studentName:this.props.userInfo.user.student.stuName,
         })
         fetchPost(API.RecordOutgoingList,{
             stuId:stuId,
-            // stuId:10002,
             pageIndex:1,
             pageSize:10
         },{})

+ 18 - 0
frontend/wechat-web/src/modules/hiPages/accessnoticedetail/AccessNoticeDetail.css

@@ -0,0 +1,18 @@
+.an_student_name{
+    font-family: PingFangSC-Regular;
+    font-size: 15px;
+    color: #222222;
+    margin:20px 40px 10px 40px;text-align: left;
+}
+.an_student_photo{
+    height: 199px;border-radius: 10px;width: 300px;
+}
+.an_student_type{
+    font-family: PingFangSC-Regular;
+    font-size: 15px;
+    color: #666666;
+    letter-spacing: 1.25px;text-align: left;margin: 30px;
+}
+.an_student_foot_time{
+    background-color: #E7EDF6;text-align: left;padding-left: 25px;
+}

+ 58 - 5
frontend/wechat-web/src/modules/hiPages/accessnoticedetail/AccessNoticeDetail.js

@@ -8,34 +8,87 @@ import {connect} from 'react-redux';
 import './AccessNoticeDetail.css';
 import {isObjEmpty,getIntValue, getStrValue} from  '../../../utils/common';
 import {getWeixinInfo} from '../../../utils/api.request'
+import {fetchPost, fetchGet, fetchGetNoSession} from '../../../utils/fetchRequest';
+import {API, _baseURL} from '../../../configs/api.config';
 
 
 class AccessNoticeDetail extends Component{
    constructor(props){
         super(props);
         this.state = {
+            studentName:'',
+            studentType:'出校时间',
+            studentPhoto:'http://pic.vjshi.com/2018-08-28/8b163ad1a98e567f26cea40f34d56a27/00001.jpg?x-oss-process=style/watermark',
+            studentHourMinues:'',
 
         }
     }
     componentWillMount() {
     }
     componentDidMount() {
-        getWeixinInfo()
         let stuId = this.props.match.params.stuId
         let role = this.props.match.params.role
+        let anId = this.props.match.params.anId
         console.log("stuId",stuId)
         if (!isObjEmpty(stuId)){
-            this.getleaveDetail(stuId)
+            this.getANDetail(stuId,anId)
         }
+
+
+        let curDay = new Date().getDay()
+        if(curDay == 1){
+            curDay = '星期一'
+        }else if(curDay == 2){
+            curDay = '星期二'
+        }else if(curDay == 3){
+            curDay = '星期三'
+        }else if(curDay == 4){
+            curDay = '星期四'
+        }else if(curDay ==  5){
+            curDay = '星期五'
+        }else if(curDay == 6){
+            curDay = '星期六'
+        }else if(curDay ==  7){
+            curDay = '星期日'
+        }
+
+        let date = new Date().toLocaleDateString() + curDay
+        let hout_min = new Date().getHours() + ':' + new Date().getMinutes()
+
+        this.setState({
+            studentName:this.props.userInfo.user.student.stuName,
+            studentType:'出校时间',
+            studentPhoto:'http://pic.vjshi.com/2018-08-28/8b163ad1a98e567f26cea40f34d56a27/00001.jpg?x-oss-process=style/watermark',
+            studentTime:hout_min,
+            studentDate:date,
+        })
     }
      render(){
+       const  { studentName,studentType,studentPhoto,studentTime,studentDate} = this.state
         return(
-            <div>
-                Hello AccessNoticeDetail
-                <div id="c1"></div>
+            <div style={{textAlign:'center',}}>
+                <div className="an_student_name">{studentName}</div>
+                <img className="an_student_photo"  src = {studentPhoto} alt = ""/>
+                <div className="an_student_type">{studentType}</div>
+                <div className='an_student_foot_time'>
+                    <span style={{color:'#222222',fontSize:24,paddingRight:10,}}>{studentTime}</span>
+                    <span style={{color:'#666666',fontsize:12,}}>{studentDate}</span>
+                </div>
             </div>
         )
     }
+    getANDetail =(stuId,anId)=>{
+        fetchGet(API.leaveDetail, {
+            stuId: stuId,
+            anId:anId
+        }).then((response) => {
+            if (response.success && !isObjEmpty(response.data)) {
+
+            }
+        }).catch((error) => {
+            console.log("error:", JSON.stringify(error));
+        })
+    }
 }
 
 

+ 3 - 4
frontend/wechat-web/src/modules/hiPages/class-schedule/ClassSchedule.js

@@ -44,7 +44,6 @@ class ClassSchedule extends Component{
             },
             curDayData:[],
             Class_SchData:[1,2,3,4],
-            CurDay:2
         }
     }
     render(){
@@ -64,7 +63,7 @@ class ClassSchedule extends Component{
                     <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>)}
+                        {/*{this.state.curDayData.map((itemdata,index) => <HSItem key ={index} itemdata = {itemdata} handelSItem={this.handelSItem}></HSItem>)}*/}
                     </div>
                 </div>
 
@@ -109,14 +108,14 @@ class ClassSchedule extends Component{
     componentDidMount() {
         fetchGet(API.curriculumListByStuId,{
             stuId:this.props.userInfo.user.student.stuId,
-            // stuId:10003,
             curStatus:1
         },{}).then((response)=>{
             if(response.success && response.data){
                 this.setState({
                     classData:response.data
+                },function () {
+                    this.selectDayClick(this.state.curDay)
                 })
-                this.selectDayClick(this.state.curDay)
             }
         }).catch((error) =>{
             console.log('error',error)

+ 5 - 12
frontend/wechat-web/src/modules/hiPages/field-trip/FieldTrip.js

@@ -183,14 +183,6 @@ class FieldTrip extends Component {
 
     onTargetFocus = (e) => {
         if (isObjEmpty(this.state.targetData)) {
-            // getOrganization(ORGANIZATION_TEACHER, this.props.userInfo.userId, false)
-            //     .then(organization => {
-            //         this.setState({
-            //             targetData: organization.teachers,
-            //         })
-            //     }).catch(error => {
-            //
-            // })
             this.getOrganization()
         }
     }
@@ -302,16 +294,17 @@ class FieldTrip extends Component {
                                 title: getStrValue(teacherObj, 'teacherName'),
                                 userId: getIntValue(teacherObj, 'teacherId'),
                                 userPhone: getStrValue(teacherObj, 'userPhone'),
-                                value: getStrValue(teacherObj, 'teacherName') + `-1-${index}`,
-                                key: `1-${index}`,
+                                value: getStrValue(teacherObj, 'teacherName') + `-0-${index}`,
+                                key: `0-${index}`,
                             })
                         }
                     })
 
                     targetData.push({
                         title: `全体老师`,
-                        value: `1`,
-                        key: `1`,
+                        value: `0`,
+                        key: `0`,
+                        selectable:false,
                         children: teacherData,
                     })
                 }

+ 11 - 20
frontend/wechat-web/src/modules/hiPages/res_apply/ResApply.js

@@ -141,25 +141,11 @@ class ResApply extends Component{
             this.setState({fileList})
         }
     }
-    onTargetFocus = (e) => {
-        if (isObjEmpty(this.state.targetData)) {
-            // getOrganization(ORGANIZATION_TEACHER, this.props.userInfo.userId, false)
-            //     .then(organization => {
-            //         this.setState({
-            //             targetData: organization.teachers,
-            //         })
-            //     }).catch(error => {
-            //
-            // })
-            this.getOrganization()
-        }
-    }
+
     getOrganization = () => {
         Toast.loading('', 0)
-
         fetchGet(API.getAllTeacher, {
             schoolId: this.props.userInfo.user.schoolId,
-            // schoolId:1
         }).then(response => {
             Toast.hide()
             const {targetData} = this.state
@@ -176,21 +162,21 @@ class ResApply extends Component{
                                 title: getStrValue(teacherObj, 'teacherName'),
                                 userId: getIntValue(teacherObj, 'teacherId'),
                                 userPhone: getStrValue(teacherObj, 'userPhone'),
-                                value: getStrValue(teacherObj, 'teacherName') + `-1-${index}`,
-                                key: `1-${index}`,
+                                value: getStrValue(teacherObj, 'teacherName') + `-0-${index}`,
+                                key: `0-${index}`,
                             })
                         }
                     })
 
                     targetData.push({
                         title: `全体老师`,
-                        value: `1`,
-                        key: `1`,
+                        value: `0`,
+                        key: `0`,
+                        selectable:false,
                         children: teacherData,
                     })
                 }
             }
-
             console.log('targetData', targetData)
             this.setState({
                 targetData,
@@ -209,6 +195,11 @@ class ResApply extends Component{
         Toast.hide()
         clearTimeout(this.backTask)
     }
+    onTargetFocus = (e) => {
+        if (isObjEmpty(this.state.targetData)) {
+            this.getOrganization()
+        }
+    }
     onTargetChange = (value, label, checkNodes, count) => {
         this.checkNodes = checkNodes
         this.setState({

+ 1 - 1
frontend/wechat-web/src/modules/hiPages/score-inquiry/ScoreInquiry.css

@@ -1,7 +1,7 @@
 .this_contaior{background-color: #F2F2F2;height: 100vh;padding: 10px}
 .header_select_sty{display: flex;flex-direction: row;text-align: left;position: fixed;top: 0;background-color: #FFF;width: 100%;}
 .title_sty{font-size: 15px;text-align: center;width: 100%;padding: 10px; font-family: PingFangSC-Regular; color: #4197FC; letter-spacing: 0;}
-.score_data_sty{border-radius: 2%;background-color: #FFFFFF;height: auto;}
+.score_data_sty{border-radius: 10px;background-color: #FFFFFF;}
 .comhline_sty {background-color:#F2F2F2;width:100%;height:10px}
 .comhline_sty1{background-color:#F2F2F2;width:100%;height:1px;}
 .left_sty{font-size: 15px;color: #666666;margin: 10px;}

+ 0 - 6
frontend/wechat-web/src/modules/hiPages/scorenotification/ScoreNotification.js

@@ -105,9 +105,6 @@ class ScoreNotification extends Component{
 
                 }else {
                     Toast.fail('暂无数据', 2)
-                    this.setState({
-                        ScoreDataList:[]
-                    })
                 }
                 this.setState({
                     isRefreshing: false,
@@ -115,9 +112,6 @@ class ScoreNotification extends Component{
                 })
             }).catch((error) =>{
             console.log('error',error)
-            this.setState({
-                ScoreDataList:[]
-            })
             if (typeof error === 'string') {
                 Toast.fail(error, 2)
             } else {

+ 4 - 3
frontend/wechat-web/src/modules/hiPages/sendMeetting/SendMeet.js

@@ -54,7 +54,7 @@ class SendMeet extends Component {
                                 title: getStrValue(teacherObj, 'teacherName'),
                                 userId: getIntValue(teacherObj, 'teacherId'),
                                 userPhone: getStrValue(teacherObj, 'userPhone'),
-                                value: getStrValue(teacherObj, 'teacherName') + `-1-${index}`,
+                                value: getStrValue(teacherObj, 'teacherName') + `-0-${index}`,
                                 key: `1-${index}`,
                             })
                         }
@@ -62,8 +62,9 @@ class SendMeet extends Component {
 
                     targetData.push({
                         title: `全体老师`,
-                        value: `1`,
-                        key: `1`,
+                        value: `0`,
+                        key: `0`,
+                        selectable:false,
                         children: teacherData,
                     })
                 }

+ 8 - 34
frontend/wechat-web/src/modules/leave/LeaveAddCPage.js

@@ -23,14 +23,6 @@ import {getIntValue, getStrValue, isObjEmpty} from "../../utils/common";
 class LeaveAddCPage extends Component {
     componentDidMount() {
         this.node.scrollIntoView();
-        /*getOrganization(ORGANIZATION_TEACHER, this.props.userInfo.userId, false)
-            .then(organization => {
-                this.setState({
-                    targetData: organization.teachers,
-                })
-            }).catch(error => {
-
-        })*/
         this.getOrganization()
     }
 
@@ -71,7 +63,7 @@ class LeaveAddCPage extends Component {
         const targetProps = {
             targetData: this.state.targetData,
             targetValues: this.state.targetList,
-            title: '提交对象',
+            title: '接收人',
             targetCount: this.state.targetCount,
             onTargetChange: this.onTargetChange.bind(this),
             onTargetFocus: this.onTargetFocus.bind(this),
@@ -81,7 +73,7 @@ class LeaveAddCPage extends Component {
         const defaultTargetProps = {
             targetData: [],
             targetValues: this.state.targetList,
-            title: '提交对象',
+            title: '接收人',
             targetCount: this.state.targetCount,
             onTargetChange: this.onTargetChange.bind(this),
             onTargetFocus: this.onTargetFocus.bind(this),
@@ -136,17 +128,8 @@ class LeaveAddCPage extends Component {
                     beforeUpload={this.beforeUpload.bind(this)}
                     handleChange={this.handleChange.bind(this)}
                 />
-
-                {/*<div className="flex_center margin_top_20">*/}
-                {/*<center><Button type="button" className="btn btn-primary comBtn_sty"*/}
-                {/*onClick={this.onSubmitClick}>提交</Button></center>*/}
-                {/*</div>*/}
                 <Button className='commonButton' type='primary' style={{margin: '35px'}}
                         onClick={this.onSubmitClick}>提交</Button>
-                {/*<div*/}
-                {/*onClick={this.clickLeaveList.bind(this)}*/}
-                {/*className="leave-history flex_center text_underline">*/}
-                {/*请假记录*/}
                 {/*</div>*/}
             </div>
         )
@@ -232,7 +215,7 @@ class LeaveAddCPage extends Component {
         Toast.loading('', 0)
 
         fetchGet(API.getAllTeacher, {
-            schoolId: this.props.userInfo.user.userFunId,
+            schoolId: this.props.userInfo.user.schoolId,
             // schoolId:1
         }).then(response => {
             Toast.hide()
@@ -250,17 +233,17 @@ class LeaveAddCPage extends Component {
                                 title: getStrValue(teacherObj, 'teacherName'),
                                 userId: getIntValue(teacherObj, 'teacherId'),
                                 userPhone: getStrValue(teacherObj, 'userPhone'),
-                                value: getStrValue(teacherObj, 'teacherName') + `-1-${index}`,
-                                key: `1-${index}`,
-                                selectable:false
+                                value: getStrValue(teacherObj, 'teacherName') + `-0-${index}`,
+                                key: `0-${index}`,
                             })
                         }
                     })
 
                     targetData.push({
                         title: `全体老师`,
-                        value: `1`,
-                        key: `1`,
+                        value: `0`,
+                        key: `0`,
+                        selectable:false,
                         children: teacherData,
                     })
                 }
@@ -290,19 +273,10 @@ class LeaveAddCPage extends Component {
 
     onTargetFocus = (e) => {
         if (isObjEmpty(this.state.targetData)) {
-            /* getOrganization(ORGANIZATION_TEACHER, this.props.userInfo.userId, false)
-                 .then(organization => {
-                     this.setState({
-                         targetData: organization.teachers,
-                     })
-                 }).catch(error => {
-
-             })*/
             this.getOrganization()
         }
     }
 
-
     onTargetChange = (value, label, checkNodes, count) => {
         this.checkNodes = checkNodes
         this.setState({

+ 4 - 4
frontend/wechat-web/src/modules/leave/LeaveAddPage.js

@@ -206,16 +206,16 @@ class LeaveAddPage extends Component{
                                 title: getStrValue(teacherObj, 'teacherName'),
                                 userId: getIntValue(teacherObj, 'teacherId'),
                                 userPhone: getStrValue(teacherObj, 'userPhone'),
-                                value: getStrValue(teacherObj, 'teacherName') + `-1-${index}`,
-                                key: `1-${index}`,
+                                value: getStrValue(teacherObj, 'teacherName') + `-0-${index}`,
+                                key: `0-${index}`,
                             })
                         }
                     })
 
                     targetData.push({
                         title: `全体老师`,
-                        value: `1`,
-                        key: `1`,
+                        value: `0`,
+                        key: `0`,
                         selectable:false,
                         children: teacherData,
                     })