فهرست منبع

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

RaoMeng 5 سال پیش
والد
کامیت
abe6099dde

+ 3 - 0
uas-office-web/uas-mobile/src/components/common/bizgoblin/TableChart.jsx

@@ -94,6 +94,9 @@ export default class TableChart extends Component {
       } else {
         message.error('图表数据获取失败')
       }
+      this.setState({
+        loading: false,
+      })
     })
   }
 }

+ 26 - 0
uas-office-web/uas-mobile/src/components/private/kanban/KanBan.jsx

@@ -11,6 +11,10 @@ import { fetchGet } from '../../../utils/common/fetchRequest'
 import { saveChartState } from '../../../redux/actions/chartState'
 import { API } from '../../../configs/api.config'
 import { message } from 'antd'
+import {
+  FolderOpenOutlined,
+} from '@ant-design/icons'
+import './kanban.less'
 
 class KanBan extends Component {
 
@@ -42,6 +46,11 @@ class KanBan extends Component {
         )
       }
     })
+    if (subsData.length == 0) {
+      chartItem.push(
+        this.getNoneElement(),
+      )
+    }
 
     return (
       <>
@@ -65,6 +74,23 @@ class KanBan extends Component {
     })
   }
 
+  getNoneElement = () => {
+    return (
+      <div className="kanban-panel-nodata" key='nodata'>
+        <div className="nodata-box">
+          <FolderOpenOutlined
+            style={{ fontSize: '50px', color: '#DCDCDC' }}
+          />
+          <p>暂无数据,<span onClick={this.addChart} className="addchart">立即添加</span></p>
+        </div>
+      </div>
+    )
+  }
+
+  addChart = () => {
+    this.props.KanbanManage()
+  }
+
 }
 
 let mapStateToProps = (state) => ({

+ 28 - 0
uas-office-web/uas-mobile/src/components/private/kanban/kanban.less

@@ -0,0 +1,28 @@
+.kanban-panel-nodata {
+  background: #fff;
+  width: 100%;
+  min-height: 190px;
+  padding: 8px;
+  position: relative;
+
+  .nodata-box {
+    position: absolute;
+    top: 44px;
+    left: 50%;
+    transform: translate(-50%);
+
+    .anticon-folder-open {
+      display: block;
+      text-align: center;
+      margin-bottom: 6px;
+    }
+
+    p {
+      color: #C0C0C0;
+
+      .addchart {
+        color: #47a3ff;
+      }
+    }
+  }
+}

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

@@ -7,7 +7,11 @@ import React, { Component } from 'react'
 import { connect } from 'react-redux'
 import { isObjEmpty } from '../../../utils/common/common.util'
 import './Profile.less'
+import { Avatar } from 'antd'
 import { Icon, List } from 'antd-mobile'
+import {
+  UserOutlined,
+} from '@ant-design/icons'
 
 const Item = List.Item
 
@@ -39,11 +43,7 @@ class ProfileCard extends Component {
             <div className="name func-font-family">{userName}</div>
             <div className="post">{departName + ' > ' + jobName}</div>
           </div>
-          {
-            imgUrl
-              ? <img className="profile-img" src={imgUrl}/>
-              : <img className="profile-img"/>
-          }
+          <Avatar shape="square" size={50} src={imgUrl ? imgUrl : ''} icon={imgUrl ? null : <UserOutlined/>}/>
         </div>
         <div className="profile-set">
           {/* <Item disabled={true} arrow="horizontal">设置</Item> */}

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

@@ -32,15 +32,25 @@ class ProfileList extends Component {
       <div className="mine-setting">
         <Item arrow="horizontal" extra={accountName} onClick={this.changeAccount}>切换账套</Item>
         <Item arrow="horizontal">清除缓存</Item>
-        <Item arrow="horizontal">用户反馈</Item>
-        <Item arrow="horizontal">联系我们</Item>
+        <Item arrow="horizontal" onClick={this.userFeedback}>用户反馈</Item>
+        <Item arrow="horizontal" onClick={this.contactInfo}>联系我们</Item>
       </div>
     )
   }
 
+  //切换账套
   changeAccount = () => {
     this.props.history.push('/changeAccount')
   }
+  //用户反馈
+  userFeedback = () => {
+    this.props.history.push('/userFeedback')
+  }
+  //联系我们
+  contactInfo = () => {
+    this.props.history.push('/contactInfo')
+  }
+
 }
 
 export default withRouter(ProfileList)

+ 1 - 1
uas-office-web/uas-mobile/src/components/private/punchclock/ClockRecord.jsx

@@ -40,7 +40,7 @@ export default class ClockRecord extends Component {
               className="on-work-time">{onTime.type == '未打卡' ? '未打卡' : onTime.type + '(' + onTime.punchTime + ')'}</div>
           </div>
           <div
-            className={offTime.type == '未打卡' ? 'punch-clock-on-time punch-clock-box punch-clock-box-delay' : 'punch-clock-on-time punch-clock-box punch-clock-box-normal'}>
+            className={offTime.type == '未打卡' || offTime.type == '迟到' || offTime.type == '早退' ? 'punch-clock-on-time punch-clock-box punch-clock-box-delay' : 'punch-clock-on-time punch-clock-box punch-clock-box-normal'}>
             <div className="off-work">下班{offTime.auto ? '·自动' : ''}</div>
             <div
               className="off-work-time">{offTime.type == '未打卡' ? '未打卡' : offTime.type + '(' + offTime.punchTime + ')'}</div>

+ 13 - 3
uas-office-web/uas-mobile/src/configs/router.config.js

@@ -64,9 +64,15 @@ const ServiceDetail = PageLoadable(
 const ServiceAdd = PageLoadable(
   import(/* webpackChunkName:'subscribe' */'@/pages/private/service/ServiceAdd'))
 
-/*************************************************切换账套************************************************/
+/*************************************************我的信息************************************************/
 const ChangeAccount = PageLoadable(
-  import(/* webpackChunkName:'changeaccount' */'@/pages/private/changeAccount/ChangeAccount'))
+  import(/* webpackChunkName:'mine' */'@/pages/private/mine/ChangeAccount'))
+
+const ContactInfo = PageLoadable(
+  import(/* webpackChunkName:'mine' */'@/pages/private/mine/ContactInfo'))
+
+const UserFeedback = PageLoadable(
+  import(/* webpackChunkName:'mine' */'@/pages/private/mine/UserFeedback'))
 
 /**
  * 自定义页面返回事件拦截框
@@ -152,9 +158,13 @@ class Routes extends React.Component {
           <Route path='/serviceAdd/:id/:caller/:title?'
                  component={ServiceAdd}/>
 
-          {/*************************************切换账套*****************************************/}
+          {/*************************************我的信息*****************************************/}
           {/*切换账套列表*/}
           <Route path='/changeAccount' component={ChangeAccount}/>
+          {/* 联系我们 */}
+          <Route path='/contactInfo' component={ContactInfo}/>
+          {/* 用户反馈 */}
+          <Route path='/userFeedback' component={UserFeedback}/>
 
           {/*所有错误路由跳转页面*/}
           <Route render={() => (

+ 1 - 1
uas-office-web/uas-mobile/src/pages/private/homePage/MainRoot.jsx

@@ -70,7 +70,7 @@ class MainRoot extends Component {
             }}
             rightIcon='uas-edit'
             onRightClick={this.onKanbanManage}/>
-          <KanBan/>
+          <KanBan KanbanManage={this.onKanbanManage}/>
         </div>
       </div>
     )

+ 0 - 0
uas-office-web/uas-mobile/src/pages/private/changeAccount/ChangeAccount.jsx → uas-office-web/uas-mobile/src/pages/private/mine/ChangeAccount.jsx


+ 48 - 0
uas-office-web/uas-mobile/src/pages/private/mine/ContactInfo.jsx

@@ -0,0 +1,48 @@
+/**
+ * Created by Hujs on 2020/12/25
+ * Desc: 联系我们
+ */
+
+import React, { Component } from 'react'
+import { connect } from 'react-redux'
+import { Toast, List, Modal } from 'antd-mobile'
+import './contact-info.less'
+
+class ContactInfo extends Component {
+
+  constructor () {
+    super()
+
+    this.state = {}
+  }
+
+  componentDidMount () {
+    document.title = this.title || '联系我们'
+  }
+
+  componentWillUnmount () {
+
+  }
+
+  render () {
+    return (
+      <div className="contact—info">
+        <div className="info-box">
+          <p className="title">电话</p>
+          <p className="detail">400-830-1818</p>
+          <p className="title">Email</p>
+          <p className="detail">info@usoftchina.com</p>
+          <p className="title">优软科技官网</p>
+          <p className="detail">https://uas.usoftchina.com/</p>
+          <p className="title">地址</p>
+          <p className="detail">深圳市宝安区新安街道海旺社区宝兴路6号海纳百川总部大厦B座6、7楼</p>
+        </div>
+      </div>
+    )
+  }
+
+}
+
+let mapStateToProps = (state) => ({})
+
+export default connect(mapStateToProps)(ContactInfo)

+ 130 - 0
uas-office-web/uas-mobile/src/pages/private/mine/UserFeedback.jsx

@@ -0,0 +1,130 @@
+/**
+ * Created by Hujs on 2020/12/25
+ * Desc: 用户反馈
+ */
+
+import React, { Component } from 'react'
+import { connect } from 'react-redux'
+import { Toast, List, Modal, Button, TextareaItem } from 'antd-mobile'
+import { Upload, message } from 'antd'
+import {
+  EditOutlined,
+  LoadingOutlined,
+  PlusOutlined,
+} from '@ant-design/icons'
+import { _baseURL, _host, API } from '../../../configs/api.config'
+import './user-feedback.less'
+
+class UserFeedback extends Component {
+
+  constructor () {
+    super()
+
+    this.state = {
+      inputValue: '',
+      loading: false,
+    }
+  }
+
+  componentDidMount () {
+    document.title = this.title || '用户反馈'
+  }
+
+  componentWillUnmount () {
+
+  }
+
+  render () {
+    const { loading, imageUrl } = this.state
+    const uploadButton = (
+      <div>
+        {loading ? <LoadingOutlined/> : <PlusOutlined/>}
+        <div style={{ marginTop: 8 }}>上传图片</div>
+      </div>
+    )
+    return (
+      <div className="user-feedback">
+        <div className="feedback-input-panel">
+          <EditOutlined/> 反馈信息
+          <TextareaItem
+            rows={4}
+            placeholder="请输入您的问题...(400字以内)"
+            onChange={this.onTextChange}
+          />
+        </div>
+        <div className="upload-panel">
+          <Upload
+            name="avatar"
+            listType="picture-card"
+            className="avatar-uploader"
+            showUploadList={false}
+            action={_baseURL + '/mobile/uploadAttachs.action'}
+            beforeUpload={this.beforeUpload}
+            onChange={this.handleChange}
+          >
+            {imageUrl ? <img src={imageUrl} alt="avatar" style={{ width: '100%' }}/> : uploadButton}
+          </Upload>
+        </div>
+
+
+        <div className="feedback-btn-panel">
+          <Button
+            className='feedback-btn-panel-button'
+            type="primary"
+            onClick={this.onCommit}
+            inline>提交</Button>
+        </div>
+      </div>
+    )
+  }
+
+  //提交
+  onCommit = () => {
+  }
+
+  //反馈内容
+  onTextChange = (val) => {
+    this.setState({
+      inputValue: val,
+    })
+  }
+
+  getBase64 = (img, callback) => {
+    const reader = new FileReader()
+    reader.addEventListener('load', () => callback(reader.result))
+    reader.readAsDataURL(img)
+  }
+
+  beforeUpload = (file) => {
+    const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
+    if (!isJpgOrPng) {
+      Toast.fail('请只上传JPG/PNG文件!')
+      return false
+    }
+    if (file.size && file.size > 100 * 1024 * 1024) {
+      Toast.fail('文件大小不能超过100M')
+      return false
+    }
+  }
+
+  handleChange = info => {
+    if (info.file.status === 'uploading') {
+      this.setState({ loading: true })
+      return
+    }
+    if (info.file.status === 'done') {
+      // Get this url from response in real world.
+      this.getBase64(info.file.originFileObj, imageUrl =>
+        this.setState({
+          imageUrl,
+          loading: false,
+        }),
+      )
+    }
+  }
+
+}
+
+let mapStateToProps = (state) => ({})
+
+export default connect(mapStateToProps)(UserFeedback)

+ 0 - 0
uas-office-web/uas-mobile/src/pages/private/changeAccount/change-account.less → uas-office-web/uas-mobile/src/pages/private/mine/change-account.less


+ 27 - 0
uas-office-web/uas-mobile/src/pages/private/mine/contact-info.less

@@ -0,0 +1,27 @@
+.contact—info {
+  p {
+    margin: 0;
+  }
+
+  width: 100%;
+  height: 100vh;
+  position: relative;
+
+  .info-box {
+    width: 78%;
+    position: absolute;
+    top: 50px;
+    left: 50%;
+    transform: translate(-50%);
+
+    .title {
+      color: #333333;
+      font-size: 18px;
+      line-height: 36px;
+    }
+
+    .detail {
+      margin-bottom: 25px;
+    }
+  }
+}

+ 44 - 0
uas-office-web/uas-mobile/src/pages/private/mine/user-feedback.less

@@ -0,0 +1,44 @@
+.user-feedback {
+  width: 100%;
+  height: 100vh;
+  background: #f5f5f9;
+  padding: 8px;
+
+  .feedback-input-panel {
+    background: #fff;
+    font-size: 14px;
+    padding-left: 6px;
+  }
+
+  .upload-panel {
+    background: #fff;
+
+    .ant-upload {
+      margin: 8px;
+    }
+  }
+
+  .feedback-btn-panel {
+    width: 100%;
+    background: #fff;
+    position: fixed;
+    bottom: 0px;
+    z-index: 99;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    justify-content: center;
+    padding-right: 12px;
+
+    .feedback-btn-panel-button {
+      flex: 1;
+      margin: 12px;
+      border: 1px solid #108ee9;
+
+      &:before {
+        border: none !important;
+      }
+    }
+
+  }
+}

+ 32 - 4
uas-office-web/uas-mobile/src/pages/private/taskTodo/TaskTodo.jsx

@@ -21,6 +21,7 @@ class TaskTodo extends Component {
 
     this.state = {
       data: [],
+      searchValue: '',
       refreshing: false,
       height: document.documentElement.clientHeight,
     }
@@ -49,12 +50,16 @@ class TaskTodo extends Component {
   }
 
   render () {
-    let { data, height } = this.state
+    let { data, height, searchValue } = this.state
 
     return (
       <div className="task-todo-page">
         <SearchBar placeholder='搜索'
-                   onSubmit={value => this.onSubmit(value)}/>
+                   onSubmit={value => this.onSubmit(value)}
+                   onCancel={this.onCancel}
+                   onChange={this.onSearchChange}
+                   value={searchValue}
+        />
 
         <PullToRefresh
           refreshing={this.state.refreshing}
@@ -80,6 +85,7 @@ class TaskTodo extends Component {
         Toast.hide()
         this.setState({
           data: response.data.list,
+          searchData: response.data.list,
           refreshing: false,
         })
       }).catch(error => {
@@ -104,8 +110,30 @@ class TaskTodo extends Component {
   }
 
   //回车搜索事件
-  onSubmit = (value) => {
-    //console.log(value)
+  onSubmit = (val) => {
+    let { searchData } = this.state
+    let dataSource = []
+    searchData.forEach((item, index) => {
+      if (item.RA_TASKNAME.indexOf(val) > -1) {
+        dataSource.push(item)
+      }
+    })
+    this.setState({
+      data: dataSource,
+    })
+  }
+
+  onSearchChange = (val) => {
+    this.setState({
+      searchValue: val,
+    })
+  }
+
+  onCancel = () => {
+    this.getListData()
+    this.setState({
+      searchValue: '',
+    })
   }
 }