Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/uas-office-integration into dev

RaoMeng 5 years ago
parent
commit
fa96e9bac1

+ 13 - 5
uas-office-web/uas-mobile/src/components/common/calendar/CommonCalendar.jsx

@@ -27,17 +27,19 @@ export default class CommonCalendar extends Component {
     return (
     return (
       <div className='calendar-box'>
       <div className='calendar-box'>
         <div className="site-calendar-demo-card">
         <div className="site-calendar-demo-card">
-          <Calendar dateCellRender={this.dateCellRender} fullscreen={false} onSelect={this.onSelectTime}/>
+          <Calendar
+            onPanelChange={this.onPanelChange}
+            dateCellRender={this.dateCellRender}
+            onSelect={this.onSelectTime}
+            fullscreen={false}
+          />
         </div>
         </div>
       </div>
       </div>
     )
     )
   }
   }
 
 
   dateformat = (date) => {
   dateformat = (date) => {
-    let year = date._d.getFullYear(),//年
-      month = date._d.getMonth() + 1,//月
-      day = date._d.getDate() < 10 ? '0' + date._d.getDate() : date._d.getDate(),//日
-      clickDate = year + '-' + month + '-' + day
+    let clickDate = new Date(date._d).format('yyyy-MM-dd')
     return clickDate
     return clickDate
   }
   }
 
 
@@ -89,4 +91,10 @@ export default class CommonCalendar extends Component {
     this.props.clickDate(clickDate)
     this.props.clickDate(clickDate)
   }
   }
 
 
+  //点击上月或者下月时触发
+  onPanelChange = (date, mode) => {
+    let nowDate = new Date(date._d).format('yyyy-MM')
+    this.props.clickBlankPanel(nowDate)
+  }
+
 }
 }

+ 6 - 6
uas-office-web/uas-mobile/src/components/private/profile/ProfileCard.jsx

@@ -36,18 +36,18 @@ export default class ProfileCard extends Component {
     let { companyName, userName, post, imgUrl } = mineInfo
     let { companyName, userName, post, imgUrl } = mineInfo
 
 
     return (
     return (
-      <div style={{ padding: '15px 10px 0px' }}>
+      <div className="mine-info" style={{ padding: '15px 10px 0px 15px' }}>
         <div className="profile-layout">
         <div className="profile-layout">
           <div className="profile-info">
           <div className="profile-info">
             <div className="company">{companyName}</div>
             <div className="company">{companyName}</div>
             <div className="name func-font-family">{userName}</div>
             <div className="name func-font-family">{userName}</div>
             <div className="post">{post}</div>
             <div className="post">{post}</div>
           </div>
           </div>
-          <div className="profile-img">
-            {
-              imgUrl ? <img src={imgUrl}/> : <img/>
-            }
-          </div>
+          {
+            imgUrl
+              ? <img className="profile-img" src={imgUrl}/>
+              : <img className="profile-img"/>
+          }
         </div>
         </div>
         <div className="profile-set">
         <div className="profile-set">
           <Item disabled={true} arrow="horizontal">设置</Item>
           <Item disabled={true} arrow="horizontal">设置</Item>

+ 9 - 11
uas-office-web/uas-mobile/src/components/private/profile/ProfileCard.less

@@ -1,22 +1,28 @@
+.mine-info {
+  width: 100%;
+}
+
 .profile-layout {
 .profile-layout {
+  width: 100%;
   overflow: hidden;
   overflow: hidden;
   border-bottom: 1px solid #F5F5F5;
   border-bottom: 1px solid #F5F5F5;
   background-color: #fff;
   background-color: #fff;
   display: flex;
   display: flex;
+  flex-direction: row;
   align-items: center;
   align-items: center;
+  justify-content: space-between;
+  padding: @com-page-padding;
 
 
   .profile-info {
   .profile-info {
-    padding: @com-page-padding;
+    flex: 1 1;
 
 
     .company {
     .company {
       font-size: 15px;
       font-size: 15px;
       line-height: 24px;
       line-height: 24px;
       margin-bottom: 16px;
       margin-bottom: 16px;
       color: #808080;
       color: #808080;
-      white-space: nowrap;
       overflow: hidden;
       overflow: hidden;
       text-overflow: ellipsis;
       text-overflow: ellipsis;
-      width: 225px;
     }
     }
 
 
     .name {
     .name {
@@ -34,14 +40,6 @@
   .profile-img {
   .profile-img {
     width: 60px;
     width: 60px;
     height: 60px;
     height: 60px;
-    line-height: 60px;
-    margin-left: 16px;
-    text-align: center;
-
-    img {
-      width: 100%;
-      height: 100%;
-    }
   }
   }
 }
 }
 
 

+ 1 - 1
uas-office-web/uas-mobile/src/components/private/profile/ProfileList.jsx

@@ -28,7 +28,7 @@ export default class ProfileList extends Component {
   render () {
   render () {
 
 
     return (
     return (
-      <div>
+      <div className="mine-setting">
         <Item arrow="horizontal">切换账套</Item>
         <Item arrow="horizontal">切换账套</Item>
         <Item arrow="horizontal">清除缓存</Item>
         <Item arrow="horizontal">清除缓存</Item>
         <Item arrow="horizontal">用户反馈</Item>
         <Item arrow="horizontal">用户反馈</Item>

+ 4 - 8
uas-office-web/uas-mobile/src/pages/private/homePage/MineRoot.jsx

@@ -1,5 +1,5 @@
 /**
 /**
- * Created by RaoMeng on 2020/11/9
+ * Created by hujs on 2020/11/9
  * Desc: 我的
  * Desc: 我的
  */
  */
 
 
@@ -26,13 +26,9 @@ class MineRoot extends Component {
 
 
   render () {
   render () {
     return (
     return (
-      <div style={{ padding: '0px 5px' }}>
-        <div className="mine-info">
-          <ProfileCard/>
-        </div>
-        <div className="mine-setting">
-          <ProfileList/>
-        </div>
+      <div style={{ padding: '0px 5px', width: '100%' }}>
+        <ProfileCard/>
+        <ProfileList/>
       </div>
       </div>
     )
     )
   }
   }

+ 15 - 2
uas-office-web/uas-mobile/src/pages/private/schedulePage/SchedulePage.jsx

@@ -4,7 +4,7 @@
  */
  */
 import React, { Component } from 'react'
 import React, { Component } from 'react'
 import { connect } from 'react-redux'
 import { connect } from 'react-redux'
-import UasIcon from '../../../configs/iconfont.conig'
+import { PullToRefresh, ListView, Toast } from 'antd-mobile'
 import CommonCalendar from '../../../components/common/calendar/CommonCalendar'
 import CommonCalendar from '../../../components/common/calendar/CommonCalendar'
 import PunchClock from '../../../components/private/punchclock/PunchClock'
 import PunchClock from '../../../components/private/punchclock/PunchClock'
 import NoticeMatter from '../../../components/private/noticematter/NoticeMatter'
 import NoticeMatter from '../../../components/private/noticematter/NoticeMatter'
@@ -48,6 +48,11 @@ class SchedulePage extends Component {
     }
     }
   }
   }
 
 
+  componentWillMount () {
+    //发起请求
+    // Toast.loading('加载中...', 0)
+  }
+
   componentDidMount () {
   componentDidMount () {
     document.title = '我的日程'
     document.title = '我的日程'
   }
   }
@@ -76,7 +81,7 @@ class SchedulePage extends Component {
 
 
     return (
     return (
       <div className='schedule-root'>
       <div className='schedule-root'>
-        <CommonCalendar clickDate={this.clickDate} calendarData={calendarData}/>
+        <CommonCalendar clickBlankPanel={this.clickBlankPanel} clickDate={this.clickDate} calendarData={calendarData}/>
         <PunchClock punchClockData={punchClockData}/>
         <PunchClock punchClockData={punchClockData}/>
         <NoticeMatter noticeMatterData={noticeMatterData}/>
         <NoticeMatter noticeMatterData={noticeMatterData}/>
       </div>
       </div>
@@ -84,6 +89,10 @@ class SchedulePage extends Component {
   }
   }
 
 
   clickDate = (date) => {
   clickDate = (date) => {
+    let nowDate = new Date().format('yyyy-MM-dd')
+    if (nowDate == date) {
+      return false
+    }
     let testData1 = {
     let testData1 = {
       companyClass: '测试班次',
       companyClass: '测试班次',
       clockRecord: {
       clockRecord: {
@@ -122,6 +131,10 @@ class SchedulePage extends Component {
     })
     })
   }
   }
 
 
+  clickBlankPanel = (date) => {
+    //发送请求重新渲染日历上的点数
+  }
+
 }
 }
 
 
 let mapStateToProps = (state) => ({})
 let mapStateToProps = (state) => ({})